From margitsw@t-online.de Fri Oct 1 01:28:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 01:28:59 -0700 (PDT) Received: from mailout06.sul.t-online.com (mailout06.sul.t-online.com [194.25.134.19]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i918Sl34001160 for ; Fri, 1 Oct 2004 01:28:48 -0700 Received: from fwd08.aul.t-online.de by mailout06.sul.t-online.com with smtp id 1CDIlu-0001TT-01; Fri, 01 Oct 2004 10:28:10 +0200 Received: from margit.t-online.de (Eq72tqZQYeFJSATDoI6WHGJ8lJbKO6salRcY6pGgjMmnF2ZtYJpI6M@[80.128.216.173]) by fwd08.sul.t-online.com with esmtp id 1CDIlk-1TXdRo0; Fri, 1 Oct 2004 10:28:00 +0200 Message-Id: <5.1.0.14.2.20041001084419.02570b18@pop.t-online.de> X-Sender: margitsw@pop.t-online.de X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Fri, 01 Oct 2004 09:04:27 +0200 To: Jeff Garzik From: margitsw@t-online.de (Margit Schubert-While) Subject: Re: [PATCH 2.6.9-rc2 17/38] net/islpci_dev: replace schedule_timeout() with msleep() Cc: nacc@us.ibm.com, hvr@gnu.org, mcgrof@studorgs.rutgers.edu, kernel-janitors@lists.osdl.org, prism54-devel@prism54.org, netdev@oss.sgi.com In-Reply-To: <415CD9D9.2000607@pobox.com> References: <5.1.0.14.2.20040924074745.00b1cd40@pop.t-online.de> <20040923221303.GB13244@us.ibm.com> <20040923221303.GB13244@us.ibm.com> <5.1.0.14.2.20040924074745.00b1cd40@pop.t-online.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-ID: Eq72tqZQYeFJSATDoI6WHGJ8lJbKO6salRcY6pGgjMmnF2ZtYJpI6M X-TOI-MSGID: ba701764-ae02-4cb2-8a64-3c7b741aec8c X-archive-position: 9760 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: margitsw@t-online.de Precedence: bulk X-list: netdev At 00:15 01.10.2004 -0400, Jeff scribeth: >I would rather see an msleep implementation in 2.4.x... Hear, hear. And can we PLEASE have a "#define HAVE_MSLEEP" in delay.h ?!!! (2.4. AND 2.6) Margit From laforge@netfilter.org Fri Oct 1 02:02:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 02:02:45 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9192dsY001982 for ; Fri, 1 Oct 2004 02:02:39 -0700 Received: from dsl-213-023-154-116.arcor-ip.net ([213.23.154.116] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1CDJJ1-0006Kj-CT; Fri, 01 Oct 2004 11:02:23 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1CDJIz-00077K-Hi; Fri, 01 Oct 2004 11:02:21 +0200 Date: Fri, 1 Oct 2004 11:02:21 +0200 From: Harald Welte To: Yasuyuki Kozakai Cc: kaber@trash.net, okir@suse.de, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org, usagi-core@linux-ipv6.org Subject: When to submit to which list (was Re: [PATCH] netfilter6: Skip extension headers when matching icmp6-type) Message-ID: <20041001090221.GO1860@sunbeam.de.gnumonks.org> Mail-Followup-To: Harald Welte , Yasuyuki Kozakai , kaber@trash.net, okir@suse.de, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org, usagi-core@linux-ipv6.org References: <200409301244.i8UCid17009482@toshiba.co.jp> <415C1CC9.2090604@trash.net> <200410010019.i910JlZY002193@toshiba.co.jp> <200410010509.i9159Cg2021037@toshiba.co.jp> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/T+UM55GOh1Yge7W" Content-Disposition: inline In-Reply-To: <200410010509.i9159Cg2021037@toshiba.co.jp> User-Agent: Mutt/1.5.6+20040818i X-archive-position: 9761 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@netfilter.org Precedence: bulk X-list: netdev --/T+UM55GOh1Yge7W Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 01, 2004 at 02:09:10PM +0900, Yasuyuki Kozakai wrote: > # Sometimes I confuse I should send patches to netdev, or send them to > # netfilter-devel and core team of netfilter review/send it to netdev. I don't know what Patrick told you, but I think as a general rule of thumb, all netfilter-related patches should go to netfilter-devel first. Patrick or I will then push them upstream to DaveM (most times with Cc to netdev). For urgent/critical bugfixes (that are not too complex), I am ok if netfilter-devel is bypassed and you submit it to netdev/davem immediately. Pragmatically speaking, Patrick or me will read your emails on either list - but a number of other netfilter developers is not following netdev, so you deprive them of the chance to give comments before it is submitted ;) Thanks! --=20 - Harald Welte http://www.netfilter.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie --/T+UM55GOh1Yge7W Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBXR0dXaXGVTD0i/8RAlTsAJ9kMxhFyec9cXf20Z7dH4U+HotAlgCePMol Fs2rfgLUkx5j3K3s7G1oDbQ= =ng6f -----END PGP SIGNATURE----- --/T+UM55GOh1Yge7W-- From yasuyuki.kozakai@toshiba.co.jp Fri Oct 1 02:33:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 02:33:48 -0700 (PDT) Received: from inet-tsb.toshiba.co.jp (inet-tsb.toshiba.co.jp [202.33.96.40]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i919Xc4i003075 for ; Fri, 1 Oct 2004 02:33:39 -0700 Received: from tsb-wall.toshiba.co.jp ([133.199.160.134]) by inet-tsb.toshiba.co.jp with ESMTP id i919X6bv004952; Fri, 1 Oct 2004 18:33:06 +0900 (JST) Received: (from root@localhost) by tsb-wall.toshiba.co.jp id i919X6J5003553; Fri, 1 Oct 2004 18:33:06 +0900 (JST) Received: from tis2 [133.199.160.66] by tsb-wall.toshiba.co.jp with SMTP id UAA03552 ; Fri, 1 Oct 2004 18:33:06 +0900 Received: from mx.toshiba.co.jp by tis2.tis.toshiba.co.jp id SAA12611; Fri, 1 Oct 2004 18:33:05 +0900 (JST) Received: by toshiba.co.jp id i919X4R9010911; Fri, 1 Oct 2004 18:33:04 +0900 (JST) Date: Fri, 01 Oct 2004 18:33:02 +0900 (JST) Message-Id: <200410010933.i919X4R9010911@toshiba.co.jp> To: laforge@netfilter.org Cc: yasuyuki.kozakai@toshiba.co.jp, kaber@trash.net, okir@suse.de, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org, usagi-core@linux-ipv6.org Subject: Re: When to submit to which list From: Yasuyuki Kozakai In-Reply-To: <20041001090221.GO1860@sunbeam.de.gnumonks.org> References: <200410010019.i910JlZY002193@toshiba.co.jp> <200410010509.i9159Cg2021037@toshiba.co.jp> <20041001090221.GO1860@sunbeam.de.gnumonks.org> X-Mailer: Mew version 3.3 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 9762 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: yasuyuki.kozakai@toshiba.co.jp Precedence: bulk X-list: netdev OK, I'll send patches to netfilter-devel as ever. Thanks, ----------------------------------------------------------------- Yasuyuki KOZAKAI @ USAGI Project From: Harald Welte Date: Fri, 1 Oct 2004 11:02:21 +0200 > On Fri, Oct 01, 2004 at 02:09:10PM +0900, Yasuyuki Kozakai wrote: > > # Sometimes I confuse I should send patches to netdev, or send them to > > # netfilter-devel and core team of netfilter review/send it to netdev. > > I don't know what Patrick told you, but I think as a general rule of > thumb, all netfilter-related patches should go to netfilter-devel first. > Patrick or I will then push them upstream to DaveM (most times with Cc > to netdev). > > For urgent/critical bugfixes (that are not too complex), I am ok if > netfilter-devel is bypassed and you submit it to netdev/davem > immediately. > > Pragmatically speaking, Patrick or me will read your emails on either > list - but a number of other netfilter developers is not following > netdev, so you deprive them of the chance to give comments before it is > submitted ;) > > Thanks! > > -- > - Harald Welte http://www.netfilter.org/ > ============================================================================ > "Fragmentation is like classful addressing -- an interesting early > architectural error that shows how much experimentation was going > on while IP was being designed." -- Paul Vixie From ak@suse.de Fri Oct 1 03:11:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 03:11:51 -0700 (PDT) Received: from Cantor.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91ABhKB005813 for ; Fri, 1 Oct 2004 03:11:45 -0700 Received: from hermes.suse.de (hermes-ext.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 6B52ECB05CC; Fri, 1 Oct 2004 12:11:26 +0200 (CEST) Date: Fri, 1 Oct 2004 12:11:23 +0200 From: Andi Kleen To: "David S. Miller" Cc: netdev@oss.sgi.com, jheffner@psc.edu, herbert@gondor.apana.org.au Subject: Re: Current 2.6.x TSO state Message-Id: <20041001121123.19511403.ak@suse.de> In-Reply-To: <20040930213221.06a3f5b3.davem@davemloft.net> References: <20040930213221.06a3f5b3.davem@davemloft.net> X-Mailer: Sylpheed version 0.9.11 (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: 9763 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 Thu, 30 Sep 2004 21:32:21 -0700 "David S. Miller" wrote: > > 1) Andi sees performance anomaly to 2.6.5 kernels. > Hopefully fixed by diff3 above, merely awaiting > retesting by him. Didn't fix the problem unfortunately, it's even a bit slower with TSO than the previous kernel I tested. The stretch acks are still quite visible, see http://www.firstfloor.org/~andi/tso-stretch-ack1.gz for the full log. I will try to do the ACK instrumentation on the receiver you suggested later, unfortunately have some other urgent things to do first. Do you want me to play with the new sysctl too? tcptrace output for the last run as overview: complete conn: yes first packet: Fri Oct 1 12:02:39.725840 2004 last packet: Fri Oct 1 12:02:49.729142 2004 elapsed time: 0:00:10.003302 total packets: 315102 filename: /tmp/LOG e->f: f->e: total packets: 298495 total packets: 16607 ack pkts sent: 298494 ack pkts sent: 16607 pure acks sent: 2 pure acks sent: 16605 unique bytes sent: 432215424 unique bytes sent: 0 actual data pkts: 298492 actual data pkts: 0 actual data bytes: 432215424 actual data bytes: 0 rexmt data pkts: 0 rexmt data pkts: 0 rexmt data bytes: 0 rexmt data bytes: 0 outoforder pkts: 0 outoforder pkts: 0 pushed data pkts: 16715 pushed data pkts: 0 SYN/FIN pkts sent: 1/1 SYN/FIN pkts sent: 1/1 req 1323 ws/ts: Y/Y req 1323 ws/ts: Y/Y adv wind scale: 2 adv wind scale: 0 req sack: Y req sack: Y sacks sent: 0 sacks sent: 0 mss requested: 1460 bytes mss requested: 1460 bytes max segm size: 1448 bytes max segm size: 0 bytes min segm size: 456 bytes min segm size: 0 bytes avg segm size: 1447 bytes avg segm size: 0 bytes max win adv: 5840 bytes max win adv: 63712 bytes min win adv: 5840 bytes min win adv: 5792 bytes zero win adv: 0 times zero win adv: 0 times avg win adv: 5840 bytes avg win adv: 63673 bytes initial window: 4344 bytes initial window: 0 bytes initial window: 3 pkts initial window: 0 pkts ttl stream length: 432215424 bytes ttl stream length: 0 bytes missed data: 0 bytes missed data: 0 bytes truncated data: 423260664 bytes truncated data: 0 bytes truncated packets: 298492 pkts truncated packets: 0 pkts data xmit time: 10.003 secs data xmit time: 0.000 secs idletime max: 8.4 ms idletime max: 8.6 ms throughput: 43207275 Bps throughput: 0 Bps No SACKs etc. -Andi From ak@suse.de Fri Oct 1 03:23:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 03:23:38 -0700 (PDT) Received: from Cantor.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91ANRPx006257 for ; Fri, 1 Oct 2004 03:23:28 -0700 Received: from hermes.suse.de (hermes-ext.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 DB57ECB075C; Fri, 1 Oct 2004 12:23:09 +0200 (CEST) Date: Fri, 1 Oct 2004 12:23:06 +0200 From: Andi Kleen To: "David S. Miller" Cc: herbert@gondor.apana.org.au, jheffner@psc.edu, ak@suse.de, niv@us.ibm.com, andy.grover@gmail.com, anton@samba.org, netdev@oss.sgi.com Subject: Re: bad TSO performance in 2.6.9-rc2-BK Message-ID: <20041001102306.GA4898@wotan.suse.de> References: <20040929162923.796d142e.davem@davemloft.net> <20040929170310.46c58095.davem@davemloft.net> <20040930001007.GB10496@gondor.apana.org.au> <20040930173439.3e0d2799.davem@davemloft.net> <20040930181248.48185e41.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040930181248.48185e41.davem@davemloft.net> X-archive-position: 9764 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 > With such small receive buffers, netperf simply can't clear > the receive queue fast enough when a burst of TSO created > frames come in. I increased the receive buffers on the target and the difference between TSO and non TSO is much less now (only 5MB/s instead of 20MB/s) Your theory seems to make some sense. -Andi From ak@suse.de Fri Oct 1 03:38:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 03:38:51 -0700 (PDT) Received: from Cantor.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91Aceql006711 for ; Fri, 1 Oct 2004 03:38:41 -0700 Received: from hermes.suse.de (hermes-ext.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 43E15CAC565; Fri, 1 Oct 2004 12:35:55 +0200 (CEST) Date: Fri, 1 Oct 2004 12:35:54 +0200 From: Andi Kleen To: "David S. Miller" Cc: herbert@gondor.apana.org.au, jheffner@psc.edu, ak@suse.de, niv@us.ibm.com, andy.grover@gmail.com, anton@samba.org, netdev@oss.sgi.com Subject: Re: bad TSO performance in 2.6.9-rc2-BK Message-ID: <20041001103554.GB4898@wotan.suse.de> References: <20040929162923.796d142e.davem@davemloft.net> <20040929170310.46c58095.davem@davemloft.net> <20040930001007.GB10496@gondor.apana.org.au> <20040930173439.3e0d2799.davem@davemloft.net> <20040930181248.48185e41.davem@davemloft.net> <20040930204005.69115c0e.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040930204005.69115c0e.davem@davemloft.net> X-archive-position: 9765 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 > How do things look for you with this change Andi? > If things are still out of whack, play around with > different values of /proc/sys/net/ipv4/tcp_tso_win_divisor Still slower, like previously reported. But I tried tweaking the sysctl now. Result is that 2 is pretty good (only 3MB/s) slower and >20 is also pretty good (2MB/s slower). Everything inbetween is a lot slower, varying a bit. I wasn't able to find a setting that gave the same results as TSO off though, although the difference is not that dramatic anymore. -Andi From mlindner@syskonnect.de Fri Oct 1 04:51:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 04:51:58 -0700 (PDT) Received: from gatekeeper.syskonnect.de (gatekeeper.syskonnect.de [213.144.13.149]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91Bpomx011603 for ; Fri, 1 Oct 2004 04:51:51 -0700 Received: from syskonnect.de (skd.de [10.9.15.1]) by gatekeeper.syskonnect.de (8.12.10/8.12.10) with ESMTP id i91Bq1FR023834; Fri, 1 Oct 2004 13:52:01 +0200 (MET DST) Received: from syskonnect.de (localhost [127.0.0.1]) by syskonnect.de (8.12.9-patch8.359.2.8/8.12.9) with ESMTP id i91Bpa7A006792; Fri, 1 Oct 2004 13:51:37 +0200 (MET DST) Message-ID: <415D46BE.3080904@syskonnect.de> Date: Fri, 01 Oct 2004 13:59:58 +0200 From: Mirko Lindner User-Agent: Mozilla Thunderbird 0.5 (X11/20040208) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michal Schmidt CC: netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc3] sk98lin - register the driver with hotplug References: <415C8322.7030005@stud.feec.vutbr.cz> In-Reply-To: <415C8322.7030005@stud.feec.vutbr.cz> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 9766 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mlindner@syskonnect.de Precedence: bulk X-list: netdev Hi Michal, thanks for the patch. I'll include the changes into the driver. Cheers, Mirko Michal Schmidt wrote: > Hello, > > The attached patch allows the sk98lin module to be loaded automatically > by hotplug. > > Michal Schmidt > > > ------------------------------------------------------------------------ > > --- linux-2.6.9-rc3.orig/drivers/net/sk98lin/skge.c 2004-09-30 23:38:44.181252712 +0200 > +++ linux-2.6.9-rc3/drivers/net/sk98lin/skge.c 2004-09-30 21:02:04.000000000 +0200 > @@ -5169,6 +5169,8 @@ static struct pci_device_id skge_pci_tbl > { 0, } > }; > > +MODULE_DEVICE_TABLE(pci, skge_pci_tbl); > + > static struct pci_driver skge_driver = { > .name = "skge", > .id_table = skge_pci_tbl, From hadi@znyx.com Fri Oct 1 05:26:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 05:26:29 -0700 (PDT) Received: from lotus.znyx.com (znx208-2-156-007.znyx.com [208.2.156.7]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91CQN5I012596 for ; Fri, 1 Oct 2004 05:26:24 -0700 Received: from [127.0.0.1] ([208.2.156.2]) by lotus.znyx.com (Lotus Domino Release 5.0.11) with ESMTP id 2004100105282612:10211 ; Fri, 1 Oct 2004 05:28:26 -0700 Subject: e1000 patchlet From: Jamal Hadi Salim Reply-To: hadi@znyx.com To: Jeff Garzik , john.ronciak@intel.com, ganesh.venkatesan@intel.com Cc: netdev@oss.sgi.com Organization: ZNYX Networks Message-Id: <1096633537.1041.87.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 01 Oct 2004 08:25:37 -0400 X-MIMETrack: Itemize by SMTP Server on Lotus/Znyx(Release 5.0.11 |July 24, 2002) at 10/01/2004 05:28:26 AM, Serialize by Router on Lotus/Znyx(Release 5.0.11 |July 24, 2002) at 10/01/2004 05:29:00 AM, Serialize complete at 10/01/2004 05:29:00 AM Content-Type: multipart/mixed; boundary="=-5j0yS34gsvXTv80xkOnb" X-archive-position: 9767 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@znyx.com Precedence: bulk X-list: netdev --=-5j0yS34gsvXTv80xkOnb Content-Transfer-Encoding: 7bit Content-Type: text/plain attached cheers, jamal --=-5j0yS34gsvXTv80xkOnb Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=e1000p1 Content-Type: text/plain; name=e1000p1; charset=ISO-8859-1 --- a/drivers/net/e1000/e1000_main.c 2004/10/01 12:09:51 1.1 +++ b/drivers/net/e1000/e1000_main.c 2004/10/01 12:12:48 @@ -1773,7 +1773,6 @@ unsigned int mss = 0; int count = 0; unsigned int f; - nr_frags = skb_shinfo(skb)->nr_frags; len -= skb->data_len; if(unlikely(skb->len <= 0)) { --=-5j0yS34gsvXTv80xkOnb-- From herbert@gondor.apana.org.au Fri Oct 1 06:06:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 06:06:43 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91D6XGp014609 for ; Fri, 1 Oct 2004 06:06:35 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CDN71-00059X-00; Fri, 01 Oct 2004 23:06:15 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CDN6w-0001p1-00; Fri, 01 Oct 2004 23:06:10 +1000 Date: Fri, 1 Oct 2004 23:06:09 +1000 To: "David S. Miller" Cc: netdev@oss.sgi.com, ak@suse.de, jheffner@psc.edu Subject: Re: Current 2.6.x TSO state Message-ID: <20041001130609.GA6979@gondor.apana.org.au> References: <20040930213221.06a3f5b3.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040930213221.06a3f5b3.davem@davemloft.net> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 9768 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev On Thu, Sep 30, 2004 at 09:32:21PM -0700, David S. Miller wrote: > > diff4) Obey MSS in tso handling, shrink tcp_skb_cb This looks great. But can we please rename tcp_skb_psize to tcp_skb_mss? Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From vkondra@mail.ru Fri Oct 1 07:32:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 07:32:30 -0700 (PDT) Received: from mx1.mail.ru (mx1.mail.ru [194.67.23.121]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91EWMtE016447 for ; Fri, 1 Oct 2004 07:32:23 -0700 Received: from [82.80.3.97] (port=10097 helo=[192.168.10.2]) by mx1.mail.ru with esmtp id 1CDORx-000Bpr-00; Fri, 01 Oct 2004 18:32:01 +0400 From: Vladimir Kondratiev To: netdev@oss.sgi.com Subject: generic 802.11 stack Date: Fri, 1 Oct 2004 16:30:42 +0200 User-Agent: KMail/1.7 Cc: "Luis R. Rodriguez" , "David S. Miller" , acx100-devel@lists.sourceforge.net, prism54-devel@prism54.org References: <200408312111.02438.vda@port.imtp.ilyichevsk.odessa.ua> <200409290910.13201.vkondra@mail.ru> <20040929080011.GO30131@ruslug.rutgers.edu> In-Reply-To: <20040929080011.GO30131@ruslug.rutgers.edu> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart16626391.WQu7vuWcJy"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200410011630.59465.vkondra@mail.ru> X-Spam: Not detected X-archive-position: 9769 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: vkondra@mail.ru Precedence: bulk X-list: netdev --nextPart16626391.WQu7vuWcJy Content-Type: multipart/mixed; boundary="Boundary-01=_ToWXBwX6OFYnK9d" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_ToWXBwX6OFYnK9d Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Attached is 1-st iteration for generic 802.11 stack framework. Based on code from Dave. I make it compile for 2.6 and wrote simple skeleton for native 802.11 drive= r.=20 This skeleton is able to simulate Rx using ioctl; perl script to invoke ioc= tl=20 included. Argument for script is binary frame image. I removed all code for 802.11 header removal from p80211_type_trans for=20 several reasons: =2D I'd like to have all frames coming to stack with the same 802.11 header= ,=20 this will help for sniffer =2D header removal for data is a bit more complex: we should determine QoS= =20 header and strip 24 or 26 bytes. =2D I'd like to do fragmentation and reassembly on stack, not in driver. Nothing functional yet, but one can start debugging stack using Rx imitatio= n;=20 and driver do print packets it gets to Tx. P.S. question: I saw in all xxx_type_trans functions, skb->dev never assigned, it is done = by=20 driver instead. What is the reason? Why not assign skb->dev in=20 xxx_type_trans? --Boundary-01=_ToWXBwX6OFYnK9d Content-Type: application/x-tbz; name="p80211.tar.bz2" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="p80211.tar.bz2" QlpoOTFBWSZTWYXE8hIAUOr/9f38TIB//////////v////8gQAQAFAAAAQAQAghgM5599ut87u9b zrld9y6N7l4PvdlU+qe97vVVHdzjM969bdECXdPcere4hdc70a69TnvOknXe7ZnszoKPiAAAAN9f b3e+tcNmi6+++vvtZ9PV2uws3TNj47NOu7dKUGh9b4x6+VKt93EHt7lV7heN673e9z3tbPnmJV9j VPsDT66HZoEoRGgIwE0Jo1MJkwpmI0TNE2mjSaaNTEAAeppo0ABtQYiAEJqYqeyCnponpTaR5T1N 6p5Q9CeoPUPUDQMgMgANAABIRESY0VT8CNKm9U3qemmqflT9TZTTSNNtU9Rp6gN6p5MkAAxAGgAY Sn6pSEmVP0piB6m0mj1NAeo9QAepoaA0aAAAAAAAAESSCmjJq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XMkCCAaeU+HvoDgkIQeQLS5Z p4iXcK4Gtt6+ArWITDhxL2yB1FpEEP70oAyIZPOY9skkkIWtvOEtD1Y2SNqFB5eHVv8By8Z5iIvZ TNTmWW6LCSYJUPrFB9deZHZ2mzoiwTGEie6WBbFC7EELBgA47kdwIIeII8xD6P0SRXkAj3CQDupO NESf5tImGdBMkg9EA7UgmWskA6GvDBgvwxc5SO1TuYMMmx59XkyJwArjkHXAQfvzd0dmagdjFhbe 2PsBvfNmoWEAhB7B1jdV9o3comK8BQ93pgEWoJnEKgkhUajIglMSAqSAyDIlHg6YGKInKxpL51pe 9kzB54n1QVun8oOwPj+Hyrf5EDvgSEkg2Q+za3My/BubnbAzger8xaxzJv+NCIGAxG0kRbPKgfP2 a+D6xg19WGCTpjhI4JKFejeY7ZfaSBbCtLzv8j0PAG/Jue5/XG/vChiKIXQBxSDCLA3U2NpbIujt hzLptWM3TyWGdVpg8JAnVBIUOEYR/CmSYBTtwDAh3etRcUxL8p2eYU7XYUOWASJBAIQSBIRjAIPi IhUHCAf6GDjBue0JmlKrICY2AnMv3r7xvlMA2qGhbIh/8XckU4UJCFxPISA= --Boundary-01=_ToWXBwX6OFYnK9d-- --nextPart16626391.WQu7vuWcJy Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQBBXWojqxdj7mhC6o0RApj6AKCFkyLZ/ge8sdgGqoGaeowKYhlVKgCghugH 21AIH4NzEcj9q1RRPAdU4Lw= =vK7r -----END PGP SIGNATURE----- --nextPart16626391.WQu7vuWcJy-- From cfriesen@nortelnetworks.com Fri Oct 1 09:36:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 09:36:19 -0700 (PDT) Received: from zcars04e.nortelnetworks.com (zcars04e.nortelnetworks.com [47.129.242.56]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91GaDkk024975 for ; Fri, 1 Oct 2004 09:36:14 -0700 Received: from zcard303.ca.nortel.com (zcard303.ca.nortel.com [47.129.242.59]) by zcars04e.nortelnetworks.com (Switch-2.2.6/Switch-2.2.0) with ESMTP id i91GZsR20546; Fri, 1 Oct 2004 12:35:54 -0400 (EDT) Received: from nortelnetworks.com (acart21w.ca.nortel.com [47.130.25.15]) by zcard303.ca.nortel.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id SPNPKMFM; Fri, 1 Oct 2004 12:35:53 -0400 Message-ID: <415D8768.8080808@nortelnetworks.com> Date: Fri, 01 Oct 2004 10:35:52 -0600 X-Sybari-Space: 00000000 00000000 00000000 00000000 From: Chris Friesen User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com, linuxppc-dev@ozlabs.org Subject: kernel crash with G5 Xserve and sungem driver Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 9770 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: cfriesen@nortelnetworks.com Precedence: bulk X-list: netdev I have patched 2.6.9-rc2 to run in 32-bit mode on the G5 Xserve. When I compile a kernel with the tigon driver and the sungem driver both built-in, the kernel crashes. Removing the sungem driver fixes the problem. Is there a known incompatibility between the sungem driver and the Xserve? I don't have crash output at the moment, but I can probably get it eventually. Chris From greg@kroah.com Fri Oct 1 09:55:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 09:55:57 -0700 (PDT) Received: from perch.kroah.org (mail.kroah.org [69.55.234.183]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91GtpSv025464 for ; Fri, 1 Oct 2004 09:55:52 -0700 Received: from DYN319081BLD.beaverton.ibm.com (bi01p1.co.us.ibm.com [32.97.110.142]) (authenticated) by perch.kroah.org (8.11.6/8.11.6) with ESMTP id i91GtZG03896; Fri, 1 Oct 2004 09:55:35 -0700 Received: from greg by echidna.kroah.org with local (masqmail 0.2.19) id 1CDQgl-33X-00; Fri, 01 Oct 2004 09:55:23 -0700 Date: Fri, 1 Oct 2004 09:55:23 -0700 From: Greg KH To: Margit Schubert-While Cc: Jeff Garzik , netdev@oss.sgi.com, kernel-janitors@lists.osdl.org, mcgrof@studorgs.rutgers.edu, prism54-devel@prism54.org, hvr@gnu.org Subject: Re: [Kernel-janitors] Re: [PATCH 2.6.9-rc2 17/38] net/islpci_dev: replace schedule_timeout() with msleep() Message-ID: <20041001165523.GC11646@kroah.com> References: <5.1.0.14.2.20040924074745.00b1cd40@pop.t-online.de> <20040923221303.GB13244@us.ibm.com> <20040923221303.GB13244@us.ibm.com> <5.1.0.14.2.20040924074745.00b1cd40@pop.t-online.de> <5.1.0.14.2.20041001084419.02570b18@pop.t-online.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5.1.0.14.2.20041001084419.02570b18@pop.t-online.de> User-Agent: Mutt/1.5.6i X-archive-position: 9771 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greg@kroah.com Precedence: bulk X-list: netdev On Fri, Oct 01, 2004 at 09:04:27AM +0200, Margit Schubert-While wrote: > At 00:15 01.10.2004 -0400, Jeff scribeth: > >I would rather see an msleep implementation in 2.4.x... > > Hear, hear. > And can we PLEASE have a > "#define HAVE_MSLEEP" in delay.h ?!!! > (2.4. AND 2.6) No, this is not how the kernel source tree works, sorry. greg k-h From laforge@gnumonks.org Fri Oct 1 12:32:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 12:32:14 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91JW807031757 for ; Fri, 1 Oct 2004 12:32:09 -0700 Received: from dsl-213-023-154-116.arcor-ip.net ([213.23.154.116] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1CDT8F-0004zt-66; Fri, 01 Oct 2004 21:31:55 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1CDT8D-0007W7-CX; Fri, 01 Oct 2004 21:31:53 +0200 Date: Fri, 1 Oct 2004 21:31:53 +0200 From: Harald Welte To: Chris Friesen Cc: netdev@oss.sgi.com, linuxppc-dev@ozlabs.org Subject: Re: kernel crash with G5 Xserve and sungem driver Message-ID: <20041001193153.GN27499@sunbeam.de.gnumonks.org> References: <415D8768.8080808@nortelnetworks.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1y1tiN5hVw5cPBDe" Content-Disposition: inline In-Reply-To: <415D8768.8080808@nortelnetworks.com> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 9772 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@gnumonks.org Precedence: bulk X-list: netdev --1y1tiN5hVw5cPBDe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 01, 2004 at 10:35:52AM -0600, Chris Friesen wrote: >=20 > I have patched 2.6.9-rc2 to run in 32-bit mode on the G5 Xserve. >=20 > When I compile a kernel with the tigon driver and the sungem driver both= =20 > built-in, the kernel crashes. Removing the sungem driver fixes the probl= em. Yes, I had that too. The Problem is that the XServe G5 actually has two sungem MAC's in the chipset but doesn't use them (and apparently their interrupt lines are not connected either). Apple just doesn't put them in their OF tree, but on the PCI they are visible. The ethernet chips actually used and connected to the ethernet sockets on the back side are th3. Just don't compile (or load) the sungem driver on those boxes. > Is there a known incompatibility between the sungem driver and the Xserve? yes. --=20 - Harald Welte http://www.gnumonks.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D Programming is like sex: One mistake and you have to support it your lifeti= me --1y1tiN5hVw5cPBDe Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBXbCpXaXGVTD0i/8RApp7AJwKFtyJL91PowHWs4uTO6DnaNrthwCgtU9t sJl0u37ydJljoTsEsvOrDlU= =+Ev2 -----END PGP SIGNATURE----- --1y1tiN5hVw5cPBDe-- From cfriesen@nortelnetworks.com Fri Oct 1 12:43:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 12:43:17 -0700 (PDT) Received: from zcars04e.nortelnetworks.com (zcars04e.nortelnetworks.com [47.129.242.56]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91JhCMD032196 for ; Fri, 1 Oct 2004 12:43:12 -0700 Received: from zcard303.ca.nortel.com (zcard303.ca.nortel.com [47.129.242.59]) by zcars04e.nortelnetworks.com (Switch-2.2.6/Switch-2.2.0) with ESMTP id i91Jgk410733; Fri, 1 Oct 2004 15:42:46 -0400 (EDT) Received: from nortelnetworks.com (acart21w.ca.nortel.com [47.130.25.15]) by zcard303.ca.nortel.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id SPNPKN0J; Fri, 1 Oct 2004 15:42:46 -0400 Message-ID: <415DB334.4010809@nortelnetworks.com> Date: Fri, 01 Oct 2004 13:42:44 -0600 X-Sybari-Space: 00000000 00000000 00000000 00000000 From: Chris Friesen User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Harald Welte CC: netdev@oss.sgi.com, linuxppc-dev@ozlabs.org Subject: Re: kernel crash with G5 Xserve and sungem driver References: <415D8768.8080808@nortelnetworks.com> <20041001193153.GN27499@sunbeam.de.gnumonks.org> In-Reply-To: <20041001193153.GN27499@sunbeam.de.gnumonks.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 9773 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: cfriesen@nortelnetworks.com Precedence: bulk X-list: netdev Harald Welte wrote: > Just don't compile (or load) the sungem driver on those boxes. Hmm. That's a pain. We've got G5 desktops too, and it would be nice to be able to run one kernel for both. It'd be better (IMHO) to fix the driver so it doesn't crash. Chris From laforge@gnumonks.org Fri Oct 1 12:46:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 12:46:49 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91Jkhud032520 for ; Fri, 1 Oct 2004 12:46:44 -0700 Received: from dsl-213-023-154-116.arcor-ip.net ([213.23.154.116] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1CDTMN-0005OS-0d; Fri, 01 Oct 2004 21:46:31 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1CDTMM-0007Wk-32; Fri, 01 Oct 2004 21:46:30 +0200 Date: Fri, 1 Oct 2004 21:46:30 +0200 From: Harald Welte To: Chris Friesen Cc: netdev@oss.sgi.com, linuxppc-dev@ozlabs.org Subject: Re: kernel crash with G5 Xserve and sungem driver Message-ID: <20041001194630.GO27499@sunbeam.de.gnumonks.org> References: <415D8768.8080808@nortelnetworks.com> <20041001193153.GN27499@sunbeam.de.gnumonks.org> <415DB334.4010809@nortelnetworks.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Bzq2cJcN05fcPrs+" Content-Disposition: inline In-Reply-To: <415DB334.4010809@nortelnetworks.com> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 9774 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@gnumonks.org Precedence: bulk X-list: netdev --Bzq2cJcN05fcPrs+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 01, 2004 at 01:42:44PM -0600, Chris Friesen wrote: > Harald Welte wrote: >=20 > >Just don't compile (or load) the sungem driver on those boxes. >=20 > Hmm. That's a pain. We've got G5 desktops too, and it would be nice to = be=20 > able to run one kernel for both. It'd be better (IMHO) to fix the driver= =20 > so it doesn't crash. I recommend talking to Bejamin Herrenschmidt, IIRC he already had something in mind in order to fix the issue. I mean, you can always hardcode some exemption into the driver, that's two easy lines ;) > Chris --=20 - Harald Welte http://www.gnumonks.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D Programming is like sex: One mistake and you have to support it your lifeti= me --Bzq2cJcN05fcPrs+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBXbQWXaXGVTD0i/8RAolKAJ92G/5zs4wo4XSF2WAsqAaD1+GIkwCeICAs cHBju+40g4MUwbRTfk6R/Zs= =qWQ2 -----END PGP SIGNATURE----- --Bzq2cJcN05fcPrs+-- From davem@davemloft.net Fri Oct 1 12:49:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 12:49:18 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91JnCw0000412 for ; Fri, 1 Oct 2004 12:49:12 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CDTNN-0006NR-00; Fri, 01 Oct 2004 12:47:33 -0700 Date: Fri, 1 Oct 2004 12:47:33 -0700 From: "David S. Miller" To: Andi Kleen Cc: netdev@oss.sgi.com, jheffner@psc.edu, herbert@gondor.apana.org.au Subject: Re: Current 2.6.x TSO state Message-Id: <20041001124733.1ac4266a.davem@davemloft.net> In-Reply-To: <20041001121123.19511403.ak@suse.de> References: <20040930213221.06a3f5b3.davem@davemloft.net> <20041001121123.19511403.ak@suse.de> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9775 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev On Fri, 1 Oct 2004 12:11:23 +0200 Andi Kleen wrote: > Do you want me to play with the new sysctl too? Yes. > max win adv: 5840 bytes max win adv: 63712 bytes > min win adv: 5840 bytes min win adv: 5792 bytes That stinks that the receiver is only using a 64K window, that's way too small for gigabit. From ak@suse.de Fri Oct 1 12:52:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 12:52:10 -0700 (PDT) Received: from Cantor.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91Jq4U2000753 for ; Fri, 1 Oct 2004 12:52:05 -0700 Received: from hermes.suse.de (hermes-ext.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 2AB5BCB5E52; Fri, 1 Oct 2004 21:51:47 +0200 (CEST) Date: Fri, 1 Oct 2004 21:51:47 +0200 From: Andi Kleen To: "David S. Miller" Cc: Andi Kleen , netdev@oss.sgi.com, jheffner@psc.edu, herbert@gondor.apana.org.au Subject: Re: Current 2.6.x TSO state Message-ID: <20041001195146.GA23046@wotan.suse.de> References: <20040930213221.06a3f5b3.davem@davemloft.net> <20041001121123.19511403.ak@suse.de> <20041001124733.1ac4266a.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041001124733.1ac4266a.davem@davemloft.net> X-archive-position: 9776 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 Fri, Oct 01, 2004 at 12:47:33PM -0700, David S. Miller wrote: > On Fri, 1 Oct 2004 12:11:23 +0200 > Andi Kleen wrote: > > > Do you want me to play with the new sysctl too? > > Yes. Already did, see my other mail (I should not read incoming mail in the wrong order @) > > > max win adv: 5840 bytes max win adv: 63712 bytes > > min win adv: 5840 bytes min win adv: 5792 bytes > > That stinks that the receiver is only using a 64K window, > that's way too small for gigabit. Just using the default, no tuning. I have some patches in the pipeline to do automatic window tuning based on link speed based on dev->features. But they were actually more intended for 10Gbit/s (where all the defaults are completely inadequate) And it needs a bit more work. -Andi From davem@davemloft.net Fri Oct 1 12:58:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 12:58:27 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91JwMQK001187 for ; Fri, 1 Oct 2004 12:58:22 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CDTWF-0006P0-00; Fri, 01 Oct 2004 12:56:43 -0700 Date: Fri, 1 Oct 2004 12:56:43 -0700 From: "David S. Miller" To: Andi Kleen Cc: ak@suse.de, netdev@oss.sgi.com, jheffner@psc.edu, herbert@gondor.apana.org.au Subject: Re: Current 2.6.x TSO state Message-Id: <20041001125643.30c6830f.davem@davemloft.net> In-Reply-To: <20041001195146.GA23046@wotan.suse.de> References: <20040930213221.06a3f5b3.davem@davemloft.net> <20041001121123.19511403.ak@suse.de> <20041001124733.1ac4266a.davem@davemloft.net> <20041001195146.GA23046@wotan.suse.de> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9777 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev On Fri, 1 Oct 2004 21:51:47 +0200 Andi Kleen wrote: > > > max win adv: 5840 bytes max win adv: 63712 bytes > > > min win adv: 5840 bytes min win adv: 5792 bytes > > > > That stinks that the receiver is only using a 64K window, > > that's way too small for gigabit. > > Just using the default, no tuning. > > I have some patches in the pipeline to do automatic window tuning > based on link speed based on dev->features. But they were actually more > intended for 10Gbit/s (where all the defaults are completely inadequate) > And it needs a bit more work. As mentioned, the TCP receive buffer auto-tuning takes care of all of this in 2.6.6 and later. It's just 2.6.5 doesn't have John Heffner's auto-tuning code which is why your test case is so stuck in the mud. Also, the stretch ACK's are quite normal. If the receiver can't advertize a larger window, we won't spit out an ACK until the ack timeout. From ak@suse.de Fri Oct 1 13:04:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 13:05:00 -0700 (PDT) Received: from Cantor.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91K4qOO001574 for ; Fri, 1 Oct 2004 13:04:55 -0700 Received: from hermes.suse.de (hermes-ext.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 D15E1CB3481; Fri, 1 Oct 2004 22:01:02 +0200 (CEST) Date: Fri, 1 Oct 2004 22:01:02 +0200 From: Andi Kleen To: "David S. Miller" Cc: Andi Kleen , netdev@oss.sgi.com, jheffner@psc.edu, herbert@gondor.apana.org.au Subject: Re: Current 2.6.x TSO state Message-ID: <20041001200102.GB23046@wotan.suse.de> References: <20040930213221.06a3f5b3.davem@davemloft.net> <20041001121123.19511403.ak@suse.de> <20041001124733.1ac4266a.davem@davemloft.net> <20041001195146.GA23046@wotan.suse.de> <20041001125643.30c6830f.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041001125643.30c6830f.davem@davemloft.net> X-archive-position: 9778 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 > As mentioned, the TCP receive buffer auto-tuning takes care > of all of this in 2.6.6 and later. It's just 2.6.5 doesn't > have John Heffner's auto-tuning code which is why your test > case is so stuck in the mud. > > Also, the stretch ACK's are quite normal. If the receiver can't > advertize a larger window, we won't spit out an ACK until > the ack timeout. Ok, but why is the TSO case still slower? -Andi From davem@davemloft.net Fri Oct 1 13:17:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 13:17:20 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91KHEYk002064 for ; Fri, 1 Oct 2004 13:17:14 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CDToV-0006Tx-00; Fri, 01 Oct 2004 13:15:35 -0700 Date: Fri, 1 Oct 2004 13:15:34 -0700 From: "David S. Miller" To: Andi Kleen Cc: ak@suse.de, netdev@oss.sgi.com, jheffner@psc.edu, herbert@gondor.apana.org.au Subject: Re: Current 2.6.x TSO state Message-Id: <20041001131534.7bcb87ee.davem@davemloft.net> In-Reply-To: <20041001200102.GB23046@wotan.suse.de> References: <20040930213221.06a3f5b3.davem@davemloft.net> <20041001121123.19511403.ak@suse.de> <20041001124733.1ac4266a.davem@davemloft.net> <20041001195146.GA23046@wotan.suse.de> <20041001125643.30c6830f.davem@davemloft.net> <20041001200102.GB23046@wotan.suse.de> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9779 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev On Fri, 1 Oct 2004 22:01:02 +0200 Andi Kleen wrote: > > As mentioned, the TCP receive buffer auto-tuning takes care > > of all of this in 2.6.6 and later. It's just 2.6.5 doesn't > > have John Heffner's auto-tuning code which is why your test > > case is so stuck in the mud. > > > > Also, the stretch ACK's are quite normal. If the receiver can't > > advertize a larger window, we won't spit out an ACK until > > the ack timeout. > > Ok, but why is the TSO case still slower? It isn't for me. With the auto-tuning code present at the receiver, at least in my case, the TSO case runs more quickly since my sender is PCI bandwidth limited since the tg3 sits on a 32mhz/33bit PCI bus. From jheffner@psc.edu Fri Oct 1 13:34:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 13:34:06 -0700 (PDT) Received: from mailer1.psc.edu (mailer1.psc.edu [128.182.58.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91KY1Ne002632 for ; Fri, 1 Oct 2004 13:34:01 -0700 Received: from dexter.psc.edu (dexter.psc.edu [128.182.61.232]) by mailer1.psc.edu (8.12.10/8.12.5) with ESMTP id i91KXY30002310 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 1 Oct 2004 16:33:34 -0400 (EDT) Received: from dexter.psc.edu (dexter.psc.edu [128.182.61.232]) by dexter.psc.edu (8.12.10/8.12.5) with ESMTP id i91KXXCW025446; Fri, 1 Oct 2004 16:33:33 -0400 (EDT) Date: Fri, 1 Oct 2004 16:33:33 -0400 (EDT) From: John Heffner To: Andi Kleen cc: "David S. Miller" , , Subject: Re: Current 2.6.x TSO state In-Reply-To: <20041001200102.GB23046@wotan.suse.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: clamd / ClamAV version 0.75, clamav-milter version 0.75 on mailer1.psc.edu X-Virus-Status: Clean X-archive-position: 9780 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jheffner@psc.edu Precedence: bulk X-list: netdev On Fri, 1 Oct 2004, Andi Kleen wrote: > > As mentioned, the TCP receive buffer auto-tuning takes care > > of all of this in 2.6.6 and later. It's just 2.6.5 doesn't > > have John Heffner's auto-tuning code which is why your test > > case is so stuck in the mud. > > > > Also, the stretch ACK's are quite normal. If the receiver can't > > advertize a larger window, we won't spit out an ACK until > > the ack timeout. > > Ok, but why is the TSO case still slower? Because with TSO enabled, you get bigger back-to-back bursts during which the receiving app can't run. -John From davem@davemloft.net Fri Oct 1 13:58:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 13:58:35 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91KwQOR003448 for ; Fri, 1 Oct 2004 13:58:27 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CDUSD-0006ZB-00; Fri, 01 Oct 2004 13:56:37 -0700 Date: Fri, 1 Oct 2004 13:56:36 -0700 From: "David S. Miller" To: Duncan Sands Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, laforge@gnumonks.org Subject: Re: Oops at __neigh_for_each_release (2.6.9-rc3) Message-Id: <20041001135636.0c071602.davem@davemloft.net> In-Reply-To: <200410012217.35264.baldrick@free.fr> References: <200410012217.35264.baldrick@free.fr> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9781 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev On Fri, 1 Oct 2004 22:17:35 +0200 Duncan Sands wrote: > EIP is at __neigh_for_each_release+0x32/0xb0 Give this patch a try. And please report networking bugs to netdev@oss.sgi.com in the future, thanks. ===== net/atm/clip.c 1.42 vs edited ===== --- 1.42/net/atm/clip.c 2004-09-23 18:02:32 -07:00 +++ edited/net/atm/clip.c 2004-10-01 13:35:40 -07:00 @@ -984,19 +984,7 @@ static int __init atm_clip_init(void) { - /* we should use neigh_table_init() */ - clip_tbl.lock = RW_LOCK_UNLOCKED; - clip_tbl.kmem_cachep = kmem_cache_create(clip_tbl.id, - clip_tbl.entry_size, 0, SLAB_HWCACHE_ALIGN, NULL, NULL); - - if (!clip_tbl.kmem_cachep) - return -ENOMEM; - - /* so neigh_ifdown() doesn't complain */ - clip_tbl.proxy_timer.data = 0; - clip_tbl.proxy_timer.function = NULL; - init_timer(&clip_tbl.proxy_timer); - skb_queue_head_init(&clip_tbl.proxy_queue); + neigh_table_init(&clip_tbl); clip_tbl_hook = &clip_tbl; register_atm_ioctl(&clip_ioctl_ops); @@ -1022,7 +1010,6 @@ deregister_atm_ioctl(&clip_ioctl_ops); - neigh_ifdown(&clip_tbl, NULL); dev = clip_devs; while (dev) { next = PRIV(dev)->next; @@ -1030,9 +1017,11 @@ free_netdev(dev); dev = next; } - if (start_timer == 0) del_timer(&idle_timer); - kmem_cache_destroy(clip_tbl.kmem_cachep); + neigh_table_clear(&clip_tbl); + + if (start_timer == 0) + del_timer(&idle_timer); clip_tbl_hook = NULL; } From davem@davemloft.net Fri Oct 1 15:15:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 15:15:11 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91MF5MA004832 for ; Fri, 1 Oct 2004 15:15:05 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CDVeX-00083S-00; Fri, 01 Oct 2004 15:13:25 -0700 Date: Fri, 1 Oct 2004 15:13:25 -0700 From: "David S. Miller" To: Fernando Gont Cc: netdev@oss.sgi.com Subject: Re: TCP's reaction to soft errors Message-Id: <20041001151325.1bf112a5.davem@davemloft.net> In-Reply-To: <4.3.2.7.2.20040915112853.00cf9980@mail.daleclick.com> References: <4.3.2.7.2.20040915112853.00cf9980@mail.daleclick.com> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9782 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev On Wed, 15 Sep 2004 11:44:14 -0300 Fernando Gont wrote: > The draft proposes to change TCP's reaction to soft errors so that > connections that are in the SYN-SENT or SYN-RECEIVED states are aborted > upon receipt of an ICMP error message that indicates a soft error. I have verified that Linux behaves in a way compliant to this proposal. No changes are necessary. From davem@davemloft.net Fri Oct 1 15:19:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 15:19:20 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91MJEk6005187 for ; Fri, 1 Oct 2004 15:19:14 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CDViX-00084B-00; Fri, 01 Oct 2004 15:17:33 -0700 Date: Fri, 1 Oct 2004 15:17:32 -0700 From: "David S. Miller" To: yoshfuji@linux-ipv6.org Cc: netdev@oss.sgi.com Subject: Re: [PATCH] [NET] NEIGHBOUR: hold refcnt of net_device from proxy neighbor entries. Message-Id: <20041001151732.60899c38.davem@davemloft.net> In-Reply-To: <20040930.170729.51800585.yoshfuji@linux-ipv6.org> References: <20040930.170729.51800585.yoshfuji@linux-ipv6.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i91MJEk6005187 X-archive-position: 9783 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev On Thu, 30 Sep 2004 17:07:29 +0900 (JST) YOSHIFUJI Hideaki / $B5HF#1QL@(B wrote: > [NET] NEIGHBOUR: hold refcnt of net_device from proxy neighbor entries. > > We did not hold refcnt of net_device from proxy neighbor entries > while we did from neighbor entries. > > Signed-off-by: Hideaki YOSHIFUJI Applied, thanks. From davem@davemloft.net Fri Oct 1 15:21:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 15:21:11 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91ML4Hq005516 for ; Fri, 1 Oct 2004 15:21:04 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CDVkJ-00084W-00; Fri, 01 Oct 2004 15:19:23 -0700 Date: Fri, 1 Oct 2004 15:19:23 -0700 From: "David S. Miller" To: Yasuyuki Kozakai Cc: netdev@oss.sgi.com, usagi-core@linux-ipv6.org Subject: Re: [PATCH]: fixed typo of reassembly.c Message-Id: <20041001151923.261b42b3.davem@davemloft.net> In-Reply-To: <200409301023.i8UANRGp002783@toshiba.co.jp> References: <200409301023.i8UANRGp002783@toshiba.co.jp> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9784 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev On Thu, 30 Sep 2004 19:23:26 +0900 (JST) Yasuyuki Kozakai wrote: > This patch fixes byte ordering. Please apply this. It is textual fix only, do you realize this? Both ntohs() and htons() perform the same transformation on a 16-bit data item. It really does not matter which one you actually use, in practice. I will apply your patch anyways, I just wanted to be clear that this does not actually fix any bug. :-) THanks. From davem@davemloft.net Fri Oct 1 15:54:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 15:54:58 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91MsprD006267 for ; Fri, 1 Oct 2004 15:54:53 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CDWH1-0008Dd-00; Fri, 01 Oct 2004 15:53:11 -0700 Date: Fri, 1 Oct 2004 15:53:10 -0700 From: "David S. Miller" To: Vladimir Kondratiev Cc: netdev@oss.sgi.com, mcgrof@studorgs.rutgers.edu, acx100-devel@lists.sourceforge.net, prism54-devel@prism54.org Subject: Re: generic 802.11 stack Message-Id: <20041001155310.515ee09e.davem@davemloft.net> In-Reply-To: <200410011630.59465.vkondra@mail.ru> References: <200408312111.02438.vda@port.imtp.ilyichevsk.odessa.ua> <200409290910.13201.vkondra@mail.ru> <20040929080011.GO30131@ruslug.rutgers.edu> <200410011630.59465.vkondra@mail.ru> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9785 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Why this change? -extern void hh_data_is_too_small(void); +static void hh_data_is_too_small(void) +{ + printk(KERN_ERR "hh_data_is_too_small\n"); +} We don't define the function because it is meant to cause a compile time error if hh->hh_data is too small to hold the full p80211_data_header structure. Please undo this change. And therefore undo this change too: - if (sizeof(hh->hh_data) < sizeof(*p)) + if (sizeof(hh->hh_data) < sizeof(*p)) { hh_data_is_too_small(); + return -1; + } Next, what's this? - dev->hard_header = p80211_header; + dev->hard_header = p80211_header; dev->rebuild_header = p80211_rebuild_header; Your merely changing the tab character after dev->hard_header into spaces. Please don't do this. This makes a lot of white space noise when making diffs against the original davem-p80211 code thus making it harder to review the changes you actually made. Next: + dev->mtu = 2304; + dev->type = ARPHRD_IEEE80211; Is this really the correct default MTU for wireless devices? @@ -342,7 +343,7 @@ int p80211_recv_cfackpoll(struct sk_buff static struct packet_type p80211_packet_type = { .type = __constant_htons(ETH_P_802_11), .func = p80211_rcv, - .data = (void *) 1, /* understands shared SKBs */ + .af_packet_priv = (void *) 1, /* understands shared SKBs */ }; You can just remove this line entirely for 2.6.x kernels. Otherwise looks fine :-) From shemminger@osdl.org Fri Oct 1 15:57:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 15:57:55 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91MvnBF006615 for ; Fri, 1 Oct 2004 15:57:49 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i91MvVWL008069 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 1 Oct 2004 15:57:31 -0700 Date: Fri, 1 Oct 2004 15:55:54 -0700 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: [PATCH] (1/3) tcp - choose congestion algorithm at initialization Message-Id: <20041001155554.51763dc0@zqx3.pdx.osdl.net> In-Reply-To: <20040927121610.68f942a4.davem@redhat.com> References: <20040927111834.48c7baab@zqx3.pdx.osdl.net> <20040927121610.68f942a4.davem@redhat.com> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.86 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 9786 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 Here is the 2.4 version of the change to store congest algorithm per socket. Signed-off-by: Stephen Hemminger diff -Nru a/include/net/sock.h b/include/net/sock.h --- a/include/net/sock.h 2004-10-01 15:51:48 -07:00 +++ b/include/net/sock.h 2004-10-01 15:51:48 -07:00 @@ -256,6 +256,13 @@ __u32 end_seq; }; +enum tcp_congestion_algo { + TCP_RENO=0, + TCP_VEGAS, + TCP_WESTWOOD, + TCP_BIC, +}; + struct tcp_opt { int tcp_header_len; /* Bytes of tcp header to send */ @@ -428,7 +435,8 @@ unsigned int keepalive_intvl; /* time interval between keep alive probes */ int linger2; - int frto_counter; /* Number of new acks after RTO */ + __u8 adv_cong; /* Using Vegas, Westwood, or BIC */ + __u8 frto_counter; /* Number of new acks after RTO */ __u32 frto_highmark; /* snd_nxt when RTO occurred */ unsigned long last_synq_overflow; @@ -465,7 +473,6 @@ __u32 beg_snd_nxt; /* right edge during last RTT */ __u32 beg_snd_una; /* left edge during last RTT */ __u32 beg_snd_cwnd; /* saves the size of the cwnd */ - __u8 do_vegas; /* do vegas for this connection */ __u8 doing_vegas_now;/* if true, do vegas for this RTT */ __u16 cntRTT; /* # of RTTs measured within last RTT */ __u32 minRTT; /* min of RTTs measured within last RTT (in usec) */ diff -Nru a/include/net/tcp.h b/include/net/tcp.h --- a/include/net/tcp.h 2004-10-01 15:51:48 -07:00 +++ b/include/net/tcp.h 2004-10-01 15:51:48 -07:00 @@ -1110,6 +1110,13 @@ return tp->packets_out - tp->left_out + tp->retrans_out; } +/* + * Which congestion algorithim is in use on the connection. + */ +#define tcp_is_vegas(__tp) ((__tp)->adv_cong == TCP_VEGAS) +#define tcp_is_westwood(__tp) ((__tp)->adv_cong == TCP_WESTWOOD) +#define tcp_is_bic(__tp) ((__tp)->adv_cong == TCP_BIC) + /* Recalculate snd_ssthresh, we want to set it to: * * Reno: @@ -1122,7 +1129,7 @@ */ static inline __u32 tcp_recalc_ssthresh(struct tcp_opt *tp) { - if (sysctl_tcp_bic) { + if (tcp_is_bic(tp)) { if (sysctl_tcp_bic_fast_convergence && tp->snd_cwnd < tp->bictcp.last_max_cwnd) tp->bictcp.last_max_cwnd @@ -1141,11 +1148,6 @@ /* Stop taking Vegas samples for now. */ #define tcp_vegas_disable(__tp) ((__tp)->vegas.doing_vegas_now = 0) - -/* Is this TCP connection using Vegas (regardless of whether it is taking - * Vegas measurements at the current time)? - */ -#define tcp_is_vegas(__tp) ((__tp)->vegas.do_vegas) static inline void tcp_vegas_enable(struct tcp_opt *tp) { @@ -1179,7 +1181,7 @@ /* Should we be taking Vegas samples right now? */ #define tcp_vegas_enabled(__tp) ((__tp)->vegas.doing_vegas_now) -extern void tcp_vegas_init(struct tcp_opt *tp); +extern void tcp_ca_init(struct tcp_opt *tp); static inline void tcp_set_ca_state(struct tcp_opt *tp, u8 ca_state) { @@ -1978,7 +1980,7 @@ static inline void tcp_westwood_update_rtt(struct tcp_opt *tp, __u32 rtt_seq) { - if (sysctl_tcp_westwood) + if (tcp_is_westwood(tp)) tp->westwood.rtt = rtt_seq; } @@ -2015,13 +2017,13 @@ static inline void tcp_westwood_fast_bw(struct sock *sk, struct sk_buff *skb) { - if (sysctl_tcp_westwood) + if (tcp_is_westwood(&(sk->tp_pinfo.af_tcp))) __tcp_westwood_fast_bw(sk, skb); } static inline void tcp_westwood_slow_bw(struct sock *sk, struct sk_buff *skb) { - if (sysctl_tcp_westwood) + if (tcp_is_westwood(&(sk->tp_pinfo.af_tcp))) __tcp_westwood_slow_bw(sk, skb); } @@ -2035,7 +2037,7 @@ { __u32 ret = 0; - if (sysctl_tcp_westwood) + if (tcp_is_westwood(tp)) ret = (__u32) (max(__tcp_westwood_bw_rttmin(tp), 2U)); return ret; @@ -2046,7 +2048,7 @@ int ret = 0; __u32 ssthresh; - if (sysctl_tcp_westwood) { + if (tcp_is_westwood(tp)) { if (!(ssthresh = tcp_westwood_bw_rttmin(tp))) return ret; @@ -2062,7 +2064,7 @@ int ret = 0; __u32 cwnd; - if (sysctl_tcp_westwood) { + if (tcp_is_westwood(tp)) { if (!(cwnd = tcp_westwood_bw_rttmin(tp))) return ret; @@ -2077,7 +2079,7 @@ { int ret = 0; - if (sysctl_tcp_westwood) { + if (tcp_is_westwood(tp)) { if (tcp_westwood_cwnd(tp)) { tp->snd_ssthresh = tp->snd_cwnd; ret = 1; diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c 2004-10-01 15:51:48 -07:00 +++ b/net/ipv4/tcp_input.c 2004-10-01 15:51:48 -07:00 @@ -549,17 +549,20 @@ tcp_grow_window(sk, tp, skb); } -/* Set up a new TCP connection, depending on whether it should be - * using Vegas or not. - */ -void tcp_vegas_init(struct tcp_opt *tp) +/* When starting a new connection, pin down the current choice of + * congestion algorithm. + */ +void tcp_ca_init(struct tcp_opt *tp) { - if (sysctl_tcp_vegas_cong_avoid) { - tp->vegas.do_vegas = 1; + if (sysctl_tcp_westwood) + tp->adv_cong = TCP_WESTWOOD; + else if (sysctl_tcp_bic) + tp->adv_cong = TCP_BIC; + else if (sysctl_tcp_vegas_cong_avoid) { + tp->adv_cong = TCP_VEGAS; tp->vegas.baseRTT = 0x7fffffff; tcp_vegas_enable(tp); - } else - tcp_vegas_disable(tp); + } } /* Do RTT sampling needed for Vegas. @@ -2007,7 +2010,7 @@ static inline __u32 bictcp_cwnd(struct tcp_opt *tp) { /* orignal Reno behaviour */ - if (!sysctl_tcp_bic) + if (!tcp_is_bic(tp)) return tp->snd_cwnd; if (tp->bictcp.last_cwnd == tp->snd_cwnd && diff -Nru a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c --- a/net/ipv4/tcp_minisocks.c 2004-10-01 15:51:48 -07:00 +++ b/net/ipv4/tcp_minisocks.c 2004-10-01 15:51:48 -07:00 @@ -788,7 +788,7 @@ newtp->mss_clamp = req->mss; TCP_ECN_openreq_child(newtp, req); - tcp_vegas_init(newtp); + tcp_ca_init(newtp); TCP_INC_STATS_BH(TcpPassiveOpens); } return newsk; diff -Nru a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c --- a/net/ipv4/tcp_output.c 2004-10-01 15:51:48 -07:00 +++ b/net/ipv4/tcp_output.c 2004-10-01 15:51:48 -07:00 @@ -1197,7 +1197,7 @@ tp->window_clamp = dst->window; tp->advmss = dst->advmss; tcp_initialize_rcv_mss(sk); - tcp_vegas_init(tp); + tcp_ca_init(tp); tcp_select_initial_window(tcp_full_space(sk), tp->advmss - (tp->ts_recent_stamp ? tp->tcp_header_len - sizeof(struct tcphdr) : 0), @@ -1248,7 +1248,7 @@ TCP_SKB_CB(buff)->end_seq = tp->write_seq; tp->snd_nxt = tp->write_seq; tp->pushed_seq = tp->write_seq; - tcp_vegas_init(tp); + tcp_ca_init(tp); /* Send it off. */ TCP_SKB_CB(buff)->when = tcp_time_stamp; From shemminger@osdl.org Fri Oct 1 15:57:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 15:57:57 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91MvoYQ006616 for ; Fri, 1 Oct 2004 15:57:50 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i91MvXWL008095 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 1 Oct 2004 15:57:33 -0700 Date: Fri, 1 Oct 2004 15:56:20 -0700 From: Stephen Hemminger To: Davem@redhat.com Cc: netdev@oss.sgi.com Subject: [PATCH] (2/3) tcp diag info for 2.4 Message-Id: <20041001155620.2f11f9f0@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.86 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 9787 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 This adds vegas style bandwidth info to 2.4. Also: makes 2.6 and 2.4 version of tcp_diag.h identical. Signed-off-by: Stephen Hemminger diff -Nru a/include/linux/tcp_diag.h b/include/linux/tcp_diag.h --- a/include/linux/tcp_diag.h 2004-10-01 15:52:21 -07:00 +++ b/include/linux/tcp_diag.h 2004-10-01 15:52:21 -07:00 @@ -98,9 +98,10 @@ TCPDIAG_NONE, TCPDIAG_MEMINFO, TCPDIAG_INFO, + TCPDIAG_VEGASINFO, }; -#define TCPDIAG_MAX TCPDIAG_INFO +#define TCPDIAG_MAX TCPDIAG_VEGASINFO /* TCPDIAG_MEM */ @@ -112,5 +113,15 @@ __u32 tcpdiag_fmem; __u32 tcpdiag_tmem; }; + +/* TCPDIAG_VEGASINFO */ + +struct tcpvegas_info { + __u32 tcpv_enabled; + __u32 tcpv_rttcnt; + __u32 tcpv_rtt; + __u32 tcpv_minrtt; +}; + #endif /* _TCP_DIAG_H_ */ diff -Nru a/net/ipv4/tcp_diag.c b/net/ipv4/tcp_diag.c --- a/net/ipv4/tcp_diag.c 2004-10-01 15:52:21 -07:00 +++ b/net/ipv4/tcp_diag.c 2004-10-01 15:52:21 -07:00 @@ -49,6 +49,7 @@ struct nlmsghdr *nlh; struct tcp_info *info = NULL; struct tcpdiag_meminfo *minfo = NULL; + struct tcpvegas_info *vinfo = NULL; unsigned char *b = skb->tail; nlh = NLMSG_PUT(skb, pid, seq, TCPDIAG_GETSOCK, sizeof(*r)); @@ -58,6 +59,10 @@ minfo = TCPDIAG_PUT(skb, TCPDIAG_MEMINFO, sizeof(*minfo)); if (ext & (1<<(TCPDIAG_INFO-1))) info = TCPDIAG_PUT(skb, TCPDIAG_INFO, sizeof(*info)); + + if ((tcp_is_westwood(tp) || tcp_is_vegas(tp)) + && (ext & (1<<(TCPDIAG_VEGASINFO-1)))) + vinfo = TCPDIAG_PUT(skb, TCPDIAG_VEGASINFO, sizeof(*vinfo)); } r->tcpdiag_family = sk->family; r->tcpdiag_state = sk->state; @@ -184,6 +189,20 @@ info->tcpi_snd_cwnd = tp->snd_cwnd; info->tcpi_advmss = tp->advmss; info->tcpi_reordering = tp->reordering; + } + + if (vinfo) { + if (tcp_is_vegas(tp)) { + vinfo->tcpv_enabled = tp->vegas.doing_vegas_now; + vinfo->tcpv_rttcnt = tp->vegas.cntRTT; + vinfo->tcpv_rtt = (1000000*tp->vegas.baseRTT)/HZ; + vinfo->tcpv_minrtt = (1000000*tp->vegas.minRTT)/HZ; + } else { + vinfo->tcpv_enabled = 0; + vinfo->tcpv_rttcnt = 0; + vinfo->tcpv_rtt = (1000000*tp->westwood.rtt)/HZ; + vinfo->tcpv_minrtt = (1000000*tp->westwood.rtt_min)/HZ; + } } nlh->nlmsg_len = skb->tail - b; From shemminger@osdl.org Fri Oct 1 15:57:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 15:57:58 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91MvpGC006617 for ; Fri, 1 Oct 2004 15:57:51 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i91MvYWL008115 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 1 Oct 2004 15:57:34 -0700 Date: Fri, 1 Oct 2004 15:57:25 -0700 From: Stephen Hemminger Cc: davem@redhat.com Subject: [PATCH] (3/3) tcp westwood cleanup for 2.4 Message-Id: <20041001155725.3cd22049@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.86 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 9788 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 Backport of the 2.6 code cleanup for Westwood TCP. Signed-off-by: Stephen Hemminger diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c --- a/net/ipv4/tcp_input.c 2004-10-01 15:54:14 -07:00 +++ b/net/ipv4/tcp_input.c 2004-10-01 15:54:14 -07:00 @@ -2556,15 +2556,13 @@ * WESTWOOD_RTT_MIN minimum bound since we could be on a LAN! */ -static inline __u32 westwood_update_rttmin(struct sock *sk) +static inline __u32 westwood_update_rttmin(const struct sock *sk) { - struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp); + const struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp); __u32 rttmin = tp->westwood.rtt_min; - if (tp->westwood.rtt == 0) - return rttmin; - - if (tp->westwood.rtt < tp->westwood.rtt_min || !rttmin) + if (tp->westwood.rtt != 0 && + (tp->westwood.rtt < tp->westwood.rtt_min || !rttmin)) rttmin = tp->westwood.rtt; return rttmin; @@ -2575,9 +2573,9 @@ * Evaluate increases for dk. */ -static __u32 westwood_acked(struct sock *sk) +static __u32 westwood_acked(const struct sock *sk) { - struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp); + const struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp); return ((tp->snd_una) - (tp->westwood.snd_una)); } @@ -2591,9 +2589,9 @@ * window, 1 if the sample has to be considered in the next window. */ -static int westwood_new_window(struct sock *sk) +static int westwood_new_window(const struct sock *sk) { - struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp); + const struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp); __u32 left_bound; __u32 rtt; int ret = 0; @@ -2627,14 +2625,13 @@ struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp); __u32 delta = now - tp->westwood.rtt_win_sx; - if (!delta) - return; - - if (tp->westwood.rtt) - westwood_filter(sk, delta); - - tp->westwood.bk = 0; - tp->westwood.rtt_win_sx = tcp_time_stamp; + if (delta) { + if (tp->westwood.rtt) + westwood_filter(sk, delta); + + tp->westwood.bk = 0; + tp->westwood.rtt_win_sx = tcp_time_stamp; + } } static void westwood_update_window(struct sock *sk, __u32 now) @@ -2688,7 +2685,7 @@ static inline int westwood_may_change_cumul(struct tcp_opt *tp) { - return ((tp->westwood.cumul_ack) > westwood_mss(tp)); + return (tp->westwood.cumul_ack > westwood_mss(tp)); } static inline void westwood_partial_update(struct tcp_opt *tp) @@ -2709,7 +2706,7 @@ * delayed or partial acks. */ -static __u32 westwood_acked_count(struct sock *sk) +static inline __u32 westwood_acked_count(struct sock *sk) { struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp); @@ -2723,7 +2720,7 @@ if (westwood_may_change_cumul(tp)) { /* Partial or delayed ack */ - if ((tp->westwood.accounted) >= (tp->westwood.cumul_ack)) + if (tp->westwood.accounted >= tp->westwood.cumul_ack) westwood_partial_update(tp); else westwood_complete_update(tp); From ak@suse.de Fri Oct 1 16:22:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 16:22:56 -0700 (PDT) Received: from Cantor.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91NMoPU011330 for ; Fri, 1 Oct 2004 16:22:50 -0700 Received: from hermes.suse.de (hermes-ext.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 05957CB5C94; Sat, 2 Oct 2004 01:19:40 +0200 (CEST) Date: Sat, 2 Oct 2004 01:19:39 +0200 From: Andi Kleen To: "David S. Miller" Cc: Andi Kleen , netdev@oss.sgi.com, jheffner@psc.edu, herbert@gondor.apana.org.au Subject: Re: Current 2.6.x TSO state Message-ID: <20041001231939.GC23046@wotan.suse.de> References: <20040930213221.06a3f5b3.davem@davemloft.net> <20041001121123.19511403.ak@suse.de> <20041001124733.1ac4266a.davem@davemloft.net> <20041001195146.GA23046@wotan.suse.de> <20041001125643.30c6830f.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041001125643.30c6830f.davem@davemloft.net> X-archive-position: 9789 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 > As mentioned, the TCP receive buffer auto-tuning takes care > of all of this in 2.6.6 and later. It's just 2.6.5 doesn't How do you explain the 2-4MB/s less with manually increased receive buffers? -Andi From vkondra@mail.ru Fri Oct 1 16:26:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 16:27:02 -0700 (PDT) Received: from mx2.mail.ru (mx2.mail.ru [194.67.23.122]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i91NQtuq011669 for ; Fri, 1 Oct 2004 16:26:56 -0700 Received: from [82.80.3.97] (port=35851 helo=[192.168.10.2]) by mx2.mail.ru with esmtp id 1CDWnN-0002DW-00; Sat, 02 Oct 2004 03:26:39 +0400 From: Vladimir Kondratiev To: "David S. Miller" Subject: Re: generic 802.11 stack Date: Sat, 2 Oct 2004 01:25:32 +0200 User-Agent: KMail/1.7 Cc: netdev@oss.sgi.com, mcgrof@studorgs.rutgers.edu, acx100-devel@lists.sourceforge.net, prism54-devel@prism54.org References: <200408312111.02438.vda@port.imtp.ilyichevsk.odessa.ua> <200410011630.59465.vkondra@mail.ru> <20041001155310.515ee09e.davem@davemloft.net> In-Reply-To: <20041001155310.515ee09e.davem@davemloft.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart6206511.VO1UjDSxoh"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200410020125.40669.vkondra@mail.ru> X-Spam: Probable Spam X-archive-position: 9790 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: vkondra@mail.ru Precedence: bulk X-list: netdev --nextPart6206511.VO1UjDSxoh Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Saturday 02 October 2004 00:53, David S. Miller wrote: DS> DS> Why this change? DS> DS> -extern void hh_data_is_too_small(void); DS> +static void hh_data_is_too_small(void) DS> +{ DS> + printk(KERN_ERR "hh_data_is_too_small\n"); DS> +} My misunderstanding. Sorry. DS> DS> We don't define the function because it is meant to DS> cause a compile time error if hh->hh_data is too small to DS> hold the full p80211_data_header structure. Please undo DS> this change. DS> DS> And therefore undo this change too: DS> DS> - if (sizeof(hh->hh_data) < sizeof(*p)) DS> + if (sizeof(hh->hh_data) < sizeof(*p)) { DS> hh_data_is_too_small(); DS> + return -1; DS> + } As above. DS> DS> Next, what's this? DS> DS> - dev->hard_header =3D p80211_header; DS> + dev->hard_header =3D p80211_header; DS> dev->rebuild_header =3D p80211_rebuild_header; DS> DS> Your merely changing the tab character after dev->hard_header DS> into spaces. Please don't do this. This makes a lot of white DS> space noise when making diffs against the original davem-p80211 DS> code thus making it harder to review the changes you actually made. My editor did it for me. I'll be more carefull to check this behind the sce= ne=20 things. Maybe, I'll do one patch to do all spaces accordingly to kernel=20 coding style, and since that will follow it. DS> DS> Next: DS> DS> + dev->mtu =3D 2304; DS> + dev->type =3D ARPHRD_IEEE80211; DS> DS> Is this really the correct default MTU for wireless devices? Yes, 802.11e (QoS) defines this value. DS> DS> @@ -342,7 +343,7 @@ int p80211_recv_cfackpoll(struct sk_buff DS> static struct packet_type p80211_packet_type =3D { DS> .type =3D __constant_htons(ETH_P_802_11), DS> .func =3D p80211_rcv, DS> - .data =3D (void *) 1, /* understands shared SKBs */ DS> + .af_packet_priv =3D (void *) 1, /* understands shared SKBs */ DS> }; DS> DS> You can just remove this line entirely for 2.6.x kernels. Thanks, I will. I was confused by this member and did simplest trick to mak= e=20 it compile. DS> DS> Otherwise looks fine :-) Really, thus far I did almost nothing. It is just foundation for playing wi= th=20 stack. My intention was to decouple driver and stack ASAP to enable separat= e=20 development for each part. Next step I will do data path, with some code to enable QoS 26 byte headers= =20 but without real QoS, which is, by the way, pretty complicated as defined i= n=20 TGe. May be, it is better to start with WME w.r.t QoS. Then, it is management's turn. Association, scanning. Then, once again, data path. Fragmentation, reassembly. Framework for=20 security. Then - let's see how this will develop. --nextPart6206511.VO1UjDSxoh Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQBBXed0qxdj7mhC6o0RAo7iAJ0QM7tZtzzcVIKzG1GDm2h3iQbcsgCfdP06 k+A04teh0Hj/6vwDpiOZR8c= =53Am -----END PGP SIGNATURE----- --nextPart6206511.VO1UjDSxoh-- From davem@davemloft.net Fri Oct 1 17:06:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 17:06:44 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9206dfY012457 for ; Fri, 1 Oct 2004 17:06:39 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CDXOS-0008Il-00; Fri, 01 Oct 2004 17:04:56 -0700 Date: Fri, 1 Oct 2004 17:04:56 -0700 From: "David S. Miller" To: Andi Kleen Cc: ak@suse.de, netdev@oss.sgi.com, jheffner@psc.edu, herbert@gondor.apana.org.au Subject: Re: Current 2.6.x TSO state Message-Id: <20041001170456.3ec52222.davem@davemloft.net> In-Reply-To: <20041001231939.GC23046@wotan.suse.de> References: <20040930213221.06a3f5b3.davem@davemloft.net> <20041001121123.19511403.ak@suse.de> <20041001124733.1ac4266a.davem@davemloft.net> <20041001195146.GA23046@wotan.suse.de> <20041001125643.30c6830f.davem@davemloft.net> <20041001231939.GC23046@wotan.suse.de> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9791 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev On Sat, 2 Oct 2004 01:19:39 +0200 Andi Kleen wrote: > > As mentioned, the TCP receive buffer auto-tuning takes care > > of all of this in 2.6.6 and later. It's just 2.6.5 doesn't > > How do you explain the 2-4MB/s less with manually increased > receive buffers? Some scheduling differences, I suppose. Frankly, I've done what I can with the TSO stuff at this point. All I get from you are "it's slower" and no code, I've had to write and fix and debug everything for you. The performance is close or on-par to non-TSO and more importantly TSO abides by the congestion window and MSS values properly now. That's 10 times more important than 2-4MB/s performance difference. Or maybe I should revert all of the TSO work so that all SpecWEB submissions done with 2.6.x kernels get invalidated? From davem@davemloft.net Fri Oct 1 17:13:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 17:13:45 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i920DdTJ012845 for ; Fri, 1 Oct 2004 17:13:39 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CDXVG-0008Jj-00; Fri, 01 Oct 2004 17:11:58 -0700 Date: Fri, 1 Oct 2004 17:11:58 -0700 From: "David S. Miller" To: Vladimir Kondratiev Cc: netdev@oss.sgi.com, mcgrof@studorgs.rutgers.edu, acx100-devel@lists.sourceforge.net, prism54-devel@prism54.org Subject: Re: generic 802.11 stack Message-Id: <20041001171158.489e3cf1.davem@davemloft.net> In-Reply-To: <200410020125.40669.vkondra@mail.ru> References: <200408312111.02438.vda@port.imtp.ilyichevsk.odessa.ua> <200410011630.59465.vkondra@mail.ru> <20041001155310.515ee09e.davem@davemloft.net> <200410020125.40669.vkondra@mail.ru> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9792 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev On Sat, 2 Oct 2004 01:25:32 +0200 Vladimir Kondratiev wrote: > DS> Next: > DS> > DS> + dev->mtu = 2304; > DS> + dev->type = ARPHRD_IEEE80211; > DS> > DS> Is this really the correct default MTU for wireless devices? > > Yes, 802.11e (QoS) defines this value. All existing wireless drivers use the standard ethernet MTU. I really think it is supposed to be 1500. That's why I left it at ether_setup()'s setting. Upper layers really want to see a 1500 byte standard ethernet MTU by default. It's OK to let people set this higher via netdev->change_mtu() configuration calls, but by default it should be something that makes sense for most networks and that is 1500. Yes, btw, your tabs are all screwed up. Please configure your editor to use real tab characters. Your's is using spaces and using a tab-stop of 4 when it should be 8. From jheffner@psc.edu Fri Oct 1 18:32:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 18:32:46 -0700 (PDT) Received: from mailer1.psc.edu (mailer1.psc.edu [128.182.58.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i921WeH4013997 for ; Fri, 1 Oct 2004 18:32:41 -0700 Received: from dexter.psc.edu (dexter.psc.edu [128.182.61.232]) by mailer1.psc.edu (8.12.10/8.12.5) with ESMTP id i921WP30006051 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 1 Oct 2004 21:32:26 -0400 (EDT) Received: from dexter.psc.edu (dexter.psc.edu [128.182.61.232]) by dexter.psc.edu (8.12.10/8.12.5) with ESMTP id i921WPCW026692; Fri, 1 Oct 2004 21:32:25 -0400 (EDT) Date: Fri, 1 Oct 2004 21:32:25 -0400 (EDT) From: John Heffner To: "David S. Miller" cc: Subject: Re: bad TSO performance in 2.6.9-rc2-BK In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: clamd / ClamAV version 0.75, clamav-milter version 0.75 on mailer1.psc.edu X-Virus-Status: Clean X-archive-position: 9793 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jheffner@psc.edu Precedence: bulk X-list: netdev > On Thu, 30 Sep 2004, David S. Miller wrote: > > > Please help debug this John since I'm not seeing this here. Here's what I've observed now: on one machine I have interface hangs after a non-deterministic amount of time (usually within a few seconds) with TSO on if I'm sending at a reasonably high rate with a 1500 byte MTU. I get no hangs with a 9000 byte mtu, or at a low rate (sending to a FastE host). Interestingly, if the interface mtu is 9000, but I'm sending 1500 byte packets, it does not seem to hang. On a different machine (both P4's with e1000's) I get no hangs. The hangs happen even with 2.6.8.1 before the recent TSO changes, so it's not a bug there. I looked at some tcpdumps and saw no strangeness in the last segments sent. The good machine has an e7500 chipset and a 82544EI. The bad machine has a ServerWorks chipset and a 82545GM. Any suggestions on where to look for what's going wrong with the interface? Thanks, -John From herbert@gondor.apana.org.au Fri Oct 1 22:02:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 22:03:03 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9252pEg020353 for ; Fri, 1 Oct 2004 22:02:55 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CDc2O-0003R0-00; Sat, 02 Oct 2004 15:02:28 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CDc2I-0003wP-00; Sat, 02 Oct 2004 15:02:22 +1000 From: Herbert Xu To: davem@davemloft.net (David S. Miller) Subject: Re: [PATCH]: fixed typo of reassembly.c Cc: yasuyuki.kozakai@toshiba.co.jp, netdev@oss.sgi.com, usagi-core@linux-ipv6.org Organization: Core In-Reply-To: <20041001151923.261b42b3.davem@davemloft.net> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) Message-Id: Date: Sat, 02 Oct 2004 15:02:22 +1000 X-archive-position: 9794 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev David S. Miller wrote: > > It is textual fix only, do you realize this? > Both ntohs() and htons() perform the same transformation > on a 16-bit data item. It really does not matter which > one you actually use, in practice. It might make a difference in future if the sparse people decide to annotate its arguments/return values. -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From davem@davemloft.net Fri Oct 1 23:40:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 01 Oct 2004 23:40:39 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i926eWJu022688 for ; Fri, 1 Oct 2004 23:40:33 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CDdXN-00006x-00; Fri, 01 Oct 2004 23:38:33 -0700 Date: Fri, 1 Oct 2004 23:38:32 -0700 From: "David S. Miller" To: Herbert Xu Cc: yasuyuki.kozakai@toshiba.co.jp, netdev@oss.sgi.com, usagi-core@linux-ipv6.org Subject: Re: [PATCH]: fixed typo of reassembly.c Message-Id: <20041001233832.34bd0a91.davem@davemloft.net> In-Reply-To: References: <20041001151923.261b42b3.davem@davemloft.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9795 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev On Sat, 02 Oct 2004 15:02:22 +1000 Herbert Xu wrote: > David S. Miller wrote: > > > > It is textual fix only, do you realize this? > > Both ntohs() and htons() perform the same transformation > > on a 16-bit data item. It really does not matter which > > one you actually use, in practice. > > It might make a difference in future if the sparse people decide to > annotate its arguments/return values. That's true. Al Viro has done this on the filesystems and "cpu_to_{be,le}{16,32,64}()" et al. interfaces. I'm sure he'll hit the networking before long. From herbert@gondor.apana.org.au Sat Oct 2 00:51:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 02 Oct 2004 00:51:40 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i927pUVD027127 for ; Sat, 2 Oct 2004 00:51:31 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CDefX-0003yy-00; Sat, 02 Oct 2004 17:51:03 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CDefL-0004hQ-00; Sat, 02 Oct 2004 17:50:51 +1000 Date: Sat, 2 Oct 2004 17:50:51 +1000 To: "David S. Miller" Cc: laforge@gnumonks.org, netdev@oss.sgi.com Subject: Re: [6/6]: jenkins hash for neigh Message-ID: <20041002075051.GA18037@gondor.apana.org.au> References: <20040925005623.2faf8faf.davem@davemloft.net> <20040927111520.4f495b17.davem@davemloft.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="PNTmBPCT7hxwcZjr" Content-Disposition: inline In-Reply-To: <20040927111520.4f495b17.davem@davemloft.net> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 9796 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev --PNTmBPCT7hxwcZjr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Sep 27, 2004 at 11:15:20AM -0700, David S. Miller wrote: > On Mon, 27 Sep 2004 21:48:33 +1000 > Herbert Xu wrote: > > > > - if (tbl->entries > (tbl->hash_mask + 1)) > > > + if (tbl->entries > (tbl->hash_mask + 1)) { > > > + write_lock_bh(&tbl->lock); > > > neigh_hash_grow(tbl, (tbl->hash_mask + 1) << 1); > > > + write_unlock_bh(&tbl->lock); > > > + } > > > > The locking should be outside the if block as otherwise you may grow > > unnecessarily or grow into the same size :) > > I'm not going to do that, because then we're grabbing that lock > twice on every neigh create operation and I was trying hard > to avoid that overhead. Actually, why don't we just move the expansion into the locked section? Signed-off-by: Herbert Xu Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --PNTmBPCT7hxwcZjr Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== net/core/neighbour.c 1.51 vs edited ===== --- 1.51/net/core/neighbour.c 2004-10-02 07:58:21 +10:00 +++ edited/net/core/neighbour.c 2004-10-02 17:47:11 +10:00 @@ -406,12 +406,6 @@ goto out; } - if (tbl->entries > (tbl->hash_mask + 1)) { - write_lock_bh(&tbl->lock); - neigh_hash_grow(tbl, (tbl->hash_mask + 1) << 1); - write_unlock_bh(&tbl->lock); - } - memcpy(n->primary_key, pkey, key_len); n->dev = dev; dev_hold(dev); @@ -432,6 +426,9 @@ n->confirmed = jiffies - (n->parms->base_reachable_time << 1); write_lock_bh(&tbl->lock); + + if (tbl->entries > (tbl->hash_mask + 1)) { + neigh_hash_grow(tbl, (tbl->hash_mask + 1) << 1); hash_val = tbl->hash(pkey, dev) & tbl->hash_mask; --PNTmBPCT7hxwcZjr-- From duncan.sands@math.u-psud.fr Sat Oct 2 01:17:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 02 Oct 2004 01:17:46 -0700 (PDT) Received: from postfix4-2.free.fr (postfix4-2.free.fr [213.228.0.176]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i928Hd0s027878 for ; Sat, 2 Oct 2004 01:17:40 -0700 Received: from pbaldrick.hd.free.fr (massena-4-82-67-197-146.fbx.proxad.net [82.67.197.146]) by postfix4-2.free.fr (Postfix) with ESMTP id 2FEA820F423; Sat, 2 Oct 2004 10:17:26 +0200 (CEST) Received: by pbaldrick.hd.free.fr (Postfix, from userid 500) id 1D7F8A8728; Sat, 2 Oct 2004 09:58:02 +0200 (CEST) From: Duncan Sands To: "David S. Miller" Subject: Re: Oops at __neigh_for_each_release (2.6.9-rc3) Date: Sat, 2 Oct 2004 09:58:00 +0200 User-Agent: KMail/1.6.2 Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, laforge@gnumonks.org References: <200410012217.35264.baldrick@free.fr> <20041001135636.0c071602.davem@davemloft.net> In-Reply-To: <20041001135636.0c071602.davem@davemloft.net> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200410020958.01197.baldrick@free.fr> X-archive-position: 9797 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: baldrick@free.fr Precedence: bulk X-list: netdev > > EIP is at __neigh_for_each_release+0x32/0xb0 > > Give this patch a try. And please report networking bugs > to netdev@oss.sgi.com in the future, thanks. OK, will do. I tested the patch Linus committed - it indeed fixes the oops. Thanks a lot! Duncan. From margitsw@t-online.de Sat Oct 2 02:26:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 02 Oct 2004 02:26:47 -0700 (PDT) Received: from mailout04.sul.t-online.com (mailout04.sul.t-online.com [194.25.134.18]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i929Qeb4029197 for ; Sat, 2 Oct 2004 02:26:41 -0700 Received: from fwd09.aul.t-online.de by mailout04.sul.t-online.com with smtp id 1CDg9l-0000Q8-01; Sat, 02 Oct 2004 11:26:21 +0200 Received: from margit.t-online.de (XdwFZZZSwegAYW0xWWI8kv7S+wRqQhro5aZnpGSy2fu0RZvqO8wprh@[217.226.116.15]) by fwd09.sul.t-online.com with esmtp id 1CDg9f-29F1H60; Sat, 2 Oct 2004 11:26:15 +0200 Message-Id: <5.1.0.14.2.20041002105713.026705d8@pop.t-online.de> X-Sender: margitsw@pop.t-online.de X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Sat, 02 Oct 2004 11:07:18 +0200 To: Greg KH From: margitsw@t-online.de (Margit Schubert-While) Subject: Re: [Kernel-janitors] Re: [PATCH 2.6.9-rc2 17/38] net/islpci_dev: replace schedule_timeout() with msleep() Cc: jgarzik@pobox.com, netdev@oss.sgi.com, kernel-janitors@lists.osdl.org, mcgrof@studorgs.rutgers.edu, prism54-devel@prism54.org, hvr@gnu.org In-Reply-To: <20041001165523.GC11646@kroah.com> References: <5.1.0.14.2.20041001084419.02570b18@pop.t-online.de> <5.1.0.14.2.20040924074745.00b1cd40@pop.t-online.de> <20040923221303.GB13244@us.ibm.com> <20040923221303.GB13244@us.ibm.com> <5.1.0.14.2.20040924074745.00b1cd40@pop.t-online.de> <5.1.0.14.2.20041001084419.02570b18@pop.t-online.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-ID: XdwFZZZSwegAYW0xWWI8kv7S+wRqQhro5aZnpGSy2fu0RZvqO8wprh X-TOI-MSGID: 985859d3-d2bd-4320-99fa-e11d875a8fbf X-archive-position: 9798 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: margitsw@t-online.de Precedence: bulk X-list: netdev At 09:55 01.10.2004 -0700, Greg scribeth: >On Fri, Oct 01, 2004 at 09:04:27AM +0200, Margit Schubert-While wrote: > > At 00:15 01.10.2004 -0400, Jeff scribeth: > > >I would rather see an msleep implementation in 2.4.x... > > > > Hear, hear. > > And can we PLEASE have a > > "#define HAVE_MSLEEP" in delay.h ?!!! > > (2.4. AND 2.6) > >No, this is not how the kernel source tree works, sorry. Well it happened with netdev_priv ;-) (HAVE_NETDEV_PRIV) Margit From yoshfuji@linux-ipv6.org Sat Oct 2 03:31:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 02 Oct 2004 03:31:36 -0700 (PDT) Received: from yue.st-paulia.net (yue.linux-ipv6.org [203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i92AVTTN001590 for ; Sat, 2 Oct 2004 03:31:30 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id A6C3833CE5; Sat, 2 Oct 2004 19:31:38 +0900 (JST) Date: Sat, 02 Oct 2004 19:31:38 +0900 (JST) Message-Id: <20041002.193138.94763422.yoshfuji@linux-ipv6.org> To: davem@davemloft.net Cc: netdev@oss.sgi.com, yoshfuji@linux-ipv6.org Subject: [PATCH 2.6] [IPV6] SIT: dst leakage in error path. From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= Organization: USAGI Project X-URL: http://www.yoshifuji.org/%7Ehideaki/ X-Fingerprint: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA X-PGP-Key-URL: http://www.yoshifuji.org/%7Ehideaki/hideaki@yoshifuji.org.asc X-Face: "5$Al-.M>NJ%a'@hhZdQm:."qn~PA^gq4o*>iCFToq*bAi#4FRtx}enhuQKz7fNqQz\BYU] $~O_5m-9'}MIs`XGwIEscw;e5b>n"B_?j/AkL~i/MEaZBLP X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 9799 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: yoshfuji@linux-ipv6.org Precedence: bulk X-list: netdev Hello. We failed to put rt in error path. Signed-off-by: Hideaki YOSHIFUJI ===== net/ipv6/sit.c 1.41 vs edited ===== --- 1.41/net/ipv6/sit.c 2004-09-17 05:10:00 +09:00 +++ edited/net/ipv6/sit.c 2004-10-02 19:24:05 +09:00 @@ -487,6 +487,7 @@ } } if (rt->rt_type != RTN_UNICAST) { + ip_rt_put(rt); tunnel->stat.tx_carrier_errors++; goto tx_error_icmp; } -- Hideaki YOSHIFUJI @ USAGI Project GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA From yoshfuji@linux-ipv6.org Sat Oct 2 03:34:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 02 Oct 2004 03:34:20 -0700 (PDT) Received: from yue.st-paulia.net (yue.linux-ipv6.org [203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i92AYFGi001956 for ; Sat, 2 Oct 2004 03:34:15 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 1BF2633CE5; Sat, 2 Oct 2004 19:34:25 +0900 (JST) Date: Sat, 02 Oct 2004 19:34:24 +0900 (JST) Message-Id: <20041002.193424.76694251.yoshfuji@linux-ipv6.org> To: davem@davemloft.net Cc: netdev@oss.sgi.com, yoshfuji@linux-ipv6.org Subject: Re: [PATCH 2.6] [IPV6] SIT: dst leakage in error path. From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <20041002.193138.94763422.yoshfuji@linux-ipv6.org> References: <20041002.193138.94763422.yoshfuji@linux-ipv6.org> Organization: USAGI Project X-URL: http://www.yoshifuji.org/%7Ehideaki/ X-Fingerprint: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA X-PGP-Key-URL: http://www.yoshifuji.org/%7Ehideaki/hideaki@yoshifuji.org.asc X-Face: "5$Al-.M>NJ%a'@hhZdQm:."qn~PA^gq4o*>iCFToq*bAi#4FRtx}enhuQKz7fNqQz\BYU] $~O_5m-9'}MIs`XGwIEscw;e5b>n"B_?j/AkL~i/MEaZBLP X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit X-archive-position: 9800 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: yoshfuji@linux-ipv6.org Precedence: bulk X-list: netdev In article <20041002.193138.94763422.yoshfuji@linux-ipv6.org> (at Sat, 02 Oct 2004 19:31:38 +0900 (JST)), YOSHIFUJI Hideaki / $B5HF#1QL@(B says: > We failed to put rt in error path. > > Signed-off-by: Hideaki YOSHIFUJI And this also applies 2.4 (with some fuzz). --yoshfuji From benh@kernel.crashing.org Sat Oct 2 04:54:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 02 Oct 2004 04:54:46 -0700 (PDT) Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i92BsdUr006897 for ; Sat, 2 Oct 2004 04:54:40 -0700 Received: from localhost (localhost [127.0.0.1]) by gate.crashing.org (8.12.8/8.12.8) with ESMTP id i92BlOKM010068; Sat, 2 Oct 2004 06:47:26 -0500 Subject: Re: kernel crash with G5 Xserve and sungem driver From: Benjamin Herrenschmidt To: Harald Welte Cc: Chris Friesen , netdev@oss.sgi.com, linuxppc-dev@ozlabs.org In-Reply-To: <20041001194630.GO27499@sunbeam.de.gnumonks.org> References: <415D8768.8080808@nortelnetworks.com> <20041001193153.GN27499@sunbeam.de.gnumonks.org> <415DB334.4010809@nortelnetworks.com> <20041001194630.GO27499@sunbeam.de.gnumonks.org> Content-Type: text/plain Message-Id: <1096717811.3634.45.camel@gaston> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Sat, 02 Oct 2004 21:50:11 +1000 Content-Transfer-Encoding: 7bit X-archive-position: 9801 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: benh@kernel.crashing.org Precedence: bulk X-list: netdev On Sat, 2004-10-02 at 05:46, Harald Welte wrote: > On Fri, Oct 01, 2004 at 01:42:44PM -0600, Chris Friesen wrote: > > Harald Welte wrote: > > > > >Just don't compile (or load) the sungem driver on those boxes. > > > > Hmm. That's a pain. We've got G5 desktops too, and it would be nice to be > > able to run one kernel for both. It'd be better (IMHO) to fix the driver > > so it doesn't crash. > > I recommend talking to Bejamin Herrenschmidt, IIRC he already had > something in mind in order to fix the issue. > > I mean, you can always hardcode some exemption into the driver, that's > two easy lines ;) Or just have the driver test the return value of pci_device_to_OF_node() for NULL :) One thing is that I'm about to push a patch that will "hide" PCI devices from the kernel that are absent from the OF tree since there are other issues with newer machines, so that will fix the problem. Both 64 bits and 32 bits patches are below: ===== arch/ppc64/kernel/pmac_pci.c 1.5 vs edited ===== --- 1.5/arch/ppc64/kernel/pmac_pci.c 2004-07-25 14:51:52 +10:00 +++ edited/arch/ppc64/kernel/pmac_pci.c 2004-08-04 10:26:07 +10:00 @@ -271,7 +271,7 @@ int offset, int len, u32 *val) { struct pci_controller *hose; - struct device_node *busdn; + struct device_node *busdn, *dn; unsigned long addr; if (bus->self) @@ -282,6 +282,16 @@ return PCIBIOS_DEVICE_NOT_FOUND; hose = busdn->phb; if (hose == NULL) + return PCIBIOS_DEVICE_NOT_FOUND; + + /* We only allow config cycles to devices that are in OF device-tree + * as we are apparently having some weird things going on with some + * revs of K2 on recent G5s + */ + for (dn = busdn->child; dn; dn = dn->sibling) + if (dn->devfn == devfn) + break; + if (dn == NULL) return PCIBIOS_DEVICE_NOT_FOUND; addr = u3_ht_cfg_access(hose, bus->number, devfn, offset); ===== arch/ppc/platforms/pmac_pci.c 1.21 vs edited ===== --- 1.21/arch/ppc/platforms/pmac_pci.c 2004-07-29 14:58:35 +10:00 +++ edited/arch/ppc/platforms/pmac_pci.c 2004-08-17 14:18:09 +10:00 @@ -315,6 +315,10 @@ unsigned int addr; int i; + struct device_node *np = pci_busdev_to_OF_node(bus, devfn); + if (np == NULL) + return PCIBIOS_DEVICE_NOT_FOUND; + /* * When a device in K2 is powered down, we die on config * cycle accesses. Fix that here. @@ -362,6 +366,9 @@ unsigned int addr; int i; + struct device_node *np = pci_busdev_to_OF_node(bus, devfn); + if (np == NULL) + return PCIBIOS_DEVICE_NOT_FOUND; /* * When a device in K2 is powered down, we die on config * cycle accesses. Fix that here. From margitsw@t-online.de Sat Oct 2 07:48:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 02 Oct 2004 07:48:54 -0700 (PDT) Received: from mailout03.sul.t-online.com (mailout03.sul.t-online.com [194.25.134.81]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i92EmnEe009380 for ; Sat, 2 Oct 2004 07:48:49 -0700 Received: from fwd08.aul.t-online.de by mailout03.sul.t-online.com with smtp id 1CDlBa-0008IN-00; Sat, 02 Oct 2004 16:48:34 +0200 Received: from roglap.local (XRIpreZ-ZeuSY3MYmmmLhklyopvTlIR65EeJl4mHH73oPHF-F2fmcm@[80.128.222.170]) by fwd08.sul.t-online.com with esmtp id 1CDlBN-27CFjE0; Sat, 2 Oct 2004 16:48:21 +0200 From: margitsw@t-online.de (Margit Schubert-While) To: jgarzik@pobox.com Subject: [PATCH 0/4 linux-2.6.9-rc3/linux-2.4.28-pre3] prism54 bugs/patches Date: Sat, 2 Oct 2004 16:34:56 +0200 User-Agent: KMail/1.5.4 Cc: netdev@oss.sgi.com, prism54-devel@prism54.org MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200410021634.56857.margitsw@t-online.de> X-ID: XRIpreZ-ZeuSY3MYmmmLhklyopvTlIR65EeJl4mHH73oPHF-F2fmcm X-TOI-MSGID: 49f6f2a3-5fec-4188-8eb3-419d470f2f21 X-archive-position: 9802 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: margitsw@t-online.de Precedence: bulk X-list: netdev 2004-10-02 Margit Schubert-While * 01_remtrace.patch * Remove TRACE to please the janitors * 02_schedbug.patch * Bug in loop around schedule_timeout * We must rearm the task * * Make timeout message meaningful * 03_fwprint.patch * Print firmware version * * As per convention, make errno return negative * 04_mgtcommit.patch * Change mgt_commit from void to int * We call this from device initialization, * therefore we need to know that it has succeeded * If it hasn't, we do not have a working device and * should pass a non-zero value upwards Jeff, as usual, applies to both 2.4 and 2.6; however, there are outstanding patches for 2.4. Margit From margitsw@t-online.de Sat Oct 2 07:53:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 02 Oct 2004 07:53:43 -0700 (PDT) Received: from mailout09.sul.t-online.com (mailout09.sul.t-online.com [194.25.134.84]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i92Erc6U009726 for ; Sat, 2 Oct 2004 07:53:39 -0700 Received: from fwd07.aul.t-online.de by mailout09.sul.t-online.com with smtp id 1CDlGG-0005An-02; Sat, 02 Oct 2004 16:53:24 +0200 Received: from roglap.local (X7jIUUZfoejiSTCM5XlTGmrOL-+j9sTYPtAidfQlhR6oZ2gkDLznEC@[80.128.222.170]) by fwd07.sul.t-online.com with esmtp id 1CDlG5-1W5CTI0; Sat, 2 Oct 2004 16:53:13 +0200 From: margitsw@t-online.de (Margit Schubert-While) To: jgarzik@pobox.com Subject: [PATCH 1/4 linux-2.6.9-rc3/linux-2.4.28-pre3] prism54 remove TRACE Date: Sat, 2 Oct 2004 16:39:48 +0200 User-Agent: KMail/1.5.4 Cc: netdev@oss.sgi.com, prism54-devel@prism54.org MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_02rXBe1fWCdgDwu" Message-Id: <200410021639.48960.margitsw@t-online.de> X-ID: X7jIUUZfoejiSTCM5XlTGmrOL-+j9sTYPtAidfQlhR6oZ2gkDLznEC X-TOI-MSGID: cd1c3969-4a6b-45e5-9ce3-7ae019fe5059 X-archive-position: 9803 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: margitsw@t-online.de Precedence: bulk X-list: netdev --Boundary-00=_02rXBe1fWCdgDwu Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline 2004-10-02 Margit Schubert-While * 01_remtrace.patch * Remove TRACE to please the janitors Margit --Boundary-00=_02rXBe1fWCdgDwu Content-Type: text/x-diff; charset="us-ascii"; name="01_remtrace.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="01_remtrace.patch" diff -Naur linux-2.6.9rc2/drivers/net/wireless/prism54/islpci_hotplug.c linux-2.6.9-rc2msw/drivers/net/wireless/prism54/islpci_hotplug.c --- linux-2.6.9rc2/drivers/net/wireless/prism54/islpci_hotplug.c 2004-08-14 07:36:57.000000000 +0200 +++ linux-2.6.9-rc2msw/drivers/net/wireless/prism54/islpci_hotplug.c 2004-09-25 11:15:41.000000000 +0200 @@ -107,9 +107,6 @@ islpci_private *priv; int rvalue; - /* TRACE(DRV_NAME); */ - - /* Enable the pci device */ if (pci_enable_device(pdev)) { printk(KERN_ERR "%s: pci_enable_device() failed.\n", DRV_NAME); diff -Naur linux-2.6.9rc2/drivers/net/wireless/prism54/islpci_mgt.h linux-2.6.9-rc2msw/drivers/net/wireless/prism54/islpci_mgt.h --- linux-2.6.9rc2/drivers/net/wireless/prism54/islpci_mgt.h 2004-08-14 07:36:18.000000000 +0200 +++ linux-2.6.9-rc2msw/drivers/net/wireless/prism54/islpci_mgt.h 2004-09-25 11:15:54.000000000 +0200 @@ -31,8 +31,6 @@ #define K_DEBUG(f, m, args...) do { if(f & m) printk(KERN_DEBUG args); } while(0) #define DEBUG(f, args...) K_DEBUG(f, pc_debug, args) -#define TRACE(devname) K_DEBUG(SHOW_TRACING, VERBOSE, "%s: -> " __FUNCTION__ "()\n", devname) - extern int pc_debug; #define init_wds 0 /* help compiler optimize away dead code */ --Boundary-00=_02rXBe1fWCdgDwu-- From margitsw@t-online.de Sat Oct 2 07:58:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 02 Oct 2004 07:58:21 -0700 (PDT) Received: from mailout02.sul.t-online.com (mailout02.sul.t-online.com [194.25.134.17]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i92EwGoM010172 for ; Sat, 2 Oct 2004 07:58:17 -0700 Received: from fwd09.aul.t-online.de by mailout02.sul.t-online.com with smtp id 1CDlK2-0005Db-01; Sat, 02 Oct 2004 16:57:18 +0200 Received: from roglap.local (ES14IYZpZegS6qLBet6nnK2321OcOLeKV0JTp3uXNpkh-Eav9+pR8M@[80.128.222.170]) by fwd09.sul.t-online.com with esmtp id 1CDlJo-0dc8q80; Sat, 2 Oct 2004 16:57:04 +0200 From: margitsw@t-online.de (Margit Schubert-While) To: jgarzik@pobox.com Subject: [PATCH 2/4 linux-2.6.9-rc3/linux-2.4.28-pre3] prism54 Bug in timeout scheduling Date: Sat, 2 Oct 2004 16:43:40 +0200 User-Agent: KMail/1.5.4 Cc: netdev@oss.sgi.com, prism54-devel@prism54.org MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_c6rXBEu8/u0bS+K" Message-Id: <200410021643.40328.margitsw@t-online.de> X-ID: ES14IYZpZegS6qLBet6nnK2321OcOLeKV0JTp3uXNpkh-Eav9+pR8M X-TOI-MSGID: d203d6cf-f6a3-4b65-9a2f-98d23fc47ba2 X-archive-position: 9804 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: margitsw@t-online.de Precedence: bulk X-list: netdev --Boundary-00=_c6rXBEu8/u0bS+K Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline 2004-10-02 Margit Schubert-While * 02_schedbug.patch * Bug in loop around schedule_timeout * We must rearm the task * * Make timeout message meaningful Margit --Boundary-00=_c6rXBEu8/u0bS+K Content-Type: text/x-diff; charset="us-ascii"; name="02_schedbug.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="02_schedbug.patch" diff -Naur linux-2.6.9rc2/drivers/net/wireless/prism54/islpci_dev.c linux-2.6.9-rc2msw/drivers/net/wireless/prism54/islpci_dev.c --- linux-2.6.9rc2/drivers/net/wireless/prism54/islpci_dev.c 2004-10-02 12:23:39.000000000 +0200 +++ linux-2.6.9-rc2msw/drivers/net/wireless/prism54/islpci_dev.c 2004-10-02 12:26:51.000000000 +0200 @@ -486,6 +486,7 @@ /* The software reset acknowledge needs about 220 msec here. * Be conservative and wait for up to one second. */ + set_current_state(TASK_UNINTERRUPTIBLE); remaining = schedule_timeout(HZ); if(remaining > 0) { @@ -496,14 +497,14 @@ /* If we're here it's because our IRQ hasn't yet gone through. * Retry a bit more... */ - printk(KERN_ERR "%s: reset problem: no 'reset complete' IRQ seen\n", + printk(KERN_ERR "%s: no 'reset complete' IRQ seen - retrying\n", priv->ndev->name); } finish_wait(&priv->reset_done, &wait); if (result) { - printk(KERN_ERR "%s: islpci_reset_if: failure\n", priv->ndev->name); + printk(KERN_ERR "%s: interface reset failure\n", priv->ndev->name); return result; } diff -Naur linux-2.6.9rc2/drivers/net/wireless/prism54/islpci_mgt.c linux-2.6.9-rc2msw/drivers/net/wireless/prism54/islpci_mgt.c --- linux-2.6.9rc2/drivers/net/wireless/prism54/islpci_mgt.c 2004-10-02 12:23:40.000000000 +0200 +++ linux-2.6.9-rc2msw/drivers/net/wireless/prism54/islpci_mgt.c 2004-10-02 12:27:10.000000000 +0200 @@ -473,6 +473,7 @@ int timeleft; struct islpci_mgmtframe *frame; + set_current_state(TASK_UNINTERRUPTIBLE); timeleft = schedule_timeout(wait_cycle_jiffies); frame = xchg(&priv->mgmt_received, NULL); if (frame) { --Boundary-00=_c6rXBEu8/u0bS+K-- From margitsw@t-online.de Sat Oct 2 07:59:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 02 Oct 2004 08:00:03 -0700 (PDT) Received: from mailout10.sul.t-online.com (mailout10.sul.t-online.com [194.25.134.21]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i92Ext6Q010505 for ; Sat, 2 Oct 2004 07:59:56 -0700 Received: from fwd10.aul.t-online.de by mailout10.sul.t-online.com with smtp id 1CDlML-0005AP-01; Sat, 02 Oct 2004 16:59:41 +0200 Received: from roglap.local (SgBpZZZGoeMj0Ayfv3Mnl1BD99O2HulixO5sPOlqbmEAsMbV7a69Ui@[80.128.222.170]) by fwd10.sul.t-online.com with esmtp id 1CDlME-0mCVWa0; Sat, 2 Oct 2004 16:59:34 +0200 From: margitsw@t-online.de (Margit Schubert-While) To: jgarzik@pobox.com Subject: [PATCH 3/4 linux-2.6.9-rc3/linux-2.4.28-pre3] prism54 print firmware version Date: Sat, 2 Oct 2004 16:46:10 +0200 User-Agent: KMail/1.5.4 Cc: netdev@oss.sgi.com, prism54-devel@prism54.org MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_y8rXBnhfvfllDc6" Message-Id: <200410021646.10748.margitsw@t-online.de> X-ID: SgBpZZZGoeMj0Ayfv3Mnl1BD99O2HulixO5sPOlqbmEAsMbV7a69Ui X-TOI-MSGID: 3e5ec238-fb00-4491-9449-f785492e916b X-archive-position: 9805 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: margitsw@t-online.de Precedence: bulk X-list: netdev --Boundary-00=_y8rXBnhfvfllDc6 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline 2004-10-02 Margit Schubert-While * 03_fwprint.patch * Print firmware version * * As per convention, make errno return negative Margit --Boundary-00=_y8rXBnhfvfllDc6 Content-Type: text/x-diff; charset="us-ascii"; name="03_fwprint.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="03_fwprint.patch" diff -Naur linux-2.6.9rc2/drivers/net/wireless/prism54/islpci_dev.c linux-2.6.9-rc2msw/drivers/net/wireless/prism54/islpci_dev.c --- linux-2.6.9rc2/drivers/net/wireless/prism54/islpci_dev.c 2004-09-25 11:37:09.000000000 +0200 +++ linux-2.6.9-rc2msw/drivers/net/wireless/prism54/islpci_dev.c 2004-09-25 12:03:58.000000000 +0200 @@ -105,7 +105,7 @@ "%s: firmware '%s' size is not multiple of 32bit, aborting!\n", "prism54", priv->firmware); release_firmware(fw_entry); - return EILSEQ; /* Illegal byte sequence */; + return -EILSEQ; /* Illegal byte sequence */; } while (fw_len > 0) { @@ -142,6 +142,10 @@ BUG_ON(fw_len != 0); + /* Firmware version is at offset 40 (also for "newmac") */ + printk(KERN_DEBUG "%s: firmware version: %.8s\n", + priv->ndev->name, fw_entry->data + 40); + release_firmware(fw_entry); } --Boundary-00=_y8rXBnhfvfllDc6-- From margitsw@t-online.de Sat Oct 2 08:02:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 02 Oct 2004 08:02:16 -0700 (PDT) Received: from mailout06.sul.t-online.com (mailout06.sul.t-online.com [194.25.134.19]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i92F28F7010854 for ; Sat, 2 Oct 2004 08:02:09 -0700 Received: from fwd05.aul.t-online.de by mailout06.sul.t-online.com with smtp id 1CDlOT-0004Bj-00; Sat, 02 Oct 2004 17:01:53 +0200 Received: from roglap.local (GuEkgvZYgeYOrWw2ME6psZQZtjo2Xa5PpxWtk-S9H2GyoBQO7EqYw3@[80.128.222.170]) by fwd05.sul.t-online.com with esmtp id 1CDlOH-01UwWu0; Sat, 2 Oct 2004 17:01:41 +0200 From: margitsw@t-online.de (Margit Schubert-While) To: jgarzik@pobox.com Subject: [PATCH 4/4 linux-2.6.9-rc3/linux-2.4.28-pre3] prism54 bug initialization/mgt_commit Date: Sat, 2 Oct 2004 16:48:17 +0200 User-Agent: KMail/1.5.4 Cc: netdev@oss.sgi.com, prism54-devel@prism54.org MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_x+rXBVB5F4FxvYp" Message-Id: <200410021648.17552.margitsw@t-online.de> X-ID: GuEkgvZYgeYOrWw2ME6psZQZtjo2Xa5PpxWtk-S9H2GyoBQO7EqYw3 X-TOI-MSGID: 721ad578-3b1a-4954-97da-89ae23940950 X-archive-position: 9806 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: margitsw@t-online.de Precedence: bulk X-list: netdev --Boundary-00=_x+rXBVB5F4FxvYp Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline 2004-10-02 Margit Schubert-While * 04_mgtcommit.patch * Change mgt_commit from void to int * (and pass a return code) * We call this from device initialization, * therefore we need to know that it has succeeded * If it hasn't, we do not have a working device and * should pass a non-zero value upwards Margit --Boundary-00=_x+rXBVB5F4FxvYp Content-Type: text/x-diff; charset="us-ascii"; name="04_mgtcommit.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="04_mgtcommit.patch" diff -Naur linux-2.6.9rc2/drivers/net/wireless/prism54/isl_ioctl.c linux-2.6.9-rc2msw/drivers/net/wireless/prism54/isl_ioctl.c --- linux-2.6.9rc2/drivers/net/wireless/prism54/isl_ioctl.c 2004-10-02 12:23:39.000000000 +0200 +++ linux-2.6.9-rc2msw/drivers/net/wireless/prism54/isl_ioctl.c 2004-10-02 15:09:25.000000000 +0200 @@ -340,7 +340,10 @@ mgt_set(priv, DOT11_OID_MLMEAUTOLEVEL, &mlmeautolevel); - mgt_commit(priv); + if (mgt_commit(priv)) { + up_write(&priv->mib_sem); + return -EIO; + } priv->ndev->type = (priv->iw_mode == IW_MODE_MONITOR) ? priv->monitor_type : ARPHRD_ETHER; up_write(&priv->mib_sem); @@ -1401,7 +1404,10 @@ mlmeautolevel = DOT11_MLME_EXTENDED; mgt_set(priv, DOT11_OID_MLMEAUTOLEVEL, &mlmeautolevel); /* restart the card with our new policy */ - mgt_commit(priv); + if (mgt_commit(priv)) { + up_write(&priv->mib_sem); + return -EIO; + } up_write(&priv->mib_sem); return 0; diff -Naur linux-2.6.9rc2/drivers/net/wireless/prism54/islpci_dev.c linux-2.6.9-rc2msw/drivers/net/wireless/prism54/islpci_dev.c --- linux-2.6.9rc2/drivers/net/wireless/prism54/islpci_dev.c 2004-10-02 12:31:55.000000000 +0200 +++ linux-2.6.9-rc2msw/drivers/net/wireless/prism54/islpci_dev.c 2004-10-02 15:04:56.000000000 +0200 @@ -522,7 +522,12 @@ isl38xx_enable_common_interrupts(priv->device_base); down_write(&priv->mib_sem); - mgt_commit(priv); + result = mgt_commit(priv); + if (result) { + printk(KERN_ERR "%s: interface reset failure\n", priv->ndev->name); + up_write(&priv->mib_sem); + return result; + } up_write(&priv->mib_sem); islpci_set_state(priv, PRV_STATE_READY); diff -Naur linux-2.6.9rc2/drivers/net/wireless/prism54/oid_mgt.c linux-2.6.9-rc2msw/drivers/net/wireless/prism54/oid_mgt.c --- linux-2.6.9rc2/drivers/net/wireless/prism54/oid_mgt.c 2004-10-02 12:23:40.000000000 +0200 +++ linux-2.6.9-rc2msw/drivers/net/wireless/prism54/oid_mgt.c 2004-10-02 15:01:21.000000000 +0200 @@ -697,14 +697,14 @@ #define VEC_SIZE(a) (sizeof(a)/sizeof(a[0])) -void +int mgt_commit(islpci_private *priv) { int rvalue; u32 u; if (islpci_get_state(priv) < PRV_STATE_INIT) - return; + return 0; rvalue = mgt_commit_list(priv, commit_part1, VEC_SIZE(commit_part1)); @@ -720,6 +720,7 @@ incoherent state. We should reset it ! */ printk(KERN_DEBUG "%s: mgt_commit: failure\n", priv->ndev->name); } + return rvalue; } /* The following OIDs need to be "unlatched": diff -Naur linux-2.6.9rc2/drivers/net/wireless/prism54/oid_mgt.h linux-2.6.9-rc2msw/drivers/net/wireless/prism54/oid_mgt.h --- linux-2.6.9rc2/drivers/net/wireless/prism54/oid_mgt.h 2004-10-02 12:23:39.000000000 +0200 +++ linux-2.6.9-rc2msw/drivers/net/wireless/prism54/oid_mgt.h 2004-10-02 15:01:41.000000000 +0200 @@ -48,7 +48,7 @@ void mgt_get(islpci_private *, enum oid_num_t, void *); -void mgt_commit(islpci_private *); +int mgt_commit(islpci_private *); void mgt_unlatch_all(islpci_private *); int mgt_mlme_answer(islpci_private *); --Boundary-00=_x+rXBVB5F4FxvYp-- From olh@suse.de Sat Oct 2 08:31:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 02 Oct 2004 08:31:46 -0700 (PDT) Received: from Cantor.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i92FVeJH014672 for ; Sat, 2 Oct 2004 08:31:40 -0700 Received: from hermes.suse.de (hermes-ext.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 6F24DCBDB8B; Sat, 2 Oct 2004 17:30:53 +0200 (CEST) Date: Sat, 2 Oct 2004 17:30:53 +0200 From: Olaf Hering To: Andi Kleen Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] allow CONFIG_NET=n on ppc64 Message-ID: <20041002153053.GA2643@suse.de> References: <20040929200158.GA16366@suse.de> <20040929201524.GA14615@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20040929201524.GA14615@wotan.suse.de> X-DOS: I got your 640K Real Mode Right Here Buddy! X-Homeland-Security: You are not supposed to read this line! You are a terrorist! User-Agent: Mutt und vi sind doch schneller als Notes (und GroupWise) X-archive-position: 9807 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: olh@suse.de Precedence: bulk X-list: netdev On Wed, Sep 29, Andi Kleen wrote: > On Wed, Sep 29, 2004 at 10:01:58PM +0200, Olaf Hering wrote: > > > > The attached minimal config does not compile on ppc64. > > I was able to boot the resulting binary with this patch. > Right fix is to declare compat_sys_socketcall as as cond_syscall() > in sys.c ok. Signed-off-by: Olaf Hering diff -purNX /suse/olh/kernel/kernel_exclude.txt linux-2.6.9-rc3-bk2/include/net/sock.h linux-2.6.9-rc3-bk2.nonet/include/net/sock.h --- linux-2.6.9-rc3-bk2/include/net/sock.h 2004-09-30 05:05:21.000000000 +0200 +++ linux-2.6.9-rc3-bk2.nonet/include/net/sock.h 2004-10-02 17:24:23.666152810 +0200 @@ -1336,6 +1336,13 @@ static inline void sock_valbool_flag(str extern __u32 sysctl_wmem_max; extern __u32 sysctl_rmem_max; +#ifdef CONFIG_NET int siocdevprivate_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg); +#else +static inline int siocdevprivate_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) +{ + return -ENODEV; +} +#endif #endif /* _SOCK_H */ diff -purNX /suse/olh/kernel/kernel_exclude.txt linux-2.6.9-rc3-bk2/kernel/sys.c linux-2.6.9-rc3-bk2.nonet/kernel/sys.c --- linux-2.6.9-rc3-bk2/kernel/sys.c 2004-09-30 05:03:55.000000000 +0200 +++ linux-2.6.9-rc3-bk2.nonet/kernel/sys.c 2004-10-02 17:05:49.589116448 +0200 @@ -282,6 +282,7 @@ cond_syscall(compat_set_mempolicy) cond_syscall(sys_pciconfig_read) cond_syscall(sys_pciconfig_write) cond_syscall(sys_pciconfig_iobase) +cond_syscall(compat_sys_socketcall) static int set_one_prio(struct task_struct *p, int niceval, int error) { -- USB is for mice, FireWire is for men! sUse lINUX ag, nÜRNBERG From laforge@gnumonks.org Sat Oct 2 09:21:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 02 Oct 2004 09:22:20 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i92GLbLj015634 for ; Sat, 2 Oct 2004 09:21:38 -0700 Received: from dsl-082-082-095-114.arcor-ip.net ([82.82.95.114] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1CDmdO-0001kO-DN; Sat, 02 Oct 2004 18:21:22 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1CDmdM-0008CS-SK; Sat, 02 Oct 2004 18:21:20 +0200 Date: Sat, 2 Oct 2004 18:21:20 +0200 From: Harald Welte To: Linux Netdev List Cc: David Miller , Robert Olsson , Stephen Hemminger Subject: lnstat (rtstat replacement) Message-ID: <20041002162120.GT27499@sunbeam.de.gnumonks.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QHhm1I6mwQR20oIa" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040907i X-archive-position: 9808 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@gnumonks.org Precedence: bulk X-list: netdev --QHhm1I6mwQR20oIa Content-Type: multipart/mixed; boundary="IUSVF+LtaR4kWxuH" Content-Disposition: inline --IUSVF+LtaR4kWxuH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! I've finished my work on 'lnstat'. The current development version is available from http://svn.gnumonks.org/cgi-bin/viewcvs.cgi/trunk/lnstat/ where you can select the 'download tarball' option. I've added and tested support for old kernels, where it tries to fall back to rtstat compatibility mode via /proc/net/rt_cache_stat. README attached to this email. Robert: I hope you're fine with the new lnstat tool replacing rtstat. Stephen: Feel free to grab the current version and add it to the next iproute2 release. Please send any changes you integrate back upstream to me, so I can merge them into my repository. Dave: I've also attached a small patch for Documentation/networking. Please add this to the same patchset that includes /proc/net/stat support. Everyone: If you have suggestions/comments/feature requests, feel free to tell me.=20 Thanks! --=20 - Harald Welte http://www.gnumonks.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D Programming is like sex: One mistake and you have to support it your lifeti= me --IUSVF+LtaR4kWxuH Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="laforge-neighstat-doc.patch" Content-Transfer-Encoding: quoted-printable Index: linux-2.6.9-rc2-bk9-neigh1/Documentation/networking/statistics.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ linux-2.6.9-rc2-bk9-neigh1/Documentation/networking/statistics.txt 2004= -10-02 18:15:23.485872616 +0200 @@ -0,0 +1,40 @@ +Statistics exported via /proc/net/stat - Added in 2.6.9 +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +(C) 2004 by Harald Welte + +/proc/net/stat is a generalized replacement for /proc/net/rt_cache_stat. + +In addition to routing cache statistics, it supports any kind of statistics +the linux kernel exports via a file in /proc/net/stat. In a stock 2.6.9 +kernel, this is=20 + per-protocol neighbour cache statistics=20 + (ipv4, ipv6, atm, decnet) + routing cache statistics + (ipv4) + connection tracking statistics + (ipv4) + + +In order to get a convenient reading of those statistics, a tool called +'lnstat' is provided at http://svn.gnumonks.org/trunk/lnstat + +This tool is to be integrated in the next release of the iproute2 program. + + +If you want to add your own kernel statistics to /proc/net/stat, the file = has +to have the following properties: + +0) Field seperator is always one or two spaces. No tabs, etc. + +1) First line consists out of a template of field names. This is usually = the + structure member names of the statistics structure you want to dump + +2) All following lines consists of unsigned hexadecimal values. One line p= er + available CPU. Only as many fields as specified in template line. + +3) Please test if it works with the 'lnstat' tool before submitting a patch + to the kernel. + +Any questions should be directed to netdev@lists.oss.sgi.com or to the aut= hor +of this document. + --IUSVF+LtaR4kWxuH Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=README Content-Transfer-Encoding: quoted-printable lnstat - linux networking statistics (C) 2004 Harald Welte ; Sat, 2 Oct 2004 09:52:21 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 821EF47323; Sat, 2 Oct 2004 13:52:03 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id B594D47438 for ; Sat, 2 Oct 2004 13:52:02 -0300 (BRT) Received: (qmail 24342 invoked by uid 0); 2 Oct 2004 17:49:00 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 2 Oct 2004 17:49:00 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id D9FF414639; Sat, 2 Oct 2004 13:55:05 -0300 (BRT) Message-ID: <415EDD0C.9080507@conectiva.com.br> Date: Sat, 02 Oct 2004 13:53:32 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH] introduce eth_hdr(skb) X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------050506010401080500020506" X-Bogosity: No, tests=bogofilter, spamicity=0.485458, version=0.16.3 X-archive-position: 9809 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 This is a multi-part message in MIME format. --------------050506010401080500020506 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit David, I'm chunking that sk_buff cleaning up big patch into very easily reviewable changesets, starting with the areas that are more quiet these days, please consider pulling from: bk://kernel.bkbits.net/acme/sk_buff-2.6 Now there is just this outstanding changeset there, next ones will deal with skb->mac.raw. This is a freshly cloned tree from Linus, that I checked to be in sync with bk://kernel.bkbits.net/davem/net-2.6 Best Regards, - Arnaldo --------------050506010401080500020506 Content-Type: text/plain; name="eth_hdr.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="eth_hdr.patch" =================================================================== ChangeSet@1.2030, 2004-10-02 13:42:59-03:00, acme@conectiva.com.br [SKBUFF] introduce eth_hdr(skb) This is the start of a series of patches to remove protocol specific stuff out of include/linux/skbuff.h and to make the struct sk_buff header pointers private, i.e. they will only be accessible thru foo_hdr(skb) and some other accessor functions. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller drivers/isdn/i4l/isdn_net.c | 2 +- drivers/media/dvb/dvb-core/dvb_net.c | 2 +- drivers/net/bonding/bond_alb.c | 2 +- drivers/net/ioc3-eth.c | 4 ++-- drivers/net/myri_sbus.c | 2 +- drivers/net/plip.c | 2 +- drivers/net/pppoe.c | 4 ++-- drivers/s390/net/qeth_main.c | 2 +- include/linux/if_ether.h | 12 ++++++++++-- include/linux/if_vlan.h | 10 ++++++++-- include/linux/netfilter_bridge/ebt_802_3.h | 9 +++++++++ include/linux/skbuff.h | 1 - net/8021q/vlan_dev.c | 2 +- net/atm/br2684.c | 2 +- net/bridge/br_input.c | 10 +++++----- net/bridge/br_netfilter.c | 18 ++++++++---------- net/bridge/netfilter/ebt_802_3.c | 2 +- net/bridge/netfilter/ebt_among.c | 12 ++++++------ net/bridge/netfilter/ebt_dnat.c | 3 +-- net/bridge/netfilter/ebt_log.c | 12 ++++++------ net/bridge/netfilter/ebt_redirect.c | 7 +++---- net/bridge/netfilter/ebt_snat.c | 3 +-- net/bridge/netfilter/ebtables.c | 2 +- net/core/dv.c | 4 ++-- net/core/netpoll.c | 2 +- net/decnet/dn_neigh.c | 4 ++-- net/ethernet/eth.c | 4 ++-- net/ipv4/netfilter/ipt_mac.c | 2 +- net/ipv6/netfilter/ip6t_eui64.c | 6 +++--- net/ipv6/netfilter/ip6t_mac.c | 2 +- 30 files changed, 83 insertions(+), 66 deletions(-) diff -Nru a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c --- a/drivers/isdn/i4l/isdn_net.c 2004-10-02 13:44:26 -03:00 +++ b/drivers/isdn/i4l/isdn_net.c 2004-10-02 13:44:26 -03:00 @@ -1369,7 +1369,7 @@ skb->mac.raw = skb->data; skb_pull(skb, ETH_HLEN); - eth = skb->mac.ethernet; + eth = eth_hdr(skb); if (*eth->h_dest & 1) { if (memcmp(eth->h_dest, dev->broadcast, ETH_ALEN) == 0) diff -Nru a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c --- a/drivers/media/dvb/dvb-core/dvb_net.c 2004-10-02 13:44:26 -03:00 +++ b/drivers/media/dvb/dvb-core/dvb_net.c 2004-10-02 13:44:26 -03:00 @@ -142,7 +142,7 @@ skb->mac.raw=skb->data; skb_pull(skb,dev->hard_header_len); - eth= skb->mac.ethernet; + eth = eth_hdr(skb); if (*eth->h_dest & 1) { if(memcmp(eth->h_dest,dev->broadcast, ETH_ALEN)==0) diff -Nru a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c --- a/drivers/net/bonding/bond_alb.c 2004-10-02 13:44:26 -03:00 +++ b/drivers/net/bonding/bond_alb.c 2004-10-02 13:44:26 -03:00 @@ -1285,7 +1285,7 @@ int res = 1; skb->mac.raw = (unsigned char *)skb->data; - eth_data = (struct ethhdr *)skb->data; + eth_data = eth_hdr(skb); /* make sure that the curr_active_slave and the slaves list do * not change during tx diff -Nru a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c --- a/drivers/net/ioc3-eth.c 2004-10-02 13:44:26 -03:00 +++ b/drivers/net/ioc3-eth.c 2004-10-02 13:44:26 -03:00 @@ -506,7 +506,7 @@ static void ioc3_tcpudp_checksum(struct sk_buff *skb, uint32_t hwsum, int len) { - struct ethhdr *eh = skb->mac.ethernet; + struct ethhdr *eh = eth_hdr(skb); uint32_t csum, ehsum; unsigned int proto; struct iphdr *ih; @@ -1333,7 +1333,7 @@ uint32_t csum, ehsum; uint16_t *eh; - /* The MAC header. skb->mac.ethernet seem the logic approach + /* The MAC header. skb->mac seem the logic approach to find the MAC header - except it's a NULL pointer ... */ eh = (uint16_t *) skb->data; diff -Nru a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c --- a/drivers/net/myri_sbus.c 2004-10-02 13:44:26 -03:00 +++ b/drivers/net/myri_sbus.c 2004-10-02 13:44:26 -03:00 @@ -376,7 +376,7 @@ skb->mac.raw = (((unsigned char *)skb->data) + MYRI_PAD_LEN); skb_pull(skb, dev->hard_header_len); - eth = skb->mac.ethernet; + eth = eth_hdr(skb); #ifdef DEBUG_HEADER DHDR(("myri_type_trans: ")); diff -Nru a/drivers/net/plip.c b/drivers/net/plip.c --- a/drivers/net/plip.c 2004-10-02 13:44:26 -03:00 +++ b/drivers/net/plip.c 2004-10-02 13:44:26 -03:00 @@ -547,7 +547,7 @@ skb->mac.raw=skb->data; skb_pull(skb,dev->hard_header_len); - eth= skb->mac.ethernet; + eth = eth_hdr(skb); if(*eth->h_dest&1) { diff -Nru a/drivers/net/pppoe.c b/drivers/net/pppoe.c --- a/drivers/net/pppoe.c 2004-10-02 13:44:26 -03:00 +++ b/drivers/net/pppoe.c 2004-10-02 13:44:26 -03:00 @@ -391,7 +391,7 @@ ph = (struct pppoe_hdr *) skb->nh.raw; - po = get_item((unsigned long) ph->sid, skb->mac.ethernet->h_source); + po = get_item((unsigned long) ph->sid, eth_hdr(skb)->h_source); if (!po) goto drop; @@ -440,7 +440,7 @@ if (ph->code != PADT_CODE) goto abort; - po = get_item((unsigned long) ph->sid, skb->mac.ethernet->h_source); + po = get_item((unsigned long) ph->sid, eth_hdr(skb)->h_source); if (po) { struct sock *sk = po->sk; diff -Nru a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c --- a/drivers/s390/net/qeth_main.c 2004-10-02 13:44:26 -03:00 +++ b/drivers/s390/net/qeth_main.c 2004-10-02 13:44:26 -03:00 @@ -2148,7 +2148,7 @@ skb->mac.raw = skb->data; skb_pull(skb, ETH_ALEN * 2 + sizeof (short)); - eth = skb->mac.ethernet; + eth = eth_hdr(skb); if (*eth->h_dest & 1) { if (memcmp(eth->h_dest, dev->broadcast, ETH_ALEN) == 0) diff -Nru a/include/linux/if_ether.h b/include/linux/if_ether.h --- a/include/linux/if_ether.h 2004-10-02 13:44:26 -03:00 +++ b/include/linux/if_ether.h 2004-10-02 13:44:26 -03:00 @@ -96,11 +96,19 @@ * This is an Ethernet frame header. */ -struct ethhdr -{ +struct ethhdr { unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ unsigned char h_source[ETH_ALEN]; /* source ether addr */ unsigned short h_proto; /* packet type ID field */ } __attribute__((packed)); + +#ifdef __KERNEL__ +#include + +static inline struct ethhdr *eth_hdr(const struct sk_buff *skb) +{ + return (struct ethhdr *)skb->mac.raw; +} +#endif #endif /* _LINUX_IF_ETHER_H */ diff -Nru a/include/linux/if_vlan.h b/include/linux/if_vlan.h --- a/include/linux/if_vlan.h 2004-10-02 13:44:26 -03:00 +++ b/include/linux/if_vlan.h 2004-10-02 13:44:26 -03:00 @@ -18,7 +18,6 @@ /* externally defined structs */ struct vlan_group; struct net_device; -struct sk_buff; struct packet_type; struct vlan_collection; struct vlan_dev_info; @@ -48,6 +47,13 @@ unsigned short h_vlan_encapsulated_proto; /* packet type ID field (or len) */ }; +#include + +static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb) +{ + return (struct vlan_ethhdr *)skb->mac.raw; +} + struct vlan_hdr { unsigned short h_vlan_TCI; /* Encapsulates priority and VLAN ID */ unsigned short h_vlan_encapsulated_proto; /* packet type ID field (or len) */ @@ -180,7 +186,7 @@ * This allows the VLAN to have a different MAC than the underlying * device, and still route correctly. */ - if (!memcmp(skb->mac.ethernet->h_dest, skb->dev->dev_addr, ETH_ALEN)) + if (!memcmp(eth_hdr(skb)->h_dest, skb->dev->dev_addr, ETH_ALEN)) skb->pkt_type = PACKET_HOST; break; }; diff -Nru a/include/linux/netfilter_bridge/ebt_802_3.h b/include/linux/netfilter_bridge/ebt_802_3.h --- a/include/linux/netfilter_bridge/ebt_802_3.h 2004-10-02 13:44:26 -03:00 +++ b/include/linux/netfilter_bridge/ebt_802_3.h 2004-10-02 13:44:26 -03:00 @@ -49,6 +49,15 @@ } llc; }; +#ifdef __KERNEL__ +#include + +static inline struct ebt_802_3_hdr *ebt_802_3_hdr(const struct sk_buff *skb) +{ + return (struct ebt_802_3_hdr *)skb->mac.raw; +} +#endif + struct ebt_802_3_info { uint8_t sap; diff -Nru a/include/linux/skbuff.h b/include/linux/skbuff.h --- a/include/linux/skbuff.h 2004-10-02 13:44:26 -03:00 +++ b/include/linux/skbuff.h 2004-10-02 13:44:26 -03:00 @@ -219,7 +219,6 @@ } nh; union { - struct ethhdr *ethernet; unsigned char *raw; } mac; diff -Nru a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c --- a/net/8021q/vlan_dev.c 2004-10-02 13:44:26 -03:00 +++ b/net/8021q/vlan_dev.c 2004-10-02 13:44:26 -03:00 @@ -211,7 +211,7 @@ * This allows the VLAN to have a different MAC than the underlying * device, and still route correctly. */ - if (memcmp(skb->mac.ethernet->h_dest, skb->dev->dev_addr, ETH_ALEN) == 0) { + if (memcmp(eth_hdr(skb)->h_dest, skb->dev->dev_addr, ETH_ALEN) == 0) { /* It is for our (changed) MAC-address! */ skb->pkt_type = PACKET_HOST; } diff -Nru a/net/atm/br2684.c b/net/atm/br2684.c --- a/net/atm/br2684.c 2004-10-02 13:44:26 -03:00 +++ b/net/atm/br2684.c 2004-10-02 13:44:26 -03:00 @@ -294,7 +294,7 @@ { struct ethhdr *eth; unsigned char *rawp; - eth = skb->mac.ethernet; + eth = eth_hdr(skb); if (*eth->h_dest & 1) { if (memcmp(eth->h_dest, dev->broadcast, ETH_ALEN) == 0) diff -Nru a/net/bridge/br_input.c b/net/bridge/br_input.c --- a/net/bridge/br_input.c 2004-10-02 13:44:26 -03:00 +++ b/net/bridge/br_input.c 2004-10-02 13:44:26 -03:00 @@ -48,7 +48,7 @@ /* note: already called with rcu_read_lock (preempt_disabled) */ int br_handle_frame_finish(struct sk_buff *skb) { - const unsigned char *dest = skb->mac.ethernet->h_dest; + const unsigned char *dest = eth_hdr(skb)->h_dest; struct net_bridge_port *p = skb->dev->br_port; struct net_bridge *br = p->br; struct net_bridge_fdb_entry *dst; @@ -100,17 +100,17 @@ int br_handle_frame(struct net_bridge_port *p, struct sk_buff **pskb) { struct sk_buff *skb = *pskb; - const unsigned char *dest = skb->mac.ethernet->h_dest; + const unsigned char *dest = eth_hdr(skb)->h_dest; if (p->state == BR_STATE_DISABLED) goto err; - if (skb->mac.ethernet->h_source[0] & 1) + if (eth_hdr(skb)->h_source[0] & 1) goto err; if (p->state == BR_STATE_LEARNING || p->state == BR_STATE_FORWARDING) - br_fdb_insert(p->br, p, skb->mac.ethernet->h_source, 0); + br_fdb_insert(p->br, p, eth_hdr(skb)->h_source, 0); if (p->br->stp_enabled && !memcmp(dest, bridge_ula, 5) && @@ -127,7 +127,7 @@ if (br_should_route_hook(pskb)) return 0; skb = *pskb; - dest = skb->mac.ethernet->h_dest; + dest = eth_hdr(skb)->h_dest; } if (!memcmp(p->br->dev->dev_addr, dest, ETH_ALEN)) diff -Nru a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c --- a/net/bridge/br_netfilter.c 2004-10-02 13:44:26 -03:00 +++ b/net/bridge/br_netfilter.c 2004-10-02 13:44:26 -03:00 @@ -255,7 +255,7 @@ 1); return 0; } - memcpy(skb->mac.ethernet->h_dest, dev->dev_addr, + memcpy(eth_hdr(skb)->h_dest, dev->dev_addr, ETH_ALEN); skb->pkt_type = PACKET_HOST; } @@ -412,8 +412,7 @@ __u32 len; struct sk_buff *skb = *pskb; struct nf_bridge_info *nf_bridge; - struct vlan_ethhdr *hdr = (struct vlan_ethhdr *) - ((*pskb)->mac.ethernet); + struct vlan_ethhdr *hdr = vlan_eth_hdr(*pskb); if (skb->protocol == __constant_htons(ETH_P_IPV6) || IS_VLAN_IPV6) { #ifdef CONFIG_SYSCTL @@ -516,7 +515,7 @@ { struct nf_bridge_info *nf_bridge = skb->nf_bridge; struct net_device *in; - struct vlan_ethhdr *hdr = (struct vlan_ethhdr *)(skb->mac.ethernet); + struct vlan_ethhdr *hdr = vlan_eth_hdr(skb); #ifdef CONFIG_NETFILTER_DEBUG skb->nf_debug ^= (1 << NF_BR_FORWARD); @@ -551,7 +550,7 @@ { struct sk_buff *skb = *pskb; struct nf_bridge_info *nf_bridge; - struct vlan_ethhdr *hdr = (struct vlan_ethhdr *)(skb->mac.ethernet); + struct vlan_ethhdr *hdr = vlan_eth_hdr(skb); int pf; if (!skb->nf_bridge) @@ -591,7 +590,7 @@ int (*okfn)(struct sk_buff *)) { struct sk_buff *skb = *pskb; - struct vlan_ethhdr *hdr = (struct vlan_ethhdr *)(skb->mac.ethernet); + struct vlan_ethhdr *hdr = vlan_eth_hdr(skb); struct net_device **d = (struct net_device **)(skb->cb); #ifdef CONFIG_SYSCTL @@ -669,7 +668,7 @@ struct net_device *realindev, *realoutdev; struct sk_buff *skb = *pskb; struct nf_bridge_info *nf_bridge; - struct vlan_ethhdr *hdr = (struct vlan_ethhdr *)(skb->mac.ethernet); + struct vlan_ethhdr *hdr = vlan_eth_hdr(skb); int pf; if (!skb->nf_bridge) @@ -753,7 +752,7 @@ { struct sk_buff *skb = *pskb; struct nf_bridge_info *nf_bridge = (*pskb)->nf_bridge; - struct vlan_ethhdr *hdr = (struct vlan_ethhdr *)(skb->mac.ethernet); + struct vlan_ethhdr *hdr = vlan_eth_hdr(skb); struct net_device *realoutdev = bridge_parent(skb->dev); int pf; @@ -848,8 +847,7 @@ #ifdef CONFIG_SYSCTL if (!skb->nf_bridge) { - struct vlan_ethhdr *hdr = - (struct vlan_ethhdr *)(skb->mac.ethernet); + struct vlan_ethhdr *hdr = vlan_eth_hdr(skb); if (skb->protocol == __constant_htons(ETH_P_IP) || IS_VLAN_IP) { diff -Nru a/net/bridge/netfilter/ebt_802_3.c b/net/bridge/netfilter/ebt_802_3.c --- a/net/bridge/netfilter/ebt_802_3.c 2004-10-02 13:44:26 -03:00 +++ b/net/bridge/netfilter/ebt_802_3.c 2004-10-02 13:44:26 -03:00 @@ -16,7 +16,7 @@ const struct net_device *out, const void *data, unsigned int datalen) { struct ebt_802_3_info *info = (struct ebt_802_3_info *)data; - struct ebt_802_3_hdr *hdr = (struct ebt_802_3_hdr *)skb->mac.ethernet; + struct ebt_802_3_hdr *hdr = ebt_802_3_hdr(skb); uint16_t type = hdr->llc.ui.ctrl & IS_UI ? hdr->llc.ui.type : hdr->llc.ni.type; if (info->bitmask & EBT_802_3_SAP) { diff -Nru a/net/bridge/netfilter/ebt_among.c b/net/bridge/netfilter/ebt_among.c --- a/net/bridge/netfilter/ebt_among.c 2004-10-02 13:44:26 -03:00 +++ b/net/bridge/netfilter/ebt_among.c 2004-10-02 13:44:26 -03:00 @@ -72,14 +72,14 @@ static int get_ip_dst(const struct sk_buff *skb, uint32_t *addr) { - if (skb->mac.ethernet->h_proto == __constant_htons(ETH_P_IP)) { + if (eth_hdr(skb)->h_proto == htons(ETH_P_IP)) { struct iphdr _iph, *ih; ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph); if (ih == NULL) return -1; *addr = ih->daddr; - } else if (skb->mac.ethernet->h_proto == __constant_htons(ETH_P_ARP)) { + } else if (eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) { struct arphdr _arph, *ah; uint32_t buf, *bp; @@ -100,14 +100,14 @@ static int get_ip_src(const struct sk_buff *skb, uint32_t *addr) { - if (skb->mac.ethernet->h_proto == __constant_htons(ETH_P_IP)) { + if (eth_hdr(skb)->h_proto == htons(ETH_P_IP)) { struct iphdr _iph, *ih; ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph); if (ih == NULL) return -1; *addr = ih->saddr; - } else if (skb->mac.ethernet->h_proto == __constant_htons(ETH_P_ARP)) { + } else if (eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) { struct arphdr _arph, *ah; uint32_t buf, *bp; @@ -139,7 +139,7 @@ wh_src = ebt_among_wh_src(info); if (wh_src) { - smac = skb->mac.ethernet->h_source; + smac = eth_hdr(skb)->h_source; if (get_ip_src(skb, &sip)) return EBT_NOMATCH; if (!(info->bitmask & EBT_AMONG_SRC_NEG)) { @@ -154,7 +154,7 @@ } if (wh_dst) { - dmac = skb->mac.ethernet->h_dest; + dmac = eth_hdr(skb)->h_dest; if (get_ip_dst(skb, &dip)) return EBT_NOMATCH; if (!(info->bitmask & EBT_AMONG_DST_NEG)) { diff -Nru a/net/bridge/netfilter/ebt_dnat.c b/net/bridge/netfilter/ebt_dnat.c --- a/net/bridge/netfilter/ebt_dnat.c 2004-10-02 13:44:26 -03:00 +++ b/net/bridge/netfilter/ebt_dnat.c 2004-10-02 13:44:26 -03:00 @@ -30,8 +30,7 @@ kfree_skb(*pskb); *pskb = nskb; } - memcpy(((**pskb).mac.ethernet)->h_dest, info->mac, - ETH_ALEN * sizeof(unsigned char)); + memcpy(eth_hdr(*pskb)->h_dest, info->mac, ETH_ALEN); return info->target; } diff -Nru a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c --- a/net/bridge/netfilter/ebt_log.c 2004-10-02 13:44:26 -03:00 +++ b/net/bridge/netfilter/ebt_log.c 2004-10-02 13:44:26 -03:00 @@ -70,13 +70,13 @@ out ? out->name : ""); printk("MAC source = "); - print_MAC((skb->mac.ethernet)->h_source); + print_MAC(eth_hdr(skb)->h_source); printk("MAC dest = "); - print_MAC((skb->mac.ethernet)->h_dest); + print_MAC(eth_hdr(skb)->h_dest); - printk("proto = 0x%04x", ntohs(((*skb).mac.ethernet)->h_proto)); + printk("proto = 0x%04x", ntohs(eth_hdr(skb)->h_proto)); - if ((info->bitmask & EBT_LOG_IP) && skb->mac.ethernet->h_proto == + if ((info->bitmask & EBT_LOG_IP) && eth_hdr(skb)->h_proto == htons(ETH_P_IP)){ struct iphdr _iph, *ih; @@ -106,8 +106,8 @@ } if ((info->bitmask & EBT_LOG_ARP) && - ((skb->mac.ethernet->h_proto == __constant_htons(ETH_P_ARP)) || - (skb->mac.ethernet->h_proto == __constant_htons(ETH_P_RARP)))) { + ((eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) || + (eth_hdr(skb)->h_proto == htons(ETH_P_RARP)))) { struct arphdr _arph, *ah; ah = skb_header_pointer(skb, 0, sizeof(_arph), &_arph); diff -Nru a/net/bridge/netfilter/ebt_redirect.c b/net/bridge/netfilter/ebt_redirect.c --- a/net/bridge/netfilter/ebt_redirect.c 2004-10-02 13:44:26 -03:00 +++ b/net/bridge/netfilter/ebt_redirect.c 2004-10-02 13:44:26 -03:00 @@ -32,11 +32,10 @@ *pskb = nskb; } if (hooknr != NF_BR_BROUTING) - memcpy((**pskb).mac.ethernet->h_dest, - in->br_port->br->dev->dev_addr, ETH_ALEN); + memcpy(eth_hdr(*pskb)->h_dest, + in->br_port->br->dev->dev_addr, ETH_ALEN); else - memcpy((**pskb).mac.ethernet->h_dest, - in->dev_addr, ETH_ALEN); + memcpy(eth_hdr(*pskb)->h_dest, in->dev_addr, ETH_ALEN); (*pskb)->pkt_type = PACKET_HOST; return info->target; } diff -Nru a/net/bridge/netfilter/ebt_snat.c b/net/bridge/netfilter/ebt_snat.c --- a/net/bridge/netfilter/ebt_snat.c 2004-10-02 13:44:26 -03:00 +++ b/net/bridge/netfilter/ebt_snat.c 2004-10-02 13:44:26 -03:00 @@ -30,8 +30,7 @@ kfree_skb(*pskb); *pskb = nskb; } - memcpy(((**pskb).mac.ethernet)->h_source, info->mac, - ETH_ALEN * sizeof(unsigned char)); + memcpy(eth_hdr(*pskb)->h_source, info->mac, ETH_ALEN); return info->target; } diff -Nru a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c --- a/net/bridge/netfilter/ebtables.c 2004-10-02 13:44:26 -03:00 +++ b/net/bridge/netfilter/ebtables.c 2004-10-02 13:44:26 -03:00 @@ -190,7 +190,7 @@ base = private->entries; i = 0; while (i < nentries) { - if (ebt_basic_match(point, (**pskb).mac.ethernet, in, out)) + if (ebt_basic_match(point, eth_hdr(*pskb), in, out)) goto letscontinue; if (EBT_MATCH_ITERATE(point, ebt_do_match, *pskb, in, out) != 0) diff -Nru a/net/core/dv.c b/net/core/dv.c --- a/net/core/dv.c 2004-10-02 13:44:26 -03:00 +++ b/net/core/dv.c 2004-10-02 13:44:26 -03:00 @@ -450,12 +450,12 @@ */ #define ETH_DIVERT_FRAME(skb) \ - memcpy(skb->mac.ethernet, skb->dev->dev_addr, ETH_ALEN); \ + memcpy(eth_hdr(skb), skb->dev->dev_addr, ETH_ALEN); \ skb->pkt_type=PACKET_HOST void divert_frame(struct sk_buff *skb) { - struct ethhdr *eth = skb->mac.ethernet; + struct ethhdr *eth = eth_hdr(skb); struct iphdr *iph; struct tcphdr *tcph; struct udphdr *udph; diff -Nru a/net/core/netpoll.c b/net/core/netpoll.c --- a/net/core/netpoll.c 2004-10-02 13:44:26 -03:00 +++ b/net/core/netpoll.c 2004-10-02 13:44:26 -03:00 @@ -378,7 +378,7 @@ return 1; } - proto = ntohs(skb->mac.ethernet->h_proto); + proto = ntohs(eth_hdr(skb)->h_proto); if (proto != ETH_P_IP) goto out; if (skb->pkt_type == PACKET_OTHERHOST) diff -Nru a/net/decnet/dn_neigh.c b/net/decnet/dn_neigh.c --- a/net/decnet/dn_neigh.c 2004-10-02 13:44:26 -03:00 +++ b/net/decnet/dn_neigh.c 2004-10-02 13:44:26 -03:00 @@ -399,7 +399,7 @@ neigh->updated = jiffies; if (neigh->dev->type == ARPHRD_ETHER) - memcpy(neigh->ha, &skb->mac.ethernet->h_source, ETH_ALEN); + memcpy(neigh->ha, ð_hdr(skb)->h_source, ETH_ALEN); dn->blksize = dn_ntohs(msg->blksize); dn->priority = msg->priority; @@ -455,7 +455,7 @@ neigh->updated = jiffies; if (neigh->dev->type == ARPHRD_ETHER) - memcpy(neigh->ha, &skb->mac.ethernet->h_source, ETH_ALEN); + memcpy(neigh->ha, ð_hdr(skb)->h_source, ETH_ALEN); dn->flags &= ~(DN_NDFLAG_R1 | DN_NDFLAG_R2); dn->blksize = dn_ntohs(msg->blksize); dn->priority = 0; diff -Nru a/net/ethernet/eth.c b/net/ethernet/eth.c --- a/net/ethernet/eth.c 2004-10-02 13:44:26 -03:00 +++ b/net/ethernet/eth.c 2004-10-02 13:44:26 -03:00 @@ -163,7 +163,7 @@ skb->mac.raw=skb->data; skb_pull(skb,ETH_HLEN); - eth= skb->mac.ethernet; + eth = eth_hdr(skb); skb->input_dev = dev; if(*eth->h_dest&1) @@ -210,7 +210,7 @@ int eth_header_parse(struct sk_buff *skb, unsigned char *haddr) { - struct ethhdr *eth = skb->mac.ethernet; + struct ethhdr *eth = eth_hdr(skb); memcpy(haddr, eth->h_source, ETH_ALEN); return ETH_ALEN; } diff -Nru a/net/ipv4/netfilter/ipt_mac.c b/net/ipv4/netfilter/ipt_mac.c --- a/net/ipv4/netfilter/ipt_mac.c 2004-10-02 13:44:26 -03:00 +++ b/net/ipv4/netfilter/ipt_mac.c 2004-10-02 13:44:26 -03:00 @@ -33,7 +33,7 @@ return (skb->mac.raw >= skb->head && (skb->mac.raw + ETH_HLEN) <= skb->data /* If so, compare... */ - && ((memcmp(skb->mac.ethernet->h_source, info->srcaddr, ETH_ALEN) + && ((memcmp(eth_hdr(skb)->h_source, info->srcaddr, ETH_ALEN) == 0) ^ info->invert)); } diff -Nru a/net/ipv6/netfilter/ip6t_eui64.c b/net/ipv6/netfilter/ip6t_eui64.c --- a/net/ipv6/netfilter/ip6t_eui64.c 2004-10-02 13:44:26 -03:00 +++ b/net/ipv6/netfilter/ip6t_eui64.c 2004-10-02 13:44:26 -03:00 @@ -41,10 +41,10 @@ memset(eui64, 0, sizeof(eui64)); - if (skb->mac.ethernet->h_proto == ntohs(ETH_P_IPV6)) { + if (eth_hdr(skb)->h_proto == ntohs(ETH_P_IPV6)) { if (skb->nh.ipv6h->version == 0x6) { - memcpy(eui64, skb->mac.ethernet->h_source, 3); - memcpy(eui64 + 5, skb->mac.ethernet->h_source + 3, 3); + memcpy(eui64, eth_hdr(skb)->h_source, 3); + memcpy(eui64 + 5, eth_hdr(skb)->h_source + 3, 3); eui64[3]=0xff; eui64[4]=0xfe; eui64[0] |= 0x02; diff -Nru a/net/ipv6/netfilter/ip6t_mac.c b/net/ipv6/netfilter/ip6t_mac.c --- a/net/ipv6/netfilter/ip6t_mac.c 2004-10-02 13:44:26 -03:00 +++ b/net/ipv6/netfilter/ip6t_mac.c 2004-10-02 13:44:26 -03:00 @@ -35,7 +35,7 @@ return (skb->mac.raw >= skb->head && (skb->mac.raw + ETH_HLEN) <= skb->data /* If so, compare... */ - && ((memcmp(skb->mac.ethernet->h_source, info->srcaddr, ETH_ALEN) + && ((memcmp(eth_hdr(skb)->h_source, info->srcaddr, ETH_ALEN) == 0) ^ info->invert)); } --------------050506010401080500020506-- From joe@perches.com Sat Oct 2 10:18:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 02 Oct 2004 10:18:36 -0700 (PDT) Received: from Perches.com (DSL022.labridge.com [206.117.136.22]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i92HIVr4017511 for ; Sat, 2 Oct 2004 10:18:31 -0700 Received: from localhost (joe@localhost) by Perches.com (8.9.3/8.9.3) with ESMTP id LAA13113; Sat, 2 Oct 2004 11:01:35 -0700 Date: Sat, 2 Oct 2004 11:01:34 -0700 (PDT) From: Joe Perches To: Arnaldo Carvalho de Melo cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH] introduce eth_hdr(skb) In-Reply-To: <415EDD0C.9080507@conectiva.com.br> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 9811 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: joe@perches.com Precedence: bulk X-list: netdev Content-Length: 216 Lines: 8 - } else if (skb->mac.ethernet->h_proto == __constant_htons(ETH_P_ARP)) { + } else if (eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) { I believe the __constant_htons conversions to htons are incorrect. From acme@conectiva.com.br Sat Oct 2 10:21:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 02 Oct 2004 10:21:33 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i92HLRwA017874 for ; Sat, 2 Oct 2004 10:21:28 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id BBC7C47437; Sat, 2 Oct 2004 14:21:11 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 54FC9473EC for ; Sat, 2 Oct 2004 14:21:11 -0300 (BRT) Received: (qmail 26948 invoked by uid 0); 2 Oct 2004 18:18:09 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 2 Oct 2004 18:18:09 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id 23D3B14639; Sat, 2 Oct 2004 14:24:15 -0300 (BRT) Message-ID: <415EE3E1.7020806@conectiva.com.br> Date: Sat, 02 Oct 2004 14:22:41 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Joe Perches Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH] introduce eth_hdr(skb) References: In-Reply-To: X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Bogosity: No, tests=bogofilter, spamicity=0.028982, version=0.16.3 X-archive-position: 9812 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 Content-Length: 351 Lines: 14 Joe Perches wrote: > > - } else if (skb->mac.ethernet->h_proto == __constant_htons(ETH_P_ARP)) { > + } else if (eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) { > > I believe the __constant_htons conversions to htons are incorrect. No they aren't, look at the generated code for both variations when receiving a constant :-) - Arnaldo From joe@perches.com Sat Oct 2 11:01:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 02 Oct 2004 11:02:02 -0700 (PDT) Received: from Perches.com (DSL022.labridge.com [206.117.136.22]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i92I1vEv018600 for ; Sat, 2 Oct 2004 11:01:57 -0700 Received: from localhost (joe@localhost) by Perches.com (8.9.3/8.9.3) with ESMTP id LAA13225; Sat, 2 Oct 2004 11:40:19 -0700 Date: Sat, 2 Oct 2004 11:40:19 -0700 (PDT) From: Joe Perches To: Arnaldo Carvalho de Melo cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH] introduce eth_hdr(skb) In-Reply-To: <415EE3E1.7020806@conectiva.com.br> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 9813 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: joe@perches.com Precedence: bulk X-list: netdev Content-Length: 543 Lines: 16 On Sat, 2 Oct 2004, Arnaldo Carvalho de Melo wrote: > Joe Perches wrote: > > > > - } else if (skb->mac.ethernet->h_proto == __constant_htons(ETH_P_ARP)) { > > + } else if (eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) { > > > > I believe the __constant_htons conversions to htons are incorrect. > > No they aren't, look at the generated code for both variations when > receiving a constant :-) Perhaps, but if you are going to change some, shouldn't you instead change all the similar net/bridge uses in a different changset? From acme@conectiva.com.br Sat Oct 2 11:09:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 02 Oct 2004 11:09:22 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i92I98QS018978 for ; Sat, 2 Oct 2004 11:09:09 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 8A7A147446; Sat, 2 Oct 2004 15:08:55 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 42BD247432 for ; Sat, 2 Oct 2004 15:08:55 -0300 (BRT) Received: (qmail 30761 invoked by uid 0); 2 Oct 2004 19:05:53 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 2 Oct 2004 19:05:53 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id 2CC9414639; Sat, 2 Oct 2004 15:11:59 -0300 (BRT) Message-ID: <415EEF12.2050105@conectiva.com.br> Date: Sat, 02 Oct 2004 15:10:26 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Joe Perches Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH] introduce eth_hdr(skb) References: In-Reply-To: X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Bogosity: No, tests=bogofilter, spamicity=0.065946, version=0.16.3 X-archive-position: 9814 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 Content-Length: 687 Lines: 24 Joe Perches wrote: > > On Sat, 2 Oct 2004, Arnaldo Carvalho de Melo wrote: > >>Joe Perches wrote: >> >>>- } else if (skb->mac.ethernet->h_proto == __constant_htons(ETH_P_ARP)) { >>>+ } else if (eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) { >>> >>>I believe the __constant_htons conversions to htons are incorrect. >> >>No they aren't, look at the generated code for both variations when >>receiving a constant :-) > > > Perhaps, but if you are going to change some, shouldn't you instead > change all the similar net/bridge uses in a different changset? I'm touching just the ones that are in lines changed by this changeset, a later patch can finish this. - Arnaldo From manfred@colorfullife.com Sat Oct 2 11:19:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 02 Oct 2004 11:19:55 -0700 (PDT) Received: from dbl.q-ag.de (dbl.q-ag.de [213.172.117.3]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i92IJmMq019465 for ; Sat, 2 Oct 2004 11:19:50 -0700 Received: from [127.0.0.2] (dbl [127.0.0.1]) by dbl.q-ag.de (8.12.3/8.12.3/Debian-6.6) with ESMTP id i92IJW8L005708; Sat, 2 Oct 2004 20:19:33 +0200 Message-ID: <415EEF0E.3080808@colorfullife.com> Date: Sat, 02 Oct 2004 20:10:22 +0200 From: Manfred Spraul User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" CC: Netdev Subject: [PATCH] fix secure tcp sequence number generation Content-Type: multipart/mixed; boundary="------------020503080807000603060306" X-archive-position: 9815 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: manfred@colorfullife.com Precedence: bulk X-list: netdev Content-Length: 5972 Lines: 194 This is a multi-part message in MIME format. --------------020503080807000603060306 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi Dave, Ted's recent random.c update broke the periodic rekeying: schedule_work() doesn't provide synchronization. Additionally the first syn values after boot are generated with secret 0 - not good. Attached is a big cleanup. Linus asked me to send to to you for merging: Description: The tcp sequence number generator needs a random seed that is reset every few minutes. Since the sequence numbers should be constantly increasing, for each rekey 2^24 is added to the sequence number. The actual use of the sequence number generator is lockless, synchronization is achieved by having two copies of the control structure. The attached patch: - fixes a race in rekey_seq_generator(): schedule_work doesn't provide synchronization. - Uses schedule_delayed_work() for the rekey: simplifies synchronization and speeds up the hot path. - replaces do_gettimeofday with get_seconds(): get_seconds is faster and usec resolution is not required. - removes tmpdata - not needed with new locking. - Adds a late_initcall for the first initialization after boot. init_call would be too early, I've checked that the late_initcall runs before net/ipv4/ipconfig.c, i.e. the BOOTP/DHCP autoconfiguration. Signed-Off-By: Manfred Spraul --------------020503080807000603060306 Content-Type: text/plain; name="patch-random-cleanup" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-random-cleanup" --- 2.6/drivers/char/random.c 2004-10-02 19:30:18.583688301 +0200 +++ build-2.6/drivers/char/random.c 2004-10-02 19:09:54.288451293 +0200 @@ -2184,7 +2184,7 @@ #undef K3 /* This should not be decreased so low that ISNs wrap too fast. */ -#define REKEY_INTERVAL 300 +#define REKEY_INTERVAL (300*HZ) /* * Bit layout of the tcp sequence numbers (before adding current time): * bit 24-31: increased after every key exchange @@ -2210,49 +2210,55 @@ #define HASH_MASK ( (1<rekey_time = tv.tv_sec; - memcpy(keyptr->secret, tmp.secret, sizeof(keyptr->secret)); + get_random_bytes(keyptr->secret, sizeof(keyptr->secret)); keyptr->count = (ip_cnt&COUNT_MASK)<rekey_time || (time - keyptr->rekey_time) > REKEY_INTERVAL) { - schedule_work(&rekey_work); - } + smp_rmb(); return keyptr; } +static __init int seqgen_init(void) +{ + rekey_seq_generator(NULL); + return 0; +} +late_initcall(seqgen_init); + #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) __u32 secure_tcpv6_sequence_number(__u32 *saddr, __u32 *daddr, __u16 sport, __u16 dport) @@ -2260,14 +2266,12 @@ struct timeval tv; __u32 seq; __u32 hash[12]; - struct keydata *keyptr; + struct keydata *keyptr = get_keyptr(); /* The procedure is the same as for IPv4, but addresses are longer. * Thus we must use twothirdsMD4Transform. */ - do_gettimeofday(&tv); /* We need the usecs below... */ - keyptr = check_and_rekey(tv.tv_sec); memcpy(hash, saddr, 16); hash[4]=(sport << 16) + dport; @@ -2275,6 +2279,8 @@ seq = twothirdsMD4Transform(daddr, hash) & HASH_MASK; seq += keyptr->count; + + do_gettimeofday(&tv); seq += tv.tv_usec + tv.tv_sec*1000000; return seq; @@ -2288,13 +2294,7 @@ struct timeval tv; __u32 seq; __u32 hash[4]; - struct keydata *keyptr; - - /* - * Pick a random secret every REKEY_INTERVAL seconds. - */ - do_gettimeofday(&tv); /* We need the usecs below... */ - keyptr = check_and_rekey(tv.tv_sec); + struct keydata *keyptr = get_keyptr(); /* * Pick a unique starting offset for each TCP connection endpoints @@ -2317,6 +2317,7 @@ * That's funny, Linux has one built in! Use it! * (Networks are faster now - should this be increased?) */ + do_gettimeofday(&tv); seq += tv.tv_usec + tv.tv_sec*1000000; #if 0 printk("init_seq(%lx, %lx, %d, %d) = %d\n", @@ -2335,7 +2336,7 @@ struct keydata *keyptr; __u32 hash[4]; - keyptr = check_and_rekey(get_seconds()); + keyptr = get_keyptr(); /* * Pick a unique starting offset for each IP destination. --------------020503080807000603060306-- From acme@conectiva.com.br Sat Oct 2 12:30:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 02 Oct 2004 12:30:24 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i92JUFcc024049 for ; Sat, 2 Oct 2004 12:30:18 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 7D631472EE; Sat, 2 Oct 2004 16:29:58 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 34F414730B for ; Sat, 2 Oct 2004 16:29:58 -0300 (BRT) Received: (qmail 4243 invoked by uid 0); 2 Oct 2004 20:26:56 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 2 Oct 2004 20:26:56 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id 23ECE14639; Sat, 2 Oct 2004 16:33:00 -0300 (BRT) Message-ID: <415F020F.7010909@conectiva.com.br> Date: Sat, 02 Oct 2004 16:31:27 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [BRIDGE] convert __constant_htons(constant) to htons X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------020908070200080805000100" X-Bogosity: No, tests=bogofilter, spamicity=0.460656, version=0.16.3 X-archive-position: 9816 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 Content-Length: 5722 Lines: 156 This is a multi-part message in MIME format. --------------020908070200080805000100 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi David, Please consider pulling from: bk://kernel.bkbits.net/acme/sk_buff-2.6 Now there are two outstanding changesets in this tree. Regards, - Arnaldo --------------020908070200080805000100 Content-Type: text/plain; name="bridge.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="bridge.patch" 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.2031, 2004-10-02 16:27:19-03:00, acme@amd64.kerneljanitors.org [BRIDGE] convert __constant_htons(constant) to htons Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller ebt_arp.c | 4 ++-- ebt_arpreply.c | 6 +++--- ebt_ip.c | 2 +- ebt_log.c | 2 +- ebt_vlan.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff -Nru a/net/bridge/netfilter/ebt_arp.c b/net/bridge/netfilter/ebt_arp.c --- a/net/bridge/netfilter/ebt_arp.c 2004-10-02 16:29:01 -03:00 +++ b/net/bridge/netfilter/ebt_arp.c 2004-10-02 16:29:01 -03:00 @@ -108,8 +108,8 @@ if (datalen != EBT_ALIGN(sizeof(struct ebt_arp_info))) return -EINVAL; - if ((e->ethproto != __constant_htons(ETH_P_ARP) && - e->ethproto != __constant_htons(ETH_P_RARP)) || + if ((e->ethproto != htons(ETH_P_ARP) && + e->ethproto != htons(ETH_P_RARP)) || e->invflags & EBT_IPROTO) return -EINVAL; if (info->bitmask & ~EBT_ARP_MASK || info->invflags & ~EBT_ARP_MASK) diff -Nru a/net/bridge/netfilter/ebt_arpreply.c b/net/bridge/netfilter/ebt_arpreply.c --- a/net/bridge/netfilter/ebt_arpreply.c 2004-10-02 16:29:01 -03:00 +++ b/net/bridge/netfilter/ebt_arpreply.c 2004-10-02 16:29:01 -03:00 @@ -29,9 +29,9 @@ if (ap == NULL) return EBT_DROP; - if (ap->ar_op != __constant_htons(ARPOP_REQUEST) || + if (ap->ar_op != htons(ARPOP_REQUEST) || ap->ar_hln != ETH_ALEN || - ap->ar_pro != __constant_htons(ETH_P_IP) || + ap->ar_pro != htons(ETH_P_IP) || ap->ar_pln != 4) return EBT_CONTINUE; @@ -65,7 +65,7 @@ return -EINVAL; if (BASE_CHAIN && info->target == EBT_RETURN) return -EINVAL; - if (e->ethproto != __constant_htons(ETH_P_ARP) || + if (e->ethproto != htons(ETH_P_ARP) || e->invflags & EBT_IPROTO) return -EINVAL; CLEAR_BASE_CHAIN_BIT; diff -Nru a/net/bridge/netfilter/ebt_ip.c b/net/bridge/netfilter/ebt_ip.c --- a/net/bridge/netfilter/ebt_ip.c 2004-10-02 16:29:01 -03:00 +++ b/net/bridge/netfilter/ebt_ip.c 2004-10-02 16:29:01 -03:00 @@ -80,7 +80,7 @@ if (datalen != EBT_ALIGN(sizeof(struct ebt_ip_info))) return -EINVAL; - if (e->ethproto != __constant_htons(ETH_P_IP) || + if (e->ethproto != htons(ETH_P_IP) || e->invflags & EBT_IPROTO) return -EINVAL; if (info->bitmask & ~EBT_IP_MASK || info->invflags & ~EBT_IP_MASK) diff -Nru a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c --- a/net/bridge/netfilter/ebt_log.c 2004-10-02 16:29:01 -03:00 +++ b/net/bridge/netfilter/ebt_log.c 2004-10-02 16:29:01 -03:00 @@ -121,7 +121,7 @@ /* If it's for Ethernet and the lengths are OK, * then log the ARP payload */ - if (ah->ar_hrd == __constant_htons(1) && + if (ah->ar_hrd == htons(1) && ah->ar_hln == ETH_ALEN && ah->ar_pln == sizeof(uint32_t)) { struct arppayload _arpp, *ap; diff -Nru a/net/bridge/netfilter/ebt_vlan.c b/net/bridge/netfilter/ebt_vlan.c --- a/net/bridge/netfilter/ebt_vlan.c 2004-10-02 16:29:01 -03:00 +++ b/net/bridge/netfilter/ebt_vlan.c 2004-10-02 16:29:01 -03:00 @@ -104,7 +104,7 @@ } /* Is it 802.1Q frame checked? */ - if (e->ethproto != __constant_htons(ETH_P_8021Q)) { + if (e->ethproto != htons(ETH_P_8021Q)) { DEBUG_MSG ("passed entry proto %2.4X is not 802.1Q (8100)\n", (unsigned short) ntohs(e->ethproto)); =================================================================== This BitKeeper patch contains the following changesets: 1.2031 ## Wrapped with gzip_uu ## M'XL( 'T!7T$ ^U876_;-A1]MGX%AP)%BD$ROT1*1ATD38S6V(JZ3O,T# 8E MT99F63(DQELP_OA15)IX21K;:OMFV:!HB9?WZ/+UK 8]$:^D\PI\ M*&LUZ,5E(6.5;807ERLOJLR-:5F:&WWYCZI$OQGCF+;N9S%WO,,6,F M0L4IV,BJ'O201^ZOJ-NU'/2FH_?7OY]/'6I*!;R2BHP'#JJK#8B3^HS MH=*\+#SCH:A74EGO^GZHQA!B\_$1)]!G&C%(N8Y1@I"@2"80TX!1I\%V]O@! M_C\+168FQ"CV0^V'(<7.)4 >A@0!2/L(]B$&B TP'Z#0A60 (;"SBE7"J+>4 M52'SOT21&>"U5U8+\*L/7.B\ S_V22Z<&/SQ;CJ^?#_Z$Y@G,H%58#8SO5J) M0LU297HG7W^^,=Z!O63,S/8E M>/MLP$Z?SG I-ED"KCSP,W*[.UJ)(RDIXD=2%5/VHRI*%[)ON/,N5K/HR4C-1K2NY MSF^]N DO@0&F"!%$F:8,<:XI1)3BF!-"6)C$XN4EW==/2Z40F>#;\V7K=B8,0\0P00@S32@,B$;()WZ$!4(\A',8=T7\U<,V M5LH8H0=C-<_^#%C"@E 'B3!P&:."B@3&R7>$]RE:A'WF'XQVDXOB,5RN+0TT M];D448AP,#=P&>T*]\''-E[LD^#PZ.;EXCDJ&"YH:I9?(.D+%,(PX%%7N/"_5/STMD*FNWFY5SMI.5V2L+ 1,G,ZA,-,>?(JCMY+.V0 M[B?M!+CD*.UWTFX5[A-PJ[_OOD;G]UB6#F^ 2V(6RAG;MI?-P8E8NZ>BFI5K M\,NP#<;)^73R:3*;CCY?CZZ^O %:&RMJK9JV!\QQ9[6NR@>ST9ZI5*DQ4$],C#]KLRM5VBSY:=+:+4.>)@>B04!L&39MQN[F==:+V_A5.!V9G MSQ";+R'#-M*YW"N'E"# M?6.GN6_MU6P_H?8-\>&1JC^*JFTINR]5[8ITTF!LRXSVU&O+D]06&FF5&-+= ML159Z7V1INW^X7">'K*WZ:"J6]L:4[!#%!*S5="8^;355?/R.;+UN]G:;A/W M96N[)IWH"KFEJSWM$M? :--G4PO\^_"/7IS*>%G?K(9Q..; Sat, 2 Oct 2004 12:49:14 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 7DE234745E; Sat, 2 Oct 2004 16:48:53 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 284E6473FF for ; Sat, 2 Oct 2004 16:48:53 -0300 (BRT) Received: (qmail 6253 invoked by uid 0); 2 Oct 2004 20:45:51 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 2 Oct 2004 20:45:51 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id EA7A214639; Sat, 2 Oct 2004 16:51:56 -0300 (BRT) Message-ID: <415F0680.7040200@conectiva.com.br> Date: Sat, 02 Oct 2004 16:50:24 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [SKBUFF] use eth_hdr(skb), skb->mac.raw cases X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------040208030207070501080502" X-Bogosity: No, tests=bogofilter, spamicity=0.496867, version=0.16.3 X-archive-position: 9817 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 Content-Length: 7949 Lines: 225 This is a multi-part message in MIME format. --------------040208030207070501080502 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi David, Please consider pulling from: bk://kernel.bkbits.net/acme/sk_buff-2.6 Now there are 3 outstanding changesets in this tree. Regards, - Arnaldo --------------040208030207070501080502 Content-Type: text/plain; name="eth_hdr2.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="eth_hdr2.patch" =================================================================== ChangeSet@1.2032, 2004-10-02 16:44:12-03:00, acme@amd64.kerneljanitors.org [SKBUFF] use eth_hdr(skb), skb->mac.raw cases Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller drivers/ieee1394/eth1394.c | 2 +- drivers/ieee1394/eth1394.h | 7 +++++++ drivers/net/hamradio/bpqether.c | 2 +- drivers/net/wireless/orinoco.c | 2 +- drivers/net/wireless/wavelan.c | 5 ++--- drivers/net/wireless/wavelan_cs.c | 4 ++-- include/net/llc_pdu.h | 6 +++--- net/bluetooth/bnep/core.c | 6 +++--- net/llc/llc_input.c | 2 +- net/llc/llc_output.c | 2 +- 10 files changed, 22 insertions(+), 16 deletions(-) diff -Nru a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c --- a/drivers/ieee1394/eth1394.c 2004-10-02 16:44:56 -03:00 +++ b/drivers/ieee1394/eth1394.c 2004-10-02 16:44:56 -03:00 @@ -850,7 +850,7 @@ skb->mac.raw = skb->data; skb_pull (skb, ETH1394_HLEN); - eth = (struct eth1394hdr*)skb->mac.raw; + eth = eth1394_hdr(skb); if (*eth->h_dest & 1) { if (memcmp(eth->h_dest, dev->broadcast, dev->addr_len)==0) diff -Nru a/drivers/ieee1394/eth1394.h b/drivers/ieee1394/eth1394.h --- a/drivers/ieee1394/eth1394.h 2004-10-02 16:44:56 -03:00 +++ b/drivers/ieee1394/eth1394.h 2004-10-02 16:44:56 -03:00 @@ -81,7 +81,14 @@ unsigned short h_proto; /* packet type ID field */ } __attribute__((packed)); +#ifdef __KERNEL__ +#include +static inline struct eth1394hdr *eth1394_hdr(const struct sk_buff *skb) +{ + return (struct eth1394hdr *)skb->mac.raw; +} +#endif typedef enum {ETH1394_GASP, ETH1394_WRREQ} eth1394_tx_type; diff -Nru a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c --- a/drivers/net/hamradio/bpqether.c 2004-10-02 16:44:56 -03:00 +++ b/drivers/net/hamradio/bpqether.c 2004-10-02 16:44:56 -03:00 @@ -193,7 +193,7 @@ bpq = (struct bpqdev *)dev->priv; - eth = (struct ethhdr *)skb->mac.raw; + eth = eth_hdr(skb); if (!(bpq->acpt_addr[0] & 0x01) && memcmp(eth->h_source, bpq->acpt_addr, ETH_ALEN)) diff -Nru a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c --- a/drivers/net/wireless/orinoco.c 2004-10-02 16:44:56 -03:00 +++ b/drivers/net/wireless/orinoco.c 2004-10-02 16:44:56 -03:00 @@ -1009,7 +1009,7 @@ /* Note : gcc will optimise the whole section away if * WIRELESS_SPY is not defined... - Jean II */ if (SPY_NUMBER(priv)) { - orinoco_spy_gather(dev, skb->mac.raw + ETH_ALEN, + orinoco_spy_gather(dev, eth_hdr(skb)->h_source, desc->signal, desc->silence); } } diff -Nru a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c --- a/drivers/net/wireless/wavelan.c 2004-10-02 16:44:56 -03:00 +++ b/drivers/net/wireless/wavelan.c 2004-10-02 16:44:56 -03:00 @@ -2521,7 +2521,7 @@ skb->protocol = eth_type_trans(skb, dev); #ifdef DEBUG_RX_INFO - wv_packet_info(skb->mac.raw, sksize, dev->name, "wv_packet_read"); + wv_packet_info(eth_hdr(skb)->h_dest, sksize, dev->name, "wv_packet_read"); #endif /* DEBUG_RX_INFO */ /* Statistics-gathering and associated stuff. @@ -2557,8 +2557,7 @@ /* Spying stuff */ #ifdef IW_WIRELESS_SPY - wl_spy_gather(dev, skb->mac.raw + WAVELAN_ADDR_SIZE, - stats); + wl_spy_gather(dev, eth_hdr(skb)->h_source, stats); #endif /* IW_WIRELESS_SPY */ #ifdef HISTOGRAM wl_his_gather(dev, stats); diff -Nru a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c --- a/drivers/net/wireless/wavelan_cs.c 2004-10-02 16:44:56 -03:00 +++ b/drivers/net/wireless/wavelan_cs.c 2004-10-02 16:44:56 -03:00 @@ -2943,7 +2943,7 @@ skb->protocol = eth_type_trans(skb, dev); #ifdef DEBUG_RX_INFO - wv_packet_info(skb->mac.raw, sksize, dev->name, "wv_packet_read"); + wv_packet_info(eth_hdr(skb)->h_dest, sksize, dev->name, "wv_packet_read"); #endif /* DEBUG_RX_INFO */ /* Statistics gathering & stuff associated. @@ -2977,7 +2977,7 @@ #endif /* WAVELAN_ROAMING */ #ifdef WIRELESS_SPY - wl_spy_gather(dev, skb->mac.raw + WAVELAN_ADDR_SIZE, stats); + wl_spy_gather(dev, eth_hdr(skb)->h_source, stats); #endif /* WIRELESS_SPY */ #ifdef HISTOGRAM wl_his_gather(dev, stats); diff -Nru a/include/net/llc_pdu.h b/include/net/llc_pdu.h --- a/include/net/llc_pdu.h 2004-10-02 16:44:56 -03:00 +++ b/include/net/llc_pdu.h 2004-10-02 16:44:56 -03:00 @@ -253,7 +253,7 @@ static inline void llc_pdu_decode_sa(struct sk_buff *skb, u8 *sa) { if (skb->protocol == ntohs(ETH_P_802_2)) - memcpy(sa, ((struct ethhdr *)skb->mac.raw)->h_source, ETH_ALEN); + memcpy(sa, eth_hdr(skb)->h_source, ETH_ALEN); else if (skb->protocol == ntohs(ETH_P_TR_802_2)) memcpy(sa, ((struct trh_hdr *)skb->mac.raw)->saddr, ETH_ALEN); } @@ -268,7 +268,7 @@ static inline void llc_pdu_decode_da(struct sk_buff *skb, u8 *da) { if (skb->protocol == ntohs(ETH_P_802_2)) - memcpy(da, ((struct ethhdr *)skb->mac.raw)->h_dest, ETH_ALEN); + memcpy(da, eth_hdr(skb)->h_dest, ETH_ALEN); else if (skb->protocol == ntohs(ETH_P_TR_802_2)) memcpy(da, ((struct trh_hdr *)skb->mac.raw)->daddr, ETH_ALEN); } @@ -347,7 +347,7 @@ struct llc_pdu_un *ev_pdu = llc_pdu_un_hdr(ev_skb); int dsize; - dsize = ntohs(((struct ethhdr *)ev_skb->mac.raw)->h_proto) - 3; + dsize = ntohs(eth_hdr(ev_skb)->h_proto) - 3; memcpy(((u8 *)pdu) + 3, ((u8 *)ev_pdu) + 3, dsize); skb_put(skb, dsize); } diff -Nru a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c --- a/net/bluetooth/bnep/core.c 2004-10-02 16:44:56 -03:00 +++ b/net/bluetooth/bnep/core.c 2004-10-02 16:44:56 -03:00 @@ -364,17 +364,17 @@ case BNEP_COMPRESSED_SRC_ONLY: memcpy(__skb_put(nskb, ETH_ALEN), s->eh.h_dest, ETH_ALEN); - memcpy(__skb_put(nskb, ETH_ALEN), skb->mac.raw, ETH_ALEN); + memcpy(__skb_put(nskb, ETH_ALEN), eth_hdr(skb), ETH_ALEN); put_unaligned(s->eh.h_proto, (u16 *) __skb_put(nskb, 2)); break; case BNEP_COMPRESSED_DST_ONLY: - memcpy(__skb_put(nskb, ETH_ALEN), skb->mac.raw, ETH_ALEN); + memcpy(__skb_put(nskb, ETH_ALEN), eth_hdr(skb), ETH_ALEN); memcpy(__skb_put(nskb, ETH_ALEN + 2), s->eh.h_source, ETH_ALEN + 2); break; case BNEP_GENERAL: - memcpy(__skb_put(nskb, ETH_ALEN * 2), skb->mac.raw, ETH_ALEN * 2); + memcpy(__skb_put(nskb, ETH_ALEN * 2), eth_hdr(skb), ETH_ALEN * 2); put_unaligned(s->eh.h_proto, (u16 *) __skb_put(nskb, 2)); break; } diff -Nru a/net/llc/llc_input.c b/net/llc/llc_input.c --- a/net/llc/llc_input.c 2004-10-02 16:44:56 -03:00 +++ b/net/llc/llc_input.c 2004-10-02 16:44:56 -03:00 @@ -111,7 +111,7 @@ skb->h.raw += llc_len; skb_pull(skb, llc_len); if (skb->protocol == htons(ETH_P_802_2)) { - u16 pdulen = ((struct ethhdr *)skb->mac.raw)->h_proto, + u16 pdulen = eth_hdr(skb)->h_proto, data_size = ntohs(pdulen) - llc_len; skb_trim(skb, data_size); diff -Nru a/net/llc/llc_output.c b/net/llc/llc_output.c --- a/net/llc/llc_output.c 2004-10-02 16:44:56 -03:00 +++ b/net/llc/llc_output.c 2004-10-02 16:44:56 -03:00 @@ -61,7 +61,7 @@ struct ethhdr *eth; skb->mac.raw = skb_push(skb, sizeof(*eth)); - eth = (struct ethhdr *)skb->mac.raw; + eth = eth_hdr(skb); eth->h_proto = htons(len); memcpy(eth->h_dest, da, ETH_ALEN); memcpy(eth->h_source, sa, ETH_ALEN); --------------040208030207070501080502-- From romieu@fr.zoreil.com Sat Oct 2 13:28:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 02 Oct 2004 13:28:52 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i92KSgkS025209 for ; Sat, 2 Oct 2004 13:28:46 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i92KS6vr018653; Sat, 2 Oct 2004 22:28:06 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i92KS5FN018652; Sat, 2 Oct 2004 22:28:05 +0200 Date: Sat, 2 Oct 2004 22:28:05 +0200 From: Francois Romieu To: davem@redhat.com Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc3] dev_close: use of netif_poll_disable Message-ID: <20041002202805.GA16870@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 9818 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 Content-Length: 752 Lines: 23 Use of identical (comment included) netif_poll_disable(). Signed-off-by: Francois Romieu diff -puN net/core/dev.c~dev_close-cleanup net/core/dev.c --- linux-2.6.9-rc3/net/core/dev.c~dev_close-cleanup 2004-10-02 22:14:29.000000000 +0200 +++ linux-2.6.9-rc3-fr/net/core/dev.c 2004-10-02 22:16:02.000000000 +0200 @@ -959,11 +959,8 @@ int dev_close(struct net_device *dev) * 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. _ From arthur@unimatrix001.student.utwente.nl Sat Oct 2 14:50:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 02 Oct 2004 14:50:34 -0700 (PDT) Received: from unimatrix001.student.utwente.nl (unimatrix001.student.utwente.nl [130.89.164.134]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i92LoSud026421 for ; Sat, 2 Oct 2004 14:50:29 -0700 Received: from unimatrix001.student.utwente.nl (localhost [127.0.0.1]) by unimatrix001.student.utwente.nl (8.12.8p1-20030924/8.12.8) with ESMTP id i92LoBAQ024096 for ; Sat, 2 Oct 2004 23:50:11 +0200 Received: (from arthur@localhost) by unimatrix001.student.utwente.nl (8.12.8p1-20030924/8.12.8/Submit) id i92LoBpR024095 for netdev@oss.sgi.com; Sat, 2 Oct 2004 23:50:11 +0200 Date: Sat, 2 Oct 2004 23:50:11 +0200 From: Arthur Rinkel To: netdev@oss.sgi.com Subject: i82596 ethernet controller Message-ID: <20041002235011.A24086@unimatrix001.student.utwente.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i X-archive-position: 9819 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: arthur@unimatrix001.student.utwente.nl Precedence: bulk X-list: netdev Content-Length: 611 Lines: 15 Hi, Recently I've purchased an Intel EtherExpress Pro/10 PCI which is based on an i82596 ethernet controller. Although a driver exists for the controller, no driver exists for the PCI-card; existing drivers only support ISA-based cards for example. I'd like to adapt the existing driver so it'll support the PCI-based card. However, I don't know how this card is mapped into memory, so I can't communicate with it. There is some information available about the i82596, but this concerns the chip only, not the card. Furthermore, Intel offers no longer support for the card. Any help appreciated. Grtz, Arthur From acme@conectiva.com.br Sat Oct 2 20:26:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 02 Oct 2004 20:26:16 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i933QAwu004767 for ; Sat, 2 Oct 2004 20:26:11 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 71A1C47452; Sun, 3 Oct 2004 00:25:57 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 334EE473FF for ; Sun, 3 Oct 2004 00:25:57 -0300 (BRT) Received: (qmail 10816 invoked by uid 0); 3 Oct 2004 04:22:56 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 3 Oct 2004 04:22:56 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id E255414639; Sun, 3 Oct 2004 00:29:02 -0300 (BRT) Message-ID: <415F71A3.4000701@conectiva.com.br> Date: Sun, 03 Oct 2004 00:27:31 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: PATCH: [SKBUFF] introduce tr_hdr(skb) X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------050708030604090602070200" X-Bogosity: No, tests=bogofilter, spamicity=0.446821, version=0.16.3 X-archive-position: 9820 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 Content-Length: 3097 Lines: 109 This is a multi-part message in MIME format. --------------050708030604090602070200 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi David, Please consider pulling from: bk://kernel.bkbits.net/acme/sk_buff-2.6 Now there are three outstanding changesets in this tree. Regards, - Arnaldo --------------050708030604090602070200 Content-Type: text/plain; name="tr_hdr.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="tr_hdr.patch" =================================================================== ChangeSet@1.2033, 2004-10-03 00:23:07-03:00, acme@conectiva.com.br [SKBUFF] introduce tr_hdr(skb) The token ring code in the kernel is bitrotting (no surprise :) ), it uses skb->data all around... I have an assortment of token ring cards but no MAU, can anybody send me one, please? I promise to make ssh work over LLC over Token Ring networks! Duh... :o) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller include/linux/if_tr.h | 9 +++++++++ include/net/llc_pdu.h | 4 ++-- net/llc/llc_output.c | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff -Nru a/include/linux/if_tr.h b/include/linux/if_tr.h --- a/include/linux/if_tr.h 2004-10-03 00:24:29 -03:00 +++ b/include/linux/if_tr.h 2004-10-03 00:24:29 -03:00 @@ -48,6 +48,15 @@ __u16 rseg[8]; /* routing registers */ }; +#ifdef __KERNEL__ +#include + +static inline struct trh_hdr *tr_hdr(const struct sk_buff *skb) +{ + return (struct trh_hdr *)skb->mac.raw; +} +#endif + /* This is an Token-Ring LLC structure */ struct trllc { __u8 dsap; /* destination SAP */ diff -Nru a/include/net/llc_pdu.h b/include/net/llc_pdu.h --- a/include/net/llc_pdu.h 2004-10-03 00:24:29 -03:00 +++ b/include/net/llc_pdu.h 2004-10-03 00:24:29 -03:00 @@ -255,7 +255,7 @@ if (skb->protocol == ntohs(ETH_P_802_2)) memcpy(sa, eth_hdr(skb)->h_source, ETH_ALEN); else if (skb->protocol == ntohs(ETH_P_TR_802_2)) - memcpy(sa, ((struct trh_hdr *)skb->mac.raw)->saddr, ETH_ALEN); + memcpy(sa, tr_hdr(skb)->saddr, ETH_ALEN); } /** @@ -270,7 +270,7 @@ if (skb->protocol == ntohs(ETH_P_802_2)) memcpy(da, eth_hdr(skb)->h_dest, ETH_ALEN); else if (skb->protocol == ntohs(ETH_P_TR_802_2)) - memcpy(da, ((struct trh_hdr *)skb->mac.raw)->daddr, ETH_ALEN); + memcpy(da, tr_hdr(skb)->daddr, ETH_ALEN); } /** diff -Nru a/net/llc/llc_output.c b/net/llc/llc_output.c --- a/net/llc/llc_output.c 2004-10-03 00:24:29 -03:00 +++ b/net/llc/llc_output.c 2004-10-03 00:24:29 -03:00 @@ -40,7 +40,8 @@ struct net_device *dev = skb->dev; struct trh_hdr *trh; - trh = (struct trh_hdr *)skb_push(skb, sizeof(*trh)); + skb->mac.raw = skb_push(skb, sizeof(*trh)); + trh = tr_hdr(skb); trh->ac = AC; trh->fc = LLC_FRAME; if (sa) @@ -51,7 +52,6 @@ memcpy(trh->daddr, da, dev->addr_len); tr_source_route(skb, trh, dev); } - skb->mac.raw = skb->data; break; } #endif --------------050708030604090602070200-- From acme@conectiva.com.br Sun Oct 3 07:07:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 07:08:02 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93E7te8008844 for ; Sun, 3 Oct 2004 07:07:56 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 8D6AB47562; Sun, 3 Oct 2004 11:07:41 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 27C4347550 for ; Sun, 3 Oct 2004 11:07:41 -0300 (BRT) Received: (qmail 28086 invoked by uid 0); 3 Oct 2004 15:04:38 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 3 Oct 2004 15:04:38 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id DA25014639; Sun, 3 Oct 2004 11:10:42 -0300 (BRT) Message-ID: <4160080B.408@conectiva.com.br> Date: Sun, 03 Oct 2004 11:09:15 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: PATCH: [SKBUFF] make hdlc_type_trans look like eth_type_trans X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------080601000806040705030207" X-Bogosity: No, tests=bogofilter, spamicity=0.489416, version=0.16.3 X-archive-position: 9823 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 Content-Length: 7564 Lines: 237 This is a multi-part message in MIME format. --------------080601000806040705030207 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi David, Please consider pulling from: bk://kernel.bkbits.net/acme/sk_buff-2.6 Now there are five outstanding changesets in this tree: ChangeSet@1.2034, 2004-10-03 11:01:01-03:00, acme@amd64.kerneljanitors.org [SKBUFF] make hdlc_type_trans look like eth_type_trans ChangeSet@1.2033, 2004-10-03 00:23:07-03:00, acme@conectiva.com.br [SKBUFF] introduce tr_hdr(skb) ChangeSet@1.2032, 2004-10-02 16:44:12-03:00, acme@amd64.kerneljanitors.org ChangeSet@1.2031, 2004-10-02 16:27:19-03:00, acme@amd64.kerneljanitors.org [BRIDGE] convert __constant_htons(constant) to htons ChangeSet@1.2030, 2004-10-02 13:42:59-03:00, acme@conectiva.com.br [SKBUFF] introduce eth_hdr(skb) Regards, - Arnaldo --------------080601000806040705030207 Content-Type: text/plain; name="hdlc_type_trans.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="hdlc_type_trans.patch" =================================================================== ChangeSet@1.2034, 2004-10-03 11:01:01-03:00, acme@amd64.kerneljanitors.org [SKBUFF] make hdlc_type_trans look like eth_type_trans Moving skb->mac.raw and dev setting from the callers to hdlc_type_trans, also introduce farsync_type_trans, private to the farsync driver, but following the foo_type_trans model. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller drivers/char/pcmcia/synclink_cs.c | 1 drivers/char/synclink.c | 4 --- drivers/char/synclinkmp.c | 4 --- drivers/net/wan/dscc4.c | 2 - drivers/net/wan/farsync.c | 42 ++++++++++++++++++-------------------- drivers/net/wan/hd6457x.c | 2 - drivers/net/wan/pc300_drv.c | 1 drivers/net/wan/wanxl.c | 2 - include/linux/hdlc.h | 8 +++++-- 9 files changed, 28 insertions(+), 38 deletions(-) diff -Nru a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c --- a/drivers/char/pcmcia/synclink_cs.c 2004-10-03 11:02:01 -03:00 +++ b/drivers/char/pcmcia/synclink_cs.c 2004-10-03 11:02:01 -03:00 @@ -4571,7 +4571,6 @@ memcpy(skb_put(skb, size),buf,size); skb->dev = info->netdev; - skb->mac.raw = skb->data; skb->protocol = hdlc_type_trans(skb, skb->dev); stats->rx_packets++; diff -Nru a/drivers/char/synclink.c b/drivers/char/synclink.c --- a/drivers/char/synclink.c 2004-10-03 11:02:01 -03:00 +++ b/drivers/char/synclink.c 2004-10-03 11:02:01 -03:00 @@ -8150,9 +8150,7 @@ memcpy(skb_put(skb, size),buf,size); - skb->dev = info->netdev; - skb->mac.raw = skb->data; - skb->protocol = hdlc_type_trans(skb, skb->dev); + skb->protocol = hdlc_type_trans(skb, info->netdev); stats->rx_packets++; stats->rx_bytes += size; diff -Nru a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c --- a/drivers/char/synclinkmp.c 2004-10-03 11:02:01 -03:00 +++ b/drivers/char/synclinkmp.c 2004-10-03 11:02:01 -03:00 @@ -1968,9 +1968,7 @@ memcpy(skb_put(skb, size),buf,size); - skb->dev = info->netdev; - skb->mac.raw = skb->data; - skb->protocol = hdlc_type_trans(skb, skb->dev); + skb->protocol = hdlc_type_trans(skb, info->netdev); stats->rx_packets++; stats->rx_bytes += size; diff -Nru a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c --- a/drivers/net/wan/dscc4.c 2004-10-03 11:02:02 -03:00 +++ b/drivers/net/wan/dscc4.c 2004-10-03 11:02:02 -03:00 @@ -517,9 +517,7 @@ skb = dev_alloc_skb(len); dpriv->rx_skbuff[dirty] = skb; if (skb) { - skb->dev = dev; skb->protocol = hdlc_type_trans(skb, dev); - skb->mac.raw = skb->data; rx_fd->data = pci_map_single(dpriv->pci_priv->pdev, skb->data, len, PCI_DMA_FROMDEVICE); } else { diff -Nru a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c --- a/drivers/net/wan/farsync.c 2004-10-03 11:02:01 -03:00 +++ b/drivers/net/wan/farsync.c 2004-10-03 11:02:01 -03:00 @@ -857,6 +857,18 @@ dev->trans_start = jiffies; } +/* + * Mark it for our own raw sockets interface + */ +static unsigned short farsync_type_trans(struct sk_buff *skb, + struct net_device *dev) +{ + skb->dev = dev; + skb->mac.raw = skb->data; + skb->pkt_type = PACKET_HOST; + return htons(ETH_P_CUST); +} + /* Rx dma complete interrupt */ static void @@ -881,17 +893,10 @@ /* Push upstream */ dbg(DBG_RX, "Pushing the frame up the stack\n"); - skb->mac.raw = skb->data; - skb->dev = dev; - if (port->mode == FST_RAW) { - /* - * Mark it for our own raw sockets interface - */ - skb->protocol = htons(ETH_P_CUST); - skb->pkt_type = PACKET_HOST; - } else { - skb->protocol = hdlc_type_trans(skb, skb->dev); - } + if (port->mode == FST_RAW) + skb->protocol = farsync_type_trans(skb, dev); + else + skb->protocol = hdlc_type_trans(skb, dev); rx_status = netif_rx(skb); fst_process_rx_status(rx_status, port_to_dev(port)->name); if (rx_status == NET_RX_DROP) @@ -1316,17 +1321,10 @@ /* Push upstream */ dbg(DBG_RX, "Pushing frame up the stack\n"); - skb->mac.raw = skb->data; - skb->dev = dev; - if (port->mode == FST_RAW) { - /* - * Mark it for our own raw sockets interface - */ - skb->protocol = htons(ETH_P_CUST); - skb->pkt_type = PACKET_HOST; - } else { - skb->protocol = hdlc_type_trans(skb, skb->dev); - } + if (port->mode == FST_RAW) + skb->protocol = farsync_type_trans(skb, dev); + else + skb->protocol = hdlc_type_trans(skb, dev); rx_status = netif_rx(skb); fst_process_rx_status(rx_status, port_to_dev(port)->name); if (rx_status == NET_RX_DROP) { diff -Nru a/drivers/net/wan/hd6457x.c b/drivers/net/wan/hd6457x.c --- a/drivers/net/wan/hd6457x.c 2004-10-03 11:02:01 -03:00 +++ b/drivers/net/wan/hd6457x.c 2004-10-03 11:02:01 -03:00 @@ -315,8 +315,6 @@ #endif stats->rx_packets++; stats->rx_bytes += skb->len; - skb->mac.raw = skb->data; - skb->dev = dev; skb->dev->last_rx = jiffies; skb->protocol = hdlc_type_trans(skb, dev); netif_rx(skb); diff -Nru a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c --- a/drivers/net/wan/pc300_drv.c 2004-10-03 11:02:01 -03:00 +++ b/drivers/net/wan/pc300_drv.c 2004-10-03 11:02:02 -03:00 @@ -1959,7 +1959,6 @@ cpc_trace(dev, skb, 'R'); } stats->rx_packets++; - skb->mac.raw = skb->data; skb->protocol = hdlc_type_trans(skb, dev); netif_rx(skb); } diff -Nru a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c --- a/drivers/net/wan/wanxl.c 2004-10-03 11:02:01 -03:00 +++ b/drivers/net/wan/wanxl.c 2004-10-03 11:02:01 -03:00 @@ -224,8 +224,6 @@ #endif stats->rx_packets++; stats->rx_bytes += skb->len; - skb->mac.raw = skb->data; - skb->dev = dev; dev->last_rx = jiffies; skb->protocol = hdlc_type_trans(skb, dev); netif_rx(skb); diff -Nru a/include/linux/hdlc.h b/include/linux/hdlc.h --- a/include/linux/hdlc.h 2004-10-03 11:02:02 -03:00 +++ b/include/linux/hdlc.h 2004-10-03 11:02:02 -03:00 @@ -243,11 +243,15 @@ static __inline__ unsigned short hdlc_type_trans(struct sk_buff *skb, struct net_device *dev) { - hdlc_device *hdlc = dev_to_hdlc(skb->dev); + hdlc_device *hdlc = dev_to_hdlc(dev); + + skb->mac.raw = skb->data; + skb->dev = dev; + if (hdlc->proto.type_trans) return hdlc->proto.type_trans(skb, dev); else - return __constant_htons(ETH_P_HDLC); + return htons(ETH_P_HDLC); } #endif /* __KERNEL */ --------------080601000806040705030207-- From hadi@cyberus.ca Sun Oct 3 12:52:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 12:52:36 -0700 (PDT) Received: from mx03.cybersurf.com (mx03.cybersurf.com [209.197.145.106]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93JqVmf020094 for ; Sun, 3 Oct 2004 12:52:31 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.20) id 1CECP4-0005WG-Mm for netdev@oss.sgi.com; Sun, 03 Oct 2004 15:52:18 -0400 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CECP1-0007tS-En; Sun, 03 Oct 2004 15:52:15 -0400 Subject: cls patchlet From: jamal Reply-To: hadi@cyberus.ca To: "David S. Miller" Cc: netdev@oss.sgi.com Content-Type: multipart/mixed; boundary="=-aleoHynQzGWpIePjXRde" Organization: jamalopolous Message-Id: <1096833127.1048.333.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 03 Oct 2004 15:52:07 -0400 X-archive-position: 9824 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev Content-Length: 1284 Lines: 47 --=-aleoHynQzGWpIePjXRde Content-Type: text/plain Content-Transfer-Encoding: 7bit Dave, resets class when tc_classid non-zero. Please apply. cheers, jamal --=-aleoHynQzGWpIePjXRde Content-Disposition: attachment; filename=classfix_p Content-Type: text/plain; name=classfix_p; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit --- a/net/sched/cls_u32.c 2004-08-14 01:36:33.000000000 -0400 +++ b/net/sched/cls_u32.c 2004-10-01 08:29:48.000000000 -0400 @@ -178,6 +178,7 @@ int pol_res = tcf_action_exec(skb, n->action); if (skb->tc_classid > 0) { res->classid = skb->tc_classid; + res->class = 0; skb->tc_classid = 0; } --- /usr/src/269-rc3-mod/net/sched/cls_fw.c 2004/10/01 12:36:06 1.1 +++ /usr/src/269-rc3-mod/net/sched/cls_fw.c 2004/10/01 14:22:30 @@ -103,6 +103,12 @@ #endif if (f->action) { int pol_res = tcf_action_exec(skb, f->action); + if (skb->tc_classid > 0) { + res->classid = skb->tc_classid; + res->class = 0; + skb->tc_classid = 0; + } + if (pol_res >= 0) return pol_res; } else --=-aleoHynQzGWpIePjXRde-- From hadi@cyberus.ca Sun Oct 3 13:12:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 13:12:55 -0700 (PDT) Received: from mx03.cybersurf.com (mx03.cybersurf.com [209.197.145.106]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93KCprs020739 for ; Sun, 3 Oct 2004 13:12:51 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.20) id 1CECik-0005zj-D9 for netdev@oss.sgi.com; Sun, 03 Oct 2004 16:12:38 -0400 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CECih-0001Ae-1n; Sun, 03 Oct 2004 16:12:35 -0400 Subject: Resend WAS(Re: cls patchlet From: jamal Reply-To: hadi@cyberus.ca To: "David S. Miller" Cc: netdev@oss.sgi.com In-Reply-To: <1096833127.1048.333.camel@jzny.localdomain> References: <1096833127.1048.333.camel@jzny.localdomain> Content-Type: multipart/mixed; boundary="=-B5wXIDjMz5cnfE0o4eEB" Organization: jamalopolous Message-Id: <1096834352.1046.349.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 03 Oct 2004 16:12:32 -0400 X-archive-position: 9825 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev Content-Length: 1350 Lines: 50 --=-B5wXIDjMz5cnfE0o4eEB Content-Type: text/plain Content-Transfer-Encoding: 7bit Ignore previous. This is better formated ;-> On Sun, 2004-10-03 at 15:52, jamal wrote: > Dave, > > resets class when tc_classid non-zero. > > Please apply. > > cheers, > jamal --=-B5wXIDjMz5cnfE0o4eEB Content-Disposition: attachment; filename=classfix_p Content-Type: text/plain; name=classfix_p; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit --- a/net/sched/cls_u32.c 2004-08-14 01:36:33.000000000 -0400 +++ b/net/sched/cls_u32.c 2004-10-01 08:29:48.000000000 -0400 @@ -178,6 +178,7 @@ int pol_res = tcf_action_exec(skb, n->action); if (skb->tc_classid > 0) { res->classid = skb->tc_classid; + res->class = 0; skb->tc_classid = 0; } --- a/net/sched/cls_fw.c 2004/10/01 12:36:06 1.1 +++ b/net/sched/cls_fw.c 2004/10/01 14:22:30 @@ -103,6 +103,12 @@ #endif if (f->action) { int pol_res = tcf_action_exec(skb, f->action); + if (skb->tc_classid > 0) { + res->classid = skb->tc_classid; + res->class = 0; + skb->tc_classid = 0; + } + if (pol_res >= 0) return pol_res; } else --=-B5wXIDjMz5cnfE0o4eEB-- From klassert@mathematik.tu-chemnitz.de Sun Oct 3 13:45:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 13:45:29 -0700 (PDT) Received: from lana.hrz.tu-chemnitz.de (lana.hrz.tu-chemnitz.de [134.109.132.3]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93KjM9f021479 for ; Sun, 3 Oct 2004 13:45:23 -0700 Received: from bayes.mathematik.tu-chemnitz.de ([134.109.41.17]) by lana.hrz.tu-chemnitz.de with esmtp (Exim 4.41) id 1CEDEB-0007Kd-Bt; Sun, 03 Oct 2004 22:45:07 +0200 Received: by bayes.mathematik.tu-chemnitz.de (Postfix, from userid 274) id 2A3C88D6C; Sun, 3 Oct 2004 22:45:07 +0200 (CEST) Date: Sun, 3 Oct 2004 22:45:07 +0200 From: Steffen Klassert To: akpm@osdl.org Cc: jgarzik@pobox.com, netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc3-mm1] 3c59x: Make use of generic_mii_ioctl Message-ID: <20041003204507.GA29546@bayes.mathematik.tu-chemnitz.de> Mail-Followup-To: akpm@osdl.org, jgarzik@pobox.com, netdev@oss.sgi.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Scan-Signature: a9b0c11fa57e65d288d1a9e86fed51cf X-archive-position: 9826 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: klassert@mathematik.tu-chemnitz.de Precedence: bulk X-list: netdev Content-Length: 2670 Lines: 100 With this patch the driver makes use of the MII lib helper function generic_mii_ioctl. Patch is tested with the mii-diag tool and a 3c905-TX, 3c905B-TX NIC. Signed-off-by: Steffen Klassert --- vanilla-2.6.9-rc3-mm1/drivers/net/3c59x.c Sat Oct 2 14:54:46 2004 +++ linux-2.6.9-rc3-mm1/drivers/net/3c59x.c Sun Oct 3 20:22:31 2004 @@ -834,6 +834,7 @@ u16 io_size; /* Size of PCI region (for release_region) */ spinlock_t lock; /* Serialise access to device & its vortex_private */ spinlock_t mdio_lock; /* Serialise access to mdio hardware */ + struct mii_if_info mii; /* MII lib hooks/info */ }; #ifdef CONFIG_PCI @@ -1218,6 +1219,11 @@ spin_lock_init(&vp->lock); spin_lock_init(&vp->mdio_lock); vp->gendev = gendev; + vp->mii.dev = dev; + vp->mii.mdio_read = mdio_read; + vp->mii.mdio_write = mdio_write; + vp->mii.phy_id_mask = 0x1f; + vp->mii.reg_num_mask = 0x1f; /* Makes sure rings are at least 16 byte aligned. */ vp->rx_ring = pci_alloc_consistent(pdev, sizeof(struct boom_rx_desc) * RX_RING_SIZE @@ -1445,6 +1451,7 @@ mdio_write(dev, vp->phys[0], 4, vp->advertising); } } + vp->mii.phy_id = vp->phys[0]; } if (vp->capabilities & CapBusMaster) { @@ -2891,41 +2898,6 @@ }; #ifdef CONFIG_PCI -static int vortex_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) -{ - struct vortex_private *vp = netdev_priv(dev); - long ioaddr = dev->base_addr; - struct mii_ioctl_data *data = if_mii(rq); - int phy = vp->phys[0] & 0x1f; - int retval; - - switch(cmd) { - case SIOCGMIIPHY: /* Get address of MII PHY in use. */ - data->phy_id = phy; - - case SIOCGMIIREG: /* Read MII PHY register. */ - EL3WINDOW(4); - data->val_out = mdio_read(dev, data->phy_id & 0x1f, data->reg_num & 0x1f); - retval = 0; - break; - - case SIOCSMIIREG: /* Write MII PHY register. */ - if (!capable(CAP_NET_ADMIN)) { - retval = -EPERM; - } else { - EL3WINDOW(4); - mdio_write(dev, data->phy_id & 0x1f, data->reg_num & 0x1f, data->val_in); - retval = 0; - } - break; - default: - retval = -EOPNOTSUPP; - break; - } - - return retval; -} - /* * Must power the device up to do MDIO operations */ @@ -2933,8 +2905,9 @@ { int err; struct vortex_private *vp = netdev_priv(dev); + long ioaddr = dev->base_addr; int state = 0; - + if(VORTEX_PCI(vp)) state = VORTEX_PCI(vp)->current_state; @@ -2942,7 +2915,8 @@ if(state != 0) pci_set_power_state(VORTEX_PCI(vp), 0); - err = vortex_do_ioctl(dev, rq, cmd); + EL3WINDOW(4); + err = generic_mii_ioctl(&vp->mii, if_mii(rq), cmd, NULL);; if(state != 0) pci_set_power_state(VORTEX_PCI(vp), state); From Robert.Olsson@data.slu.se Sun Oct 3 14:07:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 14:07:34 -0700 (PDT) Received: from mail1.slu.se (mail1.slu.se [130.238.96.11]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93L7Lun022171 for ; Sun, 3 Oct 2004 14:07:22 -0700 Received: from robur.slu.se (robur.slu.se [130.238.98.12]) by mail1.slu.se (8.12.10/8.12.10) with ESMTP id i93L70Y2023634; Sun, 3 Oct 2004 23:07:00 +0200 Received: by robur.slu.se (Postfix, from userid 1000) id 5998190265; Sun, 3 Oct 2004 23:07:00 +0200 (CEST) From: Robert Olsson MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16736.27124.307123.345676@robur.slu.se> Date: Sun, 3 Oct 2004 23:07:00 +0200 To: Harald Welte Cc: Linux Netdev List , David Miller , Robert Olsson , Stephen Hemminger Subject: lnstat (rtstat replacement) In-Reply-To: <20041002162120.GT27499@sunbeam.de.gnumonks.org> References: <20041002162120.GT27499@sunbeam.de.gnumonks.org> X-Mailer: VM 7.18 under Emacs 21.3.1 X-archive-position: 9827 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Robert.Olsson@data.slu.se Precedence: bulk X-list: netdev Content-Length: 1495 Lines: 65 Harald Welte writes: > I've finished my work on 'lnstat'. The current development version is > available from > http://svn.gnumonks.org/cgi-bin/viewcvs.cgi/trunk/lnstat/ I will get a useful tool... > Robert: I hope you're fine with the new lnstat tool replacing rtstat. I just tried "compatibility mode". Something like patch below makes it closer to old rtstat. Did the last two fields get switched? Cheers. --ro --- lnstat.c.orig 2004-10-03 21:01:50.518607296 +0200 +++ lnstat.c 2004-10-03 22:38:25.846513976 +0200 @@ -54,7 +54,7 @@ gettimeofday(&lf->last_read, NULL); for (j = 0; j < lf->num_fields; j++) - lf->fields[j].values[i] += strtoul(ptr, &ptr, 16); + lf->fields[j].values[i] = strtoul(ptr, &ptr, 16); } return num_lines; } @@ -79,6 +79,7 @@ struct lnstat_file *lf; char buf[FGETS_BUF_SIZE]; struct timeval tv; + time_t told; gettimeofday(&tv, NULL); @@ -92,15 +93,22 @@ /* skip first line */ fgets(buf, sizeof(buf)-1, lf->fp); } + told = lf->last_read.tv_sec; scan_lines(lf, 1); for (i = 0, lfi = &lf->fields[i]; i < lf->num_fields; i++, lfi = &lf->fields[i]) { if (i == 0) lfi->result = lfi->values[1]; - else + else { + lfi->result = (lfi->values[1]-lfi->values[0]) - / lf->interval.tv_sec; + + / ( lf->last_read.tv_sec -told); + + /* Save current to next diff */ + lfi->values[0] = lfi->values[1]; + } } rewind(lf->fp); From davem@davemloft.net Sun Oct 3 14:11:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 14:11:44 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93LBdPZ022529 for ; Sun, 3 Oct 2004 14:11:39 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEDbZ-0003DO-00; Sun, 03 Oct 2004 14:09:17 -0700 Date: Sun, 3 Oct 2004 14:09:17 -0700 From: "David S. Miller" To: Fernando Gont Cc: netdev@oss.sgi.com Subject: Re: TCP's reaction to soft errors Message-Id: <20041003140917.48cd6069.davem@davemloft.net> In-Reply-To: <4.3.2.7.2.20041003105509.00e33650@pop.gmx.net> References: <4.3.2.7.2.20040915112853.00cf9980@mail.daleclick.com> <4.3.2.7.2.20040915112853.00cf9980@mail.daleclick.com> <4.3.2.7.2.20041003105509.00e33650@pop.gmx.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9828 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 731 Lines: 18 On Sun, 03 Oct 2004 10:57:36 -0300 Fernando Gont wrote: > At 15:13 01/10/2004 -0700, David S. Miller wrote: > > > > The draft proposes to change TCP's reaction to soft errors so that > > > connections that are in the SYN-SENT or SYN-RECEIVED states are aborted > > > upon receipt of an ICMP error message that indicates a soft error. > > > >I have verified that Linux behaves in a way compliant to this > >proposal. No changes are necessary. > > Great! Thanks for your confirmation. > BTW, do you have any record of how long Linux has been behaving this way? > (I'd like to include this information in the draft). Even 2.0.x kernels behave this way. Others are welcome to search back even further :-) From kaber@trash.net Sun Oct 3 14:13:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 14:13:10 -0700 (PDT) Received: from gw.localnet ([62.206.217.67]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93LD4DC022855 for ; Sun, 3 Oct 2004 14:13:05 -0700 Received: from [172.16.1.123] (helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1CEDle-0003m3-00; Sun, 03 Oct 2004 23:19:42 +0200 Message-ID: <41606B47.9040703@trash.net> Date: Sun, 03 Oct 2004 23:12:39 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: netdev@oss.sgi.com Subject: [PATCH 2.6 0/7]: assorted fixes Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 9829 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kaber@trash.net Precedence: bulk X-list: netdev Content-Length: 1442 Lines: 42 Hi Dave. following are 6 assorted fixes and one small cleanup patch. You can pull all patches from bk://212.42.230.204/net-2.6 I'll send 2.4 versions later. ChangeSet@1.2043.1.7, 2004-10-03 20:44:53+02:00, kaber@coreworks.de [VLAN]: Missing rtnl_unlock in register_vlan_device error path Signed-off-by: Patrick McHardy ChangeSet@1.2043.1.6, 2004-10-03 20:43:32+02:00, kaber@coreworks.de [IPV6]: Fix free_netdev after failed alloc_netdev in sit_init Signed-off-by: Patrick McHardy ChangeSet@1.2043.1.5, 2004-10-03 20:42:17+02:00, kaber@coreworks.de [IPV4]: Fix ipip_fb_tunnel_dev leak in ipip_fini Signed-off-by: Patrick McHardy ChangeSet@1.2043.1.4, 2004-10-03 20:41:00+02:00, kaber@coreworks.de [IPV4]: Fix free_netdev after failed alloc_netdev in ipip_init Signed-off-by: Patrick McHardy ChangeSet@1.2043.1.3, 2004-10-03 20:39:25+02:00, kaber@coreworks.de [IPV4]: Fix free_netdev after failed alloc_netdev in ipgre_init Signed-off-by: Patrick McHardy ChangeSet@1.2043.1.2, 2004-10-03 20:29:51+02:00, kaber@coreworks.de [NET_SCHED]: Remove useless variable in tc_ctl_tfilter Signed-off-by: Patrick McHardy ChangeSet@1.2043.1.1, 2004-10-03 20:25:10+02:00, kaber@coreworks.de [NET_SCHED]: Fix module leak in tc_ctl_tfilter error path Signed-off-by: Patrick McHardy From kaber@trash.net Sun Oct 3 14:13:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 14:13:19 -0700 (PDT) Received: from gw.localnet ([62.206.217.67]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93LDD56022861 for ; Sun, 3 Oct 2004 14:13:13 -0700 Received: from [172.16.1.123] (helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1CEDln-0003mE-00; Sun, 03 Oct 2004 23:19:51 +0200 Message-ID: <41606B50.3080201@trash.net> Date: Sun, 03 Oct 2004 23:12:48 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: netdev@oss.sgi.com Subject: [PATCH 2.6 1/7]: Fix module leak in tc_ctl_tfilter error path Content-Type: multipart/mixed; boundary="------------000601040605010702000606" X-archive-position: 9830 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kaber@trash.net Precedence: bulk X-list: netdev Content-Length: 1405 Lines: 50 This is a multi-part message in MIME format. --------------000601040605010702000606 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit When tp_ops->init fails we leak a module reference. --------------000601040605010702000606 Content-Type: text/x-patch; name="01.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="01.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/03 20:25:10+02:00 kaber@coreworks.de # [NET_SCHED]: Fix module leak in tc_ctl_tfilter error path # # Signed-off-by: Patrick McHardy # # net/sched/cls_api.c # 2004/10/03 20:24:47+02:00 kaber@coreworks.de +6 -2 # [NET_SCHED]: Fix module leak in tc_ctl_tfilter error path # # Signed-off-by: Patrick McHardy # diff -Nru a/net/sched/cls_api.c b/net/sched/cls_api.c --- a/net/sched/cls_api.c 2004-10-03 22:18:04 +02:00 +++ b/net/sched/cls_api.c 2004-10-03 22:18:04 +02:00 @@ -231,8 +231,12 @@ tp->classify = tp_ops->classify; tp->classid = parent; err = -EBUSY; - if (!try_module_get(tp_ops->owner) || - (err = tp_ops->init(tp)) != 0) { + if (!try_module_get(tp_ops->owner)) { + kfree(tp); + goto errout; + } + if ((err = tp_ops->init(tp)) != 0) { + module_put(tp_ops->owner); kfree(tp); goto errout; } --------------000601040605010702000606-- From kaber@trash.net Sun Oct 3 14:13:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 14:13:28 -0700 (PDT) Received: from gw.localnet ([62.206.217.67]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93LDMjl022925 for ; Sun, 3 Oct 2004 14:13:23 -0700 Received: from [172.16.1.123] (helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1CEDlv-0003ma-00; Sun, 03 Oct 2004 23:19:59 +0200 Message-ID: <41606B59.5020502@trash.net> Date: Sun, 03 Oct 2004 23:12:57 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: netdev@oss.sgi.com Subject: [PATCH 2.6 3/7]: Fix free_netdev after failed alloc_netdev in ipgre_init Content-Type: multipart/mixed; boundary="------------010601070104040304020902" X-archive-position: 9832 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kaber@trash.net Precedence: bulk X-list: netdev Content-Length: 1654 Lines: 68 This is a multi-part message in MIME format. --------------010601070104040304020902 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Passing a NULL-ptr to free_netdev is wrong. --------------010601070104040304020902 Content-Type: text/x-patch; name="03.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="03.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/03 20:39:25+02:00 kaber@coreworks.de # [IPV4]: Fix free_netdev after failed alloc_netdev in ipgre_init # # Signed-off-by: Patrick McHardy # # net/ipv4/ip_gre.c # 2004/10/03 20:38:45+02:00 kaber@coreworks.de +6 -5 # [IPV4]: Fix free_netdev after failed alloc_netdev in ipgre_init # # Signed-off-by: Patrick McHardy # diff -Nru a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c --- a/net/ipv4/ip_gre.c 2004-10-03 22:19:31 +02:00 +++ b/net/ipv4/ip_gre.c 2004-10-03 22:19:31 +02:00 @@ -1250,7 +1250,7 @@ static int __init ipgre_init(void) { - int err = -EINVAL; + int err; printk(KERN_INFO "GRE over IPv4 tunneling driver\n"); @@ -1263,18 +1263,19 @@ ipgre_tunnel_setup); if (!ipgre_fb_tunnel_dev) { err = -ENOMEM; - goto fail; + goto err1; } ipgre_fb_tunnel_dev->init = ipgre_fb_tunnel_init; if ((err = register_netdev(ipgre_fb_tunnel_dev))) - goto fail; + goto err2; out: return err; -fail: - inet_del_protocol(&ipgre_protocol, IPPROTO_GRE); +err2: free_netdev(ipgre_fb_tunnel_dev); +err1: + inet_del_protocol(&ipgre_protocol, IPPROTO_GRE); goto out; } --------------010601070104040304020902-- From kaber@trash.net Sun Oct 3 14:13:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 14:13:25 -0700 (PDT) Received: from gw.localnet ([62.206.217.67]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93LDH7l022880 for ; Sun, 3 Oct 2004 14:13:18 -0700 Received: from [172.16.1.123] (helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1CEDls-0003mP-00; Sun, 03 Oct 2004 23:19:56 +0200 Message-ID: <41606B55.8010105@trash.net> Date: Sun, 03 Oct 2004 23:12:53 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: netdev@oss.sgi.com Subject: [PATCH 2.6 2/7]: Remove useless variable in tc_ctl_tfilter Content-Type: multipart/mixed; boundary="------------030605040500090404080507" X-archive-position: 9831 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kaber@trash.net Precedence: bulk X-list: netdev Content-Length: 2029 Lines: 71 This is a multi-part message in MIME format. --------------030605040500090404080507 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Remove useless variable that confused me. --------------030605040500090404080507 Content-Type: text/x-patch; name="02.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="02.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/03 20:29:51+02:00 kaber@coreworks.de # [NET_SCHED]: Remove useless variable in tc_ctl_tfilter # # Signed-off-by: Patrick McHardy # # net/sched/cls_api.c # 2004/10/03 20:29:23+02:00 kaber@coreworks.de +4 -4 # [NET_SCHED]: Remove useless variable in tc_ctl_tfilter # # Signed-off-by: Patrick McHardy # diff -Nru a/net/sched/cls_api.c b/net/sched/cls_api.c --- a/net/sched/cls_api.c 2004-10-03 22:18:34 +02:00 +++ b/net/sched/cls_api.c 2004-10-03 22:18:34 +02:00 @@ -139,7 +139,7 @@ struct tcf_proto_ops *tp_ops; struct Qdisc_class_ops *cops; unsigned long cl = 0; - unsigned long fh, fh_s; + unsigned long fh; int err; if (prio == 0) { @@ -249,7 +249,7 @@ } else if (tca[TCA_KIND-1] && rtattr_strcmp(tca[TCA_KIND-1], tp->ops->kind)) goto errout; - fh_s = fh = tp->ops->get(tp, t->tcm_handle); + fh = tp->ops->get(tp, t->tcm_handle); if (fh == 0) { if (n->nlmsg_type == RTM_DELTFILTER && t->tcm_handle == 0) { @@ -257,7 +257,7 @@ *back = tp->next; qdisc_unlock_tree(dev); - tfilter_notify(skb, n, tp, fh_s, RTM_DELTFILTER); + tfilter_notify(skb, n, tp, fh, RTM_DELTFILTER); tcf_destroy(tp); err = 0; goto errout; @@ -276,7 +276,7 @@ case RTM_DELTFILTER: err = tp->ops->delete(tp, fh); if (err == 0) - tfilter_notify(skb, n, tp, fh_s, RTM_DELTFILTER); + tfilter_notify(skb, n, tp, fh, RTM_DELTFILTER); goto errout; case RTM_GETTFILTER: err = tfilter_notify(skb, n, tp, fh, RTM_NEWTFILTER); --------------030605040500090404080507-- From kaber@trash.net Sun Oct 3 14:13:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 14:13:37 -0700 (PDT) Received: from gw.localnet ([62.206.217.67]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93LDUS5023020 for ; Sun, 3 Oct 2004 14:13:31 -0700 Received: from [172.16.1.123] (helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1CEDm5-0003ml-00; Sun, 03 Oct 2004 23:20:09 +0200 Message-ID: <41606B62.8020303@trash.net> Date: Sun, 03 Oct 2004 23:13:06 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: netdev@oss.sgi.com Subject: [PATCH 2.6 4/7]: Fix free_netdev after failed alloc_netdev in ipip_init Content-Type: multipart/mixed; boundary="------------010704060704000104070009" X-archive-position: 9833 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kaber@trash.net Precedence: bulk X-list: netdev Content-Length: 1495 Lines: 60 This is a multi-part message in MIME format. --------------010704060704000104070009 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Same problem as in ip_gre: Passing a NULL-ptr to free_netdev is wrong. --------------010704060704000104070009 Content-Type: text/x-patch; name="04.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="04.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/03 20:41:00+02:00 kaber@coreworks.de # [IPV4]: Fix free_netdev after failed alloc_netdev in ipip_init # # Signed-off-by: Patrick McHardy # # net/ipv4/ipip.c # 2004/10/03 20:40:18+02:00 kaber@coreworks.de +5 -4 # [IPV4]: Fix free_netdev after failed alloc_netdev in ipip_init # # Signed-off-by: Patrick McHardy # diff -Nru a/net/ipv4/ipip.c b/net/ipv4/ipip.c --- a/net/ipv4/ipip.c 2004-10-03 22:20:28 +02:00 +++ b/net/ipv4/ipip.c 2004-10-03 22:20:28 +02:00 @@ -876,18 +876,19 @@ ipip_tunnel_setup); if (!ipip_fb_tunnel_dev) { err = -ENOMEM; - goto fail; + goto err1; } ipip_fb_tunnel_dev->init = ipip_fb_tunnel_init; if ((err = register_netdev(ipip_fb_tunnel_dev))) - goto fail; + goto err2; out: return err; - fail: - xfrm4_tunnel_deregister(&ipip_handler); + err2: free_netdev(ipip_fb_tunnel_dev); + err1: + xfrm4_tunnel_deregister(&ipip_handler); goto out; } --------------010704060704000104070009-- From kaber@trash.net Sun Oct 3 14:13:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 14:13:55 -0700 (PDT) Received: from gw.localnet ([62.206.217.67]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93LDnVa023448 for ; Sun, 3 Oct 2004 14:13:49 -0700 Received: from [172.16.1.123] (helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1CEDmI-0003mw-00; Sun, 03 Oct 2004 23:20:22 +0200 Message-ID: <41606B6F.5040204@trash.net> Date: Sun, 03 Oct 2004 23:13:19 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: netdev@oss.sgi.com Subject: [PATCH 2.6 5/7]: Fix ipip_fb_tunnel_dev leak in ipip_fini Content-Type: multipart/mixed; boundary="------------080504090100040504060908" X-archive-position: 9834 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kaber@trash.net Precedence: bulk X-list: netdev Content-Length: 1547 Lines: 53 This is a multi-part message in MIME format. --------------080504090100040504060908 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit ipip_fb_tunnel_dev doesn't have a destructor set and is not freed manually. Set the destructor in ipip_tunnel_setup to fix the leak. --------------080504090100040504060908 Content-Type: text/x-patch; name="05.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="05.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/03 20:42:17+02:00 kaber@coreworks.de # [IPV4]: Fix ipip_fb_tunnel_dev leak in ipip_fini # # Signed-off-by: Patrick McHardy # # net/ipv4/ipip.c # 2004/10/03 20:41:38+02:00 kaber@coreworks.de +1 -1 # [IPV4]: Fix ipip_fb_tunnel_dev leak in ipip_fini # # Signed-off-by: Patrick McHardy # diff -Nru a/net/ipv4/ipip.c b/net/ipv4/ipip.c --- a/net/ipv4/ipip.c 2004-10-03 22:20:49 +02:00 +++ b/net/ipv4/ipip.c 2004-10-03 22:20:49 +02:00 @@ -246,7 +246,6 @@ nt = dev->priv; SET_MODULE_OWNER(dev); dev->init = ipip_tunnel_init; - dev->destructor = free_netdev; nt->parms = *parms; if (register_netdevice(dev) < 0) { @@ -784,6 +783,7 @@ dev->get_stats = ipip_tunnel_get_stats; dev->do_ioctl = ipip_tunnel_ioctl; dev->change_mtu = ipip_tunnel_change_mtu; + dev->destructor = free_netdev; dev->type = ARPHRD_TUNNEL; dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr); --------------080504090100040504060908-- From kaber@trash.net Sun Oct 3 14:13:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 14:14:02 -0700 (PDT) Received: from gw.localnet ([62.206.217.67]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93LDtax023594 for ; Sun, 3 Oct 2004 14:13:55 -0700 Received: from [172.16.1.123] (helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1CEDmT-0003n7-00; Sun, 03 Oct 2004 23:20:33 +0200 Message-ID: <41606B7A.2080101@trash.net> Date: Sun, 03 Oct 2004 23:13:30 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: netdev@oss.sgi.com Subject: [PATCH 2.6 6/7]: Fix free_netdev after failed alloc_netdev in sit_init Content-Type: multipart/mixed; boundary="------------080500050102080509080405" X-archive-position: 9835 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kaber@trash.net Precedence: bulk X-list: netdev Content-Length: 1521 Lines: 60 This is a multi-part message in MIME format. --------------080500050102080509080405 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Same problem as in ip_gre.c and ipip.c: Passing a NULL-ptr to free_netdev is wrong. --------------080500050102080509080405 Content-Type: text/x-patch; name="06.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="06.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/03 20:43:32+02:00 kaber@coreworks.de # [IPV6]: Fix free_netdev after failed alloc_netdev in sit_init # # Signed-off-by: Patrick McHardy # # net/ipv6/sit.c # 2004/10/03 20:43:09+02:00 kaber@coreworks.de +5 -4 # [IPV6]: Fix free_netdev after failed alloc_netdev in sit_init # # Signed-off-by: Patrick McHardy # diff -Nru a/net/ipv6/sit.c b/net/ipv6/sit.c --- a/net/ipv6/sit.c 2004-10-03 22:21:06 +02:00 +++ b/net/ipv6/sit.c 2004-10-03 22:21:06 +02:00 @@ -814,18 +814,19 @@ ipip6_tunnel_setup); if (!ipip6_fb_tunnel_dev) { err = -ENOMEM; - goto fail; + goto err1; } ipip6_fb_tunnel_dev->init = ipip6_fb_tunnel_init; if ((err = register_netdev(ipip6_fb_tunnel_dev))) - goto fail; + goto err2; out: return err; - fail: - inet_del_protocol(&sit_protocol, IPPROTO_IPV6); + err2: free_netdev(ipip6_fb_tunnel_dev); + err1: + inet_del_protocol(&sit_protocol, IPPROTO_IPV6); goto out; } --------------080500050102080509080405-- From kaber@trash.net Sun Oct 3 14:14:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 14:14:16 -0700 (PDT) Received: from gw.localnet ([62.206.217.67]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93LE9kJ023915 for ; Sun, 3 Oct 2004 14:14:09 -0700 Received: from [172.16.1.123] (helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1CEDmh-0003nI-00; Sun, 03 Oct 2004 23:20:47 +0200 Message-ID: <41606B88.1000003@trash.net> Date: Sun, 03 Oct 2004 23:13:44 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: netdev@oss.sgi.com Subject: [PATCH 2.6 7/7]: Missing rtnl_unlock in register_vlan_device error path Content-Type: multipart/mixed; boundary="------------070603080609060007050008" X-archive-position: 9836 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kaber@trash.net Precedence: bulk X-list: netdev Content-Length: 1204 Lines: 44 This is a multi-part message in MIME format. --------------070603080609060007050008 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit rtnl_unlock is not called in the out_free_unregister error path. --------------070603080609060007050008 Content-Type: text/x-patch; name="07.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="07.diff" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/03 20:44:53+02:00 kaber@coreworks.de # [VLAN]: Missing rtnl_unlock in register_vlan_device error path # # Signed-off-by: Patrick McHardy # # net/8021q/vlan.c # 2004/10/03 20:44:27+02:00 kaber@coreworks.de +1 -1 # [VLAN]: Missing rtnl_unlock in register_vlan_device error path # # Signed-off-by: Patrick McHardy # diff -Nru a/net/8021q/vlan.c b/net/8021q/vlan.c --- a/net/8021q/vlan.c 2004-10-03 22:21:30 +02:00 +++ b/net/8021q/vlan.c 2004-10-03 22:21:30 +02:00 @@ -537,7 +537,7 @@ out_free_unregister: unregister_netdev(new_dev); - goto out_put_dev; + goto out_unlock; out_free_newdev: free_netdev(new_dev); --------------070603080609060007050008-- From tgraf@suug.ch Sun Oct 3 14:31:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 14:31:24 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93LVIf3025583 for ; Sun, 3 Oct 2004 14:31:19 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id BDE948B; Sun, 3 Oct 2004 23:30:42 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 126CB1C0E8; Sun, 3 Oct 2004 23:31:25 +0200 (CEST) Date: Sun, 3 Oct 2004 23:31:24 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 0/3] NET: Generic network statistics/estimator Message-ID: <20041003213124.GG14344@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 9837 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 532 Lines: 10 Dave, The following patchset introduces generic network statistics for netlink users. It uses nested TLV which prevents further compatibility problems when introducing new statistics. Backward compatibility to existing TLV types TCA_STATS and TCA_XSTATS is ensured but can be easly removed once it is no longer needed. Therefore prior users of struct tc_stats can be converted to this API and existing userspace applications will not notice a difference while converted applications can use the new extendable statistic interface. From tgraf@suug.ch Sun Oct 3 14:34:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 14:34:41 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93LYY73025944 for ; Sun, 3 Oct 2004 14:34:34 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id AE83D8B; Sun, 3 Oct 2004 23:33:59 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id D5DB51C0E8; Sun, 3 Oct 2004 23:34:42 +0200 (CEST) Date: Sun, 3 Oct 2004 23:34:42 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 1/3] NET: Generic network statistics API Message-ID: <20041003213442.GH14344@postel.suug.ch> References: <20041003213124.GG14344@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041003213124.GG14344@postel.suug.ch> X-archive-position: 9838 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 6189 Lines: 240 Generic network statistics API for netlink users. Signed-off-by: Thomas Graf --- linux-2.6.9-rc3.orig/include/net/gen_stats.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.9-rc3/include/net/gen_stats.h 2004-10-03 22:18:55.000000000 +0200 @@ -0,0 +1,45 @@ +#ifndef __NET_GEN_STATS_H +#define __NET_GEN_STATS_H + +#include +#include +#include +#include + +struct gnet_dump +{ + spinlock_t * lock; + struct sk_buff * skb; + struct rtattr * tail; + + /* Backward compatability */ + int compat_tc_stats; + int compat_xstats; + struct rtattr * xstats; + struct tc_stats tc_stats; +}; + +extern int gnet_stats_start_copy(struct sk_buff *skb, int type, + spinlock_t *lock, struct gnet_dump *d); + +extern int gnet_stats_start_copy_compat(struct sk_buff *skb, int type, + int tc_stats_type,int xstats_type, + spinlock_t *lock, struct gnet_dump *d); + +extern int gnet_stats_copy_basic(struct gnet_dump *d, + struct gnet_stats_basic *b); +extern int gnet_stats_copy_rate_est(struct gnet_dump *d, + struct gnet_stats_rate_est *r); +extern int gnet_stats_copy_queue(struct gnet_dump *d, + struct gnet_stats_queue *q); +extern int gnet_stats_copy_app(struct gnet_dump *d, void *st, int len); + +extern int gnet_stats_finish_copy(struct gnet_dump *d); + +extern int gen_new_estimator(struct gnet_stats_basic *bstats, + struct gnet_stats_rate_est *rate_est, + spinlock_t *stats_lock, struct rtattr *opt); +extern void gen_kill_estimator(struct gnet_stats_basic *bstats, + struct gnet_stats_rate_est *rate_est); + +#endif --- linux-2.6.9-rc3.orig/include/linux/gen_stats.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.9-rc3/include/linux/gen_stats.h 2004-10-03 22:58:21.000000000 +0200 @@ -0,0 +1,50 @@ +#ifndef __LINUX_GEN_STATS_H +#define __LINUX_GEN_STATS_H + +#include + +enum { + TCA_STATS_UNSPEC, + TCA_STATS_BASIC, + TCA_STATS_RATE_EST, + TCA_STATS_QUEUE, + TCA_STATS_APP, + __TCA_STATS_MAX, +}; +#define TCA_STATS_MAX (__TCA_STATS_MAX - 1) + +/** + * @bytes: number of seen bytes + * @packets: number of seen packets + */ +struct gnet_stats_basic +{ + __u64 bytes; + __u32 packets; +}; + +/** + * @bps: current byte rate + * @pps: current packet rate + */ +struct gnet_stats_rate_est +{ + __u32 bps; + __u32 pps; +}; + +/** + * @qlen: queue length + * @backlog: backlog size of queue + * @drops: number of dropped packets + * @requeues: number of requeues + */ +struct gnet_stats_queue +{ + __u32 qlen; + __u32 backlog; + __u32 drops; + __u32 requeues; + __u32 overlimits; +}; +#endif /* __LINUX_GEN_STATS_H */ --- linux-2.6.9-rc3.orig/net/core/gen_stats.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.9-rc3/net/core/gen_stats.c 2004-10-03 22:22:43.000000000 +0200 @@ -0,0 +1,132 @@ +/* + * net/core/gen_stats.c + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * Authors: Thomas Graf + * Jamal Hadi Salim + * Alexey Kuznetsov, + * + * See Documentation/networking/gen_stats.txt + */ + +#include +#include +#include +#include +#include +#include +#include +#include + + +static inline int +gnet_stats_copy(struct gnet_dump *d, int type, void *buf, int size) +{ + RTA_PUT(d->skb, type, size, buf); + return 0; + +rtattr_failure: + spin_unlock_bh(d->lock); + return -1; +} + +int +gnet_stats_start_copy_compat(struct sk_buff *skb, int type, int tc_stats_type, + int xstats_type, spinlock_t *lock, struct gnet_dump *d) +{ + spin_lock_bh(lock); + d->lock = lock; + d->tail = (struct rtattr *) skb->tail; + d->skb = skb; + d->compat_tc_stats = tc_stats_type; + d->compat_xstats = xstats_type; + d->xstats = NULL; + + if (d->compat_tc_stats) + memset(&d->tc_stats, 0, sizeof(d->tc_stats)); + + return gnet_stats_copy(d, type, NULL, 0); +} + +int +gnet_stats_start_copy(struct sk_buff *skb, int type, spinlock_t *lock, + struct gnet_dump *d) +{ + return gnet_stats_start_copy_compat(skb, type, 0, 0, lock, d); +} + + +int +gnet_stats_copy_basic(struct gnet_dump *d, struct gnet_stats_basic *b) +{ + if (d->compat_tc_stats) { + d->tc_stats.bytes = b->bytes; + d->tc_stats.packets = b->packets; + } + + return gnet_stats_copy(d, TCA_STATS_BASIC, b, sizeof(*b)); +} + +int +gnet_stats_copy_rate_est(struct gnet_dump *d, struct gnet_stats_rate_est *r) +{ + if (d->compat_tc_stats) { + d->tc_stats.bps = r->bps; + d->tc_stats.pps = r->pps; + } + + return gnet_stats_copy(d, TCA_STATS_RATE_EST, r, sizeof(*r)); +} + +int +gnet_stats_copy_queue(struct gnet_dump *d, struct gnet_stats_queue *q) +{ + if (d->compat_tc_stats) { + d->tc_stats.drops = q->drops; + d->tc_stats.qlen = q->qlen; + d->tc_stats.backlog = q->backlog; + d->tc_stats.overlimits = q->overlimits; + } + + return gnet_stats_copy(d, TCA_STATS_QUEUE, q, sizeof(*q)); +} + +int +gnet_stats_copy_app(struct gnet_dump *d, void *st, int len) +{ + if (d->compat_xstats) + d->xstats = (struct rtattr *) d->skb->tail; + return gnet_stats_copy(d, TCA_STATS_APP, st, len); +} + +int +gnet_stats_finish_copy(struct gnet_dump *d) +{ + d->tail->rta_len = d->skb->tail - (u8 *) d->tail; + + if (d->compat_tc_stats) + if (gnet_stats_copy(d, d->compat_tc_stats, &d->tc_stats, + sizeof(d->tc_stats)) < 0) + return -1; + + if (d->compat_xstats && d->xstats) { + if (gnet_stats_copy(d, d->compat_xstats, RTA_DATA(d->xstats), + RTA_PAYLOAD(d->xstats)) < 0) + return -1; + } + + spin_unlock_bh(d->lock); + return 0; +} + + +EXPORT_SYMBOL(gnet_stats_start_copy); +EXPORT_SYMBOL(gnet_stats_copy_basic); +EXPORT_SYMBOL(gnet_stats_copy_rate_est); +EXPORT_SYMBOL(gnet_stats_copy_queue); +EXPORT_SYMBOL(gnet_stats_copy_app); +EXPORT_SYMBOL(gnet_stats_finish_copy); From tgraf@suug.ch Sun Oct 3 14:39:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 14:39:52 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93Ldl0T026284 for ; Sun, 3 Oct 2004 14:39:47 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 544A98B; Sun, 3 Oct 2004 23:39:12 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id E8A4C1C0E8; Sun, 3 Oct 2004 23:39:54 +0200 (CEST) Date: Sun, 3 Oct 2004 23:39:54 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2/3] NET: Generic rate estimator Message-ID: <20041003213954.GI14344@postel.suug.ch> References: <20041003213124.GG14344@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041003213124.GG14344@postel.suug.ch> X-archive-position: 9839 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 6605 Lines: 235 Introduces a generic rate estimator based on timers. Patch is based on Jamal's patch and adapted to the new generic network statistics API. Signed-off-by: Thomas Graf --- linux-2.6.9-rc3.orig/include/linux/gen_stats.h 2004-10-03 23:00:15.000000000 +0200 +++ linux-2.6.9-rc3/include/linux/gen_stats.h 2004-10-03 23:00:19.000000000 +0200 @@ -47,4 +47,16 @@ __u32 requeues; __u32 overlimits; }; + +/** + * @interval: sampling period + * @ewma_log: the log of measurement window weight + */ +struct gnet_estimator +{ + signed char interval; + unsigned char ewma_log; +}; + + #endif /* __LINUX_GEN_STATS_H */ --- linux-2.6.9-rc3.orig/net/core/gen_estimator.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.9-rc3/net/core/gen_estimator.c 2004-10-03 22:43:03.000000000 +0200 @@ -0,0 +1,208 @@ +/* + * net/sched/gen_estimator.c Simple rate estimator. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * Authors: Alexey Kuznetsov, + * + * Changes: + * Jamal Hadi Salim - moved it to net/core and reshulfed + * names to make it usable in general net subsystem. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + This code is NOT intended to be used for statistics collection, + its purpose is to provide a base for statistical multiplexing + for controlled load service. + If you need only statistics, run a user level daemon which + periodically reads byte counters. + + Unfortunately, rate estimation is not a very easy task. + F.e. I did not find a simple way to estimate the current peak rate + and even failed to formulate the problem 8)8) + + So I preferred not to built an estimator into the scheduler, + but run this task separately. + Ideally, it should be kernel thread(s), but for now it runs + from timers, which puts apparent top bounds on the number of rated + flows, has minimal overhead on small, but is enough + to handle controlled load service, sets of aggregates. + + We measure rate over A=(1<next) { + u64 nbytes; + u32 npackets; + u32 rate; + + spin_lock(e->stats_lock); + nbytes = e->bstats->bytes; + npackets = e->bstats->packets; + rate = (nbytes - e->last_bytes)<<(7 - idx); + e->last_bytes = nbytes; + e->avbps += ((long)rate - (long)e->avbps) >> e->ewma_log; + e->rate_est->bps = (e->avbps+0xF)>>5; + + rate = (npackets - e->last_packets)<<(12 - idx); + e->last_packets = npackets; + e->avpps += ((long)rate - (long)e->avpps) >> e->ewma_log; + e->rate_est->pps = (e->avpps+0x1FF)>>10; + spin_unlock(e->stats_lock); + } + + mod_timer(&elist[idx].timer, jiffies + ((HZ/4)<interval < -2 || parm->interval > 3) + return -EINVAL; + + est = kmalloc(sizeof(*est), GFP_KERNEL); + if (est == NULL) + return -ENOBUFS; + + memset(est, 0, sizeof(*est)); + est->interval = parm->interval + 2; + est->bstats = bstats; + est->rate_est = rate_est; + est->stats_lock = stats_lock; + est->ewma_log = parm->ewma_log; + est->last_bytes = bstats->bytes; + est->avbps = rate_est->bps<<5; + est->last_packets = bstats->packets; + est->avpps = rate_est->pps<<10; + + est->next = elist[est->interval].list; + if (est->next == NULL) { + init_timer(&elist[est->interval].timer); + elist[est->interval].timer.data = est->interval; + elist[est->interval].timer.expires = jiffies + ((HZ/4)<interval); + elist[est->interval].timer.function = est_timer; + add_timer(&elist[est->interval].timer); + } + write_lock_bh(&est_lock); + elist[est->interval].list = est; + write_unlock_bh(&est_lock); + return 0; +} + +void gen_kill_estimator(struct gnet_stats_basic *bstats, + struct gnet_stats_rate_est *rate_est) +{ + int idx; + struct gen_estimator *est, **pest; + + for (idx=0; idx <= EST_MAX_INTERVAL; idx++) { + int killed = 0; + pest = &elist[idx].list; + while ((est=*pest) != NULL) { + if (est->rate_est != rate_est || est->bstats != bstats) { + pest = &est->next; + continue; + } + + write_lock_bh(&est_lock); + *pest = est->next; + write_unlock_bh(&est_lock); + + kfree(est); + killed++; + } + if (killed && elist[idx].list == NULL) + del_timer(&elist[idx].timer); + } +} + +EXPORT_SYMBOL(gen_new_estimator); +EXPORT_SYMBOL(gen_kill_estimator); From tgraf@suug.ch Sun Oct 3 14:41:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 14:41:45 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93Lfd75026647 for ; Sun, 3 Oct 2004 14:41:39 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id B3B6A8B; Sun, 3 Oct 2004 23:41:04 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 151B01C0E8; Sun, 3 Oct 2004 23:41:47 +0200 (CEST) Date: Sun, 3 Oct 2004 23:41:46 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 3/3] NET: Generic network statistics/estimator documentation Message-ID: <20041003214146.GJ14344@postel.suug.ch> References: <20041003213124.GG14344@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041003213124.GG14344@postel.suug.ch> X-archive-position: 9840 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 4031 Lines: 125 Documentation of generic network statistics and estimator API. Signed-off-by: Thomas Graf --- linux-2.6.9-rc3.orig/Documentation/networking/gen_stats.txt 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.9-rc3/Documentation/networking/gen_stats.txt 2004-10-03 22:33:57.000000000 +0200 @@ -0,0 +1,117 @@ +Generic networking statistics for netlink users +====================================================================== + +Statistic counters are grouped into structs: + +Struct TLV type Description +---------------------------------------------------------------------- +gnet_stats_basic TCA_STATS_BASIC Basic statistics +gnet_stats_rate_est TCA_STATS_RATE_EST Rate estimator +gnet_stats_queue TCA_STATS_QUEUE Queue statistics +none TCA_STATS_APP Application specific + + +Collecting: +----------- + +Declare the statistic structs you need: +struct mystruct { + struct gnet_stats_basic bstats; + struct gnet_stats_queue qstats; + ... +}; + +Update statistics: +mystruct->tstats.packet++; +mystruct->qstats.backlog += skb->pkt_len; + + +Export to userspace (Dump): +--------------------------- + +my_dumping_routine(struct sk_buff *skb, ...) +{ + struct gnet_dump dump; + + if (gnet_stats_start_copy(skb, TCA_STATS2, &mystruct->lock, &dump) < 0) + goto rtattr_failure; + + if (gnet_stats_copy_basic(&dump, &mystruct->bstats) < 0 || + gnet_stats_copy_queue(&dump, &mystruct->qstats) < 0 || + gnet_stats_copy_app(&dump, &xstats, sizeof(xstats)) < 0) + goto rtattr_failure; + + if (gnet_stats_finish_copy(&dump) < 0) + goto rtattr_failure; + ... +} + +TCA_STATS/TCA_XSTATS backward compatibility: +-------------------------------------------- + +Prior users of struct tc_stats and xstats can maintain backward +compatibility by calling the compat wrappers to keep providing the +existing TLV types. + +my_dumping_routine(struct sk_buff *skb, ...) +{ + if (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS, + TCA_XSTATS, &mystruct->lock, &dump) < 0) + goto rtattr_failure; + ... +} + +A struct tc_stats will be filled out during gnet_stats_copy_* calls +and appended to the skb. TCA_XSTATS is provided if gnet_stats_copy_app +was called. + + +Locking: +-------- + +Locks are taken before writing and released once all statistics have +been written. Locks are always released in case of an error. You +are responsible for making sure that the lock is initialized. + + +Rate Estimator: +-------------- + +0) Prepare an estimator attribute. Most likely this would be in user + space. The value of this TLV should contain a tc_estimator structure. + As usual, such a TLV nees to be 32 bit aligned and therefore the + length needs to be appropriately set etc. The estimator interval + and ewma log need to be converted to the appropriate values. + tc_estimator.c::tc_setup_estimator() is advisable to be used as the + conversion routine. It does a few clever things. It takes a time + interval in microsecs, a time constant also in microsecs and a struct + tc_estimator to be populated. The returned tc_estimator can be + transported to the kernel. Transfer such a structure in a TLV of type + TCA_RATE to your code in the kernel. + +In the kernel when setting up: +1) make sure you have basic stats and rate stats setup first. +2) make sure you have initialized stats lock that is used to setup such + stats. +3) Now initialize a new estimator: + + int ret = gen_new_estimator(my_basicstats,my_rate_est_stats, + mystats_lock, attr_with_tcestimator_struct); + + if ret == 0 + success + else + failed + +From now on, everytime you dump my_rate_est_stats it will contain +uptodate info. + +Once you are done, call gen_kill_estimator(my_basicstats, +my_rate_est_stats) Make sure that my_basicstats and my_rate_est_stats +are still valid (i.e still exist) at the time of making this call. + + +Authors: +-------- +Thomas Graf +Jamal Hadi Salim From tgraf@suug.ch Sun Oct 3 14:46:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 14:46:57 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93LkrlO027009 for ; Sun, 3 Oct 2004 14:46:53 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 4231F8B; Sun, 3 Oct 2004 23:46:18 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id CD03B1C0E8; Sun, 3 Oct 2004 23:47:00 +0200 (CEST) Date: Sun, 3 Oct 2004 23:47:00 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: [PATCH 0/3] NET: Generic network statistics/estimator Message-ID: <20041003214700.GK14344@postel.suug.ch> References: <20041003213124.GG14344@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041003213124.GG14344@postel.suug.ch> X-archive-position: 9841 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 310 Lines: 8 > The following patchset introduces generic network statistics for netlink > users. Forgot to mention that Jamal was heavily involved in this work and is the actual initiator of this idea. See previous discussion in: * RFC/PATCH capture qdisc requeue event in stats * [PATCH 2.6] generic network statistics From davem@davemloft.net Sun Oct 3 14:52:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 14:52:58 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93LqrkS027403 for ; Sun, 3 Oct 2004 14:52:53 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEEFN-0003IC-00; Sun, 03 Oct 2004 14:50:25 -0700 Date: Sun, 3 Oct 2004 14:50:24 -0700 From: "David S. Miller" To: Herbert Xu Cc: netdev@oss.sgi.com, ak@suse.de, jheffner@psc.edu Subject: Re: Current 2.6.x TSO state Message-Id: <20041003145024.158b4382.davem@davemloft.net> In-Reply-To: <20041001130609.GA6979@gondor.apana.org.au> References: <20040930213221.06a3f5b3.davem@davemloft.net> <20041001130609.GA6979@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9842 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 337 Lines: 11 On Fri, 1 Oct 2004 23:06:09 +1000 Herbert Xu wrote: > On Thu, Sep 30, 2004 at 09:32:21PM -0700, David S. Miller wrote: > > > > diff4) Obey MSS in tso handling, shrink tcp_skb_cb > > This looks great. But can we please rename tcp_skb_psize to > tcp_skb_mss? Sure, no problem, I've done that in my tree. From davem@davemloft.net Sun Oct 3 14:54:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 14:54:34 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93LsTgD027724 for ; Sun, 3 Oct 2004 14:54:29 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEEGw-0003Ig-00; Sun, 03 Oct 2004 14:52:02 -0700 Date: Sun, 3 Oct 2004 14:52:02 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: netdev@oss.sgi.com Subject: Re: [PATCH] (1/3) tcp - choose congestion algorithm at initialization Message-Id: <20041003145202.6fe994fb.davem@davemloft.net> In-Reply-To: <20041001155554.51763dc0@zqx3.pdx.osdl.net> References: <20040927111834.48c7baab@zqx3.pdx.osdl.net> <20040927121610.68f942a4.davem@redhat.com> <20041001155554.51763dc0@zqx3.pdx.osdl.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9843 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 274 Lines: 9 On Fri, 1 Oct 2004 15:55:54 -0700 Stephen Hemminger wrote: > Here is the 2.4 version of the change to store congest algorithm > per socket. > > Signed-off-by: Stephen Hemminger Applied, thanks for following up on this Stephen. From davem@davemloft.net Sun Oct 3 14:55:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 14:55:53 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93Ltm7P028060 for ; Sun, 3 Oct 2004 14:55:49 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEEIH-0003J4-00; Sun, 03 Oct 2004 14:53:25 -0700 Date: Sun, 3 Oct 2004 14:53:25 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: Davem@redhat.com, netdev@oss.sgi.com Subject: Re: [PATCH] (2/3) tcp diag info for 2.4 Message-Id: <20041003145325.14540736.davem@davemloft.net> In-Reply-To: <20041001155620.2f11f9f0@zqx3.pdx.osdl.net> References: <20041001155620.2f11f9f0@zqx3.pdx.osdl.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9844 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 274 Lines: 9 On Fri, 1 Oct 2004 15:56:20 -0700 Stephen Hemminger wrote: > This adds vegas style bandwidth info to 2.4. > Also: makes 2.6 and 2.4 version of tcp_diag.h identical. > > Signed-off-by: Stephen Hemminger Applied, thanks Stephen. From davem@davemloft.net Sun Oct 3 14:58:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 14:58:30 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93LwPVT028395 for ; Sun, 3 Oct 2004 14:58:25 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEEKe-0003Ja-00; Sun, 03 Oct 2004 14:55:52 -0700 Date: Sun, 3 Oct 2004 14:55:52 -0700 From: "David S. Miller" To: Herbert Xu Cc: laforge@gnumonks.org, netdev@oss.sgi.com Subject: Re: [6/6]: jenkins hash for neigh Message-Id: <20041003145552.0b1cc0d8.davem@davemloft.net> In-Reply-To: <20041002075051.GA18037@gondor.apana.org.au> References: <20040925005623.2faf8faf.davem@davemloft.net> <20040927111520.4f495b17.davem@davemloft.net> <20041002075051.GA18037@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9845 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 982 Lines: 28 On Sat, 2 Oct 2004 17:50:51 +1000 Herbert Xu wrote: > On Mon, Sep 27, 2004 at 11:15:20AM -0700, David S. Miller wrote: > > On Mon, 27 Sep 2004 21:48:33 +1000 > > Herbert Xu wrote: > > > > > > - if (tbl->entries > (tbl->hash_mask + 1)) > > > > + if (tbl->entries > (tbl->hash_mask + 1)) { > > > > + write_lock_bh(&tbl->lock); > > > > neigh_hash_grow(tbl, (tbl->hash_mask + 1) << 1); > > > > + write_unlock_bh(&tbl->lock); > > > > + } > > > > > > The locking should be outside the if block as otherwise you may grow > > > unnecessarily or grow into the same size :) > > > > I'm not going to do that, because then we're grabbing that lock > > twice on every neigh create operation and I was trying hard > > to avoid that overhead. > > Actually, why don't we just move the expansion into the locked section? > > Signed-off-by: Herbert Xu Works for me, patch applied. Thanks Herbert. From davem@davemloft.net Sun Oct 3 14:59:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 14:59:56 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93Lxp8q028720 for ; Sun, 3 Oct 2004 14:59:51 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEEMB-0003Ju-00; Sun, 03 Oct 2004 14:57:27 -0700 Date: Sun, 3 Oct 2004 14:57:27 -0700 From: "David S. Miller" To: yoshfuji@linux-ipv6.org Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6] [IPV6] SIT: dst leakage in error path. Message-Id: <20041003145727.5a58d236.davem@davemloft.net> In-Reply-To: <20041002.193424.76694251.yoshfuji@linux-ipv6.org> References: <20041002.193138.94763422.yoshfuji@linux-ipv6.org> <20041002.193424.76694251.yoshfuji@linux-ipv6.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i93Lxp8q028720 X-archive-position: 9846 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 477 Lines: 13 On Sat, 02 Oct 2004 19:34:24 +0900 (JST) YOSHIFUJI Hideaki / $B5HF#1QL@(B wrote: > In article <20041002.193138.94763422.yoshfuji@linux-ipv6.org> (at Sat, 02 Oct 2004 19:31:38 +0900 (JST)), YOSHIFUJI Hideaki / $B5HF#1QL@(B says: > > > We failed to put rt in error path. > > > > Signed-off-by: Hideaki YOSHIFUJI > > And this also applies 2.4 (with some fuzz). Applied to both trees, thanks. From davem@davemloft.net Sun Oct 3 15:01:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 15:01:37 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93M1Wjs029068 for ; Sun, 3 Oct 2004 15:01:32 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEENp-0003KA-00; Sun, 03 Oct 2004 14:59:09 -0700 Date: Sun, 3 Oct 2004 14:59:09 -0700 From: "David S. Miller" To: Olaf Hering Cc: ak@suse.de, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] allow CONFIG_NET=n on ppc64 Message-Id: <20041003145909.6dc704dc.davem@davemloft.net> In-Reply-To: <20041002153053.GA2643@suse.de> References: <20040929200158.GA16366@suse.de> <20040929201524.GA14615@wotan.suse.de> <20041002153053.GA2643@suse.de> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9847 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 176 Lines: 6 Olaf, as I requested of you last time, please use attachments for your patches since I can never apply them cleanly when you inline them to the main body text. Thanks a lot. From davem@redhat.com Sun Oct 3 15:03:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 15:03:30 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93M3Opn029397 for ; Sun, 3 Oct 2004 15:03:25 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i93M32OQ030070; Sun, 3 Oct 2004 18:03:02 -0400 Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i93M32r15406; Sun, 3 Oct 2004 18:03:02 -0400 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.11/8.12.10) with SMTP id i93M2j0b009929; Sun, 3 Oct 2004 18:02:45 -0400 Date: Sun, 3 Oct 2004 15:00:52 -0700 From: "David S. Miller" To: Manfred Spraul Cc: netdev@oss.sgi.com Subject: Re: [PATCH] fix secure tcp sequence number generation Message-Id: <20041003150052.4dba0c60.davem@redhat.com> In-Reply-To: <415EEF0E.3080808@colorfullife.com> References: <415EEF0E.3080808@colorfullife.com> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9848 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: 438 Lines: 10 On Sat, 02 Oct 2004 20:10:22 +0200 Manfred Spraul wrote: > Ted's recent random.c update broke the periodic rekeying: > schedule_work() doesn't provide synchronization. Additionally the first > syn values after boot are generated with secret 0 - not good. Are you referring to his changes done back in August or some other change? August is the last time I see that Ted made a change to drivers/char/random.c From davem@redhat.com Sun Oct 3 15:05:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 15:05:13 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93M56Ku029745 for ; Sun, 3 Oct 2004 15:05:06 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i93M4do3030240; Sun, 3 Oct 2004 18:04:50 -0400 Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i93M4dr15620; Sun, 3 Oct 2004 18:04:39 -0400 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.11/8.12.10) with SMTP id i93M4MSG010080; Sun, 3 Oct 2004 18:04:23 -0400 Date: Sun, 3 Oct 2004 15:02:29 -0700 From: "David S. Miller" To: Francois Romieu Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc3] dev_close: use of netif_poll_disable Message-Id: <20041003150229.0eb4fa67.davem@redhat.com> In-Reply-To: <20041002202805.GA16870@electric-eye.fr.zoreil.com> References: <20041002202805.GA16870@electric-eye.fr.zoreil.com> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9849 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: 388 Lines: 12 On Sat, 2 Oct 2004 22:28:05 +0200 Francois Romieu wrote: > Use of identical (comment included) netif_poll_disable(). > > Signed-off-by: Francois Romieu It's not identical. netif_poll_disable() actually sets the __LINK_STATE_RX_SCHED bit when it finally sees it clear. Whereas this code in net/core/dev.c is just waiting for it to clear. From tgraf@suug.ch Sun Oct 3 15:14:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 15:14:48 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93MEhVI030161 for ; Sun, 3 Oct 2004 15:14:44 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 10F378B; Mon, 4 Oct 2004 00:14:08 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 328211C0E8; Mon, 4 Oct 2004 00:14:52 +0200 (CEST) Date: Mon, 4 Oct 2004 00:14:52 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH] PKT_SCHED: Remove useless line in cbq_dump_class Message-ID: <20041003221452.GL14344@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 9851 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 608 Lines: 15 Remove useless line in cbq_dump_class probably introduced by copy&paste from cbq_dump. Signed-off-by: Thomas Graf --- linux-2.6.9-rc3-bk3.orig/net/sched/sch_cbq.c 2004-10-04 00:03:47.000000000 +0200 +++ linux-2.6.9-rc3-bk3/net/sched/sch_cbq.c 2004-10-04 00:07:32.000000000 +0200 @@ -1675,7 +1675,6 @@ cl->xstats.undertime = 0; if (!PSCHED_IS_PASTPERFECT(cl->undertime)) cl->xstats.undertime = PSCHED_TDIFF(cl->undertime, q->now); - q->link.xstats.avgidle = q->link.avgidle; if (cbq_copy_xstats(skb, &cl->xstats)) { spin_unlock_bh(&sch->dev->queue_lock); goto rtattr_failure; From davem@davemloft.net Sun Oct 3 15:14:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 15:14:46 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93MEeLY030156 for ; Sun, 3 Oct 2004 15:14:41 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEEaW-0003Lt-00; Sun, 03 Oct 2004 15:12:16 -0700 Date: Sun, 3 Oct 2004 15:12:16 -0700 From: "David S. Miller" To: hadi@cyberus.ca Cc: netdev@oss.sgi.com Subject: Re: Resend WAS(Re: cls patchlet Message-Id: <20041003151216.5a56531f.davem@davemloft.net> In-Reply-To: <1096834352.1046.349.camel@jzny.localdomain> References: <1096833127.1048.333.camel@jzny.localdomain> <1096834352.1046.349.camel@jzny.localdomain> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9850 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 3208 Lines: 83 On 03 Oct 2004 16:12:32 -0400 jamal wrote: > Ignore previous. This is better formated ;-> Any particular reason not to remove this work into the common code in tcf_action_exec()? Like so: ===== include/net/pkt_sched.h 1.23 vs edited ===== --- 1.23/include/net/pkt_sched.h 2004-09-28 13:58:51 -07:00 +++ edited/include/net/pkt_sched.h 2004-10-03 14:50:35 -07:00 @@ -376,7 +376,7 @@ struct tc_action_ops extern int tcf_register_action(struct tc_action_ops *a); extern int tcf_unregister_action(struct tc_action_ops *a); extern void tcf_action_destroy(struct tc_action *a, int bind); -extern int tcf_action_exec(struct sk_buff *skb, struct tc_action *a); +extern int tcf_action_exec(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res); extern int tcf_action_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a,char *n, int ovr, int bind); extern int tcf_action_init_1(struct rtattr *rta, struct rtattr *est, struct tc_action *a,char *n, int ovr, int bind); extern int tcf_action_dump(struct sk_buff *skb, struct tc_action *a, int, int); ===== net/sched/act_api.c 1.4 vs edited ===== --- 1.4/net/sched/act_api.c 2004-06-29 14:20:44 -07:00 +++ edited/net/sched/act_api.c 2004-10-03 14:51:41 -07:00 @@ -155,7 +155,7 @@ struct tc_action_ops *tc_lookup_action_i return a; } -int tcf_action_exec(struct sk_buff *skb,struct tc_action *act) +int tcf_action_exec(struct sk_buff *skb,struct tc_action *act, struct tcf_result *res) { struct tc_action *a; @@ -164,7 +164,8 @@ int tcf_action_exec(struct sk_buff *skb, if (skb->tc_verd & TC_NCLS) { skb->tc_verd = CLR_TC_NCLS(skb->tc_verd); D2PRINTK("(%p)tcf_action_exec: cleared TC_NCLS in %s out %s\n",skb,skb->input_dev?skb->input_dev->name:"xxx",skb->dev->name); - return TC_ACT_OK; + ret = TC_ACT_OK; + goto exec_done; } while ((a = act) != NULL) { repeat: @@ -186,6 +187,11 @@ repeat: } exec_done: + if (skb->tc_classid > 0) { + res->classid = skb->tc_classid; + res->class = 0; + skb->tc_classid = 0; + } return ret; } ===== net/sched/cls_fw.c 1.8 vs edited ===== --- 1.8/net/sched/cls_fw.c 2004-07-06 14:26:23 -07:00 +++ edited/net/sched/cls_fw.c 2004-10-03 14:52:05 -07:00 @@ -102,7 +102,7 @@ static int fw_classify(struct sk_buff *s } #endif if (f->action) { - int pol_res = tcf_action_exec(skb, f->action); + int pol_res = tcf_action_exec(skb, f->action, res); if (pol_res >= 0) return pol_res; } else ===== net/sched/cls_u32.c 1.16 vs edited ===== --- 1.16/net/sched/cls_u32.c 2004-07-29 15:44:49 -07:00 +++ edited/net/sched/cls_u32.c 2004-10-03 14:52:00 -07:00 @@ -175,12 +175,7 @@ check_terminal: #endif #ifdef CONFIG_NET_CLS_ACT if (n->action) { - int pol_res = tcf_action_exec(skb, n->action); - if (skb->tc_classid > 0) { - res->classid = skb->tc_classid; - skb->tc_classid = 0; - } - + int pol_res = tcf_action_exec(skb, n->action, res); if (pol_res >= 0) return pol_res; } else From hadi@cyberus.ca Sun Oct 3 15:22:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 15:23:02 -0700 (PDT) Received: from mx01.cybersurf.com (mx01.cybersurf.com [209.197.145.104]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93MMtRv030869 for ; Sun, 3 Oct 2004 15:22:58 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx01.cybersurf.com with esmtp (Exim 4.20) id 1CEEkc-0004D7-Mb for netdev@oss.sgi.com; Sun, 03 Oct 2004 18:22:42 -0400 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CEEka-0005j2-7l; Sun, 03 Oct 2004 18:22:40 -0400 Subject: Re: Resend WAS(Re: cls patchlet From: jamal Reply-To: hadi@cyberus.ca To: "David S. Miller" Cc: netdev@oss.sgi.com In-Reply-To: <20041003151216.5a56531f.davem@davemloft.net> References: <1096833127.1048.333.camel@jzny.localdomain> <1096834352.1046.349.camel@jzny.localdomain> <20041003151216.5a56531f.davem@davemloft.net> Content-Type: text/plain Organization: jamalopolous Message-Id: <1096842156.1047.357.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 03 Oct 2004 18:22:37 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 9852 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev Content-Length: 391 Lines: 16 On Sun, 2004-10-03 at 18:12, David S. Miller wrote: > On 03 Oct 2004 16:12:32 -0400 > jamal wrote: > > > Ignore previous. This is better formated ;-> > > Any particular reason not to remove this work into the > common code in tcf_action_exec()? Like so: Looks good ;-> Go ahead and push that instead and i will run my regression tests on your changes. cheers, jamal From davem@davemloft.net Sun Oct 3 15:25:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 15:25:11 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93MP6rY031210 for ; Sun, 3 Oct 2004 15:25:06 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEEkd-0003N9-00; Sun, 03 Oct 2004 15:22:43 -0700 Date: Sun, 3 Oct 2004 15:22:43 -0700 From: "David S. Miller" To: hadi@cyberus.ca Cc: netdev@oss.sgi.com Subject: Re: Resend WAS(Re: cls patchlet Message-Id: <20041003152243.0fc2a93d.davem@davemloft.net> In-Reply-To: <1096842156.1047.357.camel@jzny.localdomain> References: <1096833127.1048.333.camel@jzny.localdomain> <1096834352.1046.349.camel@jzny.localdomain> <20041003151216.5a56531f.davem@davemloft.net> <1096842156.1047.357.camel@jzny.localdomain> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9853 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 500 Lines: 17 On 03 Oct 2004 18:22:37 -0400 jamal wrote: > > On Sun, 2004-10-03 at 18:12, David S. Miller wrote: > > On 03 Oct 2004 16:12:32 -0400 > > jamal wrote: > > > > > Ignore previous. This is better formated ;-> > > > > Any particular reason not to remove this work into the > > common code in tcf_action_exec()? Like so: > > Looks good ;-> Go ahead and push that instead and i will run my > regression tests on your changes. Great, thanks for the quick feedback. From davem@davemloft.net Sun Oct 3 15:25:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 15:25:56 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93MPpxR031498 for ; Sun, 3 Oct 2004 15:25:51 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEElH-0003NN-00; Sun, 03 Oct 2004 15:23:23 -0700 Date: Sun, 3 Oct 2004 15:23:23 -0700 From: "David S. Miller" To: Thomas Graf Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: Re: [PATCH 0/3] NET: Generic network statistics/estimator Message-Id: <20041003152323.6de24673.davem@davemloft.net> In-Reply-To: <20041003214700.GK14344@postel.suug.ch> References: <20041003213124.GG14344@postel.suug.ch> <20041003214700.GK14344@postel.suug.ch> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9854 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 462 Lines: 13 On Sun, 3 Oct 2004 23:47:00 +0200 Thomas Graf wrote: > > The following patchset introduces generic network statistics for netlink > > users. > > Forgot to mention that Jamal was heavily involved in this work and > is the actual initiator of this idea. See previous discussion > in: > * RFC/PATCH capture qdisc requeue event in stats > * [PATCH 2.6] generic network statistics Jamal give me a quick public ACK on this work by Thomas then :-) From davem@davemloft.net Sun Oct 3 15:31:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 15:31:56 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93MVqBM031896 for ; Sun, 3 Oct 2004 15:31:52 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEEr6-0003Nq-00; Sun, 03 Oct 2004 15:29:24 -0700 Date: Sun, 3 Oct 2004 15:29:24 -0700 From: "David S. Miller" To: Patrick McHardy Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6 0/7]: assorted fixes Message-Id: <20041003152924.27f97e27.davem@davemloft.net> In-Reply-To: <41606B47.9040703@trash.net> References: <41606B47.9040703@trash.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9855 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 286 Lines: 8 On Sun, 03 Oct 2004 23:12:39 +0200 Patrick McHardy wrote: > following are 6 assorted fixes and one small cleanup patch. > You can pull all patches from bk://212.42.230.204/net-2.6 > I'll send 2.4 versions later. All looks great, so I pulled in your changes, thanks. From hadi@cyberus.ca Sun Oct 3 15:34:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 15:34:51 -0700 (PDT) Received: from mx01.cybersurf.com (mx01.cybersurf.com [209.197.145.104]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93MYlEe032239 for ; Sun, 3 Oct 2004 15:34:47 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx01.cybersurf.com with esmtp (Exim 4.20) id 1CEEw6-0002RD-8p for netdev@oss.sgi.com; Sun, 03 Oct 2004 18:34:34 -0400 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CEEw3-0006qB-3R; Sun, 03 Oct 2004 18:34:31 -0400 Subject: Re: [PATCH 0/3] NET: Generic network statistics/estimator From: jamal Reply-To: hadi@cyberus.ca To: "David S. Miller" Cc: Thomas Graf , netdev@oss.sgi.com In-Reply-To: <20041003152323.6de24673.davem@davemloft.net> References: <20041003213124.GG14344@postel.suug.ch> <20041003214700.GK14344@postel.suug.ch> <20041003152323.6de24673.davem@davemloft.net> Content-Type: text/plain Organization: jamalopolous Message-Id: <1096842865.1046.363.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 03 Oct 2004 18:34:25 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 9856 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev Content-Length: 221 Lines: 10 On Sun, 2004-10-03 at 18:23, David S. Miller wrote: > Jamal give me a quick public ACK on this work by Thomas then :-) Done well. We may end up finding issues in the future - cant see any at the moment. cheers, jamal From davem@davemloft.net Sun Oct 3 16:17:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 16:17:09 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93NH4LW000559 for ; Sun, 3 Oct 2004 16:17:05 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEFYq-0003RD-00; Sun, 03 Oct 2004 16:14:36 -0700 Date: Sun, 3 Oct 2004 16:14:36 -0700 From: "David S. Miller" To: Thomas Graf Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2/3] NET: Generic rate estimator Message-Id: <20041003161436.50293f9a.davem@davemloft.net> In-Reply-To: <20041003213954.GI14344@postel.suug.ch> References: <20041003213124.GG14344@postel.suug.ch> <20041003213954.GI14344@postel.suug.ch> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9857 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 902 Lines: 30 On Sun, 3 Oct 2004 23:39:54 +0200 Thomas Graf wrote: > Introduces a generic rate estimator based on timers. Patch is based on > Jamal's patch and adapted to the new generic network statistics API. First, how does this new thing ever get built into the tree? Second: > +#if (HZ%4) != 0 > +#error Bad HZ value. > +#endif This is going to fail to compile on a few platforms, namely m68knommu and v850 which have configurations that result in using a HZ value of 50 and 122 respectively. Otherwise I mostly like all of the new generic stats stuff, although I do have one question: +int +gnet_stats_start_copy_compat(struct sk_buff *skb, int type, int tc_stats_type, + int xstats_type, spinlock_t *lock, struct gnet_dump *d) +{ ... + return gnet_stats_copy(d, type, NULL, 0); What is this dummy zero-sized RTA_PUT() being done for (via the gnet_stats_copy() call with size==0 arg)? From tgraf@suug.ch Sun Oct 3 16:36:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 16:36:47 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93NafBI004259 for ; Sun, 3 Oct 2004 16:36:42 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id BD41D8B; Mon, 4 Oct 2004 01:36:05 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 608DD1C0E8; Mon, 4 Oct 2004 01:36:47 +0200 (CEST) Date: Mon, 4 Oct 2004 01:36:47 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2/3] NET: Generic rate estimator Message-ID: <20041003233647.GN14344@postel.suug.ch> References: <20041003213124.GG14344@postel.suug.ch> <20041003213954.GI14344@postel.suug.ch> <20041003161436.50293f9a.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041003161436.50293f9a.davem@davemloft.net> X-archive-position: 9858 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 1787 Lines: 47 * David S. Miller <20041003161436.50293f9a.davem@davemloft.net> 2004-10-03 16:14 > On Sun, 3 Oct 2004 23:39:54 +0200 > Thomas Graf wrote: > > > Introduces a generic rate estimator based on timers. Patch is based on > > Jamal's patch and adapted to the new generic network statistics API. > > First, how does this new thing ever get built into the tree? Once we converted all Qdiscs to use the new splitted up stats structs we can replace all calls to qdisc_new_estimator with gen_new_estimator. I already have a patch in my tree which does this but I want to test it a little longer before submitting it. It also involves a change to struct Qdisc and Qdisc_ops which means that we break all qdiscs not in the tree. Is this acceptable? Benefit would be: No compatibility mess anymore when introducing new stats for both, all qdiscs or just a single one. > > +#if (HZ%4) != 0 > > +#error Bad HZ value. > > +#endif > > This is going to fail to compile on a few platforms, namely m68knommu > and v850 which have configurations that result in using a HZ value > of 50 and 122 respectively. This was taken over from net/sched/estimator.c so I guess there was no person ever using the rate estimator on such an arch ;) Can we simply remove the check? > +int > +gnet_stats_start_copy_compat(struct sk_buff *skb, int type, int tc_stats_type, > + int xstats_type, spinlock_t *lock, struct gnet_dump *d) > +{ > ... > + return gnet_stats_copy(d, type, NULL, 0); > > What is this dummy zero-sized RTA_PUT() being done for > (via the gnet_stats_copy() call with size==0 arg)? It allocates space for the TLV header in the skb, will result in an empty header. Nested TLVs are appened to it and the header is filled out afterwards once the size of all nested TLVs are known. From kaber@trash.net Sun Oct 3 16:39:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 16:39:06 -0700 (PDT) Received: from gw.localnet ([62.206.217.67]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93Nd11i004596 for ; Sun, 3 Oct 2004 16:39:01 -0700 Received: from [172.16.1.123] (helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1CEG2U-000424-00; Mon, 04 Oct 2004 01:45:14 +0200 Message-ID: <41608D62.4030200@trash.net> Date: Mon, 04 Oct 2004 01:38:10 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: netdev@oss.sgi.com Subject: Re: [PATCH 2.6 0/7]: assorted fixes References: <41606B47.9040703@trash.net> <20041003152924.27f97e27.davem@davemloft.net> In-Reply-To: <20041003152924.27f97e27.davem@davemloft.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 9859 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kaber@trash.net Precedence: bulk X-list: netdev Content-Length: 394 Lines: 18 David S. Miller wrote: >On Sun, 03 Oct 2004 23:12:39 +0200 >Patrick McHardy wrote: > > >>following are 6 assorted fixes and one small cleanup patch. >>You can pull all patches from bk://212.42.230.204/net-2.6 >>I'll send 2.4 versions later. >> > >All looks great, so I pulled in your changes, thanks. > Thanks. All bugs were only in 2.6, so no 2.4 patches. Regards Patrick From tgraf@suug.ch Sun Oct 3 16:57:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 16:57:35 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i93NvUFF005252 for ; Sun, 3 Oct 2004 16:57:30 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 621848B; Mon, 4 Oct 2004 01:56:55 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id D99141C0E8; Mon, 4 Oct 2004 01:57:37 +0200 (CEST) Date: Mon, 4 Oct 2004 01:57:37 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2/3] NET: Generic rate estimator Message-ID: <20041003235737.GO14344@postel.suug.ch> References: <20041003213124.GG14344@postel.suug.ch> <20041003213954.GI14344@postel.suug.ch> <20041003161436.50293f9a.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041003161436.50293f9a.davem@davemloft.net> X-archive-position: 9860 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 658 Lines: 17 * David S. Miller <20041003161436.50293f9a.davem@davemloft.net> 2004-10-03 16:14 > First, how does this new thing ever get built into the tree? I misunderstood you before and didn't realize I missed to diff the Makefile part. Sorry about that. --- linux-2.6.9-rc3.orig/net/core/Makefile 2004-10-04 01:55:37.000000000 +0200 +++ linux-2.6.9-rc3/net/core/Makefile 2004-09-30 21:30:42.000000000 +0200 @@ -2,7 +2,7 @@ # Makefile for the Linux networking core. # -obj-y := sock.o skbuff.o iovec.o datagram.o stream.o scm.o +obj-y := sock.o skbuff.o iovec.o datagram.o stream.o scm.o gen_stats.o gen_estimator.o obj-$(CONFIG_SYSCTL) += sysctl_net_core.o From hadi@cyberus.ca Sun Oct 3 18:16:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 18:16:55 -0700 (PDT) Received: from mx02.cybersurf.com (mx02.cybersurf.com [209.197.145.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i941GgpG006886 for ; Sun, 3 Oct 2004 18:16:43 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1CEHSn-00060P-Rd for netdev@oss.sgi.com; Sun, 03 Oct 2004 21:16:29 -0400 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CEHSk-0004Ny-SB; Sun, 03 Oct 2004 21:16:27 -0400 Subject: Re: [PATCH 2/3] NET: Generic rate estimator From: jamal Reply-To: hadi@cyberus.ca To: Thomas Graf Cc: "David S. Miller" , netdev@oss.sgi.com In-Reply-To: <20041003233647.GN14344@postel.suug.ch> References: <20041003213124.GG14344@postel.suug.ch> <20041003213954.GI14344@postel.suug.ch> <20041003161436.50293f9a.davem@davemloft.net> <20041003233647.GN14344@postel.suug.ch> Content-Type: text/plain Organization: jamalopolous Message-Id: <1096852582.1046.378.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 03 Oct 2004 21:16:22 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 9861 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev Content-Length: 751 Lines: 24 On Sun, 2004-10-03 at 19:36, Thomas Graf wrote: > * David S. Miller <20041003161436.50293f9a.davem@davemloft.net> 2004-10-03 16:14 > > > +#if (HZ%4) != 0 > > > +#error Bad HZ value. > > > +#endif > > > > This is going to fail to compile on a few platforms, namely m68knommu > > and v850 which have configurations that result in using a HZ value > > of 50 and 122 respectively. > > This was taken over from net/sched/estimator.c so I guess there was no > person ever using the rate estimator on such an arch ;) > > Can we simply remove the check? The granularity of the timing is dependent on this - 250msec increments. Find a common demonitor for all Hz values which results in something along 200ms range and we should be set. cheers, jamal From acme@conectiva.com.br Sun Oct 3 19:06:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 19:06:29 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9426JIo008038 for ; Sun, 3 Oct 2004 19:06:21 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 5CE6147573; Sun, 3 Oct 2004 23:06:01 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id D090D47309 for ; Sun, 3 Oct 2004 23:06:00 -0300 (BRT) Received: (qmail 24750 invoked by uid 0); 4 Oct 2004 03:02:59 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 4 Oct 2004 03:02:59 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id D7CDD14639; Sun, 3 Oct 2004 23:09:03 -0300 (BRT) Message-ID: <4160B06C.6020105@conectiva.com.br> Date: Sun, 03 Oct 2004 23:07:40 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: PATCH: [SKBUFF] introduce x25_type_trans X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------040908060501010702090001" X-Bogosity: No, tests=bogofilter, spamicity=0.448589, version=0.16.3 X-archive-position: 9862 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 Content-Length: 10010 Lines: 325 This is a multi-part message in MIME format. --------------040908060501010702090001 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi David, Please consider pulling from: bk://kernel.bkbits.net/acme/sk_buff-2.6 Now there are six outstanding changesets in this tree. Regards, - Arnaldo --------------040908060501010702090001 Content-Type: text/plain; name="x25_type_trans.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="x25_type_trans.patch" 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.2035, 2004-10-03 23:01:56-03:00, acme@conectiva.com.br [SKBUFF] introduce x25_type_trans Signed-off-by: Arnaldo Carvalho de Melo Signet-off-by: David S. Miller drivers/isdn/i4l/isdn_x25iface.c | 16 ++++------------ drivers/net/wan/cycx_x25.c | 8 +++----- drivers/net/wan/hdlc_x25.c | 14 ++++---------- drivers/net/wan/lapbether.c | 20 +++++--------------- drivers/net/wan/x25_asy.c | 18 +++++------------- include/net/x25device.h | 17 +++++++++++++++++ 6 files changed, 38 insertions(+), 55 deletions(-) diff -Nru a/drivers/isdn/i4l/isdn_x25iface.c b/drivers/isdn/i4l/isdn_x25iface.c --- a/drivers/isdn/i4l/isdn_x25iface.c 2004-10-03 23:02:38 -03:00 +++ b/drivers/isdn/i4l/isdn_x25iface.c 2004-10-03 23:02:38 -03:00 @@ -21,6 +21,7 @@ #include #include #include +#include #include "isdn_x25iface.h" /* for debugging messages not to cause an oops when device pointer is NULL*/ @@ -191,12 +192,9 @@ IX25DEBUG( "isdn_x25iface_receive %s \n", MY_DEVNAME(cprot->net_dev) ); if ( ( (ix25_pdata_t*) (cprot->proto_data) ) -> state == WAN_CONNECTED ){ - skb -> dev = cprot -> net_dev; - skb -> protocol = htons(ETH_P_X25); - skb -> pkt_type = PACKET_HOST; if( skb_push(skb, 1)){ skb -> data[0]=0x00; - skb -> mac.raw = skb -> data; + skb->protocol = x25_type_trans(skb, cprot->net_dev); netif_rx(skb); return 0; } @@ -224,10 +222,7 @@ *state_p = WAN_CONNECTED; if( skb ){ *( skb_put(skb, 1) ) = 0x01; - skb -> mac.raw = skb -> data; - skb -> dev = cprot -> net_dev; - skb -> protocol = htons(ETH_P_X25); - skb -> pkt_type = PACKET_HOST; + skb->protocol = x25_type_trans(skb, cprot->net_dev); netif_rx(skb); return 0; } else { @@ -256,10 +251,7 @@ skb = dev_alloc_skb(1); if( skb ){ *( skb_put(skb, 1) ) = 0x02; - skb -> mac.raw = skb -> data; - skb -> dev = cprot -> net_dev; - skb -> protocol = htons(ETH_P_X25); - skb -> pkt_type = PACKET_HOST; + skb->protocol = x25_type_trans(skb, cprot->net_dev); netif_rx(skb); return 0; } else { diff -Nru a/drivers/net/wan/cycx_x25.c b/drivers/net/wan/cycx_x25.c --- a/drivers/net/wan/cycx_x25.c 2004-10-03 23:02:38 -03:00 +++ b/drivers/net/wan/cycx_x25.c 2004-10-03 23:02:38 -03:00 @@ -92,6 +92,8 @@ #include /* Cyclom 2X common user API definitions */ #include /* X.25 firmware API definitions */ +#include + /* Defines & Macros */ #define CYCX_X25_MAX_CMD_RETRY 5 #define CYCX_X25_CHAN_MTU 2048 /* unfragmented logical channel MTU */ @@ -1486,11 +1488,7 @@ ptr = skb_put(skb, 1); *ptr = event; - skb->dev = dev; - skb->protocol = htons(ETH_P_X25); - skb->mac.raw = skb->data; - skb->pkt_type = PACKET_HOST; - + skb->protocol = x25_type_trans(skb, dev); netif_rx(skb); dev->last_rx = jiffies; /* timestamp */ } diff -Nru a/drivers/net/wan/hdlc_x25.c b/drivers/net/wan/hdlc_x25.c --- a/drivers/net/wan/hdlc_x25.c 2004-10-03 23:02:38 -03:00 +++ b/drivers/net/wan/hdlc_x25.c 2004-10-03 23:02:38 -03:00 @@ -23,6 +23,8 @@ #include #include +#include + /* These functions are callbacks called by LAPB layer */ static void x25_connect_disconnect(struct net_device *dev, int reason, int code) @@ -38,11 +40,7 @@ ptr = skb_put(skb, 1); *ptr = code; - skb->dev = dev; - skb->protocol = htons(ETH_P_X25); - skb->mac.raw = skb->data; - skb->pkt_type = PACKET_HOST; - + skb->protocol = x25_type_trans(skb, dev); netif_rx(skb); } @@ -74,11 +72,7 @@ ptr = skb->data; *ptr = 0; - skb->dev = dev; - skb->protocol = htons(ETH_P_X25); - skb->mac.raw = skb->data; - skb->pkt_type = PACKET_HOST; - + skb->protocol = x25_type_trans(skb, dev); return netif_rx(skb); } diff -Nru a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c --- a/drivers/net/wan/lapbether.c 2004-10-03 23:02:38 -03:00 +++ b/drivers/net/wan/lapbether.c 2004-10-03 23:02:38 -03:00 @@ -43,6 +43,8 @@ #include #include +#include + static char bcast_addr[6] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; /* If this number is made larger, check that the temporary string buffer @@ -137,11 +139,7 @@ ptr = skb->data; *ptr = 0x00; - skb->dev = dev; - skb->protocol = htons(ETH_P_X25); - skb->mac.raw = skb->data; - skb->pkt_type = PACKET_HOST; - + skb->protocol = x25_type_trans(skb, dev); skb->dev->last_rx = jiffies; return netif_rx(skb); } @@ -233,11 +231,7 @@ ptr = skb_put(skb, 1); *ptr = 0x01; - skb->dev = dev; - skb->protocol = htons(ETH_P_X25); - skb->mac.raw = skb->data; - skb->pkt_type = PACKET_HOST; - + skb->protocol = x25_type_trans(skb, dev); skb->dev->last_rx = jiffies; netif_rx(skb); } @@ -255,11 +249,7 @@ ptr = skb_put(skb, 1); *ptr = 0x02; - skb->dev = dev; - skb->protocol = htons(ETH_P_X25); - skb->mac.raw = skb->data; - skb->pkt_type = PACKET_HOST; - + skb->protocol = x25_type_trans(skb, dev); skb->dev->last_rx = jiffies; netif_rx(skb); } diff -Nru a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c --- a/drivers/net/wan/x25_asy.c 2004-10-03 23:02:38 -03:00 +++ b/drivers/net/wan/x25_asy.c 2004-10-03 23:02:38 -03:00 @@ -34,6 +34,8 @@ #include #include "x25_asy.h" +#include + static struct net_device **x25_asy_devs; static int x25_asy_maxdev = SL_NRUNIT; @@ -209,10 +211,8 @@ return; } skb_push(skb,1); /* LAPB internal control */ - skb->dev = sl->dev; memcpy(skb_put(skb,count), sl->rbuff, count); - skb->mac.raw=skb->data; - skb->protocol=htons(ETH_P_X25); + skb->protocol = x25_type_trans(skb, sl->dev); if((err=lapb_data_received(skb->dev, skb))!=LAPB_OK) { kfree_skb(skb); @@ -419,11 +419,7 @@ ptr = skb_put(skb, 1); *ptr = 0x01; - skb->dev = sl->dev; - skb->protocol = htons(ETH_P_X25); - skb->mac.raw = skb->data; - skb->pkt_type = PACKET_HOST; - + skb->protocol = x25_type_trans(skb, sl->dev); netif_rx(skb); sl->dev->last_rx = jiffies; } @@ -442,11 +438,7 @@ ptr = skb_put(skb, 1); *ptr = 0x02; - skb->dev = sl->dev; - skb->protocol = htons(ETH_P_X25); - skb->mac.raw = skb->data; - skb->pkt_type = PACKET_HOST; - + skb->protocol = x25_type_trans(skb, sl->dev); netif_rx(skb); sl->dev->last_rx = jiffies; } diff -Nru a/include/net/x25device.h b/include/net/x25device.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/net/x25device.h 2004-10-03 23:02:38 -03:00 @@ -0,0 +1,17 @@ +#ifndef _X25DEVICE_H +#define _X25DEVICE_H + +#include +#include +#include + +static inline unsigned short x25_type_trans(struct sk_buff *skb, + struct net_device *dev) +{ + skb->mac.raw = skb->data; + skb->input_dev = skb->dev = dev; + skb->pkt_type = PACKET_HOST; + + return htons(ETH_P_X25); +} +#endif =================================================================== This BitKeeper patch contains the following changesets: 1.2035 ## Wrapped with gzip_uu ## M'XL( #ZO8$$ ^596U/;.!1^1K]",[QL=S>.;KZEA:$%NC!LMPRTG=';HA:?O2FOQ[JW=7;XQ\<_7Y\AM+.#]P(Y#1;4^. M0D=80YVG.ODNTQBF**PLOW@H35!".!6$$EHYPK,%.L#48H3;F(@N)5W",>,] M0GNVTR'PA>!:^CP\^#<'=PAZ@__?E>PCA;^[>4Z',C2#-M%)]AQ*$6G=\9$G9870D02M+L" MMS"/#:>Z<1&F]:T/$,215-I2]Z $.[**,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Q>H"B K2D%:T+($8 M=\Q )DC;@;97#VR"_,]YR>S@K;V/M#P)7'//L*"66GQ(2%S**>0+YL+FP15. M4T0].NM>QWGX\W.>YEQUA?/, -_$=8#=JUR'4<-@>)C<< R1<%T^%TF]E3;. J(!BK-R#,V60P^+<9+/SV@V?_#U(#K8;%9+3C!$01+R#H/VGJ1_J&&@ --------------040908060501010702090001-- From acme@conectiva.com.br Sun Oct 3 20:07:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 20:07:57 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9437iqQ009121 for ; Sun, 3 Oct 2004 20:07:45 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 2AC9447408; Mon, 4 Oct 2004 00:07:30 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 927734765A for ; Mon, 4 Oct 2004 00:07:28 -0300 (BRT) Received: (qmail 30228 invoked by uid 0); 4 Oct 2004 04:04:25 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 4 Oct 2004 04:04:25 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id DEE5214639; Mon, 4 Oct 2004 00:10:32 -0300 (BRT) Message-ID: <4160BED5.6040207@conectiva.com.br> Date: Mon, 04 Oct 2004 00:09:09 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: PATCH: [SKBUFF] introduce skb_set_link_header X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------000105060809020209070501" X-Bogosity: No, tests=bogofilter, spamicity=0.499995, version=0.16.3 X-archive-position: 9863 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 Content-Length: 45517 Lines: 1311 This is a multi-part message in MIME format. --------------000105060809020209070501 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi David, Please consider pulling from: bk://kernel.bkbits.net/acme/sk_buff-2.6 Now there are seven outstanding changesets in this tree. Best Regards, - Arnaldo --------------000105060809020209070501 Content-Type: text/plain; name="skb_set_link_header.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="skb_set_link_header.patch" =================================================================== ChangeSet@1.2036, 2004-10-04 00:06:25-03:00, acme@conectiva.com.br [SKBUFF] introduce skb_set_link_header Abstracting setting the link layer sk_buff header, there are still some corner cases to handle, will work on those. This should make the code a bit more understandable and also removes a lot of direct accesses to skb->data. In the process found several places where foo_type_trans functions can be introduced, next patches will do that (AX.25, for instance). Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller arch/um/drivers/net_kern.c | 2 +- drivers/ieee1394/eth1394.c | 2 +- drivers/isdn/i4l/isdn_net.c | 4 ++-- drivers/isdn/i4l/isdn_ppp.c | 2 +- drivers/media/dvb/dvb-core/dvb_net.c | 2 +- drivers/message/fusion/mptlan.c | 4 ++-- drivers/net/appletalk/cops.c | 2 +- drivers/net/appletalk/ltpc.c | 2 +- drivers/net/arcnet/arc-rawmode.c | 2 +- drivers/net/arcnet/rfc1051.c | 2 +- drivers/net/arcnet/rfc1201.c | 2 +- drivers/net/bonding/bond_3ad.c | 4 ++-- drivers/net/bonding/bond_alb.c | 4 ++-- drivers/net/hamradio/6pack.c | 2 +- drivers/net/hamradio/baycom_epp.c | 2 +- drivers/net/hamradio/bpqether.c | 2 +- drivers/net/hamradio/dmascc.c | 2 +- drivers/net/hamradio/hdlcdrv.c | 2 +- drivers/net/hamradio/mkiss.c | 2 +- drivers/net/hamradio/scc.c | 2 +- drivers/net/hamradio/yam.c | 2 +- drivers/net/irda/ali-ircc.c | 2 +- drivers/net/irda/au1k_ir.c | 2 +- drivers/net/irda/donauboe.c | 2 +- drivers/net/irda/irda-usb.c | 2 +- drivers/net/irda/nsc-ircc.c | 2 +- drivers/net/irda/sa1100_ir.c | 2 +- drivers/net/irda/smsc-ircc2.c | 2 +- drivers/net/irda/stir4200.c | 2 +- drivers/net/irda/via-ircc.c | 8 ++++---- drivers/net/irda/vlsi_ir.c | 2 +- drivers/net/irda/w83977af_ir.c | 2 +- drivers/net/plip.c | 2 +- drivers/net/ppp_generic.c | 2 +- drivers/net/sb1000.c | 2 +- drivers/net/slip.c | 2 +- drivers/net/tun.c | 2 +- drivers/net/wan/cosa.c | 2 +- drivers/net/wan/dlci.c | 2 +- drivers/net/wan/farsync.c | 2 +- drivers/net/wan/hostess_sv11.c | 4 ++-- drivers/net/wan/lmc/lmc_main.c | 4 ++-- drivers/net/wan/pc300_drv.c | 2 +- drivers/net/wan/pc300_tty.c | 2 +- drivers/net/wan/sdla_chdlc.c | 6 +++--- drivers/net/wan/sdla_fr.c | 6 +++--- drivers/net/wan/sdla_ppp.c | 4 ++-- drivers/net/wan/sdla_x25.c | 12 ++++++------ drivers/net/wan/sealevel.c | 2 +- drivers/net/wan/syncppp.c | 2 +- drivers/net/wan/wanpipe_multppp.c | 6 +++--- drivers/net/wireless/airo.c | 4 ++-- drivers/net/wireless/prism54/islpci_eth.c | 2 +- drivers/net/wireless/strip.c | 2 +- drivers/s390/net/ctcmain.c | 4 ++-- drivers/s390/net/netiucv.c | 4 ++-- drivers/s390/net/qeth_main.c | 6 +++--- include/linux/hdlc.h | 2 +- include/linux/skbuff.h | 5 +++++ net/802/fc.c | 2 +- net/802/fddi.c | 2 +- net/802/hippi.c | 2 +- net/802/tr.c | 2 +- net/atm/clip.c | 2 +- net/bluetooth/bnep/core.c | 2 +- net/bridge/br_device.c | 2 +- net/core/dev.c | 2 +- net/decnet/dn_route.c | 2 +- net/ethernet/eth.c | 4 ++-- net/ipv4/ip_output.c | 2 +- net/ipv4/route.c | 2 +- net/ipv6/ip6_output.c | 2 +- net/ipv6/route.c | 2 +- net/irda/irlap_frame.c | 3 ++- net/irda/wrapper.c | 2 +- net/llc/llc_output.c | 6 ++++-- net/llc/llc_sap.c | 2 +- net/wanrouter/wanmain.c | 2 +- 78 files changed, 113 insertions(+), 105 deletions(-) diff -Nru a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c --- a/arch/um/drivers/net_kern.c 2004-10-04 00:06:58 -03:00 +++ b/arch/um/drivers/net_kern.c 2004-10-04 00:06:58 -03:00 @@ -48,7 +48,7 @@ skb->dev = dev; skb_put(skb, dev->mtu); - skb->mac.raw = skb->data; + skb_set_link_header(skb); pkt_len = (*lp->read)(lp->fd, &skb, lp); if (pkt_len > 0) { diff -Nru a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c --- a/drivers/ieee1394/eth1394.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/ieee1394/eth1394.c 2004-10-04 00:06:58 -03:00 @@ -848,7 +848,7 @@ struct eth1394hdr *eth; unsigned char *rawp; - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb_pull (skb, ETH1394_HLEN); eth = eth1394_hdr(skb); diff -Nru a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c --- a/drivers/isdn/i4l/isdn_net.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/isdn/i4l/isdn_net.c 2004-10-04 00:06:58 -03:00 @@ -1367,7 +1367,7 @@ struct ethhdr *eth; unsigned char *rawp; - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb_pull(skb, ETH_HLEN); eth = eth_hdr(skb); @@ -1787,7 +1787,7 @@ } skb->dev = ndev; skb->pkt_type = PACKET_HOST; - skb->mac.raw = skb->data; + skb_set_link_header(skb); #ifdef ISDN_DEBUG_NET_DUMP isdn_dumppkt("R:", skb->data, skb->len, 40); #endif diff -Nru a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c --- a/drivers/isdn/i4l/isdn_ppp.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/isdn/i4l/isdn_ppp.c 2004-10-04 00:06:58 -03:00 @@ -1178,7 +1178,7 @@ mlp->huptimer = 0; #endif /* CONFIG_IPPP_FILTER */ skb->dev = dev; - skb->mac.raw = skb->data; + skb_set_link_header(skb); netif_rx(skb); /* net_dev->local->stats.rx_packets++; done in isdn_net.c */ return; diff -Nru a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c --- a/drivers/media/dvb/dvb-core/dvb_net.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/media/dvb/dvb-core/dvb_net.c 2004-10-04 00:06:58 -03:00 @@ -140,7 +140,7 @@ struct ethhdr *eth; unsigned char *rawp; - skb->mac.raw=skb->data; + skb_set_link_header(skb); skb_pull(skb,dev->hard_header_len); eth = eth_hdr(skb); diff -Nru a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c --- a/drivers/message/fusion/mptlan.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/message/fusion/mptlan.c 2004-10-04 00:06:58 -03:00 @@ -773,7 +773,7 @@ /* Set the mac.raw pointer, since this apparently isn't getting * done before we get the skb. Pull the data pointer past the mac data. */ - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb_pull(skb, 12); dma = pci_map_single(mpt_dev->pcidev, skb->data, skb->len, @@ -1564,7 +1564,7 @@ struct mpt_lan_ohdr *fch = (struct mpt_lan_ohdr *)skb->data; struct fcllc *fcllc; - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb_pull(skb, sizeof(struct mpt_lan_ohdr)); if (fch->dtype == htons(0xffff)) { diff -Nru a/drivers/net/appletalk/cops.c b/drivers/net/appletalk/cops.c --- a/drivers/net/appletalk/cops.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/appletalk/cops.c 2004-10-04 00:06:58 -03:00 @@ -854,7 +854,7 @@ return; } - skb->mac.raw = skb->data; /* Point to entire packet. */ + skb_set_link_header(skb); /* Point to entire packet. */ skb_pull(skb,3); skb->h.raw = skb->data; /* Point to data (Skip header). */ diff -Nru a/drivers/net/appletalk/ltpc.c b/drivers/net/appletalk/ltpc.c --- a/drivers/net/appletalk/ltpc.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/appletalk/ltpc.c 2004-10-04 00:06:58 -03:00 @@ -770,7 +770,7 @@ skb->data[0] = dnode; skb->data[1] = snode; skb->data[2] = llaptype; - skb->mac.raw = skb->data; /* save pointer to llap header */ + skb_set_link_header(skb); /* save pointer to llap header */ skb_pull(skb,3); /* copy ddp(s,e)hdr + contents */ diff -Nru a/drivers/net/arcnet/arc-rawmode.c b/drivers/net/arcnet/arc-rawmode.c --- a/drivers/net/arcnet/arc-rawmode.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/arcnet/arc-rawmode.c 2004-10-04 00:06:58 -03:00 @@ -109,7 +109,7 @@ pkt = (struct archdr *) skb->data; - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb_pull(skb, ARC_HDR_SIZE); /* up to sizeof(pkt->soft) has already been copied from the card */ diff -Nru a/drivers/net/arcnet/rfc1051.c b/drivers/net/arcnet/rfc1051.c --- a/drivers/net/arcnet/rfc1051.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/arcnet/rfc1051.c 2004-10-04 00:06:58 -03:00 @@ -91,7 +91,7 @@ int hdr_size = ARC_HDR_SIZE + RFC1051_HDR_SIZE; /* Pull off the arcnet header. */ - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb_pull(skb, hdr_size); if (pkt->hard.dest == 0) diff -Nru a/drivers/net/arcnet/rfc1201.c b/drivers/net/arcnet/rfc1201.c --- a/drivers/net/arcnet/rfc1201.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/arcnet/rfc1201.c 2004-10-04 00:06:58 -03:00 @@ -94,7 +94,7 @@ int hdr_size = ARC_HDR_SIZE + RFC1201_HDR_SIZE; /* Pull off the arcnet header. */ - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb_pull(skb, hdr_size); if (pkt->hard.dest == 0) diff -Nru a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c --- a/drivers/net/bonding/bond_3ad.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/bonding/bond_3ad.c 2004-10-04 00:06:58 -03:00 @@ -917,7 +917,7 @@ } skb->dev = slave->dev; - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->nh.raw = skb->data + ETH_HLEN; skb->protocol = PKT_TYPE_LACPDU; skb->priority = TC_PRIO_CONTROL; @@ -961,7 +961,7 @@ skb_reserve(skb, 16); skb->dev = slave->dev; - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->nh.raw = skb->data + ETH_HLEN; skb->protocol = PKT_TYPE_LACPDU; diff -Nru a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c --- a/drivers/net/bonding/bond_alb.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/bonding/bond_alb.c 2004-10-04 00:06:58 -03:00 @@ -906,7 +906,7 @@ data = skb_put(skb, size); memcpy(data, &pkt, size); - skb->mac.raw = data; + skb_set_link_header(skb); skb->nh.raw = data + ETH_HLEN; skb->protocol = pkt.type; skb->priority = TC_PRIO_CONTROL; @@ -1284,7 +1284,7 @@ u8 *hash_start = NULL; int res = 1; - skb->mac.raw = (unsigned char *)skb->data; + skb_set_link_header(skb); eth_data = eth_hdr(skb); /* make sure that the curr_active_slave and the slaves list do diff -Nru a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c --- a/drivers/net/hamradio/6pack.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/hamradio/6pack.c 2004-10-04 00:06:58 -03:00 @@ -429,7 +429,7 @@ *ptr++ = cmd; /* KISS command */ memcpy(ptr, sp->cooked_buf + 1, count); - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->protocol = htons(ETH_P_AX25); netif_rx(skb); sp->dev->last_rx = jiffies; diff -Nru a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c --- a/drivers/net/hamradio/baycom_epp.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/hamradio/baycom_epp.c 2004-10-04 00:06:58 -03:00 @@ -624,7 +624,7 @@ *cp++ = 0; /* KISS kludge */ memcpy(cp, bc->hdlcrx.buf, pktlen - 1); skb->protocol = htons(ETH_P_AX25); - skb->mac.raw = skb->data; + skb_set_link_header(skb); netif_rx(skb); dev->last_rx = jiffies; bc->stats.rx_packets++; diff -Nru a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c --- a/drivers/net/hamradio/bpqether.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/hamradio/bpqether.c 2004-10-04 00:06:58 -03:00 @@ -215,7 +215,7 @@ skb->dev = dev; skb->protocol = htons(ETH_P_AX25); - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->pkt_type = PACKET_HOST; netif_rx(skb); diff -Nru a/drivers/net/hamradio/dmascc.c b/drivers/net/hamradio/dmascc.c --- a/drivers/net/hamradio/dmascc.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/hamradio/dmascc.c 2004-10-04 00:06:58 -03:00 @@ -1224,7 +1224,7 @@ memcpy(&data[1], priv->rx_buf[i], cb); skb->dev = priv->dev; skb->protocol = ntohs(ETH_P_AX25); - skb->mac.raw = skb->data; + skb_set_link_header(skb); netif_rx(skb); priv->dev->last_rx = jiffies; priv->stats.rx_packets++; diff -Nru a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c --- a/drivers/net/hamradio/hdlcdrv.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/hamradio/hdlcdrv.c 2004-10-04 00:06:58 -03:00 @@ -179,7 +179,7 @@ *cp++ = 0; /* KISS kludge */ memcpy(cp, s->hdlcrx.buffer, pkt_len - 1); skb->protocol = htons(ETH_P_AX25); - skb->mac.raw = skb->data; + skb_set_link_header(skb); netif_rx(skb); dev->last_rx = jiffies; s->stats.rx_packets++; diff -Nru a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c --- a/drivers/net/hamradio/mkiss.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/hamradio/mkiss.c 2004-10-04 00:06:58 -03:00 @@ -336,7 +336,7 @@ spin_lock_bh(&ax->buflock); memcpy(skb_put(skb,count), ax->rbuff, count); spin_unlock_bh(&ax->buflock); - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->protocol = htons(ETH_P_AX25); netif_rx(skb); ax->dev->last_rx = jiffies; diff -Nru a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c --- a/drivers/net/hamradio/scc.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/hamradio/scc.c 2004-10-04 00:06:58 -03:00 @@ -1632,7 +1632,7 @@ skb->dev = scc->dev; skb->protocol = htons(ETH_P_AX25); - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->pkt_type = PACKET_HOST; netif_rx(skb); diff -Nru a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c --- a/drivers/net/hamradio/yam.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/hamradio/yam.c 2004-10-04 00:06:58 -03:00 @@ -527,7 +527,7 @@ *cp++ = 0; /* KISS kludge */ memcpy(cp, yp->rx_buf, pkt_len - 1); skb->protocol = htons(ETH_P_AX25); - skb->mac.raw = skb->data; + skb_set_link_header(skb); netif_rx(skb); dev->last_rx = jiffies; ++yp->stats.rx_packets; diff -Nru a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c --- a/drivers/net/irda/ali-ircc.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/irda/ali-ircc.c 2004-10-04 00:06:58 -03:00 @@ -1910,7 +1910,7 @@ self->stats.rx_packets++; skb->dev = self->netdev; - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->protocol = htons(ETH_P_IRDA); netif_rx(skb); self->netdev->last_rx = jiffies; diff -Nru a/drivers/net/irda/au1k_ir.c b/drivers/net/irda/au1k_ir.c --- a/drivers/net/irda/au1k_ir.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/irda/au1k_ir.c 2004-10-04 00:06:58 -03:00 @@ -607,7 +607,7 @@ skb_put(skb, count-2); memcpy(skb->data, (void *)pDB->vaddr, count-2); skb->dev = dev; - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->protocol = htons(ETH_P_IRDA); netif_rx(skb); prxd->count_0 = 0; diff -Nru a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c --- a/drivers/net/irda/donauboe.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/irda/donauboe.c 2004-10-04 00:06:58 -03:00 @@ -1298,7 +1298,7 @@ self->stats.rx_packets++; skb->dev = self->netdev; - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->protocol = htons (ETH_P_IRDA); } else diff -Nru a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c --- a/drivers/net/irda/irda-usb.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/irda/irda-usb.c 2004-10-04 00:06:58 -03:00 @@ -830,7 +830,7 @@ /* Ask the networking layer to queue the packet for the IrDA stack */ dataskb->dev = self->netdev; - dataskb->mac.raw = dataskb->data; + skb_set_link_header(dataskb); dataskb->protocol = htons(ETH_P_IRDA); netif_rx(dataskb); diff -Nru a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c --- a/drivers/net/irda/nsc-ircc.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/irda/nsc-ircc.c 2004-10-04 00:06:58 -03:00 @@ -1732,7 +1732,7 @@ self->stats.rx_packets++; skb->dev = self->netdev; - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->protocol = htons(ETH_P_IRDA); netif_rx(skb); self->netdev->last_rx = jiffies; diff -Nru a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c --- a/drivers/net/irda/sa1100_ir.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/irda/sa1100_ir.c 2004-10-04 00:06:58 -03:00 @@ -570,7 +570,7 @@ skb_put(skb, len); skb->dev = dev; - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->protocol = htons(ETH_P_IRDA); si->stats.rx_packets++; si->stats.rx_bytes += len; diff -Nru a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c --- a/drivers/net/irda/smsc-ircc2.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/irda/smsc-ircc2.c 2004-10-04 00:06:58 -03:00 @@ -1344,7 +1344,7 @@ self->stats.rx_bytes += len; skb->dev = self->netdev; - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->protocol = htons(ETH_P_IRDA); netif_rx(skb); } diff -Nru a/drivers/net/irda/stir4200.c b/drivers/net/irda/stir4200.c --- a/drivers/net/irda/stir4200.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/irda/stir4200.c 2004-10-04 00:06:58 -03:00 @@ -368,7 +368,7 @@ skb_put(skb, len); - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->protocol = htons(ETH_P_IRDA); skb->dev = stir->netdev; diff -Nru a/drivers/net/irda/via-ircc.c b/drivers/net/irda/via-ircc.c --- a/drivers/net/irda/via-ircc.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/irda/via-ircc.c 2004-10-04 00:06:58 -03:00 @@ -1079,7 +1079,7 @@ self->stats.rx_bytes += len; self->stats.rx_packets++; skb->dev = self->netdev; - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->protocol = htons(ETH_P_IRDA); netif_rx(skb); return TRUE; @@ -1163,7 +1163,7 @@ self->stats.rx_bytes += len; self->stats.rx_packets++; skb->dev = self->netdev; - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->protocol = htons(ETH_P_IRDA); netif_rx(skb); @@ -1205,7 +1205,7 @@ self->stats.rx_bytes += len; self->stats.rx_packets++; skb->dev = self->netdev; - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->protocol = htons(ETH_P_IRDA); netif_rx(skb); if (st_fifo->len < (MAX_RX_WINDOW + 2)) { @@ -1275,7 +1275,7 @@ self->stats.rx_bytes += len; self->stats.rx_packets++; skb->dev = self->netdev; - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->protocol = htons(ETH_P_IRDA); netif_rx(skb); } //while diff -Nru a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c --- a/drivers/net/irda/vlsi_ir.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/irda/vlsi_ir.c 2004-10-04 00:06:58 -03:00 @@ -596,7 +596,7 @@ rd->skb = NULL; skb->dev = ndev; memcpy(skb_put(skb,len), rd->buf, len); - skb->mac.raw = skb->data; + skb_set_link_header(skb); if (in_interrupt()) netif_rx(skb); else diff -Nru a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c --- a/drivers/net/irda/w83977af_ir.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/irda/w83977af_ir.c 2004-10-04 00:06:58 -03:00 @@ -920,7 +920,7 @@ self->stats.rx_packets++; skb->dev = self->netdev; - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->protocol = htons(ETH_P_IRDA); netif_rx(skb); self->netdev->last_rx = jiffies; diff -Nru a/drivers/net/plip.c b/drivers/net/plip.c --- a/drivers/net/plip.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/plip.c 2004-10-04 00:06:58 -03:00 @@ -545,7 +545,7 @@ struct ethhdr *eth; unsigned char *rawp; - skb->mac.raw=skb->data; + skb_set_link_header(skb); skb_pull(skb,dev->hard_header_len); eth = eth_hdr(skb); diff -Nru a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c --- a/drivers/net/ppp_generic.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/ppp_generic.c 2004-10-04 00:06:58 -03:00 @@ -1594,7 +1594,7 @@ skb_pull(skb, 2); /* chop off protocol */ skb->dev = ppp->dev; skb->protocol = htons(npindex_to_ethertype[npi]); - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->input_dev = ppp->dev; netif_rx(skb); ppp->dev->last_rx = jiffies; diff -Nru a/drivers/net/sb1000.c b/drivers/net/sb1000.c --- a/drivers/net/sb1000.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/sb1000.c 2004-10-04 00:06:58 -03:00 @@ -842,7 +842,7 @@ goto dropped_frame; } skb->dev = dev; - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->protocol = (unsigned short) buffer[NewDatagramHeaderSkip + 16]; insw(ioaddr, skb_put(skb, NewDatagramDataSize), NewDatagramDataSize / 2); diff -Nru a/drivers/net/slip.c b/drivers/net/slip.c --- a/drivers/net/slip.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/slip.c 2004-10-04 00:06:58 -03:00 @@ -374,7 +374,7 @@ } skb->dev = sl->dev; memcpy(skb_put(skb,count), sl->rbuff, count); - skb->mac.raw=skb->data; + skb_set_link_header(skb); skb->protocol=htons(ETH_P_IP); netif_rx(skb); sl->dev->last_rx = jiffies; diff -Nru a/drivers/net/tun.c b/drivers/net/tun.c --- a/drivers/net/tun.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/tun.c 2004-10-04 00:06:58 -03:00 @@ -196,7 +196,7 @@ skb->dev = tun->dev; switch (tun->flags & TUN_TYPE_MASK) { case TUN_TUN_DEV: - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->protocol = pi.proto; break; case TUN_TAP_DEV: diff -Nru a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c --- a/drivers/net/wan/cosa.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/wan/cosa.c 2004-10-04 00:06:58 -03:00 @@ -787,7 +787,7 @@ } chan->rx_skb->protocol = htons(ETH_P_WAN_PPP); chan->rx_skb->dev = chan->pppdev.dev; - chan->rx_skb->mac.raw = chan->rx_skb->data; + skb_set_link_header(chan->rx_skb); chan->stats.rx_packets++; chan->stats.rx_bytes += chan->cosa->rxsize; netif_rx(chan->rx_skb); diff -Nru a/drivers/net/wan/dlci.c b/drivers/net/wan/dlci.c --- a/drivers/net/wan/dlci.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/wan/dlci.c 2004-10-04 00:06:58 -03:00 @@ -177,7 +177,7 @@ if (process) { /* we've set up the protocol, so discard the header */ - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb_pull(skb, header); dlp->stats.rx_bytes += skb->len; netif_rx(skb); diff -Nru a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c --- a/drivers/net/wan/farsync.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/wan/farsync.c 2004-10-04 00:06:58 -03:00 @@ -864,7 +864,7 @@ struct net_device *dev) { skb->dev = dev; - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->pkt_type = PACKET_HOST; return htons(ETH_P_CUST); } diff -Nru a/drivers/net/wan/hostess_sv11.c b/drivers/net/wan/hostess_sv11.c --- a/drivers/net/wan/hostess_sv11.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/wan/hostess_sv11.c 2004-10-04 00:06:58 -03:00 @@ -57,8 +57,8 @@ { /* Drop the CRC - it's not a good idea to try and negotiate it ;) */ skb_trim(skb, skb->len-2); - skb->protocol=__constant_htons(ETH_P_WAN_PPP); - skb->mac.raw=skb->data; + skb->protocol = htons(ETH_P_WAN_PPP); + skb_set_link_header(skb); skb->dev=c->netdevice; /* * Send it to the PPP layer. We don't have time to process diff -Nru a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c --- a/drivers/net/wan/lmc/lmc_main.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/wan/lmc/lmc_main.c 2004-10-04 00:06:58 -03:00 @@ -1673,7 +1673,7 @@ skb_put (skb, len); skb->protocol = lmc_proto_type(sc, skb); skb->protocol = htons(ETH_P_WAN_PPP); - skb->mac.raw = skb->data; + skb_set_link_header(skb); // skb->nh.raw = skb->data; skb->dev = dev; lmc_proto_netif(sc, skb); @@ -1711,7 +1711,7 @@ memcpy(skb_put(nsb, len), skb->data, len); nsb->protocol = lmc_proto_type(sc, skb); - nsb->mac.raw = nsb->data; + skb_set_link_header(nsb); // nsb->nh.raw = nsb->data; nsb->dev = dev; lmc_proto_netif(sc, nsb); diff -Nru a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c --- a/drivers/net/wan/pc300_drv.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/wan/pc300_drv.c 2004-10-04 00:06:58 -03:00 @@ -1754,7 +1754,7 @@ skb->dev = dev; skb->protocol = htons(ETH_P_CUST); - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->pkt_type = PACKET_HOST; skb->len = 10 + skb_main->len; diff -Nru a/drivers/net/wan/pc300_tty.c b/drivers/net/wan/pc300_tty.c --- a/drivers/net/wan/pc300_tty.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/wan/pc300_tty.c 2004-10-04 00:06:58 -03:00 @@ -1026,7 +1026,7 @@ skb_put (skb, 10 + len); skb->dev = dev->dev; skb->protocol = htons(ETH_P_CUST); - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->pkt_type = PACKET_HOST; skb->len = 10 + len; diff -Nru a/drivers/net/wan/sdla_chdlc.c b/drivers/net/wan/sdla_chdlc.c --- a/drivers/net/wan/sdla_chdlc.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/wan/sdla_chdlc.c 2004-10-04 00:06:58 -03:00 @@ -2037,7 +2037,7 @@ api_rx_hdr->time_stamp = rxbuf->time_stamp; skb->protocol = htons(PVC_PROT); - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->dev = dev; skb->pkt_type = WAN_PACKET_DATA; @@ -2054,7 +2054,7 @@ /* Pass it up the protocol stack */ skb->dev = dev; - skb->mac.raw = skb->data; + skb_set_link_header(skb); netif_rx(skb); dev->last_rx = jiffies; } @@ -3058,7 +3058,7 @@ /* Decapsulate pkt and pass it up the protocol stack */ new_skb->protocol = htons(ETH_P_IP); new_skb->dev = dev; - new_skb->mac.raw = new_skb->data; + skb_set_link_header(new_skb); netif_rx(new_skb); dev->last_rx = jiffies; diff -Nru a/drivers/net/wan/sdla_fr.c b/drivers/net/wan/sdla_fr.c --- a/drivers/net/wan/sdla_fr.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/wan/sdla_fr.c 2004-10-04 00:06:58 -03:00 @@ -2097,7 +2097,7 @@ api_rx_hdr->time_stamp = frbuf->tmstamp; skb->protocol = htons(ETH_P_IP); - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->dev = dev; skb->pkt_type = WAN_PACKET_DATA; @@ -2170,7 +2170,7 @@ ++card->wandev.stats.rx_errors; goto rx_done; } - skb->mac.raw = skb->data; + skb_set_link_header(skb); } @@ -3901,7 +3901,7 @@ UDP_PIPE_mgmt_passed_to_stack ++; new_skb->dev = dev; new_skb->protocol = htons(ETH_P_IP); - new_skb->mac.raw = new_skb->data; + skb_set_link_header(new_skb); netif_rx(new_skb); } else { diff -Nru a/drivers/net/wan/sdla_ppp.c b/drivers/net/wan/sdla_ppp.c --- a/drivers/net/wan/sdla_ppp.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/wan/sdla_ppp.c 2004-10-04 00:06:58 -03:00 @@ -1756,7 +1756,7 @@ } else { /* Pass data up the protocol stack */ skb->dev = dev; - skb->mac.raw = skb->data; + skb_set_link_header(skb); ++card->wandev.stats.rx_packets; card->wandev.stats.rx_bytes += skb->len; @@ -2756,7 +2756,7 @@ stack */ new_skb->protocol = htons(ETH_P_IP); new_skb->dev = dev; - new_skb->mac.raw = new_skb->data; + skb_set_link_header(new_skb); netif_rx(new_skb); dev->last_rx = jiffies; diff -Nru a/drivers/net/wan/sdla_x25.c b/drivers/net/wan/sdla_x25.c --- a/drivers/net/wan/sdla_x25.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/wan/sdla_x25.c 2004-10-04 00:06:58 -03:00 @@ -1766,7 +1766,7 @@ ++chan->rx_intr_stat.rx_intr_bfr_not_passed_to_stack; } }else{ - skb->mac.raw = skb->data; + skb_set_link_header(skb); chan->ifstats.rx_bytes += skb->len; ++chan->ifstats.rx_packets; ++chan->rx_intr_stat.rx_intr_bfr_passed_to_stack; @@ -1858,7 +1858,7 @@ new_skb->dev = dev; if (chan->common.usedby == API){ - new_skb->mac.raw = new_skb->data; + skb_set_link_header(new_skb); new_skb->protocol = htons(X25_PROT); new_skb->pkt_type = WAN_PACKET_DATA; }else{ @@ -4658,7 +4658,7 @@ memcpy(skb_put(skb,len),&mbox->cmd,len); - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->protocol = htons(X25_PROT); skb->pkt_type = WAN_PACKET_ASYNC; @@ -4716,7 +4716,7 @@ memcpy(skb_put(skb,len),&mbox->cmd.command,len); - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->pkt_type = WAN_PACKET_CMD; chan->common.func(skb,dev,chan->common.sk); @@ -4826,7 +4826,7 @@ memcpy(api_hdr->data,mbox->data,mbox->cmd.length); } - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->pkt_type = WAN_PACKET_ERR; if (chan->common.func(skb,dev,chan->common.sk) < 0){ @@ -5193,7 +5193,7 @@ else new_skb->protocol = htons(ETH_P_IP); - new_skb->mac.raw = new_skb->data; + skb_set_link_header(new_skb); netif_rx(new_skb); ++chan->pipe_mgmt_stat.UDP_PIPE_mgmt_passed_to_stack; diff -Nru a/drivers/net/wan/sealevel.c b/drivers/net/wan/sealevel.c --- a/drivers/net/wan/sealevel.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/wan/sealevel.c 2004-10-04 00:06:58 -03:00 @@ -60,7 +60,7 @@ /* Drop the CRC - it's not a good idea to try and negotiate it ;) */ skb_trim(skb, skb->len-2); skb->protocol=htons(ETH_P_WAN_PPP); - skb->mac.raw=skb->data; + skb_set_link_header(skb); skb->dev=c->netdevice; /* * Send it to the PPP layer. We don't have time to process diff -Nru a/drivers/net/wan/syncppp.c b/drivers/net/wan/syncppp.c --- a/drivers/net/wan/syncppp.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/wan/syncppp.c 2004-10-04 00:06:58 -03:00 @@ -228,7 +228,7 @@ unsigned long flags; skb->dev=dev; - skb->mac.raw=skb->data; + skb_set_link_header(skb); if (dev->flags & IFF_RUNNING) { diff -Nru a/drivers/net/wan/wanpipe_multppp.c b/drivers/net/wan/wanpipe_multppp.c --- a/drivers/net/wan/wanpipe_multppp.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/wan/wanpipe_multppp.c 2004-10-04 00:06:58 -03:00 @@ -1455,7 +1455,7 @@ }else{ /* Pass it up the protocol stack */ skb->dev = dev; - skb->mac.raw = skb->data; + skb_set_link_header(skb); netif_rx(skb); dev->last_rx = jiffies; } @@ -2056,7 +2056,7 @@ /* Decapsulate pkt and pass it up the protocol stack */ new_skb->protocol = htons(ETH_P_IP); new_skb->dev = dev; - new_skb->mac.raw = new_skb->data; + skb_set_link_header(new_skb); netif_rx(new_skb); dev->last_rx = jiffies; @@ -2344,7 +2344,7 @@ /* Decapsulate pkt and pass it up the protocol stack */ new_skb->protocol = htons(ETH_P_WAN_PPP); new_skb->dev = dev; - new_skb->mac.raw = new_skb->data; + skb_set_link_header(new_skb); netif_rx(new_skb); dev->last_rx = jiffies; diff -Nru a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c --- a/drivers/net/wireless/airo.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/wireless/airo.c 2004-10-04 00:06:58 -03:00 @@ -3255,7 +3255,7 @@ OUT4500( apriv, EVACK, EV_RX); if (test_bit(FLAG_802_11, &apriv->flags)) { - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->pkt_type = PACKET_OTHERHOST; skb->dev = apriv->wifidev; skb->protocol = htons(ETH_P_802_2); @@ -3595,7 +3595,7 @@ wireless_spy_update(ai->dev, sa, &wstats); } #endif /* IW_WIRELESS_SPY */ - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->pkt_type = PACKET_OTHERHOST; skb->dev = ai->wifidev; skb->protocol = htons(ETH_P_802_2); diff -Nru a/drivers/net/wireless/prism54/islpci_eth.c b/drivers/net/wireless/prism54/islpci_eth.c --- a/drivers/net/wireless/prism54/islpci_eth.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/wireless/prism54/islpci_eth.c 2004-10-04 00:06:58 -03:00 @@ -312,7 +312,7 @@ skb_pull(*skb, sizeof (struct rfmon_header)); (*skb)->protocol = htons(ETH_P_802_2); - (*skb)->mac.raw = (*skb)->data; + skb_set_link_header(*skb); (*skb)->pkt_type = PACKET_OTHERHOST; return 0; diff -Nru a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c --- a/drivers/net/wireless/strip.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/net/wireless/strip.c 2004-10-04 00:06:58 -03:00 @@ -2020,7 +2020,7 @@ packetlen); skb->dev = get_strip_dev(strip_info); skb->protocol = header->protocol; - skb->mac.raw = skb->data; + skb_set_link_header(skb); /* Having put a fake header on the front of the sk_buff for the */ /* benefit of tools like tcpdump, skb_pull now 'consumes' that */ diff -Nru a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c --- a/drivers/s390/net/ctcmain.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/s390/net/ctcmain.c 2004-10-04 00:06:58 -03:00 @@ -699,7 +699,7 @@ return; } skb_put(pskb, header->length); - pskb->mac.raw = pskb->data; + skb_set_link_header(pskb); len -= header->length; skb = dev_alloc_skb(pskb->len); if (!skb) { @@ -717,7 +717,7 @@ return; } memcpy(skb_put(skb, pskb->len), pskb->data, pskb->len); - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->dev = pskb->dev; skb->protocol = pskb->protocol; pskb->ip_summed = CHECKSUM_UNNECESSARY; diff -Nru a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c --- a/drivers/s390/net/netiucv.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/s390/net/netiucv.c 2004-10-04 00:06:58 -03:00 @@ -565,7 +565,7 @@ return; } skb_put(pskb, header->next); - pskb->mac.raw = pskb->data; + skb_set_link_header(pskb); skb = dev_alloc_skb(pskb->len); if (!skb) { PRINT_WARN("%s Out of memory in netiucv_unpack_skb\n", @@ -576,7 +576,7 @@ return; } memcpy(skb_put(skb, pskb->len), pskb->data, pskb->len); - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->dev = pskb->dev; skb->protocol = pskb->protocol; pskb->ip_summed = CHECKSUM_UNNECESSARY; diff -Nru a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c --- a/drivers/s390/net/qeth_main.c 2004-10-04 00:06:58 -03:00 +++ b/drivers/s390/net/qeth_main.c 2004-10-04 00:06:58 -03:00 @@ -2146,7 +2146,7 @@ return tr_type_trans(skb,dev); #endif /* CONFIG_TR */ - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb_pull(skb, ETH_ALEN * 2 + sizeof (short)); eth = eth_hdr(skb); @@ -2175,7 +2175,7 @@ QETH_DBF_TEXT(trace,5,"skbfake"); skb->mac.raw = skb->data - QETH_FAKE_LL_LEN; /* this is a fake ethernet header */ - fake_hdr = (struct ethhdr *) skb->mac.raw; + fake_hdr = eth_hdr(skb); /* the destination MAC address */ switch (skb->pkt_type){ @@ -2262,7 +2262,7 @@ if (card->options.fake_ll) qeth_rebuild_skb_fake_ll(card, skb, hdr); else - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->ip_summed = card->options.checksum_type; if (card->options.checksum_type == HW_CHECKSUMMING){ if ( (hdr->ext_flags & diff -Nru a/include/linux/hdlc.h b/include/linux/hdlc.h --- a/include/linux/hdlc.h 2004-10-04 00:06:58 -03:00 +++ b/include/linux/hdlc.h 2004-10-04 00:06:58 -03:00 @@ -245,7 +245,7 @@ { hdlc_device *hdlc = dev_to_hdlc(dev); - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->dev = dev; if (hdlc->proto.type_trans) diff -Nru a/include/linux/skbuff.h b/include/linux/skbuff.h --- a/include/linux/skbuff.h 2004-10-04 00:06:58 -03:00 +++ b/include/linux/skbuff.h 2004-10-04 00:06:58 -03:00 @@ -290,6 +290,11 @@ #include +static inline void skb_set_link_header(struct sk_buff *skb) +{ + skb->mac.raw = skb->data; +} + extern void __kfree_skb(struct sk_buff *skb); extern struct sk_buff *alloc_skb(unsigned int size, int priority); extern void kfree_skbmem(struct sk_buff *skb); diff -Nru a/net/802/fc.c b/net/802/fc.c --- a/net/802/fc.c 2004-10-04 00:06:58 -03:00 +++ b/net/802/fc.c 2004-10-04 00:06:58 -03:00 @@ -102,7 +102,7 @@ struct fch_hdr *fch = (struct fch_hdr *)skb->data; struct fcllc *fcllc; - skb->mac.raw = skb->data; + skb_set_link_header(skb); fcllc = (struct fcllc *)(skb->data + sizeof (struct fch_hdr) + 2); skb_pull(skb, sizeof (struct fch_hdr) + 2); diff -Nru a/net/802/fddi.c b/net/802/fddi.c --- a/net/802/fddi.c 2004-10-04 00:06:58 -03:00 +++ b/net/802/fddi.c 2004-10-04 00:06:58 -03:00 @@ -131,7 +131,7 @@ * to start of packet data. Assume 802.2 SNAP frames for now. */ - skb->mac.raw = skb->data; /* point to frame control (FC) */ + skb_set_link_header(skb); /* point to frame control (FC) */ if(fddi->hdr.llc_8022_1.dsap==0xe0) { diff -Nru a/net/802/hippi.c b/net/802/hippi.c --- a/net/802/hippi.c 2004-10-04 00:06:58 -03:00 +++ b/net/802/hippi.c 2004-10-04 00:06:58 -03:00 @@ -143,7 +143,7 @@ * This is actually wrong ... question is if we really should * set the raw address here. */ - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb_pull(skb, HIPPI_HLEN); /* diff -Nru a/net/802/tr.c b/net/802/tr.c --- a/net/802/tr.c 2004-10-04 00:06:58 -03:00 +++ b/net/802/tr.c 2004-10-04 00:06:58 -03:00 @@ -193,7 +193,7 @@ struct trllc *trllc; unsigned riflen=0; - skb->mac.raw = skb->data; + skb_set_link_header(skb); if(trh->saddr[0] & TR_RII) riflen = (ntohs(trh->rcf) & TR_RCF_LEN_MASK) >> 8; diff -Nru a/net/atm/clip.c b/net/atm/clip.c --- a/net/atm/clip.c 2004-10-04 00:06:58 -03:00 +++ b/net/atm/clip.c 2004-10-04 00:06:58 -03:00 @@ -211,7 +211,7 @@ return; } ATM_SKB(skb)->vcc = vcc; - skb->mac.raw = skb->data; + skb_set_link_header(skb); if (!clip_vcc->encap || skb->len < RFC1483LLC_LEN || memcmp(skb->data, llc_oui,sizeof(llc_oui))) skb->protocol = htons(ETH_P_IP); else { diff -Nru a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c --- a/net/bluetooth/bnep/core.c 2004-10-04 00:06:58 -03:00 +++ b/net/bluetooth/bnep/core.c 2004-10-04 00:06:58 -03:00 @@ -326,7 +326,7 @@ return 0; } - skb->mac.raw = skb->data; + skb_set_link_header(skb); /* Verify and pull out header */ if (!skb_pull(skb, __bnep_rx_hlen[type & BNEP_TYPE_MASK])) diff -Nru a/net/bridge/br_device.c b/net/bridge/br_device.c --- a/net/bridge/br_device.c 2004-10-04 00:06:58 -03:00 +++ b/net/bridge/br_device.c 2004-10-04 00:06:58 -03:00 @@ -37,7 +37,7 @@ br->statistics.tx_packets++; br->statistics.tx_bytes += skb->len; - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb_pull(skb, ETH_HLEN); rcu_read_lock(); diff -Nru a/net/core/dev.c b/net/core/dev.c --- a/net/core/dev.c 2004-10-04 00:06:58 -03:00 +++ b/net/core/dev.c 2004-10-04 00:06:58 -03:00 @@ -1083,7 +1083,7 @@ set by sender, so that the second statement is just protection against buggy protocols. */ - skb2->mac.raw = skb2->data; + skb_set_link_header(skb2); if (skb2->nh.raw < skb2->data || skb2->nh.raw > skb2->tail) { diff -Nru a/net/decnet/dn_route.c b/net/decnet/dn_route.c --- a/net/decnet/dn_route.c 2004-10-04 00:06:58 -03:00 +++ b/net/decnet/dn_route.c 2004-10-04 00:06:58 -03:00 @@ -1555,7 +1555,7 @@ skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL); if (skb == NULL) return -ENOBUFS; - skb->mac.raw = skb->data; + skb_set_link_header(skb); cb = DN_SKB_CB(skb); if (rta[RTA_SRC-1]) diff -Nru a/net/ethernet/eth.c b/net/ethernet/eth.c --- a/net/ethernet/eth.c 2004-10-04 00:06:58 -03:00 +++ b/net/ethernet/eth.c 2004-10-04 00:06:58 -03:00 @@ -161,8 +161,8 @@ struct ethhdr *eth; unsigned char *rawp; - skb->mac.raw=skb->data; - skb_pull(skb,ETH_HLEN); + skb_set_link_header(skb); + skb_pull(skb, ETH_HLEN); eth = eth_hdr(skb); skb->input_dev = dev; diff -Nru a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c --- a/net/ipv4/ip_output.c 2004-10-04 00:06:58 -03:00 +++ b/net/ipv4/ip_output.c 2004-10-04 00:06:58 -03:00 @@ -102,7 +102,7 @@ /* dev_loopback_xmit for use with netfilter. */ static int ip_dev_loopback_xmit(struct sk_buff *newskb) { - newskb->mac.raw = newskb->data; + skb_set_link_header(newskb); __skb_pull(newskb, newskb->nh.raw - newskb->data); newskb->pkt_type = PACKET_LOOPBACK; newskb->ip_summed = CHECKSUM_UNNECESSARY; diff -Nru a/net/ipv4/route.c b/net/ipv4/route.c --- a/net/ipv4/route.c 2004-10-04 00:06:58 -03:00 +++ b/net/ipv4/route.c 2004-10-04 00:06:58 -03:00 @@ -2351,7 +2351,7 @@ /* Reserve room for dummy headers, this skb can pass through good chunk of routing engine. */ - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb_reserve(skb, MAX_HEADER + sizeof(struct iphdr)); if (rta[RTA_SRC - 1]) diff -Nru a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c --- a/net/ipv6/ip6_output.c 2004-10-04 00:06:58 -03:00 +++ b/net/ipv6/ip6_output.c 2004-10-04 00:06:58 -03:00 @@ -97,7 +97,7 @@ /* dev_loopback_xmit for use with netfilter. */ static int ip6_dev_loopback_xmit(struct sk_buff *newskb) { - newskb->mac.raw = newskb->data; + skb_set_link_header(newskb); __skb_pull(newskb, newskb->nh.raw - newskb->data); newskb->pkt_type = PACKET_LOOPBACK; newskb->ip_summed = CHECKSUM_UNNECESSARY; diff -Nru a/net/ipv6/route.c b/net/ipv6/route.c --- a/net/ipv6/route.c 2004-10-04 00:06:58 -03:00 +++ b/net/ipv6/route.c 2004-10-04 00:06:58 -03:00 @@ -1763,7 +1763,7 @@ /* Reserve room for dummy headers, this skb can pass through good chunk of routing engine. */ - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb_reserve(skb, MAX_HEADER + sizeof(struct ipv6hdr)); memset(&fl, 0, sizeof(fl)); diff -Nru a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c --- a/net/irda/irlap_frame.c 2004-10-04 00:06:58 -03:00 +++ b/net/irda/irlap_frame.c 2004-10-04 00:06:58 -03:00 @@ -90,7 +90,8 @@ { /* Some common init stuff */ skb->dev = self->netdev; - skb->h.raw = skb->nh.raw = skb->mac.raw = skb->data; + skb->h.raw = skb->nh.raw = skb->data; + skb_set_link_header(skb); skb->protocol = htons(ETH_P_IRDA); skb->priority = TC_PRIO_BESTEFFORT; diff -Nru a/net/irda/wrapper.c b/net/irda/wrapper.c --- a/net/irda/wrapper.c 2004-10-04 00:06:58 -03:00 +++ b/net/irda/wrapper.c 2004-10-04 00:06:58 -03:00 @@ -252,7 +252,7 @@ /* Feed it to IrLAP layer */ dataskb->dev = dev; - dataskb->mac.raw = dataskb->data; + skb_set_link_header(dataskb); dataskb->protocol = htons(ETH_P_IRDA); netif_rx(dataskb); diff -Nru a/net/llc/llc_output.c b/net/llc/llc_output.c --- a/net/llc/llc_output.c 2004-10-04 00:06:58 -03:00 +++ b/net/llc/llc_output.c 2004-10-04 00:06:58 -03:00 @@ -40,7 +40,8 @@ struct net_device *dev = skb->dev; struct trh_hdr *trh; - skb->mac.raw = skb_push(skb, sizeof(*trh)); + skb_push(skb, sizeof(*trh)); + skb_set_link_header(skb); trh = tr_hdr(skb); trh->ac = AC; trh->fc = LLC_FRAME; @@ -60,7 +61,8 @@ unsigned short len = skb->len; struct ethhdr *eth; - skb->mac.raw = skb_push(skb, sizeof(*eth)); + skb_push(skb, sizeof(*eth)); + skb_set_link_header(skb); eth = eth_hdr(skb); eth->h_proto = htons(len); memcpy(eth->h_dest, da, ETH_ALEN); diff -Nru a/net/llc/llc_sap.c b/net/llc/llc_sap.c --- a/net/llc/llc_sap.c 2004-10-04 00:06:58 -03:00 +++ b/net/llc/llc_sap.c 2004-10-04 00:06:58 -03:00 @@ -35,11 +35,11 @@ struct sk_buff *skb = alloc_skb(128, GFP_ATOMIC); if (skb) { + skb_set_link_header(skb); skb_reserve(skb, 50); skb->nh.raw = skb->h.raw = skb->data; skb->protocol = htons(ETH_P_802_2); skb->dev = dev_base->next; - skb->mac.raw = skb->head; } return skb; } diff -Nru a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c --- a/net/wanrouter/wanmain.c 2004-10-04 00:06:58 -03:00 +++ b/net/wanrouter/wanmain.c 2004-10-04 00:06:58 -03:00 @@ -394,7 +394,7 @@ skb->protocol = ethertype; skb->pkt_type = PACKET_HOST; /* Physically point to point */ skb_pull(skb, cnt); - skb->mac.raw = skb->data; + skb_set_link_header(skb); return ethertype; } --------------000105060809020209070501-- From acme@conectiva.com.br Sun Oct 3 20:30:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 20:31:01 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i943Uqc9012841 for ; Sun, 3 Oct 2004 20:30:53 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id E81404766F; Mon, 4 Oct 2004 00:30:38 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id AA676475A1 for ; Mon, 4 Oct 2004 00:30:38 -0300 (BRT) Received: (qmail 31549 invoked by uid 0); 4 Oct 2004 04:27:38 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 4 Oct 2004 04:27:38 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id 7C07514639; Mon, 4 Oct 2004 00:33:45 -0300 (BRT) Message-ID: <4160C446.2030708@conectiva.com.br> Date: Mon, 04 Oct 2004 00:32:22 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: PATCH: [SKBUFF] do some more skb_set_link_header conversions X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------090804030806000307000006" X-Bogosity: No, tests=bogofilter, spamicity=0.050803, version=0.16.3 X-archive-position: 9864 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 Content-Length: 2794 Lines: 91 This is a multi-part message in MIME format. --------------090804030806000307000006 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi David, Please consider pulling from: bk://kernel.bkbits.net/acme/sk_buff-2.6 Now there are eight outstanding changesets in this tree. - Arnaldo --------------090804030806000307000006 Content-Type: text/plain; name="skb_set_link_header2.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="skb_set_link_header2.patch" =================================================================== ChangeSet@1.2037, 2004-10-04 00:28:19-03:00, acme@conectiva.com.br [SKBUFF] do some more skb_set_link_header conversions Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller drivers/net/wan/cycx_x25.c | 2 +- include/net/x25device.h | 2 +- net/802/fddi.c | 2 +- net/bridge/br_stp_bpdu.c | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff -Nru a/drivers/net/wan/cycx_x25.c b/drivers/net/wan/cycx_x25.c --- a/drivers/net/wan/cycx_x25.c 2004-10-04 00:30:13 -03:00 +++ b/drivers/net/wan/cycx_x25.c 2004-10-04 00:30:13 -03:00 @@ -837,7 +837,7 @@ ++chan->ifstats.rx_packets; chan->ifstats.rx_bytes += pktlen; - skb->mac.raw = skb->data; + skb_set_link_header(skb); netif_rx(skb); dev->last_rx = jiffies; /* timestamp */ } diff -Nru a/include/net/x25device.h b/include/net/x25device.h --- a/include/net/x25device.h 2004-10-04 00:30:13 -03:00 +++ b/include/net/x25device.h 2004-10-04 00:30:13 -03:00 @@ -8,7 +8,7 @@ static inline unsigned short x25_type_trans(struct sk_buff *skb, struct net_device *dev) { - skb->mac.raw = skb->data; + skb_set_link_header(skb); skb->input_dev = skb->dev = dev; skb->pkt_type = PACKET_HOST; diff -Nru a/net/802/fddi.c b/net/802/fddi.c --- a/net/802/fddi.c 2004-10-04 00:30:13 -03:00 +++ b/net/802/fddi.c 2004-10-04 00:30:13 -03:00 @@ -127,7 +127,7 @@ unsigned short type; /* - * Set mac.raw field to point to FC byte, set data field to point + * Set link header field to point to FC byte, set data field to point * to start of packet data. Assume 802.2 SNAP frames for now. */ diff -Nru a/net/bridge/br_stp_bpdu.c b/net/bridge/br_stp_bpdu.c --- a/net/bridge/br_stp_bpdu.c 2004-10-04 00:30:13 -03:00 +++ b/net/bridge/br_stp_bpdu.c 2004-10-04 00:30:13 -03:00 @@ -44,7 +44,8 @@ skb->dev = dev; skb->protocol = htons(ETH_P_802_2); - skb->mac.raw = skb_put(skb, size); + skb_set_link_header(skb); + skb_put(skb, size); memcpy(skb->mac.raw, bridge_ula, ETH_ALEN); memcpy(skb->mac.raw+ETH_ALEN, dev->dev_addr, ETH_ALEN); skb->mac.raw[2*ETH_ALEN] = 0; --------------090804030806000307000006-- From manfred@colorfullife.com Sun Oct 3 21:06:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 03 Oct 2004 21:06:41 -0700 (PDT) Received: from dbl.q-ag.de (dbl.q-ag.de [213.172.117.3]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9446Z0T013628 for ; Sun, 3 Oct 2004 21:06:36 -0700 Received: from [127.0.0.2] (dbl [127.0.0.1]) by dbl.q-ag.de (8.12.3/8.12.3/Debian-6.6) with ESMTP id i9446J8L015662; Mon, 4 Oct 2004 06:06:20 +0200 Message-ID: <4160CC3A.4050606@colorfullife.com> Date: Mon, 04 Oct 2004 06:06:18 +0200 From: Manfred Spraul User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" CC: netdev@oss.sgi.com Subject: Re: [PATCH] fix secure tcp sequence number generation References: <415EEF0E.3080808@colorfullife.com> <20041003150052.4dba0c60.davem@redhat.com> In-Reply-To: <20041003150052.4dba0c60.davem@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 9865 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: manfred@colorfullife.com Precedence: bulk X-list: netdev Content-Length: 1048 Lines: 32 David S. Miller wrote: >On Sat, 02 Oct 2004 20:10:22 +0200 >Manfred Spraul wrote: > > > >>Ted's recent random.c update broke the periodic rekeying: >>schedule_work() doesn't provide synchronization. Additionally the first >>syn values after boot are generated with secret 0 - not good. >> >> > >Are you referring to his changes done back in August or some >other change? August is the last time I see that Ted made >a change to drivers/char/random.c > > The change to revision 1.49 of random.c, with the comment "dev/random: Fix latency in rekeying sequence number" http://linux.bkbits.net:8080/linux-2.5/diffs/drivers/char/random.c@1.49 There are two problems with that patch: - The first call of check_and_rekey must be synchroneous, otherwise the secret stays 0 for the first ISN values after boot. - schedule_work() doesn't provide synchronization, thus rekey_seq_generator could end up running twice. I tried to fix it and then I noticed that it's possible to simplify the code a lot. -- Manfred From klassert@mathematik.tu-chemnitz.de Mon Oct 4 04:52:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 04:52:24 -0700 (PDT) Received: from john.hrz.tu-chemnitz.de (john.hrz.tu-chemnitz.de [134.109.132.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94BqIM2027777 for ; Mon, 4 Oct 2004 04:52:18 -0700 Received: from bayes.mathematik.tu-chemnitz.de ([134.109.41.17]) by john.hrz.tu-chemnitz.de with esmtp (Exim 4.41) id 1CERNq-0003gc-Lx; Mon, 04 Oct 2004 13:52:02 +0200 Received: by bayes.mathematik.tu-chemnitz.de (Postfix, from userid 274) id 453CC8D6A; Mon, 4 Oct 2004 13:52:01 +0200 (CEST) Date: Mon, 4 Oct 2004 13:52:01 +0200 From: Steffen Klassert To: akpm@osdl.org Cc: jgarzik@pobox.com, netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc3-mm1] 3c59x: Make use of generic_mii_ioctl Message-ID: <20041004115201.GA1635@bayes.mathematik.tu-chemnitz.de> Mail-Followup-To: akpm@osdl.org, jgarzik@pobox.com, netdev@oss.sgi.com References: <20041003204507.GA29546@bayes.mathematik.tu-chemnitz.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041003204507.GA29546@bayes.mathematik.tu-chemnitz.de> User-Agent: Mutt/1.4.2.1i X-Scan-Signature: ce20b7edf4650e69c84e96fedf5678d6 X-archive-position: 9866 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: klassert@mathematik.tu-chemnitz.de Precedence: bulk X-list: netdev Content-Length: 2861 Lines: 104 On Sun, Oct 03, 2004 at 10:45:07PM +0200 or thereabouts, Steffen Klassert wrote: > With this patch the driver makes use of the MII lib helper > function generic_mii_ioctl. > Patch is tested with the mii-diag tool and a 3c905-TX, 3c905B-TX NIC. > > Signed-off-by: Steffen Klassert The first patch has a codeline which ends with two semicolon, sorry. Please use this patch instead. --- vanilla-2.6.9-rc3-mm1/drivers/net/3c59x.c Sat Oct 2 14:54:46 2004 +++ linux-2.6.9-rc3-mm1/drivers/net/3c59x.c Mon Oct 4 10:59:19 2004 @@ -834,6 +834,7 @@ u16 io_size; /* Size of PCI region (for release_region) */ spinlock_t lock; /* Serialise access to device & its vortex_private */ spinlock_t mdio_lock; /* Serialise access to mdio hardware */ + struct mii_if_info mii; /* MII lib hooks/info */ }; #ifdef CONFIG_PCI @@ -1218,6 +1219,11 @@ spin_lock_init(&vp->lock); spin_lock_init(&vp->mdio_lock); vp->gendev = gendev; + vp->mii.dev = dev; + vp->mii.mdio_read = mdio_read; + vp->mii.mdio_write = mdio_write; + vp->mii.phy_id_mask = 0x1f; + vp->mii.reg_num_mask = 0x1f; /* Makes sure rings are at least 16 byte aligned. */ vp->rx_ring = pci_alloc_consistent(pdev, sizeof(struct boom_rx_desc) * RX_RING_SIZE @@ -1445,6 +1451,7 @@ mdio_write(dev, vp->phys[0], 4, vp->advertising); } } + vp->mii.phy_id = vp->phys[0]; } if (vp->capabilities & CapBusMaster) { @@ -2891,41 +2898,6 @@ }; #ifdef CONFIG_PCI -static int vortex_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) -{ - struct vortex_private *vp = netdev_priv(dev); - long ioaddr = dev->base_addr; - struct mii_ioctl_data *data = if_mii(rq); - int phy = vp->phys[0] & 0x1f; - int retval; - - switch(cmd) { - case SIOCGMIIPHY: /* Get address of MII PHY in use. */ - data->phy_id = phy; - - case SIOCGMIIREG: /* Read MII PHY register. */ - EL3WINDOW(4); - data->val_out = mdio_read(dev, data->phy_id & 0x1f, data->reg_num & 0x1f); - retval = 0; - break; - - case SIOCSMIIREG: /* Write MII PHY register. */ - if (!capable(CAP_NET_ADMIN)) { - retval = -EPERM; - } else { - EL3WINDOW(4); - mdio_write(dev, data->phy_id & 0x1f, data->reg_num & 0x1f, data->val_in); - retval = 0; - } - break; - default: - retval = -EOPNOTSUPP; - break; - } - - return retval; -} - /* * Must power the device up to do MDIO operations */ @@ -2933,8 +2905,9 @@ { int err; struct vortex_private *vp = netdev_priv(dev); + long ioaddr = dev->base_addr; int state = 0; - + if(VORTEX_PCI(vp)) state = VORTEX_PCI(vp)->current_state; @@ -2942,7 +2915,8 @@ if(state != 0) pci_set_power_state(VORTEX_PCI(vp), 0); - err = vortex_do_ioctl(dev, rq, cmd); + EL3WINDOW(4); + err = generic_mii_ioctl(&vp->mii, if_mii(rq), cmd, NULL); if(state != 0) pci_set_power_state(VORTEX_PCI(vp), state); From buffer@olografix.org Mon Oct 4 05:38:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 05:38:34 -0700 (PDT) Received: from mail.olografix.org (mail.olografix.org [195.32.69.44]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94CcOmA028987 for ; Mon, 4 Oct 2004 05:38:25 -0700 Received: by mail.olografix.org (Postfix, from userid 102) id E1A391BE77; Mon, 4 Oct 2004 14:37:03 +0200 (CEST) Received: from mintaka.darkstar.net (unknown [194.246.126.32]) by mail.olografix.org (Postfix) with ESMTP id D2FC81BD49; Mon, 4 Oct 2004 14:37:02 +0200 (CEST) Date: Mon, 4 Oct 2004 14:42:32 +0200 From: "Angelo Dell'Aera" To: "David S. Miller" Cc: shemminger@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] (1/3) tcp - choose congestion algorithm at initialization Message-Id: <20041004144232.2bfa5a9e.buffer@olografix.org> In-Reply-To: <20040927121610.68f942a4.davem@redhat.com> References: <20040927111834.48c7baab@zqx3.pdx.osdl.net> <20040927121610.68f942a4.davem@redhat.com> Organization: Metro Olografix X-Mailer: Sylpheed version 0.9.12 (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: 9867 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: buffer@olografix.org Precedence: bulk X-list: netdev Content-Length: 1234 Lines: 39 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, 27 Sep 2004 12:16:10 -0700 "David S. Miller" wrote: >> The choice of congestion algorithm needs to be made when connection >> is setup to avoid problems when the sysctl values change later and the >> necessary data hasn't been collected. >Looks great, applied. I completely agree with you. Really a cool work. Just a proposal now. If the choice is made when the connection is established we do not need a struct for every supported congestion control algorithm in the struct tcp_opt any more. We could use for example a generic void * and then refer it properly after Stephen's controls such as tcp_is_vegas(), tcp_is_bic(), etc. This should slim the struct tcp_opt because if a connection is using Westwood its tcpbic and vegas structs will never be used. Moreover, I think it would make the code more readable. Regards. - -- Angelo Dell'Aera 'buffer' Antifork Research, Inc. http://buffer.antifork.org Metro Olografix PGP information in e-mail header -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQFBYUU4pONIzxnBXKIRArT5AJ0Ztak7xFH9DIEd24kRxCvMMxHrBACghKmE e0CHh6gMpJaW02Y5HVA6u78= =av9u -----END PGP SIGNATURE----- From tgraf@suug.ch Mon Oct 4 05:52:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 05:53:01 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94CqsYP031557 for ; Mon, 4 Oct 2004 05:52:55 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 7C28A8B; Mon, 4 Oct 2004 14:52:18 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 9676B1C0E8; Mon, 4 Oct 2004 14:53:00 +0200 (CEST) Date: Mon, 4 Oct 2004 14:53:00 +0200 From: Thomas Graf To: jamal Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 2/3] NET: Generic rate estimator Message-ID: <20041004125300.GA15898@postel.suug.ch> References: <20041003213124.GG14344@postel.suug.ch> <20041003213954.GI14344@postel.suug.ch> <20041003161436.50293f9a.davem@davemloft.net> <20041003233647.GN14344@postel.suug.ch> <1096852582.1046.378.camel@jzny.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1096852582.1046.378.camel@jzny.localdomain> X-archive-position: 9868 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 454 Lines: 12 * jamal <1096852582.1046.378.camel@jzny.localdomain> 2004-10-03 21:16 > The granularity of the timing is dependent on this - 250msec increments. > Find a common demonitor for all Hz values which results in something > along 200ms range and we should be set. I don't think this is possible: octave:1> gcd([1000,1024,1200,200,128,100,32,50,122,24]) ans = 2 Why not let userspace provide it? ticks/usec and usec/ticks are exported via /proc/net/psched. From hadi@cyberus.ca Mon Oct 4 06:24:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 06:24:48 -0700 (PDT) Received: from mx03.cybersurf.com (mx03.cybersurf.com [209.197.145.106]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94DOgEN002543 for ; Mon, 4 Oct 2004 06:24:43 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.20) id 1CESpG-0004gR-6d for netdev@oss.sgi.com; Mon, 04 Oct 2004 09:24:26 -0400 Received: from [216.209.86.2] (helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CESpE-0000yj-Km; Mon, 04 Oct 2004 09:24:24 -0400 Subject: Re: [PATCH 2/3] NET: Generic rate estimator From: jamal Reply-To: hadi@cyberus.ca To: Thomas Graf Cc: "David S. Miller" , netdev@oss.sgi.com In-Reply-To: <20041004125300.GA15898@postel.suug.ch> References: <20041003213124.GG14344@postel.suug.ch> <20041003213954.GI14344@postel.suug.ch> <20041003161436.50293f9a.davem@davemloft.net> <20041003233647.GN14344@postel.suug.ch> <1096852582.1046.378.camel@jzny.localdomain> <20041004125300.GA15898@postel.suug.ch> Content-Type: text/plain Organization: jamalopolous Message-Id: <1096896256.1072.4.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 04 Oct 2004 09:24:16 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 9869 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev Content-Length: 582 Lines: 22 On Mon, 2004-10-04 at 08:53, Thomas Graf wrote: > I don't think this is possible: > > octave:1> gcd([1000,1024,1200,200,128,100,32,50,122,24]) > ans = 2 > > Why not let userspace provide it? ticks/usec and usec/ticks are > exported via /proc/net/psched. Easier to define a compile time constant in the kernel. What you need is to replace the HZ/4 in the creation and execution of the timer with a constant. And that the value of said constant would be preferably in the 250ms range. If you fix this also would be worth fixing the ones in net/sched/estimator.c cheers, jamal From oghm2@cam.ac.uk Mon Oct 4 06:34:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 06:34:20 -0700 (PDT) Received: from ppsw-3.csi.cam.ac.uk (ppsw-3.csi.cam.ac.uk [131.111.8.133]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94DYDsH004944 for ; Mon, 4 Oct 2004 06:34:14 -0700 Received: from oghm2.acad.cai.cam.ac.uk ([131.111.138.48]:60077) by ppsw-3.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.153]:25) with esmtp (Exim 4.34) id 1CESyS-0007Ul-O3 (return-path ) for netdev@oss.sgi.com; Mon, 04 Oct 2004 14:33:56 +0100 Subject: PROBLEM: Kernel oops in skbuff.c From: Olly Madge To: netdev@oss.sgi.com Content-Type: text/plain Message-Id: <1096896836.7327.19.camel@oghm2> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Mon, 04 Oct 2004 14:33:56 +0100 Content-Transfer-Encoding: 7bit X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ X-Cam-AntiVirus: No virus found X-Cam-SpamDetails: Not scanned X-archive-position: 9870 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: oghm2@cam.ac.uk Precedence: bulk X-list: netdev Content-Length: 10118 Lines: 247 Hi, I originally sent this to Alan Cox (as his name was listed at the top of skbuff.c) but he's told me to send it to you instead. My router had a kernel oops after running for 290+ days (exact number is unknown). It was under very minor load at the time, just some IRC traffic. The problem appears to be in networking code. Kernel version is: Linux version 2.4.22euclid1 (root@oghm2) (gcc version 3.3.2 (Debian)) #1 Sun Dec 14 22:09:10 GMT 2003 Output of the oops is below, I had to copy the oops debug information off the screen by hand so it is possible that there are typos. However I did check what I had typed so I believe it to be correct. ksymoops 2.4.5 on i586 2.4.22euclid1. Options used -V (specified) -k /proc/ksyms (specified) -l /proc/modules (default) -o /lib/modules/2.4.22euclid1/ (default) -m /boot/System.map-2.4.22euclid1 (default) Warning: kfree_skbpassed an skb still on a list (from c024d8d6). kernel BUG at skbuff.c:319! invalid operand: 0000 CPU: 0 EIP: 0010:[] Not tainted Using defaults from ksymoops -t elf32-i386 -a i386 EFLAGS: 00010282 eax: 00000045 ebx: c138f480 ecx: 00000000 edx: c2706000 esi: 00000400 edi: c138f4c4 ebp: c138f480 esp: c02e5da4 ds: 0018 es: 0018 ss: 0018 Process swapper (pid: 0, stackpage=c02e5000) Stack: c028d200 c024d8d6 c138f480 ffffffff c024d8d6 c138f480 c138f4b4 c1487140 c2177ba0 c138f480 c0d67800 c10ed800 c01ffe7f c138f480 c10ed800 c2177ba0 c28dd4a0 c10ed800 c0d67800 c11f0b60 c0207177 c0d67800 c10ed800 c10ed800 Call Trace: [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] Code: 0f 0b 3f 01 1c b8 28 c0 58 5a 8b 5c 24 0c e9 67 fe ff ff 8d >>EIP; c01fbb87 <__kfree_skb+197/1b0> <===== >>ebx; c138f480 <_end+1063094/34fcc14> >>edx; c2706000 <_end+23d9c14/34fcc14> >>edi; c138f4c4 <_end+10630d8/34fcc14> >>ebp; c138f480 <_end+1063094/34fcc14> >>esp; c02e5da4 Trace; c024d8d6 Trace; c024d8d6 Trace; c01ffe7f Trace; c0207177 Trace; c02000cd Trace; c0216072 Trace; c02066b2 Trace; c02141a1 Trace; c0215fb0 Trace; c0212a1d Trace; c02066b2 Trace; c0212963 Trace; c0212a00 Trace; c0211a6b Trace; c02066b2 Trace; c0211718 Trace; c02118c0 Trace; c0200630 Trace; c0200747 Trace; c02008af Trace; c0119a96 Trace; c010831e Trace; c0105300 Trace; c010a5a8 Trace; c0105300 Trace; c0105324 Trace; c0105392 Trace; c0105000 <_stext+0/0> Code; c01fbb87 <__kfree_skb+197/1b0> 00000000 <_EIP>: Code; c01fbb87 <__kfree_skb+197/1b0> <===== 0: 0f 0b ud2a <===== Code; c01fbb89 <__kfree_skb+199/1b0> 2: 3f aas Code; c01fbb8a <__kfree_skb+19a/1b0> 3: 01 1c b8 add %ebx,(%eax,%edi,4) Code; c01fbb8d <__kfree_skb+19d/1b0> 6: 28 c0 sub %al,%al Code; c01fbb8f <__kfree_skb+19f/1b0> 8: 58 pop %eax Code; c01fbb90 <__kfree_skb+1a0/1b0> 9: 5a pop %edx Code; c01fbb91 <__kfree_skb+1a1/1b0> a: 8b 5c 24 0c mov 0xc(%esp,1),%ebx Code; c01fbb95 <__kfree_skb+1a5/1b0> e: e9 67 fe ff ff jmp fffffe7a <_EIP+0xfffffe7a> c01fba01 <__kfree_skb+11/1b0> Code; c01fbb9a <__kfree_skb+1aa/1b0> 13: 8d 00 lea (%eax),%eax <0>Kernel panic: Aiee, killing interrupt handler! Linux distribution is a minimal install of debian stable with the latest security updates applied. I am the only local user of the machine. olly@euclid:~$ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 5 model : 2 model name : Pentium 75 - 200 stepping : 12 cpu MHz : 132.957 fdiv_bug : no hlt_bug : no f00f_bug : yes coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr mce cx8 bogomips : 265.42 olly@euclid:~$ cat /proc/modules sch_ingress 1700 1 (autoclean) cls_u32 4828 5 (autoclean) sch_sfq 3328 3 (autoclean) sch_cbq 12288 1 (autoclean) tun 4096 3 (autoclean) ip_nat_irc 2544 0 (unused) ip_conntrack_irc 3184 1 [ip_nat_irc] ip_nat_ftp 3312 0 (unused) ipt_MASQUERADE 1888 2 iptable_mangle 2072 0 ip_conntrack_ftp 4208 1 [ip_nat_ftp] ipt_REDIRECT 728 0 iptable_nat 21422 3 [ip_nat_irc ip_nat_ftp ipt_MASQUERADE ipt_REDIRECT] ipt_TCPMSS 2328 1 ipt_REJECT 3416 475 ipt_LOG 3320 27 ipt_limit 824 29 ipt_length 472 0 ipt_unclean 6808 2 iptable_filter 1644 1 ipt_state 568 31 ip_tables 14656 14 [ipt_MASQUERADE iptable_mangle ipt_REDIRECT iptable_nat ipt_TCPMSS ipt_REJECT ipt_LOG ipt_limit ipt_length ipt_unclean iptable_filter ipt_state] ip_conntrack 25976 4 [ip_nat_irc ip_conntrack_irc ip_nat_ftp ipt_MASQUERADE ip_conntrack_ftp ipt_REDIRECT iptable_nat ipt_state] olly@euclid:~$ cat /proc/ioports 0000-001f : dma1 0020-003f : pic1 0040-005f : timer 0060-006f : keyboard 0080-008f : dma page reg 00a0-00bf : pic2 00c0-00df : dma2 00f0-00ff : fpu 01f0-01f7 : ide0 02f8-02ff : serial(set) 03c0-03df : vga+ 03f6-03f6 : ide0 0cf8-0cff : PCI conf1 f800-f8ff : National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller f800-f8ff : eth1 fc00-fcff : National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller (#2) fc00-fcff : eth0 olly@euclid:~$ cat /proc/iomem 00000000-0009fbff : System RAM 000a0000-000bffff : Video RAM area 000c0000-000c7fff : Video ROM 000f0000-000fffff : System ROM 00100000-02ffffff : System RAM 00100000-0025f624 : Kernel code 0025f625-002e3ddf : Kernel data fe000000-feffffff : Cirrus Logic GD 5430/40 [Alpine] fffbe000-fffbefff : National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller fffbe000-fffbefff : eth1 fffbf000-fffbffff : National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller (#2) fffbf000-fffbffff : eth0 fffc0000-ffffffff : reserved olly@euclid:~$ sudo lspci -vvv Password: 00:00.0 Host bridge: Intel Corp. 430FX - 82437FX TSC [Triton I] (rev 02) Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- [disabled] [size=16M] 00:11.0 Ethernet controller: National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller Subsystem: Netgear: Unknown device f311 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- [disabled] [size=64K] Capabilities: [40] Power Management version 2 Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold-) Status: D0 PME-Enable- DSel=0 DScale=0 PME+ 00:13.0 Ethernet controller: National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller Subsystem: Netgear: Unknown device f311 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- [disabled] [size=64K] Capabilities: [40] Power Management version 2 Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=320mA PME(D0+,D1+,D2+,D3hot+,D3cold+) Status: D0 PME-Enable- DSel=0 DScale=0 PME+ This is obviously a reasonably rare problem for it to take so long to occur. I have no idea what actually caused to happen when it did. The machine was running smoothly before for a long time. Olly Madge From tgraf@suug.ch Mon Oct 4 07:15:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 07:15:30 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94EFPxF006075 for ; Mon, 4 Oct 2004 07:15:25 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id DDF4F8B; Mon, 4 Oct 2004 16:14:49 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id BE2171C0E8; Mon, 4 Oct 2004 16:15:32 +0200 (CEST) Date: Mon, 4 Oct 2004 16:15:32 +0200 From: Thomas Graf To: jamal Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 2/3] NET: Generic rate estimator Message-ID: <20041004141532.GB15898@postel.suug.ch> References: <20041003213124.GG14344@postel.suug.ch> <20041003213954.GI14344@postel.suug.ch> <20041003161436.50293f9a.davem@davemloft.net> <20041003233647.GN14344@postel.suug.ch> <1096852582.1046.378.camel@jzny.localdomain> <20041004125300.GA15898@postel.suug.ch> <1096896256.1072.4.camel@jzny.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1096896256.1072.4.camel@jzny.localdomain> X-archive-position: 9871 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 564 Lines: 10 * jamal <1096896256.1072.4.camel@jzny.localdomain> 2004-10-04 09:24 > What you need is to replace the HZ/4 in the creation and execution > of the timer with a constant. And that the value of said constant would > be preferably in the 250ms range. HZ/4 == 250ms works except for HZ=122 (~246ms) and HZ=50 (~240ms). I don't know how you think it is possible to find a constant around 250ms which works for all HZ values. The problem gets even minor if we do (HZ<; Mon, 4 Oct 2004 07:41:54 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 119C54733D; Mon, 4 Oct 2004 11:41:34 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id B4AD24737B for ; Mon, 4 Oct 2004 11:41:33 -0300 (BRT) Received: (qmail 32244 invoked by uid 0); 4 Oct 2004 15:38:34 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 4 Oct 2004 15:38:34 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id C666114639; Mon, 4 Oct 2004 11:44:41 -0300 (BRT) Message-ID: <41616189.60309@conectiva.com.br> Date: Mon, 04 Oct 2004 11:43:21 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" , netdev@oss.sgi.com Subject: PATCH: [SKBUFF] introduce ax25_type_trans X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------060805090508090008030709" X-Bogosity: No, tests=bogofilter, spamicity=0.115026, version=0.16.3 X-archive-position: 9872 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 Content-Length: 6348 Lines: 204 This is a multi-part message in MIME format. --------------060805090508090008030709 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi David, Please consider pulling from: bk://kernel.bkbits.net/acme/sk_buff-2.6 Now there are nine outstanding changesets in this tree. Regards, - Arnaldo --------------060805090508090008030709 Content-Type: text/plain; name="ax25_type_trans.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ax25_type_trans.patch" =================================================================== ChangeSet@1.2038, 2004-10-04 11:36:34-03:00, acme@conectiva.com.br [SKBUFF] introduce ax25_type_trans Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller drivers/net/hamradio/6pack.c | 6 +----- drivers/net/hamradio/baycom_epp.c | 4 +--- drivers/net/hamradio/bpqether.c | 6 +----- drivers/net/hamradio/dmascc.c | 4 +--- drivers/net/hamradio/hdlcdrv.c | 4 +--- drivers/net/hamradio/mkiss.c | 4 +--- drivers/net/hamradio/scc.c | 6 +----- drivers/net/hamradio/yam.c | 4 +--- include/net/ax25.h | 9 +++++++++ 9 files changed, 17 insertions(+), 30 deletions(-) diff -Nru a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c --- a/drivers/net/hamradio/6pack.c 2004-10-04 11:40:05 -03:00 +++ b/drivers/net/hamradio/6pack.c 2004-10-04 11:40:05 -03:00 @@ -424,17 +424,13 @@ if ((skb = dev_alloc_skb(count)) == NULL) goto out_mem; - skb->dev = sp->dev; ptr = skb_put(skb, count); *ptr++ = cmd; /* KISS command */ - memcpy(ptr, sp->cooked_buf + 1, count); - skb_set_link_header(skb); - skb->protocol = htons(ETH_P_AX25); + skb->protocol = ax25_type_trans(skb, sp->dev); netif_rx(skb); sp->dev->last_rx = jiffies; sp->stats.rx_packets++; - return; out_mem: diff -Nru a/drivers/net/hamradio/baycom_epp.c b/drivers/net/hamradio/baycom_epp.c --- a/drivers/net/hamradio/baycom_epp.c 2004-10-04 11:40:05 -03:00 +++ b/drivers/net/hamradio/baycom_epp.c 2004-10-04 11:40:05 -03:00 @@ -619,12 +619,10 @@ bc->stats.rx_dropped++; return; } - skb->dev = dev; cp = skb_put(skb, pktlen); *cp++ = 0; /* KISS kludge */ memcpy(cp, bc->hdlcrx.buf, pktlen - 1); - skb->protocol = htons(ETH_P_AX25); - skb_set_link_header(skb); + skb->protocol = ax25_type_trans(skb, dev); netif_rx(skb); dev->last_rx = jiffies; bc->stats.rx_packets++; diff -Nru a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c --- a/drivers/net/hamradio/bpqether.c 2004-10-04 11:40:05 -03:00 +++ b/drivers/net/hamradio/bpqether.c 2004-10-04 11:40:05 -03:00 @@ -213,11 +213,7 @@ ptr = skb_push(skb, 1); *ptr = 0; - skb->dev = dev; - skb->protocol = htons(ETH_P_AX25); - skb_set_link_header(skb); - skb->pkt_type = PACKET_HOST; - + skb->protocol = ax25_type_trans(skb, dev); netif_rx(skb); dev->last_rx = jiffies; unlock: diff -Nru a/drivers/net/hamradio/dmascc.c b/drivers/net/hamradio/dmascc.c --- a/drivers/net/hamradio/dmascc.c 2004-10-04 11:40:05 -03:00 +++ b/drivers/net/hamradio/dmascc.c 2004-10-04 11:40:05 -03:00 @@ -1222,9 +1222,7 @@ data = skb_put(skb, cb+1); data[0] = 0; memcpy(&data[1], priv->rx_buf[i], cb); - skb->dev = priv->dev; - skb->protocol = ntohs(ETH_P_AX25); - skb_set_link_header(skb); + skb->protocol = ax25_type_trans(skb, priv->dev); netif_rx(skb); priv->dev->last_rx = jiffies; priv->stats.rx_packets++; diff -Nru a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c --- a/drivers/net/hamradio/hdlcdrv.c 2004-10-04 11:40:05 -03:00 +++ b/drivers/net/hamradio/hdlcdrv.c 2004-10-04 11:40:05 -03:00 @@ -174,12 +174,10 @@ s->stats.rx_dropped++; return; } - skb->dev = dev; cp = skb_put(skb, pkt_len); *cp++ = 0; /* KISS kludge */ memcpy(cp, s->hdlcrx.buffer, pkt_len - 1); - skb->protocol = htons(ETH_P_AX25); - skb_set_link_header(skb); + skb->protocol = ax25_type_trans(skb, dev); netif_rx(skb); dev->last_rx = jiffies; s->stats.rx_packets++; diff -Nru a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c --- a/drivers/net/hamradio/mkiss.c 2004-10-04 11:40:05 -03:00 +++ b/drivers/net/hamradio/mkiss.c 2004-10-04 11:40:05 -03:00 @@ -332,12 +332,10 @@ return; } - skb->dev = ax->dev; spin_lock_bh(&ax->buflock); memcpy(skb_put(skb,count), ax->rbuff, count); spin_unlock_bh(&ax->buflock); - skb_set_link_header(skb); - skb->protocol = htons(ETH_P_AX25); + skb->protocol = ax25_type_trans(skb, ax->dev); netif_rx(skb); ax->dev->last_rx = jiffies; ax->rx_packets++; diff -Nru a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c --- a/drivers/net/hamradio/scc.c 2004-10-04 11:40:05 -03:00 +++ b/drivers/net/hamradio/scc.c 2004-10-04 11:40:05 -03:00 @@ -1630,11 +1630,7 @@ scc->dev_stat.rx_packets++; scc->dev_stat.rx_bytes += skb->len; - skb->dev = scc->dev; - skb->protocol = htons(ETH_P_AX25); - skb_set_link_header(skb); - skb->pkt_type = PACKET_HOST; - + skb->protocol = ax25_type_trans(skb, scc->dev); netif_rx(skb); scc->dev->last_rx = jiffies; return; diff -Nru a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c --- a/drivers/net/hamradio/yam.c 2004-10-04 11:40:05 -03:00 +++ b/drivers/net/hamradio/yam.c 2004-10-04 11:40:05 -03:00 @@ -522,12 +522,10 @@ ++yp->stats.rx_dropped; } else { unsigned char *cp; - skb->dev = dev; cp = skb_put(skb, pkt_len); *cp++ = 0; /* KISS kludge */ memcpy(cp, yp->rx_buf, pkt_len - 1); - skb->protocol = htons(ETH_P_AX25); - skb_set_link_header(skb); + skb->protocol = ax25_type_trans(skb, dev); netif_rx(skb); dev->last_rx = jiffies; ++yp->stats.rx_packets; diff -Nru a/include/net/ax25.h b/include/net/ax25.h --- a/include/net/ax25.h 2004-10-04 11:40:05 -03:00 +++ b/include/net/ax25.h 2004-10-04 11:40:05 -03:00 @@ -220,6 +220,15 @@ } } +static inline unsigned short ax25_type_trans(struct sk_buff *skb, + struct net_device *dev) +{ + skb->dev = dev; + skb->pkt_type = PACKET_HOST; + skb_set_link_header(skb); + return htons(ETH_P_AX25); +} + /* af_ax25.c */ extern struct hlist_head ax25_list; extern spinlock_t ax25_list_lock; --------------060805090508090008030709-- From hadi@cyberus.ca Mon Oct 4 08:00:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 08:00:10 -0700 (PDT) Received: from mx03.cybersurf.com (mx03.cybersurf.com [209.197.145.106]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94F041w007449 for ; Mon, 4 Oct 2004 08:00:04 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.20) id 1CEUJZ-0000M8-U2 for netdev@oss.sgi.com; Mon, 04 Oct 2004 10:59:49 -0400 Received: from [216.209.86.2] (helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CEUJX-00062t-KI; Mon, 04 Oct 2004 10:59:47 -0400 Subject: Re: [PATCH 2/3] NET: Generic rate estimator From: jamal Reply-To: hadi@cyberus.ca To: Thomas Graf Cc: "David S. Miller" , netdev@oss.sgi.com In-Reply-To: <20041004141532.GB15898@postel.suug.ch> References: <20041003213124.GG14344@postel.suug.ch> <20041003213954.GI14344@postel.suug.ch> <20041003161436.50293f9a.davem@davemloft.net> <20041003233647.GN14344@postel.suug.ch> <1096852582.1046.378.camel@jzny.localdomain> <20041004125300.GA15898@postel.suug.ch> <1096896256.1072.4.camel@jzny.localdomain> <20041004141532.GB15898@postel.suug.ch> Content-Type: text/plain Organization: jamalopolous Message-Id: <1096901984.1073.9.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 04 Oct 2004 10:59:44 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 9873 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev Content-Length: 934 Lines: 24 On Mon, 2004-10-04 at 10:15, Thomas Graf wrote: > * jamal <1096896256.1072.4.camel@jzny.localdomain> 2004-10-04 09:24 > > What you need is to replace the HZ/4 in the creation and execution > > of the timer with a constant. And that the value of said constant would > > be preferably in the 250ms range. > > HZ/4 == 250ms works except for HZ=122 (~246ms) and HZ=50 (~240ms). is that bad to let those have a slight different innacurate value? BTW wasnt there a jiffies2ms converter somewhere that we could use? I thought i saw something posted of that nature recently. > I don't > know how you think it is possible to find a constant around 250ms which > works for all HZ values. The problem gets even minor if we do > (HZ< if idx is 0, i.e. interval == -2. There should really be no difference between the two;-> you realize /4 is merely <<2 ? cheers, jamal From acme@conectiva.com.br Mon Oct 4 08:10:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 08:10:19 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94FA83O008021 for ; Mon, 4 Oct 2004 08:10:10 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 0FDED47336; Mon, 4 Oct 2004 12:09:50 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id AD4A147303 for ; Mon, 4 Oct 2004 12:09:49 -0300 (BRT) Received: (qmail 3711 invoked by uid 0); 4 Oct 2004 16:06:50 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 4 Oct 2004 16:06:50 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id 9020A14639; Mon, 4 Oct 2004 12:12:57 -0300 (BRT) Message-ID: <41616829.5070600@conectiva.com.br> Date: Mon, 04 Oct 2004 12:11:37 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: PATCH: [SKBUFF] introduce irda_type_trans X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------010203090900020901000700" X-Bogosity: No, tests=bogofilter, spamicity=0.344389, version=0.16.3 X-archive-position: 9874 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 Content-Length: 8361 Lines: 258 This is a multi-part message in MIME format. --------------010203090900020901000700 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi David, Please consider pulling from: bk://kernel.bkbits.net/acme/sk_buff-2.6 Now there are ten outstanding changesets in this tree. Regards, - Arnaldo --------------010203090900020901000700 Content-Type: text/plain; name="irda_type_trans.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="irda_type_trans.patch" =================================================================== ChangeSet@1.2039, 2004-10-04 12:09:26-03:00, acme@conectiva.com.br [SKBUFF] introduce irda_type_trans Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller drivers/net/irda/ali-ircc.c | 4 +--- drivers/net/irda/au1k_ir.c | 4 +--- drivers/net/irda/donauboe.c | 4 +--- drivers/net/irda/irda-usb.c | 4 +--- drivers/net/irda/nsc-ircc.c | 4 +--- drivers/net/irda/sa1100_ir.c | 4 +--- drivers/net/irda/smsc-ircc2.c | 4 +--- drivers/net/irda/stir4200.c | 5 +---- drivers/net/irda/via-ircc.c | 16 ++++------------ drivers/net/irda/vlsi_ir.c | 3 +-- drivers/net/irda/w83977af_ir.c | 4 +--- include/net/irda/irda.h | 10 ++++++++++ 12 files changed, 24 insertions(+), 42 deletions(-) diff -Nru a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c --- a/drivers/net/irda/ali-ircc.c 2004-10-04 12:09:47 -03:00 +++ b/drivers/net/irda/ali-ircc.c 2004-10-04 12:09:47 -03:00 @@ -1909,9 +1909,7 @@ self->stats.rx_bytes += len; self->stats.rx_packets++; - skb->dev = self->netdev; - skb_set_link_header(skb); - skb->protocol = htons(ETH_P_IRDA); + skb->protocol = irda_type_trans(skb, self->netdev); netif_rx(skb); self->netdev->last_rx = jiffies; } diff -Nru a/drivers/net/irda/au1k_ir.c b/drivers/net/irda/au1k_ir.c --- a/drivers/net/irda/au1k_ir.c 2004-10-04 12:09:47 -03:00 +++ b/drivers/net/irda/au1k_ir.c 2004-10-04 12:09:47 -03:00 @@ -606,9 +606,7 @@ else skb_put(skb, count-2); memcpy(skb->data, (void *)pDB->vaddr, count-2); - skb->dev = dev; - skb_set_link_header(skb); - skb->protocol = htons(ETH_P_IRDA); + skb->protocol = irda_type_trans(skb, dev); netif_rx(skb); prxd->count_0 = 0; prxd->count_1 = 0; diff -Nru a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c --- a/drivers/net/irda/donauboe.c 2004-10-04 12:09:47 -03:00 +++ b/drivers/net/irda/donauboe.c 2004-10-04 12:09:47 -03:00 @@ -1297,9 +1297,7 @@ memcpy (skb->data, self->rx_bufs[self->rxs], len); self->stats.rx_packets++; - skb->dev = self->netdev; - skb_set_link_header(skb); - skb->protocol = htons (ETH_P_IRDA); + skb->protocol = irda_type_trans(skb, self->netdev); } else { diff -Nru a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c --- a/drivers/net/irda/irda-usb.c 2004-10-04 12:09:47 -03:00 +++ b/drivers/net/irda/irda-usb.c 2004-10-04 12:09:47 -03:00 @@ -829,9 +829,7 @@ skb_pull(dataskb, USB_IRDA_HEADER); /* Ask the networking layer to queue the packet for the IrDA stack */ - dataskb->dev = self->netdev; - skb_set_link_header(dataskb); - dataskb->protocol = htons(ETH_P_IRDA); + dataskb->protocol = irda_type_trans(dataskb, self->netdev); netif_rx(dataskb); /* Keep stats up to date */ diff -Nru a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c --- a/drivers/net/irda/nsc-ircc.c 2004-10-04 12:09:47 -03:00 +++ b/drivers/net/irda/nsc-ircc.c 2004-10-04 12:09:47 -03:00 @@ -1731,9 +1731,7 @@ self->stats.rx_bytes += len; self->stats.rx_packets++; - skb->dev = self->netdev; - skb_set_link_header(skb); - skb->protocol = htons(ETH_P_IRDA); + skb->protocol = irda_type_trans(skb, self->netdev); netif_rx(skb); self->netdev->last_rx = jiffies; } diff -Nru a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c --- a/drivers/net/irda/sa1100_ir.c 2004-10-04 12:09:47 -03:00 +++ b/drivers/net/irda/sa1100_ir.c 2004-10-04 12:09:47 -03:00 @@ -569,9 +569,7 @@ si->rxskb = NULL; skb_put(skb, len); - skb->dev = dev; - skb_set_link_header(skb); - skb->protocol = htons(ETH_P_IRDA); + skb->protocol = irda_type_trans(skb, dev); si->stats.rx_packets++; si->stats.rx_bytes += len; diff -Nru a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c --- a/drivers/net/irda/smsc-ircc2.c 2004-10-04 12:09:47 -03:00 +++ b/drivers/net/irda/smsc-ircc2.c 2004-10-04 12:09:47 -03:00 @@ -1343,9 +1343,7 @@ self->stats.rx_packets++; self->stats.rx_bytes += len; - skb->dev = self->netdev; - skb_set_link_header(skb); - skb->protocol = htons(ETH_P_IRDA); + skb->protocol = irda_type_trans(skb, self->netdev); netif_rx(skb); } diff -Nru a/drivers/net/irda/stir4200.c b/drivers/net/irda/stir4200.c --- a/drivers/net/irda/stir4200.c 2004-10-04 12:09:47 -03:00 +++ b/drivers/net/irda/stir4200.c 2004-10-04 12:09:47 -03:00 @@ -368,10 +368,7 @@ skb_put(skb, len); - skb_set_link_header(skb); - skb->protocol = htons(ETH_P_IRDA); - skb->dev = stir->netdev; - + skb->protocol = irda_type_trans(skb, stir->netdev); netif_rx(skb); stir->stats.rx_packets++; diff -Nru a/drivers/net/irda/via-ircc.c b/drivers/net/irda/via-ircc.c --- a/drivers/net/irda/via-ircc.c 2004-10-04 12:09:47 -03:00 +++ b/drivers/net/irda/via-ircc.c 2004-10-04 12:09:47 -03:00 @@ -1078,9 +1078,7 @@ self->rx_buff.data += len; self->stats.rx_bytes += len; self->stats.rx_packets++; - skb->dev = self->netdev; - skb_set_link_header(skb); - skb->protocol = htons(ETH_P_IRDA); + skb->protocol = irda_type_trans(skb, self->netdev); netif_rx(skb); return TRUE; } @@ -1162,9 +1160,7 @@ self->rx_buff.data += len; self->stats.rx_bytes += len; self->stats.rx_packets++; - skb->dev = self->netdev; - skb_set_link_header(skb); - skb->protocol = htons(ETH_P_IRDA); + skb->protocol = irda_type_trans(skb, self->netdev); netif_rx(skb); //F01_E @@ -1204,9 +1200,7 @@ self->rx_buff.data += len; self->stats.rx_bytes += len; self->stats.rx_packets++; - skb->dev = self->netdev; - skb_set_link_header(skb); - skb->protocol = htons(ETH_P_IRDA); + skb->protocol = irda_type_trans(skb, self->netdev); netif_rx(skb); if (st_fifo->len < (MAX_RX_WINDOW + 2)) { RXStart(iobase, ON); @@ -1274,9 +1268,7 @@ self->rx_buff.data += len; self->stats.rx_bytes += len; self->stats.rx_packets++; - skb->dev = self->netdev; - skb_set_link_header(skb); - skb->protocol = htons(ETH_P_IRDA); + skb->protocol = irda_type_trans(skb, self->netdev); netif_rx(skb); } //while self->RetryCount = 0; diff -Nru a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c --- a/drivers/net/irda/vlsi_ir.c 2004-10-04 12:09:47 -03:00 +++ b/drivers/net/irda/vlsi_ir.c 2004-10-04 12:09:47 -03:00 @@ -594,9 +594,8 @@ skb = rd->skb; rd->skb = NULL; - skb->dev = ndev; memcpy(skb_put(skb,len), rd->buf, len); - skb_set_link_header(skb); + skb->protocol = irda_type_trans(skb, ndev); if (in_interrupt()) netif_rx(skb); else diff -Nru a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c --- a/drivers/net/irda/w83977af_ir.c 2004-10-04 12:09:47 -03:00 +++ b/drivers/net/irda/w83977af_ir.c 2004-10-04 12:09:47 -03:00 @@ -919,9 +919,7 @@ self->rx_buff.data += len; self->stats.rx_packets++; - skb->dev = self->netdev; - skb_set_link_header(skb); - skb->protocol = htons(ETH_P_IRDA); + skb->protocol = irda_type_trans(skb, self->netdev); netif_rx(skb); self->netdev->last_rx = jiffies; } diff -Nru a/include/net/irda/irda.h b/include/net/irda/irda.h --- a/include/net/irda/irda.h 2004-10-04 12:09:47 -03:00 +++ b/include/net/irda/irda.h 2004-10-04 12:09:47 -03:00 @@ -111,4 +111,14 @@ #define IAS_IRCOMM_ID 0x2343 #define IAS_IRLPT_ID 0x9876 +#include + +static inline unsigned short irda_type_trans(struct sk_buff *skb, + struct net_device *dev) +{ + skb->dev = dev; + skb_set_link_header(skb); + return htons(ETH_P_IRDA); +} + #endif /* NET_IRDA_H */ --------------010203090900020901000700-- From tgraf@suug.ch Mon Oct 4 08:29:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 08:29:14 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94FT7LP013052 for ; Mon, 4 Oct 2004 08:29:08 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id E2CE88B; Mon, 4 Oct 2004 17:28:32 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 7928E1C0E8; Mon, 4 Oct 2004 17:29:15 +0200 (CEST) Date: Mon, 4 Oct 2004 17:29:15 +0200 From: Thomas Graf To: jamal Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 2/3] NET: Generic rate estimator Message-ID: <20041004152915.GC15898@postel.suug.ch> References: <20041003213124.GG14344@postel.suug.ch> <20041003213954.GI14344@postel.suug.ch> <20041003161436.50293f9a.davem@davemloft.net> <20041003233647.GN14344@postel.suug.ch> <1096852582.1046.378.camel@jzny.localdomain> <20041004125300.GA15898@postel.suug.ch> <1096896256.1072.4.camel@jzny.localdomain> <20041004141532.GB15898@postel.suug.ch> <1096901984.1073.9.camel@jzny.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1096901984.1073.9.camel@jzny.localdomain> X-archive-position: 9875 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 1324 Lines: 44 * jamal <1096901984.1073.9.camel@jzny.localdomain> 2004-10-04 10:59 > is that bad to let those have a slight different innacurate value? I don't see this as a problem, I think the timers will be more inacurate anyway. > BTW wasnt there a jiffies2ms converter somewhere that we could use? > I thought i saw something posted of that nature recently. #define PSCHED_US2JIFFIE(delay) #define PSCHED_JIFFIE2US(delay) but we don't have half a jiffie ;) The only way to make it accurate in the case of 122 and 50 would be to set timer_expires based on a flip-flop adding HZ/4 and (HZ/4)+1 repeaditly and this only works if HZ%2==0. I would be fine using PSCHED_ because the user can decide accuracy over performance and vice versa. It would make the code dependant on sch_api.c though. > There should really be no difference between the two;-> you realize /4 > is merely <<2 ? Oh yes there is: HZ=50, idx=2 (HZ/4)< 50/4 ans = 12.500 octave:9> dec2bin(12) ans = 1100 octave:10> bin2dec('110000') ans = 48 (HZ< dec2bin(50) ans = 110010 octave:12> bin2dec('11001000') ans = 200 octave:13> 200/4 ans = 50 It avoids carrying on the inaccuracy, of course this only works because (2*HZ)%4==0 is true for all existing HZ values. Or do I misundstand the compiler and it's all in floating points? From acme@conectiva.com.br Mon Oct 4 09:33:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 09:33:52 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94GXhVr014299 for ; Mon, 4 Oct 2004 09:33:45 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 7763D473B3; Mon, 4 Oct 2004 13:33:27 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 03F4D472F5 for ; Mon, 4 Oct 2004 13:33:27 -0300 (BRT) Received: (qmail 13165 invoked by uid 0); 4 Oct 2004 17:30:27 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 4 Oct 2004 17:30:27 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id 5CA1E14639; Mon, 4 Oct 2004 13:36:34 -0300 (BRT) Message-ID: <41617BC2.7010004@conectiva.com.br> Date: Mon, 04 Oct 2004 13:35:14 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [SKBUFF] introduce skb_valid_link_header(skb, hdrlen) X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------020704050702080000070909" X-Bogosity: No, tests=bogofilter, spamicity=0.391096, version=0.16.3 X-archive-position: 9876 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 Content-Length: 5081 Lines: 144 This is a multi-part message in MIME format. --------------020704050702080000070909 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi David, Please consider pulling from: bk://kernel.bkbits.net/acme/sk_buff-2.6 Nowadays only the netfilter folks use such thing, in an open coded way, but this seems useful for other cases, so I've moved it to skbuff.h, abstracting another direct reference to the skb "wannabe-private" headers. Now there are eleven outstanding changesets in this tree. Best Regards, - Arnaldo --------------020704050702080000070909 Content-Type: text/plain; name="skb_valid_link_header.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="skb_valid_link_header.patch" =================================================================== ChangeSet@1.2040, 2004-10-04 13:21:41-03:00, acme@amd64.kerneljanitors.org [SKBUFF] introduce skb_valid_link_header(skb, hdrlen) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller drivers/message/fusion/mptlan.c | 2 +- include/linux/skbuff.h | 7 +++++++ net/bridge/br_netfilter.c | 2 +- net/ipv4/netfilter/ipt_mac.c | 5 ++--- net/ipv6/netfilter/ip6t_eui64.c | 10 ++++------ net/ipv6/netfilter/ip6t_mac.c | 5 ++--- 6 files changed, 17 insertions(+), 14 deletions(-) diff -Nru a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c --- a/drivers/message/fusion/mptlan.c 2004-10-04 13:23:51 -03:00 +++ b/drivers/message/fusion/mptlan.c 2004-10-04 13:23:51 -03:00 @@ -770,7 +770,7 @@ pSendReq = (LANSendRequest_t *) mf; - /* Set the mac.raw pointer, since this apparently isn't getting + /* Set the link header pointer, since this apparently isn't getting * done before we get the skb. Pull the data pointer past the mac data. */ skb_set_link_header(skb); diff -Nru a/include/linux/skbuff.h b/include/linux/skbuff.h --- a/include/linux/skbuff.h 2004-10-04 13:23:51 -03:00 +++ b/include/linux/skbuff.h 2004-10-04 13:23:51 -03:00 @@ -295,6 +295,13 @@ skb->mac.raw = skb->data; } +static inline int skb_valid_link_header(const struct sk_buff *skb, + const int hdrlen) +{ + return skb->mac.raw >= skb->head && + (skb->mac.raw + hdrlen) <= skb->data; +} + extern void __kfree_skb(struct sk_buff *skb); extern struct sk_buff *alloc_skb(unsigned int size, int priority); extern void kfree_skbmem(struct sk_buff *skb); diff -Nru a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c --- a/net/bridge/br_netfilter.c 2004-10-04 13:23:51 -03:00 +++ b/net/bridge/br_netfilter.c 2004-10-04 13:23:51 -03:00 @@ -759,7 +759,7 @@ #ifdef CONFIG_NETFILTER_DEBUG /* Be very paranoid. This probably won't happen anymore, but let's * keep the check just to be sure... */ - if (skb->mac.raw < skb->head || skb->mac.raw + ETH_HLEN > skb->data) { + if (!skb_valid_link_header(skb, ETH_HLEN)) { printk(KERN_CRIT "br_netfilter: Argh!! br_nf_post_routing: " "bad mac.raw pointer."); goto print_error; diff -Nru a/net/ipv4/netfilter/ipt_mac.c b/net/ipv4/netfilter/ipt_mac.c --- a/net/ipv4/netfilter/ipt_mac.c 2004-10-04 13:23:51 -03:00 +++ b/net/ipv4/netfilter/ipt_mac.c 2004-10-04 13:23:51 -03:00 @@ -30,10 +30,9 @@ const struct ipt_mac_info *info = matchinfo; /* Is mac pointer valid? */ - return (skb->mac.raw >= skb->head - && (skb->mac.raw + ETH_HLEN) <= skb->data + return (skb_valid_link_header(skb, ETH_HLEN) && /* If so, compare... */ - && ((memcmp(eth_hdr(skb)->h_source, info->srcaddr, ETH_ALEN) + ((memcmp(eth_hdr(skb)->h_source, info->srcaddr, ETH_ALEN) == 0) ^ info->invert)); } diff -Nru a/net/ipv6/netfilter/ip6t_eui64.c b/net/ipv6/netfilter/ip6t_eui64.c --- a/net/ipv6/netfilter/ip6t_eui64.c 2004-10-04 13:23:51 -03:00 +++ b/net/ipv6/netfilter/ip6t_eui64.c 2004-10-04 13:23:51 -03:00 @@ -32,12 +32,10 @@ unsigned char eui64[8]; int i=0; - if ( !(skb->mac.raw >= skb->head - && (skb->mac.raw + ETH_HLEN) <= skb->data) - && offset != 0) { - *hotdrop = 1; - return 0; - } + if (!skb_valid_link_header(skb, ETH_HLEN) && offset != 0) { + *hotdrop = 1; + return 0; + } memset(eui64, 0, sizeof(eui64)); diff -Nru a/net/ipv6/netfilter/ip6t_mac.c b/net/ipv6/netfilter/ip6t_mac.c --- a/net/ipv6/netfilter/ip6t_mac.c 2004-10-04 13:23:51 -03:00 +++ b/net/ipv6/netfilter/ip6t_mac.c 2004-10-04 13:23:51 -03:00 @@ -32,10 +32,9 @@ const struct ip6t_mac_info *info = matchinfo; /* Is mac pointer valid? */ - return (skb->mac.raw >= skb->head - && (skb->mac.raw + ETH_HLEN) <= skb->data + return (skb_valid_link_header(skb, ETH_HLEN) && /* If so, compare... */ - && ((memcmp(eth_hdr(skb)->h_source, info->srcaddr, ETH_ALEN) + ((memcmp(eth_hdr(skb)->h_source, info->srcaddr, ETH_ALEN) == 0) ^ info->invert)); } --------------020704050702080000070909-- From pranav@nodeinfotech.com Mon Oct 4 11:07:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 11:07:41 -0700 (PDT) Received: from localhost.localdomain (dialpool-210-214-18-141.maa.sify.net [210.214.18.141]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94I7ZRC016125; Mon, 4 Oct 2004 11:07:36 -0700 Received: from pranav ([192.168.10.220]) by localhost.localdomain (8.11.2/8.11.2) with SMTP id i94IHa502628; Mon, 4 Oct 2004 23:47:36 +0530 Reply-To: From: "Pranav" To: "David S. Miller" Cc: , , Subject: HELP NEEDED!!! Date: Mon, 4 Oct 2004 23:37:14 +0530 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <20041003145909.6dc704dc.davem@davemloft.net> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-archive-position: 9877 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pranav@nodeinfotech.com Precedence: bulk X-list: netdev Content-Length: 504 Lines: 19 Hi everyone, I have got a small problem regarding configuring my ethernet card,while loading the eth0 driver the kernel performs auto-probing for the device and configures the eth0 to half-duplex. I used command line arguments while loading modules insmod 8139too io=0x280 irq=10 duplex=2 but still it performs the autoprobing overriding the parameters. Please help me out of this problem,i want to configure my ethernetcard to fullduplex. Waiting for a reply... With Regards, Pranav. From pranav@nodeinfotech.com Mon Oct 4 11:09:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 11:09:25 -0700 (PDT) Received: from localhost.localdomain (dialpool-210-214-18-141.maa.sify.net [210.214.18.141]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94I9JvU016360; Mon, 4 Oct 2004 11:09:20 -0700 Received: from pranav ([192.168.10.220]) by localhost.localdomain (8.11.2/8.11.2) with SMTP id i94IJP502632; Mon, 4 Oct 2004 23:49:25 +0530 Reply-To: From: "Pranav" To: , , Subject: HELP NEEDED!!! Date: Mon, 4 Oct 2004 23:39:04 +0530 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-archive-position: 9878 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pranav@nodeinfotech.com Precedence: bulk X-list: netdev Content-Length: 504 Lines: 19 Hi everyone, I have got a small problem regarding configuring my ethernet card,while loading the eth0 driver the kernel performs auto-probing for the device and configures the eth0 to half-duplex. I used command line arguments while loading modules insmod 8139too io=0x280 irq=10 duplex=2 but still it performs the autoprobing overriding the parameters. Please help me out of this problem,i want to configure my ethernetcard to fullduplex. Waiting for a reply... With Regards, Pranav. From jgarzik@pobox.com Mon Oct 4 11:15:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 11:15:51 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94IFkQF016942; Mon, 4 Oct 2004 11:15:46 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CEXMx-0000d0-OD; Mon, 04 Oct 2004 19:15:31 +0100 Message-ID: <41619336.8080805@pobox.com> Date: Mon, 04 Oct 2004 14:15:18 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pranav@nodeinfotech.com CC: "David S. Miller" , netdev-bounce@oss.sgi.com, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: HELP NEEDED!!! References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 9879 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: 505 Lines: 19 Pranav wrote: > Hi everyone, > > I have got a small problem regarding configuring my ethernet > card,while loading the eth0 driver the kernel performs auto-probing for the > device and configures the eth0 to half-duplex. > > I used command line arguments while loading modules > insmod 8139too io=0x280 irq=10 duplex=2 8139too module does not take any arguments like io= or irq=. PCI cards do not need such parameters. You may use ethtool to select half-duplex or full-duplex. Jeff From davem@davemloft.net Mon Oct 4 12:20:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 12:21:00 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94JKnQw021570 for ; Mon, 4 Oct 2004 12:20:49 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEYLQ-0004lI-00; Mon, 04 Oct 2004 12:18:00 -0700 Date: Mon, 4 Oct 2004 12:17:59 -0700 From: "David S. Miller" To: Harald Welte Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.4] backport neighbour cache redesign Message-Id: <20041004121759.26798f1d.davem@davemloft.net> In-Reply-To: <20040930154753.GD1860@sunbeam.de.gnumonks.org> References: <20040930154753.GD1860@sunbeam.de.gnumonks.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9880 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 65815 Lines: 2457 Ok I started playing with this, here is what I have currently. Changes: 1) Merge in missing fixes from 2.6.x port. In particular: - missing "recalculate hash rand on hash grow" - missing ARP clip fixes (was initializing neigh table by hand, needed to use net/core/neighbour.c interfaces for that). This one wasn't Harald's fault as this fix was made after he created this 2.4.x backport 2) Missing symbol exports for the new interfaces modules can use, namely: neigh_lookup_nodev neigh_seq_start neigh_seq_next neigh_seq_stop 3) Delete instead of "#if 0" out the now totally unused code inside of net/atm/clip.c We need to test and verify this patch a lot before I can toss such a big thing over to Marcelo, but I definitely intend to send this to him. ===== drivers/net/bonding/bond_main.c 1.86 vs edited ===== --- 1.86/drivers/net/bonding/bond_main.c 2004-01-21 08:55:17 -08:00 +++ edited/drivers/net/bonding/bond_main.c 2004-10-03 15:12:55 -07:00 @@ -3086,8 +3086,6 @@ out: #ifdef CONFIG_PROC_FS -#define SEQ_START_TOKEN ((void *)1) - static void *bond_info_seq_start(struct seq_file *seq, loff_t *pos) { struct bonding *bond = seq->private; ===== fs/proc/root.c 1.8 vs edited ===== --- 1.8/fs/proc/root.c 2003-11-15 08:23:40 -08:00 +++ edited/fs/proc/root.c 2004-10-03 15:12:55 -07:00 @@ -17,7 +17,7 @@ #include #include -struct proc_dir_entry *proc_net, *proc_bus, *proc_root_fs, *proc_root_driver; +struct proc_dir_entry *proc_net, *proc_net_stat, *proc_bus, *proc_root_fs, *proc_root_driver; #ifdef CONFIG_SYSCTL struct proc_dir_entry *proc_sys_root; @@ -38,6 +38,8 @@ void __init proc_root_init(void) } proc_misc_init(); proc_net = proc_mkdir("net", 0); + proc_net_stat = proc_mkdir("net/stat", NULL); + #ifdef CONFIG_SYSVIPC proc_mkdir("sysvipc", 0); #endif @@ -143,5 +145,6 @@ EXPORT_SYMBOL(remove_proc_entry); EXPORT_SYMBOL(proc_root); EXPORT_SYMBOL(proc_root_fs); EXPORT_SYMBOL(proc_net); +EXPORT_SYMBOL(proc_net_stat); EXPORT_SYMBOL(proc_bus); EXPORT_SYMBOL(proc_root_driver); ===== include/linux/proc_fs.h 1.9 vs edited ===== --- 1.9/include/linux/proc_fs.h 2003-09-15 01:39:45 -07:00 +++ edited/include/linux/proc_fs.h 2004-10-03 15:12:55 -07:00 @@ -79,6 +79,7 @@ struct proc_dir_entry { extern struct proc_dir_entry proc_root; extern struct proc_dir_entry *proc_root_fs; extern struct proc_dir_entry *proc_net; +extern struct proc_dir_entry *proc_net_stat; extern struct proc_dir_entry *proc_bus; extern struct proc_dir_entry *proc_root_driver; extern struct proc_dir_entry *proc_root_kcore; @@ -168,6 +169,16 @@ static inline struct proc_dir_entry *pro mode_t mode, get_info_t *get_info) { return create_proc_info_entry(name,mode,proc_net,get_info); +} + +static inline struct proc_dir_entry *proc_net_fops_create(const char *name, + mode_t mode, struct file_operations *fops) +{ + struct proc_dir_entry *res = create_proc_entry(name, mode, proc_net); + + if (res) + res->proc_fops = fops; + return res; } static inline void proc_net_remove(const char *name) ===== include/linux/seq_file.h 1.3 vs edited ===== --- 1.3/include/linux/seq_file.h 2003-08-25 09:34:39 -07:00 +++ edited/include/linux/seq_file.h 2004-10-03 15:12:55 -07:00 @@ -65,5 +65,8 @@ int seq_path(struct seq_file *, struct v int single_open(struct file *, int (*)(struct seq_file *, void *), void *); int single_release(struct inode *, struct file *); int seq_release_private(struct inode *, struct file *); + +#define SEQ_START_TOKEN ((void *)1) + #endif #endif ===== include/net/dn_neigh.h 1.1 vs edited ===== --- 1.1/include/net/dn_neigh.h 2002-02-05 09:39:49 -08:00 +++ edited/include/net/dn_neigh.h 2004-10-03 15:12:55 -07:00 @@ -18,7 +18,6 @@ struct dn_neigh { extern void dn_neigh_init(void); extern void dn_neigh_cleanup(void); -extern struct neighbour *dn_neigh_lookup(struct neigh_table *tbl, void *ptr); extern int dn_neigh_router_hello(struct sk_buff *skb); extern int dn_neigh_endnode_hello(struct sk_buff *skb); extern void dn_neigh_pointopoint_hello(struct sk_buff *skb); ===== include/net/neighbour.h 1.3 vs edited ===== --- 1.3/include/net/neighbour.h 2004-07-15 13:33:03 -07:00 +++ edited/include/net/neighbour.h 2004-10-03 15:12:55 -07:00 @@ -7,6 +7,11 @@ * Authors: * Pedro Roque * Alexey Kuznetsov + * + * Changes: + * + * Harald Welte: + * - Add neighbour cache statistics like rtstat */ /* The following flags & states are exported to user space, @@ -45,6 +50,7 @@ #include #include +#include #define NUD_IN_TIMER (NUD_INCOMPLETE|NUD_DELAY|NUD_PROBE) #define NUD_VALID (NUD_PERMANENT|NUD_NOARP|NUD_REACHABLE|NUD_PROBE|NUD_STALE|NUD_DELAY) @@ -78,12 +84,25 @@ struct neigh_parms struct neigh_statistics { - unsigned long allocs; - unsigned long res_failed; - unsigned long rcv_probes_mcast; - unsigned long rcv_probes_ucast; + unsigned long allocs; /* number of allocated neighs */ + unsigned long destroys; /* number of destroyed neighs */ + unsigned long hash_grows; /* number of hash resizes */ + + unsigned long res_failed; /* nomber of failed resolutions */ + + unsigned long lookups; /* number of lookups */ + unsigned long hits; /* number of hits (among lookups) */ + + unsigned long rcv_probes_mcast; /* number of received mcast ipv6 */ + unsigned long rcv_probes_ucast; /* number of received ucast ipv6 */ + + unsigned long periodic_gc_runs; /* number of periodic GC runs */ + unsigned long forced_gc_runs; /* number of forced GC runs */ }; +#define NEIGH_CACHE_STAT_INC(tbl, field) \ + ((tbl)->stats[smp_processor_id()].field++) + struct neighbour { struct neighbour *next; @@ -128,9 +147,6 @@ struct pneigh_entry u8 key[0]; }; -#define NEIGH_HASHMASK 0x1F -#define PNEIGH_HASHMASK 0xF - /* * neighbour table manipulation */ @@ -164,9 +180,15 @@ struct neigh_table struct neigh_parms *parms_list; kmem_cache_t *kmem_cachep; struct tasklet_struct gc_task; - struct neigh_statistics stats; - struct neighbour *hash_buckets[NEIGH_HASHMASK+1]; - struct pneigh_entry *phash_buckets[PNEIGH_HASHMASK+1]; + struct neigh_statistics stats[NR_CPUS]; + struct neighbour **hash_buckets; + unsigned int hash_mask; + __u32 hash_rnd; + unsigned int hash_chain_gc; + struct pneigh_entry **phash_buckets; +#ifdef CONFIG_PROC_FS + struct proc_dir_entry *pde; +#endif }; extern void neigh_table_init(struct neigh_table *tbl); @@ -174,6 +196,8 @@ extern int neigh_table_clear(struct ne extern struct neighbour * neigh_lookup(struct neigh_table *tbl, const void *pkey, struct net_device *dev); +extern struct neighbour * neigh_lookup_nodev(struct neigh_table *tbl, + const void *pkey); extern struct neighbour * neigh_create(struct neigh_table *tbl, const void *pkey, struct net_device *dev); @@ -204,6 +228,24 @@ extern int neigh_dump_info(struct sk_buf extern int neigh_add(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg); extern int neigh_delete(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg); extern void neigh_app_ns(struct neighbour *n); + +extern void neigh_for_each(struct neigh_table *tbl, void (*cb)(struct neighbour *, void *), void *cookie); +extern void __neigh_for_each_release(struct neigh_table *tbl, int (*cb)(struct neighbour *)); +extern void pneigh_for_each(struct neigh_table *tbl, void (*cb)(struct pneigh_entry *)); + +struct neigh_seq_state { + struct neigh_table *tbl; + void *(*neigh_sub_iter)(struct neigh_seq_state *state, + struct neighbour *n, loff_t *pos); + unsigned int bucket; + unsigned int flags; +#define NEIGH_SEQ_NEIGH_ONLY 0x00000001 +#define NEIGH_SEQ_IS_PNEIGH 0x00000002 +#define NEIGH_SEQ_SKIP_NOARP 0x00000004 +}; +extern void *neigh_seq_start(struct seq_file *, loff_t *, struct neigh_table *, unsigned int); +extern void *neigh_seq_next(struct seq_file *, void *, loff_t *); +extern void neigh_seq_stop(struct seq_file *, void *); extern int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p, int p_id, int pdev_id, char *p_name); ===== net/netsyms.c 1.49 vs edited ===== --- 1.49/net/netsyms.c 2004-08-29 21:11:49 -07:00 +++ edited/net/netsyms.c 2004-10-03 19:14:10 -07:00 @@ -179,9 +179,13 @@ EXPORT_SYMBOL(neigh_connected_output); EXPORT_SYMBOL(neigh_update); EXPORT_SYMBOL(neigh_create); EXPORT_SYMBOL(neigh_lookup); +EXPORT_SYMBOL(neigh_lookup_nodev); EXPORT_SYMBOL(__neigh_event_send); EXPORT_SYMBOL(neigh_event_ns); EXPORT_SYMBOL(neigh_ifdown); +EXPORT_SYMBOL(neigh_seq_start); +EXPORT_SYMBOL(neigh_seq_next); +EXPORT_SYMBOL(neigh_seq_stop); #ifdef CONFIG_ARPD EXPORT_SYMBOL(neigh_app_ns); #endif ===== net/atm/clip.c 1.13 vs edited ===== --- 1.13/net/atm/clip.c 2004-02-04 23:20:52 -08:00 +++ edited/net/atm/clip.c 2004-10-03 15:19:49 -07:00 @@ -1,6 +1,10 @@ /* net/atm/clip.c - RFC1577 Classical IP over ATM */ -/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */ +/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA + * + * Changes: + * Harald Welte : + * - backport DaveM's generalized neighbour cache from 2.6.9-rcX */ #include @@ -24,6 +28,7 @@ #include /* for IFF_UP */ #include #include +#include #include /* for struct rtable and routing */ #include /* icmp_send */ #include /* for HZ */ @@ -119,64 +124,49 @@ out: spin_unlock_bh(&entry->neigh->dev->xmit_lock); } - -static void idle_timer_check(unsigned long dummy) +/* The neighbour entry n->lock is held. */ +static int neigh_check_cb(struct neighbour *n) { - int i; + struct atmarp_entry *entry = NEIGH2ENTRY(n); + struct clip_vcc *cv; - /*DPRINTK("idle_timer_check\n");*/ - write_lock(&clip_tbl.lock); - for (i = 0; i <= NEIGH_HASHMASK; i++) { - struct neighbour **np; + for (cv = entry->vccs; cv; cv = cv->next) { + unsigned long exp = cv->last_use + cv->idle_timeout; - for (np = &clip_tbl.hash_buckets[i]; *np;) { - struct neighbour *n = *np; - struct atmarp_entry *entry = NEIGH2ENTRY(n); - struct clip_vcc *clip_vcc; - - write_lock(&n->lock); - - for (clip_vcc = entry->vccs; clip_vcc; - clip_vcc = clip_vcc->next) - if (clip_vcc->idle_timeout && - time_after(jiffies, clip_vcc->last_use+ - clip_vcc->idle_timeout)) { - DPRINTK("releasing vcc %p->%p of " - "entry %p\n",clip_vcc,clip_vcc->vcc, - entry); - vcc_release_async(clip_vcc->vcc, - -ETIMEDOUT); - } - if (entry->vccs || - time_before(jiffies, entry->expires)) { - np = &n->next; - write_unlock(&n->lock); - continue; - } - if (atomic_read(&n->refcnt) > 1) { - struct sk_buff *skb; - - DPRINTK("destruction postponed with ref %d\n", - atomic_read(&n->refcnt)); - while ((skb = skb_dequeue(&n->arp_queue)) != - NULL) - dev_kfree_skb(skb); - np = &n->next; - write_unlock(&n->lock); - continue; - } - *np = n->next; - DPRINTK("expired neigh %p\n",n); - n->dead = 1; - write_unlock(&n->lock); - neigh_release(n); + if (cv->idle_timeout && time_after(jiffies, exp)) { + DPRINTK("releasing vcc %p->%p of entry %p\n", + cv, cv->vcc, entry); + vcc_release_async(cv->vcc, -ETIMEDOUT); } } + + if (entry->vccs || time_before(jiffies, entry->expires)) + return 0; + + if (atomic_read(&n->refcnt) > 1) { + struct sk_buff *skb; + + DPRINTK("destruction postponed with ref %d\n", + atomic_read(&n->refcnt)); + + while ((skb = skb_dequeue(&n->arp_queue)) != NULL) + dev_kfree_skb(skb); + + return 0; + } + + DPRINTK("expired neigh %p\n",n); + return 1; +} + +static void idle_timer_check(unsigned long dummy) +{ + write_lock(&clip_tbl.lock); + __neigh_for_each_release(&clip_tbl, neigh_check_cb); mod_timer(&idle_timer, jiffies+CLIP_CHECK_INTERVAL*HZ); write_unlock(&clip_tbl.lock); } - static int clip_arp_rcv(struct sk_buff *skb) { struct atm_vcc *vcc; @@ -320,15 +310,7 @@ static int clip_constructor(struct neigh static u32 clip_hash(const void *pkey, const struct net_device *dev) { - u32 hash_val; - - hash_val = *(u32*)pkey; - hash_val ^= (hash_val>>16); - hash_val ^= hash_val>>8; - hash_val ^= hash_val>>3; - hash_val = (hash_val^dev->ifindex)&NEIGH_HASHMASK; - - return hash_val; + return jhash_2words(*(u32 *)pkey, dev->ifindex, clip_tbl.hash_rnd); } @@ -768,19 +750,7 @@ static struct atm_clip_ops __atm_clip_op static int __init atm_clip_init(void) { - /* we should use neigh_table_init() */ - clip_tbl.lock = RW_LOCK_UNLOCKED; - clip_tbl.kmem_cachep = kmem_cache_create(clip_tbl.id, - clip_tbl.entry_size, 0, SLAB_HWCACHE_ALIGN, NULL, NULL); - - if (!clip_tbl.kmem_cachep) - return -ENOMEM; - - /* so neigh_ifdown() doesn't complain */ - clip_tbl.proxy_timer.data = 0; - clip_tbl.proxy_timer.function = 0; - init_timer(&clip_tbl.proxy_timer); - skb_queue_head_init(&clip_tbl.proxy_queue); + neigh_table_init(&clip_tbl); clip_tbl_hook = &clip_tbl; atm_clip_ops_set(&__atm_clip_ops); @@ -794,7 +764,18 @@ static void __exit atm_clip_exit(void) atm_clip_ops_set(NULL); + /* First, stop the idle timer, so it stops banging + * on the table. + */ + if (start_timer == 0) + del_timer(&idle_timer); + + /* Next, purge the table, so that the device + * unregister loop below does not hang due to + * device references remaining in the table. + */ neigh_ifdown(&clip_tbl, NULL); + dev = clip_devs; while (dev) { next = PRIV(dev)->next; @@ -802,9 +783,9 @@ static void __exit atm_clip_exit(void) kfree(dev); dev = next; } - if (start_timer == 0) del_timer(&idle_timer); - kmem_cache_destroy(clip_tbl.kmem_cachep); + /* Now it is safe to fully shutdown whole table. */ + neigh_table_clear(&clip_tbl); clip_tbl_hook = NULL; } ===== net/atm/proc.c 1.11 vs edited ===== --- 1.11/net/atm/proc.c 2003-10-14 14:01:53 -07:00 +++ edited/net/atm/proc.c 2004-10-03 15:30:31 -07:00 @@ -44,11 +44,6 @@ #include "ipcommon.h" #endif -#if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE) -#include "lec.h" -#include "lec_arpc.h" -#endif - static ssize_t proc_dev_atm_read(struct file *file,char *buf,size_t count, loff_t *pos); static ssize_t proc_spec_atm_read(struct file *file,char *buf,size_t count, @@ -90,74 +85,202 @@ static void dev_info(const struct atm_de #if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE) +#define SEQ_NO_VCC_TOKEN ((void *) 2) -static int svc_addr(char *buf,struct sockaddr_atmsvc *addr) +static void svc_addr(struct seq_file *seq, struct sockaddr_atmsvc *addr) { static int code[] = { 1,2,10,6,1,0 }; static int e164[] = { 1,8,4,6,1,0 }; - int *fields; - int len,i,j,pos; - len = 0; if (*addr->sas_addr.pub) { - strcpy(buf,addr->sas_addr.pub); - len = strlen(addr->sas_addr.pub); - buf += len; - if (*addr->sas_addr.prv) { - *buf++ = '+'; - len++; - } + seq_printf(seq, "%s", addr->sas_addr.pub); + if (*addr->sas_addr.prv) + seq_putc(seq, '+'); + } else if (!*addr->sas_addr.prv) { + seq_printf(seq, "%s", "(none)"); + return; } - else if (!*addr->sas_addr.prv) { - strcpy(buf,"(none)"); - return strlen(buf); - } if (*addr->sas_addr.prv) { - len += 44; - pos = 0; - fields = *addr->sas_addr.prv == ATM_AFI_E164 ? e164 : code; + unsigned char *prv = addr->sas_addr.prv; + int *fields; + int i, j; + + fields = *prv == ATM_AFI_E164 ? e164 : code; for (i = 0; fields[i]; i++) { - for (j = fields[i]; j; j--) { - sprintf(buf,"%02X",addr->sas_addr.prv[pos++]); - buf += 2; - } - if (fields[i+1]) *buf++ = '.'; + for (j = fields[i]; j; j--) + seq_printf(seq, "%02X", *prv++); + if (fields[i+1]) + seq_putc(seq, '.'); } } - return len; } -static void atmarp_info(struct net_device *dev,struct atmarp_entry *entry, - struct clip_vcc *clip_vcc,char *buf) -{ - unsigned char *ip; - int svc,off,ip_len; - - svc = !clip_vcc || clip_vcc->vcc->sk->family == AF_ATMSVC; - off = sprintf(buf,"%-6s%-4s%-4s%5ld ",dev->name,svc ? "SVC" : "PVC", - !clip_vcc || clip_vcc->encap ? "LLC" : "NULL", - (jiffies-(clip_vcc ? clip_vcc->last_use : entry->neigh->used))/ - HZ); - ip = (unsigned char *) &entry->ip; - ip_len = sprintf(buf+off,"%d.%d.%d.%d",ip[0],ip[1],ip[2],ip[3]); - off += ip_len; - while (ip_len++ < 16) buf[off++] = ' '; - if (!clip_vcc) +static void atmarp_info(struct seq_file *seq, struct net_device *dev,struct + atmarp_entry *entry, struct clip_vcc *clip_vcc) { + unsigned long exp; + char buf[17]; + int svc, llc, off; + + svc = ((clip_vcc == SEQ_NO_VCC_TOKEN) || + (clip_vcc->vcc->sk->family == AF_ATMSVC)); + + llc = ((clip_vcc == SEQ_NO_VCC_TOKEN) || + (clip_vcc->encap)); + + if (clip_vcc == SEQ_NO_VCC_TOKEN) + exp = entry->neigh->used; + else + exp = clip_vcc->last_use; + + exp = (jiffies - exp) / HZ; + + seq_printf(seq, "%-6s%-4s%-4s%5ld ", + dev->name, + svc ? "SVC" : "PVC", + llc ? "LLC" : "NULL", + exp); + + off = snprintf(buf, sizeof(buf)-1, "%d.%d.%d.%d", NIPQUAD(entry->ip)); + while (off < 16) + buf[off++] = ' '; + buf[off] = '\0'; + seq_printf(seq, "%s", buf); + + if (clip_vcc == SEQ_NO_VCC_TOKEN) { if (time_before(jiffies, entry->expires)) - strcpy(buf+off,"(resolving)\n"); - else sprintf(buf+off,"(expired, ref %d)\n", - atomic_read(&entry->neigh->refcnt)); - else if (!svc) - sprintf(buf+off,"%d.%d.%d\n",clip_vcc->vcc->dev->number, - clip_vcc->vcc->vpi,clip_vcc->vcc->vci); - else { - off += svc_addr(buf+off,&clip_vcc->vcc->remote); - strcpy(buf+off,"\n"); + seq_printf(seq, "(resolving)\n"); + else + seq_printf(seq, "(expired, ref %d)\n", + atomic_read(&entry->neigh->refcnt)); + } else if (!svc) { + seq_printf(seq, "%d.%d.%d\n", + clip_vcc->vcc->dev->number, + clip_vcc->vcc->vpi, + clip_vcc->vcc->vci); + } else { + svc_addr(seq, &clip_vcc->vcc->remote); + seq_putc(seq, '\n'); + } +} + +struct clip_seq_state { + /* This member must be first. */ + struct neigh_seq_state ns; + + /* Local to clip specific iteration. */ + struct clip_vcc *vcc; +}; + +static struct clip_vcc *clip_seq_next_vcc(struct atmarp_entry *e, + struct clip_vcc *curr) +{ + if (!curr) { + curr = e->vccs; + if (!curr) + return SEQ_NO_VCC_TOKEN; + return curr; + } + + if (curr == SEQ_NO_VCC_TOKEN) + return NULL; + + curr = curr->next; + + return curr; +} + +static void *clip_seq_vcc_walk(struct clip_seq_state *state, + struct atmarp_entry *e, loff_t *pos) +{ + struct clip_vcc *vcc = state->vcc; + + vcc = clip_seq_next_vcc(e, vcc); + if (vcc && pos != NULL) { + while (*pos) { + vcc = clip_seq_next_vcc(e, vcc); + if (!vcc) + break; + --(*pos); } + } + state->vcc = vcc; + + return vcc; +} + +static void *clip_seq_sub_iter(struct neigh_seq_state *_state, + struct neighbour *n, loff_t *pos) +{ + struct clip_seq_state *state = (struct clip_seq_state *) _state; + + return clip_seq_vcc_walk(state, NEIGH2ENTRY(n), pos); +} + +static void *clip_seq_start(struct seq_file *seq, loff_t *pos) +{ + return neigh_seq_start(seq, pos, clip_tbl_hook, NEIGH_SEQ_NEIGH_ONLY); +} + +static int clip_seq_show(struct seq_file *seq, void *v) +{ + static char atm_arp_banner[] = + "IPitf TypeEncp Idle IP address ATM address\n"; + + if (v == SEQ_START_TOKEN) { + seq_puts(seq, atm_arp_banner); + } else { + struct clip_seq_state *state = seq->private; + struct neighbour *n = v; + struct clip_vcc *vcc = state->vcc; + + atmarp_info(seq, n->dev, NEIGH2ENTRY(n), vcc); + } + return 0; } +static struct seq_operations arp_seq_ops = { + .start = clip_seq_start, + .next = neigh_seq_next, + .stop = neigh_seq_stop, + .show = clip_seq_show, +}; +static int arp_seq_open(struct inode *inode, struct file *file) +{ + struct clip_seq_state *state; + struct seq_file *seq; + int rc = -EAGAIN; + + state = kmalloc(sizeof(*state), GFP_KERNEL); + if (!state) { + rc = -ENOMEM; + goto out_kfree; + } + memset(state, 0, sizeof(*state)); + state->ns.neigh_sub_iter = clip_seq_sub_iter; + + rc = seq_open(file, &arp_seq_ops); + if (rc) + goto out_kfree; + + seq = file->private_data; + seq->private = state; +out: + return rc; + +out_kfree: + kfree(state); + goto out; +} + +static struct file_operations arp_seq_fops = { + .open = arp_seq_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release_private, + .owner = THIS_MODULE, +}; #endif @@ -250,57 +373,6 @@ static void svc_info(struct atm_vcc *vcc } -#if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE) - -static char* -lec_arp_get_status_string(unsigned char status) -{ - switch(status) { - case ESI_UNKNOWN: - return "ESI_UNKNOWN "; - case ESI_ARP_PENDING: - return "ESI_ARP_PENDING "; - case ESI_VC_PENDING: - return "ESI_VC_PENDING "; - case ESI_FLUSH_PENDING: - return "ESI_FLUSH_PENDING "; - case ESI_FORWARD_DIRECT: - return "ESI_FORWARD_DIRECT"; - default: - return " "; - } -} - -static void -lec_info(struct lec_arp_table *entry, char *buf) -{ - int j, offset=0; - - for(j=0;jmac_addr[j]); - } - offset+=sprintf(buf+offset, " "); - for(j=0;jatm_addr[j]); - } - offset+=sprintf(buf+offset, " %s %4.4x", - lec_arp_get_status_string(entry->status), - entry->flags&0xffff); - if (entry->vcc) { - offset+=sprintf(buf+offset, "%3d %3d ", entry->vcc->vpi, - entry->vcc->vci); - } else - offset+=sprintf(buf+offset, " "); - if (entry->recv_vcc) { - offset+=sprintf(buf+offset, " %3d %3d", - entry->recv_vcc->vpi, entry->recv_vcc->vci); - } - - sprintf(buf+offset,"\n"); -} - -#endif - static int atm_devices_info(loff_t pos,char *buf) { struct atm_dev *dev; @@ -416,129 +488,6 @@ static int atm_svc_info(loff_t pos,char return 0; } -#if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE) -static int atm_arp_info(loff_t pos,char *buf) -{ - struct neighbour *n; - int i,count; - - if (!pos) { - return sprintf(buf,"IPitf TypeEncp Idle IP address " - "ATM address\n"); - } - if (!try_atm_clip_ops()) - return 0; - count = pos; - read_lock_bh(&clip_tbl_hook->lock); - for (i = 0; i <= NEIGH_HASHMASK; i++) - for (n = clip_tbl_hook->hash_buckets[i]; n; n = n->next) { - struct atmarp_entry *entry = NEIGH2ENTRY(n); - struct clip_vcc *vcc; - - if (!entry->vccs) { - if (--count) continue; - atmarp_info(n->dev,entry,NULL,buf); - read_unlock_bh(&clip_tbl_hook->lock); - if (atm_clip_ops->owner) - __MOD_DEC_USE_COUNT(atm_clip_ops->owner); - return strlen(buf); - } - for (vcc = entry->vccs; vcc; - vcc = vcc->next) { - if (--count) continue; - atmarp_info(n->dev,entry,vcc,buf); - read_unlock_bh(&clip_tbl_hook->lock); - if (atm_clip_ops->owner) - __MOD_DEC_USE_COUNT(atm_clip_ops->owner); - return strlen(buf); - } - } - read_unlock_bh(&clip_tbl_hook->lock); - if (atm_clip_ops->owner) - __MOD_DEC_USE_COUNT(atm_clip_ops->owner); - return 0; -} -#endif - -#if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE) -static int atm_lec_info(loff_t pos,char *buf) -{ - unsigned long flags; - struct lec_priv *priv; - struct lec_arp_table *entry; - int i, count, d, e; - struct net_device *dev; - - if (!pos) { - return sprintf(buf,"Itf MAC ATM destination" - " Status Flags " - "VPI/VCI Recv VPI/VCI\n"); - } - if (!try_atm_lane_ops()) - return 0; /* the lane module is not there yet */ - - count = pos; - for(d = 0; d < MAX_LEC_ITF; d++) { - dev = atm_lane_ops->get_lec(d); - if (!dev || !(priv = (struct lec_priv *) dev->priv)) - continue; - spin_lock_irqsave(&priv->lec_arp_lock, flags); - for(i = 0; i < LEC_ARP_TABLE_SIZE; i++) { - for(entry = priv->lec_arp_tables[i]; entry; entry = entry->next) { - if (--count) - continue; - e = sprintf(buf,"%s ", dev->name); - lec_info(entry, buf+e); - spin_unlock_irqrestore(&priv->lec_arp_lock, flags); - dev_put(dev); - if (atm_lane_ops->owner) - __MOD_DEC_USE_COUNT(atm_lane_ops->owner); - return strlen(buf); - } - } - for(entry = priv->lec_arp_empty_ones; entry; entry = entry->next) { - if (--count) - continue; - e = sprintf(buf,"%s ", dev->name); - lec_info(entry, buf+e); - spin_unlock_irqrestore(&priv->lec_arp_lock, flags); - dev_put(dev); - if (atm_lane_ops->owner) - __MOD_DEC_USE_COUNT(atm_lane_ops->owner); - return strlen(buf); - } - for(entry = priv->lec_no_forward; entry; entry=entry->next) { - if (--count) - continue; - e = sprintf(buf,"%s ", dev->name); - lec_info(entry, buf+e); - spin_unlock_irqrestore(&priv->lec_arp_lock, flags); - dev_put(dev); - if (atm_lane_ops->owner) - __MOD_DEC_USE_COUNT(atm_lane_ops->owner); - return strlen(buf); - } - for(entry = priv->mcast_fwds; entry; entry = entry->next) { - if (--count) - continue; - e = sprintf(buf,"%s ", dev->name); - lec_info(entry, buf+e); - spin_unlock_irqrestore(&priv->lec_arp_lock, flags); - dev_put(dev); - if (atm_lane_ops->owner) - __MOD_DEC_USE_COUNT(atm_lane_ops->owner); - return strlen(buf); - } - spin_unlock_irqrestore(&priv->lec_arp_lock, flags); - dev_put(dev); - } - if (atm_lane_ops->owner) - __MOD_DEC_USE_COUNT(atm_lane_ops->owner); - return 0; -} -#endif - - static ssize_t proc_dev_atm_read(struct file *file,char *buf,size_t count, loff_t *pos) { @@ -666,7 +615,10 @@ int atm_proc_init(void) CREATE_ENTRY(svc); CREATE_ENTRY(vc); #if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE) - CREATE_ENTRY(arp); + arp = create_proc_entry("arp", S_IRUGO, atm_proc_root); + if (!arp) + goto cleanup; + arp->proc_fops = &arp_seq_fops; #endif #if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE) CREATE_ENTRY(lec); ===== net/core/neighbour.c 1.12 vs edited ===== --- 1.12/net/core/neighbour.c 2004-07-15 13:33:03 -07:00 +++ edited/net/core/neighbour.c 2004-10-03 15:43:21 -07:00 @@ -12,6 +12,8 @@ * * Fixes: * Vitaly E. Lavrov releasing NULL neighbor in neigh_add. + * Harald Welte Add neighbour cache statistics like rtstat + * Harald Welte port neighbour cache rework from 2.6.9-rcX */ #include @@ -20,6 +22,7 @@ #include #include #include +#include #ifdef CONFIG_SYSCTL #include #endif @@ -27,6 +30,7 @@ #include #include #include +#include #define NEIGH_DEBUG 1 @@ -45,6 +49,8 @@ #define NEIGH_PRINTK2 NEIGH_PRINTK #endif +#define PNEIGH_HASHMASK 0xF + static void neigh_timer_handler(unsigned long arg); #ifdef CONFIG_ARPD static void neigh_app_notify(struct neighbour *n); @@ -54,6 +60,7 @@ void neigh_changeaddr(struct neigh_table static int neigh_glbl_allocs; static struct neigh_table *neigh_tables; +static struct file_operations neigh_stat_seq_fops; /* Neighbour hash table buckets are protected with rwlock tbl->lock. @@ -111,27 +118,21 @@ static int neigh_forced_gc(struct neigh_ int shrunk = 0; int i; - for (i=0; i<=NEIGH_HASHMASK; i++) { + NEIGH_CACHE_STAT_INC(tbl, forced_gc_runs); + + write_lock_bh(&tbl->lock); + for (i = 0; i <= tbl->hash_mask; i++) { struct neighbour *n, **np; np = &tbl->hash_buckets[i]; - write_lock_bh(&tbl->lock); while ((n = *np) != NULL) { /* Neighbour record may be discarded if: - - nobody refers to it. - - it is not permanent - - (NEW and probably wrong) - INCOMPLETE entries are kept at least for - n->parms->retrans_time, otherwise we could - flood network with resolution requests. - It is not clear, what is better table overflow - or flooding. + * - nobody refers to it. + * - it is not permanent */ write_lock(&n->lock); if (atomic_read(&n->refcnt) == 1 && - !(n->nud_state&NUD_PERMANENT) && - (n->nud_state != NUD_INCOMPLETE || - jiffies - n->used > n->parms->retrans_time)) { + !(n->nud_state&NUD_PERMANENT)) { *np = n->next; n->dead = 1; shrunk = 1; @@ -142,10 +143,12 @@ static int neigh_forced_gc(struct neigh_ write_unlock(&n->lock); np = &n->next; } - write_unlock_bh(&tbl->lock); } tbl->last_flush = jiffies; + + write_unlock_bh(&tbl->lock); + return shrunk; } @@ -176,7 +179,7 @@ void neigh_changeaddr(struct neigh_table write_lock_bh(&tbl->lock); - for (i=0; i <= NEIGH_HASHMASK; i++) { + for (i=0; i <= tbl->hash_mask; i++) { struct neighbour *n, **np; np = &tbl->hash_buckets[i]; @@ -203,7 +206,7 @@ int neigh_ifdown(struct neigh_table *tbl write_lock_bh(&tbl->lock); - for (i=0; i<=NEIGH_HASHMASK; i++) { + for (i = 0; i <= tbl->hash_mask; i++) { struct neighbour *n, **np; np = &tbl->hash_buckets[i]; @@ -277,7 +280,7 @@ static struct neighbour *neigh_alloc(str init_timer(&n->timer); n->timer.function = neigh_timer_handler; n->timer.data = (unsigned long)n; - tbl->stats.allocs++; + NEIGH_CACHE_STAT_INC(tbl, allocs); neigh_glbl_allocs++; tbl->entries++; n->tbl = tbl; @@ -286,20 +289,104 @@ static struct neighbour *neigh_alloc(str return n; } +static struct neighbour **neigh_hash_alloc(unsigned int entries) +{ + unsigned long size = entries * sizeof(struct neighbour *); + struct neighbour **ret; + + if (size <= PAGE_SIZE) { + ret = kmalloc(size, GFP_ATOMIC); + } else { + ret = (struct neighbour **) + __get_free_pages(GFP_ATOMIC, get_order(size)); + } + if (ret) + memset(ret, 0, size); + + return ret; +} + +static void neigh_hash_free(struct neighbour **hash, unsigned int entries) +{ + unsigned long size = entries * sizeof(struct neighbour *); + + if (size <= PAGE_SIZE) + kfree(hash); + else + free_pages((unsigned long)hash, get_order(size)); +} + +static void neigh_hash_grow(struct neigh_table *tbl, unsigned long new_entries) +{ + struct neighbour **new_hash, **old_hash; + unsigned int i, new_hash_mask, old_entries; + + NEIGH_CACHE_STAT_INC(tbl, hash_grows); + + BUG_ON(new_entries & (new_entries - 1)); + new_hash = neigh_hash_alloc(new_entries); + if (!new_hash) + return; + + old_entries = tbl->hash_mask + 1; + new_hash_mask = new_entries - 1; + old_hash = tbl->hash_buckets; + + get_random_bytes(&tbl->hash_rnd, sizeof(tbl->hash_rnd)); + for (i = 0; i < old_entries; i++) { + struct neighbour *n, *next; + + for (n = old_hash[i]; n; n = next) { + unsigned int hash_val = tbl->hash(n->primary_key, n->dev); + + hash_val &= new_hash_mask; + next = n->next; + + n->next = new_hash[hash_val]; + new_hash[hash_val] = n; + } + } + tbl->hash_buckets = new_hash; + tbl->hash_mask = new_hash_mask; + + neigh_hash_free(old_hash, old_entries); +} + struct neighbour *neigh_lookup(struct neigh_table *tbl, const void *pkey, struct net_device *dev) { struct neighbour *n; - u32 hash_val; int key_len = tbl->key_len; + u32 hash_val = tbl->hash(pkey, dev) & tbl->hash_mask; - hash_val = tbl->hash(pkey, dev); + NEIGH_CACHE_STAT_INC(tbl, lookups); read_lock_bh(&tbl->lock); for (n = tbl->hash_buckets[hash_val]; n; n = n->next) { if (dev == n->dev && memcmp(n->primary_key, pkey, key_len) == 0) { neigh_hold(n); + NEIGH_CACHE_STAT_INC(tbl, hits); + break; + } + } + read_unlock_bh(&tbl->lock); + return n; +} + +struct neighbour *neigh_lookup_nodev(struct neigh_table *tbl, const void *pkey) +{ + struct neighbour *n; + int key_len = tbl->key_len; + u32 hash_val = tbl->hash(pkey, NULL) & tbl->hash_mask; + + NEIGH_CACHE_STAT_INC(tbl, lookups); + + read_lock_bh(&tbl->lock); + for (n = tbl->hash_buckets[hash_val]; n; n = n->next) { + if (!memcmp(n->primary_key, pkey, key_len)) { + neigh_hold(n); + NEIGH_CACHE_STAT_INC(tbl, hits); break; } } @@ -338,9 +425,11 @@ struct neighbour * neigh_create(struct n n->confirmed = jiffies - (n->parms->base_reachable_time<<1); - hash_val = tbl->hash(pkey, dev); + hash_val = tbl->hash(pkey, dev) & tbl->hash_mask; write_lock_bh(&tbl->lock); + if (tbl->entries > (tbl->hash_mask + 1)) + neigh_hash_grow(tbl, (tbl->hash_mask + 1) << 1); for (n1 = tbl->hash_buckets[hash_val]; n1; n1 = n1->next) { if (dev == n1->dev && memcmp(n1->primary_key, pkey, key_len) == 0) { @@ -418,9 +507,9 @@ int pneigh_delete(struct neigh_table *tb hash_val ^= hash_val>>4; hash_val &= PNEIGH_HASHMASK; + write_lock_bh(&tbl->lock); for (np = &tbl->phash_buckets[hash_val]; (n=*np) != NULL; np = &n->next) { if (memcmp(n->key, pkey, key_len) == 0 && n->dev == dev) { - write_lock_bh(&tbl->lock); *np = n->next; write_unlock_bh(&tbl->lock); if (tbl->pdestructor) @@ -429,6 +518,7 @@ int pneigh_delete(struct neigh_table *tb return 0; } } + write_unlock_bh(&tbl->lock); return -ENOENT; } @@ -462,6 +552,8 @@ void neigh_destroy(struct neighbour *nei { struct hh_cache *hh; + NEIGH_CACHE_STAT_INC(neigh->tbl, destroys); + if (!neigh->dead) { printk("Destroying alive neighbour %p\n", neigh); dump_stack(); @@ -566,9 +658,10 @@ static void neigh_sync(struct neighbour static void SMP_TIMER_NAME(neigh_periodic_timer)(unsigned long arg) { struct neigh_table *tbl = (struct neigh_table*)arg; - unsigned long now = jiffies; - int i; + struct neighbour *n, **np; + unsigned long expire, now = jiffies; + NEIGH_CACHE_STAT_INC(tbl, periodic_gc_runs); write_lock(&tbl->lock); @@ -583,46 +676,49 @@ static void SMP_TIMER_NAME(neigh_periodi p->reachable_time = neigh_rand_reach_time(p->base_reachable_time); } - for (i=0; i <= NEIGH_HASHMASK; i++) { - struct neighbour *n, **np; - - np = &tbl->hash_buckets[i]; - while ((n = *np) != NULL) { - unsigned state; - - write_lock(&n->lock); + np = &tbl->hash_buckets[tbl->hash_chain_gc]; + tbl->hash_chain_gc = ((tbl->hash_chain_gc + 1) & tbl->hash_mask); - state = n->nud_state; - if (state&(NUD_PERMANENT|NUD_IN_TIMER)) { - write_unlock(&n->lock); - goto next_elt; - } + while ((n = *np) != NULL) { + unsigned int state; - if ((long)(n->used - n->confirmed) < 0) - n->used = n->confirmed; + write_lock(&n->lock); + + state = n->nud_state; + if (state & (NUD_PERMANENT | NUD_IN_TIMER)) { + write_unlock(&n->lock); + goto next_elt; + } - if (atomic_read(&n->refcnt) == 1 && - (state == NUD_FAILED || now - n->used > n->parms->gc_staletime)) { - *np = n->next; - n->dead = 1; - write_unlock(&n->lock); - neigh_release(n); - continue; - } + if (time_before(n->used, n->confirmed)) + n->used = n->confirmed; - if (n->nud_state&NUD_REACHABLE && - now - n->confirmed > n->parms->reachable_time) { - n->nud_state = NUD_STALE; - neigh_suspect(n); - } + if (atomic_read(&n->refcnt) == 1 && + (state == NUD_FAILED || + time_after(now, n->used + n->parms->gc_staletime))) { + *np = n->next; + n->dead = 1; write_unlock(&n->lock); + neigh_release(n); + continue; + } + write_unlock(&n->lock); next_elt: - np = &n->next; - } + np = &n->next; } + + /* Cycle through all hash buckets every base_reachable_time/2 ticks. + * ARP entry timeouts range from 1/2 base_reachable_time to 3/2 + * base_reachable_time. + */ + expire = tbl->parms.base_reachable_time >> 1; + expire /= (tbl->hash_mask + 1); + if (!expire) + expire = 1; + + mod_timer(&tbl->gc_timer, now + expire); - mod_timer(&tbl->gc_timer, now + tbl->gc_interval); write_unlock(&tbl->lock); } @@ -680,7 +776,7 @@ static void neigh_timer_handler(unsigned neigh->nud_state = NUD_FAILED; notify = 1; - neigh->tbl->stats.res_failed++; + NEIGH_CACHE_STAT_INC(neigh->tbl, res_failed); NEIGH_PRINTK2("neigh %p is failed.\n", neigh); /* It is very thin place. report_unreachable is very complicated @@ -1132,6 +1228,7 @@ void neigh_parms_release(struct neigh_ta void neigh_table_init(struct neigh_table *tbl) { unsigned long now = jiffies; + unsigned long phsize; tbl->parms.reachable_time = neigh_rand_reach_time(tbl->parms.base_reachable_time); @@ -1141,6 +1238,30 @@ void neigh_table_init(struct neigh_table 0, SLAB_HWCACHE_ALIGN, NULL, NULL); + if (!tbl->kmem_cachep) + panic("cannot create neighbour cache"); + +#ifdef CONFIG_PROC_FS + tbl->pde = create_proc_entry(tbl->id, 0, proc_net_stat); + if (!tbl->pde) + panic("cannot create neighbour proc dir entry"); + tbl->pde->proc_fops = &neigh_stat_seq_fops; + tbl->pde->data = tbl; +#endif + + tbl->hash_mask = 1; + tbl->hash_buckets = neigh_hash_alloc(tbl->hash_mask + 1); + + phsize = (PNEIGH_HASHMASK + 1) * sizeof(struct pneigh_entry *); + tbl->phash_buckets = kmalloc(phsize, GFP_KERNEL); + + if (!tbl->hash_buckets || !tbl->phash_buckets) + panic("cannot allocate neighbour cache hashes"); + + memset(tbl->phash_buckets, 0, phsize); + + get_random_bytes(&tbl->hash_rnd, sizeof(tbl->hash_rnd)); + #ifdef CONFIG_SMP tasklet_init(&tbl->gc_task, SMP_TIMER_NAME(neigh_periodic_timer), (unsigned long)tbl); #endif @@ -1148,7 +1269,7 @@ void neigh_table_init(struct neigh_table tbl->lock = RW_LOCK_UNLOCKED; tbl->gc_timer.data = (unsigned long)tbl; tbl->gc_timer.function = neigh_periodic_timer; - tbl->gc_timer.expires = now + tbl->gc_interval + tbl->parms.reachable_time; + tbl->gc_timer.expires = now + 1; add_timer(&tbl->gc_timer); init_timer(&tbl->proxy_timer); @@ -1184,6 +1305,13 @@ int neigh_table_clear(struct neigh_table } } write_unlock(&neigh_tbl_lock); + + neigh_hash_free(tbl->hash_buckets, tbl->hash_mask + 1); + tbl->hash_buckets = NULL; + + kfree(tbl->phash_buckets); + tbl->phash_buckets = NULL; + #ifdef CONFIG_SYSCTL neigh_sysctl_unregister(&tbl->parms); #endif @@ -1364,7 +1492,7 @@ static int neigh_dump_table(struct neigh s_h = cb->args[1]; s_idx = idx = cb->args[2]; - for (h=0; h <= NEIGH_HASHMASK; h++) { + for (h=0; h <= tbl->hash_mask; h++) { if (h < s_h) continue; if (h > s_h) s_idx = 0; @@ -1414,6 +1542,359 @@ int neigh_dump_info(struct sk_buff *skb, return skb->len; } + +void neigh_for_each(struct neigh_table *tbl, void (*cb)(struct neighbour *, void *), void *cookie) +{ + int chain; + + read_lock_bh(&tbl->lock); + for (chain = 0; chain <= tbl->hash_mask; chain++) { + struct neighbour *n; + + for (n = tbl->hash_buckets[chain]; n; n = n->next) + cb(n, cookie); + } + read_unlock_bh(&tbl->lock); +} + +/* The tbl->lock must be held as a writer and BH disabled. */ +void __neigh_for_each_release(struct neigh_table *tbl, + int (*cb)(struct neighbour *)) +{ + int chain; + + for (chain = 0; chain <= tbl->hash_mask; chain++) { + struct neighbour *n, **np; + + np = &tbl->hash_buckets[chain]; + while ((n = *np) != NULL) { + int release; + + write_lock(&n->lock); + release = cb(n); + if (release) { + *np = n->next; + n->dead = 1; + } else + np = &n->next; + write_unlock(&n->lock); + if (release) + neigh_release(n); + } + } +} + +#ifdef CONFIG_PROC_FS + +static struct neighbour *neigh_get_first(struct seq_file *seq) +{ + struct neigh_seq_state *state = seq->private; + struct neigh_table *tbl = state->tbl; + struct neighbour *n = NULL; + int bucket = state->bucket; + + state->flags &= ~NEIGH_SEQ_IS_PNEIGH; + for (bucket = 0; bucket <= tbl->hash_mask; bucket++) { + n = tbl->hash_buckets[bucket]; + + while (n) { + if (state->neigh_sub_iter) { + loff_t fakep = 0; + void *v; + + v = state->neigh_sub_iter(state, n, &fakep); + if (!v) + goto next; + } + if (!(state->flags & NEIGH_SEQ_SKIP_NOARP)) + break; + if (n->nud_state & ~NUD_NOARP) + break; + next: + n = n->next; + } + + if (n) + break; + } + state->bucket = bucket; + + return n; +} + +static struct neighbour *neigh_get_next(struct seq_file *seq, + struct neighbour *n, + loff_t *pos) +{ + struct neigh_seq_state *state = seq->private; + struct neigh_table *tbl = state->tbl; + + if (state->neigh_sub_iter) { + void *v = state->neigh_sub_iter(state, n, pos); + if (v) + return n; + } + n = n->next; + + while (1) { + while (n) { + if (state->neigh_sub_iter) { + void *v = state->neigh_sub_iter(state, n, pos); + if (v) + return n; + goto next; + } + if (!(state->flags & NEIGH_SEQ_SKIP_NOARP)) + break; + + if (n->nud_state & ~NUD_NOARP) + break; + next: + n = n->next; + } + + if (n) + break; + + if (++state->bucket > tbl->hash_mask) + break; + + n = tbl->hash_buckets[state->bucket]; + } + + if (n && pos) + --(*pos); + return n; +} + +static struct neighbour *neigh_get_idx(struct seq_file *seq, loff_t *pos) +{ + struct neighbour *n = neigh_get_first(seq); + + if (n) { + while (*pos) { + n = neigh_get_next(seq, n, pos); + if (!n) + break; + } + } + return *pos ? NULL : n; +} + +static struct pneigh_entry *pneigh_get_first(struct seq_file *seq) +{ + struct neigh_seq_state *state = seq->private; + struct neigh_table *tbl = state->tbl; + struct pneigh_entry *pn = NULL; + int bucket = state->bucket; + + state->flags |= NEIGH_SEQ_IS_PNEIGH; + for (bucket = 0; bucket <= PNEIGH_HASHMASK; bucket++) { + pn = tbl->phash_buckets[bucket]; + if (pn) + break; + } + state->bucket = bucket; + + return pn; +} + +static struct pneigh_entry *pneigh_get_next(struct seq_file *seq, + struct pneigh_entry *pn, + loff_t *pos) +{ + struct neigh_seq_state *state = seq->private; + struct neigh_table *tbl = state->tbl; + + pn = pn->next; + while (!pn) { + if (++state->bucket > PNEIGH_HASHMASK) + break; + pn = tbl->phash_buckets[state->bucket]; + if (pn) + break; + } + + if (pn && pos) + --(*pos); + + return pn; +} + +static struct pneigh_entry *pneigh_get_idx(struct seq_file *seq, loff_t *pos) +{ + struct pneigh_entry *pn = pneigh_get_first(seq); + + if (pn) { + while (*pos) { + pn = pneigh_get_next(seq, pn, pos); + if (!pn) + break; + } + } + return *pos ? NULL : pn; +} + +static void *neigh_get_idx_any(struct seq_file *seq, loff_t *pos) +{ + struct neigh_seq_state *state = seq->private; + void *rc; + + rc = neigh_get_idx(seq, pos); + if (!rc && !(state->flags & NEIGH_SEQ_NEIGH_ONLY)) + rc = pneigh_get_idx(seq, pos); + + return rc; +} + +void *neigh_seq_start(struct seq_file *seq, loff_t *pos, struct neigh_table *tbl, unsigned int neigh_seq_flags) +{ + struct neigh_seq_state *state = seq->private; + loff_t pos_minus_one; + + state->tbl = tbl; + state->bucket = 0; + state->flags = (neigh_seq_flags & ~NEIGH_SEQ_IS_PNEIGH); + + read_lock_bh(&tbl->lock); + + pos_minus_one = *pos - 1; + return *pos ? neigh_get_idx_any(seq, &pos_minus_one) : SEQ_START_TOKEN; +} + +void *neigh_seq_next(struct seq_file *seq, void *v, loff_t *pos) +{ + struct neigh_seq_state *state; + void *rc; + + if (v == SEQ_START_TOKEN) { + rc = neigh_get_idx(seq, pos); + goto out; + } + + state = seq->private; + if (!(state->flags & NEIGH_SEQ_IS_PNEIGH)) { + rc = neigh_get_next(seq, v, NULL); + if (rc) + goto out; + if (!(state->flags & NEIGH_SEQ_NEIGH_ONLY)) + rc = pneigh_get_first(seq); + } else { + BUG_ON(state->flags & NEIGH_SEQ_NEIGH_ONLY); + rc = pneigh_get_next(seq, v, NULL); + } +out: + ++(*pos); + return rc; +} + +void neigh_seq_stop(struct seq_file *seq, void *v) +{ + struct neigh_seq_state *state = seq->private; + struct neigh_table *tbl = state->tbl; + + read_unlock_bh(&tbl->lock); +} + +/* statistics via seq_file */ + +static void *neigh_stat_seq_start(struct seq_file *seq, loff_t *pos) +{ + struct proc_dir_entry *pde = seq->private; + struct neigh_table *tbl = pde->data; + int lcpu; + + if (*pos == 0) + return SEQ_START_TOKEN; + + for (lcpu = *pos-1; lcpu < smp_num_cpus; ++lcpu) { + int i = cpu_logical_map(lcpu); + *pos = lcpu+1; + return &tbl->stats[i]; + } + return NULL; +} + +static void *neigh_stat_seq_next(struct seq_file *seq, void *v, loff_t *pos) +{ + struct proc_dir_entry *pde = seq->private; + struct neigh_table *tbl = pde->data; + int lcpu; + + for (lcpu = *pos; lcpu < smp_num_cpus; ++lcpu) { + int i = cpu_logical_map(lcpu); + *pos = lcpu+1; + return &tbl->stats[i]; + } + return NULL; +} + +static void neigh_stat_seq_stop(struct seq_file *seq, void *v) +{ + +} + +static int neigh_stat_seq_show(struct seq_file *seq, void *v) +{ + struct proc_dir_entry *pde = seq->private; + struct neigh_table *tbl = pde->data; + struct neigh_statistics *st = v; + + if (v == SEQ_START_TOKEN) { + seq_printf(seq, "entries allocs destroys hash_grows lookups hits res_failed rcv_probes_mcast rcv_probes_ucast periodic_gc_runs forced_gc_runs forced_gc_goal_miss\n"); + return 0; + } + + seq_printf(seq, "%08x %08lx %08lx %08lx %08lx %08lx %08lx " + "%08lx %08lx %08lx %08lx\n", + tbl->entries, + + st->allocs, + st->destroys, + st->hash_grows, + + st->lookups, + st->hits, + + st->res_failed, + + st->rcv_probes_mcast, + st->rcv_probes_ucast, + + st->periodic_gc_runs, + st->forced_gc_runs + ); + + return 0; +} + +static struct seq_operations neigh_stat_seq_ops = { + .start = neigh_stat_seq_start, + .next = neigh_stat_seq_next, + .stop = neigh_stat_seq_stop, + .show = neigh_stat_seq_show, +}; + +static int neigh_stat_seq_open(struct inode *inode, struct file *file) +{ + int ret = seq_open(file, &neigh_stat_seq_ops); + + if (!ret) { + struct seq_file *sf = file->private_data; + sf->private = PDE(inode); + } + return ret; +}; + +static struct file_operations neigh_stat_seq_fops = { + .owner = THIS_MODULE, + .open = neigh_stat_seq_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release, +}; + +#endif /* CONFIG_PROC_FS */ #ifdef CONFIG_ARPD void neigh_app_ns(struct neighbour *n) ===== net/decnet/dn_neigh.c 1.3 vs edited ===== --- 1.3/net/decnet/dn_neigh.c 2004-01-25 21:21:33 -08:00 +++ edited/net/decnet/dn_neigh.c 2004-10-03 15:12:55 -07:00 @@ -20,6 +20,7 @@ * Steve Whitehouse : Fixed neighbour states (for now anyway). * Steve Whitehouse : Made error_report functions dummies. This * is not the right place to return skbs. + * Harald Welte : Port to DaveM's generalized ncache from 2.6.x * */ @@ -33,6 +34,8 @@ #include #include #include +#include +#include #include #include #include @@ -118,13 +121,7 @@ struct neigh_table dn_neigh_table = { static u32 dn_neigh_hash(const void *pkey, const struct net_device *dev) { - u32 hash_val; - - hash_val = *(dn_address *)pkey; - hash_val ^= (hash_val >> 10); - hash_val ^= (hash_val >> 3); - - return hash_val & NEIGH_HASHMASK; + return jhash_2words(*(dn_address *)pkey, 0, dn_neigh_table.hash_rnd); } static int dn_neigh_construct(struct neighbour *neigh) @@ -322,33 +319,6 @@ static int dn_phase3_output(struct sk_bu } /* - * Unfortunately, the neighbour code uses the device in its hash - * function, so we don't get any advantage from it. This function - * basically does a neigh_lookup(), but without comparing the device - * field. This is required for the On-Ethernet cache - */ -struct neighbour *dn_neigh_lookup(struct neigh_table *tbl, void *ptr) -{ - struct neighbour *neigh; - u32 hash_val; - - hash_val = tbl->hash(ptr, NULL); - - read_lock_bh(&tbl->lock); - for(neigh = tbl->hash_buckets[hash_val]; neigh != NULL; neigh = neigh->next) { - if (memcmp(neigh->primary_key, ptr, tbl->key_len) == 0) { - atomic_inc(&neigh->refcnt); - read_unlock_bh(&tbl->lock); - return neigh; - } - } - read_unlock_bh(&tbl->lock); - - return NULL; -} - - -/* * Any traffic on a pointopoint link causes the timer to be reset * for the entry in the neighbour table. */ @@ -484,113 +454,146 @@ static char *dn_find_slot(char *base, in return (*min < priority) ? (min - 6) : NULL; } -int dn_neigh_elist(struct net_device *dev, unsigned char *ptr, int n) +struct elist_cb_state { + struct net_device *dev; + unsigned char *ptr; + unsigned char *rs; + int t, n; +}; + +static void neigh_elist_cb(struct neighbour *neigh, void *_info) { - int t = 0; - int i; - struct neighbour *neigh; + struct elist_cb_state *s = _info; + struct dn_dev *dn_db; struct dn_neigh *dn; - struct neigh_table *tbl = &dn_neigh_table; - unsigned char *rs = ptr; - struct dn_dev *dn_db = (struct dn_dev *)dev->dn_ptr; - read_lock_bh(&tbl->lock); + if (neigh->dev != s->dev) + return; - for(i = 0; i < NEIGH_HASHMASK; i++) { - for(neigh = tbl->hash_buckets[i]; neigh != NULL; neigh = neigh->next) { - if (neigh->dev != dev) - continue; - dn = (struct dn_neigh *)neigh; - if (!(dn->flags & (DN_NDFLAG_R1|DN_NDFLAG_R2))) - continue; - if (dn_db->parms.forwarding == 1 && (dn->flags & DN_NDFLAG_R2)) - continue; - if (t == n) - rs = dn_find_slot(ptr, n, dn->priority); - else - t++; - if (rs == NULL) - continue; - dn_dn2eth(rs, dn->addr); - rs += 6; - *rs = neigh->nud_state & NUD_CONNECTED ? 0x80 : 0x0; - *rs |= dn->priority; - rs++; - } - } + dn = (struct dn_neigh *) neigh; + if (!(dn->flags & (DN_NDFLAG_R1|DN_NDFLAG_R2))) + return; + + dn_db = (struct dn_dev *) s->dev->dn_ptr; + if (dn_db->parms.forwarding == 1 && (dn->flags & DN_NDFLAG_R2)) + return; - read_unlock_bh(&tbl->lock); + if (s->t == s->n) + s->rs = dn_find_slot(s->ptr, s->n, dn->priority); + else + s->t++; + if (s->rs == NULL) + return; + + dn_dn2eth(s->rs, dn->addr); + s->rs += 6; + *(s->rs) = neigh->nud_state & NUD_CONNECTED ? 0x80 : 0x0; + *(s->rs) |= dn->priority; + s->rs++; +} + +int dn_neigh_elist(struct net_device *dev, unsigned char *ptr, int n) +{ + struct elist_cb_state state; + + state.dev = dev; + state.t = 0; + state.n = n; + state.ptr = ptr; + state.rs = ptr; + + neigh_for_each(&dn_neigh_table, neigh_elist_cb, &state); - return t; + return state.t; } + #endif /* CONFIG_DECNET_ROUTER */ #ifdef CONFIG_PROC_FS -static int dn_neigh_get_info(char *buffer, char **start, off_t offset, int length) + +static inline void dn_neigh_format_entry(struct seq_file *seq, + struct neighbour *n) { - int len = 0; - off_t pos = 0; - off_t begin = 0; - struct neighbour *n; - int i; + struct dn_neigh *dn = (struct dn_neigh *) n; char buf[DN_ASCBUF_LEN]; - len += sprintf(buffer + len, "Addr Flags State Use Blksize Dev\n"); - - for(i=0;i <= NEIGH_HASHMASK; i++) { - read_lock_bh(&dn_neigh_table.lock); - n = dn_neigh_table.hash_buckets[i]; - for(; n != NULL; n = n->next) { - struct dn_neigh *dn = (struct dn_neigh *)n; - - read_lock(&n->lock); - len += sprintf(buffer+len, "%-7s %s%s%s %02x %02d %07ld %-8s\n", - dn_addr2asc(dn_ntohs(dn->addr), buf), - (dn->flags&DN_NDFLAG_R1) ? "1" : "-", - (dn->flags&DN_NDFLAG_R2) ? "2" : "-", - (dn->flags&DN_NDFLAG_P3) ? "3" : "-", - dn->n.nud_state, - atomic_read(&dn->n.refcnt), - dn->blksize, - (dn->n.dev) ? dn->n.dev->name : "?"); - read_unlock(&n->lock); - - pos = begin + len; - - if (pos < offset) { - len = 0; - begin = pos; - } - - if (pos > offset + length) { - read_unlock_bh(&dn_neigh_table.lock); - goto done; - } - } - read_unlock_bh(&dn_neigh_table.lock); + read_lock(&n->lock); + seq_printf(seq, "%-7s %s%s%s %02x %02d %07ld %-8s\n", + dn_addr2asc(dn_ntohs(dn->addr), buf), + (dn->flags&DN_NDFLAG_R1) ? "1" : "-", + (dn->flags&DN_NDFLAG_R2) ? "2" : "-", + (dn->flags&DN_NDFLAG_P3) ? "3" : "-", + dn->n.nud_state, + atomic_read(&dn->n.refcnt), + dn->blksize, + (dn->n.dev) ? dn->n.dev->name : "?"); + read_unlock(&n->lock); +} + +static int dn_neigh_seq_show(struct seq_file *seq, void *v) +{ + if (v == SEQ_START_TOKEN) { + seq_puts(seq, "Addr Flags State Use Blksize Dev\n"); + } else { + dn_neigh_format_entry(seq, v); } -done: + return 0; +} - *start = buffer + (offset - begin); - len -= offset - begin; +static void *dn_neigh_seq_start(struct seq_file *seq, loff_t *pos) +{ + return neigh_seq_start(seq, pos, &dn_neigh_table, + NEIGH_SEQ_NEIGH_ONLY); +} - if (len > length) len = length; +static struct seq_operations dn_neigh_seq_ops = { + .start = dn_neigh_seq_start, + .next = neigh_seq_next, + .stop = neigh_seq_stop, + .show = dn_neigh_seq_show, +}; - return len; -} +static int dn_neigh_seq_open(struct inode *inode, struct file *file) +{ + struct seq_file *seq; + int rc = -ENOMEM; + struct neigh_seq_state *s = kmalloc(sizeof(*s), GFP_KERNEL); + + if (!s) + goto out; + + memset(s, 0, sizeof(*s)); + rc = seq_open(file, &dn_neigh_seq_ops); + if (rc) + goto out_kfree; + + seq = file->private_data; + seq->private = s; + memset(s, 0, sizeof(*s)); +out: + return rc; +out_kfree: + kfree(s); + goto out; +} + +static struct file_operations dn_neigh_seq_fops = { + .owner = THIS_MODULE, + .open = dn_neigh_seq_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release_private, +}; #endif void __init dn_neigh_init(void) { neigh_table_init(&dn_neigh_table); - -#ifdef CONFIG_PROC_FS - proc_net_create("decnet_neigh",0,dn_neigh_get_info); -#endif /* CONFIG_PROC_FS */ + proc_net_fops_create("decnet_neigh", S_IRUGO, &dn_neigh_seq_fops); } void __exit dn_neigh_cleanup(void) ===== net/decnet/dn_route.c 1.6 vs edited ===== --- 1.6/net/decnet/dn_route.c 2002-08-12 13:43:21 -07:00 +++ edited/net/decnet/dn_route.c 2004-10-03 15:12:55 -07:00 @@ -761,7 +761,7 @@ static int dn_route_output_slow(struct d /* Look in On-Ethernet cache first */ if (!(flags & MSG_TRYHARD)) { - if ((neigh = dn_neigh_lookup(&dn_neigh_table, &dst)) != NULL) + if ((neigh = neigh_lookup_nodev(&dn_neigh_table, &dst)) != NULL) goto got_route; } ===== net/ipv4/arp.c 1.16 vs edited ===== --- 1.16/net/ipv4/arp.c 2004-02-19 10:13:39 -08:00 +++ edited/net/ipv4/arp.c 2004-10-03 15:12:55 -07:00 @@ -70,6 +70,7 @@ * arp_xmit so intermediate drivers like * bonding can change the skb before * sending (e.g. insert 8021q tag). + * Harald Welte : convert to make use of jenkins hash */ #include @@ -92,6 +93,7 @@ #include #include #include +#include #ifdef CONFIG_SYSCTL #include #endif @@ -218,15 +220,7 @@ int arp_mc_map(u32 addr, u8 *haddr, stru static u32 arp_hash(const void *pkey, const struct net_device *dev) { - u32 hash_val; - - hash_val = *(u32*)pkey; - hash_val ^= (hash_val>>16); - hash_val ^= hash_val>>8; - hash_val ^= hash_val>>3; - hash_val = (hash_val^dev->ifindex)&NEIGH_HASHMASK; - - return hash_val; + return jhash_2words(*(u32 *)pkey, dev->ifindex, arp_tbl.hash_rnd); } static int arp_constructor(struct neighbour *neigh) @@ -1185,129 +1179,155 @@ out: return err; } +#ifdef CONFIG_PROC_FS +#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) + +/* ------------------------------------------------------------------------ */ /* - * Write the contents of the ARP cache to a PROCfs file. + * ax25 -> ASCII conversion */ -#ifndef CONFIG_PROC_FS -static int arp_get_info(char *buffer, char **start, off_t offset, int length) { return 0; } -#else -#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) -static char *ax2asc2(ax25_address *a, char *buf); -#endif +static char *ax2asc2(ax25_address *a, char *buf) +{ + char c, *s; + int n; + + for (n = 0, s = buf; n < 6; n++) { + c = (a->ax25_call[n] >> 1) & 0x7F; + + if (c != ' ') *s++ = c; + } + + *s++ = '-'; + + if ((n = ((a->ax25_call[6] >> 1) & 0x0F)) > 9) { + *s++ = '1'; + n -= 10; + } + + *s++ = n + '0'; + *s++ = '\0'; + + if (*buf == '\0' || *buf == '-') + return "*"; + + return buf; + +} +#endif /* CONFIG_AX25 */ + #define HBUFFERLEN 30 -static int arp_get_info(char *buffer, char **start, off_t offset, int length) +static void arp_format_neigh_entry(struct seq_file *seq, + struct neighbour *n) { - int len=0; - off_t pos=0; - int size; char hbuffer[HBUFFERLEN]; - int i,j,k; const char hexbuf[] = "0123456789ABCDEF"; + int k, j; + char tbuf[16]; + struct net_device *dev = n->dev; + int hatype = dev->type; - size = sprintf(buffer,"IP address HW type Flags HW address Mask Device\n"); - - pos+=size; - len+=size; + read_lock(&n->lock); - for(i=0; i<=NEIGH_HASHMASK; i++) { - struct neighbour *n; - read_lock_bh(&arp_tbl.lock); - for (n=arp_tbl.hash_buckets[i]; n; n=n->next) { - struct net_device *dev = n->dev; - int hatype = dev->type; - - /* Do not confuse users "arp -a" with magic entries */ - if (!(n->nud_state&~NUD_NOARP)) - continue; - - read_lock(&n->lock); - -/* - * Convert hardware address to XX:XX:XX:XX ... form. - */ + /* Convert hardware address to XX:XX:XX:XX ... form. */ #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) - if (hatype == ARPHRD_AX25 || hatype == ARPHRD_NETROM) - ax2asc2((ax25_address *)n->ha, hbuffer); - else { -#endif - for (k=0,j=0;kaddr_len;j++) { - hbuffer[k++]=hexbuf[(n->ha[j]>>4)&15 ]; - hbuffer[k++]=hexbuf[n->ha[j]&15 ]; - hbuffer[k++]=':'; - } - hbuffer[--k]=0; - + if (hatype == ARPHRD_AX25 || hatype == ARPHRD_NETROM) + ax2asc2((ax25_address *)n->ha, hbuffer); + else { +#endif + for (k=0,j=0;kaddr_len;j++) { + hbuffer[k++]=hexbuf[(n->ha[j]>>4)&15 ]; + hbuffer[k++]=hexbuf[n->ha[j]&15 ]; + hbuffer[k++]=':'; + } + hbuffer[--k]=0; #if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) - } + } #endif + sprintf(tbuf, "%u.%u.%u.%u", NIPQUAD(*(u32*)n->primary_key)); + seq_printf(seq, "%-16s 0x%-10x0x%-10x%s * %s\n", + tbuf, hatype, arp_state_to_flags(n), hbuffer, dev->name); + read_unlock(&n->lock); +} - { - char tbuf[16]; - sprintf(tbuf, "%u.%u.%u.%u", NIPQUAD(*(u32*)n->primary_key)); - size = sprintf(buffer+len, "%-16s 0x%-10x0x%-10x%s" - " * %s\n", - tbuf, - hatype, - arp_state_to_flags(n), - hbuffer, - dev->name); - } +static void arp_format_pneigh_entry(struct seq_file *seq, + struct pneigh_entry *n) +{ + struct net_device *dev = n->dev; + int hatype = dev ? dev->type : 0; + char tbuf[16]; - read_unlock(&n->lock); + sprintf(tbuf, "%u.%u.%u.%u", NIPQUAD(*(u32*)n->key)); + seq_printf(seq, "%-16s 0x%-10x0x%-10x%s * %s\n", + tbuf, hatype, ATF_PUBL | ATF_PERM, "00:00:00:00:00:00", + dev ? dev->name : "*"); +} - len += size; - pos += size; - - if (pos <= offset) - len=0; - if (pos >= offset+length) { - read_unlock_bh(&arp_tbl.lock); - goto done; - } - } - read_unlock_bh(&arp_tbl.lock); +static int arp_seq_show(struct seq_file *seq, void *v) +{ + if (v == SEQ_START_TOKEN) { + seq_puts(seq, "IP address HW type Flags " + "HW address Mask Device\n"); + } else { + struct neigh_seq_state *state = seq->private; + + if (state->flags & NEIGH_SEQ_IS_PNEIGH) + arp_format_pneigh_entry(seq, v); + else + arp_format_neigh_entry(seq, v); } - for (i=0; i<=PNEIGH_HASHMASK; i++) { - struct pneigh_entry *n; - for (n=arp_tbl.phash_buckets[i]; n; n=n->next) { - struct net_device *dev = n->dev; - int hatype = dev ? dev->type : 0; - - { - char tbuf[16]; - sprintf(tbuf, "%u.%u.%u.%u", NIPQUAD(*(u32*)n->key)); - size = sprintf(buffer+len, "%-16s 0x%-10x0x%-10x%s" - " * %s\n", - tbuf, - hatype, - ATF_PUBL|ATF_PERM, - "00:00:00:00:00:00", - dev ? dev->name : "*"); - } + return 0; +} - len += size; - pos += size; - - if (pos <= offset) - len=0; - if (pos >= offset+length) - goto done; - } - } +static void *arp_seq_start(struct seq_file *seq, loff_t *pos) +{ + /* Don't want to confuse "arp -a" w/ magic entries, + * so we tell the generic iterator to skip NUD_NOARP. + */ + return neigh_seq_start(seq, pos, &arp_tbl, NEIGH_SEQ_SKIP_NOARP); +} + +/* ------------------------------------------------------------------------ */ + +static struct seq_operations arp_seq_ops = { + .start = arp_seq_start, + .next = neigh_seq_next, + .stop = neigh_seq_stop, + .show = arp_seq_show, +}; + +static int arp_seq_open(struct inode *inode, struct file *file) +{ + struct seq_file *seq; + int rc = -ENOMEM; + struct neigh_seq_state *s = kmalloc(sizeof(*s), GFP_KERNEL); + + if (!s) + goto out; + + memset(s, 0, sizeof(*s)); + rc = seq_open(file, &arp_seq_ops); + if (rc) + goto out_kfree; -done: - - *start = buffer+len-(pos-offset); /* Start of wanted data */ - len = pos-offset; /* Start slop */ - if (len>length) - len = length; /* Ending slop */ - if (len<0) - len = 0; - return len; + seq = file->private_data; + seq->private = s; +out: + return rc; +out_kfree: + kfree(s); + goto out; } -#endif + +static struct file_operations arp_seq_fops = { + .owner = THIS_MODULE, + .open = arp_seq_open, + .read = seq_read, + .llseek = seq_lseek, + .release = seq_release_private, +}; +#endif /* CONFIG_PROC_FS */ static int arp_netdev_event(struct notifier_block *this, unsigned long event, void *ptr) { @@ -1355,8 +1375,10 @@ void __init arp_init (void) dev_add_pack(&arp_packet_type); - proc_net_create ("arp", 0, arp_get_info); - +#ifdef CONFIG_PROC_FS + if (!proc_net_fops_create("arp", S_IRUGO, &arp_seq_fops)) + panic("unable to create arp proc entry"); +#endif #ifdef CONFIG_SYSCTL neigh_sysctl_register(NULL, &arp_tbl.parms, NET_IPV4, NET_IPV4_NEIGH, "ipv4"); #endif @@ -1364,39 +1386,3 @@ void __init arp_init (void) } -#ifdef CONFIG_PROC_FS -#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE) - -/* - * ax25 -> ASCII conversion - */ -char *ax2asc2(ax25_address *a, char *buf) -{ - char c, *s; - int n; - - for (n = 0, s = buf; n < 6; n++) { - c = (a->ax25_call[n] >> 1) & 0x7F; - - if (c != ' ') *s++ = c; - } - - *s++ = '-'; - - if ((n = ((a->ax25_call[6] >> 1) & 0x0F)) > 9) { - *s++ = '1'; - n -= 10; - } - - *s++ = n + '0'; - *s++ = '\0'; - - if (*buf == '\0' || *buf == '-') - return "*"; - - return buf; - -} - -#endif -#endif ===== net/ipv4/route.c 1.24 vs edited ===== --- 1.24/net/ipv4/route.c 2003-08-16 12:10:15 -07:00 +++ edited/net/ipv4/route.c 2004-10-03 15:12:55 -07:00 @@ -284,6 +284,7 @@ static int rt_cache_stat_get_info(char * int i, lcpu; int len = 0; + len += sprintf(buffer+len, "entries in_hit in_slow_tot in_slow_mc in_no_route in_brd in_martian_dst in_martian_src out_hit out_slow_tot out_slow_mc gc_total gc_ignored gc_goal_miss gc_dst_overflow in_hlist_search out_hlist_search\n"); for (lcpu = 0; lcpu < smp_num_cpus; lcpu++) { i = cpu_logical_map(lcpu); @@ -2625,7 +2626,8 @@ void __init ip_rt_init(void) add_timer(&rt_secret_timer); proc_net_create ("rt_cache", 0, rt_cache_get_info); - proc_net_create ("rt_cache_stat", 0, rt_cache_stat_get_info); + create_proc_info_entry ("rt_cache", 0, proc_net_stat, + rt_cache_stat_get_info); #ifdef CONFIG_NET_CLS_ROUTE create_proc_read_entry("net/rt_acct", 0, 0, ip_rt_acct_read, NULL); #endif ===== net/ipv6/ndisc.c 1.26 vs edited ===== --- 1.26/net/ipv6/ndisc.c 2004-07-15 13:33:03 -07:00 +++ edited/net/ipv6/ndisc.c 2004-10-03 15:12:55 -07:00 @@ -60,6 +60,7 @@ #include #include #include +#include #include #include @@ -240,15 +241,14 @@ int ndisc_mc_map(struct in6_addr *addr, static u32 ndisc_hash(const void *pkey, const struct net_device *dev) { - u32 hash_val; + const u32 *p32 = pkey; + u32 addr_hash, i; - hash_val = *(u32*)(pkey + sizeof(struct in6_addr) - 4); - hash_val ^= (hash_val>>16); - hash_val ^= hash_val>>8; - hash_val ^= hash_val>>3; - hash_val = (hash_val^dev->ifindex)&NEIGH_HASHMASK; + addr_hash = 0; + for (i = 0; i < (sizeof(struct in6_addr) / sizeof(u32)); i++) + addr_hash ^= *p32++; - return hash_val; + return jhash_2words(addr_hash, dev->ifindex, nd_tbl.hash_rnd); } static int ndisc_constructor(struct neighbour *neigh) @@ -696,9 +696,9 @@ void ndisc_recv_ns(struct sk_buff *skb) int inc = ipv6_addr_type(daddr)&IPV6_ADDR_MULTICAST; if (inc) - nd_tbl.stats.rcv_probes_mcast++; + NEIGH_CACHE_STAT_INC(&nd_tbl, rcv_probes_mcast); else - nd_tbl.stats.rcv_probes_ucast++; + NEIGH_CACHE_STAT_INC(&nd_tbl, rcv_probes_ucast); /* * update / create cache entry @@ -741,9 +741,9 @@ void ndisc_recv_ns(struct sk_buff *skb) if (addr_type & IPV6_ADDR_UNICAST) { int inc = ipv6_addr_type(daddr)&IPV6_ADDR_MULTICAST; if (inc) - nd_tbl.stats.rcv_probes_mcast++; + NEIGH_CACHE_STAT_INC(&nd_tbl, rcv_probes_mcast); else - nd_tbl.stats.rcv_probes_ucast++; + NEIGH_CACHE_STAT_INC(&nd_tbl, rcv_probes_ucast); /* * update / create cache entry @@ -775,9 +775,11 @@ void ndisc_recv_ns(struct sk_buff *skb) inc == 0 || in6_dev->nd_parms->proxy_delay == 0) { if (inc) - nd_tbl.stats.rcv_probes_mcast++; + NEIGH_CACHE_STAT_INC(&nd_tbl, + rcv_probes_mcast); else - nd_tbl.stats.rcv_probes_ucast++; + NEIGH_CACHE_STAT_INC(&nd_tbl, + rcv_probes_ucast); neigh = neigh_event_ns(&nd_tbl, lladdr, saddr, dev); From tgraf@suug.ch Mon Oct 4 12:30:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 12:30:15 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94JU8xs021974 for ; Mon, 4 Oct 2004 12:30:09 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id C114B82; Mon, 4 Oct 2004 21:29:33 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 28D511C0E8; Mon, 4 Oct 2004 21:30:16 +0200 (CEST) Date: Mon, 4 Oct 2004 21:30:16 +0200 From: Thomas Graf To: "David S. Miller" Cc: Jamal Hadi Salim , netdev@oss.sgi.com Subject: [RESEND PATCH 2/3] NET: Generic rate estimator Message-ID: <20041004193016.GD15898@postel.suug.ch> References: <20041003213124.GG14344@postel.suug.ch> <20041003213954.GI14344@postel.suug.ch> <20041003161436.50293f9a.davem@davemloft.net> <20041003233647.GN14344@postel.suug.ch> <1096852582.1046.378.camel@jzny.localdomain> <20041004125300.GA15898@postel.suug.ch> <1096896256.1072.4.camel@jzny.localdomain> <20041004141532.GB15898@postel.suug.ch> <1096901984.1073.9.camel@jzny.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1096901984.1073.9.camel@jzny.localdomain> X-archive-position: 9881 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 6923 Lines: 238 Resend of generic rate estimator patch. The HZ%4 check has been removed and jiffies calculation has been adapted to avoid carrying on unacuracy. Small variance for 250ms interval happens with HZ values of 122 and 50. I suggest to apply this and think about using psched tick<->usec code later because it wouldn't really solve any problem but would be nice to have. Introduces a generic rate estimator based on timers. Patch is based on Jamal's patch and adapted to the new generic network statistics API. Signed-off-by: Thomas Graf --- linux-2.6.9-rc3.orig/include/linux/gen_stats.h 2004-10-03 23:00:15.000000000 +0200 +++ linux-2.6.9-rc3/include/linux/gen_stats.h 2004-10-03 23:00:19.000000000 +0200 @@ -47,4 +47,16 @@ __u32 requeues; __u32 overlimits; }; + +/** + * @interval: sampling period + * @ewma_log: the log of measurement window weight + */ +struct gnet_estimator +{ + signed char interval; + unsigned char ewma_log; +}; + + #endif /* __LINUX_GEN_STATS_H */ --- linux-2.6.9-rc3.orig/net/core/gen_estimator.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.9-rc3/net/core/gen_estimator.c 2004-10-04 21:17:26.000000000 +0200 @@ -0,0 +1,204 @@ +/* + * net/sched/gen_estimator.c Simple rate estimator. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * Authors: Alexey Kuznetsov, + * + * Changes: + * Jamal Hadi Salim - moved it to net/core and reshulfed + * names to make it usable in general net subsystem. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + This code is NOT intended to be used for statistics collection, + its purpose is to provide a base for statistical multiplexing + for controlled load service. + If you need only statistics, run a user level daemon which + periodically reads byte counters. + + Unfortunately, rate estimation is not a very easy task. + F.e. I did not find a simple way to estimate the current peak rate + and even failed to formulate the problem 8)8) + + So I preferred not to built an estimator into the scheduler, + but run this task separately. + Ideally, it should be kernel thread(s), but for now it runs + from timers, which puts apparent top bounds on the number of rated + flows, has minimal overhead on small, but is enough + to handle controlled load service, sets of aggregates. + + We measure rate over A=(1<next) { + u64 nbytes; + u32 npackets; + u32 rate; + + spin_lock(e->stats_lock); + nbytes = e->bstats->bytes; + npackets = e->bstats->packets; + rate = (nbytes - e->last_bytes)<<(7 - idx); + e->last_bytes = nbytes; + e->avbps += ((long)rate - (long)e->avbps) >> e->ewma_log; + e->rate_est->bps = (e->avbps+0xF)>>5; + + rate = (npackets - e->last_packets)<<(12 - idx); + e->last_packets = npackets; + e->avpps += ((long)rate - (long)e->avpps) >> e->ewma_log; + e->rate_est->pps = (e->avpps+0x1FF)>>10; + spin_unlock(e->stats_lock); + } + + mod_timer(&elist[idx].timer, jiffies + ((HZ<interval < -2 || parm->interval > 3) + return -EINVAL; + + est = kmalloc(sizeof(*est), GFP_KERNEL); + if (est == NULL) + return -ENOBUFS; + + memset(est, 0, sizeof(*est)); + est->interval = parm->interval + 2; + est->bstats = bstats; + est->rate_est = rate_est; + est->stats_lock = stats_lock; + est->ewma_log = parm->ewma_log; + est->last_bytes = bstats->bytes; + est->avbps = rate_est->bps<<5; + est->last_packets = bstats->packets; + est->avpps = rate_est->pps<<10; + + est->next = elist[est->interval].list; + if (est->next == NULL) { + init_timer(&elist[est->interval].timer); + elist[est->interval].timer.data = est->interval; + elist[est->interval].timer.expires = jiffies + ((HZ<interval)/4); + elist[est->interval].timer.function = est_timer; + add_timer(&elist[est->interval].timer); + } + write_lock_bh(&est_lock); + elist[est->interval].list = est; + write_unlock_bh(&est_lock); + return 0; +} + +void gen_kill_estimator(struct gnet_stats_basic *bstats, + struct gnet_stats_rate_est *rate_est) +{ + int idx; + struct gen_estimator *est, **pest; + + for (idx=0; idx <= EST_MAX_INTERVAL; idx++) { + int killed = 0; + pest = &elist[idx].list; + while ((est=*pest) != NULL) { + if (est->rate_est != rate_est || est->bstats != bstats) { + pest = &est->next; + continue; + } + + write_lock_bh(&est_lock); + *pest = est->next; + write_unlock_bh(&est_lock); + + kfree(est); + killed++; + } + if (killed && elist[idx].list == NULL) + del_timer(&elist[idx].timer); + } +} + +EXPORT_SYMBOL(gen_kill_estimator); +EXPORT_SYMBOL(gen_new_estimator); From romieu@fr.zoreil.com Mon Oct 4 12:49:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 12:49:08 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94Jn1Ih022644 for ; Mon, 4 Oct 2004 12:49:02 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i94JmRvr020378; Mon, 4 Oct 2004 21:48:27 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i94JmQ2Y020377; Mon, 4 Oct 2004 21:48:26 +0200 Date: Mon, 4 Oct 2004 21:48:26 +0200 From: Francois Romieu To: jgarzik@pobox.com Cc: netdev@oss.sgi.com, akpm@osdl.org Subject: [PATCH 2.6.9-rc3-mm2 1/5] r8169: Tx timeout rework Message-ID: <20041004194826.GA18404@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 9882 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 Content-Length: 5173 Lines: 178 Tx timeout rework: - the ring descriptors of the chipset and the ring index of the driver are synced during a reset of the device; - rtl8169_interrupt: rtl8169_hw_reset() replaces the previous stop code. An implicit reset of the device is added but it makes no noticeable difference with the former behavior (i.e.: stop the chipset). Signed-off-by: Francois Romieu diff -puN drivers/net/r8169.c~r8169-200 drivers/net/r8169.c --- linux-2.6.9-rc3/drivers/net/r8169.c~r8169-200 2004-10-04 21:13:45.000000000 +0200 +++ linux-2.6.9-rc3-fr/drivers/net/r8169.c 2004-10-04 21:15:41.000000000 +0200 @@ -400,6 +400,7 @@ struct rtl8169_private { void (*phy_reset_enable)(void *); unsigned int (*phy_reset_pending)(void *); unsigned int (*link_ok)(void *); + struct work_struct task; }; MODULE_AUTHOR("Realtek"); @@ -420,6 +421,8 @@ static int rtl8169_close(struct net_devi static void rtl8169_set_rx_mode(struct net_device *dev); static void rtl8169_tx_timeout(struct net_device *dev); static struct net_device_stats *rtl8169_get_stats(struct net_device *netdev); +static int rtl8169_rx_interrupt(struct net_device *, struct rtl8169_private *, + void *); #ifdef CONFIG_R8169_NAPI static int rtl8169_poll(struct net_device *dev, int *budget); #endif @@ -1456,6 +1459,8 @@ rtl8169_open(struct net_device *dev) if (retval < 0) goto err_free_rx; + INIT_WORK(&tp->task, NULL, dev); + rtl8169_hw_start(dev); rtl8169_request_timer(dev); @@ -1475,6 +1480,18 @@ err_free_irq: goto out; } +static void rtl8169_hw_reset(void *ioaddr) +{ + /* Disable interrupts */ + RTL_W16(IntrMask, 0x0000); + + /* Reset the chipset */ + RTL_W8(ChipCmd, CmdReset); + + /* PCI commit */ + RTL_R8(ChipCmd); +} + static void rtl8169_hw_start(struct net_device *dev) { @@ -1518,8 +1535,6 @@ rtl8169_hw_start(struct net_device *dev) RTL_W16(CPlusCmd, tp->cp_cmd); } - tp->cur_rx = 0; - RTL_W32(TxDescStartAddrLow, ((u64) tp->TxPhyAddr & DMA_32BIT_MASK)); RTL_W32(TxDescStartAddrHigh, ((u64) tp->TxPhyAddr >> 32)); RTL_W32(RxDescAddrLow, ((u64) tp->RxPhyAddr & DMA_32BIT_MASK)); @@ -1634,12 +1649,16 @@ static inline void rtl8169_mark_as_last_ desc->opts1 |= cpu_to_le32(RingEnd); } +static void rtl8169_init_ring_indexes(struct rtl8169_private *tp) +{ + tp->dirty_tx = tp->dirty_rx = tp->cur_tx = tp->cur_rx = 0; +} + static int rtl8169_init_ring(struct net_device *dev) { struct rtl8169_private *tp = netdev_priv(dev); - tp->cur_rx = tp->dirty_rx = 0; - tp->cur_tx = tp->dirty_tx = 0; + rtl8169_init_ring_indexes(tp); memset(tp->tx_skb, 0x0, NUM_TX_DESC * sizeof(struct ring_info)); memset(tp->Rx_skbuff, 0x0, NUM_RX_DESC * sizeof(struct sk_buff *)); @@ -1691,31 +1710,53 @@ static void rtl8169_tx_clear(struct rtl8 tp->cur_tx = tp->dirty_tx = 0; } -static void -rtl8169_tx_timeout(struct net_device *dev) +static void rtl8169_schedule_work(struct net_device *dev, void (*task)(void *)) { struct rtl8169_private *tp = netdev_priv(dev); - void *ioaddr = tp->mmio_addr; - u8 tmp8; - printk(KERN_INFO "%s: TX Timeout\n", dev->name); - /* disable Tx, if not already */ - tmp8 = RTL_R8(ChipCmd); - if (tmp8 & CmdTxEnb) - RTL_W8(ChipCmd, tmp8 & ~CmdTxEnb); + PREPARE_WORK(&tp->task, task, dev); + schedule_delayed_work(&tp->task, 4); +} - /* Disable interrupts by clearing the interrupt mask. */ - RTL_W16(IntrMask, 0x0000); +static void rtl8169_reset_task(void *_data) +{ + struct net_device *dev = _data; + struct rtl8169_private *tp = netdev_priv(dev); - /* Stop a shared interrupt from scavenging while we are. */ - spin_lock_irq(&tp->lock); + if (!netif_running(dev)) + return; + + synchronize_irq(dev->irq); + + /* Wait for any pending NAPI task to complete */ + netif_poll_disable(dev); + + rtl8169_rx_interrupt(dev, tp, tp->mmio_addr); rtl8169_tx_clear(tp); - spin_unlock_irq(&tp->lock); - /* ...and finally, reset everything */ - rtl8169_hw_start(dev); + if (tp->dirty_rx == tp->cur_rx) { + rtl8169_init_ring_indexes(tp); + rtl8169_hw_start(dev); + netif_wake_queue(dev); + } else { + if (net_ratelimit()) { + printk(PFX KERN_EMERG "%s: Rx buffers shortage\n", + dev->name); + } + rtl8169_schedule_work(dev, rtl8169_reset_task); + } +} + +static void rtl8169_tx_timeout(struct net_device *dev) +{ + struct rtl8169_private *tp = netdev_priv(dev); + + printk(KERN_INFO "%s: TX Timeout\n", dev->name); - netif_wake_queue(dev); + rtl8169_hw_reset(tp->mmio_addr); + + /* Let's wait a bit while any (async) irq lands on */ + rtl8169_schedule_work(dev, rtl8169_reset_task); } static int rtl8169_xmit_frags(struct rtl8169_private *tp, struct sk_buff *skb, @@ -2057,9 +2098,7 @@ rtl8169_interrupt(int irq, void *dev_ins if (unlikely(status & SYSErr)) { printk(KERN_ERR PFX "%s: PCI error (status: 0x%04x)." " Device disabled.\n", dev->name, status); - RTL_W8(ChipCmd, 0x00); - RTL_W16(IntrMask, 0x0000); - RTL_R16(IntrMask); + rtl8169_hw_reset(ioaddr); break; } @@ -2138,6 +2177,8 @@ rtl8169_close(struct net_device *dev) netif_stop_queue(dev); + flush_scheduled_work(); + rtl8169_delete_timer(dev); spin_lock_irq(&tp->lock); _ From romieu@fr.zoreil.com Mon Oct 4 12:52:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 12:53:05 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94JqwtI022985 for ; Mon, 4 Oct 2004 12:52:58 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i94JqHvr020454; Mon, 4 Oct 2004 21:52:17 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i94JqGYF020453; Mon, 4 Oct 2004 21:52:16 +0200 Date: Mon, 4 Oct 2004 21:52:16 +0200 From: Francois Romieu To: jgarzik@pobox.com Cc: netdev@oss.sgi.com, akpm@osdl.org Subject: [PATCH 2.6.9-rc3-mm2 4/5] r8169: rtl8169_close() races Message-ID: <20041004195216.GC20379@electric-eye.fr.zoreil.com> References: <20041004194826.GA18404@electric-eye.fr.zoreil.com> <20041004194949.GA20379@electric-eye.fr.zoreil.com> <20041004195051.GB20379@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041004195051.GB20379@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 9884 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 Content-Length: 1102 Lines: 39 - close the race with rtl8169_interrupt() which appears when rtl8169_close() uses synchronize_irq()/free_irq(); - netif_poll_disable() allows rtl8169_close() to wait for any pending rtl8169_poll() to complete so it can safely clear the rings. Signed-off-by: Francois Romieu diff -puN drivers/net/r8169.c~r8169-215 drivers/net/r8169.c --- linux-2.6.9-rc3/drivers/net/r8169.c~r8169-215 2004-10-04 21:26:01.000000000 +0200 +++ linux-2.6.9-rc3-fr/drivers/net/r8169.c 2004-10-04 21:26:01.000000000 +0200 @@ -2142,6 +2142,9 @@ rtl8169_interrupt(int irq, void *dev_ins int status = 0; int handled = 0; + if (unlikely(!netif_running(dev))) + goto out; + do { status = RTL_R16(IntrStatus); @@ -2196,6 +2199,7 @@ rtl8169_interrupt(int irq, void *dev_ins /* Clear all interrupt sources. */ RTL_W16(IntrStatus, 0xffff); } +out: return IRQ_RETVAL(handled); } @@ -2259,6 +2263,8 @@ rtl8169_close(struct net_device *dev) synchronize_irq(dev->irq); free_irq(dev->irq, dev); + netif_poll_disable(dev); + rtl8169_tx_clear(tp); rtl8169_rx_clear(tp); _ From romieu@fr.zoreil.com Mon Oct 4 12:52:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 12:53:03 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94Jqvw4022984 for ; Mon, 4 Oct 2004 12:52:57 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i94Jnovr020435; Mon, 4 Oct 2004 21:49:50 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i94JnnmP020434; Mon, 4 Oct 2004 21:49:49 +0200 Date: Mon, 4 Oct 2004 21:49:49 +0200 From: Francois Romieu To: jgarzik@pobox.com Cc: netdev@oss.sgi.com, akpm@osdl.org Subject: [PATCH 2.6.9-rc3-mm2 2/5] r8169: wrong advertisement of VLAN features Message-ID: <20041004194949.GA20379@electric-eye.fr.zoreil.com> References: <20041004194826.GA18404@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041004194826.GA18404@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 9883 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 Content-Length: 650 Lines: 19 Removal of an advertisement for VLAN features which is redundant with rtl8169_init_one(). Signed-off-by: Jon Mason diff -puN drivers/net/r8169.c~r8169-205 drivers/net/r8169.c --- linux-2.6.9-rc3/drivers/net/r8169.c~r8169-205 2004-10-04 21:17:44.000000000 +0200 +++ linux-2.6.9-rc3-fr/drivers/net/r8169.c 2004-10-04 21:17:44.000000000 +0200 @@ -1166,8 +1166,6 @@ rtl8169_init_board(struct pci_dev *pdev, tp->cp_cmd = PCIMulRW | RxChkSum; - dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; - if ((sizeof(dma_addr_t) > 4) && !pci_set_dma_mask(pdev, DMA_64BIT_MASK) && use_dac) { tp->cp_cmd |= PCIDAC; _ From romieu@fr.zoreil.com Mon Oct 4 12:53:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 12:53:07 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94Jr0ZD022994 for ; Mon, 4 Oct 2004 12:53:01 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i94Joqvr020447; Mon, 4 Oct 2004 21:50:52 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i94JopTA020446; Mon, 4 Oct 2004 21:50:51 +0200 Date: Mon, 4 Oct 2004 21:50:51 +0200 From: Francois Romieu To: jgarzik@pobox.com Cc: netdev@oss.sgi.com, akpm@osdl.org Subject: [PATCH 2.6.9-rc3-mm2 3/5] r8169: automatic pci dac step down Message-ID: <20041004195051.GB20379@electric-eye.fr.zoreil.com> References: <20041004194826.GA18404@electric-eye.fr.zoreil.com> <20041004194949.GA20379@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041004194949.GA20379@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 9885 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 Content-Length: 3539 Lines: 119 Automatic adjustement of highmem dma feature. The first interruption encountered on systems where the 8169 does not perform PCI DAC correctly seems to always be a PCI error one. When DAC is enabled, the driver tries to issue a complete down/up sequence as an addition to the usual halt of the device. Signed-off-by: Francois Romieu diff -puN drivers/net/r8169.c~r8169-210 drivers/net/r8169.c --- linux-2.6.9-rc3/drivers/net/r8169.c~r8169-210 2004-10-04 21:18:14.000000000 +0200 +++ linux-2.6.9-rc3-fr/drivers/net/r8169.c 2004-10-04 21:25:07.000000000 +0200 @@ -1716,6 +1716,34 @@ static void rtl8169_schedule_work(struct schedule_delayed_work(&tp->task, 4); } +static void rtl8169_wait_for_quiescence(struct net_device *dev) +{ + synchronize_irq(dev->irq); + + /* Wait for any pending NAPI task to complete */ + netif_poll_disable(dev); +} + +static void rtl8169_reinit_task(void *_data) +{ + struct net_device *dev = _data; + int ret; + + if (netif_running(dev)) { + rtl8169_wait_for_quiescence(dev); + rtl8169_close(dev); + } + + ret = rtl8169_open(dev); + if (unlikely(ret < 0)) { + if (net_ratelimit()) { + printk(PFX KERN_ERR "%s: reinit failure (status = %d)." + " Rescheduling.\n", dev->name, ret); + } + rtl8169_schedule_work(dev, rtl8169_reinit_task); + } +} + static void rtl8169_reset_task(void *_data) { struct net_device *dev = _data; @@ -1724,10 +1752,7 @@ static void rtl8169_reset_task(void *_da if (!netif_running(dev)) return; - synchronize_irq(dev->irq); - - /* Wait for any pending NAPI task to complete */ - netif_poll_disable(dev); + rtl8169_wait_for_quiescence(dev); rtl8169_rx_interrupt(dev, tp, tp->mmio_addr); rtl8169_tx_clear(tp); @@ -1893,6 +1918,46 @@ err_update_stats: goto out; } +static void rtl8169_pcierr_interrupt(struct net_device *dev) +{ + struct rtl8169_private *tp = netdev_priv(dev); + struct pci_dev *pdev = tp->pci_dev; + void *ioaddr = tp->mmio_addr; + u16 pci_status, pci_cmd; + + pci_read_config_word(pdev, PCI_COMMAND, &pci_cmd); + pci_read_config_word(pdev, PCI_STATUS, &pci_status); + + printk(KERN_ERR PFX "%s: PCI error (cmd = 0x%04x, status = 0x%04x).\n", + dev->name, pci_cmd, pci_status); + + /* + * The recovery sequence below admits a very elaborated explanation: + * - it seems to work; + * - I did not see what else could be done. + * + * Feel free to adjust to your needs. + */ + pci_write_config_word(pdev, PCI_COMMAND, + pci_cmd | PCI_COMMAND_SERR | PCI_COMMAND_PARITY); + + pci_write_config_word(pdev, PCI_STATUS, + pci_status & (PCI_STATUS_DETECTED_PARITY | + PCI_STATUS_SIG_SYSTEM_ERROR | PCI_STATUS_REC_MASTER_ABORT | + PCI_STATUS_REC_TARGET_ABORT | PCI_STATUS_SIG_TARGET_ABORT)); + + /* The infamous DAC f*ckup only happens at boot time */ + if ((tp->cp_cmd & PCIDAC) && (tp->dirty_rx == tp->cur_rx == 0)) { + printk(KERN_INFO PFX "%s: disabling PCI DAC.\n", dev->name); + tp->cp_cmd &= ~PCIDAC; + RTL_W16(CPlusCmd, tp->cp_cmd); + dev->features &= ~NETIF_F_HIGHDMA; + rtl8169_schedule_work(dev, rtl8169_reinit_task); + } + + rtl8169_hw_reset(ioaddr); +} + static void rtl8169_tx_interrupt(struct net_device *dev, struct rtl8169_private *tp, void *ioaddr) @@ -2094,9 +2159,7 @@ rtl8169_interrupt(int irq, void *dev_ins break; if (unlikely(status & SYSErr)) { - printk(KERN_ERR PFX "%s: PCI error (status: 0x%04x)." - " Device disabled.\n", dev->name, status); - rtl8169_hw_reset(ioaddr); + rtl8169_pcierr_interrupt(dev); break; } _ From romieu@fr.zoreil.com Mon Oct 4 12:57:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 12:57:05 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94Juxw0023968 for ; Mon, 4 Oct 2004 12:57:00 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i94Jr3vr020618; Mon, 4 Oct 2004 21:53:03 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i94Jr303020608; Mon, 4 Oct 2004 21:53:03 +0200 Date: Mon, 4 Oct 2004 21:53:02 +0200 From: Francois Romieu To: jgarzik@pobox.com Cc: netdev@oss.sgi.com, akpm@osdl.org Subject: [PATCH 2.6.9-rc3-mm2 5/5] r8169: cleanup Message-ID: <20041004195302.GD20379@electric-eye.fr.zoreil.com> References: <20041004194826.GA18404@electric-eye.fr.zoreil.com> <20041004194949.GA20379@electric-eye.fr.zoreil.com> <20041004195051.GB20379@electric-eye.fr.zoreil.com> <20041004195216.GC20379@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041004195216.GC20379@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 9886 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 Content-Length: 1442 Lines: 44 Cleanup - timeout message is redundant with net/sched/sch_generic::dev_watchdog; - anti-bloat in rtl8169_get_rx_csum; - format fix. Signed-off-by: Francois Romieu Signed-off-by: Jon Mason diff -puN drivers/net/r8169.c~r8169-220 drivers/net/r8169.c --- linux-2.6.9-rc3/drivers/net/r8169.c~r8169-220 2004-10-04 21:26:36.000000000 +0200 +++ linux-2.6.9-rc3-fr/drivers/net/r8169.c 2004-10-04 21:27:47.000000000 +0200 @@ -660,10 +660,10 @@ static u32 rtl8169_get_rx_csum(struct ne { struct rtl8169_private *tp = netdev_priv(dev); - return !!(tp->cp_cmd & RxChkSum); + return tp->cp_cmd & RxChkSum; } -static int rtl8169_set_rx_csum(struct net_device *dev, u32 data) +static int rtl8169_set_rx_csum(struct net_device *dev, u32 data) { struct rtl8169_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; @@ -1774,8 +1774,6 @@ static void rtl8169_tx_timeout(struct ne { struct rtl8169_private *tp = netdev_priv(dev); - printk(KERN_INFO "%s: TX Timeout\n", dev->name); - rtl8169_hw_reset(tp->mmio_addr); /* Let's wait a bit while any (async) irq lands on */ @@ -2176,7 +2174,7 @@ rtl8169_interrupt(int irq, void *dev_ins if (likely(netif_rx_schedule_prep(dev))) __netif_rx_schedule(dev); else { - printk(KERN_INFO "%s: interrupt %x taken in poll\n", + printk(KERN_INFO "%s: interrupt %04x taken in poll\n", dev->name, status); } break; _ From hadi@cyberus.ca Mon Oct 4 13:07:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 13:07:26 -0700 (PDT) Received: from mx03.cybersurf.com (mx03.cybersurf.com [209.197.145.106]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94K7Kx2024438 for ; Mon, 4 Oct 2004 13:07:20 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.20) id 1CEZ6x-0000eH-UT for netdev@oss.sgi.com; Mon, 04 Oct 2004 16:07:07 -0400 Received: from [216.209.86.2] (helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CEZ6v-0000VG-LV; Mon, 04 Oct 2004 16:07:05 -0400 Subject: Re: [RESEND PATCH 2/3] NET: Generic rate estimator From: jamal Reply-To: hadi@cyberus.ca To: Thomas Graf Cc: "David S. Miller" , netdev@oss.sgi.com In-Reply-To: <20041004193016.GD15898@postel.suug.ch> References: <20041003213124.GG14344@postel.suug.ch> <20041003213954.GI14344@postel.suug.ch> <20041003161436.50293f9a.davem@davemloft.net> <20041003233647.GN14344@postel.suug.ch> <1096852582.1046.378.camel@jzny.localdomain> <20041004125300.GA15898@postel.suug.ch> <1096896256.1072.4.camel@jzny.localdomain> <20041004141532.GB15898@postel.suug.ch> <1096901984.1073.9.camel@jzny.localdomain> <20041004193016.GD15898@postel.suug.ch> Content-Type: text/plain Organization: jamalopolous Message-Id: <1096920421.2156.13.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 04 Oct 2004 16:07:01 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 9887 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev Content-Length: 518 Lines: 15 On Mon, 2004-10-04 at 15:30, Thomas Graf wrote: > Resend of generic rate estimator patch. The HZ%4 check has been removed > and jiffies calculation has been adapted to avoid carrying on unacuracy. > Small variance for 250ms interval happens with HZ values of 122 and 50. Ok, I did some test as well here - and the change you made gives better results. Can you also change net/sched/estimator.c to behave the same way? BTW, anything else that changed since last time other than the timer adjustment ? cheers, jamal From davem@davemloft.net Mon Oct 4 13:10:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 13:10:53 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94KAlGl024796 for ; Mon, 4 Oct 2004 13:10:47 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEZ7l-0004rg-00; Mon, 04 Oct 2004 13:07:57 -0700 Date: Mon, 4 Oct 2004 13:07:56 -0700 From: "David S. Miller" To: John Heffner Cc: netdev@oss.sgi.com, jgarzik@pobox.com Subject: Re: bad TSO performance in 2.6.9-rc2-BK Message-Id: <20041004130756.057c1729.davem@davemloft.net> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9888 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 400 Lines: 12 On Fri, 1 Oct 2004 21:32:25 -0400 (EDT) John Heffner wrote: > The good machine has an e7500 chipset and a 82544EI. The bad machine has a > ServerWorks chipset and a 82545GM. > > Any suggestions on where to look for what's going wrong with the > interface? Time to consult the e1000 driver maintainers probably. There are threee folks mentioned in linux/MAINTAINERS as contacts. From laforge@gnumonks.org Mon Oct 4 13:15:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 13:15:46 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94KFex6025208 for ; Mon, 4 Oct 2004 13:15:41 -0700 Received: from dsl-082-082-103-161.arcor-ip.net ([82.82.103.161] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1CEZF0-0000lk-Sn; Mon, 04 Oct 2004 22:15:27 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1CEZEz-0001LN-IZ; Mon, 04 Oct 2004 22:15:25 +0200 Date: Mon, 4 Oct 2004 22:15:25 +0200 From: Harald Welte To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.4] backport neighbour cache redesign Message-ID: <20041004201525.GF27499@sunbeam.de.gnumonks.org> References: <20040930154753.GD1860@sunbeam.de.gnumonks.org> <20041004121759.26798f1d.davem@davemloft.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="McOwgVabxjWRBDh+" Content-Disposition: inline In-Reply-To: <20041004121759.26798f1d.davem@davemloft.net> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 9889 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@gnumonks.org Precedence: bulk X-list: netdev Content-Length: 2633 Lines: 79 --McOwgVabxjWRBDh+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 04, 2004 at 12:17:59PM -0700, David S. Miller wrote: >=20 > Ok I started playing with this, here is what I have currently. > Changes: =20 > 2) Missing symbol exports for the new interfaces modules can use, > namely: > neigh_lookup_nodev > neigh_seq_start > neigh_seq_next > neigh_seq_stop oh, sorry. I just linked atm,decnet and ipv6 static so far :( > 3) Delete instead of "#if 0" out the now totally unused code > inside of net/atm/clip.c oops, that slipped through. embarrassing. > We need to test and verify this patch a lot before I can toss > such a big thing over to Marcelo, but I definitely intend to > send this to him. sure, I am well aware of that. If it helps, at least the IPv4 part will see some serious deployment after it has passed the Astaro QA :) I'll keep you posted about that. One additional note: If we go back to the initial reason for all those modifications, it was deployment in large networks. The gc_thresh3 default of 1k is very small, even if you have only 4 interfaces with /24, you will already max out this default. Now that the hash distribution is better, and the table resized dynamically, we scale better with large neighbour caches. I was thinking of registering with some notifiers and tuning gc_thresh3 automatically to be at least as large as the theoretical number of immediate neigbhours. At least for multiple /24 and /16 I think this is still reasonable. As soon as we go further up (/8 or ipv6) the limit basically becomes 'unlimited', since we won't be able to receive 2^24 arp-causing packets per second anyway. Or be even less conservative and say: there is no limit for neighbour cache entries? You mentioned that *BSD didn't have a limit, IIRC. --=20 - Harald Welte http://www.gnumonks.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D Programming is like sex: One mistake and you have to support it your lifeti= me --McOwgVabxjWRBDh+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBYa9dXaXGVTD0i/8RAqk9AKCl8+z1EtZ21fZMea4QYSi/fZmjsgCgjVJ0 NuYUNyG4d28O8sIlgLAYsso= =LV6w -----END PGP SIGNATURE----- --McOwgVabxjWRBDh+-- From tgraf@suug.ch Mon Oct 4 13:20:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 13:20:13 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94KK6k6025627 for ; Mon, 4 Oct 2004 13:20:07 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id D228482; Mon, 4 Oct 2004 22:19:31 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 1856B1C0E8; Mon, 4 Oct 2004 22:20:14 +0200 (CEST) Date: Mon, 4 Oct 2004 22:20:13 +0200 From: Thomas Graf To: jamal Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [RESEND PATCH 2/3] NET: Generic rate estimator Message-ID: <20041004202013.GE15898@postel.suug.ch> References: <20041003213954.GI14344@postel.suug.ch> <20041003161436.50293f9a.davem@davemloft.net> <20041003233647.GN14344@postel.suug.ch> <1096852582.1046.378.camel@jzny.localdomain> <20041004125300.GA15898@postel.suug.ch> <1096896256.1072.4.camel@jzny.localdomain> <20041004141532.GB15898@postel.suug.ch> <1096901984.1073.9.camel@jzny.localdomain> <20041004193016.GD15898@postel.suug.ch> <1096920421.2156.13.camel@jzny.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1096920421.2156.13.camel@jzny.localdomain> X-archive-position: 9891 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 341 Lines: 10 * jamal <1096920421.2156.13.camel@jzny.localdomain> 2004-10-04 16:07 > Can you also change net/sched/estimator.c to behave the same way? Sure, will do. > BTW, anything else that changed since last time other than the timer > adjustment ? No, I removed the check, adjusted the timer calculation and updated the notes in the documentation. From jgarzik@pobox.com Mon Oct 4 13:19:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 13:20:00 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94KJsGp025580 for ; Mon, 4 Oct 2004 13:19:54 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CEZJ6-0005fa-NX; Mon, 04 Oct 2004 21:19:40 +0100 Message-ID: <4161B050.2070509@pobox.com> Date: Mon, 04 Oct 2004 16:19:28 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Steffen Klassert , akpm@osdl.org CC: netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc3-mm1] 3c59x: Make use of generic_mii_ioctl References: <20041003204507.GA29546@bayes.mathematik.tu-chemnitz.de> <20041004115201.GA1635@bayes.mathematik.tu-chemnitz.de> In-Reply-To: <20041004115201.GA1635@bayes.mathematik.tu-chemnitz.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 9890 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: 47 Lines: 2 Patch looks OK to me... Andrew, you got this? From davem@davemloft.net Mon Oct 4 13:23:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 13:23:31 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94KNNmb026278 for ; Mon, 4 Oct 2004 13:23:23 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEZJy-0004td-00; Mon, 04 Oct 2004 13:20:34 -0700 Date: Mon, 4 Oct 2004 13:20:34 -0700 From: "David S. Miller" To: Harald Welte Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.4] backport neighbour cache redesign Message-Id: <20041004132034.00cfe23c.davem@davemloft.net> In-Reply-To: <20041004201525.GF27499@sunbeam.de.gnumonks.org> References: <20040930154753.GD1860@sunbeam.de.gnumonks.org> <20041004121759.26798f1d.davem@davemloft.net> <20041004201525.GF27499@sunbeam.de.gnumonks.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9892 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 1733 Lines: 37 On Mon, 4 Oct 2004 22:15:25 +0200 Harald Welte wrote: > If we go back to the initial reason for all those modifications, it was > deployment in large networks. The gc_thresh3 default of 1k is very > small, even if you have only 4 interfaces with /24, you will already max > out this default. > > Now that the hash distribution is better, and the table resized > dynamically, we scale better with large neighbour caches. > > I was thinking of registering with some notifiers and tuning gc_thresh3 > automatically to be at least as large as the theoretical number of > immediate neigbhours. At least for multiple /24 and /16 I think this is > still reasonable. > > As soon as we go further up (/8 or ipv6) the limit basically becomes > 'unlimited', since we won't be able to receive 2^24 arp-causing packets > per second anyway. > > Or be even less conservative and say: there is no limit for neighbour > cache entries? You mentioned that *BSD didn't have a limit, IIRC. I think tieing it to the subnet size is wrong, because the real cap is the routing cache size. Remember the email where I was talking about that? I'm nearly ambivalent about a bound-less neighbour cache. I hate to think about having tons of crap sitting in the neighbour cache unused and sucking up memory. BSD's scheme works because when routing entries die so do the neighbour entries they point to, so they have no need for garbage collection like we do. So right now I think a better idea is to have the routing cache tell the neigh table how big it could get, or something like that. It is a thorny issue, since usually routing cache --> neighbour cache assosciations are VERY many to one except in these weird odd cases. From jgarzik@pobox.com Mon Oct 4 13:48:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 13:48:25 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94KmKcS027353 for ; Mon, 4 Oct 2004 13:48:20 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CEZkc-0006os-Qh; Mon, 04 Oct 2004 21:48:06 +0100 Message-ID: <4161B6F9.6020703@pobox.com> Date: Mon, 04 Oct 2004 16:47:53 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Francois Romieu CC: netdev@oss.sgi.com, akpm@osdl.org Subject: Re: [PATCH 2.6.9-rc3-mm2 1/5] r8169: Tx timeout rework References: <20041004194826.GA18404@electric-eye.fr.zoreil.com> In-Reply-To: <20041004194826.GA18404@electric-eye.fr.zoreil.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 9893 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: 13 Lines: 2 applied 1-5 From akpm@osdl.org Mon Oct 4 14:00:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 14:00:34 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94L0Ucw028384 for ; Mon, 4 Oct 2004 14:00:30 -0700 Received: from akpm.pao.digeo.com (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i94L08f20213; Mon, 4 Oct 2004 14:00:08 -0700 Date: Mon, 4 Oct 2004 14:04:05 -0700 From: Andrew Morton To: Jeff Garzik Cc: klassert@mathematik.tu-chemnitz.de, netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc3-mm1] 3c59x: Make use of generic_mii_ioctl Message-Id: <20041004140405.2244226a.akpm@osdl.org> In-Reply-To: <4161B050.2070509@pobox.com> References: <20041003204507.GA29546@bayes.mathematik.tu-chemnitz.de> <20041004115201.GA1635@bayes.mathematik.tu-chemnitz.de> <4161B050.2070509@pobox.com> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i586-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9894 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 Content-Length: 165 Lines: 5 Jeff Garzik wrote: > > Patch looks OK to me... Andrew, you got this? Yup. Hugh sent a fix through to make CONFIG_VORTEX select CONFIG_MII too. From jgarzik@pobox.com Mon Oct 4 14:04:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 14:04:04 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94L3xkD028876 for ; Mon, 4 Oct 2004 14:04:00 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CEZzk-0007Ob-Pr; Mon, 04 Oct 2004 22:03:45 +0100 Message-ID: <4161BAA1.2030004@pobox.com> Date: Mon, 04 Oct 2004 17:03:29 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Margit Schubert-While CC: netdev@oss.sgi.com, prism54-devel@prism54.org Subject: Re: [PATCH 1/4 linux-2.6.9-rc3/linux-2.4.28-pre3] prism54 remove TRACE References: <200410021639.48960.margitsw@t-online.de> In-Reply-To: <200410021639.48960.margitsw@t-online.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 9895 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: 138 Lines: 9 applied to 2.4.x and 2.6.x. I'll forward the 2.4.x pile to Marcelo, since 2.4.x isn't in Release Candidate status like 2.6.x. Jeff From jgarzik@pobox.com Mon Oct 4 14:04:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 14:04:43 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94L4bvq029145 for ; Mon, 4 Oct 2004 14:04:37 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CEa0M-0007QC-2q; Mon, 04 Oct 2004 22:04:22 +0100 Message-ID: <4161BAC7.8040305@pobox.com> Date: Mon, 04 Oct 2004 17:04:07 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Margit Schubert-While CC: Greg KH , netdev@oss.sgi.com, kernel-janitors@lists.osdl.org, mcgrof@studorgs.rutgers.edu, prism54-devel@prism54.org, hvr@gnu.org Subject: Re: [Kernel-janitors] Re: [PATCH 2.6.9-rc2 17/38] net/islpci_dev: replace schedule_timeout() with msleep() References: <5.1.0.14.2.20041001084419.02570b18@pop.t-online.de> <5.1.0.14.2.20040924074745.00b1cd40@pop.t-online.de> <20040923221303.GB13244@us.ibm.com> <20040923221303.GB13244@us.ibm.com> <5.1.0.14.2.20040924074745.00b1cd40@pop.t-online.de> <5.1.0.14.2.20041001084419.02570b18@pop.t-online.de> <5.1.0.14.2.20041002105713.026705d8@pop.t-online.de> In-Reply-To: <5.1.0.14.2.20041002105713.026705d8@pop.t-online.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 9896 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: 626 Lines: 25 Margit Schubert-While wrote: > At 09:55 01.10.2004 -0700, Greg scribeth: > >> On Fri, Oct 01, 2004 at 09:04:27AM +0200, Margit Schubert-While wrote: >> > At 00:15 01.10.2004 -0400, Jeff scribeth: >> > >I would rather see an msleep implementation in 2.4.x... >> > >> > Hear, hear. >> > And can we PLEASE have a >> > "#define HAVE_MSLEEP" in delay.h ?!!! >> > (2.4. AND 2.6) >> >> No, this is not how the kernel source tree works, sorry. > > > Well it happened with netdev_priv ;-) > (HAVE_NETDEV_PRIV) Net driver API is intentionally more friendly to cross-version kernel compat than the kernel as a whole ;-) Jeff From tgraf@suug.ch Mon Oct 4 14:11:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 14:11:51 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94LBiKq030044 for ; Mon, 4 Oct 2004 14:11:45 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 9477582; Mon, 4 Oct 2004 23:11:09 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 49ECE1C0E8; Mon, 4 Oct 2004 23:11:52 +0200 (CEST) Date: Mon, 4 Oct 2004 23:11:52 +0200 From: Thomas Graf To: "David S. Miller" Cc: Jamal Hadi Salim , netdev@oss.sgi.com Subject: [PATCH] PKT_SCHED: Make rate estimator work for all platforms Message-ID: <20041004211152.GF15898@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 9897 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 1453 Lines: 44 Fixes the existing rate estimator to compile cleanly on all platforms and avoids carrying on the variance on platforms with HZ%4 != 0. Patch also applies to 2.4 with some fuzz. Signed-off-by: Thomas Graf --- linux-2.6.9-rc3-bk4.orig/net/sched/estimator.c 2004-10-04 22:41:26.000000000 +0200 +++ linux-2.6.9-rc3-bk4/net/sched/estimator.c 2004-10-04 22:53:54.000000000 +0200 @@ -66,15 +66,11 @@ * Minimal interval is HZ/4=250msec (it is the greatest common divisor for HZ=100 and HZ=1024 8)), maximal interval - is (HZ/4)*2^EST_MAX_INTERVAL = 8sec. Shorter intervals + is (HZ*2^EST_MAX_INTERVAL)/4 = 8sec. Shorter intervals are too expensive, longer ones can be implemented at user level painlessly. */ -#if (HZ%4) != 0 -#error Bad HZ value. -#endif - #define EST_MAX_INTERVAL 5 struct qdisc_estimator @@ -128,7 +124,7 @@ spin_unlock(e->stats_lock); } - mod_timer(&elist[idx].timer, jiffies + ((HZ/4)<next == NULL) { init_timer(&elist[est->interval].timer); elist[est->interval].timer.data = est->interval; - elist[est->interval].timer.expires = jiffies + ((HZ/4)<interval); + elist[est->interval].timer.expires = jiffies + ((HZ<interval)/4); elist[est->interval].timer.function = est_timer; add_timer(&elist[est->interval].timer); } From laforge@gnumonks.org Mon Oct 4 14:12:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 14:12:19 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94LCDEP030151 for ; Mon, 4 Oct 2004 14:12:13 -0700 Received: from dsl-082-082-103-161.arcor-ip.net ([82.82.103.161] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1CEa7k-0002DG-0E; Mon, 04 Oct 2004 23:12:00 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1CEa7i-0001MS-OO; Mon, 04 Oct 2004 23:11:58 +0200 Date: Mon, 4 Oct 2004 23:11:58 +0200 From: Harald Welte To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.4] backport neighbour cache redesign Message-ID: <20041004211158.GG27499@sunbeam.de.gnumonks.org> References: <20040930154753.GD1860@sunbeam.de.gnumonks.org> <20041004121759.26798f1d.davem@davemloft.net> <20041004201525.GF27499@sunbeam.de.gnumonks.org> <20041004132034.00cfe23c.davem@davemloft.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jk/5KjyVsvxWSMIA" Content-Disposition: inline In-Reply-To: <20041004132034.00cfe23c.davem@davemloft.net> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 9898 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@gnumonks.org Precedence: bulk X-list: netdev Content-Length: 2180 Lines: 56 --jk/5KjyVsvxWSMIA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 04, 2004 at 01:20:34PM -0700, David S. Miller wrote: > I think tieing it to the subnet size is wrong, because the real > cap is the routing cache size. Remember the email where I was > talking about that? yes, I remember that email. I didn't think further about it, since I got the feeling that there is significant movement to get rid of the neighbour cache at some point (if/when there is some fast lookup algorithm implemented) - and if we look at ipv6, there is no routing cache. > I'm nearly ambivalent about a bound-less neighbour cache. I hate > to think about having tons of crap sitting in the neighbour cache > unused and sucking up memory. BSD's scheme works because when routing > entries die so do the neighbour entries they point to, so they have no > need for garbage collection like we do. mh, I see. I understood your email related to that subject that you actually think this is not that stupid a thing to do...=20 anyway, I'll drop my prefix-based sizing idea. And I have to admit that I also dislike the 'routing cache tell neighbour cache' approach (since it's only applicable to ipv4)... so as for me, we'll just stick with that hard limit. No more fiddling with that code, I'll get back to flow accounting and pkttables for some time ;) --=20 - Harald Welte http://www.gnumonks.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D Programming is like sex: One mistake and you have to support it your lifeti= me --jk/5KjyVsvxWSMIA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBYbyeXaXGVTD0i/8RAiVBAJsGS19s/sCo8GmeelzjRm83LXqB8wCggmpA nxa93JMnUATsNYYfJyENoeI= =Fxg5 -----END PGP SIGNATURE----- --jk/5KjyVsvxWSMIA-- From davem@davemloft.net Mon Oct 4 14:19:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 14:19:46 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94LJf0t031150 for ; Mon, 4 Oct 2004 14:19:41 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEaCS-0004z8-00; Mon, 04 Oct 2004 14:16:52 -0700 Date: Mon, 4 Oct 2004 14:16:51 -0700 From: "David S. Miller" To: Harald Welte Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.4] backport neighbour cache redesign Message-Id: <20041004141651.153ec066.davem@davemloft.net> In-Reply-To: <20041004211158.GG27499@sunbeam.de.gnumonks.org> References: <20040930154753.GD1860@sunbeam.de.gnumonks.org> <20041004121759.26798f1d.davem@davemloft.net> <20041004201525.GF27499@sunbeam.de.gnumonks.org> <20041004132034.00cfe23c.davem@davemloft.net> <20041004211158.GG27499@sunbeam.de.gnumonks.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9899 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 770 Lines: 17 On Mon, 4 Oct 2004 23:11:58 +0200 Harald Welte wrote: > yes, I remember that email. I didn't think further about it, since I > got the feeling that there is significant movement to get rid of the > neighbour cache at some point (if/when there is some fast lookup > algorithm implemented) - and if we look at ipv6, there is no routing > cache. Another idea is to dynamically grow the thresholds based upon usage just as we do for the hash tables. For example, if we find say %90 of neighbour entries in-use at forced GC time, we increment the thresholds by some factor. Note that the "in-use" part is very important, it prevents a DoS spam from growing the neighbour cache since such traffic causes neighbour entries to quickly become unused. From garzik@havoc.gtf.org Mon Oct 4 15:08:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 15:09:02 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [69.28.190.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94M8tUr002552 for ; Mon, 4 Oct 2004 15:08:55 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id 7AC177A57; Mon, 4 Oct 2004 18:08:37 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i94M8bCR002339; Mon, 4 Oct 2004 18:08:37 -0400 Date: Mon, 4 Oct 2004 18:08:37 -0400 From: Jeff Garzik To: Andrew Morton , Linus Torvalds Cc: netdev@oss.sgi.com Subject: [BK PATCHES] 2.6.x net driver fixes Message-ID: <20041004220837.GA2288@havoc.gtf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-archive-position: 9900 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: 18422 Lines: 566 Got a big queue waiting for 2.6.9 release... Please do a bk pull bk://gkernel.bkbits.net/net-drivers-2.6 This will update the following files: drivers/net/3c59x.c | 7 ++++ drivers/net/tokenring/Kconfig | 3 + drivers/net/tokenring/olympic.c | 63 +++++++++++----------------------------- drivers/net/via-velocity.c | 60 +++++++++++++++++++------------------- drivers/net/via-velocity.h | 7 +--- 5 files changed, 60 insertions(+), 80 deletions(-) through these ChangeSets: (04/10/04 1.2057) [PATCH] via-velocity: comment fixes Comment fixes. Signed-off-by: Tejun Heo (04/10/04 1.2056) [PATCH] via-velocity: wrong buffer offset in velocity_init_td_ring() Buffer offset calculation was incorrect in velocity_init_td_ring(). This didn't cause any trouble because we only use the first td ring. Signed-off-by: Tejun Heo (04/10/04 1.2055) [PATCH] via-velocity: removal of incomplete endianness handling Removed cpu_to_le32 call on OWNED_BY_NIC. This will produce 0x01000000 on big endian machines while rdesc0.owner still evaluates to 0x00000000 or 0x00000001. BTW, unless we reorder bit fields on big endian machines or use u32's and cpu_to_le32'd bit mask macros, current code won't work on big endian machines. Signed-off-by: Tejun Heo (04/10/04 1.2054) [PATCH] via-velocity: early invocation of init_cam_filter() In velocity_init_registers(), init_cam_filter() clears mCAMmask which might have been set by set_multi() (not sure if this can ever occur). Modified to invoke init_cam_filter() first. Also, clear_isr() is called twice. Removed the first invocation. In velocity_found1(), there was a unneeded assignment from vptr to dev->priv. Removed. Signed-off-by: Tejun Heo (04/10/04 1.2053) [PATCH] via-velocity: received ring wrong index and missing barriers There were several receive ring related bugs. In velocity_give_many_rx_descs(), index calculation was incorrect. This and bugs in velocity_rx_srv() described in the following paragraph caused packet loss, truncation and infinite error interrupt generation. In velocity_rx_srv(), velocity_rx_refill() could be called without any dirty slot. With proper timing, This can result in refilling yet unreceived packets and pushing dirty pointer ahead of the current pointer. And vptr->rd_curr which is used by velocity_rx_refill() was updated after calling velocity_rx_refill() thus screwing receive descriptor ring. Also, between checking owner and reading the packet, rmb() is missing. Signed-off-by: Tejun Heo (04/10/04 1.2052) [PATCH] via-velocity: velocity_give_rx_desc() removal In velocity_give_rx_desc(), there should be a wmb() between resetting the first four bytes of rdesc0 and setting owner. As resetting the first four bytes isn't necessary, I just removed the function and directly set owner. Another rationale for removing the function: The function doesn't handle synchronization. We should do wmb() before calling the function. So, I think using bare assignment makes the fact more explicit. Signed-off-by: Tejun Heo (04/10/04 1.2051) [PATCH] via-velocity: removal of unused velocity_info.xmit_lock Removed unused velocity_info.xmit_lock. Signed-off-by: Tejun Heo (04/10/04 1.2050) [PATCH] via-velocity: properly manage the count of adapters velocity_nics wasn't managed properly. Signed-off-by: Tejun Heo (04/10/04 1.2009.4.3) [PATCH] olympic driver: fix kernel oops on lobe fault Hey- I had submitted this awhile ago and after it didn't appear to get accepted, I found that I had boned the submission format pretty bad. So I'm making another pass at it. Its the same patch, applies cleanly to 2.6.9-rc3, and it fixes the oops that olympic driver encounters when it gets a lobe fault. I've tested it, with good results. Thanks Neil Signed-off-by: Neil Horman (04/09/30 1.2009.4.2) [PATCH] 3c59x: add invalid MAC address check (04/09/20 1.1923.1.6) [PATCH] TMS380TR must select FW_LOADER I got the following compile error with CONFIG_FW_LOADER=n: <-- snip --> ... LD .tmp_vmlinux1 drivers/built-in.o(.text+0x297944): In function `tms380tr_reset_adapter': : undefined reference to `request_firmware' drivers/built-in.o(.text+0x297aaf): In function `tms380tr_reset_adapter': : undefined reference to `release_firmware' drivers/built-in.o(.text+0x297af9): In function `tms380tr_reset_adapter': : undefined reference to `release_firmware' make: *** [.tmp_vmlinux1] Error 1 <-- snip --> CONFIG_TMS380TR must select FW_LOADER (and therefore depend on HOTPLUG). Signed-off-by: Adrian Bunk diff -Nru a/drivers/net/3c59x.c b/drivers/net/3c59x.c --- a/drivers/net/3c59x.c 2004-10-04 18:07:46 -04:00 +++ b/drivers/net/3c59x.c 2004-10-04 18:07:46 -04:00 @@ -1297,6 +1297,13 @@ for (i = 0; i < 6; i++) printk("%c%2.2x", i ? ':' : ' ', dev->dev_addr[i]); } + /* Unfortunately an all zero eeprom passes the checksum and this + gets found in the wild in failure cases. Crypto is hard 8) */ + if (!is_valid_ether_addr(dev->dev_addr)) { + retval = -EINVAL; + printk(KERN_ERR "*** EEPROM MAC address is invalid.\n"); + goto free_ring; /* With every pack */ + } EL3WINDOW(2); for (i = 0; i < 6; i++) outb(dev->dev_addr[i], ioaddr + i); diff -Nru a/drivers/net/tokenring/Kconfig b/drivers/net/tokenring/Kconfig --- a/drivers/net/tokenring/Kconfig 2004-10-04 18:07:46 -04:00 +++ b/drivers/net/tokenring/Kconfig 2004-10-04 18:07:46 -04:00 @@ -84,7 +84,8 @@ config TMS380TR tristate "Generic TMS380 Token Ring ISA/PCI adapter support" - depends on TR && (PCI || ISA) + depends on TR && (PCI || ISA) && HOTPLUG + select FW_LOADER ---help--- This driver provides generic support for token ring adapters based on the Texas Instruments TMS380 series chipsets. This diff -Nru a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c --- a/drivers/net/tokenring/olympic.c 2004-10-04 18:07:46 -04:00 +++ b/drivers/net/tokenring/olympic.c 2004-10-04 18:07:46 -04:00 @@ -221,6 +221,8 @@ olympic_priv = dev->priv ; + spin_lock_init(&olympic_priv->olympic_lock) ; + init_waitqueue_head(&olympic_priv->srb_wait); init_waitqueue_head(&olympic_priv->trb_wait); #if OLYMPIC_DEBUG @@ -311,7 +313,6 @@ } } - spin_lock_init(&olympic_priv->olympic_lock) ; /* Needed for cardbus */ if(!(readl(olympic_mmio+BCTL) & BCTL_MODE_INDICATOR)) { @@ -442,6 +443,8 @@ DECLARE_WAITQUEUE(wait,current) ; + olympic_init(dev); + if(request_irq(dev->irq, &olympic_interrupt, SA_SHIRQ , "olympic", dev)) { return -EAGAIN; } @@ -898,7 +901,10 @@ int i; for(i=0;irx_ring_skb[olympic_priv->rx_status_last_received]); + if (olympic_priv->rx_ring_skb[olympic_priv->rx_status_last_received] != NULL) { + dev_kfree_skb_irq(olympic_priv->rx_ring_skb[olympic_priv->rx_status_last_received]); + olympic_priv->rx_ring_skb[olympic_priv->rx_status_last_received] = NULL; + } if (olympic_priv->olympic_rx_ring[olympic_priv->rx_status_last_received].buffer != 0xdeadbeef) { pci_unmap_single(olympic_priv->pdev, le32_to_cpu(olympic_priv->olympic_rx_ring[olympic_priv->rx_status_last_received].buffer), @@ -944,9 +950,6 @@ /* Hotswap gives us this on removal */ if (sisr == 0xffffffff) { printk(KERN_WARNING "%s: Hotswap adapter removal.\n",dev->name) ; - olympic_freemem(dev) ; - free_irq(dev->irq, dev) ; - dev->stop = NULL ; spin_unlock(&olympic_priv->olympic_lock) ; return IRQ_NONE; } @@ -961,9 +964,7 @@ printk(KERN_ERR "The adapter must be reset to clear this condition.\n") ; printk(KERN_ERR "Please report this error to the driver maintainer and/\n") ; printk(KERN_ERR "or the linux-tr mailing list.\n") ; - olympic_freemem(dev) ; - free_irq(dev->irq, dev) ; - dev->stop = NULL ; + wake_up_interruptible(&olympic_priv->srb_wait); spin_unlock(&olympic_priv->olympic_lock) ; return IRQ_HANDLED; } /* SISR_ERR */ @@ -1006,9 +1007,6 @@ writel(readl(olympic_mmio+LAPWWC),olympic_mmio+LAPA); adapter_check_area = olympic_priv->olympic_lap + ((readl(olympic_mmio+LAPWWC)) & (~0xf800)) ; printk(KERN_WARNING "%s: Bytes %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n",dev->name, readb(adapter_check_area+0), readb(adapter_check_area+1), readb(adapter_check_area+2), readb(adapter_check_area+3), readb(adapter_check_area+4), readb(adapter_check_area+5), readb(adapter_check_area+6), readb(adapter_check_area+7)) ; - olympic_freemem(dev) ; - free_irq(dev->irq, dev) ; - dev->stop = NULL ; spin_unlock(&olympic_priv->olympic_lock) ; return IRQ_HANDLED; } /* SISR_ADAPTER_CHECK */ @@ -1094,34 +1092,32 @@ writeb(0,srb+1); writeb(OLYMPIC_CLEAR_RET_CODE,srb+2); + add_wait_queue(&olympic_priv->srb_wait,&wait) ; + set_current_state(TASK_INTERRUPTIBLE) ; + spin_lock_irqsave(&olympic_priv->olympic_lock,flags); olympic_priv->srb_queued=1; writel(LISR_SRB_CMD,olympic_mmio+LISR_SUM); spin_unlock_irqrestore(&olympic_priv->olympic_lock,flags); - - t = jiffies ; - - add_wait_queue(&olympic_priv->srb_wait,&wait) ; - set_current_state(TASK_INTERRUPTIBLE) ; while(olympic_priv->srb_queued) { - schedule() ; + + t = schedule_timeout(60*HZ); + if(signal_pending(current)) { printk(KERN_WARNING "%s: SRB timed out.\n",dev->name); printk(KERN_WARNING "SISR=%x MISR=%x\n",readl(olympic_mmio+SISR),readl(olympic_mmio+LISR)); olympic_priv->srb_queued=0; break; } - if ((jiffies-t) > 60*HZ) { + + if (t == 0) { printk(KERN_WARNING "%s: SRB timed out. May not be fatal. \n",dev->name) ; - olympic_priv->srb_queued=0; - break ; } - set_current_state(TASK_INTERRUPTIBLE) ; + olympic_priv->srb_queued=0; } remove_wait_queue(&olympic_priv->srb_wait,&wait) ; - set_current_state(TASK_RUNNING) ; olympic_priv->rx_status_last_received++; olympic_priv->rx_status_last_received&=OLYMPIC_RX_RING_SIZE-1; @@ -1513,29 +1509,6 @@ writel(readl(olympic_mmio+BCTL)&~(3<<13),olympic_mmio+BCTL); netif_stop_queue(dev); olympic_priv->srb = readw(olympic_priv->olympic_lap + LAPWWO) ; - for(i=0;irx_ring_skb[olympic_priv->rx_status_last_received]); - if (olympic_priv->olympic_rx_ring[olympic_priv->rx_status_last_received].buffer != 0xdeadbeef) { - pci_unmap_single(olympic_priv->pdev, - le32_to_cpu(olympic_priv->olympic_rx_ring[olympic_priv->rx_status_last_received].buffer), - olympic_priv->pkt_buf_sz, PCI_DMA_FROMDEVICE); - } - olympic_priv->rx_status_last_received++; - olympic_priv->rx_status_last_received&=OLYMPIC_RX_RING_SIZE-1; - } - /* unmap rings */ - pci_unmap_single(olympic_priv->pdev, olympic_priv->rx_status_ring_dma_addr, - sizeof(struct olympic_rx_status) * OLYMPIC_RX_RING_SIZE, PCI_DMA_FROMDEVICE); - pci_unmap_single(olympic_priv->pdev, olympic_priv->rx_ring_dma_addr, - sizeof(struct olympic_rx_desc) * OLYMPIC_RX_RING_SIZE, PCI_DMA_TODEVICE); - - pci_unmap_single(olympic_priv->pdev, olympic_priv->tx_status_ring_dma_addr, - sizeof(struct olympic_tx_status) * OLYMPIC_TX_RING_SIZE, PCI_DMA_FROMDEVICE); - pci_unmap_single(olympic_priv->pdev, olympic_priv->tx_ring_dma_addr, - sizeof(struct olympic_tx_desc) * OLYMPIC_TX_RING_SIZE, PCI_DMA_TODEVICE); - - free_irq(dev->irq,dev); - dev->stop=NULL; printk(KERN_WARNING "%s: Adapter has been closed \n", dev->name) ; } /* If serious error */ diff -Nru a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c --- a/drivers/net/via-velocity.c 2004-10-04 18:07:46 -04:00 +++ b/drivers/net/via-velocity.c 2004-10-04 18:07:46 -04:00 @@ -359,6 +359,8 @@ pci_disable_device(pdev); pci_set_drvdata(pdev, NULL); free_netdev(dev); + + velocity_nics--; } /** @@ -462,7 +464,7 @@ { struct mac_regs * regs = vptr->mac_regs; - /* T urn on MCFG_PQEN, turn off MCFG_RTGOPT */ + /* Turn on MCFG_PQEN, turn off MCFG_RTGOPT */ WORD_REG_BITS_SET(MCFG_PQEN, MCFG_RTGOPT, ®s->MCFG); WORD_REG_BITS_ON(MCFG_VIDFR, ®s->MCFG); @@ -490,12 +492,6 @@ } } -static inline void velocity_give_rx_desc(struct rx_desc *rd) -{ - *(u32 *)&rd->rdesc0 = 0; - rd->rdesc0.owner = cpu_to_le32(OWNED_BY_NIC); -} - /** * velocity_rx_reset - handle a receive reset * @vptr: velocity we are resetting @@ -516,7 +512,7 @@ * Init state, all RD entries belong to the NIC */ for (i = 0; i < vptr->options.numrx; ++i) - velocity_give_rx_desc(vptr->rd_ring + i); + vptr->rd_ring[i].rdesc0.owner = OWNED_BY_NIC; writew(vptr->options.numrx, ®s->RBRDU); writel(vptr->rd_pool_dma, ®s->RDBaseLo); @@ -591,11 +587,16 @@ writeb(WOLCFG_SAM | WOLCFG_SAB, ®s->WOLCFGSet); /* - * Bback off algorithm use original IEEE standard + * Back off algorithm use original IEEE standard */ BYTE_REG_BITS_SET(CFGB_OFSET, (CFGB_CRANDOM | CFGB_CAP | CFGB_MBA | CFGB_BAKOPT), ®s->CFGB); /* + * Init CAM filter + */ + velocity_init_cam_filter(vptr); + + /* * Set packet filter: Receive directed and broadcast address */ velocity_set_multi(vptr->dev); @@ -619,8 +620,6 @@ mac_tx_queue_run(regs, i); } - velocity_init_cam_filter(vptr); - init_flow_control_register(vptr); writel(CR0_STOP, ®s->CR0Clr); @@ -628,7 +627,6 @@ mii_status = velocity_get_opt_media_mode(vptr); netif_stop_queue(vptr->dev); - mac_clear_isr(regs); mii_init(vptr, mii_status); @@ -695,7 +693,7 @@ struct mac_regs * regs; int ret = -ENOMEM; - if (velocity_nics++ >= MAX_UNITS) { + if (velocity_nics >= MAX_UNITS) { printk(KERN_NOTICE VELOCITY_NAME ": already found %d NICs.\n", velocity_nics); return -ENODEV; @@ -727,7 +725,6 @@ vptr->dev = dev; - dev->priv = vptr; dev->irq = pdev->irq; ret = pci_enable_device(pdev); @@ -762,7 +759,7 @@ dev->dev_addr[i] = readb(®s->PAR[i]); - velocity_get_options(&vptr->options, velocity_nics - 1, dev->name); + velocity_get_options(&vptr->options, velocity_nics, dev->name); /* * Mask out the options cannot be set to the chip @@ -817,6 +814,7 @@ spin_unlock_irqrestore(&velocity_dev_list_lock, flags); } #endif + velocity_nics++; out: return ret; @@ -869,10 +867,7 @@ vptr->io_size = info->io_size; vptr->num_txq = info->txqueue; vptr->multicast_limit = MCAM_SIZE; - spin_lock_init(&vptr->lock); - spin_lock_init(&vptr->xmit_lock); - INIT_LIST_HEAD(&vptr->list); } @@ -1024,11 +1019,11 @@ wmb(); - unusable = vptr->rd_filled | 0x0003; - dirty = vptr->rd_dirty - unusable + 1; + unusable = vptr->rd_filled & 0x0003; + dirty = vptr->rd_dirty - unusable; for (avail = vptr->rd_filled & 0xfffc; avail; avail--) { dirty = (dirty > 0) ? dirty - 1 : vptr->options.numrx - 1; - velocity_give_rx_desc(vptr->rd_ring + dirty); + vptr->rd_ring[dirty].rdesc0.owner = OWNED_BY_NIC; } writew(vptr->rd_filled & 0xfffc, ®s->RBRDU); @@ -1043,7 +1038,7 @@ struct rx_desc *rd = vptr->rd_ring + dirty; /* Fine for an all zero Rx desc at init time as well */ - if (rd->rdesc0.owner == cpu_to_le32(OWNED_BY_NIC)) + if (rd->rdesc0.owner == OWNED_BY_NIC) break; if (!vptr->rd_info[dirty].skb) { @@ -1096,7 +1091,7 @@ } /** - * velocity_free_rd_ring - set up receive ring + * velocity_free_rd_ring - free receive ring * @vptr: velocity to clean up * * Free the receive buffers for each ring slot and any @@ -1161,8 +1156,10 @@ for (i = 0; i < vptr->options.numtx; i++, curr += sizeof(struct tx_desc)) { td = &(vptr->td_rings[j][i]); td_info = &(vptr->td_infos[j][i]); - td_info->buf = vptr->tx_bufs + (i + j) * PKT_BUF_SZ; - td_info->buf_dma = vptr->tx_bufs_dma + (i + j) * PKT_BUF_SZ; + td_info->buf = vptr->tx_bufs + + (j * vptr->options.numtx + i) * PKT_BUF_SZ; + td_info->buf_dma = vptr->tx_bufs_dma + + (j * vptr->options.numtx + i) * PKT_BUF_SZ; } vptr->td_tail[j] = vptr->td_curr[j] = vptr->td_used[j] = 0; } @@ -1238,15 +1235,17 @@ int rd_curr = vptr->rd_curr; int works = 0; - while (1) { + do { struct rx_desc *rd = vptr->rd_ring + rd_curr; - if (!vptr->rd_info[rd_curr].skb || (works++ > 15)) + if (!vptr->rd_info[rd_curr].skb) break; if (rd->rdesc0.owner == OWNED_BY_NIC) break; + rmb(); + /* * Don't drop CE or RL error frame although RXOK is off */ @@ -1269,14 +1268,15 @@ rd_curr++; if (rd_curr >= vptr->options.numrx) rd_curr = 0; - } + } while (++works <= 15); - if (velocity_rx_refill(vptr) < 0) { + vptr->rd_curr = rd_curr; + + if (works > 0 && velocity_rx_refill(vptr) < 0) { VELOCITY_PRT(MSG_LEVEL_ERR, KERN_ERR "%s: rx buf allocation failure\n", vptr->dev->name); } - vptr->rd_curr = rd_curr; VAR_USED(stats); return works; } diff -Nru a/drivers/net/via-velocity.h b/drivers/net/via-velocity.h --- a/drivers/net/via-velocity.h 2004-10-04 18:07:46 -04:00 +++ b/drivers/net/via-velocity.h 2004-10-04 18:07:46 -04:00 @@ -1319,7 +1319,7 @@ /* disable CAMEN */ writeb(0, ®s->CAMADDR); - /* Select CAM mask */ + /* Select mar */ BYTE_REG_BITS_SET(CAMCR_PS_MAR, CAMCR_PS1 | CAMCR_PS0, ®s->CAMCR); } @@ -1360,7 +1360,7 @@ writeb(0, ®s->CAMADDR); - /* Select CAM mask */ + /* Select mar */ BYTE_REG_BITS_SET(CAMCR_PS_MAR, CAMCR_PS1 | CAMCR_PS0, ®s->CAMCR); } @@ -1401,7 +1401,7 @@ writeb(0, ®s->CAMADDR); - /* Select CAM mask */ + /* Select mar */ BYTE_REG_BITS_SET(CAMCR_PS_MAR, CAMCR_PS1 | CAMCR_PS0, ®s->CAMCR); } @@ -1792,7 +1792,6 @@ u8 mCAMmask[(MCAM_SIZE / 8)]; spinlock_t lock; - spinlock_t xmit_lock; int wol_opts; u8 wol_passwd[6]; From macro@linux-mips.org Mon Oct 4 15:55:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 15:55:56 -0700 (PDT) Received: from pollux.ds.pg.gda.pl (postfix@pollux.ds.pg.gda.pl [153.19.208.7]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94Mtntw005639 for ; Mon, 4 Oct 2004 15:55:50 -0700 Received: from localhost (localhost [127.0.0.1]) by pollux.ds.pg.gda.pl (Postfix) with ESMTP id B6412F596D; Tue, 5 Oct 2004 00:55:27 +0200 (CEST) Received: from pollux.ds.pg.gda.pl ([127.0.0.1]) by localhost (pollux [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 08625-06; Tue, 5 Oct 2004 00:55:27 +0200 (CEST) Received: from piorun.ds.pg.gda.pl (piorun.ds.pg.gda.pl [153.19.208.8]) by pollux.ds.pg.gda.pl (Postfix) with ESMTP id 58E1AE1CAA; Tue, 5 Oct 2004 00:55:27 +0200 (CEST) Received: from blysk.ds.pg.gda.pl (macro@blysk.ds.pg.gda.pl [153.19.208.6]) by piorun.ds.pg.gda.pl (8.12.11/8.12.11) with ESMTP id i94MtjXU014356; Tue, 5 Oct 2004 00:55:45 +0200 Date: Mon, 4 Oct 2004 23:55:33 +0100 (BST) From: "Maciej W. Rozycki" To: netdev@oss.sgi.com Cc: linux-kernel@vger.kernel.org Subject: [PATCH] 2.4.27: Fix struct fddi_statistics for 64-bit Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at pollux.ds.pg.gda.pl X-archive-position: 9901 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: macro@linux-mips.org Precedence: bulk X-list: netdev Content-Length: 10041 Lines: 251 Hello, There is a problem with "struct fddi_statistics" for 64-bit systems. The starting members of the struct are expected to correspond to the respective members of "struct net_device_stats" (drivers for FDDI devices return "struct fddi_statistics" in the response to the get_stats() call of "struct net_device"). Unfortunately, due to using different types (u32 vs ulong) they do not. "struct net_device_stats" is a public interface and as a result, bogus results are retrieved, e.g. for /proc/net/dev. Here is my proposal to address the problem. I think there is no point in duplicating the layout of "struct net_device_stats" in "struct fddi_statistics" as the former can simply be included as a member avoiding this problem and actually any possible discrepancy in the future. This also preserves the layout of the structure for 32-bit systems. This was run-time tested with 2.4.26 using the defxx driver in a 64-bit MIPSel system. All affected drivers were compiled successfully with 2.4.27 and 2.6.8.1. The patch applies both to 2.4 and 2.6, but one of the affected drivers has been removed from 2.6 leading to a reject. Therefore I'll send an updated patch for 2.6 separately. Maciej Signed-off-by: Maciej W. Rozycki patch-2.4.27-fddi-stats-1 diff -up --recursive --new-file linux-2.4.27.macro/drivers/message/i2o/i2o_lan.c linux-2.4.27/drivers/message/i2o/i2o_lan.c --- linux-2.4.27.macro/drivers/message/i2o/i2o_lan.c 2002-08-12 18:55:51.000000000 +0000 +++ linux-2.4.27/drivers/message/i2o/i2o_lan.c 2004-10-03 21:12:32.000000000 +0000 @@ -1043,13 +1043,13 @@ static struct net_device_stats *i2o_lan_ printk(KERN_INFO "%s: Unable to query LAN_HISTORICAL_STATS.\n", dev->name); else { dprintk(KERN_DEBUG "%s: LAN_HISTORICAL_STATS queried.\n", dev->name); - priv->stats.tx_packets = val64[0]; - priv->stats.tx_bytes = val64[1]; - priv->stats.rx_packets = val64[2]; - priv->stats.rx_bytes = val64[3]; - priv->stats.tx_errors = val64[4]; - priv->stats.rx_errors = val64[5]; - priv->stats.rx_dropped = val64[6]; + priv->stats.gen.tx_packets = val64[0]; + priv->stats.gen.tx_bytes = val64[1]; + priv->stats.gen.rx_packets = val64[2]; + priv->stats.gen.rx_bytes = val64[3]; + priv->stats.gen.tx_errors = val64[4]; + priv->stats.gen.rx_errors = val64[5]; + priv->stats.gen.rx_dropped = val64[6]; } if (i2o_query_scalar(iop, i2o_dev->lct_data.tid, 0x0180, -1, @@ -1062,9 +1062,9 @@ static struct net_device_stats *i2o_lan_ printk(KERN_INFO "%s: Unable to query LAN_OPTIONAL_RX_HISTORICAL_STATS.\n", dev->name); else { dprintk(KERN_DEBUG "%s: LAN_OPTIONAL_RX_HISTORICAL_STATS queried.\n", dev->name); - priv->stats.multicast = val64[4]; - priv->stats.rx_length_errors = val64[10]; - priv->stats.rx_crc_errors = val64[0]; + priv->stats.gen.multicast = val64[4]; + priv->stats.gen.rx_length_errors = val64[10]; + priv->stats.gen.rx_crc_errors = val64[0]; } } @@ -1075,9 +1075,9 @@ static struct net_device_stats *i2o_lan_ printk(KERN_INFO "%s: Unable to query LAN_802_3_HISTORICAL_STATS.\n", dev->name); else { dprintk(KERN_DEBUG "%s: LAN_802_3_HISTORICAL_STATS queried.\n", dev->name); - priv->stats.transmit_collision = val64[1] + val64[2]; - priv->stats.rx_frame_errors = val64[0]; - priv->stats.tx_carrier_errors = val64[6]; + priv->stats.gen.collisions = val64[1] + val64[2]; + priv->stats.gen.rx_frame_errors = val64[0]; + priv->stats.gen.tx_carrier_errors = val64[6]; } if (i2o_query_scalar(iop, i2o_dev->lct_data.tid, 0x0280, -1, @@ -1091,9 +1091,11 @@ static struct net_device_stats *i2o_lan_ else { dprintk(KERN_DEBUG "%s: LAN_OPTIONAL_802_3_HISTORICAL_STATS queried.\n", dev->name); if (supported_stats & 0x1) - priv->stats.rx_over_errors = val64[0]; + priv->stats.gen.rx_over_errors = + val64[0]; if (supported_stats & 0x4) - priv->stats.tx_heartbeat_errors = val64[2]; + priv->stats.gen.tx_heartbeat_errors = + val64[2]; } } } diff -up --recursive --new-file linux-2.4.27.macro/drivers/net/defxx.c linux-2.4.27/drivers/net/defxx.c --- linux-2.4.27.macro/drivers/net/defxx.c 2004-09-29 00:03:33.000000000 +0000 +++ linux-2.4.27/drivers/net/defxx.c 2004-10-03 21:31:16.000000000 +0000 @@ -1809,16 +1809,18 @@ static struct net_device_stats *dfx_ctl_ /* Fill the bp->stats structure with driver-maintained counters */ - bp->stats.rx_packets = bp->rcv_total_frames; - bp->stats.tx_packets = bp->xmt_total_frames; - bp->stats.rx_bytes = bp->rcv_total_bytes; - bp->stats.tx_bytes = bp->xmt_total_bytes; - bp->stats.rx_errors = (u32)(bp->rcv_crc_errors + bp->rcv_frame_status_errors + bp->rcv_length_errors); - bp->stats.tx_errors = bp->xmt_length_errors; - bp->stats.rx_dropped = bp->rcv_discards; - bp->stats.tx_dropped = bp->xmt_discards; - bp->stats.multicast = bp->rcv_multicast_frames; - bp->stats.transmit_collision = 0; /* always zero (0) for FDDI */ + bp->stats.gen.rx_packets = bp->rcv_total_frames; + bp->stats.gen.tx_packets = bp->xmt_total_frames; + bp->stats.gen.rx_bytes = bp->rcv_total_bytes; + bp->stats.gen.tx_bytes = bp->xmt_total_bytes; + bp->stats.gen.rx_errors = bp->rcv_crc_errors + + bp->rcv_frame_status_errors + + bp->rcv_length_errors; + bp->stats.gen.tx_errors = bp->xmt_length_errors; + bp->stats.gen.rx_dropped = bp->rcv_discards; + bp->stats.gen.tx_dropped = bp->xmt_discards; + bp->stats.gen.multicast = bp->rcv_multicast_frames; + bp->stats.gen.collisions = 0; /* always zero (0) for FDDI */ /* Get FDDI SMT MIB objects */ diff -up --recursive --new-file linux-2.4.27.macro/drivers/net/skfp/skfddi.c linux-2.4.27/drivers/net/skfp/skfddi.c --- linux-2.4.27.macro/drivers/net/skfp/skfddi.c 2002-08-12 18:55:55.000000000 +0000 +++ linux-2.4.27/drivers/net/skfp/skfddi.c 2004-10-03 21:04:51.000000000 +0000 @@ -1363,7 +1363,7 @@ static int skfp_send_pkt(struct sk_buff */ if (!(skb->len >= FDDI_K_LLC_ZLEN && skb->len <= FDDI_K_LLC_LEN)) { - bp->MacStat.tx_errors++; /* bump error counter */ + bp->MacStat.gen.tx_errors++; /* bump error counter */ // dequeue packets from xmt queue and send them netif_start_queue(dev); dev_kfree_skb(skb); @@ -1814,8 +1814,8 @@ void mac_drv_tx_complete(struct s_smc *s skb->len, PCI_DMA_TODEVICE); txd->txd_os.dma_addr = 0; - smc->os.MacStat.tx_packets++; // Count transmitted packets. - smc->os.MacStat.tx_bytes+=skb->len; // Count bytes + smc->os.MacStat.gen.tx_packets++; // Count transmitted packets. + smc->os.MacStat.gen.tx_bytes+=skb->len; // Count bytes // free the skb dev_kfree_skb_irq(skb); @@ -1897,7 +1897,7 @@ void mac_drv_rx_complete(struct s_smc *s skb = rxd->rxd_os.skb; if (!skb) { PRINTK(KERN_INFO "No skb in rxd\n"); - smc->os.MacStat.rx_errors++; + smc->os.MacStat.gen.rx_errors++; goto RequeueRxd; } virt = skb->data; @@ -1950,13 +1950,14 @@ void mac_drv_rx_complete(struct s_smc *s } // Count statistics. - smc->os.MacStat.rx_packets++; // Count indicated receive packets. - smc->os.MacStat.rx_bytes+=len; // Count bytes + smc->os.MacStat.gen.rx_packets++; // Count indicated receive + // packets. + smc->os.MacStat.gen.rx_bytes+=len; // Count bytes. // virt points to header again if (virt[1] & 0x01) { // Check group (multicast) bit. - smc->os.MacStat.multicast++; + smc->os.MacStat.gen.multicast++; } // deliver frame to system @@ -1974,7 +1975,8 @@ void mac_drv_rx_complete(struct s_smc *s RequeueRxd: PRINTK(KERN_INFO "Rx: re-queue RXD.\n"); mac_drv_requeue_rxd(smc, rxd, frag_count); - smc->os.MacStat.rx_errors++; // Count receive packets not indicated. + smc->os.MacStat.gen.rx_errors++; // Count receive packets + // not indicated. } // mac_drv_rx_complete @@ -2349,7 +2351,7 @@ void smt_stat_counter(struct s_smc *smc, break; case 1: PRINTK(KERN_INFO "Receive fifo overflow.\n"); - smc->os.MacStat.rx_errors++; + smc->os.MacStat.gen.rx_errors++; break; default: PRINTK(KERN_INFO "Unknown status (%d).\n", stat); diff -up --recursive --new-file linux-2.4.27.macro/include/linux/if_fddi.h linux-2.4.27/include/linux/if_fddi.h --- linux-2.4.27.macro/include/linux/if_fddi.h 1999-06-02 19:29:13.000000000 +0000 +++ linux-2.4.27/include/linux/if_fddi.h 2004-10-03 21:01:28.000000000 +0000 @@ -5,7 +5,7 @@ * * Global definitions for the ANSI FDDI interface. * - * Version: @(#)if_fddi.h 1.0.1 09/16/96 + * Version: @(#)if_fddi.h 1.0.2 Sep 29 2004 * * Author: Lawrence V. Stefani, * @@ -103,38 +103,12 @@ struct fddihdr } __attribute__ ((packed)); /* Define FDDI statistics structure */ -struct fddi_statistics - { - __u32 rx_packets; /* total packets received */ - __u32 tx_packets; /* total packets transmitted */ - __u32 rx_bytes; /* total bytes received */ - __u32 tx_bytes; /* total bytes transmitted */ - __u32 rx_errors; /* bad packets received */ - __u32 tx_errors; /* packet transmit problems */ - __u32 rx_dropped; /* no space in linux buffers */ - __u32 tx_dropped; /* no space available in linux */ - __u32 multicast; /* multicast packets received */ - __u32 transmit_collision; /* always 0 for FDDI */ - - /* detailed rx_errors */ - __u32 rx_length_errors; - __u32 rx_over_errors; /* receiver ring buff overflow */ - __u32 rx_crc_errors; /* recved pkt with crc error */ - __u32 rx_frame_errors; /* recv'd frame alignment error */ - __u32 rx_fifo_errors; /* recv'r fifo overrun */ - __u32 rx_missed_errors; /* receiver missed packet */ - - /* detailed tx_errors */ - __u32 tx_aborted_errors; - __u32 tx_carrier_errors; - __u32 tx_fifo_errors; - __u32 tx_heartbeat_errors; - __u32 tx_window_errors; - - /* for cslip etc */ - __u32 rx_compressed; - __u32 tx_compressed; - +struct fddi_statistics { + + /* Generic statistics. */ + + struct net_device_stats gen; + /* Detailed FDDI statistics. Adopted from RFC 1512 */ __u8 smt_station_id[8]; From macro@linux-mips.org Mon Oct 4 15:55:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 15:56:01 -0700 (PDT) Received: from pollux.ds.pg.gda.pl (postfix@pollux.ds.pg.gda.pl [153.19.208.7]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94Mtu8A005651 for ; Mon, 4 Oct 2004 15:55:56 -0700 Received: from localhost (localhost [127.0.0.1]) by pollux.ds.pg.gda.pl (Postfix) with ESMTP id 2D0C6F596D; Tue, 5 Oct 2004 00:55:37 +0200 (CEST) Received: from pollux.ds.pg.gda.pl ([127.0.0.1]) by localhost (pollux [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 11366-05; Tue, 5 Oct 2004 00:55:37 +0200 (CEST) Received: from piorun.ds.pg.gda.pl (piorun.ds.pg.gda.pl [153.19.208.8]) by pollux.ds.pg.gda.pl (Postfix) with ESMTP id DC153E1CAA; Tue, 5 Oct 2004 00:55:36 +0200 (CEST) Received: from blysk.ds.pg.gda.pl (macro@blysk.ds.pg.gda.pl [153.19.208.6]) by piorun.ds.pg.gda.pl (8.12.11/8.12.11) with ESMTP id i94MttZh014359; Tue, 5 Oct 2004 00:55:55 +0200 Date: Mon, 4 Oct 2004 23:55:43 +0100 (BST) From: "Maciej W. Rozycki" To: netdev@oss.sgi.com Cc: linux-kernel@vger.kernel.org Subject: [PATCH] 2.6.8.1: Fix struct fddi_statistics for 64-bit Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at pollux.ds.pg.gda.pl X-archive-position: 9902 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: macro@linux-mips.org Precedence: bulk X-list: netdev Content-Length: 7132 Lines: 185 Hello, There is a problem with "struct fddi_statistics" for 64-bit systems. The starting members of the struct are expected to correspond to the respective members of "struct net_device_stats" (drivers for FDDI devices return "struct fddi_statistics" in the response to the get_stats() call of "struct net_device"). Unfortunately, due to using different types (u32 vs ulong) they do not. "struct net_device_stats" is a public interface and as a result, bogus results are retrieved, e.g. for /proc/net/dev. Here is my proposal to address the problem. I think there is no point in duplicating the layout of "struct net_device_stats" in "struct fddi_statistics" as the former can simply be included as a member avoiding this problem and actually any possible discrepancy in the future. This also preserves the layout of the structure for 32-bit systems. This was run-time tested with 2.4.26 using the defxx driver in a 64-bit MIPSel system. All affected drivers were compiled successfully with 2.4.27 and 2.6.8.1. This is the updated patch for 2.6. Maciej Signed-off-by: Maciej W. Rozycki patch-2.6.8.1-fddi-stats-1 diff -up --recursive --new-file linux-2.6.8.1.macro/drivers/net/defxx.c linux-2.6.8.1/drivers/net/defxx.c --- linux-2.6.8.1.macro/drivers/net/defxx.c 2004-08-14 10:54:46.000000000 +0000 +++ linux-2.6.8.1/drivers/net/defxx.c 2004-10-03 22:24:12.000000000 +0000 @@ -1814,16 +1814,18 @@ static struct net_device_stats *dfx_ctl_ /* Fill the bp->stats structure with driver-maintained counters */ - bp->stats.rx_packets = bp->rcv_total_frames; - bp->stats.tx_packets = bp->xmt_total_frames; - bp->stats.rx_bytes = bp->rcv_total_bytes; - bp->stats.tx_bytes = bp->xmt_total_bytes; - bp->stats.rx_errors = (u32)(bp->rcv_crc_errors + bp->rcv_frame_status_errors + bp->rcv_length_errors); - bp->stats.tx_errors = bp->xmt_length_errors; - bp->stats.rx_dropped = bp->rcv_discards; - bp->stats.tx_dropped = bp->xmt_discards; - bp->stats.multicast = bp->rcv_multicast_frames; - bp->stats.transmit_collision = 0; /* always zero (0) for FDDI */ + bp->stats.gen.rx_packets = bp->rcv_total_frames; + bp->stats.gen.tx_packets = bp->xmt_total_frames; + bp->stats.gen.rx_bytes = bp->rcv_total_bytes; + bp->stats.gen.tx_bytes = bp->xmt_total_bytes; + bp->stats.gen.rx_errors = bp->rcv_crc_errors + + bp->rcv_frame_status_errors + + bp->rcv_length_errors; + bp->stats.gen.tx_errors = bp->xmt_length_errors; + bp->stats.gen.rx_dropped = bp->rcv_discards; + bp->stats.gen.tx_dropped = bp->xmt_discards; + bp->stats.gen.multicast = bp->rcv_multicast_frames; + bp->stats.gen.collisions = 0; /* always zero (0) for FDDI */ /* Get FDDI SMT MIB objects */ diff -up --recursive --new-file linux-2.6.8.1.macro/drivers/net/skfp/skfddi.c linux-2.6.8.1/drivers/net/skfp/skfddi.c --- linux-2.6.8.1.macro/drivers/net/skfp/skfddi.c 2004-08-14 10:54:48.000000000 +0000 +++ linux-2.6.8.1/drivers/net/skfp/skfddi.c 2004-10-03 22:24:12.000000000 +0000 @@ -1095,7 +1095,7 @@ static int skfp_send_pkt(struct sk_buff */ if (!(skb->len >= FDDI_K_LLC_ZLEN && skb->len <= FDDI_K_LLC_LEN)) { - bp->MacStat.tx_errors++; /* bump error counter */ + bp->MacStat.gen.tx_errors++; /* bump error counter */ // dequeue packets from xmt queue and send them netif_start_queue(dev); dev_kfree_skb(skb); @@ -1546,8 +1546,8 @@ void mac_drv_tx_complete(struct s_smc *s skb->len, PCI_DMA_TODEVICE); txd->txd_os.dma_addr = 0; - smc->os.MacStat.tx_packets++; // Count transmitted packets. - smc->os.MacStat.tx_bytes+=skb->len; // Count bytes + smc->os.MacStat.gen.tx_packets++; // Count transmitted packets. + smc->os.MacStat.gen.tx_bytes+=skb->len; // Count bytes // free the skb dev_kfree_skb_irq(skb); @@ -1629,7 +1629,7 @@ void mac_drv_rx_complete(struct s_smc *s skb = rxd->rxd_os.skb; if (!skb) { PRINTK(KERN_INFO "No skb in rxd\n"); - smc->os.MacStat.rx_errors++; + smc->os.MacStat.gen.rx_errors++; goto RequeueRxd; } virt = skb->data; @@ -1682,13 +1682,14 @@ void mac_drv_rx_complete(struct s_smc *s } // Count statistics. - smc->os.MacStat.rx_packets++; // Count indicated receive packets. - smc->os.MacStat.rx_bytes+=len; // Count bytes + smc->os.MacStat.gen.rx_packets++; // Count indicated receive + // packets. + smc->os.MacStat.gen.rx_bytes+=len; // Count bytes. // virt points to header again if (virt[1] & 0x01) { // Check group (multicast) bit. - smc->os.MacStat.multicast++; + smc->os.MacStat.gen.multicast++; } // deliver frame to system @@ -1706,7 +1707,8 @@ void mac_drv_rx_complete(struct s_smc *s RequeueRxd: PRINTK(KERN_INFO "Rx: re-queue RXD.\n"); mac_drv_requeue_rxd(smc, rxd, frag_count); - smc->os.MacStat.rx_errors++; // Count receive packets not indicated. + smc->os.MacStat.gen.rx_errors++; // Count receive packets + // not indicated. } // mac_drv_rx_complete @@ -2081,7 +2083,7 @@ void smt_stat_counter(struct s_smc *smc, break; case 1: PRINTK(KERN_INFO "Receive fifo overflow.\n"); - smc->os.MacStat.rx_errors++; + smc->os.MacStat.gen.rx_errors++; break; default: PRINTK(KERN_INFO "Unknown status (%d).\n", stat); diff -up --recursive --new-file linux-2.6.8.1.macro/include/linux/if_fddi.h linux-2.6.8.1/include/linux/if_fddi.h --- linux-2.6.8.1.macro/include/linux/if_fddi.h 2004-08-14 10:55:32.000000000 +0000 +++ linux-2.6.8.1/include/linux/if_fddi.h 2004-10-03 22:24:12.000000000 +0000 @@ -5,7 +5,7 @@ * * Global definitions for the ANSI FDDI interface. * - * Version: @(#)if_fddi.h 1.0.1 09/16/96 + * Version: @(#)if_fddi.h 1.0.2 Sep 29 2004 * * Author: Lawrence V. Stefani, * @@ -103,38 +103,12 @@ struct fddihdr } __attribute__ ((packed)); /* Define FDDI statistics structure */ -struct fddi_statistics - { - __u32 rx_packets; /* total packets received */ - __u32 tx_packets; /* total packets transmitted */ - __u32 rx_bytes; /* total bytes received */ - __u32 tx_bytes; /* total bytes transmitted */ - __u32 rx_errors; /* bad packets received */ - __u32 tx_errors; /* packet transmit problems */ - __u32 rx_dropped; /* no space in linux buffers */ - __u32 tx_dropped; /* no space available in linux */ - __u32 multicast; /* multicast packets received */ - __u32 transmit_collision; /* always 0 for FDDI */ - - /* detailed rx_errors */ - __u32 rx_length_errors; - __u32 rx_over_errors; /* receiver ring buff overflow */ - __u32 rx_crc_errors; /* recved pkt with crc error */ - __u32 rx_frame_errors; /* recv'd frame alignment error */ - __u32 rx_fifo_errors; /* recv'r fifo overrun */ - __u32 rx_missed_errors; /* receiver missed packet */ - - /* detailed tx_errors */ - __u32 tx_aborted_errors; - __u32 tx_carrier_errors; - __u32 tx_fifo_errors; - __u32 tx_heartbeat_errors; - __u32 tx_window_errors; - - /* for cslip etc */ - __u32 rx_compressed; - __u32 tx_compressed; - +struct fddi_statistics { + + /* Generic statistics. */ + + struct net_device_stats gen; + /* Detailed FDDI statistics. Adopted from RFC 1512 */ __u8 smt_station_id[8]; From macro@linux-mips.org Mon Oct 4 15:57:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 15:57:18 -0700 (PDT) Received: from pollux.ds.pg.gda.pl (postfix@pollux.ds.pg.gda.pl [153.19.208.7]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94MvChI006331 for ; Mon, 4 Oct 2004 15:57:13 -0700 Received: from localhost (localhost [127.0.0.1]) by pollux.ds.pg.gda.pl (Postfix) with ESMTP id A065DF5972; Tue, 5 Oct 2004 00:56:53 +0200 (CEST) Received: from pollux.ds.pg.gda.pl ([127.0.0.1]) by localhost (pollux [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 15521-01; Tue, 5 Oct 2004 00:56:53 +0200 (CEST) Received: from piorun.ds.pg.gda.pl (piorun.ds.pg.gda.pl [153.19.208.8]) by pollux.ds.pg.gda.pl (Postfix) with ESMTP id 6AA29E1CAA; Tue, 5 Oct 2004 00:56:53 +0200 (CEST) Received: from blysk.ds.pg.gda.pl (macro@blysk.ds.pg.gda.pl [153.19.208.6]) by piorun.ds.pg.gda.pl (8.12.11/8.12.11) with ESMTP id i94MvC1V014432; Tue, 5 Oct 2004 00:57:12 +0200 Date: Mon, 4 Oct 2004 23:56:59 +0100 (BST) From: "Maciej W. Rozycki" To: netdev@oss.sgi.com Cc: linux-kernel@vger.kernel.org Subject: [PATCH RESEND] 2.[46]: Set ARP hw type correctly for BOOTP over FDDI Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at pollux.ds.pg.gda.pl X-archive-position: 9903 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: macro@linux-mips.org Precedence: bulk X-list: netdev Content-Length: 1038 Lines: 26 Hello, Using the Ethernet ARP hw type for FDDI networks is mandated by RFC 1390 (STD 36) and that code is already used by Linux elsewhere, but not for BOOTP requests sent for IPv4 autoconfiguration. Here is a patch for both 2.4 and 2.6 that fixes the problem for me. Please apply. Applies both to 2.4.27 and to 2.6.8.1. Maciej Signed-off-by: Maciej W. Rozycki patch-ipconfig-fddi-0 diff -up --recursive --new-file linux.macro/net/ipv4/ipconfig.c linux/net/ipv4/ipconfig.c --- linux.macro/net/ipv4/ipconfig.c 2003-11-17 04:00:34.000000000 +0000 +++ linux/net/ipv4/ipconfig.c 2004-08-12 00:03:32.000000000 +0000 @@ -689,6 +689,8 @@ static void __init ic_bootp_send_if(stru b->htype = dev->type; else if (dev->type == ARPHRD_IEEE802_TR) /* fix for token ring */ b->htype = ARPHRD_IEEE802; + else if (dev->type == ARPHRD_FDDI) + b->htype = ARPHRD_ETHER; else { printk("Unknown ARP type 0x%04x for device %s\n", dev->type, dev->name); b->htype = dev->type; /* can cause undefined behavior */ From macro@linux-mips.org Mon Oct 4 15:57:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 15:57:28 -0700 (PDT) Received: from pollux.ds.pg.gda.pl (postfix@pollux.ds.pg.gda.pl [153.19.208.7]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94MvMnk006376 for ; Mon, 4 Oct 2004 15:57:23 -0700 Received: from localhost (localhost [127.0.0.1]) by pollux.ds.pg.gda.pl (Postfix) with ESMTP id B5D1AE1CAA; Tue, 5 Oct 2004 00:57:03 +0200 (CEST) Received: from pollux.ds.pg.gda.pl ([127.0.0.1]) by localhost (pollux [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 15521-02; Tue, 5 Oct 2004 00:57:03 +0200 (CEST) Received: from piorun.ds.pg.gda.pl (piorun.ds.pg.gda.pl [153.19.208.8]) by pollux.ds.pg.gda.pl (Postfix) with ESMTP id 758FAF596D; Tue, 5 Oct 2004 00:57:03 +0200 (CEST) Received: from blysk.ds.pg.gda.pl (macro@blysk.ds.pg.gda.pl [153.19.208.6]) by piorun.ds.pg.gda.pl (8.12.11/8.12.11) with ESMTP id i94MvMqC014436; Tue, 5 Oct 2004 00:57:22 +0200 Date: Mon, 4 Oct 2004 23:57:09 +0100 (BST) From: "Maciej W. Rozycki" To: netdev@oss.sgi.com Cc: linux-kernel@vger.kernel.org Subject: [PATCH RESEND] 2.[46]: Permit the official ARP hw type in SIOCSARP for FDDI Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at pollux.ds.pg.gda.pl X-archive-position: 9904 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: macro@linux-mips.org Precedence: bulk X-list: netdev Content-Length: 1820 Lines: 52 Hello, The SIOCSARP handling code currently rejects attempts of setting an arp entry for FDDI devices if the Ethernet ARP hw type is specified in the request. Using this ARP hw type is mandated by RFC 1390 (STD 36) and I think it's reasonable to accept SIOCSARP requests using this type, especially as it already works this way for ARP packets received from the network. One reason for this is bootpd setting explicit ARP cache entries using the hw type that is also sent to a client. Here is a patch for both 2.4 and 2.6 that fixes the problem for me. For consistency with code used for ARP packets, it makes both Ethernet and IEEE802 ARP hw type acceptable for FDDI interfaces. Please apply. Applies both to 2.4.27 and to 2.6.8.1. Maciej Signed-off-by: Maciej W. Rozycki patch-arp-fddi-1 diff -up --recursive --new-file linux.macro/net/ipv4/arp.c linux/net/ipv4/arp.c --- linux.macro/net/ipv4/arp.c 2004-04-17 02:59:12.000000000 +0000 +++ linux/net/ipv4/arp.c 2004-08-14 15:33:12.000000000 +0000 @@ -1024,8 +1024,26 @@ int arp_req_set(struct arpreq *r, struct if (!dev) return -EINVAL; } - if (r->arp_ha.sa_family != dev->type) - return -EINVAL; + switch (dev->type) { +#ifdef CONFIG_FDDI + case ARPHRD_FDDI: + /* + * According to RFC 1390, FDDI devices should accept ARP + * hardware types of 1 (Ethernet). However, to be more + * robust, we'll accept hardware types of either 1 (Ethernet) + * or 6 (IEEE 802.2). + */ + if (r->arp_ha.sa_family != ARPHRD_FDDI && + r->arp_ha.sa_family != ARPHRD_ETHER && + r->arp_ha.sa_family != ARPHRD_IEEE802) + return -EINVAL; + break; +#endif + default: + if (r->arp_ha.sa_family != dev->type) + return -EINVAL; + break; + } neigh = __neigh_lookup_errno(&arp_tbl, &ip, dev); err = PTR_ERR(neigh); From hadi@cyberus.ca Mon Oct 4 16:48:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 16:48:07 -0700 (PDT) Received: from mx02.cybersurf.com (mx02.cybersurf.com [209.197.145.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i94Nm03W012817 for ; Mon, 4 Oct 2004 16:48:00 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1CEcYR-0006yM-3A for netdev@oss.sgi.com; Mon, 04 Oct 2004 19:47:43 -0400 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CEcYN-0002Hz-98; Mon, 04 Oct 2004 19:47:39 -0400 Subject: Re: [PATCH] PKT_SCHED: Make rate estimator work for all platforms From: jamal Reply-To: hadi@cyberus.ca To: Thomas Graf Cc: "David S. Miller" , netdev@oss.sgi.com In-Reply-To: <20041004211152.GF15898@postel.suug.ch> References: <20041004211152.GF15898@postel.suug.ch> Content-Type: text/plain Organization: jamalopolous Message-Id: <1096933654.2163.1.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 04 Oct 2004 19:47:34 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 9905 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev Content-Length: 1702 Lines: 55 Looking good. Dave, Please apply all the patches (earlier 3 + this one) that Thomas posted. cheers, jamal On Mon, 2004-10-04 at 17:11, Thomas Graf wrote: > Fixes the existing rate estimator to compile cleanly on all platforms > and avoids carrying on the variance on platforms with HZ%4 != 0. > > Patch also applies to 2.4 with some fuzz. > > Signed-off-by: Thomas Graf > > --- linux-2.6.9-rc3-bk4.orig/net/sched/estimator.c 2004-10-04 22:41:26.000000000 +0200 > +++ linux-2.6.9-rc3-bk4/net/sched/estimator.c 2004-10-04 22:53:54.000000000 +0200 > @@ -66,15 +66,11 @@ > > * Minimal interval is HZ/4=250msec (it is the greatest common divisor > for HZ=100 and HZ=1024 8)), maximal interval > - is (HZ/4)*2^EST_MAX_INTERVAL = 8sec. Shorter intervals > + is (HZ*2^EST_MAX_INTERVAL)/4 = 8sec. Shorter intervals > are too expensive, longer ones can be implemented > at user level painlessly. > */ > > -#if (HZ%4) != 0 > -#error Bad HZ value. > -#endif > - > #define EST_MAX_INTERVAL 5 > > struct qdisc_estimator > @@ -128,7 +124,7 @@ > spin_unlock(e->stats_lock); > } > > - mod_timer(&elist[idx].timer, jiffies + ((HZ/4)< + mod_timer(&elist[idx].timer, jiffies + ((HZ< read_unlock(&est_lock); > } > > @@ -161,7 +157,7 @@ > if (est->next == NULL) { > init_timer(&elist[est->interval].timer); > elist[est->interval].timer.data = est->interval; > - elist[est->interval].timer.expires = jiffies + ((HZ/4)<interval); > + elist[est->interval].timer.expires = jiffies + ((HZ<interval)/4); > elist[est->interval].timer.function = est_timer; > add_timer(&elist[est->interval].timer); > } > From shemminger@osdl.org Mon Oct 4 17:11:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 17:11:41 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i950BZ4R015522 for ; Mon, 4 Oct 2004 17:11:35 -0700 Received: from [172.20.1.60] (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i950B3f29198; Mon, 4 Oct 2004 17:11:03 -0700 Subject: Hang when testing with AMD64 with Tg3 From: Stephen Hemminger To: Andi Kleen , davem@redhat.com Cc: netdev@oss.sgi.com Content-Type: text/plain Organization: Open Source Development Lab Date: Mon, 04 Oct 2004 17:11:11 -0700 Message-Id: <1096935071.22155.6.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.0 Content-Transfer-Encoding: 7bit X-archive-position: 9906 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 Content-Length: 994 Lines: 16 Doing simple iperf test on new opteron with tg3 against existing Xeon system. I am seeing something wierd, the connection hangs right away. Is this a TSO bug. Sender: BK latest (2.6.9-rc3) Tg3 (XX.YY.250.3) Receiver: BK + netdev(jeffm) + dave's latest e100 (XX.YY.1.73) Both machines are directly connected with a netgear 100mbit switch. 16:59:30.726551 IP XX.YY.250.3.32948 > XX.YY.1.73.5001: S 4113740578:4113740578(0) win 5840 16:59:30.726574 IP XX.YY.1.73.5001 > XX.YY.250.3.32948: S 4117129705:4117129705(0) ack 4113740579 win 5792 16:59:30.726578 IP XX.YY.250.3.32948 > XX.YY.1.73.5001: . ack 1 win 1460 16:59:30.726604 IP XX.YY.250.3.32948 > XX.YY.1.73.5001: P 1:25(24) ack 1 win 1460 16:59:30.726641 IP XX.YY.1.73.5001 > XX.YY.250.3.32948: . ack 25 win 1448 From ak@suse.de Mon Oct 4 17:15:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 17:15:52 -0700 (PDT) Received: from Cantor.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i950FlTA016255 for ; Mon, 4 Oct 2004 17:15:48 -0700 Received: from hermes.suse.de (hermes-ext.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 5C6E3CD91C7; Tue, 5 Oct 2004 02:15:29 +0200 (CEST) Date: Tue, 5 Oct 2004 02:15:27 +0200 From: Andi Kleen To: Stephen Hemminger Cc: Andi Kleen , davem@redhat.com, netdev@oss.sgi.com Subject: Re: Hang when testing with AMD64 with Tg3 Message-ID: <20041005001527.GB13106@wotan.suse.de> References: <1096935071.22155.6.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1096935071.22155.6.camel@localhost.localdomain> X-archive-position: 9907 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 Content-Length: 556 Lines: 17 On Mon, Oct 04, 2004 at 05:11:11PM -0700, Stephen Hemminger wrote: > Doing simple iperf test on new opteron with tg3 against existing Xeon > system. I am seeing something wierd, the connection hangs right away. > Is this a TSO bug. > > Sender: BK latest (2.6.9-rc3) Tg3 (XX.YY.250.3) > Receiver: BK + netdev(jeffm) + dave's latest e100 (XX.YY.1.73) > > Both machines are directly connected with a netgear 100mbit switch. I don't see things like this on my boxes with rc3, also with tg3s. Of what nature is the hang? Does the machine crash? -Andi From davem@davemloft.net Mon Oct 4 17:30:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 17:30:13 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i950U8o8017973 for ; Mon, 4 Oct 2004 17:30:08 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEdDA-0000GR-00; Mon, 04 Oct 2004 17:29:48 -0700 Date: Mon, 4 Oct 2004 17:29:48 -0700 From: "David S. Miller" To: Andi Kleen Cc: shemminger@osdl.org, ak@suse.de, davem@redhat.com, netdev@oss.sgi.com Subject: Re: Hang when testing with AMD64 with Tg3 Message-Id: <20041004172948.2023a75e.davem@davemloft.net> In-Reply-To: <20041005001527.GB13106@wotan.suse.de> References: <1096935071.22155.6.camel@localhost.localdomain> <20041005001527.GB13106@wotan.suse.de> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9908 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 229 Lines: 8 On Tue, 5 Oct 2004 02:15:27 +0200 Andi Kleen wrote: > I don't see things like this on my boxes with rc3, also with tg3s. > > Of what nature is the hang? Does the machine crash? And what tg3 revisions do you have? From davem@davemloft.net Mon Oct 4 17:38:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 17:38:26 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i950cKuC018756 for ; Mon, 4 Oct 2004 17:38:20 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEdL7-0000HP-00; Mon, 04 Oct 2004 17:38:01 -0700 Date: Mon, 4 Oct 2004 17:38:01 -0700 From: "David S. Miller" To: hadi@cyberus.ca Cc: tgraf@suug.ch, netdev@oss.sgi.com Subject: Re: [PATCH] PKT_SCHED: Make rate estimator work for all platforms Message-Id: <20041004173801.2157c71b.davem@davemloft.net> In-Reply-To: <1096933654.2163.1.camel@jzny.localdomain> References: <20041004211152.GF15898@postel.suug.ch> <1096933654.2163.1.camel@jzny.localdomain> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9909 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 192 Lines: 9 On 04 Oct 2004 19:47:34 -0400 jamal wrote: > Dave, Please apply all the patches (earlier 3 + this one) that Thomas > posted. Will do after I review it a bit more. Thanks. From ak@suse.de Mon Oct 4 17:46:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 17:46:20 -0700 (PDT) Received: from Cantor.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i950kD67019465 for ; Mon, 4 Oct 2004 17:46:14 -0700 Received: from hermes.suse.de (hermes-ext.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 A67C1CD8B21; Tue, 5 Oct 2004 02:41:35 +0200 (CEST) Date: Tue, 5 Oct 2004 02:41:35 +0200 From: Andi Kleen To: "David S. Miller" Cc: Andi Kleen , shemminger@osdl.org, davem@redhat.com, netdev@oss.sgi.com Subject: Re: Hang when testing with AMD64 with Tg3 Message-ID: <20041005004135.GE13106@wotan.suse.de> References: <1096935071.22155.6.camel@localhost.localdomain> <20041005001527.GB13106@wotan.suse.de> <20041004172948.2023a75e.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041004172948.2023a75e.davem@davemloft.net> X-archive-position: 9910 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 Content-Length: 333 Lines: 14 On Mon, Oct 04, 2004 at 05:29:48PM -0700, David S. Miller wrote: > On Tue, 5 Oct 2004 02:15:27 +0200 > Andi Kleen wrote: > > > I don't see things like this on my boxes with rc3, also with tg3s. > > > > Of what nature is the hang? Does the machine crash? > > And what tg3 revisions do you have? Mostly 5701s. -Andi From shemminger@osdl.org Mon Oct 4 17:48:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 17:48:16 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i950mBCG019877 for ; Mon, 4 Oct 2004 17:48:12 -0700 Received: from [172.20.1.60] (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i950lef05329; Mon, 4 Oct 2004 17:47:40 -0700 Subject: Re: Hang when testing with AMD64 with Tg3 From: Stephen Hemminger To: "David S. Miller" Cc: Andi Kleen , davem@redhat.com, netdev@oss.sgi.com In-Reply-To: <20041004172948.2023a75e.davem@davemloft.net> References: <1096935071.22155.6.camel@localhost.localdomain> <20041005001527.GB13106@wotan.suse.de> <20041004172948.2023a75e.davem@davemloft.net> Content-Type: text/plain Organization: Open Source Development Lab Date: Mon, 04 Oct 2004 17:47:48 -0700 Message-Id: <1096937268.22155.11.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.0 Content-Transfer-Encoding: 7bit X-archive-position: 9911 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 Content-Length: 989 Lines: 35 On Mon, 2004-10-04 at 17:29 -0700, David S. Miller wrote: > On Tue, 5 Oct 2004 02:15:27 +0200 > Andi Kleen wrote: > > > I don't see things like this on my boxes with rc3, also with tg3s. > > > > Of what nature is the hang? Does the machine crash? > And what tg3 revisions do you have? # ethtool -i eth0 driver: tg3 version: 3.10 firmware-version: bus-info: 0000:03:02.0 # ethtool -k eth0 Offload parameters for eth0: rx-checksumming: on tx-checksumming: on scatter-gather: on tcp segmentation offload: off # lspci -v 0000:03:02.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5703 Gigabit Ethernet (rev 02) Subsystem: IBM: Unknown device 026f Flags: bus master, 66Mhz, medium devsel, latency 64, IRQ 28 Memory at c0200000 (64-bit, non-prefetchable) Capabilities: [40] PCI-X non-bridge device. Capabilities: [48] Power Management version 2 Capabilities: [50] Vital Product Data Capabilities: [58] Message Signalled Interrupts: 64bit+ Queue=0/3 Enable- From shemminger@osdl.org Mon Oct 4 18:00:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 18:01:03 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9510xf5020829 for ; Mon, 4 Oct 2004 18:00:59 -0700 Received: from [172.20.1.60] (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9510Sf07781; Mon, 4 Oct 2004 18:00:28 -0700 Subject: Re: Hang when testing with AMD64 with Tg3 From: Stephen Hemminger To: Andi Kleen Cc: davem@redhat.com, netdev@oss.sgi.com In-Reply-To: <20041005001527.GB13106@wotan.suse.de> References: <1096935071.22155.6.camel@localhost.localdomain> <20041005001527.GB13106@wotan.suse.de> Content-Type: text/plain Organization: Open Source Development Lab Date: Mon, 04 Oct 2004 18:00:36 -0700 Message-Id: <1096938036.22947.1.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.0 Content-Transfer-Encoding: 7bit X-archive-position: 9912 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 Content-Length: 832 Lines: 22 On Tue, 2004-10-05 at 02:15 +0200, Andi Kleen wrote: > On Mon, Oct 04, 2004 at 05:11:11PM -0700, Stephen Hemminger wrote: > > Doing simple iperf test on new opteron with tg3 against existing Xeon > > system. I am seeing something wierd, the connection hangs right away. > > Is this a TSO bug. > > > > Sender: BK latest (2.6.9-rc3) Tg3 (XX.YY.250.3) > > Receiver: BK + netdev(jeffm) + dave's latest e100 (XX.YY.1.73) > > > > Both machines are directly connected with a netgear 100mbit switch. > > > I don't see things like this on my boxes with rc3, also with tg3s. > > Of what nature is the hang? Does the machine crash? The sender just doesn't send any more data??? I can reproduce it every time and it even happens with stock Suse 9.1 kernel (2.6.4-XX) Will try a different ether card tommorrow to see if it is there. From shemminger@osdl.org Mon Oct 4 18:05:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 04 Oct 2004 18:05:32 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9515RRd021252 for ; Mon, 4 Oct 2004 18:05:27 -0700 Received: from [172.20.1.60] (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i95150f08326; Mon, 4 Oct 2004 18:05:00 -0700 Subject: Re: Hang when testing with AMD64 with Tg3 From: Stephen Hemminger To: Andi Kleen Cc: davem@redhat.com, netdev@oss.sgi.com In-Reply-To: <20041005001527.GB13106@wotan.suse.de> References: <1096935071.22155.6.camel@localhost.localdomain> <20041005001527.GB13106@wotan.suse.de> Content-Type: text/plain Organization: Open Source Development Lab Date: Mon, 04 Oct 2004 18:05:08 -0700 Message-Id: <1096938308.22947.3.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.0 Content-Transfer-Encoding: 7bit X-archive-position: 9913 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 Content-Length: 629 Lines: 15 On Tue, 2004-10-05 at 02:15 +0200, Andi Kleen wrote: > On Mon, Oct 04, 2004 at 05:11:11PM -0700, Stephen Hemminger wrote: > > Doing simple iperf test on new opteron with tg3 against existing Xeon > > system. I am seeing something wierd, the connection hangs right away. > > Is this a TSO bug. > > > > Sender: BK latest (2.6.9-rc3) Tg3 (XX.YY.250.3) > > Receiver: BK + netdev(jeffm) + dave's latest e100 (XX.YY.1.73) > > > > Both machines are directly connected with a netgear 100mbit switch. > IT ISN'T A NETWORK PROBLEM. The problem is that iperf uses posix pthread mutex's to sychronize and it looks like a futex bug. From gnb@melbourne.sgi.com Tue Oct 5 03:01:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 03:02:00 -0700 (PDT) Received: from larry.melbourne.sgi.com (mverd138.asia.info.net [61.14.31.138]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i95A1p3j010438 for ; Tue, 5 Oct 2004 03:01:52 -0700 Received: from hole.melbourne.sgi.com (hole.melbourne.sgi.com [134.14.55.176]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id UAA04185; Tue, 5 Oct 2004 20:01:31 +1000 Received: by hole.melbourne.sgi.com (Postfix, from userid 16345) id EBB631C0187A0; Tue, 5 Oct 2004 20:15:32 +1000 (EST) Date: Tue, 5 Oct 2004 20:15:32 +1000 From: Greg Banks To: "David S. Miller" Cc: Linux Network Development List Subject: Race between neigh_timer_handler and neigh_event_send Message-ID: <20041005101532.GA935@sgi.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="k1lZvvs/B4yU6o8G" Content-Disposition: inline User-Agent: Mutt/1.5.5.1i X-archive-position: 9914 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: gnb@sgi.com Precedence: bulk X-list: netdev Content-Length: 5812 Lines: 125 --k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline G'day, I was running a UDP load test from 4 CPUs though a single NIC to a single peer, and encountered an oops... Unable to handle kernel NULL pointer dereference (address 000000000000000c) ttcp[29920]: Oops 11012296146944 [1] Modules linked in: Pid: 29920, CPU 3, comm: ttcp psr : 0000121008026018 ifs : 8000000000000593 ip : [] Not tainted ip is at arp_solicit+0x131/0x380 unat: 0000000000000000 pfs : 0000000000000593 rsc : 0000000000000003 rnat: 0000000000064400 bsps: 000000000007cf90 pr : 00046918155aa625 ldrs: 0000000000000000 ccv : 0000000080000000 fpsr: 0009804c0270033f csd : 0000000000000000 ssd : 0000000000000000 b0 : a000000100770110 b6 : a000000100003320 b7 : a00000010078eac0 f6 : 1003e0000000000000140 f7 : 1003e006666a6565db265 f8 : 1003e0000000000019000 f9 : 1003e0000000000000140 f10 : 1003e00000000064003e7 f11 : 1003e00000000000005be r1 : a000000100da8a00 r2 : a000000100bae580 r3 : 0000000000000000 r8 : 0000000000000002 r9 : 00000000f801a8c0 r10 : 00000000000000fe r11 : 0000000000000000 r12 : e00000304070f910 r13 : e000003040708000 r14 : 0000000000000001 r15 : 0000000000000000 r16 : 0000000000000000 r17 : e00000b07bc08d24 r18 : e00000b07bc08d98 r19 : 000000000000000c r20 : 0000000000000000 r21 : e00000300f99ccfa r22 : 0000000000000002 r23 : e00000304070f918 r24 : e00000304070f912 r25 : 0000000000000002 r26 : e00000b07bc08d24 r27 : 0000000000000000 r28 : e00000b07bc08d2c r29 : 0000000000000001 r30 : 0000000000000000 r31 : e00000b07bc08d90 Call Trace: [] show_stack+0x80/0xa0 sp=e00000304070f4d0 bsp=e000003040709540 [] show_regs+0x850/0x860 sp=e00000304070f6a0 bsp=e0000030407094e0 [] die+0x170/0x220 sp=e00000304070f6b0 bsp=e0000030407094a8 [] ia64_do_page_fault+0x380/0x9c0 sp=e00000304070f6b0 bsp=e000003040709448 [] ia64_leave_kernel+0x0/0x260 sp=e00000304070f740 bsp=e000003040709448 [] arp_solicit+0x130/0x380 sp=e00000304070f910 bsp=e0000030407093a8 [] neigh_timer_handler+0x490/0x6a0 sp=e00000304070f910 bsp=e000003040709350 [] run_timer_softirq+0x240/0x3a0 sp=e00000304070f920 bsp=e0000030407092e0 [] __do_softirq+0x250/0x2a0 sp=e00000304070f940 bsp=e000003040709258 [] do_softirq+0x80/0xe0 sp=e00000304070f940 bsp=e000003040709200 [] ia64_handle_irq+0x190/0x1c0 sp=e00000304070f940 bsp=e0000030407091c0 [] ia64_leave_kernel+0x0/0x260 sp=e00000304070f940 bsp=e0000030407091c0 [] ip_push_pending_frames+0x850/0xa60 sp=e00000304070fb10 bsp=e000003040709138 [] udp_push_pending_frames+0x2b0/0x440 sp=e00000304070fb20 bsp=e0000030407090d8 [] udp_sendmsg+0x690/0xe60 sp=e00000304070fb20 bsp=e000003040709008 [] inet_sendmsg+0xa0/0xe0 sp=e00000304070fbe0 bsp=e000003040708fc8 [] sock_sendmsg+0x170/0x1c0 sp=e00000304070fbe0 bsp=e000003040708f98 [] sys_sendto+0x170/0x200 sp=e00000304070fd50 bsp=e000003040708f08 [] ia64_ret_from_syscall+0x0/0x20 sp=e00000304070fe30 bsp=e000003040708f08 [] 0xa000000000004000 sp=e000003040710000 bsp=e000003040708f08 It turned out that arp_solicit() was dereferencing bogus pointers from inside an sk_buff, which had been freed by neigh_event_send() to keep neigh->arp_queue within its maximum length of 3, in between neigh_timer_handler() dropping neigh->lock and calling arp_solicit(). The attached patch appears to fix it; tracing indicates the race has occurred 3 times in my current test without oopsing. Greg. -- Greg Banks, R&D Software Engineer, SGI Australian Software Group. I don't speak for SGI. --k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=gnb-neigh-race Fix a race between neigh_timer_handler() calling down to arp_solicit() with an sk_buff peeked from the head of the neigh->arp_queue, and neigh_event_send() unqueuing and freeing the head of the same queue because it's reached the maximum length of 3, by taking an extra sk_buff reference while holding neigh->lock. Signed-off-by: Greg Banks Index: linux/net/core/neighbour.c =================================================================== --- linux.orig/net/core/neighbour.c 2004-10-04 14:36:05.%N +1000 +++ linux/net/core/neighbour.c 2004-10-05 19:31:00.%N +1000 @@ -805,9 +805,15 @@ static void neigh_timer_handler(unsigned add_timer(&neigh->timer); } if (neigh->nud_state & (NUD_INCOMPLETE | NUD_PROBE)) { + struct sk_buff *skb = skb_peek(&neigh->arp_queue); + /* keep skb alive even if arp_queue overflows */ + if (skb) + skb_get(skb); write_unlock(&neigh->lock); - neigh->ops->solicit(neigh, skb_peek(&neigh->arp_queue)); + neigh->ops->solicit(neigh, skb); atomic_inc(&neigh->probes); + if (skb) + kfree_skb(skb); } else { out: write_unlock(&neigh->lock); --k1lZvvs/B4yU6o8G-- From klassert@mathematik.tu-chemnitz.de Tue Oct 5 06:42:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 06:42:13 -0700 (PDT) Received: from lana.hrz.tu-chemnitz.de (lana.hrz.tu-chemnitz.de [134.109.132.3]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95Dg2ij020055 for ; Tue, 5 Oct 2004 06:42:06 -0700 Received: from gareth.mathematik.tu-chemnitz.de ([134.109.40.156]) by lana.hrz.tu-chemnitz.de with esmtp (Exim 4.41) id 1CEpZY-0003k1-9M; Tue, 05 Oct 2004 15:41:44 +0200 Received: by gareth.mathematik.tu-chemnitz.de (Postfix, from userid 274) id DF1B4831B; Tue, 5 Oct 2004 15:41:43 +0200 (CEST) Date: Tue, 5 Oct 2004 15:41:43 +0200 From: Steffen Klassert To: akpm@osdl.org Cc: jgarzik@pobox.com, netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc3-mm2] 3c59x: support more ethtool_ops Message-ID: <20041005134143.GA4829@gareth.mathematik.tu-chemnitz.de> Mail-Followup-To: akpm@osdl.org, jgarzik@pobox.com, netdev@oss.sgi.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-Scan-Signature: 7deb213997a86e2946695138736aa629 X-archive-position: 9915 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: klassert@mathematik.tu-chemnitz.de Precedence: bulk X-list: netdev Content-Length: 3630 Lines: 133 With this the driver supports the ethtool_ops {get,set}_msglvl, {get,set}_settings, get_stats, get_link, and nway_reset. Patch is tested with a 3c905-TX and a3c905B-TX NIC. Signed-off-by: Steffen Klassert --- vanilla-2.6.9-rc3-mm2/drivers/net/3c59x.c Mon Oct 4 09:52:58 2004 +++ linux-2.6.9-rc3-mm2/drivers/net/3c59x.c Tue Oct 5 11:54:02 2004 @@ -881,6 +881,22 @@ { "Default", 0, 0xFF, XCVR_10baseT, 10000}, }; +static struct { + const char str[ETH_GSTRING_LEN]; +} ethtool_stats_keys[] = { + { "rx_packets" }, + { "tx_packets" }, + { "rx_bytes" }, + { "tx_bytes" }, + { "collisions" }, + { "tx_carrier_errors" }, + { "tx_heartbeat_errors" }, + { "tx_window_errors" }, +}; + +/* number of ETHTOOL_GSTATS u64's */ +#define VORTEX_NUM_STATS 8 + static int vortex_probe1(struct device *gendev, long ioaddr, int irq, int chip_idx, int card_idx); static void vortex_up(struct net_device *dev); @@ -2874,6 +2890,85 @@ return; } +static int vortex_nway_reset(struct net_device *dev) +{ + struct vortex_private *vp = netdev_priv(dev); + long ioaddr = dev->base_addr; + EL3WINDOW(4); + return mii_nway_restart(&vp->mii); +} + +static u32 vortex_get_link(struct net_device *dev) +{ + struct vortex_private *vp = netdev_priv(dev); + long ioaddr = dev->base_addr; + EL3WINDOW(4); + return mii_link_ok(&vp->mii); +} + +static int vortex_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) +{ + struct vortex_private *vp = netdev_priv(dev); + long ioaddr = dev->base_addr; + EL3WINDOW(4); + return mii_ethtool_gset(&vp->mii, cmd); +} + +static int vortex_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) +{ + struct vortex_private *vp = netdev_priv(dev); + long ioaddr = dev->base_addr; + EL3WINDOW(4); + return mii_ethtool_sset(&vp->mii, cmd); +} + +static u32 vortex_get_msglevel(struct net_device *dev) +{ + return vortex_debug; +} + +static void vortex_set_msglevel(struct net_device *dev, u32 dbg) +{ + vortex_debug = dbg; +} + +static int vortex_get_stats_count(struct net_device *dev) +{ + return VORTEX_NUM_STATS; +} + +static void vortex_get_ethtool_stats(struct net_device *dev, + struct ethtool_stats *stats, u64 *data) +{ + struct vortex_private *vp = netdev_priv(dev); + unsigned long flags; + + spin_lock_irqsave (&vp->lock, flags); + update_stats(dev->base_addr, dev); + spin_unlock_irqrestore (&vp->lock, flags); + + data[0] = vp->stats.rx_packets; + data[1] = vp->stats.tx_packets; + data[2] = vp->stats.rx_bytes; + data[3] = vp->stats.tx_bytes; + data[4] = vp->stats.collisions; + data[5] = vp->stats.tx_carrier_errors; + data[6] = vp->stats.tx_heartbeat_errors; + data[7] = vp->stats.tx_window_errors; +} + + +static void vortex_get_strings(struct net_device *dev, u32 stringset, u8 *data) +{ + switch (stringset) { + case ETH_SS_STATS: + memcpy(data, ðtool_stats_keys, sizeof(ethtool_stats_keys)); + break; + default: + WARN_ON(1); + break; + } +} static void vortex_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) @@ -2895,6 +2990,15 @@ static struct ethtool_ops vortex_ethtool_ops = { .get_drvinfo = vortex_get_drvinfo, + .get_strings = vortex_get_strings, + .get_msglevel = vortex_get_msglevel, + .set_msglevel = vortex_set_msglevel, + .get_ethtool_stats = vortex_get_ethtool_stats, + .get_stats_count = vortex_get_stats_count, + .get_settings = vortex_get_settings, + .set_settings = vortex_set_settings, + .get_link = vortex_get_link, + .nway_reset = vortex_nway_reset, }; #ifdef CONFIG_PCI From jgarzik@pobox.com Tue Oct 5 07:17:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 07:17:49 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95EHha5021648 for ; Tue, 5 Oct 2004 07:17:44 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CEq8A-0004Rm-7Z; Tue, 05 Oct 2004 15:17:30 +0100 Message-ID: <4162ACED.10303@pobox.com> Date: Tue, 05 Oct 2004 10:17:17 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Steffen Klassert , akpm@osdl.org CC: netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc3-mm2] 3c59x: support more ethtool_ops References: <20041005134143.GA4829@gareth.mathematik.tu-chemnitz.de> In-Reply-To: <20041005134143.GA4829@gareth.mathematik.tu-chemnitz.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 9916 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: 1171 Lines: 43 Steffen Klassert wrote: > +static int vortex_nway_reset(struct net_device *dev) > +{ > + struct vortex_private *vp = netdev_priv(dev); > + long ioaddr = dev->base_addr; > + EL3WINDOW(4); > + return mii_nway_restart(&vp->mii); > +} > + > +static u32 vortex_get_link(struct net_device *dev) > +{ > + struct vortex_private *vp = netdev_priv(dev); > + long ioaddr = dev->base_addr; > + EL3WINDOW(4); > + return mii_link_ok(&vp->mii); > +} 3c59x should properly use netif_carrier_{on,off}, at which point you can eliminate vortex_get_link in favor of generic ethtool_op_get_link > +static int vortex_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) > +{ > + struct vortex_private *vp = netdev_priv(dev); > + long ioaddr = dev->base_addr; > + EL3WINDOW(4); > + return mii_ethtool_gset(&vp->mii, cmd); > +} > + > +static int vortex_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) > +{ > + struct vortex_private *vp = netdev_priv(dev); > + long ioaddr = dev->base_addr; > + EL3WINDOW(4); > + return mii_ethtool_sset(&vp->mii, cmd); > +} I think that this and the other MII patch should do some amount of locking, like the other drivers. Jeff From niv@us.ibm.com Tue Oct 5 07:59:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 07:59:35 -0700 (PDT) Received: from e3.ny.us.ibm.com (e3.ny.us.ibm.com [32.97.182.103]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95ExNa2029953 for ; Tue, 5 Oct 2004 07:59:29 -0700 Received: from northrelay02.pok.ibm.com (northrelay02.pok.ibm.com [9.56.224.150]) by e3.ny.us.ibm.com (8.12.10/8.12.9) with ESMTP id i95Ex4ZI688370; Tue, 5 Oct 2004 10:59:04 -0400 Received: from us.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by northrelay02.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i95F0HH6072376; Tue, 5 Oct 2004 11:00:18 -0400 Message-ID: <4162B6B2.6030208@us.ibm.com> Date: Tue, 05 Oct 2004 07:58:58 -0700 From: Nivedita Singhvi User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4.1) Gecko/20031008 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephen Hemminger CC: Andi Kleen , davem@redhat.com, netdev@oss.sgi.com Subject: Re: Hang when testing with AMD64 with Tg3 References: <1096935071.22155.6.camel@localhost.localdomain> <20041005001527.GB13106@wotan.suse.de> <1096938308.22947.3.camel@localhost.localdomain> In-Reply-To: <1096938308.22947.3.camel@localhost.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 9917 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: niv@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 863 Lines: 28 Stephen Hemminger wrote: > On Tue, 2004-10-05 at 02:15 +0200, Andi Kleen wrote: > >>On Mon, Oct 04, 2004 at 05:11:11PM -0700, Stephen Hemminger wrote: >> >>>Doing simple iperf test on new opteron with tg3 against existing Xeon >>>system. I am seeing something wierd, the connection hangs right away. >>>Is this a TSO bug. >>> >>>Sender: BK latest (2.6.9-rc3) Tg3 (XX.YY.250.3) >>>Receiver: BK + netdev(jeffm) + dave's latest e100 (XX.YY.1.73) >>> >>>Both machines are directly connected with a netgear 100mbit switch. >> > > IT ISN'T A NETWORK PROBLEM. The problem is that iperf uses posix > pthread mutex's to sychronize and it looks like a futex bug. might not be a futex bug - check to see if iperf does any writes, fflushes, etc, in a signal handler - i.e. that its signal handling is thread-safe. glibc now makes it a fatal bug.. thanks, Nivedita From klassert@mathematik.tu-chemnitz.de Tue Oct 5 09:03:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 09:03:08 -0700 (PDT) Received: from john.hrz.tu-chemnitz.de (john.hrz.tu-chemnitz.de [134.109.132.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95G32fr001918 for ; Tue, 5 Oct 2004 09:03:03 -0700 Received: from gareth.mathematik.tu-chemnitz.de ([134.109.40.156]) by john.hrz.tu-chemnitz.de with esmtp (Exim 4.41) id 1CErm3-0002cI-Co; Tue, 05 Oct 2004 18:02:47 +0200 Received: by gareth.mathematik.tu-chemnitz.de (Postfix, from userid 274) id 3B5498DC6; Tue, 5 Oct 2004 18:02:47 +0200 (CEST) Date: Tue, 5 Oct 2004 18:02:47 +0200 From: Steffen Klassert To: Jeff Garzik Cc: akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc3-mm2] 3c59x: support more ethtool_ops Message-ID: <20041005160247.GA5405@gareth.mathematik.tu-chemnitz.de> Mail-Followup-To: Jeff Garzik , akpm@osdl.org, netdev@oss.sgi.com References: <20041005134143.GA4829@gareth.mathematik.tu-chemnitz.de> <4162ACED.10303@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4162ACED.10303@pobox.com> User-Agent: Mutt/1.4.2.1i X-Scan-Signature: d7bb2b01975254b8f41cda1475e3c4ea X-archive-position: 9918 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: klassert@mathematik.tu-chemnitz.de Precedence: bulk X-list: netdev Content-Length: 1086 Lines: 33 On Tue, Oct 05, 2004 at 10:17:17AM -0400 or thereabouts, Jeff Garzik wrote: > >+static u32 vortex_get_link(struct net_device *dev) > >+{ > >+ struct vortex_private *vp = netdev_priv(dev); > >+ long ioaddr = dev->base_addr; > >+ EL3WINDOW(4); > >+ return mii_link_ok(&vp->mii); > >+} > > 3c59x should properly use netif_carrier_{on,off}, at which point you can > eliminate vortex_get_link in favor of generic ethtool_op_get_link I tried to use ethtool_op_get_link, but then ethtool reports Link detected: yes It does not matter wether the cable is connected or not. > >+ > >+static int vortex_set_settings(struct net_device *dev, struct ethtool_cmd > >*cmd) > >+{ > >+ struct vortex_private *vp = netdev_priv(dev); > >+ long ioaddr = dev->base_addr; > >+ EL3WINDOW(4); > >+ return mii_ethtool_sset(&vp->mii, cmd); > >+} > > I think that this and the other MII patch should do some amount of > locking, like the other drivers. Unlike the other drivers, the 3c59x locks with spin_lock_bh inside the mdio _{read,write} functions. Thats why I did not used any locks here. Steffen From garzik@havoc.gtf.org Tue Oct 5 09:10:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 09:10:04 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [69.28.190.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95G9xOx002339 for ; Tue, 5 Oct 2004 09:10:00 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id 13E7D788F; Tue, 5 Oct 2004 12:07:20 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i95G7J7h021579; Tue, 5 Oct 2004 12:07:19 -0400 Date: Tue, 5 Oct 2004 12:07:19 -0400 From: Jeff Garzik To: akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc3-mm2] 3c59x: support more ethtool_ops Message-ID: <20041005160719.GA21225@havoc.gtf.org> References: <20041005134143.GA4829@gareth.mathematik.tu-chemnitz.de> <4162ACED.10303@pobox.com> <20041005160247.GA5405@gareth.mathematik.tu-chemnitz.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041005160247.GA5405@gareth.mathematik.tu-chemnitz.de> User-Agent: Mutt/1.4.1i X-archive-position: 9919 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: 1393 Lines: 42 On Tue, Oct 05, 2004 at 06:02:47PM +0200, Steffen Klassert wrote: > On Tue, Oct 05, 2004 at 10:17:17AM -0400 or thereabouts, Jeff Garzik wrote: > > >+static u32 vortex_get_link(struct net_device *dev) > > >+{ > > >+ struct vortex_private *vp = netdev_priv(dev); > > >+ long ioaddr = dev->base_addr; > > >+ EL3WINDOW(4); > > >+ return mii_link_ok(&vp->mii); > > >+} > > > > 3c59x should properly use netif_carrier_{on,off}, at which point you can > > eliminate vortex_get_link in favor of generic ethtool_op_get_link > > I tried to use ethtool_op_get_link, but then ethtool reports > Link detected: yes > It does not matter wether the cable is connected or not. Thus my comment "3c59x should properly use netif_carrier_{on,off}" :) > > >+static int vortex_set_settings(struct net_device *dev, struct ethtool_cmd > > >*cmd) > > >+{ > > >+ struct vortex_private *vp = netdev_priv(dev); > > >+ long ioaddr = dev->base_addr; > > >+ EL3WINDOW(4); > > >+ return mii_ethtool_sset(&vp->mii, cmd); > > >+} > > > > I think that this and the other MII patch should do some amount of > > locking, like the other drivers. > > Unlike the other drivers, the 3c59x locks with spin_lock_bh inside > the mdio _{read,write} functions. Thats why I did not used any locks here. Insufficient. 3c59x uses register windows, and you do not lock between setting the window and using the window. Jeff From P@draigBrady.com Tue Oct 5 09:36:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 09:36:36 -0700 (PDT) Received: from corvil.com (gate.corvil.net [213.94.219.177]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95GaUBC002979 for ; Tue, 5 Oct 2004 09:36:31 -0700 Received: from draigBrady.com (pixelbeat.local.corvil.com [172.18.1.170]) by corvil.com (8.12.9/8.12.5) with ESMTP id i95Ga6wS025330; Tue, 5 Oct 2004 17:36:07 +0100 (IST) (envelope-from P@draigBrady.com) Message-ID: <4162CD76.4070204@draigBrady.com> Date: Tue, 05 Oct 2004 17:36:06 +0100 From: P@draigBrady.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040124 X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com CC: Ingo Molnar , Andrea Arcangeli Subject: gettimeofday scalability Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-archive-position: 9920 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: P@draigBrady.com Precedence: bulk X-list: netdev Content-Length: 881 Lines: 22 I'm starting to look again at the performance of my packet sniffer. Any performace tips are appreciated (I'm using irq affinity and CONFIG_PACKET_MMAP on 2.4.20 on a dual P4 xeon at present). In particular I was wondering about reducing the overhead of calling do_gettimeofday. I noticed in the following paper that the xeon is much less efficient than the P3 for gettimeofday (for the syscall at least): http://www.labs.fujitsu.com/en/techinfo/linux/lse-0211/lse-0211.pdf I've seen various gettimeofday locking speedup patches floating around for 2.4. There is a version from Stephen and Andrea that uses frlock, claiming 18%, and one from ingo that uses brlock. 2.6.8.1 uses seqlock, which contains the comment that it's not as cache friendly as brlock. So can anyone summarise the relative merits of these locking mechanisms, before I start benchmarking? thanks, Pádraig. From shemminger@osdl.org Tue Oct 5 10:06:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 10:06:59 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95H6iqV003697 for ; Tue, 5 Oct 2004 10:06:47 -0700 Received: from [172.20.1.60] (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i95H67f19323; Tue, 5 Oct 2004 10:06:07 -0700 Subject: Re: Hang when testing with AMD64 with Tg3 From: Stephen Hemminger To: Nivedita Singhvi Cc: Andi Kleen , davem@redhat.com, netdev@oss.sgi.com In-Reply-To: <4162B6B2.6030208@us.ibm.com> References: <1096935071.22155.6.camel@localhost.localdomain> <20041005001527.GB13106@wotan.suse.de> <1096938308.22947.3.camel@localhost.localdomain> <4162B6B2.6030208@us.ibm.com> Content-Type: text/plain Organization: Open Source Development Lab Date: Tue, 05 Oct 2004 10:06:15 -0700 Message-Id: <1096995975.22947.7.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.0 Content-Transfer-Encoding: 7bit X-archive-position: 9921 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 Content-Length: 1042 Lines: 28 On Tue, 2004-10-05 at 07:58 -0700, Nivedita Singhvi wrote: > Stephen Hemminger wrote: > > On Tue, 2004-10-05 at 02:15 +0200, Andi Kleen wrote: > > > >>On Mon, Oct 04, 2004 at 05:11:11PM -0700, Stephen Hemminger wrote: > >> > >>>Doing simple iperf test on new opteron with tg3 against existing Xeon > >>>system. I am seeing something wierd, the connection hangs right away. > >>>Is this a TSO bug. > >>> > >>>Sender: BK latest (2.6.9-rc3) Tg3 (XX.YY.250.3) > >>>Receiver: BK + netdev(jeffm) + dave's latest e100 (XX.YY.1.73) > >>> > >>>Both machines are directly connected with a netgear 100mbit switch. > >> > > > > IT ISN'T A NETWORK PROBLEM. The problem is that iperf uses posix > > pthread mutex's to sychronize and it looks like a futex bug. > > might not be a futex bug - check to see if iperf does > any writes, fflushes, etc, in a signal handler - i.e. > that its signal handling is thread-safe. glibc now > makes it a fatal bug.. It doesn't do I/O from signal handler, but the problem goes away when not compiling with -O2. From wensong@linux-vs.org Tue Oct 5 11:22:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 11:22:07 -0700 (PDT) Received: from lb1.ctrip.com ([218.244.111.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95IM0jW005040 for ; Tue, 5 Oct 2004 11:22:01 -0700 Received: from penguin.linux-vs.org ([61.149.157.59]) by lb1.ctrip.com (8.12.10/8.12.10) with ESMTP id i95IL0Mh006594 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 6 Oct 2004 02:21:08 +0800 Received: from penguin.linux-vs.org (localhost.localdomain [127.0.0.1]) by penguin.linux-vs.org (8.12.8/8.12.8) with ESMTP id i95IKLws002487; Wed, 6 Oct 2004 02:20:22 +0800 Received: from localhost (wensong@localhost) by penguin.linux-vs.org (8.12.8/8.12.8/Submit) with ESMTP id i95IKIQf002483; Wed, 6 Oct 2004 02:20:20 +0800 X-Authentication-Warning: penguin.linux-vs.org: wensong owned process doing -bs Date: Wed, 6 Oct 2004 02:20:18 +0800 (CST) From: Wensong Zhang To: "David S. Miller" , Subject: [PATCH] [IPVS] Fix endian problem on sync message size Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-1463811584-572891765-1097000265=:2451" Content-ID: X-archive-position: 9922 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: wensong@linux-vs.org Precedence: bulk X-list: netdev Content-Length: 6438 Lines: 121 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. ---1463811584-572891765-1097000265=:2451 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: Hi Dave, Here is the patch from Justin Ossevoort to fix endian problem on IPVS sync message size. Please check and apply them to kernel 2.4 and 2.6 respectively. Thanks, Wensong ---1463811584-572891765-1097000265=:2451 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME="linux-2.4-ipvs_sync-endian.diff" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: ATTACHMENT; FILENAME="linux-2.4-ipvs_sync-endian.diff" PT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gY3Vycl9zYiBmb3IgMiBzZWNvbmRz ICovDQogCQlpZiAoKHNiID0gZ2V0X2N1cnJfc3luY19idWZmKDIqSFopKSkg ew0KLQkJCW0gPSBzYi0+bWVzZzsNCi0JCQlpZiAoaXBfdnNfc2VuZF9hc3lu Yyhzb2NrLCAoY2hhciAqKW0sDQotCQkJCQkgICAgIG0tPnNpemUpICE9IG0t PnNpemUpDQotCQkJCUlQX1ZTX0VSUigiaXBfdnNfc2VuZF9hc3luYyBlcnJv clxuIik7DQorCQkJaXBfdnNfc2VuZF9zeW5jX21zZyhzb2NrLCBzYi0+bWVz Zyk7DQogCQkJaXBfdnNfc3luY19idWZmX3JlbGVhc2Uoc2IpOw0KIAkJfQ0K IA0K ---1463811584-572891765-1097000265=:2451 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME="linux-2.6-ipvs_sync-endian.diff" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: ATTACHMENT; FILENAME="linux-2.6-ipvs_sync-endian.diff" PT09PT0gbmV0L2lwdjQvaXB2cy9pcF92c19zeW5jLmMgMS4xMCB2cyBlZGl0 ZWQgPT09PT0NCi0tLSAxLjEwL25ldC9pcHY0L2lwdnMvaXBfdnNfc3luYy5j CTIwMDQtMDctMTYgMjI6MTM6NTMgKzA4OjAwDQorKysgZWRpdGVkL25ldC9p cHY0L2lwdnMvaXBfdnNfc3luYy5jCTIwMDQtMTAtMDMgMDE6MjQ6NDIgKzA4 OjAwDQpAQCAtMTYsNiArMTYsNyBAQA0KICAqCUFsZXhhbmRyZSBDYXNzZW4J OglBZGRlZCBtYXN0ZXIgJiBiYWNrdXAgc3VwcG9ydCBhdCBhIHRpbWUuDQog ICoJQWxleGFuZHJlIENhc3Nlbgk6CUFkZGVkIFN5bmNJRCBzdXBwb3J0IGZv ciBpbmNvbWluZyBzeW5jDQogICoJCQkJCW1lc3NhZ2VzIGZpbHRlcmluZy4N CisgKglKdXN0aW4gT3NzZXZvb3J0CToJRml4IG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1Y3QgaXBfdnNfc3luY19tZXNnICpt Ow0KIA0KIAkvKiBjcmVhdGUgdGhlIHNlbmRpbmcgbXVsdGljYXN0IHNvY2tl dCAqLw0KIAlzb2NrID0gbWFrZV9zZW5kX3NvY2soKTsNCkBAIC02MTgsMTkg KzYzNCwxMyBAQA0KIA0KIAlmb3IgKDs7KSB7DQogCQl3aGlsZSAoKHNiPXNi X2RlcXVldWUoKSkpIHsNCi0JCQltID0gc2ItPm1lc2c7DQotCQkJaWYgKGlw X3ZzX3NlbmRfYXN5bmMoc29jaywgKGNoYXIgKiltLA0KLQkJCQkJICAgICBt LT5zaXplKSAhPSBtLT5zaXplKQ0KLQkJCQlJUF9WU19FUlIoImlwX3ZzX3Nl bmRfYXN5bmMgZXJyb3JcbiIpOw0KKwkJCWlwX3ZzX3NlbmRfc3luY19tc2co c29jaywgc2ItPm1lc2cpOw0KIAkJCWlwX3ZzX3N5bmNfYnVmZl9yZWxlYXNl KHNiKTsNCiAJCX0NCiANCiAJCS8qIGNoZWNrIGlmIGVudHJpZXMgc3RheSBp biBjdXJyX3NiIGZvciAyIHNlY29uZHMgKi8NCiAJCWlmICgoc2IgPSBnZXRf Y3Vycl9zeW5jX2J1ZmYoMipIWikpKSB7DQotCQkJbSA9IHNiLT5tZXNnOw0K LQkJCWlmIChpcF92c19zZW5kX2FzeW5jKHNvY2ssIChjaGFyICopbSwNCi0J CQkJCSAgICAgbS0+c2l6ZSkgIT0gbS0+c2l6ZSkNCi0JCQkJSVBfVlNfRVJS KCJpcF92c19zZW5kX2FzeW5jIGVycm9yXG4iKTsNCisJCQlpcF92c19zZW5k X3N5bmNfbXNnKHNvY2ssIHNiLT5tZXNnKTsNCiAJCQlpcF92c19zeW5jX2J1 ZmZfcmVsZWFzZShzYik7DQogCQl9DQogDQo= ---1463811584-572891765-1097000265=:2451-- From davem@davemloft.net Tue Oct 5 11:35:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 11:35:51 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95IZjfB005458 for ; Tue, 5 Oct 2004 11:35:45 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEu9Z-0005BU-00; Tue, 05 Oct 2004 11:35:13 -0700 Date: Tue, 5 Oct 2004 11:35:12 -0700 From: "David S. Miller" To: P@draigBrady.com Cc: netdev@oss.sgi.com, mingo@elte.hu, andrea@suse.de Subject: Re: gettimeofday scalability Message-Id: <20041005113512.45ab0a31.davem@davemloft.net> In-Reply-To: <4162CD76.4070204@draigBrady.com> References: <4162CD76.4070204@draigBrady.com> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9923 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 296 Lines: 8 On Tue, 05 Oct 2004 17:36:06 +0100 P@draigBrady.com wrote: > So can anyone summarise the relative merits of these locking > mechanisms, before I start benchmarking? Seq locks plus the timer interpolator layer found in 2.6.x kernels is the most scalable gettimeofday() implementation currently. From davem@davemloft.net Tue Oct 5 11:44:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 11:44:25 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95IiK0Y005858 for ; Tue, 5 Oct 2004 11:44:20 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEuHs-0005CZ-00; Tue, 05 Oct 2004 11:43:48 -0700 Date: Tue, 5 Oct 2004 11:43:48 -0700 From: "David S. Miller" To: Wensong Zhang Cc: netdev@oss.sgi.com Subject: Re: [PATCH] [IPVS] Fix endian problem on sync message size Message-Id: <20041005114348.146b4bb5.davem@davemloft.net> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9924 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 294 Lines: 8 On Wed, 6 Oct 2004 02:20:18 +0800 (CST) Wensong Zhang wrote: > Here is the patch from Justin Ossevoort to fix > endian problem on IPVS sync message size. Please check and apply them to > kernel 2.4 and 2.6 respectively. Patch applied, thanks. From shemminger@osdl.org Tue Oct 5 11:44:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 11:44:54 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95Iikjl005933 for ; Tue, 5 Oct 2004 11:44:47 -0700 Received: from [172.20.1.60] (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i95IiHf07451; Tue, 5 Oct 2004 11:44:17 -0700 Subject: iperf 1.7.0 thread bug. From: Stephen Hemminger To: dast@nlanr.net Cc: iperf-users@dast.nlanr.net, netdev@oss.sgi.com Content-Type: multipart/mixed; boundary="=-zFU1N+103e8NII/wdZk7" Organization: Open Source Development Lab Date: Tue, 05 Oct 2004 11:41:18 -0700 Message-Id: <1097001678.22947.14.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.0 X-archive-position: 9925 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 Content-Length: 818 Lines: 35 --=-zFU1N+103e8NII/wdZk7 Content-Type: text/plain Content-Transfer-Encoding: 7bit The iperf 1.7.0 hangs on AMD64, after several false starts the problem turned out to be that the Thread wrapper was incorrectly assumuing that pthread wasn't present (in Speaker.cpp), so some data sizes get messed up. Bedlam ensuses. This fixes it. --=-zFU1N+103e8NII/wdZk7 Content-Description: Content-Disposition: attachment; filename=iperf-1.7.0.patch Content-Type: text/x-patch; charset=us-ascii Content-Transfer-Encoding: 7bit --- lib/Thread.hpp.orig 2004-10-05 11:33:14.638098735 -0700 +++ lib/Thread.hpp 2004-10-05 11:34:30.160583668 -0700 @@ -56,7 +56,9 @@ #ifndef THREAD_H #define THREAD_H - +#ifdef HAVE_CONFIG_H + #include "config.h" +#endif #if defined( HAVE_POSIX_THREAD ) --=-zFU1N+103e8NII/wdZk7-- From shemminger@osdl.org Tue Oct 5 11:48:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 11:48:23 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95ImFZi006505 for ; Tue, 5 Oct 2004 11:48:17 -0700 Received: from [172.20.1.60] (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i95Ilpf08184; Tue, 5 Oct 2004 11:47:51 -0700 Subject: Re: gettimeofday scalability From: Stephen Hemminger To: P@draigBrady.com Cc: netdev@oss.sgi.com, Ingo Molnar , Andrea Arcangeli In-Reply-To: <4162CD76.4070204@draigBrady.com> References: <4162CD76.4070204@draigBrady.com> Content-Type: text/plain; charset=ISO-8859-1 Organization: Open Source Development Lab Date: Tue, 05 Oct 2004 11:48:00 -0700 Message-Id: <1097002080.22947.18.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.0 Content-Transfer-Encoding: 8bit X-archive-position: 9926 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 Content-Length: 1183 Lines: 29 On Tue, 2004-10-05 at 17:36 +0100, P@draigBrady.com wrote: > I'm starting to look again at the performance of my packet sniffer. > Any performace tips are appreciated (I'm using irq affinity and > CONFIG_PACKET_MMAP on 2.4.20 on a dual P4 xeon at present). > > In particular I was wondering about reducing the overhead of > calling do_gettimeofday. > > I noticed in the following paper that the xeon is much less > efficient than the P3 for gettimeofday (for the syscall at least): > http://www.labs.fujitsu.com/en/techinfo/linux/lse-0211/lse-0211.pdf > > I've seen various gettimeofday locking speedup patches floating > around for 2.4. There is a version from Stephen and Andrea > that uses frlock, claiming 18%, and one from ingo that uses brlock. > 2.6.8.1 uses seqlock, which contains the comment > that it's not as cache friendly as brlock. Don't bother with doing new work on 2.4. Look at 2.6. You could use TSC in user space but you aren't going to see absolute times and you run into all the portablity, and possible speed change issues. > So can anyone summarise the relative merits of these locking > mechanisms, before I start benchmarking? > > thanks, > Pádraig. From acme@conectiva.com.br Tue Oct 5 11:51:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 11:51:56 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95Ipg2Q006851 for ; Tue, 5 Oct 2004 11:51:50 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id C3BCF474AB; Tue, 5 Oct 2004 15:51:08 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 7E13A4749D for ; Tue, 5 Oct 2004 15:51:08 -0300 (BRT) Received: (qmail 8069 invoked by uid 0); 5 Oct 2004 19:48:10 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 5 Oct 2004 19:48:10 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id 1DFF414639; Tue, 5 Oct 2004 15:54:18 -0300 (BRT) Message-ID: <4162ED91.20605@conectiva.com.br> Date: Tue, 05 Oct 2004 15:53:05 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: PATCH: [SKBUFF] remove some ethernet header related magic numbers X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------030406070407000204070009" X-Bogosity: No, tests=bogofilter, spamicity=0.001336, version=0.16.3 X-archive-position: 9927 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 Content-Length: 2003 Lines: 70 This is a multi-part message in MIME format. --------------030406070407000204070009 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi David, Plesase consider pulling from: bk://kernel.bkbits.net/acme/sk_buff-2.6 Now there are twelve outstanding changesets in this tree. Best Regards, - Arnaldo --------------030406070407000204070009 Content-Type: text/plain; name="ethhdr_magic_numbers.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ethhdr_magic_numbers.patch" =================================================================== ChangeSet@1.2041, 2004-10-05 15:45:31-03:00, acme@conectiva.com.br [SKBUFF] remove some ethernet header related magic numbers Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller drivers/net/loopback.c | 2 +- net/core/pktgen.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff -Nru a/drivers/net/loopback.c b/drivers/net/loopback.c --- a/drivers/net/loopback.c 2004-10-05 15:50:11 -03:00 +++ b/drivers/net/loopback.c 2004-10-05 15:50:11 -03:00 @@ -85,7 +85,7 @@ if (!nskb) break; skb_reserve(nskb, 32); - nskb->mac.raw = nskb->data - 14; + nskb->mac.raw = nskb->data - ETH_HLEN; nskb->nh.raw = nskb->data; iph = nskb->nh.iph; memcpy(nskb->data, skb->nh.raw, doffset); diff -Nru a/net/core/pktgen.c b/net/core/pktgen.c --- a/net/core/pktgen.c 2004-10-05 15:50:11 -03:00 +++ b/net/core/pktgen.c 2004-10-05 15:50:11 -03:00 @@ -515,8 +515,8 @@ iph->tot_len = htons(iplen); iph->check = 0; iph->check = ip_fast_csum((void *) iph, iph->ihl); - skb->protocol = __constant_htons(ETH_P_IP); - skb->mac.raw = ((u8 *)iph) - 14; + skb->protocol = htons(ETH_P_IP); + skb->mac.raw = ((u8 *)iph) - ETH_ALEN; skb->dev = odev; skb->pkt_type = PACKET_HOST; =================================================================== --------------030406070407000204070009-- From andrea@novell.com Tue Oct 5 11:55:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 11:55:35 -0700 (PDT) Received: from mail-relay-3.tiscali.it (mail-relay-3.tiscali.it [213.205.33.43]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95ItT37007268 for ; Tue, 5 Oct 2004 11:55:30 -0700 Received: from dualathlon.random (217.133.42.200) by mail-relay-3.tiscali.it (7.1.021.3) id 415D9810000B8D0A; Tue, 5 Oct 2004 20:54:55 +0200 Received: by dualathlon.random (Postfix, from userid 500) id 6C6EB4541; Tue, 5 Oct 2004 20:55:53 +0200 (CEST) Date: Tue, 5 Oct 2004 20:55:53 +0200 From: Andrea Arcangeli To: P@draigBrady.com Cc: netdev@oss.sgi.com, Ingo Molnar Subject: Re: gettimeofday scalability Message-ID: <20041005185553.GG26820@dualathlon.random> References: <4162CD76.4070204@draigBrady.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4162CD76.4070204@draigBrady.com> X-GPG-Key: 1024D/68B9CB43 13D9 8355 295F 4823 7C49 C012 DFA1 686E 68B9 CB43 X-PGP-Key: 1024R/CB4660B9 CC A0 71 81 F4 A0 63 AC C0 4B 81 1D 8C 15 C8 E5 User-Agent: Mutt/1.5.6i X-archive-position: 9928 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: andrea@novell.com Precedence: bulk X-list: netdev Content-Length: 1199 Lines: 25 On Tue, Oct 05, 2004 at 05:36:06PM +0100, P@draigBrady.com wrote: > I've seen various gettimeofday locking speedup patches floating > around for 2.4. There is a version from Stephen and Andrea > that uses frlock, claiming 18%, and one from ingo that uses brlock. > 2.6.8.1 uses seqlock, which contains the comment > that it's not as cache friendly as brlock. seqlock and frlock are the same thing. I don't see how the brlock can work well given the fact you'll have to take it in write mode at every timer irq. Maybe it works on a 2-way, sure not more than that. brlock should be totally replaced by RCU anyways. brlock can also starve the writer, which make it a security DoS (at least for some architecture, there were two implementations, maybe one is safe). > So can anyone summarise the relative merits of these locking > mechanisms, before I start benchmarking? frlock/seqlock (2.4/2.6 respectively) is the way to go, no write starvation, and zero cacheline bouncing. upgrade to x86-64, there I implemented gettimeofday with vsyscalls which also avoids entering exiting userspace which becomes the by far biggest overhead after using seqlock. (speedup is tenfold or so) Hope this helps. From davem@davemloft.net Tue Oct 5 11:58:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 11:58:08 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95Iw3p7007637 for ; Tue, 5 Oct 2004 11:58:04 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEuV3-0005EK-00; Tue, 05 Oct 2004 11:57:25 -0700 Date: Tue, 5 Oct 2004 11:57:25 -0700 From: "David S. Miller" To: Greg Banks Cc: netdev@oss.sgi.com Subject: Re: Race between neigh_timer_handler and neigh_event_send Message-Id: <20041005115725.7aa6c739.davem@davemloft.net> In-Reply-To: <20041005101532.GA935@sgi.com> References: <20041005101532.GA935@sgi.com> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9929 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 377 Lines: 13 Good catch Greg. All of this trouble is because this is the one spot where we make reference to the arp_queue packets without neigh->lock held. I wish we could avoiding dropping the lock instead, but that is not the case. All of these ->solicit() methods can end up calling back down into the neighbour layer and try to grab the lock again. I'll apply your patch, thanks. From acme@conectiva.com.br Tue Oct 5 12:12:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 12:12:49 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95JCddo008296 for ; Tue, 5 Oct 2004 12:12:43 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id C321B4734A; Tue, 5 Oct 2004 16:12:20 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 81BAA4733B for ; Tue, 5 Oct 2004 16:12:20 -0300 (BRT) Received: (qmail 11752 invoked by uid 0); 5 Oct 2004 20:09:22 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 5 Oct 2004 20:09:22 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id B402614639; Tue, 5 Oct 2004 16:15:31 -0300 (BRT) Message-ID: <4162F28B.2050308@conectiva.com.br> Date: Tue, 05 Oct 2004 16:14:19 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: PATCH: [SKBUFF] introduce skb_link_header_size(skb) X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------030105000501030001090605" X-Bogosity: No, tests=bogofilter, spamicity=0.253315, version=0.16.3 X-archive-position: 9930 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 Content-Length: 3552 Lines: 112 This is a multi-part message in MIME format. --------------030105000501030001090605 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi David, Please consider pulling from: bk://kernel.bkbits.net/acme/sk_buff-2.6 Now there ate 13 outstanding changesets in this tree. Regards, - Arnaldo --------------030105000501030001090605 Content-Type: text/plain; name="skb_link_header_size.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="skb_link_header_size.patch" =================================================================== ChangeSet@1.2042, 2004-10-05 16:11:14-03:00, acme@conectiva.com.br [SKBUFF] introduce skb_link_header_size(skb) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller drivers/net/arcnet/arcnet.c | 8 ++++---- include/linux/skbuff.h | 5 +++++ net/core/dev.c | 2 +- net/ipv4/ip_gre.c | 3 ++- 4 files changed, 12 insertions(+), 6 deletions(-) diff -Nru a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c --- a/drivers/net/arcnet/arcnet.c 2004-10-05 16:11:56 -03:00 +++ b/drivers/net/arcnet/arcnet.c 2004-10-05 16:11:56 -03:00 @@ -478,9 +478,9 @@ */ if (!daddr) { *(uint16_t *) skb_push(skb, 2) = type; - if (skb->nh.raw - skb->mac.raw != 2) + if (skb_link_header_size(skb) != 2) BUGMSG(D_NORMAL, "arcnet_header: Yikes! diff (%d) is not 2!\n", - (int)(skb->nh.raw - skb->mac.raw)); + skb_link_header_size(skb)); return -2; /* return error -- can't transmit yet! */ } /* otherwise, we can just add the header as usual. */ @@ -512,10 +512,10 @@ uint8_t daddr=0; struct ArcProto *proto; - if (skb->nh.raw - skb->mac.raw != 2) { + if (skb_link_header_size(skb) != 2) { BUGMSG(D_NORMAL, "rebuild_header: shouldn't be here! (hdrsize=%d)\n", - (int)(skb->nh.raw - skb->mac.raw)); + skb_link_header_size(skb)); return 0; } type = *(uint16_t *) skb_pull(skb, 2); diff -Nru a/include/linux/skbuff.h b/include/linux/skbuff.h --- a/include/linux/skbuff.h 2004-10-05 16:11:56 -03:00 +++ b/include/linux/skbuff.h 2004-10-05 16:11:56 -03:00 @@ -302,6 +302,11 @@ (skb->mac.raw + hdrlen) <= skb->data; } +static inline int skb_link_header_size(const struct sk_buff *skb) +{ + return skb->nh.raw - skb->mac.raw; +} + extern void __kfree_skb(struct sk_buff *skb); extern struct sk_buff *alloc_skb(unsigned int size, int priority); extern void kfree_skbmem(struct sk_buff *skb); diff -Nru a/net/core/dev.c b/net/core/dev.c --- a/net/core/dev.c 2004-10-05 16:11:56 -03:00 +++ b/net/core/dev.c 2004-10-05 16:11:56 -03:00 @@ -1735,7 +1735,7 @@ __get_cpu_var(netdev_rx_stat).total++; skb->h.raw = skb->nh.raw = skb->data; - skb->mac_len = skb->nh.raw - skb->mac.raw; + skb->mac_len = skb_link_header_size(skb); pt_prev = NULL; diff -Nru a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c --- a/net/ipv4/ip_gre.c 2004-10-05 16:11:56 -03:00 +++ b/net/ipv4/ip_gre.c 2004-10-05 16:11:56 -03:00 @@ -621,7 +621,8 @@ memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options)); if (skb->ip_summed == CHECKSUM_HW) skb->csum = csum_sub(skb->csum, - csum_partial(skb->mac.raw, skb->nh.raw-skb->mac.raw, 0)); + csum_partial(skb->mac.raw, + skb_link_header_size(skb), 0)); skb->pkt_type = PACKET_HOST; #ifdef CONFIG_NET_IPGRE_BROADCAST if (MULTICAST(iph->daddr)) { --------------030105000501030001090605-- From P@draigBrady.com Tue Oct 5 12:16:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 12:16:58 -0700 (PDT) Received: from corvil.com (gate.corvil.net [213.94.219.177]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95JGqod008652 for ; Tue, 5 Oct 2004 12:16:53 -0700 Received: from draigBrady.com (pixelbeat.local.corvil.com [172.18.1.170]) by corvil.com (8.12.9/8.12.5) with ESMTP id i95JGXwS090720; Tue, 5 Oct 2004 20:16:34 +0100 (IST) (envelope-from P@draigBrady.com) Message-ID: <4162F311.4050009@draigBrady.com> Date: Tue, 05 Oct 2004 20:16:33 +0100 From: P@draigBrady.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040124 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andrea Arcangeli CC: netdev@oss.sgi.com, Ingo Molnar Subject: Re: gettimeofday scalability References: <4162CD76.4070204@draigBrady.com> <20041005185553.GG26820@dualathlon.random> In-Reply-To: <20041005185553.GG26820@dualathlon.random> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-archive-position: 9931 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: P@draigBrady.com Precedence: bulk X-list: netdev Content-Length: 791 Lines: 26 Andrea Arcangeli wrote: > On Tue, Oct 05, 2004 at 05:36:06PM +0100, P@draigBrady.com wrote: > >>So can anyone summarise the relative merits of these locking >>mechanisms, before I start benchmarking? > > > frlock/seqlock (2.4/2.6 respectively) is the way to go, no write > starvation, and zero cacheline bouncing. Cheers. Perhaps the confusing comment wrt brlock at the top of seqlock.h can be changed so? > upgrade to x86-64, there I implemented gettimeofday with vsyscalls which > also avoids entering exiting userspace which becomes the by far biggest > overhead after using seqlock. (speedup is tenfold or so) This is all in kernel space. However Stephen's suggestion of reading the tsc in user space may be a runner, as I just care about relative times. thanks guys! Pádraig. From mingo@elte.hu Tue Oct 5 12:18:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 12:18:18 -0700 (PDT) Received: from mx2.elte.hu (mx2.elte.hu [157.181.151.9]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95JICKM009000 for ; Tue, 5 Oct 2004 12:18:13 -0700 Received: from chiara.elte.hu (chiara.elte.hu [157.181.150.200]) by mx2.elte.hu (Postfix) with ESMTP id 6091827C5E5; Tue, 5 Oct 2004 21:11:07 +0200 (CEST) Received: by chiara.elte.hu (Postfix, from userid 17806) id D5E391FC2; Tue, 5 Oct 2004 21:17:17 +0200 (CEST) Date: Tue, 5 Oct 2004 21:18:58 +0200 From: Ingo Molnar To: P@draigBrady.com Cc: netdev@oss.sgi.com, Andrea Arcangeli Subject: Re: gettimeofday scalability Message-ID: <20041005191858.GA14082@elte.hu> References: <4162CD76.4070204@draigBrady.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4162CD76.4070204@draigBrady.com> User-Agent: Mutt/1.4.1i X-ELTE-SpamVersion: MailScanner 4.31.6-itk1 (ELTE 1.2) SpamAssassin 2.63 ClamAV 0.73 X-ELTE-VirusStatus: clean X-ELTE-SpamCheck: no X-ELTE-SpamCheck-Details: score=-4.9, required 5.9, autolearn=not spam, BAYES_00 -4.90 X-ELTE-SpamLevel: X-ELTE-SpamScore: -4 X-archive-position: 9932 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mingo@elte.hu Precedence: bulk X-list: netdev Content-Length: 585 Lines: 17 * P@draigBrady.com wrote: > In particular I was wondering about reducing the overhead of > calling do_gettimeofday. > 2.6.8.1 uses seqlock, which contains the comment that it's not as > cache friendly as brlock. that comment is way too modest! Seqlocks are very cache-friendly in the read path. There is no reason to use brlocks anymore for fixed-frequency writers like the timer seqlock. (writers can starve seqlock readers but in the timer case the writers occur only once every 1 msec.) so please benchmark 2.6, it should scale linearly in this area. Ingo From tgr@reeler.org Tue Oct 5 12:34:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 12:34:28 -0700 (PDT) Received: from rei.rakuen (217-162-107-144.dclient.hispeed.ch [217.162.107.144]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95JYNfA012731 for ; Tue, 5 Oct 2004 12:34:23 -0700 Received: from tgr by rei.rakuen with local (Exim 4.34) id 1CEv4K-0006hc-He; Tue, 05 Oct 2004 21:33:52 +0200 Date: Tue, 5 Oct 2004 21:33:52 +0200 From: Thomas Graf To: Arnaldo Carvalho de Melo Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: PATCH: [SKBUFF] introduce skb_link_header_size(skb) Message-ID: <20041005193352.GA19714@rei.reeler.org> References: <4162F28B.2050308@conectiva.com.br> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4162F28B.2050308@conectiva.com.br> X-archive-position: 9933 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 376 Lines: 9 * Arnaldo Carvalho de Melo <4162F28B.2050308@conectiva.com.br> 2004-10-05 16:14 > +static inline int skb_link_header_size(const struct sk_buff *skb) > +{ > + return skb->nh.raw - skb->mac.raw; > +} The patch is valid and I think it is right to do so but this may lead to wrong results when skb->mac.raw is set to 0x0 F.e in classifiers. Maybe add a comment to warn about it? From andrea@novell.com Tue Oct 5 12:35:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 12:35:19 -0700 (PDT) Received: from mail-relay-4.tiscali.it (mail-relay-4.tiscali.it [213.205.33.44]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95JZB0k012921 for ; Tue, 5 Oct 2004 12:35:12 -0700 Received: from dualathlon.random (217.133.42.200) by mail-relay-4.tiscali.it (7.1.021.3) id 415D98E2000C1F08; Tue, 5 Oct 2004 21:34:47 +0200 Received: by dualathlon.random (Postfix, from userid 500) id 830244825; Tue, 5 Oct 2004 21:35:45 +0200 (CEST) Date: Tue, 5 Oct 2004 21:35:45 +0200 From: Andrea Arcangeli To: P@draigBrady.com Cc: netdev@oss.sgi.com, Ingo Molnar Subject: Re: gettimeofday scalability Message-ID: <20041005193545.GI26820@dualathlon.random> References: <4162CD76.4070204@draigBrady.com> <20041005185553.GG26820@dualathlon.random> <4162F311.4050009@draigBrady.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4162F311.4050009@draigBrady.com> X-GPG-Key: 1024D/68B9CB43 13D9 8355 295F 4823 7C49 C012 DFA1 686E 68B9 CB43 X-PGP-Key: 1024R/CB4660B9 CC A0 71 81 F4 A0 63 AC C0 4B 81 1D 8C 15 C8 E5 User-Agent: Mutt/1.5.6i X-archive-position: 9934 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: andrea@novell.com Precedence: bulk X-list: netdev Content-Length: 1425 Lines: 38 On Tue, Oct 05, 2004 at 08:16:33PM +0100, P@draigBrady.com wrote: > Andrea Arcangeli wrote: > >On Tue, Oct 05, 2004 at 05:36:06PM +0100, P@draigBrady.com wrote: > > > >>So can anyone summarise the relative merits of these locking > >>mechanisms, before I start benchmarking? > > > > > >frlock/seqlock (2.4/2.6 respectively) is the way to go, no write > >starvation, and zero cacheline bouncing. > > Cheers. > > Perhaps the confusing comment wrt brlock at the > top of seqlock.h can be changed so? I guess so. > This is all in kernel space. vsyscalls are in userspace, but you will not notice the difference. Or do you mean your code is in kernel space? vsyscalls would run from kernel space too, but then you can use gettimeofday by hand with seqlock and it won't be any different. > However Stephen's suggestion of reading the tsc in user space > may be a runner, as I just care about relative times. Stephen's suggestion will lead to your app breaking on asymmetric TSC on SMP if you're not careful, if you use the vsyscall on a correct kernel (like x86-64) you won't take that risk (HPETS avoids that, slower than the tsc but the only safe one). Otherwise you've to use process affinity + tsc, only with cpu binding you're safe. Some big app uses TSC but only optionally, so you can turn it on/off depending on the hardware (on x86-64 this obsoleted by vgettimeofday, that's a x86-only hack). hope this helps ;) From acme@conectiva.com.br Tue Oct 5 12:43:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 12:44:00 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95JhrHx013537 for ; Tue, 5 Oct 2004 12:43:54 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 879514738F; Tue, 5 Oct 2004 16:43:34 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 4CA1B4733E for ; Tue, 5 Oct 2004 16:43:34 -0300 (BRT) Received: (qmail 16965 invoked by uid 0); 5 Oct 2004 20:40:36 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 5 Oct 2004 20:40:36 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id 98F3014639; Tue, 5 Oct 2004 16:46:45 -0300 (BRT) Message-ID: <4162F9DD.2070705@conectiva.com.br> Date: Tue, 05 Oct 2004 16:45:33 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Thomas Graf Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: PATCH: [SKBUFF] introduce skb_link_header_size(skb) References: <4162F28B.2050308@conectiva.com.br> <20041005193352.GA19714@rei.reeler.org> In-Reply-To: <20041005193352.GA19714@rei.reeler.org> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Bogosity: No, tests=bogofilter, spamicity=0.029994, version=0.16.3 X-archive-position: 9935 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 Content-Length: 551 Lines: 23 Thomas Graf wrote: > * Arnaldo Carvalho de Melo <4162F28B.2050308@conectiva.com.br> 2004-10-05 16:14 > >>+static inline int skb_link_header_size(const struct sk_buff *skb) >>+{ >>+ return skb->nh.raw - skb->mac.raw; >>+} > > > The patch is valid and I think it is right to do so but this may lead to > wrong results when skb->mac.raw is set to 0x0 F.e in classifiers. Maybe > add a comment to warn about it? I never looked at classifiers code, suggest a comment and I'll stick it there. Thanks for commenting on the patch. Regards, - Arnaldo From davem@davemloft.net Tue Oct 5 12:52:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 12:52:05 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95Jq0UK013938 for ; Tue, 5 Oct 2004 12:52:00 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEvLH-0005rB-00; Tue, 05 Oct 2004 12:51:23 -0700 Date: Tue, 5 Oct 2004 12:51:22 -0700 From: "David S. Miller" To: "Maciej W. Rozycki" Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] 2.6.8.1: Fix struct fddi_statistics for 64-bit Message-Id: <20041005125122.58dedc38.davem@davemloft.net> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9936 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 61 Lines: 2 Works for me, both 2.4.x and 2.6.x patches applied, thanks. From davem@davemloft.net Tue Oct 5 12:53:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 12:53:46 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95JrX2c015151 for ; Tue, 5 Oct 2004 12:53:33 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEvMr-0005rW-00; Tue, 05 Oct 2004 12:53:01 -0700 Date: Tue, 5 Oct 2004 12:53:00 -0700 From: "David S. Miller" To: "Maciej W. Rozycki" Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH RESEND] 2.[46]: Set ARP hw type correctly for BOOTP over FDDI Message-Id: <20041005125300.106abab9.davem@davemloft.net> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9937 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 445 Lines: 11 On Mon, 4 Oct 2004 23:56:59 +0100 (BST) "Maciej W. Rozycki" wrote: > Using the Ethernet ARP hw type for FDDI networks is mandated by RFC 1390 > (STD 36) and that code is already used by Linux elsewhere, but not for > BOOTP requests sent for IPv4 autoconfiguration. Here is a patch for both > 2.4 and 2.6 that fixes the problem for me. Please apply. > > Applies both to 2.4.27 and to 2.6.8.1. Patch applied, thanks. From davem@davemloft.net Tue Oct 5 12:55:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 12:55:10 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95Jt5n5015474 for ; Tue, 5 Oct 2004 12:55:05 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEvOL-0005rs-00; Tue, 05 Oct 2004 12:54:33 -0700 Date: Tue, 5 Oct 2004 12:54:33 -0700 From: "David S. Miller" To: "Maciej W. Rozycki" Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH RESEND] 2.[46]: Permit the official ARP hw type in SIOCSARP for FDDI Message-Id: <20041005125433.3cc516c9.davem@davemloft.net> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9938 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 873 Lines: 17 On Mon, 4 Oct 2004 23:57:09 +0100 (BST) "Maciej W. Rozycki" wrote: > The SIOCSARP handling code currently rejects attempts of setting an arp > entry for FDDI devices if the Ethernet ARP hw type is specified in the > request. Using this ARP hw type is mandated by RFC 1390 (STD 36) and I > think it's reasonable to accept SIOCSARP requests using this type, > especially as it already works this way for ARP packets received from the > network. One reason for this is bootpd setting explicit ARP cache entries > using the hw type that is also sent to a client. Here is a patch for both > 2.4 and 2.6 that fixes the problem for me. For consistency with code used > for ARP packets, it makes both Ethernet and IEEE802 ARP hw type acceptable > for FDDI interfaces. Please apply. > > Applies both to 2.4.27 and to 2.6.8.1. Patch applied, thanks. From acme@conectiva.com.br Tue Oct 5 13:07:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 13:07:38 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95K7RkE017554 for ; Tue, 5 Oct 2004 13:07:32 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id B65C1473C7; Tue, 5 Oct 2004 17:07:10 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 760BE473C2 for ; Tue, 5 Oct 2004 17:07:10 -0300 (BRT) Received: (qmail 20405 invoked by uid 0); 5 Oct 2004 21:04:10 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 5 Oct 2004 21:04:10 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id 4FE1C14639; Tue, 5 Oct 2004 17:10:20 -0300 (BRT) Message-ID: <4162FF64.4050108@conectiva.com.br> Date: Tue, 05 Oct 2004 17:09:08 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: PATCH: [SKBUFF] Introduce skb_set_link_header_offset(skb, offset) X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------090101030603080600010900" X-Bogosity: No, tests=bogofilter, spamicity=0.024285, version=0.16.3 X-archive-position: 9939 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 Content-Length: 3452 Lines: 109 This is a multi-part message in MIME format. --------------090101030603080600010900 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi David, Please consider pulling from: bk://kernel.bkbits.net/acme/sk_buff-2.4 Now there are 14 outstanding changesets in this tree. Regards, - Arnaldo --------------090101030603080600010900 Content-Type: text/plain; name="skb_set_link_header_offset.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="skb_set_link_header_offset.patch" =================================================================== ChangeSet@1.2043, 2004-10-05 17:05:20-03:00, acme@conectiva.com.br [SKBUFF] Introduce skb_set_link_header_offset(skb, offset) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller drivers/net/loopback.c | 2 +- drivers/net/myri_sbus.c | 2 +- drivers/s390/net/qeth_main.c | 2 +- include/linux/skbuff.h | 6 ++++++ net/atm/br2684.c | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) diff -Nru a/drivers/net/loopback.c b/drivers/net/loopback.c --- a/drivers/net/loopback.c 2004-10-05 17:06:15 -03:00 +++ b/drivers/net/loopback.c 2004-10-05 17:06:15 -03:00 @@ -85,7 +85,7 @@ if (!nskb) break; skb_reserve(nskb, 32); - nskb->mac.raw = nskb->data - ETH_HLEN; + skb_set_link_header_offset(nskb, -ETH_HLEN); nskb->nh.raw = nskb->data; iph = nskb->nh.iph; memcpy(nskb->data, skb->nh.raw, doffset); diff -Nru a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c --- a/drivers/net/myri_sbus.c 2004-10-05 17:06:15 -03:00 +++ b/drivers/net/myri_sbus.c 2004-10-05 17:06:15 -03:00 @@ -374,7 +374,7 @@ struct ethhdr *eth; unsigned char *rawp; - skb->mac.raw = (((unsigned char *)skb->data) + MYRI_PAD_LEN); + skb_set_link_header_offset(skb, MYRI_PAD_LEN); skb_pull(skb, dev->hard_header_len); eth = eth_hdr(skb); diff -Nru a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c --- a/drivers/s390/net/qeth_main.c 2004-10-05 17:06:15 -03:00 +++ b/drivers/s390/net/qeth_main.c 2004-10-05 17:06:15 -03:00 @@ -2173,7 +2173,7 @@ struct iphdr *ip_hdr; QETH_DBF_TEXT(trace,5,"skbfake"); - skb->mac.raw = skb->data - QETH_FAKE_LL_LEN; + skb_set_link_header_offset(skb, -QETH_FAKE_LL_LEN); /* this is a fake ethernet header */ fake_hdr = eth_hdr(skb); diff -Nru a/include/linux/skbuff.h b/include/linux/skbuff.h --- a/include/linux/skbuff.h 2004-10-05 17:06:15 -03:00 +++ b/include/linux/skbuff.h 2004-10-05 17:06:15 -03:00 @@ -295,6 +295,12 @@ skb->mac.raw = skb->data; } +static inline void skb_set_link_header_offset(struct sk_buff *skb, + const int offset) +{ + skb->mac.raw = skb->data + offset; +} + static inline int skb_valid_link_header(const struct sk_buff *skb, const int hdrlen) { diff -Nru a/net/atm/br2684.c b/net/atm/br2684.c --- a/net/atm/br2684.c 2004-10-05 17:06:15 -03:00 +++ b/net/atm/br2684.c 2004-10-05 17:06:15 -03:00 @@ -460,7 +460,7 @@ /* FIXME: tcpdump shows that pointer to mac header is 2 bytes earlier, than should be. What else should I set? */ skb_pull(skb, plen); - skb->mac.raw = ((char *) (skb->data)) - ETH_HLEN; + skb_set_link_header_offset(skb, -ETH_HLEN); skb->pkt_type = PACKET_HOST; #ifdef CONFIG_BR2684_FAST_TRANS skb->protocol = ((u16 *) skb->data)[-1]; --------------090101030603080600010900-- From davem@davemloft.net Tue Oct 5 13:28:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 13:28:05 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95KRxFn018046 for ; Tue, 5 Oct 2004 13:28:00 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEvu8-0005yN-00; Tue, 05 Oct 2004 13:27:24 -0700 Date: Tue, 5 Oct 2004 13:27:24 -0700 From: "David S. Miller" To: Manfred Spraul Cc: netdev@oss.sgi.com Subject: Re: [PATCH] fix secure tcp sequence number generation Message-Id: <20041005132724.6a913c48.davem@davemloft.net> In-Reply-To: <415EEF0E.3080808@colorfullife.com> References: <415EEF0E.3080808@colorfullife.com> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9940 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 1459 Lines: 34 On Sat, 02 Oct 2004 20:10:22 +0200 Manfred Spraul wrote: > Description: > The tcp sequence number generator needs a random seed that is reset every > few minutes. Since the sequence numbers should be constantly increasing, > for each rekey 2^24 is added to the sequence number. > The actual use of the sequence number generator is lockless, > synchronization is achieved by having two copies of the control structure. > > The attached patch: > - fixes a race in rekey_seq_generator(): schedule_work doesn't > provide synchronization. > - Uses schedule_delayed_work() for the rekey: simplifies synchronization > and speeds up the hot path. > - replaces do_gettimeofday with get_seconds(): get_seconds is faster and > usec resolution is not required. > - removes tmpdata - not needed with new locking. > - Adds a late_initcall for the first initialization after boot. > init_call would be too early, I've checked that the late_initcall runs > before net/ipv4/ipconfig.c, i.e. the BOOTP/DHCP autoconfiguration. > > Signed-Off-By: Manfred Spraul I like this patch, but you may have sent the wrong copy. You mention in the description that you changed over to use get_seconds(), yet the only reference to get_seconds() in the patch is: - keyptr = check_and_rekey(get_seconds()); + keyptr = get_keyptr(); Please clarify that this is just a brain fart in the description and not the patch. From davem@davemloft.net Tue Oct 5 13:38:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 13:38:36 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95KcVSB018517 for ; Tue, 5 Oct 2004 13:38:31 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEw4I-0005zM-00; Tue, 05 Oct 2004 13:37:54 -0700 Date: Tue, 5 Oct 2004 13:37:54 -0700 From: "David S. Miller" To: Thomas Graf Cc: netdev@oss.sgi.com Subject: Re: [PATCH] PKT_SCHED: Remove useless line in cbq_dump_class Message-Id: <20041005133754.154cf9ee.davem@davemloft.net> In-Reply-To: <20041003221452.GL14344@postel.suug.ch> References: <20041003221452.GL14344@postel.suug.ch> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9941 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 428 Lines: 15 On Mon, 4 Oct 2004 00:14:52 +0200 Thomas Graf wrote: > Remove useless line in cbq_dump_class probably introduced by > copy&paste from cbq_dump. > > Signed-off-by: Thomas Graf Applied to both 2.4.x and 2.6.x, thanks Thomas. If you could check quickly whether a 2.6.x patch you post is a relevant bug fix for 2.4.x, that would help me out a lot in processing your patches efficiently. Thanks. From manfred@colorfullife.com Tue Oct 5 13:42:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 13:42:22 -0700 (PDT) Received: from dbl.q-ag.de (dbl.q-ag.de [213.172.117.3]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95KgElV018867 for ; Tue, 5 Oct 2004 13:42:15 -0700 Received: from [127.0.0.2] (dbl [127.0.0.1]) by dbl.q-ag.de (8.12.3/8.12.3/Debian-6.6) with ESMTP id i95Kft8L012268; Tue, 5 Oct 2004 22:41:57 +0200 Message-ID: <41630713.2080606@colorfullife.com> Date: Tue, 05 Oct 2004 22:41:55 +0200 From: Manfred Spraul User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" CC: netdev@oss.sgi.com Subject: Re: [PATCH] fix secure tcp sequence number generation References: <415EEF0E.3080808@colorfullife.com> <20041005132724.6a913c48.davem@davemloft.net> In-Reply-To: <20041005132724.6a913c48.davem@davemloft.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 9942 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: manfred@colorfullife.com Precedence: bulk X-list: netdev Content-Length: 1793 Lines: 49 David S. Miller wrote: >On Sat, 02 Oct 2004 20:10:22 +0200 >Manfred Spraul wrote: > > > >>Description: >>The tcp sequence number generator needs a random seed that is reset every >>few minutes. Since the sequence numbers should be constantly increasing, >>for each rekey 2^24 is added to the sequence number. >>The actual use of the sequence number generator is lockless, >>synchronization is achieved by having two copies of the control structure. >> >>The attached patch: >>- fixes a race in rekey_seq_generator(): schedule_work doesn't >> provide synchronization. >>- Uses schedule_delayed_work() for the rekey: simplifies synchronization >> and speeds up the hot path. >>- replaces do_gettimeofday with get_seconds(): get_seconds is faster and >> usec resolution is not required. >>- removes tmpdata - not needed with new locking. >>- Adds a late_initcall for the first initialization after boot. >> init_call would be too early, I've checked that the late_initcall runs >> before net/ipv4/ipconfig.c, i.e. the BOOTP/DHCP autoconfiguration. >> >>Signed-Off-By: Manfred Spraul >> >> > >I like this patch, but you may have sent the wrong copy. You >mention in the description that you changed over to use >get_seconds(), yet the only reference to get_seconds() in the >patch is: > >- keyptr = check_and_rekey(get_seconds()); >+ keyptr = get_keyptr(); > >Please clarify that this is just a brain fart in the description >and not the patch. > > Right patch but wrong description, sorry: I've recycled the description from the previous patch and that one used get_seconds() in rekey_seq_generator(). Now rekey_seq_generator() doesn't access the time at all, that's done within schedule_delayed_work(). -- Manfred From acme@conectiva.com.br Tue Oct 5 13:53:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 13:53:21 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95Kr7o8019277 for ; Tue, 5 Oct 2004 13:53:14 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 1AC744735E; Tue, 5 Oct 2004 17:52:51 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id C4CDE472F7 for ; Tue, 5 Oct 2004 17:52:50 -0300 (BRT) Received: (qmail 26208 invoked by uid 0); 5 Oct 2004 21:49:52 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 5 Oct 2004 21:49:52 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id 06F7014639; Tue, 5 Oct 2004 17:56:02 -0300 (BRT) Message-ID: <41630A1A.5040808@conectiva.com.br> Date: Tue, 05 Oct 2004 17:54:50 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dav@conectiva.com.br Cc: netdev@oss.sgi.com Subject: PATCH: [SKBUFF] introduce skb_link_header_data_offset(skb) X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------050307020301000802030106" X-Bogosity: No, tests=bogofilter, spamicity=0.143431, version=0.16.3 X-archive-position: 9943 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 Content-Length: 3195 Lines: 102 This is a multi-part message in MIME format. --------------050307020301000802030106 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi David, Please consider pulling from: bk://kernel.bkbits.net/acme/sk_buff-2.6 Now there are 15 outstanding changesets in this tree. Regards, - Arnaldo --------------050307020301000802030106 Content-Type: text/plain; name="skb_link_header_data_offset.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="skb_link_header_data_offset.patch" =================================================================== ChangeSet@1.2044, 2004-10-05 17:51:20-03:00, acme@conectiva.com.br [SKBUFF] introduce skb_link_header_data_offset(skb) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller include/linux/skbuff.h | 5 +++++ net/ax25/af_ax25.c | 4 +++- net/packet/af_packet.c | 6 +++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff -Nru a/include/linux/skbuff.h b/include/linux/skbuff.h --- a/include/linux/skbuff.h 2004-10-05 17:52:24 -03:00 +++ b/include/linux/skbuff.h 2004-10-05 17:52:24 -03:00 @@ -313,6 +313,11 @@ return skb->nh.raw - skb->mac.raw; } +static inline int skb_link_header_data_offset(const struct sk_buff *skb) +{ + return skb->data - skb->mac.raw; +} + extern void __kfree_skb(struct sk_buff *skb); extern struct sk_buff *alloc_skb(unsigned int size, int priority); extern void kfree_skbmem(struct sk_buff *skb); diff -Nru a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c --- a/net/ax25/af_ax25.c 2004-10-05 17:52:24 -03:00 +++ b/net/ax25/af_ax25.c 2004-10-05 17:52:24 -03:00 @@ -1632,7 +1632,9 @@ ax25_digi digi; ax25_address src; - ax25_addr_parse(skb->mac.raw+1, skb->data-skb->mac.raw-1, &src, NULL, &digi, NULL, NULL); + ax25_addr_parse(skb->mac.raw + 1, + skb_link_header_data_offset(skb) - 1, + &src, NULL, &digi, NULL, NULL); sax->sax25_family = AF_AX25; /* We set this correctly, even though we may not let the diff -Nru a/net/packet/af_packet.c b/net/packet/af_packet.c --- a/net/packet/af_packet.c 2004-10-05 17:52:24 -03:00 +++ b/net/packet/af_packet.c 2004-10-05 17:52:24 -03:00 @@ -274,7 +274,7 @@ spkt = (struct sockaddr_pkt*)skb->cb; - skb_push(skb, skb->data-skb->mac.raw); + skb_push(skb, skb_link_header_data_offset(skb)); /* * The SOCK_PACKET socket receives _all_ frames. @@ -462,7 +462,7 @@ never delivered to user. */ if (sk->sk_type != SOCK_DGRAM) - skb_push(skb, skb->data - skb->mac.raw); + skb_push(skb, skb_link_header_data_offset(skb)); else if (skb->pkt_type == PACKET_OUTGOING) { /* Special case: outgoing packets have ll header at head */ skb_pull(skb, skb->nh.raw - skb->data); @@ -559,7 +559,7 @@ if (dev->hard_header) { if (sk->sk_type != SOCK_DGRAM) - skb_push(skb, skb->data - skb->mac.raw); + skb_push(skb, skb_link_header_data_offset(skb)); else if (skb->pkt_type == PACKET_OUTGOING) { /* Special case: outgoing packets have ll header at head */ skb_pull(skb, skb->nh.raw - skb->data); --------------050307020301000802030106-- From davem@redhat.com Tue Oct 5 13:55:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 13:55:33 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95KtRJv019712 for ; Tue, 5 Oct 2004 13:55:27 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i95Ks1eM016429; Tue, 5 Oct 2004 16:54:02 -0400 Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i95Krur07170; Tue, 5 Oct 2004 16:53:56 -0400 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.11/8.12.10) with SMTP id i95Krc9X004128; Tue, 5 Oct 2004 16:53:39 -0400 Date: Tue, 5 Oct 2004 13:53:38 -0700 From: "David S. Miller" To: Arnaldo Carvalho de Melo Cc: netdev@oss.sgi.com Subject: Re: PATCH: [SKBUFF] Introduce skb_set_link_header_offset(skb, offset) Message-Id: <20041005135338.6f381fa1.davem@redhat.com> In-Reply-To: <4162FF64.4050108@conectiva.com.br> References: <4162FF64.4050108@conectiva.com.br> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9944 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: 1103 Lines: 35 On Tue, 05 Oct 2004 17:09:08 -0300 Arnaldo Carvalho de Melo wrote: > Hi David, > > Please consider pulling from: > > bk://kernel.bkbits.net/acme/sk_buff-2.4 > > Now there are 14 outstanding changesets in this tree. Slow down. :-) There are bugs in your earlier changesets which are going to make it hard for me to pull this tree in. Let's work one or two changesets at a time, not 14 ok? :-) First bug, in ChangeSet 1.2032, drivers/net/wireless/orinoco.c You change "skb->mac.raw + ETH_ALEN" into "eth_hdr(skb)->h_source". That can't be right since orinoco_spy_gather() expects a pointer for that argument. Same error in the drivers/net/wireless/wavelan.c change in ChangeSet 1.2032, replacing skb->mac.raw (a pointer) with eth_hdr(skb)->h_dest in the call to wv_packet_info. And then "skb->mac.raw + WAVELAN_ADDR_SIZE" into "eth_hdr(skb)->h_source" in the call to wl_spy_gather(). The same errors occur all the changes to drivers/net/wireless/wavelan_cs.c of the same ChangeSet. Please start to submit this stuff in smaller pieces and fix the above bugs, thanks. From davem@davemloft.net Tue Oct 5 14:03:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 14:03:47 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95L3bIt020444 for ; Tue, 5 Oct 2004 14:03:37 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEwSe-00062c-00; Tue, 05 Oct 2004 14:03:04 -0700 Date: Tue, 5 Oct 2004 14:03:04 -0700 From: "David S. Miller" To: Thomas Graf Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2/3] NET: Generic rate estimator Message-Id: <20041005140304.6d0d5f02.davem@davemloft.net> In-Reply-To: <20041003235737.GO14344@postel.suug.ch> References: <20041003213124.GG14344@postel.suug.ch> <20041003213954.GI14344@postel.suug.ch> <20041003161436.50293f9a.davem@davemloft.net> <20041003235737.GO14344@postel.suug.ch> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9945 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 19876 Lines: 677 On Mon, 4 Oct 2004 01:57:37 +0200 Thomas Graf wrote: > * David S. Miller <20041003161436.50293f9a.davem@davemloft.net> 2004-10-03 16:14 > > First, how does this new thing ever get built into the tree? > > I misunderstood you before and didn't realize I missed to diff the > Makefile part. Sorry about that. Ok, so I combined all of the work into one big patch and checked it into my tree as follows: # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/05 13:38:47-07:00 davem@nuts.davemloft.net # [NET]: Generic network statistics/estimator # # Work done by Thomas Graf and # Jamal Hadi Salim # # The following patchset introduces generic network statistics for # netlink users. It uses nested TLV which prevents further compatibility # problems when introducing new statistics. Backward compatibility to # existing TLV types TCA_STATS and TCA_XSTATS is ensured but can be # easly removed once it is no longer needed. Therefore prior users of # struct tc_stats can be converted to this API and existing userspace # applications will not notice a difference while converted applications # can use the new extendable statistic interface. # # Changes: # - Add generic network statistics API for netlink users. # - Introduces a generic rate estimator based on timers. Patch is based # on Jamals patch and adapted to the new generic network statistics # API. # - Add documentation of generic network statistics and estimator API. # # Signed-off-by: Thomas Graf # Signed-off-by: Jamal Hadi Salim # Signed-off-by: David S. Miller # # net/core/Makefile # 2004/10/05 13:36:58-07:00 davem@nuts.davemloft.net +1 -1 # [NET]: Generic network statistics/estimator # # net/core/gen_stats.c # 2004/10/05 13:36:52-07:00 davem@nuts.davemloft.net +132 -0 # [NET]: Generic network statistics/estimator # # net/core/gen_estimator.c # 2004/10/05 13:36:52-07:00 davem@nuts.davemloft.net +204 -0 # [NET]: Generic network statistics/estimator # # include/net/gen_stats.h # 2004/10/05 13:36:52-07:00 davem@nuts.davemloft.net +45 -0 # [NET]: Generic network statistics/estimator # # Documentation/networking/gen_stats.txt # 2004/10/05 13:36:52-07:00 davem@nuts.davemloft.net +117 -0 # [NET]: Generic network statistics/estimator # # net/core/gen_stats.c # 2004/10/05 13:36:52-07:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/net-2.6/net/core/gen_stats.c # # net/core/gen_estimator.c # 2004/10/05 13:36:52-07:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/net-2.6/net/core/gen_estimator.c # # include/net/gen_stats.h # 2004/10/05 13:36:52-07:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/net-2.6/include/net/gen_stats.h # # include/linux/gen_stats.h # 2004/10/05 13:36:51-07:00 davem@nuts.davemloft.net +62 -0 # [NET]: Generic network statistics/estimator # # Documentation/networking/gen_stats.txt # 2004/10/05 13:36:52-07:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/net-2.6/Documentation/networking/gen_stats.txt # # include/linux/gen_stats.h # 2004/10/05 13:36:51-07:00 davem@nuts.davemloft.net +0 -0 # BitKeeper file /disk1/BK/net-2.6/include/linux/gen_stats.h # diff -Nru a/Documentation/networking/gen_stats.txt b/Documentation/networking/gen_stats.txt --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/Documentation/networking/gen_stats.txt 2004-10-05 13:41:59 -07:00 @@ -0,0 +1,117 @@ +Generic networking statistics for netlink users +====================================================================== + +Statistic counters are grouped into structs: + +Struct TLV type Description +---------------------------------------------------------------------- +gnet_stats_basic TCA_STATS_BASIC Basic statistics +gnet_stats_rate_est TCA_STATS_RATE_EST Rate estimator +gnet_stats_queue TCA_STATS_QUEUE Queue statistics +none TCA_STATS_APP Application specific + + +Collecting: +----------- + +Declare the statistic structs you need: +struct mystruct { + struct gnet_stats_basic bstats; + struct gnet_stats_queue qstats; + ... +}; + +Update statistics: +mystruct->tstats.packet++; +mystruct->qstats.backlog += skb->pkt_len; + + +Export to userspace (Dump): +--------------------------- + +my_dumping_routine(struct sk_buff *skb, ...) +{ + struct gnet_dump dump; + + if (gnet_stats_start_copy(skb, TCA_STATS2, &mystruct->lock, &dump) < 0) + goto rtattr_failure; + + if (gnet_stats_copy_basic(&dump, &mystruct->bstats) < 0 || + gnet_stats_copy_queue(&dump, &mystruct->qstats) < 0 || + gnet_stats_copy_app(&dump, &xstats, sizeof(xstats)) < 0) + goto rtattr_failure; + + if (gnet_stats_finish_copy(&dump) < 0) + goto rtattr_failure; + ... +} + +TCA_STATS/TCA_XSTATS backward compatibility: +-------------------------------------------- + +Prior users of struct tc_stats and xstats can maintain backward +compatibility by calling the compat wrappers to keep providing the +existing TLV types. + +my_dumping_routine(struct sk_buff *skb, ...) +{ + if (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS, + TCA_XSTATS, &mystruct->lock, &dump) < 0) + goto rtattr_failure; + ... +} + +A struct tc_stats will be filled out during gnet_stats_copy_* calls +and appended to the skb. TCA_XSTATS is provided if gnet_stats_copy_app +was called. + + +Locking: +-------- + +Locks are taken before writing and released once all statistics have +been written. Locks are always released in case of an error. You +are responsible for making sure that the lock is initialized. + + +Rate Estimator: +-------------- + +0) Prepare an estimator attribute. Most likely this would be in user + space. The value of this TLV should contain a tc_estimator structure. + As usual, such a TLV nees to be 32 bit aligned and therefore the + length needs to be appropriately set etc. The estimator interval + and ewma log need to be converted to the appropriate values. + tc_estimator.c::tc_setup_estimator() is advisable to be used as the + conversion routine. It does a few clever things. It takes a time + interval in microsecs, a time constant also in microsecs and a struct + tc_estimator to be populated. The returned tc_estimator can be + transported to the kernel. Transfer such a structure in a TLV of type + TCA_RATE to your code in the kernel. + +In the kernel when setting up: +1) make sure you have basic stats and rate stats setup first. +2) make sure you have initialized stats lock that is used to setup such + stats. +3) Now initialize a new estimator: + + int ret = gen_new_estimator(my_basicstats,my_rate_est_stats, + mystats_lock, attr_with_tcestimator_struct); + + if ret == 0 + success + else + failed + +From now on, everytime you dump my_rate_est_stats it will contain +uptodate info. + +Once you are done, call gen_kill_estimator(my_basicstats, +my_rate_est_stats) Make sure that my_basicstats and my_rate_est_stats +are still valid (i.e still exist) at the time of making this call. + + +Authors: +-------- +Thomas Graf +Jamal Hadi Salim diff -Nru a/include/linux/gen_stats.h b/include/linux/gen_stats.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/linux/gen_stats.h 2004-10-05 13:41:59 -07:00 @@ -0,0 +1,62 @@ +#ifndef __LINUX_GEN_STATS_H +#define __LINUX_GEN_STATS_H + +#include + +enum { + TCA_STATS_UNSPEC, + TCA_STATS_BASIC, + TCA_STATS_RATE_EST, + TCA_STATS_QUEUE, + TCA_STATS_APP, + __TCA_STATS_MAX, +}; +#define TCA_STATS_MAX (__TCA_STATS_MAX - 1) + +/** + * @bytes: number of seen bytes + * @packets: number of seen packets + */ +struct gnet_stats_basic +{ + __u64 bytes; + __u32 packets; +}; + +/** + * @bps: current byte rate + * @pps: current packet rate + */ +struct gnet_stats_rate_est +{ + __u32 bps; + __u32 pps; +}; + +/** + * @qlen: queue length + * @backlog: backlog size of queue + * @drops: number of dropped packets + * @requeues: number of requeues + */ +struct gnet_stats_queue +{ + __u32 qlen; + __u32 backlog; + __u32 drops; + __u32 requeues; + __u32 overlimits; +}; + +/** + * @interval: sampling period + * @ewma_log: the log of measurement window weight + */ +struct gnet_estimator +{ + signed char interval; + unsigned char ewma_log; +}; + + +#endif /* __LINUX_GEN_STATS_H */ diff -Nru a/include/net/gen_stats.h b/include/net/gen_stats.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/include/net/gen_stats.h 2004-10-05 13:41:59 -07:00 @@ -0,0 +1,45 @@ +#ifndef __NET_GEN_STATS_H +#define __NET_GEN_STATS_H + +#include +#include +#include +#include + +struct gnet_dump +{ + spinlock_t * lock; + struct sk_buff * skb; + struct rtattr * tail; + + /* Backward compatability */ + int compat_tc_stats; + int compat_xstats; + struct rtattr * xstats; + struct tc_stats tc_stats; +}; + +extern int gnet_stats_start_copy(struct sk_buff *skb, int type, + spinlock_t *lock, struct gnet_dump *d); + +extern int gnet_stats_start_copy_compat(struct sk_buff *skb, int type, + int tc_stats_type,int xstats_type, + spinlock_t *lock, struct gnet_dump *d); + +extern int gnet_stats_copy_basic(struct gnet_dump *d, + struct gnet_stats_basic *b); +extern int gnet_stats_copy_rate_est(struct gnet_dump *d, + struct gnet_stats_rate_est *r); +extern int gnet_stats_copy_queue(struct gnet_dump *d, + struct gnet_stats_queue *q); +extern int gnet_stats_copy_app(struct gnet_dump *d, void *st, int len); + +extern int gnet_stats_finish_copy(struct gnet_dump *d); + +extern int gen_new_estimator(struct gnet_stats_basic *bstats, + struct gnet_stats_rate_est *rate_est, + spinlock_t *stats_lock, struct rtattr *opt); +extern void gen_kill_estimator(struct gnet_stats_basic *bstats, + struct gnet_stats_rate_est *rate_est); + +#endif diff -Nru a/net/core/Makefile b/net/core/Makefile --- a/net/core/Makefile 2004-10-05 13:41:59 -07:00 +++ b/net/core/Makefile 2004-10-05 13:41:59 -07:00 @@ -2,7 +2,7 @@ # Makefile for the Linux networking core. # -obj-y := sock.o skbuff.o iovec.o datagram.o stream.o scm.o +obj-y := sock.o skbuff.o iovec.o datagram.o stream.o scm.o gen_stats.o gen_estimator.o obj-$(CONFIG_SYSCTL) += sysctl_net_core.o diff -Nru a/net/core/gen_estimator.c b/net/core/gen_estimator.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/net/core/gen_estimator.c 2004-10-05 13:41:59 -07:00 @@ -0,0 +1,204 @@ +/* + * net/sched/gen_estimator.c Simple rate estimator. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * Authors: Alexey Kuznetsov, + * + * Changes: + * Jamal Hadi Salim - moved it to net/core and reshulfed + * names to make it usable in general net subsystem. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + This code is NOT intended to be used for statistics collection, + its purpose is to provide a base for statistical multiplexing + for controlled load service. + If you need only statistics, run a user level daemon which + periodically reads byte counters. + + Unfortunately, rate estimation is not a very easy task. + F.e. I did not find a simple way to estimate the current peak rate + and even failed to formulate the problem 8)8) + + So I preferred not to built an estimator into the scheduler, + but run this task separately. + Ideally, it should be kernel thread(s), but for now it runs + from timers, which puts apparent top bounds on the number of rated + flows, has minimal overhead on small, but is enough + to handle controlled load service, sets of aggregates. + + We measure rate over A=(1<next) { + u64 nbytes; + u32 npackets; + u32 rate; + + spin_lock(e->stats_lock); + nbytes = e->bstats->bytes; + npackets = e->bstats->packets; + rate = (nbytes - e->last_bytes)<<(7 - idx); + e->last_bytes = nbytes; + e->avbps += ((long)rate - (long)e->avbps) >> e->ewma_log; + e->rate_est->bps = (e->avbps+0xF)>>5; + + rate = (npackets - e->last_packets)<<(12 - idx); + e->last_packets = npackets; + e->avpps += ((long)rate - (long)e->avpps) >> e->ewma_log; + e->rate_est->pps = (e->avpps+0x1FF)>>10; + spin_unlock(e->stats_lock); + } + + mod_timer(&elist[idx].timer, jiffies + ((HZ<interval < -2 || parm->interval > 3) + return -EINVAL; + + est = kmalloc(sizeof(*est), GFP_KERNEL); + if (est == NULL) + return -ENOBUFS; + + memset(est, 0, sizeof(*est)); + est->interval = parm->interval + 2; + est->bstats = bstats; + est->rate_est = rate_est; + est->stats_lock = stats_lock; + est->ewma_log = parm->ewma_log; + est->last_bytes = bstats->bytes; + est->avbps = rate_est->bps<<5; + est->last_packets = bstats->packets; + est->avpps = rate_est->pps<<10; + + est->next = elist[est->interval].list; + if (est->next == NULL) { + init_timer(&elist[est->interval].timer); + elist[est->interval].timer.data = est->interval; + elist[est->interval].timer.expires = jiffies + ((HZ<interval)/4); + elist[est->interval].timer.function = est_timer; + add_timer(&elist[est->interval].timer); + } + write_lock_bh(&est_lock); + elist[est->interval].list = est; + write_unlock_bh(&est_lock); + return 0; +} + +void gen_kill_estimator(struct gnet_stats_basic *bstats, + struct gnet_stats_rate_est *rate_est) +{ + int idx; + struct gen_estimator *est, **pest; + + for (idx=0; idx <= EST_MAX_INTERVAL; idx++) { + int killed = 0; + pest = &elist[idx].list; + while ((est=*pest) != NULL) { + if (est->rate_est != rate_est || est->bstats != bstats) { + pest = &est->next; + continue; + } + + write_lock_bh(&est_lock); + *pest = est->next; + write_unlock_bh(&est_lock); + + kfree(est); + killed++; + } + if (killed && elist[idx].list == NULL) + del_timer(&elist[idx].timer); + } +} + +EXPORT_SYMBOL(gen_kill_estimator); +EXPORT_SYMBOL(gen_new_estimator); diff -Nru a/net/core/gen_stats.c b/net/core/gen_stats.c --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/net/core/gen_stats.c 2004-10-05 13:41:59 -07:00 @@ -0,0 +1,132 @@ +/* + * net/core/gen_stats.c + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * Authors: Thomas Graf + * Jamal Hadi Salim + * Alexey Kuznetsov, + * + * See Documentation/networking/gen_stats.txt + */ + +#include +#include +#include +#include +#include +#include +#include +#include + + +static inline int +gnet_stats_copy(struct gnet_dump *d, int type, void *buf, int size) +{ + RTA_PUT(d->skb, type, size, buf); + return 0; + +rtattr_failure: + spin_unlock_bh(d->lock); + return -1; +} + +int +gnet_stats_start_copy_compat(struct sk_buff *skb, int type, int tc_stats_type, + int xstats_type, spinlock_t *lock, struct gnet_dump *d) +{ + spin_lock_bh(lock); + d->lock = lock; + d->tail = (struct rtattr *) skb->tail; + d->skb = skb; + d->compat_tc_stats = tc_stats_type; + d->compat_xstats = xstats_type; + d->xstats = NULL; + + if (d->compat_tc_stats) + memset(&d->tc_stats, 0, sizeof(d->tc_stats)); + + return gnet_stats_copy(d, type, NULL, 0); +} + +int +gnet_stats_start_copy(struct sk_buff *skb, int type, spinlock_t *lock, + struct gnet_dump *d) +{ + return gnet_stats_start_copy_compat(skb, type, 0, 0, lock, d); +} + + +int +gnet_stats_copy_basic(struct gnet_dump *d, struct gnet_stats_basic *b) +{ + if (d->compat_tc_stats) { + d->tc_stats.bytes = b->bytes; + d->tc_stats.packets = b->packets; + } + + return gnet_stats_copy(d, TCA_STATS_BASIC, b, sizeof(*b)); +} + +int +gnet_stats_copy_rate_est(struct gnet_dump *d, struct gnet_stats_rate_est *r) +{ + if (d->compat_tc_stats) { + d->tc_stats.bps = r->bps; + d->tc_stats.pps = r->pps; + } + + return gnet_stats_copy(d, TCA_STATS_RATE_EST, r, sizeof(*r)); +} + +int +gnet_stats_copy_queue(struct gnet_dump *d, struct gnet_stats_queue *q) +{ + if (d->compat_tc_stats) { + d->tc_stats.drops = q->drops; + d->tc_stats.qlen = q->qlen; + d->tc_stats.backlog = q->backlog; + d->tc_stats.overlimits = q->overlimits; + } + + return gnet_stats_copy(d, TCA_STATS_QUEUE, q, sizeof(*q)); +} + +int +gnet_stats_copy_app(struct gnet_dump *d, void *st, int len) +{ + if (d->compat_xstats) + d->xstats = (struct rtattr *) d->skb->tail; + return gnet_stats_copy(d, TCA_STATS_APP, st, len); +} + +int +gnet_stats_finish_copy(struct gnet_dump *d) +{ + d->tail->rta_len = d->skb->tail - (u8 *) d->tail; + + if (d->compat_tc_stats) + if (gnet_stats_copy(d, d->compat_tc_stats, &d->tc_stats, + sizeof(d->tc_stats)) < 0) + return -1; + + if (d->compat_xstats && d->xstats) { + if (gnet_stats_copy(d, d->compat_xstats, RTA_DATA(d->xstats), + RTA_PAYLOAD(d->xstats)) < 0) + return -1; + } + + spin_unlock_bh(d->lock); + return 0; +} + + +EXPORT_SYMBOL(gnet_stats_start_copy); +EXPORT_SYMBOL(gnet_stats_copy_basic); +EXPORT_SYMBOL(gnet_stats_copy_rate_est); +EXPORT_SYMBOL(gnet_stats_copy_queue); +EXPORT_SYMBOL(gnet_stats_copy_app); +EXPORT_SYMBOL(gnet_stats_finish_copy); From davem@davemloft.net Tue Oct 5 14:05:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 14:05:57 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95L5qsf020845 for ; Tue, 5 Oct 2004 14:05:52 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEwUp-000635-00; Tue, 05 Oct 2004 14:05:19 -0700 Date: Tue, 5 Oct 2004 14:05:18 -0700 From: "David S. Miller" To: hadi@cyberus.ca Cc: tgraf@suug.ch, netdev@oss.sgi.com Subject: Re: [PATCH] PKT_SCHED: Make rate estimator work for all platforms Message-Id: <20041005140518.1a3af06c.davem@davemloft.net> In-Reply-To: <1096933654.2163.1.camel@jzny.localdomain> References: <20041004211152.GF15898@postel.suug.ch> <1096933654.2163.1.camel@jzny.localdomain> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9946 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 190 Lines: 9 On 04 Oct 2004 19:47:34 -0400 jamal wrote: > > Looking good. > Dave, Please apply all the patches (earlier 3 + this one) that Thomas > posted. All applied, thanks guys. From acme@conectiva.com.br Tue Oct 5 14:23:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 14:23:44 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95LNYQJ021893 for ; Tue, 5 Oct 2004 14:23:39 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 443E14741B; Tue, 5 Oct 2004 18:23:11 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 0D2CB4740E for ; Tue, 5 Oct 2004 18:23:11 -0300 (BRT) Received: (qmail 30131 invoked by uid 0); 5 Oct 2004 22:20:12 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 5 Oct 2004 22:20:12 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id 6AE2314639; Tue, 5 Oct 2004 18:26:20 -0300 (BRT) Message-ID: <41631135.5040609@conectiva.com.br> Date: Tue, 05 Oct 2004 18:25:09 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: PATCH: [SKBUFF] Introduce skb_set_link_header_offset(skb, offset) References: <4162FF64.4050108@conectiva.com.br> <20041005135338.6f381fa1.davem@redhat.com> In-Reply-To: <20041005135338.6f381fa1.davem@redhat.com> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Bogosity: No, tests=bogofilter, spamicity=0.132015, version=0.16.3 X-archive-position: 9947 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 Content-Length: 1487 Lines: 55 David S. Miller wrote: > On Tue, 05 Oct 2004 17:09:08 -0300 > Arnaldo Carvalho de Melo wrote: > > >>Hi David, >> >> Please consider pulling from: >> >>bk://kernel.bkbits.net/acme/sk_buff-2.4 >> >> Now there are 14 outstanding changesets in this tree. > > > Slow down. :-) Oh, flow control! :-) > > There are bugs in your earlier changesets which are going > to make it hard for me to pull this tree in. Let's work > one or two changesets at a time, not 14 ok? :-) > > First bug, in ChangeSet 1.2032, drivers/net/wireless/orinoco.c > > You change "skb->mac.raw + ETH_ALEN" into > "eth_hdr(skb)->h_source". That can't be right > since orinoco_spy_gather() expects a pointer for > that argument. > > Same error in the drivers/net/wireless/wavelan.c change > in ChangeSet 1.2032, replacing skb->mac.raw (a pointer) > with eth_hdr(skb)->h_dest in the call to wv_packet_info. humm, puzzled, isn't eth_hdr(skb)->h_dest a pointer of the same tipe (unsigned char *), that points to same place as skb->mac.raw? :-) But perhaps the guy wanted the whole link header, I got confused because afterwards it uses the ETH_ALEN offset, meaning that it wanted now the second struct ethhdr field, lemme look again at this code... Nope, you're right, seems to be the 802.11 three adresses stuff, done in an ad-hoc confusing way, my mistake. > Please start to submit this stuff in smaller pieces and > fix the above bugs, thanks. mmkay sir! Best Regards, - Arnaldo From davem@davemloft.net Tue Oct 5 14:32:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 14:32:13 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95LW6v0022297 for ; Tue, 5 Oct 2004 14:32:07 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CEwuB-00066J-00; Tue, 05 Oct 2004 14:31:31 -0700 Date: Tue, 5 Oct 2004 14:31:31 -0700 From: "David S. Miller" To: Manfred Spraul Cc: netdev@oss.sgi.com Subject: Re: [PATCH] fix secure tcp sequence number generation Message-Id: <20041005143131.6babd2c7.davem@davemloft.net> In-Reply-To: <41630713.2080606@colorfullife.com> References: <415EEF0E.3080808@colorfullife.com> <20041005132724.6a913c48.davem@davemloft.net> <41630713.2080606@colorfullife.com> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9948 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 385 Lines: 11 On Tue, 05 Oct 2004 22:41:55 +0200 Manfred Spraul wrote: > Right patch but wrong description, sorry: > I've recycled the description from the previous patch and that one used > get_seconds() in rekey_seq_generator(). Now rekey_seq_generator() > doesn't access the time at all, that's done within schedule_delayed_work(). Great, I'll apply then. Thanks. From acme@conectiva.com.br Tue Oct 5 15:05:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 15:05:38 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95M5Q5I023156 for ; Tue, 5 Oct 2004 15:05:27 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 3CBF9472E5; Tue, 5 Oct 2004 19:05:08 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 78721472E5 for ; Tue, 5 Oct 2004 19:05:07 -0300 (BRT) Received: (qmail 2167 invoked by uid 0); 5 Oct 2004 23:02:06 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 5 Oct 2004 23:02:06 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id E5D9314639; Tue, 5 Oct 2004 19:08:04 -0300 (BRT) Message-ID: <41631AFD.7020706@conectiva.com.br> Date: Tue, 05 Oct 2004 19:06:53 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 1/2] [SKBUFF] introduce eth_hdr(skb) X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------040209030209010804080204" X-Bogosity: No, tests=bogofilter, spamicity=0.485926, version=0.16.3 X-archive-position: 9949 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 Content-Length: 23747 Lines: 692 This is a multi-part message in MIME format. --------------040209030209010804080204 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi David, Please consider pulling (after the next one :) ) from: bk://kernel.bkbits.net/acme/sk_buff-2.6 Ah, this is over a almost fresh Linus tree, newer than the one used as a base for the previous aborted series, please let me know if this is an issue. Best Regards, - Arnaldo --------------040209030209010804080204 Content-Type: text/plain; name="eth_hdr.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="eth_hdr.patch" =================================================================== ChangeSet@1.2053, 2004-10-05 18:51:10-03:00, acme@conectiva.com.br [SKBUFF] introduce eth_hdr(skb) This is the start of a series of patches to remove protocol specific stuff out of include/linux/skbuff.h and to make the struct sk_buff header pointers private, i.e. they will only be accessible thru foo_hdr(skb) and some other accessor functions. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller drivers/isdn/i4l/isdn_net.c | 2 +- drivers/media/dvb/dvb-core/dvb_net.c | 2 +- drivers/net/bonding/bond_alb.c | 2 +- drivers/net/ioc3-eth.c | 4 ++-- drivers/net/myri_sbus.c | 2 +- drivers/net/plip.c | 2 +- drivers/net/pppoe.c | 4 ++-- drivers/s390/net/qeth_main.c | 2 +- include/linux/if_ether.h | 12 ++++++++++-- include/linux/if_vlan.h | 10 ++++++++-- include/linux/netfilter_bridge/ebt_802_3.h | 9 +++++++++ include/linux/skbuff.h | 1 - net/8021q/vlan_dev.c | 2 +- net/atm/br2684.c | 2 +- net/bridge/br_input.c | 10 +++++----- net/bridge/br_netfilter.c | 18 ++++++++---------- net/bridge/netfilter/ebt_802_3.c | 2 +- net/bridge/netfilter/ebt_among.c | 12 ++++++------ net/bridge/netfilter/ebt_dnat.c | 3 +-- net/bridge/netfilter/ebt_log.c | 12 ++++++------ net/bridge/netfilter/ebt_redirect.c | 7 +++---- net/bridge/netfilter/ebt_snat.c | 3 +-- net/bridge/netfilter/ebtables.c | 2 +- net/core/dv.c | 4 ++-- net/core/netpoll.c | 2 +- net/decnet/dn_neigh.c | 4 ++-- net/ethernet/eth.c | 4 ++-- net/ipv4/netfilter/ipt_mac.c | 2 +- net/ipv6/netfilter/ip6t_eui64.c | 6 +++--- net/ipv6/netfilter/ip6t_mac.c | 2 +- 30 files changed, 83 insertions(+), 66 deletions(-) diff -Nru a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c --- a/drivers/isdn/i4l/isdn_net.c 2004-10-05 19:03:18 -03:00 +++ b/drivers/isdn/i4l/isdn_net.c 2004-10-05 19:03:18 -03:00 @@ -1369,7 +1369,7 @@ skb->mac.raw = skb->data; skb_pull(skb, ETH_HLEN); - eth = skb->mac.ethernet; + eth = eth_hdr(skb); if (*eth->h_dest & 1) { if (memcmp(eth->h_dest, dev->broadcast, ETH_ALEN) == 0) diff -Nru a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c --- a/drivers/media/dvb/dvb-core/dvb_net.c 2004-10-05 19:03:18 -03:00 +++ b/drivers/media/dvb/dvb-core/dvb_net.c 2004-10-05 19:03:18 -03:00 @@ -142,7 +142,7 @@ skb->mac.raw=skb->data; skb_pull(skb,dev->hard_header_len); - eth= skb->mac.ethernet; + eth = eth_hdr(skb); if (*eth->h_dest & 1) { if(memcmp(eth->h_dest,dev->broadcast, ETH_ALEN)==0) diff -Nru a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c --- a/drivers/net/bonding/bond_alb.c 2004-10-05 19:03:18 -03:00 +++ b/drivers/net/bonding/bond_alb.c 2004-10-05 19:03:18 -03:00 @@ -1285,7 +1285,7 @@ int res = 1; skb->mac.raw = (unsigned char *)skb->data; - eth_data = (struct ethhdr *)skb->data; + eth_data = eth_hdr(skb); /* make sure that the curr_active_slave and the slaves list do * not change during tx diff -Nru a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c --- a/drivers/net/ioc3-eth.c 2004-10-05 19:03:18 -03:00 +++ b/drivers/net/ioc3-eth.c 2004-10-05 19:03:18 -03:00 @@ -506,7 +506,7 @@ static void ioc3_tcpudp_checksum(struct sk_buff *skb, uint32_t hwsum, int len) { - struct ethhdr *eh = skb->mac.ethernet; + struct ethhdr *eh = eth_hdr(skb); uint32_t csum, ehsum; unsigned int proto; struct iphdr *ih; @@ -1333,7 +1333,7 @@ uint32_t csum, ehsum; uint16_t *eh; - /* The MAC header. skb->mac.ethernet seem the logic approach + /* The MAC header. skb->mac seem the logic approach to find the MAC header - except it's a NULL pointer ... */ eh = (uint16_t *) skb->data; diff -Nru a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c --- a/drivers/net/myri_sbus.c 2004-10-05 19:03:18 -03:00 +++ b/drivers/net/myri_sbus.c 2004-10-05 19:03:18 -03:00 @@ -376,7 +376,7 @@ skb->mac.raw = (((unsigned char *)skb->data) + MYRI_PAD_LEN); skb_pull(skb, dev->hard_header_len); - eth = skb->mac.ethernet; + eth = eth_hdr(skb); #ifdef DEBUG_HEADER DHDR(("myri_type_trans: ")); diff -Nru a/drivers/net/plip.c b/drivers/net/plip.c --- a/drivers/net/plip.c 2004-10-05 19:03:18 -03:00 +++ b/drivers/net/plip.c 2004-10-05 19:03:18 -03:00 @@ -547,7 +547,7 @@ skb->mac.raw=skb->data; skb_pull(skb,dev->hard_header_len); - eth= skb->mac.ethernet; + eth = eth_hdr(skb); if(*eth->h_dest&1) { diff -Nru a/drivers/net/pppoe.c b/drivers/net/pppoe.c --- a/drivers/net/pppoe.c 2004-10-05 19:03:18 -03:00 +++ b/drivers/net/pppoe.c 2004-10-05 19:03:18 -03:00 @@ -391,7 +391,7 @@ ph = (struct pppoe_hdr *) skb->nh.raw; - po = get_item((unsigned long) ph->sid, skb->mac.ethernet->h_source); + po = get_item((unsigned long) ph->sid, eth_hdr(skb)->h_source); if (!po) goto drop; @@ -440,7 +440,7 @@ if (ph->code != PADT_CODE) goto abort; - po = get_item((unsigned long) ph->sid, skb->mac.ethernet->h_source); + po = get_item((unsigned long) ph->sid, eth_hdr(skb)->h_source); if (po) { struct sock *sk = po->sk; diff -Nru a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c --- a/drivers/s390/net/qeth_main.c 2004-10-05 19:03:18 -03:00 +++ b/drivers/s390/net/qeth_main.c 2004-10-05 19:03:18 -03:00 @@ -2148,7 +2148,7 @@ skb->mac.raw = skb->data; skb_pull(skb, ETH_ALEN * 2 + sizeof (short)); - eth = skb->mac.ethernet; + eth = eth_hdr(skb); if (*eth->h_dest & 1) { if (memcmp(eth->h_dest, dev->broadcast, ETH_ALEN) == 0) diff -Nru a/include/linux/if_ether.h b/include/linux/if_ether.h --- a/include/linux/if_ether.h 2004-10-05 19:03:18 -03:00 +++ b/include/linux/if_ether.h 2004-10-05 19:03:18 -03:00 @@ -96,11 +96,19 @@ * This is an Ethernet frame header. */ -struct ethhdr -{ +struct ethhdr { unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ unsigned char h_source[ETH_ALEN]; /* source ether addr */ unsigned short h_proto; /* packet type ID field */ } __attribute__((packed)); + +#ifdef __KERNEL__ +#include + +static inline struct ethhdr *eth_hdr(const struct sk_buff *skb) +{ + return (struct ethhdr *)skb->mac.raw; +} +#endif #endif /* _LINUX_IF_ETHER_H */ diff -Nru a/include/linux/if_vlan.h b/include/linux/if_vlan.h --- a/include/linux/if_vlan.h 2004-10-05 19:03:18 -03:00 +++ b/include/linux/if_vlan.h 2004-10-05 19:03:18 -03:00 @@ -18,7 +18,6 @@ /* externally defined structs */ struct vlan_group; struct net_device; -struct sk_buff; struct packet_type; struct vlan_collection; struct vlan_dev_info; @@ -48,6 +47,13 @@ unsigned short h_vlan_encapsulated_proto; /* packet type ID field (or len) */ }; +#include + +static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb) +{ + return (struct vlan_ethhdr *)skb->mac.raw; +} + struct vlan_hdr { unsigned short h_vlan_TCI; /* Encapsulates priority and VLAN ID */ unsigned short h_vlan_encapsulated_proto; /* packet type ID field (or len) */ @@ -180,7 +186,7 @@ * This allows the VLAN to have a different MAC than the underlying * device, and still route correctly. */ - if (!memcmp(skb->mac.ethernet->h_dest, skb->dev->dev_addr, ETH_ALEN)) + if (!memcmp(eth_hdr(skb)->h_dest, skb->dev->dev_addr, ETH_ALEN)) skb->pkt_type = PACKET_HOST; break; }; diff -Nru a/include/linux/netfilter_bridge/ebt_802_3.h b/include/linux/netfilter_bridge/ebt_802_3.h --- a/include/linux/netfilter_bridge/ebt_802_3.h 2004-10-05 19:03:18 -03:00 +++ b/include/linux/netfilter_bridge/ebt_802_3.h 2004-10-05 19:03:18 -03:00 @@ -49,6 +49,15 @@ } llc; }; +#ifdef __KERNEL__ +#include + +static inline struct ebt_802_3_hdr *ebt_802_3_hdr(const struct sk_buff *skb) +{ + return (struct ebt_802_3_hdr *)skb->mac.raw; +} +#endif + struct ebt_802_3_info { uint8_t sap; diff -Nru a/include/linux/skbuff.h b/include/linux/skbuff.h --- a/include/linux/skbuff.h 2004-10-05 19:03:18 -03:00 +++ b/include/linux/skbuff.h 2004-10-05 19:03:18 -03:00 @@ -219,7 +219,6 @@ } nh; union { - struct ethhdr *ethernet; unsigned char *raw; } mac; diff -Nru a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c --- a/net/8021q/vlan_dev.c 2004-10-05 19:03:18 -03:00 +++ b/net/8021q/vlan_dev.c 2004-10-05 19:03:18 -03:00 @@ -211,7 +211,7 @@ * This allows the VLAN to have a different MAC than the underlying * device, and still route correctly. */ - if (memcmp(skb->mac.ethernet->h_dest, skb->dev->dev_addr, ETH_ALEN) == 0) { + if (memcmp(eth_hdr(skb)->h_dest, skb->dev->dev_addr, ETH_ALEN) == 0) { /* It is for our (changed) MAC-address! */ skb->pkt_type = PACKET_HOST; } diff -Nru a/net/atm/br2684.c b/net/atm/br2684.c --- a/net/atm/br2684.c 2004-10-05 19:03:18 -03:00 +++ b/net/atm/br2684.c 2004-10-05 19:03:18 -03:00 @@ -294,7 +294,7 @@ { struct ethhdr *eth; unsigned char *rawp; - eth = skb->mac.ethernet; + eth = eth_hdr(skb); if (*eth->h_dest & 1) { if (memcmp(eth->h_dest, dev->broadcast, ETH_ALEN) == 0) diff -Nru a/net/bridge/br_input.c b/net/bridge/br_input.c --- a/net/bridge/br_input.c 2004-10-05 19:03:18 -03:00 +++ b/net/bridge/br_input.c 2004-10-05 19:03:18 -03:00 @@ -48,7 +48,7 @@ /* note: already called with rcu_read_lock (preempt_disabled) */ int br_handle_frame_finish(struct sk_buff *skb) { - const unsigned char *dest = skb->mac.ethernet->h_dest; + const unsigned char *dest = eth_hdr(skb)->h_dest; struct net_bridge_port *p = skb->dev->br_port; struct net_bridge *br = p->br; struct net_bridge_fdb_entry *dst; @@ -100,17 +100,17 @@ int br_handle_frame(struct net_bridge_port *p, struct sk_buff **pskb) { struct sk_buff *skb = *pskb; - const unsigned char *dest = skb->mac.ethernet->h_dest; + const unsigned char *dest = eth_hdr(skb)->h_dest; if (p->state == BR_STATE_DISABLED) goto err; - if (skb->mac.ethernet->h_source[0] & 1) + if (eth_hdr(skb)->h_source[0] & 1) goto err; if (p->state == BR_STATE_LEARNING || p->state == BR_STATE_FORWARDING) - br_fdb_insert(p->br, p, skb->mac.ethernet->h_source, 0); + br_fdb_insert(p->br, p, eth_hdr(skb)->h_source, 0); if (p->br->stp_enabled && !memcmp(dest, bridge_ula, 5) && @@ -127,7 +127,7 @@ if (br_should_route_hook(pskb)) return 0; skb = *pskb; - dest = skb->mac.ethernet->h_dest; + dest = eth_hdr(skb)->h_dest; } if (!memcmp(p->br->dev->dev_addr, dest, ETH_ALEN)) diff -Nru a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c --- a/net/bridge/br_netfilter.c 2004-10-05 19:03:18 -03:00 +++ b/net/bridge/br_netfilter.c 2004-10-05 19:03:18 -03:00 @@ -255,7 +255,7 @@ 1); return 0; } - memcpy(skb->mac.ethernet->h_dest, dev->dev_addr, + memcpy(eth_hdr(skb)->h_dest, dev->dev_addr, ETH_ALEN); skb->pkt_type = PACKET_HOST; } @@ -412,8 +412,7 @@ __u32 len; struct sk_buff *skb = *pskb; struct nf_bridge_info *nf_bridge; - struct vlan_ethhdr *hdr = (struct vlan_ethhdr *) - ((*pskb)->mac.ethernet); + struct vlan_ethhdr *hdr = vlan_eth_hdr(*pskb); if (skb->protocol == __constant_htons(ETH_P_IPV6) || IS_VLAN_IPV6) { #ifdef CONFIG_SYSCTL @@ -516,7 +515,7 @@ { struct nf_bridge_info *nf_bridge = skb->nf_bridge; struct net_device *in; - struct vlan_ethhdr *hdr = (struct vlan_ethhdr *)(skb->mac.ethernet); + struct vlan_ethhdr *hdr = vlan_eth_hdr(skb); #ifdef CONFIG_NETFILTER_DEBUG skb->nf_debug ^= (1 << NF_BR_FORWARD); @@ -551,7 +550,7 @@ { struct sk_buff *skb = *pskb; struct nf_bridge_info *nf_bridge; - struct vlan_ethhdr *hdr = (struct vlan_ethhdr *)(skb->mac.ethernet); + struct vlan_ethhdr *hdr = vlan_eth_hdr(skb); int pf; if (!skb->nf_bridge) @@ -591,7 +590,7 @@ int (*okfn)(struct sk_buff *)) { struct sk_buff *skb = *pskb; - struct vlan_ethhdr *hdr = (struct vlan_ethhdr *)(skb->mac.ethernet); + struct vlan_ethhdr *hdr = vlan_eth_hdr(skb); struct net_device **d = (struct net_device **)(skb->cb); #ifdef CONFIG_SYSCTL @@ -669,7 +668,7 @@ struct net_device *realindev, *realoutdev; struct sk_buff *skb = *pskb; struct nf_bridge_info *nf_bridge; - struct vlan_ethhdr *hdr = (struct vlan_ethhdr *)(skb->mac.ethernet); + struct vlan_ethhdr *hdr = vlan_eth_hdr(skb); int pf; if (!skb->nf_bridge) @@ -753,7 +752,7 @@ { struct sk_buff *skb = *pskb; struct nf_bridge_info *nf_bridge = (*pskb)->nf_bridge; - struct vlan_ethhdr *hdr = (struct vlan_ethhdr *)(skb->mac.ethernet); + struct vlan_ethhdr *hdr = vlan_eth_hdr(skb); struct net_device *realoutdev = bridge_parent(skb->dev); int pf; @@ -848,8 +847,7 @@ #ifdef CONFIG_SYSCTL if (!skb->nf_bridge) { - struct vlan_ethhdr *hdr = - (struct vlan_ethhdr *)(skb->mac.ethernet); + struct vlan_ethhdr *hdr = vlan_eth_hdr(skb); if (skb->protocol == __constant_htons(ETH_P_IP) || IS_VLAN_IP) { diff -Nru a/net/bridge/netfilter/ebt_802_3.c b/net/bridge/netfilter/ebt_802_3.c --- a/net/bridge/netfilter/ebt_802_3.c 2004-10-05 19:03:18 -03:00 +++ b/net/bridge/netfilter/ebt_802_3.c 2004-10-05 19:03:18 -03:00 @@ -16,7 +16,7 @@ const struct net_device *out, const void *data, unsigned int datalen) { struct ebt_802_3_info *info = (struct ebt_802_3_info *)data; - struct ebt_802_3_hdr *hdr = (struct ebt_802_3_hdr *)skb->mac.ethernet; + struct ebt_802_3_hdr *hdr = ebt_802_3_hdr(skb); uint16_t type = hdr->llc.ui.ctrl & IS_UI ? hdr->llc.ui.type : hdr->llc.ni.type; if (info->bitmask & EBT_802_3_SAP) { diff -Nru a/net/bridge/netfilter/ebt_among.c b/net/bridge/netfilter/ebt_among.c --- a/net/bridge/netfilter/ebt_among.c 2004-10-05 19:03:18 -03:00 +++ b/net/bridge/netfilter/ebt_among.c 2004-10-05 19:03:18 -03:00 @@ -72,14 +72,14 @@ static int get_ip_dst(const struct sk_buff *skb, uint32_t *addr) { - if (skb->mac.ethernet->h_proto == __constant_htons(ETH_P_IP)) { + if (eth_hdr(skb)->h_proto == htons(ETH_P_IP)) { struct iphdr _iph, *ih; ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph); if (ih == NULL) return -1; *addr = ih->daddr; - } else if (skb->mac.ethernet->h_proto == __constant_htons(ETH_P_ARP)) { + } else if (eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) { struct arphdr _arph, *ah; uint32_t buf, *bp; @@ -100,14 +100,14 @@ static int get_ip_src(const struct sk_buff *skb, uint32_t *addr) { - if (skb->mac.ethernet->h_proto == __constant_htons(ETH_P_IP)) { + if (eth_hdr(skb)->h_proto == htons(ETH_P_IP)) { struct iphdr _iph, *ih; ih = skb_header_pointer(skb, 0, sizeof(_iph), &_iph); if (ih == NULL) return -1; *addr = ih->saddr; - } else if (skb->mac.ethernet->h_proto == __constant_htons(ETH_P_ARP)) { + } else if (eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) { struct arphdr _arph, *ah; uint32_t buf, *bp; @@ -139,7 +139,7 @@ wh_src = ebt_among_wh_src(info); if (wh_src) { - smac = skb->mac.ethernet->h_source; + smac = eth_hdr(skb)->h_source; if (get_ip_src(skb, &sip)) return EBT_NOMATCH; if (!(info->bitmask & EBT_AMONG_SRC_NEG)) { @@ -154,7 +154,7 @@ } if (wh_dst) { - dmac = skb->mac.ethernet->h_dest; + dmac = eth_hdr(skb)->h_dest; if (get_ip_dst(skb, &dip)) return EBT_NOMATCH; if (!(info->bitmask & EBT_AMONG_DST_NEG)) { diff -Nru a/net/bridge/netfilter/ebt_dnat.c b/net/bridge/netfilter/ebt_dnat.c --- a/net/bridge/netfilter/ebt_dnat.c 2004-10-05 19:03:18 -03:00 +++ b/net/bridge/netfilter/ebt_dnat.c 2004-10-05 19:03:18 -03:00 @@ -30,8 +30,7 @@ kfree_skb(*pskb); *pskb = nskb; } - memcpy(((**pskb).mac.ethernet)->h_dest, info->mac, - ETH_ALEN * sizeof(unsigned char)); + memcpy(eth_hdr(*pskb)->h_dest, info->mac, ETH_ALEN); return info->target; } diff -Nru a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c --- a/net/bridge/netfilter/ebt_log.c 2004-10-05 19:03:18 -03:00 +++ b/net/bridge/netfilter/ebt_log.c 2004-10-05 19:03:18 -03:00 @@ -70,13 +70,13 @@ out ? out->name : ""); printk("MAC source = "); - print_MAC((skb->mac.ethernet)->h_source); + print_MAC(eth_hdr(skb)->h_source); printk("MAC dest = "); - print_MAC((skb->mac.ethernet)->h_dest); + print_MAC(eth_hdr(skb)->h_dest); - printk("proto = 0x%04x", ntohs(((*skb).mac.ethernet)->h_proto)); + printk("proto = 0x%04x", ntohs(eth_hdr(skb)->h_proto)); - if ((info->bitmask & EBT_LOG_IP) && skb->mac.ethernet->h_proto == + if ((info->bitmask & EBT_LOG_IP) && eth_hdr(skb)->h_proto == htons(ETH_P_IP)){ struct iphdr _iph, *ih; @@ -106,8 +106,8 @@ } if ((info->bitmask & EBT_LOG_ARP) && - ((skb->mac.ethernet->h_proto == __constant_htons(ETH_P_ARP)) || - (skb->mac.ethernet->h_proto == __constant_htons(ETH_P_RARP)))) { + ((eth_hdr(skb)->h_proto == htons(ETH_P_ARP)) || + (eth_hdr(skb)->h_proto == htons(ETH_P_RARP)))) { struct arphdr _arph, *ah; ah = skb_header_pointer(skb, 0, sizeof(_arph), &_arph); diff -Nru a/net/bridge/netfilter/ebt_redirect.c b/net/bridge/netfilter/ebt_redirect.c --- a/net/bridge/netfilter/ebt_redirect.c 2004-10-05 19:03:18 -03:00 +++ b/net/bridge/netfilter/ebt_redirect.c 2004-10-05 19:03:18 -03:00 @@ -32,11 +32,10 @@ *pskb = nskb; } if (hooknr != NF_BR_BROUTING) - memcpy((**pskb).mac.ethernet->h_dest, - in->br_port->br->dev->dev_addr, ETH_ALEN); + memcpy(eth_hdr(*pskb)->h_dest, + in->br_port->br->dev->dev_addr, ETH_ALEN); else - memcpy((**pskb).mac.ethernet->h_dest, - in->dev_addr, ETH_ALEN); + memcpy(eth_hdr(*pskb)->h_dest, in->dev_addr, ETH_ALEN); (*pskb)->pkt_type = PACKET_HOST; return info->target; } diff -Nru a/net/bridge/netfilter/ebt_snat.c b/net/bridge/netfilter/ebt_snat.c --- a/net/bridge/netfilter/ebt_snat.c 2004-10-05 19:03:18 -03:00 +++ b/net/bridge/netfilter/ebt_snat.c 2004-10-05 19:03:18 -03:00 @@ -30,8 +30,7 @@ kfree_skb(*pskb); *pskb = nskb; } - memcpy(((**pskb).mac.ethernet)->h_source, info->mac, - ETH_ALEN * sizeof(unsigned char)); + memcpy(eth_hdr(*pskb)->h_source, info->mac, ETH_ALEN); return info->target; } diff -Nru a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c --- a/net/bridge/netfilter/ebtables.c 2004-10-05 19:03:18 -03:00 +++ b/net/bridge/netfilter/ebtables.c 2004-10-05 19:03:18 -03:00 @@ -190,7 +190,7 @@ base = private->entries; i = 0; while (i < nentries) { - if (ebt_basic_match(point, (**pskb).mac.ethernet, in, out)) + if (ebt_basic_match(point, eth_hdr(*pskb), in, out)) goto letscontinue; if (EBT_MATCH_ITERATE(point, ebt_do_match, *pskb, in, out) != 0) diff -Nru a/net/core/dv.c b/net/core/dv.c --- a/net/core/dv.c 2004-10-05 19:03:18 -03:00 +++ b/net/core/dv.c 2004-10-05 19:03:18 -03:00 @@ -450,12 +450,12 @@ */ #define ETH_DIVERT_FRAME(skb) \ - memcpy(skb->mac.ethernet, skb->dev->dev_addr, ETH_ALEN); \ + memcpy(eth_hdr(skb), skb->dev->dev_addr, ETH_ALEN); \ skb->pkt_type=PACKET_HOST void divert_frame(struct sk_buff *skb) { - struct ethhdr *eth = skb->mac.ethernet; + struct ethhdr *eth = eth_hdr(skb); struct iphdr *iph; struct tcphdr *tcph; struct udphdr *udph; diff -Nru a/net/core/netpoll.c b/net/core/netpoll.c --- a/net/core/netpoll.c 2004-10-05 19:03:18 -03:00 +++ b/net/core/netpoll.c 2004-10-05 19:03:18 -03:00 @@ -378,7 +378,7 @@ return 1; } - proto = ntohs(skb->mac.ethernet->h_proto); + proto = ntohs(eth_hdr(skb)->h_proto); if (proto != ETH_P_IP) goto out; if (skb->pkt_type == PACKET_OTHERHOST) diff -Nru a/net/decnet/dn_neigh.c b/net/decnet/dn_neigh.c --- a/net/decnet/dn_neigh.c 2004-10-05 19:03:18 -03:00 +++ b/net/decnet/dn_neigh.c 2004-10-05 19:03:18 -03:00 @@ -399,7 +399,7 @@ neigh->updated = jiffies; if (neigh->dev->type == ARPHRD_ETHER) - memcpy(neigh->ha, &skb->mac.ethernet->h_source, ETH_ALEN); + memcpy(neigh->ha, ð_hdr(skb)->h_source, ETH_ALEN); dn->blksize = dn_ntohs(msg->blksize); dn->priority = msg->priority; @@ -455,7 +455,7 @@ neigh->updated = jiffies; if (neigh->dev->type == ARPHRD_ETHER) - memcpy(neigh->ha, &skb->mac.ethernet->h_source, ETH_ALEN); + memcpy(neigh->ha, ð_hdr(skb)->h_source, ETH_ALEN); dn->flags &= ~(DN_NDFLAG_R1 | DN_NDFLAG_R2); dn->blksize = dn_ntohs(msg->blksize); dn->priority = 0; diff -Nru a/net/ethernet/eth.c b/net/ethernet/eth.c --- a/net/ethernet/eth.c 2004-10-05 19:03:18 -03:00 +++ b/net/ethernet/eth.c 2004-10-05 19:03:18 -03:00 @@ -163,7 +163,7 @@ skb->mac.raw=skb->data; skb_pull(skb,ETH_HLEN); - eth= skb->mac.ethernet; + eth = eth_hdr(skb); skb->input_dev = dev; if(*eth->h_dest&1) @@ -210,7 +210,7 @@ int eth_header_parse(struct sk_buff *skb, unsigned char *haddr) { - struct ethhdr *eth = skb->mac.ethernet; + struct ethhdr *eth = eth_hdr(skb); memcpy(haddr, eth->h_source, ETH_ALEN); return ETH_ALEN; } diff -Nru a/net/ipv4/netfilter/ipt_mac.c b/net/ipv4/netfilter/ipt_mac.c --- a/net/ipv4/netfilter/ipt_mac.c 2004-10-05 19:03:18 -03:00 +++ b/net/ipv4/netfilter/ipt_mac.c 2004-10-05 19:03:18 -03:00 @@ -33,7 +33,7 @@ return (skb->mac.raw >= skb->head && (skb->mac.raw + ETH_HLEN) <= skb->data /* If so, compare... */ - && ((memcmp(skb->mac.ethernet->h_source, info->srcaddr, ETH_ALEN) + && ((memcmp(eth_hdr(skb)->h_source, info->srcaddr, ETH_ALEN) == 0) ^ info->invert)); } diff -Nru a/net/ipv6/netfilter/ip6t_eui64.c b/net/ipv6/netfilter/ip6t_eui64.c --- a/net/ipv6/netfilter/ip6t_eui64.c 2004-10-05 19:03:18 -03:00 +++ b/net/ipv6/netfilter/ip6t_eui64.c 2004-10-05 19:03:18 -03:00 @@ -41,10 +41,10 @@ memset(eui64, 0, sizeof(eui64)); - if (skb->mac.ethernet->h_proto == ntohs(ETH_P_IPV6)) { + if (eth_hdr(skb)->h_proto == ntohs(ETH_P_IPV6)) { if (skb->nh.ipv6h->version == 0x6) { - memcpy(eui64, skb->mac.ethernet->h_source, 3); - memcpy(eui64 + 5, skb->mac.ethernet->h_source + 3, 3); + memcpy(eui64, eth_hdr(skb)->h_source, 3); + memcpy(eui64 + 5, eth_hdr(skb)->h_source + 3, 3); eui64[3]=0xff; eui64[4]=0xfe; eui64[0] |= 0x02; diff -Nru a/net/ipv6/netfilter/ip6t_mac.c b/net/ipv6/netfilter/ip6t_mac.c --- a/net/ipv6/netfilter/ip6t_mac.c 2004-10-05 19:03:18 -03:00 +++ b/net/ipv6/netfilter/ip6t_mac.c 2004-10-05 19:03:18 -03:00 @@ -35,7 +35,7 @@ return (skb->mac.raw >= skb->head && (skb->mac.raw + ETH_HLEN) <= skb->data /* If so, compare... */ - && ((memcmp(skb->mac.ethernet->h_source, info->srcaddr, ETH_ALEN) + && ((memcmp(eth_hdr(skb)->h_source, info->srcaddr, ETH_ALEN) == 0) ^ info->invert)); } --------------040209030209010804080204-- From acme@conectiva.com.br Tue Oct 5 15:07:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 15:07:11 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95M71S8023832 for ; Tue, 5 Oct 2004 15:07:04 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 3A53B47410; Tue, 5 Oct 2004 19:06:45 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id DEF9847387 for ; Tue, 5 Oct 2004 19:06:44 -0300 (BRT) Received: (qmail 2489 invoked by uid 0); 5 Oct 2004 23:03:47 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 5 Oct 2004 23:03:47 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id 4E6A614639; Tue, 5 Oct 2004 19:09:56 -0300 (BRT) Message-ID: <41631B6D.5050503@conectiva.com.br> Date: Tue, 05 Oct 2004 19:08:45 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2/2][BRIDGE] convert __constant_htons(constant) to htons X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------050708090507050204020000" X-Bogosity: No, tests=bogofilter, spamicity=0.358157, version=0.16.3 X-archive-position: 9950 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 Content-Length: 4029 Lines: 118 This is a multi-part message in MIME format. --------------050708090507050204020000 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi David, Please consider pulling from: bk://kernel.bkbits.net/acme/sk_buff-2.6 Now there are just these two changesets in this tree, will wait for you to pull to submit the next set. - Arnaldo --------------050708090507050204020000 Content-Type: text/plain; name="bridge_htons.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="bridge_htons.patch" =================================================================== ChangeSet@1.2054, 2004-10-05 19:01:58-03:00, acme@conectiva.com.br [BRIDGE] convert __constant_htons(constant) to htons Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller ebt_arp.c | 4 ++-- ebt_arpreply.c | 6 +++--- ebt_ip.c | 2 +- ebt_log.c | 2 +- ebt_vlan.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff -Nru a/net/bridge/netfilter/ebt_arp.c b/net/bridge/netfilter/ebt_arp.c --- a/net/bridge/netfilter/ebt_arp.c 2004-10-05 19:02:40 -03:00 +++ b/net/bridge/netfilter/ebt_arp.c 2004-10-05 19:02:40 -03:00 @@ -108,8 +108,8 @@ if (datalen != EBT_ALIGN(sizeof(struct ebt_arp_info))) return -EINVAL; - if ((e->ethproto != __constant_htons(ETH_P_ARP) && - e->ethproto != __constant_htons(ETH_P_RARP)) || + if ((e->ethproto != htons(ETH_P_ARP) && + e->ethproto != htons(ETH_P_RARP)) || e->invflags & EBT_IPROTO) return -EINVAL; if (info->bitmask & ~EBT_ARP_MASK || info->invflags & ~EBT_ARP_MASK) diff -Nru a/net/bridge/netfilter/ebt_arpreply.c b/net/bridge/netfilter/ebt_arpreply.c --- a/net/bridge/netfilter/ebt_arpreply.c 2004-10-05 19:02:40 -03:00 +++ b/net/bridge/netfilter/ebt_arpreply.c 2004-10-05 19:02:40 -03:00 @@ -29,9 +29,9 @@ if (ap == NULL) return EBT_DROP; - if (ap->ar_op != __constant_htons(ARPOP_REQUEST) || + if (ap->ar_op != htons(ARPOP_REQUEST) || ap->ar_hln != ETH_ALEN || - ap->ar_pro != __constant_htons(ETH_P_IP) || + ap->ar_pro != htons(ETH_P_IP) || ap->ar_pln != 4) return EBT_CONTINUE; @@ -65,7 +65,7 @@ return -EINVAL; if (BASE_CHAIN && info->target == EBT_RETURN) return -EINVAL; - if (e->ethproto != __constant_htons(ETH_P_ARP) || + if (e->ethproto != htons(ETH_P_ARP) || e->invflags & EBT_IPROTO) return -EINVAL; CLEAR_BASE_CHAIN_BIT; diff -Nru a/net/bridge/netfilter/ebt_ip.c b/net/bridge/netfilter/ebt_ip.c --- a/net/bridge/netfilter/ebt_ip.c 2004-10-05 19:02:40 -03:00 +++ b/net/bridge/netfilter/ebt_ip.c 2004-10-05 19:02:40 -03:00 @@ -80,7 +80,7 @@ if (datalen != EBT_ALIGN(sizeof(struct ebt_ip_info))) return -EINVAL; - if (e->ethproto != __constant_htons(ETH_P_IP) || + if (e->ethproto != htons(ETH_P_IP) || e->invflags & EBT_IPROTO) return -EINVAL; if (info->bitmask & ~EBT_IP_MASK || info->invflags & ~EBT_IP_MASK) diff -Nru a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c --- a/net/bridge/netfilter/ebt_log.c 2004-10-05 19:02:40 -03:00 +++ b/net/bridge/netfilter/ebt_log.c 2004-10-05 19:02:40 -03:00 @@ -121,7 +121,7 @@ /* If it's for Ethernet and the lengths are OK, * then log the ARP payload */ - if (ah->ar_hrd == __constant_htons(1) && + if (ah->ar_hrd == htons(1) && ah->ar_hln == ETH_ALEN && ah->ar_pln == sizeof(uint32_t)) { struct arppayload _arpp, *ap; diff -Nru a/net/bridge/netfilter/ebt_vlan.c b/net/bridge/netfilter/ebt_vlan.c --- a/net/bridge/netfilter/ebt_vlan.c 2004-10-05 19:02:40 -03:00 +++ b/net/bridge/netfilter/ebt_vlan.c 2004-10-05 19:02:40 -03:00 @@ -104,7 +104,7 @@ } /* Is it 802.1Q frame checked? */ - if (e->ethproto != __constant_htons(ETH_P_8021Q)) { + if (e->ethproto != htons(ETH_P_8021Q)) { DEBUG_MSG ("passed entry proto %2.4X is not 802.1Q (8100)\n", (unsigned short) ntohs(e->ethproto)); --------------050708090507050204020000-- From tgraf@suug.ch Tue Oct 5 15:21:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 15:21:50 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95MLhFb029854 for ; Tue, 5 Oct 2004 15:21:44 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 42FFE82; Wed, 6 Oct 2004 00:21:07 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 488321C0E8; Wed, 6 Oct 2004 00:21:49 +0200 (CEST) Date: Wed, 6 Oct 2004 00:21:49 +0200 From: Thomas Graf To: "David S. Miller" Cc: Jamal Hadi Salim , netdev@oss.sgi.com Subject: [RFC] Replacing qdisc tc_stats with generic statistics to make it extendable Message-ID: <20041005222149.GA17186@postel.suug.ch> References: <20041003213124.GG14344@postel.suug.ch> <20041003213954.GI14344@postel.suug.ch> <20041003161436.50293f9a.davem@davemloft.net> <20041003235737.GO14344@postel.suug.ch> <20041005140304.6d0d5f02.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041005140304.6d0d5f02.davem@davemloft.net> X-archive-position: 9951 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 3255 Lines: 89 * David S. Miller <20041005140304.6d0d5f02.davem@davemloft.net> 2004-10-05 14:03 > Ok, so I combined all of the work into one big patch > and checked it into my tree as follows: Looks good. I have the following idea in mind, regarding on howto actually use this code. (Qdisc API is being used for explanation) 1) Introduce new qdisc op dump_stats in struct Qdisc_ops. (minor) + int (*dump_stats)(struct Qdisc *, struct sk_buff *, struct gnet_dump *); 2) Replace struct tc_stats in struct Qdisc with a list of generic network statistics common to all qdiscs (basic/queue/rate_est) (minor) 3) Fix all statistic updates to use new structs (minor) 4) Use new generic estimator (minor) 5) Adapt tc_fill_qdisc and to use new gnet_stats API in compatibilty mode and call dump_stats if available. + if (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS, + TCA_XSTATS, q->stats_lock, &dump) < 0) + goto rtattr_failure; + + if (q->ops->dump_stats && q->ops->dump_stats(q, skb, &dump) < 0) + goto rtattr_failure; + + if (gnet_stats_copy_basic(&dump, &q->bstats) < 0 || +#ifdef CONFIG_NET_ESTIMATOR + gnet_stats_copy_rate_est(&dump, &q->rate_est) < 0 || +#endif + gnet_stats_copy_queue(&dump, &q->qstats) < 0) + goto rtattr_failure; + + if (gnet_stats_finish_copy(&dump) < 0) goto rtattr_failure; 6) The qdisc implements dump_stats and dumps qdisc specific statistics such as the existing xstats. It may dump other generic statistics which are only used by this qdisc. The implementation of this callback is optional and only required if the qdisc has own statistics. +static int cbq_dump_stats(struct Qdisc *sch, struct sk_buff *skb, struct gnet_dump *d) +{ + struct cbq_sched_data *q = qdisc_priv(sch); + + q->link.xstats.avgidle = q->link.avgidle; + if (gnet_stats_copy_app(d, &q->link.xstats, sizeof(q->link.xstats)) < 0) + return -1; + return 0; +} 7) Remove old xstats copying code (some qdiscs, namely HTB, even copy TCA_STATS on their own which doesn't make sense) Pros: - All statistics nicely organized in one TLV (replaces TCA_STATS and TCA_XSTATS as a long term goal.) - TCA_STATS and TCA_XSTATS are still provided without the qdisc actually noticing. - Easy to add new statistics without the need to even think about compatibility. - The whole dumping process is correctly locked. - Qdiscs may add their own generic statistics if needed. - Qdiscs can correct/update statistics right before dumping to be as accurate as possible. Cons: - Requires changing all qdiscs. (mostly minor changes) - (Would) break binary only qdiscs. I've tested the above code for a few days but will continue to do so for a few days. Since this is pretty major and will touch a lot of code I'd be interested if this is the right way to go and how to do it to make patch submission as easy as possible. Here would be my scenario on howto do it in several steps not breaking anything in between: Step 1: Use new generic networking statistics, update all qdiscs and switch to new estimator. Doesn't break anything but must be atomic. Step 2-N: Add dump_stats and update qdiscs one after each other. Thoughts? From tgraf@suug.ch Tue Oct 5 15:23:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 15:23:13 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95MN8LS030178 for ; Tue, 5 Oct 2004 15:23:08 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 72E3F82; Wed, 6 Oct 2004 00:22:33 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id DF8DB1C0E8; Wed, 6 Oct 2004 00:23:16 +0200 (CEST) Date: Wed, 6 Oct 2004 00:23:16 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: [PATCH] PKT_SCHED: Remove useless line in cbq_dump_class Message-ID: <20041005222316.GB17186@postel.suug.ch> References: <20041003221452.GL14344@postel.suug.ch> <20041005133754.154cf9ee.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041005133754.154cf9ee.davem@davemloft.net> X-archive-position: 9952 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 333 Lines: 7 * David S. Miller <20041005133754.154cf9ee.davem@davemloft.net> 2004-10-05 13:37 > If you could check quickly whether a 2.6.x patch you post > is a relevant bug fix for 2.4.x, that would help me out > a lot in processing your patches efficiently. OK, didn't expect we are porting back such minor fixes but will do so in the future. From davidslinuxpob@yahoo.com Tue Oct 5 16:23:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 16:23:43 -0700 (PDT) Received: from web60104.mail.yahoo.com (web60104.mail.yahoo.com [216.109.118.83]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i95NNaXe001986 for ; Tue, 5 Oct 2004 16:23:37 -0700 Message-ID: <20041005232319.28518.qmail@web60104.mail.yahoo.com> Received: from [198.93.144.3] by web60104.mail.yahoo.com via HTTP; Tue, 05 Oct 2004 16:23:19 PDT Date: Tue, 5 Oct 2004 16:23:19 -0700 (PDT) From: david linux Subject: getting started To: netdev@oss.sgi.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 9953 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davidslinuxpob@yahoo.com Precedence: bulk X-list: netdev Content-Length: 301 Lines: 16 I would like to help with the development of network drivers for the 2.6 kernel. Can you help me get a lead on who to contact for this? Thanks, -d __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From greearb@candelatech.com Tue Oct 5 16:42:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 16:43:03 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i95NgvkM002421 for ; Tue, 5 Oct 2004 16:42:57 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i95NlbLH017508 for ; Tue, 5 Oct 2004 16:47:37 -0700 Message-ID: <41633174.7070805@candelatech.com> Date: Tue, 05 Oct 2004 16:42:44 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "'netdev@oss.sgi.com'" Subject: 2.6.7 tulip performance (with NAPI) Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 9954 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Content-Length: 1886 Lines: 48 Hello! NOTE: This test machine is running a P-IV 2.8Ghz processor, 32/33 PCI bus, 512MB RAM, and kernels compiled for the P-IV processor. I am using a modified pktgen that can receive as well as transmit packets, so I can get pkt-drop stats, etc. User-space is FC2, and X is running during these tests. I just started doing some performance comparisons of pktgen with a 4-port NIC (p430tx) that uses the tulip driver. On 2.4.27 I can drive two ports at 95+Mbps, full duplex and the system is very responsive. If I try this on 2.6.7 (with tulip compiled to use NAPI), I can still get the speed on the two ports, but the deskop is very jittery. If I try to start another pktgen test between the second two ports on 2.4.27 I start seeing a reasonable number of packet drops, and the bandwidth drops to about 55Mbps bi-directional. The desktop is still responsive. If I try this on 2.6.7 the desktop jitter gets even worse. The pktgen tests start sending at about 7kpps (I'm using 1514 byte packets) but I only receive about 1kpps. My assumption is that the pktgen thread is getting all the cpu and starving the NAPI receive thread. I tried setting the NICE level of pktgen to -10 and softirq to -18. I still see way more packets transmitted than received. I tried compiling the tulip driver to not use NAPI in 2.6.7. This achieved similar throughput (55Mbps on each NIC, full duplex) as the 2.4.27 kernel, and slowed down the pktgen transmitter so that fewer packets were actually dropped. The responsiveness is not good, but it is not any worse than when using NAPI. So, for my testing with send+receive traffic, it appears that tulip+NAPI is actually not a good option. If anyone has other performance comparisons with tulip on modern kernels, please share! Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From herbert@gondor.apana.org.au Tue Oct 5 19:07:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 19:07:22 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9627CF7004911 for ; Tue, 5 Oct 2004 19:07:14 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CF1Cg-00046f-00; Wed, 06 Oct 2004 12:06:54 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CF1Cc-0003nX-00; Wed, 06 Oct 2004 12:06:50 +1000 Date: Wed, 6 Oct 2004 12:06:50 +1000 To: "David S. Miller" , netdev@oss.sgi.com Subject: [TCP] Show all SYN_RECV sockets in /proc/net/tcp Message-ID: <20041006020650.GA14583@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="OgqxwSJOaUobr8KG" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 9955 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 1583 Lines: 55 --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Dave: I was fixing the tcp_diag so that it shows SYN_RECV sockets properly. I found that /proc/net/tcp didn't do it correctly either. So here is a small patch to fix /proc/net/tcp. The logic in there stinks though so I'd love to see a rewrite. Signed-off-by: Herbert Xu Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== net/ipv4/tcp_ipv4.c 1.99 vs edited ===== --- 1.99/net/ipv4/tcp_ipv4.c 2004-09-15 06:57:07 +10:00 +++ edited/net/ipv4/tcp_ipv4.c 2004-10-06 11:25:04 +10:00 @@ -2175,8 +2175,14 @@ sk = sk_next(st->syn_wait_sk); st->state = TCP_SEQ_STATE_LISTENING; read_unlock_bh(&tp->syn_wait_lock); - } else + } else { + tp = tcp_sk(sk); + read_lock_bh(&tp->syn_wait_lock); + if (tp->listen_opt && tp->listen_opt->qlen) + goto start_req; + read_unlock_bh(&tp->syn_wait_lock); sk = sk_next(sk); + } get_sk: sk_for_each_from(sk, node) { if (sk->sk_family == st->family) { @@ -2186,6 +2192,7 @@ tp = tcp_sk(sk); read_lock_bh(&tp->syn_wait_lock); if (tp->listen_opt && tp->listen_opt->qlen) { +start_req: st->uid = sock_i_uid(sk); st->syn_wait_sk = sk; st->state = TCP_SEQ_STATE_OPENREQ; --OgqxwSJOaUobr8KG-- From acme@conectiva.com.br Tue Oct 5 19:15:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 19:15:53 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i962Fk26005295 for ; Tue, 5 Oct 2004 19:15:48 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id AC0EF47906; Tue, 5 Oct 2004 23:15:32 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 6DD35479C4 for ; Tue, 5 Oct 2004 23:15:32 -0300 (BRT) Received: (qmail 32694 invoked by uid 0); 6 Oct 2004 03:12:35 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 6 Oct 2004 03:12:35 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id 0D7FE777AB; Tue, 5 Oct 2004 23:18:43 -0300 (BRT) Message-ID: <416355BD.50402@conectiva.com.br> Date: Tue, 05 Oct 2004 23:17:33 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Herbert Xu Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [TCP] Show all SYN_RECV sockets in /proc/net/tcp References: <20041006020650.GA14583@gondor.apana.org.au> In-Reply-To: <20041006020650.GA14583@gondor.apana.org.au> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Bogosity: No, tests=bogofilter, spamicity=0.366594, version=0.16.3 X-archive-position: 9956 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 Content-Length: 481 Lines: 16 Herbert Xu wrote: > Hi Dave: > > I was fixing the tcp_diag so that it shows SYN_RECV sockets properly. > I found that /proc/net/tcp didn't do it correctly either. So here is > a small patch to fix /proc/net/tcp. > > The logic in there stinks though so I'd love to see a rewrite. Go ahead and do it with the current seq_file infrastructure 8) Standard answer for these cases is remove /proc/net/tcp altogether and convert the userland tools to use netlink instead. - Arnaldo From yoshfuji@linux-ipv6.org Tue Oct 5 19:33:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 19:33:59 -0700 (PDT) Received: from yue.st-paulia.net (yue.linux-ipv6.org [203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i962Xrdt005872 for ; Tue, 5 Oct 2004 19:33:53 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id DE6D233CE5; Wed, 6 Oct 2004 11:34:05 +0900 (JST) Date: Wed, 06 Oct 2004 11:34:04 +0900 (JST) Message-Id: <20041006.113404.59652163.yoshfuji@linux-ipv6.org> To: davem@davemloft.net Cc: yoshfuji@linux-ipv6.org, netdev@oss.sgi.com, usagi-core@linux-ipv6.org Subject: [PATCH] [NET] Fix ECN Encapsulation From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= Organization: USAGI Project X-URL: http://www.yoshifuji.org/%7Ehideaki/ X-Fingerprint: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA X-PGP-Key-URL: http://www.yoshifuji.org/%7Ehideaki/hideaki@yoshifuji.org.asc X-Face: "5$Al-.M>NJ%a'@hhZdQm:."qn~PA^gq4o*>iCFToq*bAi#4FRtx}enhuQKz7fNqQz\BYU] $~O_5m-9'}MIs`XGwIEscw;e5b>n"B_?j/AkL~i/MEaZBLP X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 9957 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: yoshfuji@linux-ipv6.org Precedence: bulk X-list: netdev Content-Length: 1726 Lines: 56 Hello. Please pull the following changeset from . Thank you. HEADLINE -------- ChangeSet@1.2051, 2004-10-06 11:28:16+09:00, yoshfuji@linux-ipv6.org [NET] ECN: Fix bug in tunnel ECN handling by recent changes. DIFFSTAT -------- include/net/inet_ecn.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) CHANGESET --------- ChangeSet@1.2051, 2004-10-06 11:28:16+09:00, yoshfuji@linux-ipv6.org [NET] ECN: Fix bug in tunnel ECN handling by recent changes. We broke ECN encapsulation in tunnels recently. Without this patch, even though encapusulated (inner) packet is "not-ECN", encapusulating (outer) packet is sent with "ECT(0)" set. This is wrong and should be "not-ECN." This patch fixes up. From RFC3168: The full-functionality option for ECN encapsulation is to copy the ECN codepoint of the inside header to the outside header on encapsulation if the inside header is not-ECT or ECT, and to set the ECN codepoint of the outside header to ECT(0) if the ECN codepoint of the inside header is CE. Signed-off-by: Hideaki YOSHIFUJI diff -Nru a/include/net/inet_ecn.h b/include/net/inet_ecn.h --- a/include/net/inet_ecn.h 2004-10-06 11:30:10 +09:00 +++ b/include/net/inet_ecn.h 2004-10-06 11:30:10 +09:00 @@ -30,7 +30,8 @@ static inline __u8 INET_ECN_encapsulate(__u8 outer, __u8 inner) { outer &= ~INET_ECN_MASK; - outer |= (inner & INET_ECN_MASK) ?: INET_ECN_ECT_0; + outer |= !INET_ECN_is_ce(inner) ? (inner & INET_ECN_MASK) : + INET_ECN_ECT_0; return outer; } -- Hideaki YOSHIFUJI @ USAGI Project GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA From herbert@gondor.apana.org.au Tue Oct 5 19:36:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 19:36:41 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i962aWmQ006206 for ; Tue, 5 Oct 2004 19:36:33 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CF1ev-0004HX-00; Wed, 06 Oct 2004 12:36:05 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CF1eo-0003qW-00; Wed, 06 Oct 2004 12:35:58 +1000 From: Herbert Xu To: acme@conectiva.com.br (Arnaldo Carvalho de Melo) Subject: Re: [TCP] Show all SYN_RECV sockets in /proc/net/tcp Cc: herbert@gondor.apana.org.au, davem@davemloft.net, netdev@oss.sgi.com Organization: Core In-Reply-To: <416355BD.50402@conectiva.com.br> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) Message-Id: Date: Wed, 06 Oct 2004 12:35:58 +1000 X-archive-position: 9958 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 686 Lines: 19 Arnaldo Carvalho de Melo wrote: > > Go ahead and do it with the current seq_file infrastructure 8) Standard Does the current seq_file infrastructure offer anything new compared to what's in the existing /proc/net/tcp code? > answer for these cases is remove /proc/net/tcp altogether and convert > the userland tools to use netlink instead. Completely agreed. As I said I only started looking at this because I was trying to fix tcp_diag. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From acme@conectiva.com.br Tue Oct 5 19:42:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 19:42:20 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i962g7T4006616 for ; Tue, 5 Oct 2004 19:42:14 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id E296247904; Tue, 5 Oct 2004 23:41:49 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 9AB644790B for ; Tue, 5 Oct 2004 23:41:49 -0300 (BRT) Received: (qmail 2769 invoked by uid 0); 6 Oct 2004 03:38:51 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 6 Oct 2004 03:38:51 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id 90C0114639; Tue, 5 Oct 2004 23:44:59 -0300 (BRT) Message-ID: <41635BE5.2000302@conectiva.com.br> Date: Tue, 05 Oct 2004 23:43:49 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Herbert Xu Cc: davem@davemloft.net, netdev@oss.sgi.com Subject: Re: [TCP] Show all SYN_RECV sockets in /proc/net/tcp References: In-Reply-To: X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Bogosity: No, tests=bogofilter, spamicity=0.489440, version=0.16.3 X-archive-position: 9959 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 Content-Length: 751 Lines: 24 Herbert Xu wrote: > Arnaldo Carvalho de Melo wrote: > >>Go ahead and do it with the current seq_file infrastructure 8) Standard > > > Does the current seq_file infrastructure offer anything new compared > to what's in the existing /proc/net/tcp code? Haven't checked, it has been a long time already since I wrote that spaguetti code to fit the seq_file infrastructure :) >>answer for these cases is remove /proc/net/tcp altogether and convert >>the userland tools to use netlink instead. > > Completely agreed. As I said I only started looking at this because > I was trying to fix tcp_diag. I see, and thank you for getting so involved in linux networking development, you're doing a wonderful work :-) - Arnaldo From yoshfuji@linux-ipv6.org Tue Oct 5 19:55:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 19:55:12 -0700 (PDT) Received: from yue.st-paulia.net (yue.linux-ipv6.org [203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i962t6jn007323 for ; Tue, 5 Oct 2004 19:55:06 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 652C933CE5; Wed, 6 Oct 2004 11:55:19 +0900 (JST) Date: Wed, 06 Oct 2004 11:55:17 +0900 (JST) Message-Id: <20041006.115517.130604805.yoshfuji@linux-ipv6.org> To: acme@conectiva.com.br Cc: herbert@gondor.apana.org.au, davem@davemloft.net, netdev@oss.sgi.com, yoshfuji@linux-ipv6.org Subject: Re: [TCP] Show all SYN_RECV sockets in /proc/net/tcp From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <416355BD.50402@conectiva.com.br> References: <20041006020650.GA14583@gondor.apana.org.au> <416355BD.50402@conectiva.com.br> Organization: USAGI Project X-URL: http://www.yoshifuji.org/%7Ehideaki/ X-Fingerprint: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA X-PGP-Key-URL: http://www.yoshifuji.org/%7Ehideaki/hideaki@yoshifuji.org.asc X-Face: "5$Al-.M>NJ%a'@hhZdQm:."qn~PA^gq4o*>iCFToq*bAi#4FRtx}enhuQKz7fNqQz\BYU] $~O_5m-9'}MIs`XGwIEscw;e5b>n"B_?j/AkL~i/MEaZBLP X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 9960 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: yoshfuji@linux-ipv6.org Precedence: bulk X-list: netdev Content-Length: 739 Lines: 18 In article <416355BD.50402@conectiva.com.br> (at Tue, 05 Oct 2004 23:17:33 -0300), Arnaldo Carvalho de Melo says: > > I found that /proc/net/tcp didn't do it correctly either. So here is > > a small patch to fix /proc/net/tcp. > > > > The logic in there stinks though so I'd love to see a rewrite. > > Go ahead and do it with the current seq_file infrastructure 8) Standard > answer for these cases is remove /proc/net/tcp altogether and convert > the userland tools to use netlink instead. It is okay to have dual interface (procfs and netlink), but please, please do not remove /proc/net/tcp (during 2.6.x at least). And, yes, if you want to add something, it should be done in netlink. Thanks. --yoshfuji From herbert@gondor.apana.org.au Tue Oct 5 20:58:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 20:58:47 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i963wbVA016122 for ; Tue, 5 Oct 2004 20:58:38 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CF2wH-0004bp-00; Wed, 06 Oct 2004 13:58:05 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CF2wD-00049P-00; Wed, 06 Oct 2004 13:58:01 +1000 Date: Wed, 6 Oct 2004 13:58:01 +1000 To: "David S. Miller" , Arnaldo Carvalho de Melo , netdev@oss.sgi.com Subject: [TCP] Fixed bug that hid sockets in tcp_diag Message-ID: <20041006035801.GA15940@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="r5Pyd7+fXNt84Ff3" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 9961 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 3021 Lines: 113 --r5Pyd7+fXNt84Ff3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi: This patch squashes a bug in tcp_diag which was created when the sk_* loops replaced the original for loops. It's a pity that these sk_*/hlist_*/list_* loops don't take an arbitrary expression as an argument for continue. Signed-off-by: Herbert Xu Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --r5Pyd7+fXNt84Ff3 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== net/ipv4/tcp_diag.c 1.18 vs edited ===== --- 1.18/net/ipv4/tcp_diag.c 2004-10-04 07:26:12 +10:00 +++ edited/net/ipv4/tcp_diag.c 2004-10-06 13:43:17 +10:00 @@ -495,21 +495,22 @@ sk_for_each(sk, node, &tcp_listening_hash[i]) { struct inet_opt *inet = inet_sk(sk); if (num < s_num) - continue; + goto next_listen; if (!(r->tcpdiag_states&TCPF_LISTEN) || r->id.tcpdiag_dport) - continue; + goto next_listen; if (r->id.tcpdiag_sport != inet->sport && r->id.tcpdiag_sport) - continue; + goto next_listen; if (bc && !tcpdiag_bc_run(RTA_DATA(bc), RTA_PAYLOAD(bc), sk)) - continue; + goto next_listen; if (tcpdiag_fill(skb, sk, r->tcpdiag_ext, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq) <= 0) { tcp_listen_unlock(); goto done; } +next_listen: ++num; } } @@ -537,22 +538,23 @@ struct inet_opt *inet = inet_sk(sk); if (num < s_num) - continue; + goto next_normal; if (!(r->tcpdiag_states & (1 << sk->sk_state))) - continue; + goto next_normal; if (r->id.tcpdiag_sport != inet->sport && r->id.tcpdiag_sport) - continue; + goto next_normal; if (r->id.tcpdiag_dport != inet->dport && r->id.tcpdiag_dport) - continue; + goto next_normal; if (bc && !tcpdiag_bc_run(RTA_DATA(bc), RTA_PAYLOAD(bc), sk)) - continue; + goto next_normal; if (tcpdiag_fill(skb, sk, r->tcpdiag_ext, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq) <= 0) { read_unlock_bh(&head->lock); goto done; } +next_normal: ++num; } @@ -562,21 +564,22 @@ struct inet_opt *inet = inet_sk(sk); if (num < s_num) - continue; + goto next_dying; if (r->id.tcpdiag_sport != inet->sport && r->id.tcpdiag_sport) - continue; + goto next_dying; if (r->id.tcpdiag_dport != inet->dport && r->id.tcpdiag_dport) - continue; + goto next_dying; if (bc && !tcpdiag_bc_run(RTA_DATA(bc), RTA_PAYLOAD(bc), sk)) - continue; + goto next_dying; if (tcpdiag_fill(skb, sk, r->tcpdiag_ext, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq) <= 0) { read_unlock_bh(&head->lock); goto done; } +next_dying: ++num; } } --r5Pyd7+fXNt84Ff3-- From rddunlap@osdl.org Tue Oct 5 21:02:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 21:02:30 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9642Pjx016958 for ; Tue, 5 Oct 2004 21:02:25 -0700 Received: from midway.verizon.net (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i9641Rf07161; Tue, 5 Oct 2004 21:01:27 -0700 Date: Tue, 5 Oct 2004 20:58:44 -0700 From: "Randy.Dunlap" To: Herbert Xu Cc: acme@conectiva.com.br, herbert@gondor.apana.org.au, davem@davemloft.net, netdev@oss.sgi.com Subject: Re: [TCP] Show all SYN_RECV sockets in /proc/net/tcp Message-Id: <20041005205844.444dc66a.rddunlap@osdl.org> In-Reply-To: References: <416355BD.50402@conectiva.com.br> Organization: OSDL X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i386-vine-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9962 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rddunlap@osdl.org Precedence: bulk X-list: netdev Content-Length: 689 Lines: 20 On Wed, 06 Oct 2004 12:35:58 +1000 Herbert Xu wrote: | Arnaldo Carvalho de Melo wrote: | > | > Go ahead and do it with the current seq_file infrastructure 8) Standard | | Does the current seq_file infrastructure offer anything new compared | to what's in the existing /proc/net/tcp code? | | > answer for these cases is remove /proc/net/tcp altogether and convert | > the userland tools to use netlink instead. | | Completely agreed. As I said I only started looking at this because | I was trying to fix tcp_diag. Dave's other standard answer is "don't mess up the userland API", including /proc interfaces. (not to put words into Dave's mouth) -- ~Randy From davem@davemloft.net Tue Oct 5 22:19:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 22:19:30 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i965JPwp024762 for ; Tue, 5 Oct 2004 22:19:25 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CF4CC-0006lE-00; Tue, 05 Oct 2004 22:18:36 -0700 Date: Tue, 5 Oct 2004 22:18:36 -0700 From: "David S. Miller" To: Herbert Xu Cc: netdev@oss.sgi.com Subject: Re: [TCP] Show all SYN_RECV sockets in /proc/net/tcp Message-Id: <20041005221836.4b1281db.davem@davemloft.net> In-Reply-To: <20041006020650.GA14583@gondor.apana.org.au> References: <20041006020650.GA14583@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9963 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 478 Lines: 13 On Wed, 6 Oct 2004 12:06:50 +1000 Herbert Xu wrote: > I was fixing the tcp_diag so that it shows SYN_RECV sockets properly. > I found that /proc/net/tcp didn't do it correctly either. So here is > a small patch to fix /proc/net/tcp. > > The logic in there stinks though so I'd love to see a rewrite. > > Signed-off-by: Herbert Xu Patch applied, thanks. And yes I agree this stuff could be improved dramatically. From davem@davemloft.net Tue Oct 5 22:21:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 22:21:31 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i965LQsp025682 for ; Tue, 5 Oct 2004 22:21:26 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CF4EJ-0006lm-00; Tue, 05 Oct 2004 22:20:47 -0700 Date: Tue, 5 Oct 2004 22:20:47 -0700 From: "David S. Miller" To: yoshfuji@linux-ipv6.org Cc: netdev@oss.sgi.com, usagi-core@linux-ipv6.org Subject: Re: [PATCH] [NET] Fix ECN Encapsulation Message-Id: <20041005222047.0c194f71.davem@davemloft.net> In-Reply-To: <20041006.113404.59652163.yoshfuji@linux-ipv6.org> References: <20041006.113404.59652163.yoshfuji@linux-ipv6.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i965LQsp025682 X-archive-position: 9965 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 295 Lines: 10 On Wed, 06 Oct 2004 11:34:04 +0900 (JST) YOSHIFUJI Hideaki / $B5HF#1QL@(B wrote: > HEADLINE > -------- > ChangeSet@1.2051, 2004-10-06 11:28:16+09:00, yoshfuji@linux-ipv6.org > [NET] ECN: Fix bug in tunnel ECN handling by recent changes. Patch applied, thank you. From davem@davemloft.net Tue Oct 5 22:23:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 22:23:05 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i965N0Fk026167 for ; Tue, 5 Oct 2004 22:23:00 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CF4FX-0006m2-00; Tue, 05 Oct 2004 22:22:03 -0700 Date: Tue, 5 Oct 2004 22:22:02 -0700 From: "David S. Miller" To: Herbert Xu Cc: acme@conectiva.com.br, netdev@oss.sgi.com Subject: Re: [TCP] Fixed bug that hid sockets in tcp_diag Message-Id: <20041005222202.0d1d9be0.davem@davemloft.net> In-Reply-To: <20041006035801.GA15940@gondor.apana.org.au> References: <20041006035801.GA15940@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9966 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 522 Lines: 14 On Wed, 6 Oct 2004 13:58:01 +1000 Herbert Xu wrote: > This patch squashes a bug in tcp_diag which was created when the > sk_* loops replaced the original for loops. It's a pity that these > sk_*/hlist_*/list_* loops don't take an arbitrary expression as an > argument for continue. > > Signed-off-by: Herbert Xu Thanks a lot for fixing this bug Herbert, patch applied. Did you send this patch to the original bug reporter for testing? What was the result? From herbert@gondor.apana.org.au Tue Oct 5 23:03:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 05 Oct 2004 23:03:33 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9663Ohb029777 for ; Tue, 5 Oct 2004 23:03:25 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CF4su-0005IE-00; Wed, 06 Oct 2004 16:02:44 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CF4sr-0004M5-00; Wed, 06 Oct 2004 16:02:41 +1000 Date: Wed, 6 Oct 2004 16:02:41 +1000 To: "David S. Miller" Cc: acme@conectiva.com.br, netdev@oss.sgi.com Subject: Re: [TCP] Fixed bug that hid sockets in tcp_diag Message-ID: <20041006060241.GA16674@gondor.apana.org.au> References: <20041006035801.GA15940@gondor.apana.org.au> <20041005222202.0d1d9be0.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041005222202.0d1d9be0.davem@davemloft.net> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 9967 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 429 Lines: 11 On Tue, Oct 05, 2004 at 10:22:02PM -0700, David S. Miller wrote: > > Did you send this patch to the original bug reporter for > testing? What was the result? I haven't fixed his problem yet. This is just a start :) -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From davem@davemloft.net Wed Oct 6 10:04:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 10:04:25 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96H4GZj027665 for ; Wed, 6 Oct 2004 10:04:16 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CFFBh-0007hn-00; Wed, 06 Oct 2004 10:02:49 -0700 Date: Wed, 6 Oct 2004 10:02:49 -0700 From: "David S. Miller" To: Arnaldo Carvalho de Melo Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2/2][BRIDGE] convert __constant_htons(constant) to htons Message-Id: <20041006100249.01aeb999.davem@davemloft.net> In-Reply-To: <41631B6D.5050503@conectiva.com.br> References: <41631B6D.5050503@conectiva.com.br> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9968 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 316 Lines: 11 On Tue, 05 Oct 2004 19:08:45 -0300 Arnaldo Carvalho de Melo wrote: > Please consider pulling from: > > bk://kernel.bkbits.net/acme/sk_buff-2.6 > > Now there are just these two changesets in this tree, will > wait for you to pull to submit the next set. Looks good, pulled into my tree. From davem@davemloft.net Wed Oct 6 10:42:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 10:42:48 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96Hgg9d028983 for ; Wed, 6 Oct 2004 10:42:43 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CFFnM-0007nH-00; Wed, 06 Oct 2004 10:41:44 -0700 Date: Wed, 6 Oct 2004 10:41:43 -0700 From: "David S. Miller" To: Thomas Graf Cc: hadi@cyberus.ca, netdev@oss.sgi.com Subject: Re: [RFC] Replacing qdisc tc_stats with generic statistics to make it extendable Message-Id: <20041006104143.0d5cbc81.davem@davemloft.net> In-Reply-To: <20041005222149.GA17186@postel.suug.ch> References: <20041003213124.GG14344@postel.suug.ch> <20041003213954.GI14344@postel.suug.ch> <20041003161436.50293f9a.davem@davemloft.net> <20041003235737.GO14344@postel.suug.ch> <20041005140304.6d0d5f02.davem@davemloft.net> <20041005222149.GA17186@postel.suug.ch> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9969 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 665 Lines: 18 On Wed, 6 Oct 2004 00:21:49 +0200 Thomas Graf wrote: > Since this is pretty major and will touch a lot of code I'd be interested > if this is the right way to go and how to do it to make patch submission > as easy as possible. > Here would be my scenario on howto do it in several steps not breaking > anything in between: > Step 1: Use new generic networking statistics, update all qdiscs and > switch to new estimator. Doesn't break anything but must be > atomic. > Step 2-N: Add dump_stats and update qdiscs one after each other. > > Thoughts? This sounds fine to me. Don't be concerned about breaking binary-only qdiscs :-) From torvalds@osdl.org Wed Oct 6 10:45:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 10:45:23 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96HjGai029329 for ; Wed, 6 Oct 2004 10:45:17 -0700 Received: from localhost (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i96Hhof02115; Wed, 6 Oct 2004 10:43:51 -0700 Date: Wed, 6 Oct 2004 10:43:50 -0700 (PDT) From: Linus Torvalds To: Jeff Garzik , Arnaldo Carvalho de Melo , Corey Thomas cc: netdev@oss.sgi.com, Kernel Mailing List Subject: Raylink/WebGear testing - ray_cs.c iomem bug? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 9970 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: torvalds@osdl.org Precedence: bulk X-list: netdev Content-Length: 21546 Lines: 531 Does anybody have a raylink/WebGear card any more? I used to have one, and as a result, I still had it in the default config for my laptop, and that in turn caused me to fix up the sparse-warnings for iomem annotations. That cleanup in turn seems to show that the driver was fundamentally buggy in a way that really surprises me: it adds "CCS_BASE" to the PCI window base in order to get to both the "struct ccs" pointer _and_ to the "struct rcs" pointer. The RCS_BASE offset (which would seem to be the obvious one for the "struct rcs" pointer) is totally unused by the driver. If somebody has access to this card and can test it, can you email me? I'd hate to apply even an "obvious" fix when the bug may be hidden by other bugs, and the obvious fix might end up breaking things for silly reasons. I append the cleanup-patch, which leaves "rcs_base()" being calculated using the CCS_BASE offset. It looks strange as hell, but that's what the code used to do.. What I'd like people to test is changing that "rcs_base()" function to use RCS_BASE instead, and seeing if that still results in a working driver (or maybe even fixes something). Linus ----- ===== drivers/net/wireless/ray_cs.c 1.28 vs edited ===== --- 1.28/drivers/net/wireless/ray_cs.c 2004-07-13 06:29:35 -07:00 +++ edited/drivers/net/wireless/ray_cs.c 2004-10-06 10:27:05 -07:00 @@ -112,9 +112,9 @@ static int ray_dev_start_xmit(struct sk_buff *skb, struct net_device *dev); static void set_multicast_list(struct net_device *dev); static void ray_update_multi_list(struct net_device *dev, int all); -static int translate_frame(ray_dev_t *local, struct tx_msg *ptx, +static int translate_frame(ray_dev_t *local, struct tx_msg __iomem *ptx, unsigned char *data, int len); -static void ray_build_header(ray_dev_t *local, struct tx_msg *ptx, UCHAR msg_type, +static void ray_build_header(ray_dev_t *local, struct tx_msg __iomem *ptx, UCHAR msg_type, unsigned char *data); static void untranslate(ray_dev_t *local, struct sk_buff *skb, int len); #if WIRELESS_EXT > 7 /* If wireless extension exist in the kernel */ @@ -140,14 +140,14 @@ /* Prototypes for interrpt time functions **********************************/ static irqreturn_t ray_interrupt (int reg, void *dev_id, struct pt_regs *regs); static void clear_interrupt(ray_dev_t *local); -static void rx_deauthenticate(ray_dev_t *local, struct rcs *prcs, +static void rx_deauthenticate(ray_dev_t *local, struct rcs __iomem *prcs, unsigned int pkt_addr, int rx_len); static int copy_from_rx_buff(ray_dev_t *local, UCHAR *dest, int pkt_addr, int len); -static void ray_rx(struct net_device *dev, ray_dev_t *local, struct rcs *prcs); -static void release_frag_chain(ray_dev_t *local, struct rcs *prcs); -static void rx_authenticate(ray_dev_t *local, struct rcs *prcs, +static void ray_rx(struct net_device *dev, ray_dev_t *local, struct rcs __iomem *prcs); +static void release_frag_chain(ray_dev_t *local, struct rcs __iomem *prcs); +static void rx_authenticate(ray_dev_t *local, struct rcs __iomem *prcs, unsigned int pkt_addr, int rx_len); -static void rx_data(struct net_device *dev, struct rcs *prcs, unsigned int pkt_addr, +static void rx_data(struct net_device *dev, struct rcs __iomem *prcs, unsigned int pkt_addr, int rx_len); static void associate(ray_dev_t *local); @@ -540,7 +540,7 @@ CS_CHECK(RequestWindow, pcmcia_request_window(&link->handle, &req, &link->win)); mem.CardOffset = 0x0000; mem.Page = 0; CS_CHECK(MapMemPage, pcmcia_map_mem_page(link->win, &mem)); - local->sram = (UCHAR *)(ioremap(req.Base,req.Size)); + local->sram = ioremap(req.Base,req.Size); /*** Set up 16k window for shared memory (receive buffer) ***************/ req.Attributes = WIN_DATA_WIDTH_8 | WIN_MEMORY_TYPE_CM | WIN_ENABLE | WIN_USE_WAIT; @@ -550,7 +550,7 @@ CS_CHECK(RequestWindow, pcmcia_request_window(&link->handle, &req, &local->rmem_handle)); mem.CardOffset = 0x8000; mem.Page = 0; CS_CHECK(MapMemPage, pcmcia_map_mem_page(local->rmem_handle, &mem)); - local->rmem = (UCHAR *)(ioremap(req.Base,req.Size)); + local->rmem = ioremap(req.Base,req.Size); /*** Set up window for attribute memory ***********************************/ req.Attributes = WIN_DATA_WIDTH_8 | WIN_MEMORY_TYPE_AM | WIN_ENABLE | WIN_USE_WAIT; @@ -560,7 +560,7 @@ CS_CHECK(RequestWindow, pcmcia_request_window(&link->handle, &req, &local->amem_handle)); mem.CardOffset = 0x0000; mem.Page = 0; CS_CHECK(MapMemPage, pcmcia_map_mem_page(local->amem_handle, &mem)); - local->amem = (UCHAR *)(ioremap(req.Base,req.Size)); + local->amem = ioremap(req.Base,req.Size); DEBUG(3,"ray_config sram=%p\n",local->sram); DEBUG(3,"ray_config rmem=%p\n",local->rmem); @@ -593,12 +593,28 @@ ray_release(link); } /* ray_config */ + +static inline struct ccs __iomem *ccs_base(ray_dev_t *dev) +{ + return dev->sram + CCS_BASE; +} + +static inline struct rcs __iomem *rcs_base(ray_dev_t *dev) +{ + /* + * Is this really right? Should it be RCS_BASE? + * All the users used CCS_BASE, but this makes + * no sense naming-wise not logically.. + */ + return dev->sram + CCS_BASE; +} + /*===========================================================================*/ static int ray_init(struct net_device *dev) { int i; UCHAR *p; - struct ccs *pccs; + struct ccs __iomem *pccs; ray_dev_t *local = (ray_dev_t *)dev->priv; dev_link_t *link = local->finder; DEBUG(1, "ray_init(0x%p)\n", dev); @@ -632,7 +648,7 @@ local->tib_length = local->startup_res.tib_length; DEBUG(2,"ray_init tib_length = 0x%02x\n", local->tib_length); /* Initialize CCS's to buffer free state */ - pccs = (struct ccs *)(local->sram + CCS_BASE); + pccs = ccs_base(local); for (i=0; ibuffer_status); } @@ -661,7 +677,7 @@ { int ccsindex; ray_dev_t *local = (ray_dev_t *)dev->priv; - struct ccs *pccs; + struct ccs __iomem *pccs; dev_link_t *link = local->finder; DEBUG(1,"dl_startup_params entered\n"); @@ -682,7 +698,7 @@ /* Fill in the CCS fields for the ECF */ if ((ccsindex = get_free_ccs(local)) < 0) return -1; local->dl_param_ccs = ccsindex; - pccs = ((struct ccs *)(local->sram + CCS_BASE)) + ccsindex; + pccs = ccs_base(local) + ccsindex; writeb(CCS_DOWNLOAD_STARTUP_PARAMS, &pccs->cmd); DEBUG(2,"dl_startup_params start ccsindex = %d\n", local->dl_param_ccs); /* Interrupt the firmware to process the command */ @@ -767,7 +783,7 @@ static void verify_dl_startup(u_long data) { ray_dev_t *local = (ray_dev_t *)data; - struct ccs *pccs = ((struct ccs *)(local->sram + CCS_BASE)) + local->dl_param_ccs; + struct ccs __iomem *pccs = ccs_base(local) + local->dl_param_ccs; UCHAR status; dev_link_t *link = local->finder; @@ -807,7 +823,7 @@ static void start_net(u_long data) { ray_dev_t *local = (ray_dev_t *)data; - struct ccs *pccs; + struct ccs __iomem *pccs; int ccsindex; dev_link_t *link = local->finder; if (!(link->state & DEV_PRESENT)) { @@ -816,7 +832,7 @@ } /* Fill in the CCS fields for the ECF */ if ((ccsindex = get_free_ccs(local)) < 0) return; - pccs = ((struct ccs *)(local->sram + CCS_BASE)) + ccsindex; + pccs = ccs_base(local) + ccsindex; writeb(CCS_START_NETWORK, &pccs->cmd); writeb(0, &pccs->var.start_network.update_param); /* Interrupt the firmware to process the command */ @@ -834,7 +850,7 @@ { ray_dev_t *local = (ray_dev_t *)data; - struct ccs *pccs; + struct ccs __iomem *pccs; int ccsindex; dev_link_t *link = local->finder; @@ -844,7 +860,7 @@ } /* Fill in the CCS fields for the ECF */ if ((ccsindex = get_free_ccs(local)) < 0) return; - pccs = ((struct ccs *)(local->sram + CCS_BASE)) + ccsindex; + pccs = ccs_base(local) + ccsindex; writeb(CCS_JOIN_NETWORK, &pccs->cmd); writeb(0, &pccs->var.join_network.update_param); writeb(0, &pccs->var.join_network.net_initiated); @@ -1049,10 +1065,10 @@ UCHAR msg_type) { ray_dev_t *local = (ray_dev_t *)dev->priv; - struct ccs *pccs; + struct ccs __iomem *pccs; int ccsindex; int offset; - struct tx_msg *ptx; /* Address of xmit buffer in PC space */ + struct tx_msg __iomem *ptx; /* Address of xmit buffer in PC space */ short int addr; /* Address of xmit buffer in card space */ DEBUG(3,"ray_hw_xmit(data=%p, len=%d, dev=%p)\n",data,len,dev); @@ -1079,7 +1095,7 @@ local->stats.tx_packets++; } - ptx = (struct tx_msg *)(local->sram + addr); + ptx = local->sram + addr; ray_build_header(local, ptx, msg_type, data); if (translate) { @@ -1092,7 +1108,7 @@ } /* fill in the CCS */ - pccs = ((struct ccs *)(local->sram + CCS_BASE)) + ccsindex; + pccs = ccs_base(local) + ccsindex; len += TX_HEADER_LENGTH + offset; writeb(CCS_TX_REQUEST, &pccs->cmd); writeb(addr >> 8, &pccs->var.tx_request.tx_data_ptr[0]); @@ -1119,21 +1135,21 @@ return XMIT_OK; } /* end ray_hw_xmit */ /*===========================================================================*/ -static int translate_frame(ray_dev_t *local, struct tx_msg *ptx, unsigned char *data, +static int translate_frame(ray_dev_t *local, struct tx_msg __iomem *ptx, unsigned char *data, int len) { unsigned short int proto = ((struct ethhdr *)data)->h_proto; if (ntohs(proto) >= 1536) { /* DIX II ethernet frame */ DEBUG(3,"ray_cs translate_frame DIX II\n"); /* Copy LLC header to card buffer */ - memcpy_toio((UCHAR *)&ptx->var, eth2_llc, sizeof(eth2_llc)); - memcpy_toio( ((UCHAR *)&ptx->var) + sizeof(eth2_llc), (UCHAR *)&proto, 2); + memcpy_toio(&ptx->var, eth2_llc, sizeof(eth2_llc)); + memcpy_toio( ((void __iomem *)&ptx->var) + sizeof(eth2_llc), (UCHAR *)&proto, 2); if ((proto == 0xf380) || (proto == 0x3781)) { /* This is the selective translation table, only 2 entries */ - writeb(0xf8, (UCHAR *) &((struct snaphdr_t *)ptx->var)->org[3]); + writeb(0xf8, &((struct snaphdr_t __iomem *)ptx->var)->org[3]); } /* Copy body of ethernet packet without ethernet header */ - memcpy_toio((UCHAR *)&ptx->var + sizeof(struct snaphdr_t), \ + memcpy_toio((void __iomem *)&ptx->var + sizeof(struct snaphdr_t), \ data + ETH_HLEN, len - ETH_HLEN); return (int) sizeof(struct snaphdr_t) - ETH_HLEN; } @@ -1141,16 +1157,16 @@ DEBUG(3,"ray_cs translate_frame 802\n"); if (proto == 0xffff) { /* evil netware IPX 802.3 without LLC */ DEBUG(3,"ray_cs translate_frame evil IPX\n"); - memcpy_toio((UCHAR *)&ptx->var, data + ETH_HLEN, len - ETH_HLEN); + memcpy_toio(&ptx->var, data + ETH_HLEN, len - ETH_HLEN); return 0 - ETH_HLEN; } - memcpy_toio((UCHAR *)&ptx->var, data + ETH_HLEN, len - ETH_HLEN); + memcpy_toio(&ptx->var, data + ETH_HLEN, len - ETH_HLEN); return 0 - ETH_HLEN; } /* TBD do other frame types */ } /* end translate_frame */ /*===========================================================================*/ -static void ray_build_header(ray_dev_t *local, struct tx_msg *ptx, UCHAR msg_type, +static void ray_build_header(ray_dev_t *local, struct tx_msg __iomem *ptx, UCHAR msg_type, unsigned char *data) { writeb(PROTOCOL_VER | msg_type, &ptx->mac.frame_ctl_1); @@ -1633,7 +1649,7 @@ { ray_dev_t * local = (ray_dev_t *) dev->priv; dev_link_t *link = local->finder; - struct status *p = (struct status *)(local->sram + STATUS_BASE); + struct status __iomem *p = local->sram + STATUS_BASE; if(local == (ray_dev_t *) NULL) return (iw_stats *) NULL; @@ -1755,7 +1771,7 @@ static int get_free_tx_ccs(ray_dev_t *local) { int i; - struct ccs *pccs = (struct ccs *)(local->sram + CCS_BASE); + struct ccs __iomem *pccs = ccs_base(local); dev_link_t *link = local->finder; if (!(link->state & DEV_PRESENT)) { @@ -1786,7 +1802,7 @@ static int get_free_ccs(ray_dev_t *local) { int i; - struct ccs *pccs = (struct ccs *)(local->sram + CCS_BASE); + struct ccs __iomem *pccs = ccs_base(local); dev_link_t *link = local->finder; if (!(link->state & DEV_PRESENT)) { @@ -1863,7 +1879,7 @@ { ray_dev_t *local = (ray_dev_t *)dev->priv; dev_link_t *link = local->finder; - struct status *p = (struct status *)(local->sram + STATUS_BASE); + struct status __iomem *p = local->sram + STATUS_BASE; if (!(link->state & DEV_PRESENT)) { DEBUG(2,"ray_cs net_device_stats - device not present\n"); return &local->stats; @@ -1895,7 +1911,7 @@ dev_link_t *link = local->finder; int ccsindex; int i; - struct ccs *pccs; + struct ccs __iomem *pccs; if (!(link->state & DEV_PRESENT)) { DEBUG(2,"ray_update_parm - device not present\n"); @@ -1907,7 +1923,7 @@ DEBUG(0,"ray_update_parm - No free ccs\n"); return; } - pccs = ((struct ccs *)(local->sram + CCS_BASE)) + ccsindex; + pccs = ccs_base(local) + ccsindex; writeb(CCS_UPDATE_PARAMS, &pccs->cmd); writeb(objid, &pccs->var.update_param.object_id); writeb(1, &pccs->var.update_param.number_objects); @@ -1926,11 +1942,11 @@ { struct dev_mc_list *dmi, **dmip; int ccsindex; - struct ccs *pccs; + struct ccs __iomem *pccs; int i = 0; ray_dev_t *local = (ray_dev_t *)dev->priv; dev_link_t *link = local->finder; - UCHAR *p = local->sram + HOST_TO_ECF_BASE; + void __iomem *p = local->sram + HOST_TO_ECF_BASE; if (!(link->state & DEV_PRESENT)) { DEBUG(2,"ray_update_multi_list - device not present\n"); @@ -1943,7 +1959,7 @@ DEBUG(1,"ray_update_multi - No free ccs\n"); return; } - pccs = ((struct ccs *)(local->sram + CCS_BASE)) + ccsindex; + pccs = ccs_base(local) + ccsindex; writeb(CCS_UPDATE_MULTICAST_LIST, &pccs->cmd); if (all) { @@ -2011,8 +2027,8 @@ struct net_device *dev = (struct net_device *)dev_id; dev_link_t *link; ray_dev_t *local; - struct ccs *pccs; - struct rcs *prcs; + struct ccs __iomem *pccs; + struct rcs __iomem *prcs; UCHAR rcsindex; UCHAR tmp; UCHAR cmd; @@ -2029,7 +2045,7 @@ DEBUG(2,"ray_cs interrupt from device not present or suspended.\n"); return IRQ_NONE; } - rcsindex = readb(&((struct scb *)(local->sram))->rcs_index); + rcsindex = readb(&((struct scb __iomem *)(local->sram))->rcs_index); if (rcsindex >= (NUMBER_OF_CCS + NUMBER_OF_RCS)) { @@ -2039,7 +2055,7 @@ } if (rcsindex < NUMBER_OF_CCS) /* If it's a returned CCS */ { - pccs = ((struct ccs *) (local->sram + CCS_BASE)) + rcsindex; + pccs = ccs_base(local) + rcsindex; cmd = readb(&pccs->cmd); status = readb(&pccs->buffer_status); switch (cmd) @@ -2153,7 +2169,7 @@ } else /* It's an RCS */ { - prcs = ((struct rcs *)(local->sram + CCS_BASE)) + rcsindex; + prcs = rcs_base(local) + rcsindex; switch (readb(&prcs->interrupt_id)) { @@ -2194,11 +2210,11 @@ return IRQ_HANDLED; } /* ray_interrupt */ /*===========================================================================*/ -static void ray_rx(struct net_device *dev, ray_dev_t *local, struct rcs *prcs) +static void ray_rx(struct net_device *dev, ray_dev_t *local, struct rcs __iomem *prcs) { int rx_len; unsigned int pkt_addr; - UCHAR *pmsg; + void __iomem *pmsg; DEBUG(4,"ray_rx process rx packet\n"); /* Calculate address of packet within Rx buffer */ @@ -2248,11 +2264,11 @@ } /* end ray_rx */ /*===========================================================================*/ -static void rx_data(struct net_device *dev, struct rcs *prcs, unsigned int pkt_addr, +static void rx_data(struct net_device *dev, struct rcs __iomem *prcs, unsigned int pkt_addr, int rx_len) { struct sk_buff *skb = NULL; - struct rcs *prcslink = prcs; + struct rcs __iomem *prcslink = prcs; ray_dev_t *local = dev->priv; UCHAR *rx_ptr; int total_len; @@ -2294,7 +2310,7 @@ + readb(&prcslink->var.rx_packet.rx_data_length[1]); if (readb(&prcslink->var.rx_packet.next_frag_rcs_index) == 0xFF || tmp < 0) break; - prcslink = ((struct rcs *)(local->sram + CCS_BASE)) + prcslink = rcs_base(local) + readb(&prcslink->link_field); } while (1); @@ -2355,7 +2371,7 @@ prcslink = prcs; DEBUG(1,"ray_cs rx_data in fragment loop\n"); do { - prcslink = ((struct rcs *)(local->sram + CCS_BASE)) + prcslink = rcs_base(local) + readb(&prcslink->var.rx_packet.next_frag_rcs_index); rx_len = (( readb(&prcslink->var.rx_packet.rx_data_length[0]) << 8) + readb(&prcslink->var.rx_packet.rx_data_length[1])) @@ -2529,9 +2545,9 @@ return length; } /*===========================================================================*/ -static void release_frag_chain(ray_dev_t *local, struct rcs* prcs) +static void release_frag_chain(ray_dev_t *local, struct rcs __iomem * prcs) { - struct rcs *prcslink = prcs; + struct rcs __iomem *prcslink = prcs; int tmp = 17; unsigned rcsindex = readb(&prcs->var.rx_packet.next_frag_rcs_index); @@ -2541,7 +2557,7 @@ DEBUG(1,"ray_cs interrupt bad rcsindex = 0x%x\n",rcsindex); break; } - prcslink = ((struct rcs *)(local->sram + CCS_BASE)) + rcsindex; + prcslink = rcs_base(local) + rcsindex; rcsindex = readb(&prcslink->var.rx_packet.next_frag_rcs_index); } writeb(CCS_BUFFER_FREE, &prcslink->buffer_status); @@ -2569,7 +2585,7 @@ local->authentication_state = AWAITING_RESPONSE; } /* end authenticate */ /*===========================================================================*/ -static void rx_authenticate(ray_dev_t *local, struct rcs *prcs, +static void rx_authenticate(ray_dev_t *local, struct rcs __iomem *prcs, unsigned int pkt_addr, int rx_len) { UCHAR buff[256]; @@ -2614,7 +2630,7 @@ /*===========================================================================*/ static void associate(ray_dev_t *local) { - struct ccs *pccs; + struct ccs __iomem *pccs; dev_link_t *link = local->finder; struct net_device *dev = link->priv; int ccsindex; @@ -2630,7 +2646,7 @@ return; } DEBUG(1,"ray_cs Starting association with access point\n"); - pccs = ((struct ccs *)(local->sram + CCS_BASE)) + ccsindex; + pccs = ccs_base(local) + ccsindex; /* fill in the CCS */ writeb(CCS_START_ASSOCIATION, &pccs->cmd); /* Interrupt the firmware to process the command */ @@ -2650,7 +2666,7 @@ } /* end associate */ /*===========================================================================*/ -static void rx_deauthenticate(ray_dev_t *local, struct rcs *prcs, +static void rx_deauthenticate(ray_dev_t *local, struct rcs __iomem *prcs, unsigned int pkt_addr, int rx_len) { /* UCHAR buff[256]; @@ -2798,8 +2814,8 @@ static int build_auth_frame(ray_dev_t *local, UCHAR *dest, int auth_type) { int addr; - struct ccs *pccs; - struct tx_msg *ptx; + struct ccs __iomem *pccs; + struct tx_msg __iomem *ptx; int ccsindex; /* If no tx buffers available, return */ @@ -2809,7 +2825,7 @@ return -1; } - pccs = ((struct ccs *)(local->sram + CCS_BASE)) + ccsindex; + pccs = ccs_base(local) + ccsindex; /* Address in card space */ addr = TX_BUF_BASE + (ccsindex << 11); @@ -2821,7 +2837,7 @@ writeb(TX_AUTHENTICATE_LENGTH_LSB,pccs->var.tx_request.tx_data_length + 1); writeb(0, &pccs->var.tx_request.pow_sav_mode); - ptx = (struct tx_msg *)(local->sram + addr); + ptx = local->sram + addr; /* fill in the mac header */ writeb(PROTOCOL_VER | AUTHENTIC_TYPE, &ptx->mac.frame_ctl_1); writeb(0, &ptx->mac.frame_ctl_2); ===== drivers/net/wireless/ray_cs.h 1.2 vs edited ===== --- 1.2/drivers/net/wireless/ray_cs.h 2003-02-18 17:22:50 -08:00 +++ edited/drivers/net/wireless/ray_cs.h 2004-10-06 10:04:52 -07:00 @@ -28,9 +28,9 @@ dev_node_t node; window_handle_t amem_handle; /* handle to window for attribute memory */ window_handle_t rmem_handle; /* handle to window for rx buffer on card */ - UCHAR *sram; /* pointer to beginning of shared RAM */ - UCHAR *amem; /* pointer to attribute mem window */ - UCHAR *rmem; /* pointer to receive buffer window */ + void __iomem *sram; /* pointer to beginning of shared RAM */ + void __iomem *amem; /* pointer to attribute mem window */ + void __iomem *rmem; /* pointer to receive buffer window */ dev_link_t *finder; /* pointer back to dev_link_t for card */ struct timer_list timer; long tx_ccs_lock; From torvalds@osdl.org Wed Oct 6 10:56:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 10:56:51 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96Hukkw029914 for ; Wed, 6 Oct 2004 10:56:46 -0700 Received: from localhost (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i96Hu2f04416; Wed, 6 Oct 2004 10:56:02 -0700 Date: Wed, 6 Oct 2004 10:56:01 -0700 (PDT) From: Linus Torvalds To: Jeff Garzik , Arnaldo Carvalho de Melo , Corey Thomas cc: netdev@oss.sgi.com, Kernel Mailing List Subject: Re: Raylink/WebGear testing - ray_cs.c iomem bug? In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 9972 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: torvalds@osdl.org Precedence: bulk X-list: netdev Content-Length: 656 Lines: 17 On Wed, 6 Oct 2004, Linus Torvalds wrote: > > If somebody has access to this card and can test it, can you email me? I'd > hate to apply even an "obvious" fix when the bug may be hidden by other > bugs, and the obvious fix might end up breaking things for silly reasons. Ahh. Never mind. It looks like the RCS/CCS difference is encoded in the index that is used to offset the base, which means that rcs_base and ccs_base really do end up being the same thing. Still, I'd love to have somebody verify that the cleaned-up version (without any changes) still works. It should be 100% equivalent to the old one, but it's good to make sure. Linus From davem@davemloft.net Wed Oct 6 10:56:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 10:56:20 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96HuEb2029870 for ; Wed, 6 Oct 2004 10:56:14 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CFG06-0007ou-00; Wed, 06 Oct 2004 10:54:54 -0700 Date: Wed, 6 Oct 2004 10:54:53 -0700 From: "David S. Miller" To: Linus Torvalds Cc: jgarzik@pobox.com, acme@conectiva.com.br, corey@world.std.com, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: Raylink/WebGear testing - ray_cs.c iomem bug? Message-Id: <20041006105453.5f7d1888.davem@davemloft.net> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9971 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 722 Lines: 18 On Wed, 6 Oct 2004 10:43:50 -0700 (PDT) Linus Torvalds wrote: > That cleanup in turn seems to show that the driver was fundamentally buggy > in a way that really surprises me: it adds "CCS_BASE" to the PCI window > base in order to get to both the "struct ccs" pointer _and_ to the "struct > rcs" pointer. In the spot where this occurs, it adds both CCS_BASE and 'rcsindex' to the sram base, and only when rcsindex >= NUMBER_OF_CCS. NUMBER_OF_CCS is 64, and the difference between CCS_BASE and RCS_BASE is 0x400 so this really doesn't account for anything. I can't see how you've changed the behavior, so it should work as well as it did before your changes. Sorry, I don't have a ray_cs handy :) From torvalds@osdl.org Wed Oct 6 11:07:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 11:07:51 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96I7bco030850 for ; Wed, 6 Oct 2004 11:07:38 -0700 Received: from localhost (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i96I6jf06638; Wed, 6 Oct 2004 11:06:45 -0700 Date: Wed, 6 Oct 2004 11:06:45 -0700 (PDT) From: Linus Torvalds To: "David S. Miller" cc: jgarzik@pobox.com, acme@conectiva.com.br, corey@world.std.com, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: Raylink/WebGear testing - ray_cs.c iomem bug? In-Reply-To: <20041006105453.5f7d1888.davem@davemloft.net> Message-ID: References: <20041006105453.5f7d1888.davem@davemloft.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 9973 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: torvalds@osdl.org Precedence: bulk X-list: netdev Content-Length: 1060 Lines: 27 On Wed, 6 Oct 2004, David S. Miller wrote: > > In the spot where this occurs, it adds both CCS_BASE and > 'rcsindex' to the sram base, and only when rcsindex >= NUMBER_OF_CCS. > > NUMBER_OF_CCS is 64, and the difference between CCS_BASE and RCS_BASE > is 0x400 so this really doesn't account for anything. It does, though: as I noted in my second mail (after trying to figure it out some more) the size of both ccs and rcs is 16 bytes, so when you offset by 64, so the difference between RCS_BASE and CCS_BASE ends up being exactly "NUMBER_OF_CCS*sizeof(struct ccs/rcs)", which explains how the base is the same, and the _index_ ends up being the one that selects between the two. > I can't see how you've changed the behavior, so it should work as well > as it did before your changes. Agreed. I've only removed a few casts, and cleaned up some of the accesses, so it _should_ work the way it did before. Of course, I _should_ be handsome, so things clearly don't always work out the way they should. Testing would still be appreciated. Linus From davem@davemloft.net Wed Oct 6 11:15:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 11:15:48 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96IFddh031258 for ; Wed, 6 Oct 2004 11:15:39 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CFGJ5-0007rT-00; Wed, 06 Oct 2004 11:14:31 -0700 Date: Wed, 6 Oct 2004 11:14:31 -0700 From: "David S. Miller" To: Linus Torvalds Cc: jgarzik@pobox.com, acme@conectiva.com.br, corey@world.std.com, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: Raylink/WebGear testing - ray_cs.c iomem bug? Message-Id: <20041006111431.442ff47e.davem@davemloft.net> In-Reply-To: References: <20041006105453.5f7d1888.davem@davemloft.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9974 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 728 Lines: 15 On Wed, 6 Oct 2004 11:06:45 -0700 (PDT) Linus Torvalds wrote: > > NUMBER_OF_CCS is 64, and the difference between CCS_BASE and RCS_BASE > > is 0x400 so this really doesn't account for anything. > > It does, though: as I noted in my second mail (after trying to figure it > out some more) the size of both ccs and rcs is 16 bytes, so when you > offset by 64, so the difference between RCS_BASE and CCS_BASE ends up > being exactly "NUMBER_OF_CCS*sizeof(struct ccs/rcs)", which explains how > the base is the same, and the _index_ ends up being the one that selects > between the two. Right, that makes perfect sense. I missed how it was doing structure pointer arithmetic when offsetting by the index. From acme@conectiva.com.br Wed Oct 6 11:37:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 11:37:44 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96IbZAb032556 for ; Wed, 6 Oct 2004 11:37:36 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id A3DE047360; Wed, 6 Oct 2004 15:37:15 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 5697C4731D for ; Wed, 6 Oct 2004 15:37:15 -0300 (BRT) Received: (qmail 15906 invoked by uid 0); 6 Oct 2004 19:34:18 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 6 Oct 2004 19:34:18 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id 63FC514639; Wed, 6 Oct 2004 15:40:27 -0300 (BRT) Message-ID: <41643BDA.8000204@conectiva.com.br> Date: Wed, 06 Oct 2004 15:39:22 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 1/2] [SKBUFF] use eth_hdr(skb), skb->mac.raw cases X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------090802080008060505060306" X-Bogosity: No, tests=bogofilter, spamicity=0.443147, version=0.16.3 X-archive-position: 9975 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 Content-Length: 4611 Lines: 140 This is a multi-part message in MIME format. --------------090802080008060505060306 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi David, More two changesets, first one in this message, placed in bk://kernel.bkbits.net/acme/sk_buff-2.6 Regards, - Arnaldo --------------090802080008060505060306 Content-Type: text/plain; name="eth_hdr2.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="eth_hdr2.patch" =================================================================== ChangeSet@1.2055, 2004-10-06 14:12:55-03:00, acme@conectiva.com.br [SKBUFF] use eth_hdr(skb), skb->mac.raw cases Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller drivers/ieee1394/eth1394.c | 2 +- drivers/ieee1394/eth1394.h | 7 +++++++ drivers/net/hamradio/bpqether.c | 2 +- include/net/llc_pdu.h | 6 +++--- net/llc/llc_input.c | 2 +- net/llc/llc_output.c | 2 +- 6 files changed, 14 insertions(+), 7 deletions(-) diff -Nru a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c --- a/drivers/ieee1394/eth1394.c 2004-10-06 15:34:25 -03:00 +++ b/drivers/ieee1394/eth1394.c 2004-10-06 15:34:25 -03:00 @@ -850,7 +850,7 @@ skb->mac.raw = skb->data; skb_pull (skb, ETH1394_HLEN); - eth = (struct eth1394hdr*)skb->mac.raw; + eth = eth1394_hdr(skb); if (*eth->h_dest & 1) { if (memcmp(eth->h_dest, dev->broadcast, dev->addr_len)==0) diff -Nru a/drivers/ieee1394/eth1394.h b/drivers/ieee1394/eth1394.h --- a/drivers/ieee1394/eth1394.h 2004-10-06 15:34:25 -03:00 +++ b/drivers/ieee1394/eth1394.h 2004-10-06 15:34:25 -03:00 @@ -81,7 +81,14 @@ unsigned short h_proto; /* packet type ID field */ } __attribute__((packed)); +#ifdef __KERNEL__ +#include +static inline struct eth1394hdr *eth1394_hdr(const struct sk_buff *skb) +{ + return (struct eth1394hdr *)skb->mac.raw; +} +#endif typedef enum {ETH1394_GASP, ETH1394_WRREQ} eth1394_tx_type; diff -Nru a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c --- a/drivers/net/hamradio/bpqether.c 2004-10-06 15:34:25 -03:00 +++ b/drivers/net/hamradio/bpqether.c 2004-10-06 15:34:25 -03:00 @@ -193,7 +193,7 @@ bpq = (struct bpqdev *)dev->priv; - eth = (struct ethhdr *)skb->mac.raw; + eth = eth_hdr(skb); if (!(bpq->acpt_addr[0] & 0x01) && memcmp(eth->h_source, bpq->acpt_addr, ETH_ALEN)) diff -Nru a/include/net/llc_pdu.h b/include/net/llc_pdu.h --- a/include/net/llc_pdu.h 2004-10-06 15:34:25 -03:00 +++ b/include/net/llc_pdu.h 2004-10-06 15:34:25 -03:00 @@ -253,7 +253,7 @@ static inline void llc_pdu_decode_sa(struct sk_buff *skb, u8 *sa) { if (skb->protocol == ntohs(ETH_P_802_2)) - memcpy(sa, ((struct ethhdr *)skb->mac.raw)->h_source, ETH_ALEN); + memcpy(sa, eth_hdr(skb)->h_source, ETH_ALEN); else if (skb->protocol == ntohs(ETH_P_TR_802_2)) memcpy(sa, ((struct trh_hdr *)skb->mac.raw)->saddr, ETH_ALEN); } @@ -268,7 +268,7 @@ static inline void llc_pdu_decode_da(struct sk_buff *skb, u8 *da) { if (skb->protocol == ntohs(ETH_P_802_2)) - memcpy(da, ((struct ethhdr *)skb->mac.raw)->h_dest, ETH_ALEN); + memcpy(da, eth_hdr(skb)->h_dest, ETH_ALEN); else if (skb->protocol == ntohs(ETH_P_TR_802_2)) memcpy(da, ((struct trh_hdr *)skb->mac.raw)->daddr, ETH_ALEN); } @@ -347,7 +347,7 @@ struct llc_pdu_un *ev_pdu = llc_pdu_un_hdr(ev_skb); int dsize; - dsize = ntohs(((struct ethhdr *)ev_skb->mac.raw)->h_proto) - 3; + dsize = ntohs(eth_hdr(ev_skb)->h_proto) - 3; memcpy(((u8 *)pdu) + 3, ((u8 *)ev_pdu) + 3, dsize); skb_put(skb, dsize); } diff -Nru a/net/llc/llc_input.c b/net/llc/llc_input.c --- a/net/llc/llc_input.c 2004-10-06 15:34:25 -03:00 +++ b/net/llc/llc_input.c 2004-10-06 15:34:25 -03:00 @@ -111,7 +111,7 @@ skb->h.raw += llc_len; skb_pull(skb, llc_len); if (skb->protocol == htons(ETH_P_802_2)) { - u16 pdulen = ((struct ethhdr *)skb->mac.raw)->h_proto, + u16 pdulen = eth_hdr(skb)->h_proto, data_size = ntohs(pdulen) - llc_len; skb_trim(skb, data_size); diff -Nru a/net/llc/llc_output.c b/net/llc/llc_output.c --- a/net/llc/llc_output.c 2004-10-06 15:34:25 -03:00 +++ b/net/llc/llc_output.c 2004-10-06 15:34:25 -03:00 @@ -61,7 +61,7 @@ struct ethhdr *eth; skb->mac.raw = skb_push(skb, sizeof(*eth)); - eth = (struct ethhdr *)skb->mac.raw; + eth = eth_hdr(skb); eth->h_proto = htons(len); memcpy(eth->h_dest, da, ETH_ALEN); memcpy(eth->h_source, sa, ETH_ALEN); --------------090802080008060505060306-- From acme@conectiva.com.br Wed Oct 6 11:39:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 11:39:27 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96IdJC9000417 for ; Wed, 6 Oct 2004 11:39:22 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 6078A47342; Wed, 6 Oct 2004 15:39:00 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 15EB34732C for ; Wed, 6 Oct 2004 15:39:00 -0300 (BRT) Received: (qmail 16063 invoked by uid 0); 6 Oct 2004 19:36:00 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 6 Oct 2004 19:36:00 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id 0379E14639; Wed, 6 Oct 2004 15:42:10 -0300 (BRT) Message-ID: <41643C40.8070605@conectiva.com.br> Date: Wed, 06 Oct 2004 15:41:04 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2/2] [SKBUFF] introduce tr_hdr(skb) X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------050802010205050405020501" X-Bogosity: No, tests=bogofilter, spamicity=0.459732, version=0.16.3 X-archive-position: 9976 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 Content-Length: 3040 Lines: 108 This is a multi-part message in MIME format. --------------050802010205050405020501 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi David, Please consider pulling from: bk://kernel.bkbits.net/acme/sk_buff-2.6 Regards, - Arnaldo --------------050802010205050405020501 Content-Type: text/plain; name="tr_hdr.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="tr_hdr.patch" =================================================================== ChangeSet@1.2056, 2004-10-06 15:33:22-03:00, acme@conectiva.com.br [SKBUFF] introduce tr_hdr(skb) The token ring code in the kernel is bitrotting (no surprise :) ), it uses skb->data all around... I have an assortment of token ring cards but no MAU, can anybody send me one, please? I promise to make ssh work over LLC over Token Ring networks! Duh... :o) Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller include/linux/if_tr.h | 9 +++++++++ include/net/llc_pdu.h | 4 ++-- net/llc/llc_output.c | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff -Nru a/include/linux/if_tr.h b/include/linux/if_tr.h --- a/include/linux/if_tr.h 2004-10-06 15:34:53 -03:00 +++ b/include/linux/if_tr.h 2004-10-06 15:34:53 -03:00 @@ -48,6 +48,15 @@ __u16 rseg[8]; /* routing registers */ }; +#ifdef __KERNEL__ +#include + +static inline struct trh_hdr *tr_hdr(const struct sk_buff *skb) +{ + return (struct trh_hdr *)skb->mac.raw; +} +#endif + /* This is an Token-Ring LLC structure */ struct trllc { __u8 dsap; /* destination SAP */ diff -Nru a/include/net/llc_pdu.h b/include/net/llc_pdu.h --- a/include/net/llc_pdu.h 2004-10-06 15:34:53 -03:00 +++ b/include/net/llc_pdu.h 2004-10-06 15:34:53 -03:00 @@ -255,7 +255,7 @@ if (skb->protocol == ntohs(ETH_P_802_2)) memcpy(sa, eth_hdr(skb)->h_source, ETH_ALEN); else if (skb->protocol == ntohs(ETH_P_TR_802_2)) - memcpy(sa, ((struct trh_hdr *)skb->mac.raw)->saddr, ETH_ALEN); + memcpy(sa, tr_hdr(skb)->saddr, ETH_ALEN); } /** @@ -270,7 +270,7 @@ if (skb->protocol == ntohs(ETH_P_802_2)) memcpy(da, eth_hdr(skb)->h_dest, ETH_ALEN); else if (skb->protocol == ntohs(ETH_P_TR_802_2)) - memcpy(da, ((struct trh_hdr *)skb->mac.raw)->daddr, ETH_ALEN); + memcpy(da, tr_hdr(skb)->daddr, ETH_ALEN); } /** diff -Nru a/net/llc/llc_output.c b/net/llc/llc_output.c --- a/net/llc/llc_output.c 2004-10-06 15:34:53 -03:00 +++ b/net/llc/llc_output.c 2004-10-06 15:34:53 -03:00 @@ -40,7 +40,8 @@ struct net_device *dev = skb->dev; struct trh_hdr *trh; - trh = (struct trh_hdr *)skb_push(skb, sizeof(*trh)); + skb->mac.raw = skb_push(skb, sizeof(*trh)); + trh = tr_hdr(skb); trh->ac = AC; trh->fc = LLC_FRAME; if (sa) @@ -51,7 +52,6 @@ memcpy(trh->daddr, da, dev->addr_len); tr_source_route(skb, trh, dev); } - skb->mac.raw = skb->data; break; } #endif --------------050802010205050405020501-- From akepner@sgi.com Wed Oct 6 11:39:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 11:39:53 -0700 (PDT) Received: from omx1.americas.sgi.com (omx1-ext.sgi.com [192.48.179.11]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96Idk19000580 for ; Wed, 6 Oct 2004 11:39:46 -0700 Received: from nodin.corp.sgi.com (nodin.corp.sgi.com [192.26.51.193]) by omx1.americas.sgi.com (8.12.10/8.12.9/linux-outbound_gateway-1.1) with ESMTP id i96IdXQh020917 for ; Wed, 6 Oct 2004 13:39:33 -0500 Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by nodin.corp.sgi.com (8.12.9/8.12.10/SGI_generic_relay-1.2) with ESMTP id i96IdWl236671732 for ; Wed, 6 Oct 2004 11:39:32 -0700 (PDT) From: akepner@sgi.com Received: from [192.168.2.3] (mtv-vpn-sw-corp-0-26.corp.sgi.com [134.15.0.26]) by cthulhu.engr.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id i96IcLLH1847217; Wed, 6 Oct 2004 11:38:24 -0700 (PDT) Date: Wed, 6 Oct 2004 11:24:19 -0700 (PDT) X-X-Sender: To: , cc: Subject: [RFC] using mmiowb() in dev->poll() method Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 9977 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: akepner@sgi.com Precedence: bulk X-list: netdev Content-Length: 2952 Lines: 92 A recent patch which defines an I/O space memory write barrier (http://marc.theaimsgroup.com/?l=linux-kernel&m=109649911100740&w=2.) allows for significant performance improvement in the tg3 driver. Although I've only experimented with tg3, the same thing should work for other drivers which use NAPI. This would mean a slight change to the semantics of the driver's polling method, however, which is why I'm sending this patch for comments now. The patch below is only an example, and it's not intended to be applied in its present form. But once the mmiowb() patch gets in, something similar to the following patch could be considered. Currently, returning 0 from "dev->poll()" indicates that the PIO write which enables interrupts has been flushed to the NIC (or at least that's my understanding.) The change below allows "dev->poll()" to return with that PIO write pending, but not necessarily flushed. This allows a potentially expensive PIO flush to be avoided. I've found that this can significantly reduce CPU utilization and improve throughput. On my test system (Altix - using only 1 of 4 CPUs, 1GHz Itanium 2, Broadcom 5704 NIC) I got the following the results for one workload with and without this patch: CPU Utilization [%] Throughput [MB/sec] ------------------- ------------------- 2.6.5 100 110 2.6.5+patch 80 124 That's the best case performance improvement, but there's no case where performance suffers from this change. 8<--------------------- tg3_poll.mmiowb.patch --------------------- --- linux.orig/drivers/net/tg3.c 2004-10-06 09:26:04.000000000 -0700 +++ linux/drivers/net/tg3.c 2004-10-06 10:22:38.000000000 -0700 @@ -345,6 +345,9 @@ #define tr16(reg) readw(tp->regs + (reg)) #define tr8(reg) readb(tp->regs + (reg)) +#define mmiowb() sn_mmiob() /* XXX this goes away once mmiowb() + * is available for all arches */ + static void tg3_write_mem(struct tg3 *tp, u32 off, u32 val) { unsigned long flags; @@ -395,6 +398,20 @@ tg3_cond_int(tp); } +/* tg3_restart_ints() + * similar to tg3_enable_ints(), but it can return before the write which + * will enable interrupts has reached the card. + */ +static void tg3_restart_ints(struct tg3 *tp) +{ + tw32(TG3PCI_MISC_HOST_CTRL, + (tp->misc_host_ctrl & ~MISC_HOST_CTRL_MASK_PCI_INT)); + tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x00000000); + mmiowb(); + + tg3_cond_int(tp); +} + static inline void tg3_netif_stop(struct tg3 *tp) { netif_poll_disable(tp->dev); @@ -2489,7 +2506,7 @@ if (done) { spin_lock_irqsave(&tp->lock, flags); __netif_rx_complete(netdev); - tg3_enable_ints(tp); + tg3_restart_ints(tp); spin_unlock_irqrestore(&tp->lock, flags); } 8<----------------------------------------------------------------- Comments? -- Arthur From tgr@reeler.org Wed Oct 6 11:59:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 11:59:25 -0700 (PDT) Received: from rei.rakuen (217-162-107-144.dclient.hispeed.ch [217.162.107.144]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96IxJV4001481 for ; Wed, 6 Oct 2004 11:59:20 -0700 Received: from tgr by rei.rakuen with local (Exim 4.34) id 1CFGzk-0003cW-3m; Wed, 06 Oct 2004 20:58:36 +0200 Date: Wed, 6 Oct 2004 20:58:36 +0200 From: Thomas Graf To: Arnaldo Carvalho de Melo Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 2/2] [SKBUFF] introduce tr_hdr(skb) Message-ID: <20041006185835.GB19714@rei.reeler.org> References: <41643C40.8070605@conectiva.com.br> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41643C40.8070605@conectiva.com.br> X-archive-position: 9978 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 521 Lines: 15 * Arnaldo Carvalho de Melo <41643C40.8070605@conectiva.com.br> 2004-10-06 15:41 > - trh = (struct trh_hdr *)skb_push(skb, sizeof(*trh)); > + skb->mac.raw = skb_push(skb, sizeof(*trh)); > + trh = tr_hdr(skb); > trh->ac = AC; > trh->fc = LLC_FRAME; > if (sa) > @@ -51,7 +52,6 @@ > memcpy(trh->daddr, da, dev->addr_len); > tr_source_route(skb, trh, dev); > } > - skb->mac.raw = skb->data; Are you sure the bevhaviour is the same? There is an skb_pull in tr_source_route so skb->data gets modified. From acme@conectiva.com.br Wed Oct 6 12:05:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 12:05:11 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96J53fB001916 for ; Wed, 6 Oct 2004 12:05:05 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id E30574734F; Wed, 6 Oct 2004 16:04:46 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 48D0A472F4 for ; Wed, 6 Oct 2004 16:04:46 -0300 (BRT) Received: (qmail 20151 invoked by uid 0); 6 Oct 2004 20:01:49 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 6 Oct 2004 20:01:49 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id B062314639; Wed, 6 Oct 2004 16:07:59 -0300 (BRT) Message-ID: <4164424E.6000504@conectiva.com.br> Date: Wed, 06 Oct 2004 16:06:54 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Thomas Graf Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 2/2] [SKBUFF] introduce tr_hdr(skb) References: <41643C40.8070605@conectiva.com.br> <20041006185835.GB19714@rei.reeler.org> In-Reply-To: <20041006185835.GB19714@rei.reeler.org> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Bogosity: No, tests=bogofilter, spamicity=0.030341, version=0.16.3 X-archive-position: 9979 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 Content-Length: 598 Lines: 25 Thomas Graf wrote: > * Arnaldo Carvalho de Melo <41643C40.8070605@conectiva.com.br> 2004-10-06 15:41 > >>- trh = (struct trh_hdr *)skb_push(skb, sizeof(*trh)); >>+ skb->mac.raw = skb_push(skb, sizeof(*trh)); >>+ trh = tr_hdr(skb); >> trh->ac = AC; >> trh->fc = LLC_FRAME; >> if (sa) >>@@ -51,7 +52,6 @@ >> memcpy(trh->daddr, da, dev->addr_len); >> tr_source_route(skb, trh, dev); >> } >>- skb->mac.raw = skb->data; > > > Are you sure the bevhaviour is the same? There is an skb_pull > in tr_source_route so skb->data gets modified. > > Thanks for reviewing, checking... From davem@redhat.com Wed Oct 6 12:11:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 12:11:33 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96JBSMU002325 for ; Wed, 6 Oct 2004 12:11:28 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i96JBFBg024123; Wed, 6 Oct 2004 15:11:15 -0400 Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i96JBAr23606; Wed, 6 Oct 2004 15:11:10 -0400 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.11/8.12.10) with SMTP id i96JApuY028175; Wed, 6 Oct 2004 15:10:51 -0400 Date: Wed, 6 Oct 2004 12:10:31 -0700 From: "David S. Miller" To: akepner@sgi.com Cc: jgarzik@pobox.com, netdev@oss.sgi.com Subject: Re: [RFC] using mmiowb() in dev->poll() method Message-Id: <20041006121031.488f33c5.davem@redhat.com> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9980 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: 1004 Lines: 25 On Wed, 6 Oct 2004 11:24:19 -0700 (PDT) wrote: > Currently, returning 0 from "dev->poll()" indicates that the > PIO write which enables interrupts has been flushed to the NIC > (or at least that's my understanding.) The change below allows > "dev->poll()" to return with that PIO write pending, but not > necessarily flushed. This allows a potentially expensive PIO > flush to be avoided. I've found that this can significantly > reduce CPU utilization and improve throughput. Of course, this is a known area for exploration to some of us already. There is a similar place for this kind of toying around in tg3_interrupt()'s disabling of the chips IRQs. e1000 optimizes things in this area, last time I checked. You have to be really careful when doing things like this. I think your dev->poll() case would work. In theory the write can be posted for a long time but I doubt that matters in practice. I intend to play around in this area of the tg3 driver some time soon. From acme@conectiva.com.br Wed Oct 6 12:16:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 12:17:04 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96JGt71002693 for ; Wed, 6 Oct 2004 12:16:58 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id EE3BE472ED; Wed, 6 Oct 2004 16:16:41 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 1D8D74731C for ; Wed, 6 Oct 2004 16:16:41 -0300 (BRT) Received: (qmail 21811 invoked by uid 0); 6 Oct 2004 20:13:44 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 6 Oct 2004 20:13:44 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id 7307214639; Wed, 6 Oct 2004 16:19:54 -0300 (BRT) Message-ID: <41644519.6040405@conectiva.com.br> Date: Wed, 06 Oct 2004 16:18:49 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Arnaldo Carvalho de Melo Cc: Thomas Graf , "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 2/2] [SKBUFF] introduce tr_hdr(skb) References: <41643C40.8070605@conectiva.com.br> <20041006185835.GB19714@rei.reeler.org> <4164424E.6000504@conectiva.com.br> In-Reply-To: <4164424E.6000504@conectiva.com.br> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Bogosity: No, tests=bogofilter, spamicity=0.451482, version=0.16.3 X-archive-position: 9981 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 Content-Length: 1019 Lines: 39 Arnaldo Carvalho de Melo wrote: > > > Thomas Graf wrote: > >> * Arnaldo Carvalho de Melo <41643C40.8070605@conectiva.com.br> >> 2004-10-06 15:41 >> >>> - trh = (struct trh_hdr *)skb_push(skb, sizeof(*trh)); >>> + skb->mac.raw = skb_push(skb, sizeof(*trh)); >>> + trh = tr_hdr(skb); >>> trh->ac = AC; >>> trh->fc = LLC_FRAME; >>> if (sa) >>> @@ -51,7 +52,6 @@ >>> memcpy(trh->daddr, da, dev->addr_len); >>> tr_source_route(skb, trh, dev); >>> } >>> - skb->mac.raw = skb->data; >> >> >> >> Are you sure the bevhaviour is the same? There is an skb_pull >> in tr_source_route so skb->data gets modified. >> > > > Thanks for reviewing, checking... > > You're right, if tr_source_route is called, skb->mac.raw has to be set to skb->data, to maintain the old behaviour, if it is right? Oh well, as I said there aren't many people using Token Ring, let alone LLC over token ring, I'll be posting a patch in some minutes. - Arnaldo From jgarzik@pobox.com Wed Oct 6 12:17:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 12:17:32 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96JHOXs002859 for ; Wed, 6 Oct 2004 12:17:25 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CFHHO-0007Zi-Bj; Wed, 06 Oct 2004 20:16:50 +0100 Message-ID: <41644492.1000400@pobox.com> Date: Wed, 06 Oct 2004 15:16:34 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Linus Torvalds CC: Arnaldo Carvalho de Melo , Corey Thomas , netdev@oss.sgi.com, Kernel Mailing List Subject: Re: Raylink/WebGear testing - ray_cs.c iomem bug? References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 9982 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: 55 Lines: 2 I'm not aware of anyone with ray_cs hardware, alas... From davem@davemloft.net Wed Oct 6 12:17:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 12:18:00 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96JHt8b003163 for ; Wed, 6 Oct 2004 12:17:55 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CFHHM-00080y-00; Wed, 06 Oct 2004 12:16:48 -0700 Date: Wed, 6 Oct 2004 12:16:48 -0700 From: "David S. Miller" To: Arnaldo Carvalho de Melo Cc: acme@conectiva.com.br, tgraf@suug.ch, davem@redhat.com, netdev@oss.sgi.com Subject: Re: [PATCH 2/2] [SKBUFF] introduce tr_hdr(skb) Message-Id: <20041006121648.4c5c3994.davem@davemloft.net> In-Reply-To: <41644519.6040405@conectiva.com.br> References: <41643C40.8070605@conectiva.com.br> <20041006185835.GB19714@rei.reeler.org> <4164424E.6000504@conectiva.com.br> <41644519.6040405@conectiva.com.br> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 9983 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 234 Lines: 7 On Wed, 06 Oct 2004 16:18:49 -0300 Arnaldo Carvalho de Melo wrote: > You're right, if tr_source_route is called, skb->mac.raw has to be set > to skb->data, to maintain the old behaviour, if it is right? Yep. From Robert.Olsson@data.slu.se Wed Oct 6 12:22:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 12:22:21 -0700 (PDT) Received: from mail1.slu.se (mail1.slu.se [130.238.96.11]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96JMCoK006915 for ; Wed, 6 Oct 2004 12:22:15 -0700 Received: from robur.slu.se (robur.slu.se [130.238.98.12]) by mail1.slu.se (8.12.10/8.12.10) with ESMTP id i96JLtY2025620; Wed, 6 Oct 2004 21:21:55 +0200 Received: by robur.slu.se (Postfix, from userid 1000) id 938C6EC0AD; Wed, 6 Oct 2004 21:21:55 +0200 (CEST) From: Robert Olsson MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16740.17875.574967.11417@robur.slu.se> Date: Wed, 6 Oct 2004 21:21:55 +0200 To: Ben Greear Cc: "'netdev@oss.sgi.com'" Subject: 2.6.7 tulip performance (with NAPI) In-Reply-To: <41633174.7070805@candelatech.com> References: <41633174.7070805@candelatech.com> X-Mailer: VM 7.18 under Emacs 21.3.1 X-archive-position: 9984 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Robert.Olsson@data.slu.se Precedence: bulk X-list: netdev Content-Length: 315 Lines: 12 Ben Greear writes: > I tried setting the NICE level of pktgen to -10 and softirq to -18. I > still see way more packets transmitted than received. If you have "max_before_softirq" in your version pktgen you can try it to balance your load. HZ=1000 in 2.6 can make scheduling different. --ro From ravinandan.arakali@s2io.com Wed Oct 6 13:07:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 13:07:40 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96K7Ypm008263 for ; Wed, 6 Oct 2004 13:07:34 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i96K75je001806; Wed, 6 Oct 2004 16:07:06 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i96K6v39018795; Wed, 6 Oct 2004 16:06:57 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" Cc: , , , Subject: RE: Patch submission for S2io Xframe driver to 2.6 kernel Date: Wed, 6 Oct 2004 13:14:24 -0700 Message-ID: <003701c4abe1$132f8850$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0038_01C4ABA6.66D0B050" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-Reply-To: <41597DA4.5040200@pobox.com> Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 9986 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Content-Length: 132656 Lines: 4308 This is a multi-part message in MIME format. ------=_NextPart_000_0038_01C4ABA6.66D0B050 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi Jeff and others, We have now split the submission into 8 patches. Attached is the first patch. It contains mostly cosmetic changes such as style of comments, indentation, structure name changes as per linux convention etc. Please let us know if you want us to send the subsequent patches one-after-another right now, or do you want us to send them only after you have completed review and accepted this first patch. Thanks, Ravi -----Original Message----- From: Jeff Garzik [mailto:jgarzik@pobox.com] Sent: Tuesday, September 28, 2004 8:05 AM To: ravinandan.arakali@s2io.com Cc: netdev@oss.sgi.com; leonid.grossman@s2io.com; raghavendra.koushik@s2io.com; rapuru.sriram@s2io.com Subject: Re: Patch submission for S2io Xframe driver to 2.6 kernel Ravinandan Arakali wrote: > Hi, > Attached are the updated patches. It is designed to work on the latest > kernel. Also, this time the submission is split to 3 patches(they need > to applied in the order mentioned below). > > s2io_styling_level1 - Contains > a. styling related, function name changes. > b. fix for 32-bit systems. > c. modified Transmit descriptor allocation > strategy. > d. miscellaneous fixes. When we say "separate logical changes", we mean it :) This means that your level1 patch should be split into at least 4 patches. Second, send each patch in a separate email, as described in http://linux.yyz.us/patch-format.html (and Documentation/SubmittingPatches) rather than sending as a tarball. Jeff ------=_NextPart_000_0038_01C4ABA6.66D0B050 Content-Type: application/octet-stream; name="s2io_cosmetic.patch1" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="s2io_cosmetic.patch1" diff -urN vanilla-linux/drivers/net/s2io.c = linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-06 11:31:09.552305224 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-06 13:03:08.087360376 -0700 @@ -69,7 +69,7 @@ =20 /* S2io Driver name & version. */ static char s2io_driver_name[] =3D "s2io"; -static char s2io_driver_version[] =3D "Version 1.0"; +static char s2io_driver_version[] =3D "Version 1.7.5.1"; =20 #define LINK_IS_UP(val64) (!(val64 & (ADAPTER_STATUS_RMAC_REMOTE_FAULT = | \ ADAPTER_STATUS_RMAC_LOCAL_FAULT))) @@ -99,45 +99,45 @@ }; =20 static char ethtool_stats_keys[][ETH_GSTRING_LEN] =3D { - "tmac_frms", - "tmac_data_octets", - "tmac_drop_frms", - "tmac_mcst_frms", - "tmac_bcst_frms", - "tmac_pause_ctrl_frms", - "tmac_any_err_frms", - "tmac_vld_ip_octets", - "tmac_vld_ip", - "tmac_drop_ip", - "tmac_icmp", - "tmac_rst_tcp", - "tmac_tcp", - "tmac_udp", - "rmac_vld_frms", - "rmac_data_octets", - "rmac_fcs_err_frms", - "rmac_drop_frms", - "rmac_vld_mcst_frms", - "rmac_vld_bcst_frms", - "rmac_in_rng_len_err_frms", - "rmac_long_frms", - "rmac_pause_ctrl_frms", - "rmac_discarded_frms", - "rmac_usized_frms", - "rmac_osized_frms", - "rmac_frag_frms", - "rmac_jabber_frms", - "rmac_ip", - "rmac_ip_octets", - "rmac_hdr_err_ip", - "rmac_drop_ip", - "rmac_icmp", - "rmac_tcp", - "rmac_udp", - "rmac_err_drp_udp", - "rmac_pause_cnt", - "rmac_accepted_ip", - "rmac_err_tcp", + {"tmac_frms"}, + {"tmac_data_octets"}, + {"tmac_drop_frms"}, + {"tmac_mcst_frms"}, + {"tmac_bcst_frms"}, + {"tmac_pause_ctrl_frms"}, + {"tmac_any_err_frms"}, + {"tmac_vld_ip_octets"}, + {"tmac_vld_ip"}, + {"tmac_drop_ip"}, + {"tmac_icmp"}, + {"tmac_rst_tcp"}, + {"tmac_tcp"}, + {"tmac_udp"}, + {"rmac_vld_frms"}, + {"rmac_data_octets"}, + {"rmac_fcs_err_frms"}, + {"rmac_drop_frms"}, + {"rmac_vld_mcst_frms"}, + {"rmac_vld_bcst_frms"}, + {"rmac_in_rng_len_err_frms"}, + {"rmac_long_frms"}, + {"rmac_pause_ctrl_frms"}, + {"rmac_discarded_frms"}, + {"rmac_usized_frms"}, + {"rmac_osized_frms"}, + {"rmac_frag_frms"}, + {"rmac_jabber_frms"}, + {"rmac_ip"}, + {"rmac_ip_octets"}, + {"rmac_hdr_err_ip"}, + {"rmac_drop_ip"}, + {"rmac_icmp"}, + {"rmac_tcp"}, + {"rmac_udp"}, + {"rmac_err_drp_udp"}, + {"rmac_pause_cnt"}, + {"rmac_accepted_ip"}, + {"rmac_err_tcp"}, }; =20 #define S2IO_STAT_LEN sizeof(ethtool_stats_keys)/ ETH_GSTRING_LEN @@ -147,7 +147,8 @@ #define S2IO_STRINGS_LEN S2IO_TEST_LEN * ETH_GSTRING_LEN =20 =20 -/* Constants to be programmed into the Xena's registers to configure +/*=20 + * Constants to be programmed into the Xena's registers, to configure * the XAUI. */ =20 @@ -188,7 +189,9 @@ END_SIGN }; =20 -/* Constants for Fixing the MacAddress problem seen mostly on + +/*=20 + * Constants for Fixing the MacAddress problem seen mostly on * Alpha machines. */ static u64 fix_mac[] =3D { @@ -209,7 +212,6 @@ END_SIGN }; =20 - /* Module Loadable parameters. */ static u32 ring_num; static u32 frame_len[MAX_RX_RINGS]; @@ -218,7 +220,7 @@ static u32 fifo_len[MAX_TX_FIFOS]; static u32 rx_prio; static u32 tx_prio; -static u8 latency_timer =3D 0; +static u8 latency_timer; =20 /*=20 * S2IO device table. @@ -241,17 +243,15 @@ remove:__devexit_p(s2io_rem_nic), }; =20 -/* =20 - * Input Arguments:=20 - * Device private variable. - * Return Value:=20 - * SUCCESS on success and an appropriate -ve value on failure. - * Description:=20 - * The function allocates the all memory areas shared=20 - * between the NIC and the driver. This includes Tx descriptors,=20 - * Rx descriptors and the statistics block. +/** + * init_shared_mem - Allocation and Initialization of Memory + * @nic: Device private variable. + * Description: The function allocates all the memory areas shared=20 + * between the NIC and the driver. This includes Tx descriptors,=20 + * Rx descriptors and the statistics block. */ -static int initSharedMem(struct s2io_nic *nic) + +static int init_shared_mem(struct s2io_nic *nic) { u32 size; void *tmp_v_addr, *tmp_v_addr_next; @@ -269,8 +269,8 @@ =20 /* Allocation and initialization of TXDLs in FIOFs */ size =3D 0; - for (i =3D 0; i < config->TxFIFONum; i++) { - size +=3D config->TxCfg[i].FifoLen; + for (i =3D 0; i < config->tx_fifo_num; i++) { + size +=3D config->tx_cfg[i].fifo_len; } if (size > MAX_AVAILABLE_TXDS) { DBG_PRINT(ERR_DBG, "%s: Total number of Tx FIFOs ", @@ -279,7 +279,7 @@ DBG_PRINT(ERR_DBG, "that can be used\n"); return FAILURE; } - size *=3D (sizeof(TxD_t) * config->MaxTxDs); + size *=3D (sizeof(TxD_t) * config->max_txds); =20 mac_control->txd_list_mem =3D pci_alloc_consistent (nic->pdev, size, &mac_control->txd_list_mem_phy); @@ -295,61 +295,60 @@ DBG_PRINT(INIT_DBG, "%s:List Mem PHY: 0x%llx\n", dev->name, (unsigned long long) tmp_p_addr); =20 - for (i =3D 0; i < config->TxFIFONum; i++) { + for (i =3D 0; i < config->tx_fifo_num; i++) { mac_control->txdl_start_phy[i] =3D tmp_p_addr; mac_control->txdl_start[i] =3D (TxD_t *) tmp_v_addr; mac_control->tx_curr_put_info[i].offset =3D 0; mac_control->tx_curr_put_info[i].fifo_len =3D - config->TxCfg[i].FifoLen - 1; + config->tx_cfg[i].fifo_len - 1; mac_control->tx_curr_get_info[i].offset =3D 0; mac_control->tx_curr_get_info[i].fifo_len =3D - config->TxCfg[i].FifoLen - 1; + config->tx_cfg[i].fifo_len - 1; =20 tmp_p_addr +=3D - (config->TxCfg[i].FifoLen * (sizeof(TxD_t)) * - config->MaxTxDs); + (config->tx_cfg[i].fifo_len * (sizeof(TxD_t)) * + config->max_txds); tmp_v_addr +=3D - (config->TxCfg[i].FifoLen * (sizeof(TxD_t)) * - config->MaxTxDs); + (config->tx_cfg[i].fifo_len * (sizeof(TxD_t)) * + config->max_txds); } =20 /* Allocation and initialization of RXDs in Rings */ size =3D 0; - for (i =3D 0; i < config->RxRingNum; i++) { - if (config->RxCfg[i].NumRxd % (MAX_RXDS_PER_BLOCK + 1)) { + for (i =3D 0; i < config->rx_ring_num; i++) { + if (config->rx_cfg[i].num_rxd % (MAX_RXDS_PER_BLOCK + 1)) { DBG_PRINT(ERR_DBG, "%s: RxD count of ", dev->name); DBG_PRINT(ERR_DBG, "Ring%d is not a multiple of ", i); DBG_PRINT(ERR_DBG, "RxDs per Block"); return FAILURE; } - size +=3D config->RxCfg[i].NumRxd; + size +=3D config->rx_cfg[i].num_rxd; nic->block_count[i] =3D - config->RxCfg[i].NumRxd / (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1); nic->pkt_cnt[i] =3D - config->RxCfg[i].NumRxd - nic->block_count[i]; + config->rx_cfg[i].num_rxd - nic->block_count[i]; } - size =3D (size * (sizeof(RxD_t))); - mac_control->rxd_ring_mem_sz =3D size; =20 - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { mac_control->rx_curr_get_info[i].block_index =3D 0; mac_control->rx_curr_get_info[i].offset =3D 0; mac_control->rx_curr_get_info[i].ring_len =3D - config->RxCfg[i].NumRxd - 1; + config->rx_cfg[i].num_rxd - 1; mac_control->rx_curr_put_info[i].block_index =3D 0; mac_control->rx_curr_put_info[i].offset =3D 0; mac_control->rx_curr_put_info[i].ring_len =3D - config->RxCfg[i].NumRxd - 1; + config->rx_cfg[i].num_rxd - 1; blk_cnt =3D - config->RxCfg[i].NumRxd / (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1); /* Allocating all the Rx blocks */ for (j =3D 0; j < blk_cnt; j++) { size =3D (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t)); tmp_v_addr =3D pci_alloc_consistent(nic->pdev, size, &tmp_p_addr); if (tmp_v_addr =3D=3D NULL) { - /* In case of failure, freeSharedMem()=20 + /* + * In case of failure, free_shared_mem()=20 * is called, which should free any=20 * memory that was alloced till the=20 * failure happened. @@ -390,7 +389,8 @@ (nic->pdev, size, &mac_control->stats_mem_phy); =20 if (!mac_control->stats_mem) { - /* In case of failure, freeSharedMem() is called, which=20 + /*=20 + * In case of failure, free_shared_mem() is called, which=20 * should free any memory that was alloced till the=20 * failure happened. */ @@ -399,7 +399,7 @@ mac_control->stats_mem_sz =3D size; =20 tmp_v_addr =3D mac_control->stats_mem; - mac_control->StatsInfo =3D (StatInfo_t *) tmp_v_addr; + mac_control->stats_info =3D (StatInfo_t *) tmp_v_addr; memset(tmp_v_addr, 0, size); =20 DBG_PRINT(INIT_DBG, "%s:Ring Mem PHY: 0x%llx\n", dev->name, @@ -408,16 +408,14 @@ return SUCCESS; } =20 -/* =20 - * Input Arguments:=20 - * Device peivate variable. - * Return Value:=20 - * NONE - * Description:=20 - * This function is to free all memory locations allocated by - * the initSharedMem() function and return it to the kernel. +/** =20 + * free_shared_mem - Free the allocated Memory=20 + * @nic: Device private variable. + * Description: This function is to free all memory locations allocated = by + * the init_shared_mem() function and return it to the kernel. */ -static void freeSharedMem(struct s2io_nic *nic) + +static void free_shared_mem(struct s2io_nic *nic) { int i, j, blk_cnt, size; void *tmp_v_addr; @@ -440,7 +438,7 @@ } =20 size =3D (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t)); - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { blk_cnt =3D nic->block_count[i]; for (j =3D 0; j < blk_cnt; j++) { tmp_v_addr =3D nic->rx_blocks[i][j].block_virt_addr; @@ -452,6 +450,7 @@ } } =20 + if (mac_control->stats_mem) { pci_free_consistent(nic->pdev, mac_control->stats_mem_sz, @@ -460,16 +459,16 @@ } } =20 -/* =20 - * Input Arguments:=20 - * device peivate variable - * Return Value:=20 - * SUCCESS on success and '-1' on failure (endian settings incorrect). - * Description:=20 - * The function sequentially configures every block=20 +/** =20 + * init_nic - Initialization of hardware=20 + * @nic: device peivate variable + * Description: The function sequentially configures every block=20 * of the H/W from their reset values.=20 + * Return Value: SUCCESS on success and=20 + * '-1' on failure (endian settings incorrect). */ -static int initNic(struct s2io_nic *nic) + +static int init_nic(struct s2io_nic *nic) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; struct net_device *dev =3D nic->dev; @@ -485,11 +484,13 @@ mac_control =3D &nic->mac_control; config =3D &nic->config; =20 - /* Set proper endian settings and verify the same by=20 - * reading the PIF Feed-back register. + /*=20 + * Set proper endian settings and verify the same by=20 + * reading the PIF Feed-back register. */ #ifdef __BIG_ENDIAN - /* The device by default set to a big endian format, so=20 + /* + * The device by default set to a big endian format, so=20 * a big endian driver need not set anything. */ writeq(0xffffffffffffffffULL, &bar0->swapper_ctrl); @@ -510,7 +511,8 @@ SWAPPER_CTRL_STATS_FE | SWAPPER_CTRL_STATS_SE); writeq(val64, &bar0->swapper_ctrl); #else - /* Initially we enable all bits to make it accessible by=20 + /*=20 + * Initially we enable all bits to make it accessible by=20 * the driver, then we selectively enable only those bits=20 * that we want to set. */ @@ -537,8 +539,9 @@ writeq(val64, &bar0->swapper_ctrl); #endif =20 - /* Verifying if endian settings are accurate by reading=20 - * a feedback register. + /*=20 + * Verifying if endian settings are accurate by=20 + * reading a feedback register. */ val64 =3D readq(&bar0->pif_rd_swapper_fb); if (val64 !=3D 0x0123456789ABCDEFULL) { @@ -573,8 +576,9 @@ val64 =3D dev->mtu; writeq(vBIT(val64, 2, 14), &bar0->rmac_max_pyld_len); =20 - /* Configuring the XAUI Interface of Xena.=20 - ***************************************** + /*=20 + * Configuring the XAUI Interface of Xena.=20 + * *************************************** * To Configure the Xena's XAUI, one has to write a series=20 * of 64 bit values into two registers in a particular=20 * sequence. Hence a macro 'SWITCH_SIGN' has been defined=20 @@ -625,13 +629,13 @@ writeq(val64, &bar0->tx_fifo_partition_3); =20 =20 - for (i =3D 0, j =3D 0; i < config->TxFIFONum; i++) { + for (i =3D 0, j =3D 0; i < config->tx_fifo_num; i++) { val64 |=3D - vBIT(config->TxCfg[i].FifoLen - 1, ((i * 32) + 19), - 13) | vBIT(config->TxCfg[i].FifoPriority, + vBIT(config->tx_cfg[i].fifo_len - 1, ((i * 32) + 19), + 13) | vBIT(config->tx_cfg[i].fifo_priority, ((i * 32) + 5), 3); =20 - if (i =3D=3D (config->TxFIFONum - 1)) { + if (i =3D=3D (config->tx_fifo_num - 1)) { if (i % 2 =3D=3D 0) i++; } @@ -675,56 +679,59 @@ =20 /* Rx DMA intialization. */ val64 =3D 0; - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { val64 |=3D - vBIT(config->RxCfg[i].RingPriority, (5 + (i * 8)), 3); + vBIT(config->rx_cfg[i].ring_priority, (5 + (i * 8)), + 3); } writeq(val64, &bar0->rx_queue_priority); =20 - /* Allocating equal share of memory to all the configured=20 - * Rings. + /*=20 + * Allocating equal share of memory to all the=20 + * configured Rings. */ val64 =3D 0; - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { switch (i) { case 0: - mem_share =3D (64 / config->RxRingNum + - 64 % config->RxRingNum); + mem_share =3D (64 / config->rx_ring_num + + 64 % config->rx_ring_num); val64 |=3D RX_QUEUE_CFG_Q0_SZ(mem_share); continue; case 1: - mem_share =3D (64 / config->RxRingNum); + mem_share =3D (64 / config->rx_ring_num); val64 |=3D RX_QUEUE_CFG_Q1_SZ(mem_share); continue; case 2: - mem_share =3D (64 / config->RxRingNum); + mem_share =3D (64 / config->rx_ring_num); val64 |=3D RX_QUEUE_CFG_Q2_SZ(mem_share); continue; case 3: - mem_share =3D (64 / config->RxRingNum); + mem_share =3D (64 / config->rx_ring_num); val64 |=3D RX_QUEUE_CFG_Q3_SZ(mem_share); continue; case 4: - mem_share =3D (64 / config->RxRingNum); + mem_share =3D (64 / config->rx_ring_num); val64 |=3D RX_QUEUE_CFG_Q4_SZ(mem_share); continue; case 5: - mem_share =3D (64 / config->RxRingNum); + mem_share =3D (64 / config->rx_ring_num); val64 |=3D RX_QUEUE_CFG_Q5_SZ(mem_share); continue; case 6: - mem_share =3D (64 / config->RxRingNum); + mem_share =3D (64 / config->rx_ring_num); val64 |=3D RX_QUEUE_CFG_Q6_SZ(mem_share); continue; case 7: - mem_share =3D (64 / config->RxRingNum); + mem_share =3D (64 / config->rx_ring_num); val64 |=3D RX_QUEUE_CFG_Q7_SZ(mem_share); continue; } } writeq(val64, &bar0->rx_queue_cfg); =20 - /* Initializing the Tx round robin registers to 0. + /*=20 + * Initializing the Tx round robin registers to 0. * Filling Tx and Rx round robin registers as per the=20 * number of FIFOs and Rings is still TODO. */ @@ -734,13 +741,15 @@ writeq(0, &bar0->tx_w_round_robin_3); writeq(0, &bar0->tx_w_round_robin_4); =20 - /* Disable Rx steering. Hard coding all packets be steered to + /*=20 + * TODO + * Disable Rx steering. Hard coding all packets be steered to * Queue 0 for now.=20 - * TODO*/ + */ if (rx_prio) { u64 def =3D 0x8000000000000000ULL, tmp; for (i =3D 0; i < MAX_RX_RINGS; i++) { - tmp =3D (u64) (def >> (i % config->RxRingNum)); + tmp =3D (u64) (def >> (i % config->rx_ring_num)); val64 |=3D (u64) (tmp >> (i * 8)); } writeq(val64, &bar0->rts_qos_steering); @@ -763,14 +772,16 @@ val64 =3D SET_UPDT_PERIOD(8) | STAT_CFG_STAT_RO | STAT_CFG_STAT_EN; writeq(val64, &bar0->stat_cfg); =20 - /* Initializing the sampling rate for the device to calculate the + /*=20 + * Initializing the sampling rate for the device to calculate the * bandwidth utilization. */ val64 =3D MAC_TX_LINK_UTIL_VAL(0x5) | MAC_RX_LINK_UTIL_VAL(0x5); writeq(val64, &bar0->mac_link_util); =20 =20 - /* Initializing the Transmit and Receive Traffic Interrupt=20 + /*=20 + * Initializing the Transmit and Receive Traffic Interrupt=20 * Scheme. */ /* TTI Initialization */ @@ -787,7 +798,8 @@ val64 =3D TTI_CMD_MEM_WE | TTI_CMD_MEM_STROBE_NEW_CMD; writeq(val64, &bar0->tti_command_mem); =20 - /* Once the operation completes, the Strobe bit of the command + /*=20 + * Once the operation completes, the Strobe bit of the command * register will be reset. We poll for this particular condition * We wait for a maximum of 500ms for the operation to complete, * if it's not complete by then we return error. @@ -821,7 +833,8 @@ val64 =3D RTI_CMD_MEM_WE | RTI_CMD_MEM_STROBE_NEW_CMD; writeq(val64, &bar0->rti_command_mem); =20 - /* Once the operation completes, the Strobe bit of the command + /*=20 + * Once the operation completes, the Strobe bit of the command * register will be reset. We poll for this particular condition * We wait for a maximum of 500ms for the operation to complete, * if it's not complete by then we return error. @@ -842,7 +855,8 @@ schedule_timeout(HZ / 20); } =20 - /* Initializing proper values as Pause threshold into all=20 + /*=20 + * Initializing proper values as Pause threshold into all=20 * the 8 Queues on Rx side. */ writeq(0xffbbffbbffbbffbbULL, &bar0->mc_pause_thresh_q0q3); @@ -861,19 +875,18 @@ return SUCCESS; } =20 -/* =20 - * Input Arguments:=20 - * device private variable, - * A mask indicating which Intr block must be modified and, - * A flag indicating whether to enable or disable the Intrs. - * Return Value:=20 - * NONE. - * Description:=20 - * This function will either disable or enable the interrupts=20 +/** =20 + * en_dis_able_nic_intrs - Enable or Disable the interrupts=20 + * @nic: device private variable, + * @mask: A mask indicating which Intr block must be modified and, + * @flag: A flag indicating whether to enable or disable the Intrs. + * Description: This function will either disable or enable the = interrupts * depending on the flag argument. The mask argument can be used to=20 * enable/disable any Intr block.=20 + * Return Value: NONE. */ -static void en_dis_able_NicIntrs(struct s2io_nic *nic, u16 mask, int = flag) + +static void en_dis_able_nic_intrs(struct s2io_nic *nic, u16 mask, int = flag) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; register u64 val64 =3D 0, temp64 =3D 0; @@ -887,15 +900,20 @@ temp64 =3D readq(&bar0->general_int_mask); temp64 &=3D ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* Disabled all PCIX, Flash, MDIO, IIC and GPIO - * interrupts for now.=20 - * TODO */ + /* =20 + * Disabled all PCIX, Flash, MDIO, IIC and GPIO + * interrupts for now.=20 + * TODO=20 + */ writeq(DISABLE_ALL_INTRS, &bar0->pic_int_mask); - /* No MSI Support is available presently, so TTI and + /*=20 + * No MSI Support is available presently, so TTI and * RTI interrupts are also disabled. */ } else if (flag =3D=3D DISABLE_INTRS) { - /* Disable PIC Intrs in the general intr mask register=20 + /* =20 + * Disable PIC Intrs in the general=20 + * intr mask register=20 */ writeq(DISABLE_ALL_INTRS, &bar0->pic_int_mask); temp64 =3D readq(&bar0->general_int_mask); @@ -907,24 +925,34 @@ /* DMA Interrupts */ /* Enabling/Disabling Tx DMA interrupts */ if (mask & TX_DMA_INTR) { - /* Enable TxDMA Intrs in the general intr mask register */ + /* Enable TxDMA Intrs in the general intr mask register */ val64 =3D TXDMA_INT_M; if (flag =3D=3D ENABLE_INTRS) { temp64 =3D readq(&bar0->general_int_mask); temp64 &=3D ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* Disable all interrupts other than PFC interrupt in=20 - * DMA level. + /*=20 + * Keep all interrupts other than PFC interrupt=20 + * and PCC interrupt disabled in DMA level. */ - val64 =3D DISABLE_ALL_INTRS & (~TXDMA_PFC_INT_M); + val64 =3D DISABLE_ALL_INTRS & ~(TXDMA_PFC_INT_M | + TXDMA_PCC_INT_M); writeq(val64, &bar0->txdma_int_mask); - /* Enable only the MISC error 1 interrupt in PFC block=20 + /*=20 + * Enable only the MISC error 1 interrupt in PFC block=20 */ val64 =3D DISABLE_ALL_INTRS & (~PFC_MISC_ERR_1); writeq(val64, &bar0->pfc_err_mask); + /*=20 + * Enable only the FB_ECC error interrupt in PCC block=20 + */ + val64 =3D DISABLE_ALL_INTRS & (~PCC_FB_ECC_ERR); + writeq(val64, &bar0->pcc_err_mask); } else if (flag =3D=3D DISABLE_INTRS) { - /* Disable TxDMA Intrs in the general intr mask=20 - * register */ + /*=20 + * Disable TxDMA Intrs in the general intr mask=20 + * register=20 + */ writeq(DISABLE_ALL_INTRS, &bar0->txdma_int_mask); writeq(DISABLE_ALL_INTRS, &bar0->pfc_err_mask); temp64 =3D readq(&bar0->general_int_mask); @@ -941,12 +969,16 @@ temp64 =3D readq(&bar0->general_int_mask); temp64 &=3D ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* All RxDMA block interrupts are disabled for now=20 - * TODO */ + /*=20 + * All RxDMA block interrupts are disabled for now=20 + * TODO=20 + */ writeq(DISABLE_ALL_INTRS, &bar0->rxdma_int_mask); } else if (flag =3D=3D DISABLE_INTRS) { - /* Disable RxDMA Intrs in the general intr mask=20 - * register */ + /* =20 + * Disable RxDMA Intrs in the general intr mask=20 + * register=20 + */ writeq(DISABLE_ALL_INTRS, &bar0->rxdma_int_mask); temp64 =3D readq(&bar0->general_int_mask); val64 |=3D temp64; @@ -962,9 +994,11 @@ temp64 =3D readq(&bar0->general_int_mask); temp64 &=3D ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* All MAC block error interrupts are disabled for now=20 + /*=20 + * All MAC block error interrupts are disabled for now=20 * except the link status change interrupt. - * TODO*/ + * TODO + */ val64 =3D MAC_INT_STATUS_RMAC_INT; temp64 =3D readq(&bar0->mac_int_mask); temp64 &=3D ~((u64) val64); @@ -974,7 +1008,8 @@ val64 &=3D ~((u64) RMAC_LINK_STATE_CHANGE_INT); writeq(val64, &bar0->mac_rmac_err_mask); } else if (flag =3D=3D DISABLE_INTRS) { - /* Disable MAC Intrs in the general intr mask register=20 + /* =20 + * Disable MAC Intrs in the general intr mask register=20 */ writeq(DISABLE_ALL_INTRS, &bar0->mac_int_mask); writeq(DISABLE_ALL_INTRS, @@ -993,11 +1028,14 @@ temp64 =3D readq(&bar0->general_int_mask); temp64 &=3D ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* All XGXS block error interrupts are disabled for now - * TODO */ + /*=20 + * All XGXS block error interrupts are disabled for now + * TODO=20 + */ writeq(DISABLE_ALL_INTRS, &bar0->xgxs_int_mask); } else if (flag =3D=3D DISABLE_INTRS) { - /* Disable MC Intrs in the general intr mask register=20 + /* =20 + * Disable MC Intrs in the general intr mask register=20 */ writeq(DISABLE_ALL_INTRS, &bar0->xgxs_int_mask); temp64 =3D readq(&bar0->general_int_mask); @@ -1013,11 +1051,14 @@ temp64 =3D readq(&bar0->general_int_mask); temp64 &=3D ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* All MC block error interrupts are disabled for now - * TODO */ + /*=20 + * All MC block error interrupts are disabled for now + * TODO=20 + */ writeq(DISABLE_ALL_INTRS, &bar0->mc_int_mask); } else if (flag =3D=3D DISABLE_INTRS) { - /* Disable MC Intrs in the general intr mask register + /* + * Disable MC Intrs in the general intr mask register */ writeq(DISABLE_ALL_INTRS, &bar0->mc_int_mask); temp64 =3D readq(&bar0->general_int_mask); @@ -1034,15 +1075,15 @@ temp64 =3D readq(&bar0->general_int_mask); temp64 &=3D ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* Enable all the Tx side interrupts */ - writeq(0x0, &bar0->tx_traffic_mask); /* '0' Enables=20 - * all 64 TX=20 - * interrupt=20 - * levels. - */ + /*=20 + * Enable all the Tx side interrupts + * writing 0 Enables all 64 TX interrupt levels=20 + */ + writeq(0x0, &bar0->tx_traffic_mask); } else if (flag =3D=3D DISABLE_INTRS) { - /* Disable Tx Traffic Intrs in the general intr mask=20 - * register. + /*=20 + * Disable Tx Traffic Intrs in the general intr mask=20 + * register. */ writeq(DISABLE_ALL_INTRS, &bar0->tx_traffic_mask); temp64 =3D readq(&bar0->general_int_mask); @@ -1058,14 +1099,12 @@ temp64 =3D readq(&bar0->general_int_mask); temp64 &=3D ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - writeq(0x0, &bar0->rx_traffic_mask); /* '0' Enables=20 - * all 8 RX=20 - * interrupt=20 - * levels. - */ + /* writing 0 Enables all 8 RX interrupt levels */ + writeq(0x0, &bar0->rx_traffic_mask); } else if (flag =3D=3D DISABLE_INTRS) { - /* Disable Rx Traffic Intrs in the general intr mask=20 - * register. + /* =20 + * Disable Rx Traffic Intrs in the general intr mask=20 + * register. */ writeq(DISABLE_ALL_INTRS, &bar0->rx_traffic_mask); temp64 =3D readq(&bar0->general_int_mask); @@ -1075,17 +1114,19 @@ } } =20 -/* =20 - * Input Arguments:=20 - * val64 - Value read from adapter status register. - * flag - indicates if the adapter enable bit was ever written once = before. - * Return Value:=20 - * void. - * Description:=20 - * Returns whether the H/W is ready to go or not. Depending on = whether=20 - * adapter enable bit was written or not the comparison differs and = the=20 - * calling function passes the input argument flag to indicate this. +/** =20 + * verify_xena_quiescence - Checks whether the H/W is ready=20 + * @val64 : Value read from adapter status register. + * @flag : indicates if the adapter enable bit was ever written once + * before. + * Description: Returns whether the H/W is ready to go or not. = Depending + * on whether adapter enable bit was written or not the comparison=20 + * differs and the calling function passes the input argument flag to + * indicate this. + * Return: 1 If xena is quiescence=20 + * 0 If Xena is not quiescence */ + static int verify_xena_quiescence(u64 val64, int flag) { int ret =3D 0; @@ -1122,11 +1163,15 @@ return ret; } =20 -/*=20 +/** + * fix_mac_address - Fix for Mac addr problem on Alpha platforms + * @sp: Pointer to device specifc structure + * Description :=20 * New procedure to clear mac address reading problems on Alpha = platforms * */ -void FixMacAddress(nic_t * sp) + +void fix_mac_address(nic_t * sp) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; u64 val64; @@ -1138,19 +1183,20 @@ } } =20 -/* =20 - * Input Arguments:=20 - * device private variable. - * Return Value:=20 - * SUCCESS on success and -1 on failure. +/** + * start_nic - Turns the device on =20 + * @nic : device private variable. * Description:=20 - * This function actually turns the device on. Before this=20 - * function is called, all Registers are configured from their reset = states=20 + * This function actually turns the device on. Before this function = is=20 + * called,all Registers are configured from their reset states=20 * and shared memory is allocated but the NIC is still quiescent. On=20 * calling this function, the device interrupts are cleared and the = NIC is * literally switched on by writing into the adapter control register. + * Return Value:=20 + * SUCCESS on success and -1 on failure. */ -static int startNic(struct s2io_nic *nic) + +static int start_nic(struct s2io_nic *nic) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; struct net_device *dev =3D nic->dev; @@ -1164,7 +1210,7 @@ config =3D &nic->config; =20 /* PRC Initialization and configuration */ - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { writeq((u64) nic->rx_blocks[i][0].block_dma_addr, &bar0->prc_rxd0_n[i]); =20 @@ -1173,7 +1219,8 @@ writeq(val64, &bar0->prc_ctrl_n[i]); } =20 - /* Enabling MC-RLDRAM. After enabling the device, we timeout + /*=20 + * Enabling MC-RLDRAM. After enabling the device, we timeout * for around 100ms, which is approximately the time required * for the device to be ready for operation. */ @@ -1190,14 +1237,16 @@ val64 &=3D ~ADAPTER_ECC_EN; writeq(val64, &bar0->adapter_control); =20 - /* Clearing any possible Link state change interrupts that=20 + /*=20 + * Clearing any possible Link state change interrupts that=20 * could have popped up just before Enabling the card. */ val64 =3D readq(&bar0->mac_rmac_err_reg); if (val64) writeq(val64, &bar0->mac_rmac_err_reg); =20 - /* Verify if the device is ready to be enabled, if so enable=20 + /*=20 + * Verify if the device is ready to be enabled, if so enable=20 * it. */ val64 =3D readq(&bar0->adapter_status); @@ -1211,9 +1260,10 @@ /* Enable select interrupts */ interruptible =3D TX_TRAFFIC_INTR | RX_TRAFFIC_INTR | TX_MAC_INTR | RX_MAC_INTR; - en_dis_able_NicIntrs(nic, interruptible, ENABLE_INTRS); + en_dis_able_nic_intrs(nic, interruptible, ENABLE_INTRS); =20 - /* With some switches, link might be already up at this point. + /*=20 + * With some switches, link might be already up at this point. * Because of this weird behavior, when we enable laser,=20 * we may not get link. We need to handle this. We cannot=20 * figure out which switch is misbehaving. So we are forced to=20 @@ -1240,82 +1290,72 @@ * force link down. Since link is already up, we will get * link state change interrupt after this reset */ - writeq(0x8007051500000000ULL, &bar0->dtx_control); + writeq(0x80010515001E0000ULL, &bar0->dtx_control); val64 =3D readq(&bar0->dtx_control); - writeq(0x80070515000000E0ULL, &bar0->dtx_control); + udelay(50); + writeq(0x80010515001E00E0ULL, &bar0->dtx_control); val64 =3D readq(&bar0->dtx_control); + udelay(50); writeq(0x80070515001F00E4ULL, &bar0->dtx_control); val64 =3D readq(&bar0->dtx_control); + udelay(50); =20 return SUCCESS; } =20 -/* =20 - * Input Arguments:=20 - * nic - device private variable. - * Return Value:=20 - * void. +/**=20 + * free_tx_buffers - Free all queued Tx buffers=20 + * @nic : device private variable. * Description:=20 - * Free all queued Tx buffers. - */ -void freeTxBuffers(struct s2io_nic *nic) + * Free all queued Tx buffers. + * Return Value: void=20 +*/ + +void free_tx_buffers(struct s2io_nic *nic) { struct net_device *dev =3D nic->dev; struct sk_buff *skb; TxD_t *txdp; int i, j; -#if DEBUG_ON - int cnt =3D 0; -#endif mac_info_t *mac_control; struct config_param *config; + int cnt =3D 0; =20 mac_control =3D &nic->mac_control; config =3D &nic->config; =20 - for (i =3D 0; i < config->TxFIFONum; i++) { - for (j =3D 0; j < config->TxCfg[i].FifoLen - 1; j++) { + for (i =3D 0; i < config->tx_fifo_num; i++) { + for (j =3D 0; j < config->tx_cfg[i].fifo_len - 1; j++) { txdp =3D mac_control->txdl_start[i] + - (config->MaxTxDs * j); - - if (!(txdp->Control_1 & TXD_LIST_OWN_XENA)) { - /* If owned by host, ignore */ - continue; - } + (config->max_txds * j); skb =3D (struct sk_buff *) ((unsigned long) txdp-> Host_Control); if (skb =3D=3D NULL) { - DBG_PRINT(ERR_DBG, "%s: NULL skb ", - dev->name); - DBG_PRINT(ERR_DBG, "in Tx Int\n"); - return; + memset(txdp, 0, sizeof(TxD_t)); + continue; } -#if DEBUG_ON - cnt++; -#endif dev_kfree_skb(skb); memset(txdp, 0, sizeof(TxD_t)); + cnt++; } -#if DEBUG_ON DBG_PRINT(INTR_DBG, "%s:forcibly freeing %d skbs on FIFO%d\n", dev->name, cnt, i); -#endif } } =20 -/* =20 - * Input Arguments:=20 - * nic - device private variable. - * Return Value:=20 +/** =20 + * stop_nic - To stop the nic =20 + * @nic ; device private variable. + * Description:=20 + * This function does exactly the opposite of what the start_nic()=20 + * function does. This function is called to stop the device. + * Return Value: * void. - * Description:=20 - * This function does exactly the opposite of what the startNic()=20 - * function does. This function is called to stop=20 - * the device. */ -static void stopNic(struct s2io_nic *nic) + +static void stop_nic(struct s2io_nic *nic) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; register u64 val64 =3D 0; @@ -1326,24 +1366,23 @@ mac_control =3D &nic->mac_control; config =3D &nic->config; =20 -/* Disable all interrupts */ + /* Disable all interrupts */ interruptible =3D TX_TRAFFIC_INTR | RX_TRAFFIC_INTR | TX_MAC_INTR | RX_MAC_INTR; - en_dis_able_NicIntrs(nic, interruptible, DISABLE_INTRS); + en_dis_able_nic_intrs(nic, interruptible, DISABLE_INTRS); =20 -/* Disable PRCs */ - for (i =3D 0; i < config->RxRingNum; i++) { + /* Disable PRCs */ + for (i =3D 0; i < config->rx_ring_num; i++) { val64 =3D readq(&bar0->prc_ctrl_n[i]); val64 &=3D ~((u64) PRC_CTRL_RC_ENABLED); writeq(val64, &bar0->prc_ctrl_n[i]); } } =20 -/* =20 - * Input Arguments:=20 - * device private variable - * Return Value:=20 - * SUCCESS on success or an appropriate -ve value on failure. +/** =20 + * fill_rx_buffers - Allocates the Rx side skbs=20 + * @nic: device private variable + * @ring_no: ring number=20 * Description:=20 * The function allocates Rx side skbs and puts the physical * address of these buffers into the RxD buffer pointers, so that the = NIC @@ -1354,9 +1393,13 @@ * 3. Five buffer modes. * Each mode defines how many fragments the received frame will be = split=20 * up into by the NIC. The frame is split into L3 header, L4 Header,=20 - * L4 payload in three buffer mode and in 5 buffer mode, L4 payload = itself=20 - * is split into 3 fragments. As of now only single buffer mode is = supported. + * L4 payload in three buffer mode and in 5 buffer mode, L4 payload = itself + * is split into 3 fragments. As of now only single buffer mode is + * supported. + * Return Value: + * SUCCESS on success or an appropriate -ve value on failure. */ + int fill_rx_buffers(struct s2io_nic *nic, int ring_no) { struct net_device *dev =3D nic->dev; @@ -1392,7 +1435,8 @@ off1 =3D mac_control->rx_curr_get_info[ring_no].offset; offset =3D block_no * (MAX_RXDS_PER_BLOCK + 1) + off; offset1 =3D block_no1 * (MAX_RXDS_PER_BLOCK + 1) + off1; - + offset =3D block_no * (MAX_RXDS_PER_BLOCK) + off; + offset1 =3D block_no1 * (MAX_RXDS_PER_BLOCK) + off1; rxdp =3D nic->rx_blocks[ring_no][block_no]. block_virt_addr + off; if ((offset =3D=3D offset1) && (rxdp->Host_Control)) { @@ -1400,7 +1444,6 @@ DBG_PRINT(INTR_DBG, " info equated\n"); goto end; } - if (rxdp->Control_1 =3D=3D END_OF_BLOCK) { mac_control->rx_curr_put_info[ring_no]. block_index++; @@ -1412,8 +1455,6 @@ off %=3D (MAX_RXDS_PER_BLOCK + 1); mac_control->rx_curr_put_info[ring_no].offset =3D off; - /*rxdp =3D nic->rx_blocks[ring_no][block_no]. - block_virt_addr + off; */ rxdp =3D (RxD_t *) ((unsigned long) rxdp->Control_2); DBG_PRINT(INTR_DBG, "%s: Next block at: %p\n", dev->name, rxdp); @@ -1450,15 +1491,16 @@ return SUCCESS; } =20 -/* =20 - * Input Arguments:=20 - * device private variable. - * Return Value:=20 - * NONE. +/** + * free_rx_buffers - Frees all Rx buffers =20 + * @sp: device private variable. * Description:=20 * This function will free all Rx buffers allocated by host. + * Return Value: + * NONE. */ -static void freeRxBuffers(struct s2io_nic *sp) + +static void free_rx_buffers(struct s2io_nic *sp) { struct net_device *dev =3D sp->dev; int i, j, blk =3D 0, off, buf_cnt =3D 0; @@ -1470,8 +1512,8 @@ mac_control =3D &sp->mac_control; config =3D &sp->config; =20 - for (i =3D 0; i < config->RxRingNum; i++) { - for (j =3D 0, blk =3D 0; j < config->RxCfg[i].NumRxd; j++) { + for (i =3D 0; i < config->rx_ring_num; i++) { + for (j =3D 0, blk =3D 0; j < config->rx_cfg[i].num_rxd; j++) { off =3D j % (MAX_RXDS_PER_BLOCK + 1); rxdp =3D sp->rx_blocks[i][blk].block_virt_addr + off; =20 @@ -1510,18 +1552,19 @@ } } =20 -/* - * Input Argument:=20 - * dev - pointer to the device structure. - * budget - The number of packets that were budgeted to be processed = during - * one pass through the 'Poll" function. - * Return value: - * 0 on success and 1 if there are No Rx packets to be processed. - * Description: - * Comes into picture only if NAPI support has been incorporated. It = does - * the same thing that rxIntrHandler does, but not in a interrupt = context - * also It will process only a given number of packets. +/** + * s2io_poll - Rx interrupt handler for NAPI support + * @dev : pointer to the device structure. + * @budget : The number of packets that were budgeted to be processed=20 + * during one pass through the 'Poll" function. + * Description: + * Comes into picture only if NAPI support has been incorporated. It = does + * the same thing that rx_intr_handler does, but not in a interrupt = context + * also It will process only a given number of packets. + * Return value: + * 0 on success and 1 if there are No Rx packets to be processed. */ + #ifdef CONFIG_S2IO_NAPI static int s2io_poll(struct net_device *dev, int *budget) { @@ -1546,7 +1589,7 @@ val64 =3D readq(&bar0->rx_traffic_int); writeq(val64, &bar0->rx_traffic_int); =20 - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { if (--pkts_to_process < 0) { goto no_rx; } @@ -1589,7 +1632,7 @@ HEADER_802_2_SIZE + HEADER_SNAP_SIZE, PCI_DMA_FROMDEVICE); - rxOsmHandler(nic, val16, rxdp, i); + rx_osm_handler(nic, val16, rxdp, i); pkt_cnt++; offset_info.offset++; offset_info.offset %=3D (MAX_RXDS_PER_BLOCK + 1); @@ -1603,38 +1646,39 @@ if (!pkt_cnt) pkt_cnt =3D 1; =20 - for (i =3D 0; i < config->RxRingNum; i++) + for (i =3D 0; i < config->rx_ring_num; i++) fill_rx_buffers(nic, i); =20 dev->quota -=3D pkt_cnt; *budget -=3D pkt_cnt; netif_rx_complete(dev); =20 -/* Re enable the Rx interrupts. */ - en_dis_able_NicIntrs(nic, RX_TRAFFIC_INTR, ENABLE_INTRS); + /* Re enable the Rx interrupts. */ + en_dis_able_nic_intrs(nic, RX_TRAFFIC_INTR, ENABLE_INTRS); return 0; =20 no_rx: - for (i =3D 0; i < config->RxRingNum; i++) + for (i =3D 0; i < config->rx_ring_num; i++) fill_rx_buffers(nic, i); dev->quota -=3D pkt_cnt; *budget -=3D pkt_cnt; return 1; } #else -/* =20 - * Input Arguments:=20 - * device private variable. - * Return Value:=20 - * NONE. +/** =20 + * rx_intr_handler - Rx interrupt handler + * @nic: device private variable. * Description:=20 - * If the interrupt is because of a received frame or if the=20 - * receive ring contains fresh as yet un-processed frames, this = function is + * If the interrupt is because of a received frame or if the=20 + * receive ring contains fresh as yet un-processed frames,this = function is * called. It picks out the RxD at which place the last Rx processing = had=20 * stopped and sends the skb to the OSM's Rx handler and then = increments=20 * the offset. + * Return Value: + * NONE. */ -static void rxIntrHandler(struct s2io_nic *nic) + +static void rx_intr_handler(struct s2io_nic *nic) { struct net_device *dev =3D (struct net_device *) nic->dev; XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; @@ -1643,24 +1687,21 @@ struct sk_buff *skb; u16 val16, cksum; register u64 val64 =3D 0; - int i, block_no; + int i, block_no, pkt_cnt =3D 0; mac_info_t *mac_control; struct config_param *config; =20 mac_control =3D &nic->mac_control; config =3D &nic->config; =20 -#if DEBUG_ON - nic->rxint_cnt++; -#endif - -/* rx_traffic_int reg is an R1 register, hence we read and write back=20 - * the samevalue in the register to clear it. - */ + /*=20 + * rx_traffic_int reg is an R1 register, hence we read and write back=20 + * the samevalue in the register to clear it. + */ val64 =3D readq(&bar0->rx_traffic_int); writeq(val64, &bar0->rx_traffic_int); =20 - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { offset_info =3D mac_control->rx_curr_get_info[i]; block_no =3D offset_info.block_index; rxdp =3D nic->rx_blocks[i][block_no].block_virt_addr + @@ -1698,7 +1739,7 @@ HEADER_802_2_SIZE + HEADER_SNAP_SIZE, PCI_DMA_FROMDEVICE); - rxOsmHandler(nic, val16, rxdp, i); + rx_osm_handler(nic, val16, rxdp, i); offset_info.offset++; offset_info.offset %=3D (MAX_RXDS_PER_BLOCK + 1); rxdp =3D @@ -1706,23 +1747,24 @@ offset_info.offset; mac_control->rx_curr_get_info[i].offset =3D offset_info.offset; + pkt_cnt++; } } } #endif - -/* =20 - * Input Arguments:=20 - * device private variable - * Return Value:=20 - * NONE +/** =20 + * tx_intr_handler - Transmit interrupt handler + * @nic : device private variable * Description:=20 * If an interrupt was raised to indicate DMA complete of the=20 - * Tx packet, this function is called. It identifies the last TxD = whose buffer - * was freed and frees all skbs whose data have already DMA'ed into = the NICs - * internal memory. + * Tx packet, this function is called. It identifies the last TxD=20 + * whose buffer was freed and frees all skbs whose data have already=20 + * DMA'ed into the NICs internal memory. + * Return Value: + * NONE */ -static void txIntrHandler(struct s2io_nic *nic) + +static void tx_intr_handler(struct s2io_nic *nic) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; struct net_device *dev =3D (struct net_device *) nic->dev; @@ -1734,25 +1776,22 @@ u16 j, frg_cnt; mac_info_t *mac_control; struct config_param *config; -#if DEBUG_ON - int cnt =3D 0; - nic->txint_cnt++; -#endif =20 mac_control =3D &nic->mac_control; config =3D &nic->config; =20 - /* tx_traffic_int reg is an R1 register, hence we read and write=20 + /*=20 + * tx_traffic_int reg is an R1 register, hence we read and write=20 * back the samevalue in the register to clear it. */ val64 =3D readq(&bar0->tx_traffic_int); writeq(val64, &bar0->tx_traffic_int); =20 - for (i =3D 0; i < config->TxFIFONum; i++) { + for (i =3D 0; i < config->tx_fifo_num; i++) { offset_info =3D mac_control->tx_curr_get_info[i]; offset_info1 =3D mac_control->tx_curr_put_info[i]; txdlp =3D mac_control->txdl_start[i] + - (config->MaxTxDs * offset_info.offset); + (config->max_txds * offset_info.offset); while ((!(txdlp->Control_1 & TXD_LIST_OWN_XENA)) && (offset_info.offset !=3D offset_info1.offset) && (txdlp->Host_Control)) { @@ -1797,28 +1836,20 @@ txdlp =3D temp; } memset(txdlp, 0, - (sizeof(TxD_t) * config->MaxTxDs)); + (sizeof(TxD_t) * config->max_txds)); =20 /* Updating the statistics block */ nic->stats.tx_packets++; nic->stats.tx_bytes +=3D skb->len; -#if DEBUG_ON - nic->txpkt_bytes +=3D skb->len; - cnt++; -#endif dev_kfree_skb_irq(skb); =20 offset_info.offset++; offset_info.offset %=3D offset_info.fifo_len + 1; txdlp =3D mac_control->txdl_start[i] + - (config->MaxTxDs * offset_info.offset); + (config->max_txds * offset_info.offset); mac_control->tx_curr_get_info[i].offset =3D offset_info.offset; } -#if DEBUG_ON - DBG_PRINT(INTR_DBG, "%s: freed %d Tx Pkts\n", dev->name, - cnt); -#endif } =20 spin_lock(&nic->tx_lock); @@ -1827,55 +1858,53 @@ spin_unlock(&nic->tx_lock); } =20 -/* =20 - * Input Arguments:=20 - * device private variable - * Return Value:=20 +/** =20 + * alarm_intr_handler - Alarm Interrrupt handler + * @nic: device private variable + * Description: If the interrupt was neither because of Rx packet or = Tx=20 + * complete, this function is called. If the interrupt was to indicate + * a loss of link, the OSM link status handler is invoked for any = other=20 + * alarm interrupt the block that raised the interrupt is displayed=20 + * and a H/W reset is issued. + * Return Value: * NONE - * Description:=20 - * If the interrupt was neither because of Rx packet or Tx=20 - * complete, this function is called. If the interrupt was to indicate = a loss - * of link, the OSM link status handler is invoked for any other alarm = - * interrupt the block that raised the interrupt is displayed and a = H/W reset=20 - * is issued. - */ -static void alarmIntrHandler(struct s2io_nic *nic) +*/ + +static void alarm_intr_handler(struct s2io_nic *nic) { struct net_device *dev =3D (struct net_device *) nic->dev; XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; register u64 val64 =3D 0, err_reg =3D 0; =20 - /* Handling link status change error Intr */ err_reg =3D readq(&bar0->mac_rmac_err_reg); if (err_reg & RMAC_LINK_STATE_CHANGE_INT) { schedule_work(&nic->set_link_task); } =20 - /* Handling SERR errors by stopping device Xmit queue and forcing=20 - * a H/W reset. - */ + /* In case of a serious error, the device will be Reset. */ val64 =3D readq(&bar0->serr_source); if (val64 & SERR_SOURCE_ANY) { DBG_PRINT(ERR_DBG, "%s: Device indicates ", dev->name); DBG_PRINT(ERR_DBG, "serious error!!\n"); netif_stop_queue(dev); } -/* Other type of interrupts are not being handled now, TODO*/ + + /* Other type of interrupts are not being handled now, TODO */ } =20 -/* - * Input Argument:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. +/**=20 + * wait_for_cmd_complete - waits for a command to complete. + * @sp : private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * Description: Function that waits for a command to Write into RMAC=20 + * ADDR DATA registers to be completed and returns either success or=20 + * error depending on whether the command was complete or not.=20 * Return value: * SUCCESS on success and FAILURE on failure. - * Description: - * Function that waits for a command to Write into RMAC ADDR DATA = registers=20 - * to be completed and returns either success or error depending on = whether=20 - * the command was complete or not.=20 */ -int waitForCmdComplete(nic_t * sp) + +int wait_for_cmd_complete(nic_t * sp) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; int ret =3D FAILURE, cnt =3D 0; @@ -1900,17 +1929,16 @@ return ret; } =20 -/* - * Input Argument:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. +/**=20 + * s2io_reset - Resets the card.=20 + * @sp : private member of the device structure. + * Description: Function to Reset the card. This function then also + * restores the previously saved PCI configuration space registers as=20 + * the card reset also resets the configuration space. * Return value: - * void. - * Description: - * Function to Reset the card. This function then also restores the = previously - * saved PCI configuration space registers as the card reset also = resets the - * Configration space. + * void. */ + void s2io_reset(nic_t * sp) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; @@ -1920,7 +1948,8 @@ val64 =3D SW_RESET_ALL; writeq(val64, &bar0->sw_reset); =20 - /* At this stage, if the PCI write is indeed completed, the=20 + /*=20 + * At this stage, if the PCI write is indeed completed, the=20 * card is reset and so is the PCI Config space of the device.=20 * So a read cannot be issued at this stage on any of the=20 * registers to ensure the write into "sw_reset" register @@ -1954,29 +1983,31 @@ sp->device_enabled_once =3D FALSE; } =20 -/* - * Input Argument:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. +/** + * s2io_set_swapper - to set the swapper controle on the card=20 + * @sp : private member of the device structure,=20 + * pointer to the s2io_nic structure. + * Description: Function to set the swapper control on the card=20 + * correctly depending on the 'endianness' of the system. * Return value: * SUCCESS on success and FAILURE on failure. - * Description: - * Function to set the swapper control on the card correctly depending = on the - * 'endianness' of the system. */ + int s2io_set_swapper(nic_t * sp) { struct net_device *dev =3D sp->dev; XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; u64 val64; =20 -/* Set proper endian settings and verify the same by reading the PIF=20 - * Feed-back register. - */ + /*=20 + * Set proper endian settings and verify the same by reading + * the PIF Feed-back register. + */ #ifdef __BIG_ENDIAN -/* The device by default set to a big endian format, so a big endian=20 - * driver need not set anything. - */ + /*=20 + * The device by default set to a big endian format, so a=20 + * big endian driver need not set anything. + */ writeq(0xffffffffffffffffULL, &bar0->swapper_ctrl); val64 =3D (SWAPPER_CTRL_PIF_R_FE | SWAPPER_CTRL_PIF_R_SE | @@ -1995,9 +2026,11 @@ SWAPPER_CTRL_STATS_FE | SWAPPER_CTRL_STATS_SE); writeq(val64, &bar0->swapper_ctrl); #else -/* Initially we enable all bits to make it accessible by the driver, - * then we selectively enable only those bits that we want to set. - */ + /*=20 + * Initially we enable all bits to make it accessible by the + * driver, then we selectively enable only those bits that=20 + * we want to set. + */ writeq(0xffffffffffffffffULL, &bar0->swapper_ctrl); val64 =3D (SWAPPER_CTRL_PIF_R_FE | SWAPPER_CTRL_PIF_R_SE | @@ -2021,9 +2054,10 @@ writeq(val64, &bar0->swapper_ctrl); #endif =20 -/* Verifying if endian settings are accurate by reading a feedback - * register. - */ + /*=20 + * Verifying if endian settings are accurate by reading a=20 + * feedback register. + */ val64 =3D readq(&bar0->pif_rd_swapper_fb); if (val64 !=3D 0x0123456789ABCDEFULL) { /* Endian settings are incorrect, calls for another dekko. */ @@ -2041,17 +2075,18 @@ * Functions defined below concern the OS part of the driver * * ********************************************************* */ =20 -/* - * Input Argument:=20 - * dev - pointer to the device structure. - * Return value: - * '0' on success and an appropriate (-)ve integer as defined in = errno.h - * file on failure. +/** =20 + * s2io-open - open entry point of the driver + * @dev : pointer to the device structure. * Description: * This function is the open entry point of the driver. It mainly = calls a * function to allocate Rx buffers and inserts them into the buffer * descriptors and then enables the Rx part of the NIC.=20 + * Return value: + * 0 on success and an appropriate (-)ve integer as defined in errno.h + * file on failure. */ + int s2io_open(struct net_device *dev) { nic_t *sp =3D dev->priv; @@ -2060,18 +2095,21 @@ struct config_param *config; =20 =20 -/* Make sure you have link off by default every time Nic is = initialized*/ + /*=20 + * Make sure you have link off by default every time=20 + * Nic is initialized + */ netif_carrier_off(dev); sp->last_link_state =3D LINK_DOWN; =20 -/* Initialize the H/W I/O registers */ - if (initNic(sp) !=3D 0) { + /* Initialize the H/W I/O registers */ + if (init_nic(sp) !=3D 0) { DBG_PRINT(ERR_DBG, "%s: H/W initialization failed\n", dev->name); return -ENODEV; } =20 -/* After proper initialization of H/W, register ISR */ + /* After proper initialization of H/W, register ISR */ err =3D request_irq((int) sp->irq, s2io_isr, SA_SHIRQ, sp->name, dev); if (err) { @@ -2087,38 +2125,39 @@ } =20 =20 -/* Setting its receive mode */ + /* Setting its receive mode */ s2io_set_multicast(dev); =20 -/* Initializing the Rx buffers. For now we are considering only 1 Rx = ring - * and initializing buffers into 1016 RxDs or 8 Rx blocks - */ + /*=20 + * Initializing the Rx buffers. For now we are considering only 1=20 + * Rx ring and initializing buffers into 1016 RxDs or 8 Rx blocks + */ mac_control =3D &sp->mac_control; config =3D &sp->config; =20 - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { if ((ret =3D fill_rx_buffers(sp, i))) { DBG_PRINT(ERR_DBG, "%s: Out of memory in Open\n", dev->name); s2io_reset(sp); free_irq(dev->irq, dev); - freeRxBuffers(sp); + free_rx_buffers(sp); return -ENOMEM; } DBG_PRINT(INFO_DBG, "Buf in ring:%d is %d:\n", i, atomic_read(&sp->rx_bufs_left[i])); } =20 -/* Enable tasklet for the device */ + /* Enable tasklet for the device */ tasklet_init(&sp->task, s2io_tasklet, (unsigned long) dev); =20 -/* Enable Rx Traffic and interrupts on the NIC */ - if (startNic(sp)) { + /* Enable Rx Traffic and interrupts on the NIC */ + if (start_nic(sp)) { DBG_PRINT(ERR_DBG, "%s: Starting NIC failed\n", dev->name); tasklet_kill(&sp->task); s2io_reset(sp); free_irq(dev->irq, dev); - freeRxBuffers(sp); + free_rx_buffers(sp); return -ENODEV; } =20 @@ -2128,18 +2167,19 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * dev - device pointer. - * Return value: - * '0' on success and an appropriate (-)ve integer as defined in = errno.h - * file on failure. +/** + * s2io_close -close entry point of the driver + * @dev : device pointer. * Description: * This is the stop entry point of the driver. It needs to undo = exactly - * whatever was done by the open entry point, thus it's usually = referred to - * as the close function. Among other things this function mainly = stops the + * whatever was done by the open entry point,thus it's usually = referred to + * as the close function.Among other things this function mainly stops = the * Rx side of the NIC and frees all the Rx buffers in the Rx rings. + * Return value: + * 0 on success and an appropriate (-)ve integer as defined in errno.h + * file on failure. */ + int s2io_close(struct net_device *dev) { nic_t *sp =3D dev->priv; @@ -2150,19 +2190,22 @@ spin_lock(&sp->isr_lock); netif_stop_queue(dev); =20 -/* disable Tx and Rx traffic on the NIC */ - stopNic(sp); + /* disable Tx and Rx traffic on the NIC */ + stop_nic(sp); =20 spin_unlock(&sp->isr_lock); =20 -/* If the device tasklet is running, wait till its done before killing = it */ + /*=20 + * If the device tasklet is running, wait till its done=20 + * before killing it=20 + */ while (atomic_read(&(sp->tasklet_status))) { set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(HZ / 10); } tasklet_kill(&sp->task); =20 -/* Check if the device is Quiescent and then Reset the NIC */ + /* Check if the device is Quiescent and then Reset the NIC */ do { val64 =3D readq(&bar0->adapter_status); if (verify_xena_quiescence(val64, sp->device_enabled_once)) { @@ -2182,32 +2225,33 @@ } while (1); s2io_reset(sp); =20 -/* Free the Registered IRQ */ + /* Free the Registered IRQ */ free_irq(dev->irq, dev); =20 -/* Free all Tx Buffers waiting for transmission */ - freeTxBuffers(sp); + /* Free all Tx Buffers waiting for transmission */ + free_tx_buffers(sp); =20 -/* Free all Rx buffers allocated by host */ - freeRxBuffers(sp); + /* Free all Rx buffers allocated by host */ + free_rx_buffers(sp); =20 sp->device_close_flag =3D TRUE; /* Device is shut down. */ =20 return 0; } =20 -/* - * Input Argument/s:=20 - * skb - the socket buffer containing the Tx data. - * dev - device pointer. - * Return value: - * '0' on success & 1 on failure.=20 - * NOTE: when device cant queue the pkt, just the trans_start variable = will - * not be upadted. - * Description: +/** + * s2io_xmit - Tx entry point of te driver + * @skb : the socket buffer containing the Tx data. + * @dev : device pointer. + * Description : * This function is the Tx entry point of the driver. S2IO NIC = supports * certain protocol assist features on Tx side, namely CSO, S/G, LSO. + * NOTE: when device cant queue the pkt,just the trans_start variable = will + * not be upadted. + * Return value: + * 0 on success & 1 on failure. */ + int s2io_xmit(struct sk_buff *skb, struct net_device *dev) { nic_t *sp =3D dev->priv; @@ -2221,6 +2265,7 @@ #endif mac_info_t *mac_control; struct config_param *config; + XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; =20 mac_control =3D &sp->mac_control; config =3D &sp->config; @@ -2232,14 +2277,14 @@ /* Multi FIFO Tx is disabled for now. */ if (!queue && tx_prio) { u8 x =3D (skb->data)[5]; - queue =3D x % config->TxFIFONum; + queue =3D x % config->tx_fifo_num; } =20 =20 off =3D (u16) mac_control->tx_curr_put_info[queue].offset; off1 =3D (u16) mac_control->tx_curr_get_info[queue].offset; - txd_len =3D mac_control->txdl_len; - txdp =3D mac_control->txdl_start[queue] + (config->MaxTxDs * off); + txd_len =3D config->max_txds; + txdp =3D mac_control->txdl_start[queue] + (config->max_txds * off); =20 queue_len =3D mac_control->tx_curr_put_info[queue].fifo_len + 1; /* Avoid "put" pointer going beyond "get" pointer */ @@ -2250,7 +2295,6 @@ spin_unlock_irqrestore(&sp->tx_lock, flags); return 0; } - #ifdef NETIF_F_TSO mss =3D skb_shinfo(skb)->tso_size; if (mss) { @@ -2271,7 +2315,7 @@ TXD_TX_CKO_UDP_EN); } =20 - txdp->Control_2 |=3D config->TxIntrType; + txdp->Control_2 |=3D config->tx_intr_type; =20 txdp->Control_1 |=3D (TXD_BUFFER0_SIZE(frg_len) | TXD_GATHER_CODE_FIRST); @@ -2301,15 +2345,18 @@ #endif writeq(val64, &tx_fifo->List_Control); =20 + /* Perform a PCI read to flush previous writes */ + val64 =3D readq(&bar0->general_int_status); + off++; off %=3D mac_control->tx_curr_put_info[queue].fifo_len + 1; mac_control->tx_curr_put_info[queue].offset =3D off; =20 /* Avoid "put" pointer going beyond "get" pointer */ if (((off + 1) % queue_len) =3D=3D off1) { - DBG_PRINT(TX_DBG,=20 - "No free TxDs for xmit, Put: 0x%x Get:0x%x\n", - off, off1); + DBG_PRINT(TX_DBG, + "No free TxDs for xmit, Put: 0x%x Get:0x%x\n", + off, off1); netif_stop_queue(dev); } =20 @@ -2319,21 +2366,20 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * irq: the irq of the device. - * dev_id: a void pointer to the dev structure of the NIC. - * ptregs: pointer to the registers pushed on the stack. +/** + * s2io_isr - ISR handler of the device . + * @irq: the irq of the device. + * @dev_id: a void pointer to the dev structure of the NIC. + * @pt_regs: pointer to the registers pushed on the stack. + * Description: This function is the ISR handler of the device. It=20 + * identifies the reason for the interrupt and calls the relevant=20 + * service routines. As a contongency measure, this ISR allocates the=20 + * recv buffers, if their numbers are below the panic value which is + * presently set to 25% of the original number of rcv buffers = allocated. * Return value: - * void. - * Description: - * This function is the ISR handler of the device. It identifies the = reason=20 - * for the interrupt and calls the relevant service routines. - * As a contongency measure, this ISR allocates the recv buffers, if = their=20 - * numbers are below the panic value which is presently set to 25% of = the - * original number of rcv buffers allocated. + * IRQ_HANDLED: will be returned if IRQ was handled by this routine=20 + * IRQ_NONE: will be returned if interrupt is not from our device */ - static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs = *regs) { struct net_device *dev =3D (struct net_device *) dev_id; @@ -2348,7 +2394,8 @@ =20 spin_lock(&sp->isr_lock); =20 - /* Identify the cause for interrupt and call the appropriate + /*=20 + * Identify the cause for interrupt and call the appropriate * interrupt handler. Causes for the interrupt could be; * 1. Rx of packet. * 2. Tx complete. @@ -2362,30 +2409,28 @@ spin_unlock(&sp->isr_lock); return IRQ_NONE; } - /* Mask the interrupts on the NIC */ + + /* Mask the Interrupts on the NIC. */ general_mask =3D readq(&bar0->general_int_mask); writeq(0xFFFFFFFFFFFFFFFFULL, &bar0->general_int_mask); =20 -#if DEBUG_ON - sp->int_cnt++; -#endif - /* If Intr is because of Tx Traffic */ if (reason & GEN_INTR_TXTRAFFIC) { - txIntrHandler(sp); + tx_intr_handler(sp); } =20 /* If Intr is because of an error */ if (reason & (GEN_ERROR_INTR)) - alarmIntrHandler(sp); + alarm_intr_handler(sp); =20 #ifdef CONFIG_S2IO_NAPI if (reason & GEN_INTR_RXTRAFFIC) { if (netif_rx_schedule_prep(dev)) { - en_dis_able_NicIntrs(sp, RX_TRAFFIC_INTR, - DISABLE_INTRS); - /* We retake the snap shot of the general interrupt=20 - * register. + en_dis_able_nic_intrs(sp, RX_TRAFFIC_INTR, + DISABLE_INTRS); + /*=20 + * Here we take a snap shot of the general=20 + * Intr Register. */ general_mask =3D readq(&bar0->general_int_mask); __netif_rx_schedule(dev); @@ -2394,66 +2439,72 @@ #else /* If Intr is because of Rx Traffic */ if (reason & GEN_INTR_RXTRAFFIC) { - rxIntrHandler(sp); + rx_intr_handler(sp); } #endif =20 -/* If the Rx buffer count is below the panic threshold then reallocate = the - * buffers from the interrupt handler itself, else schedule a tasklet = to=20 - * reallocate the buffers. - */ + /*=20 + * If the Rx buffer count is below the panic threshold then=20 + * reallocate the buffers from the interrupt handler itself,=20 + * else schedule a tasklet to reallocate the buffers. + */ #if 1 { - int i; + int i; + + for (i =3D 0; i < config->rx_ring_num; i++) { + int rxb_size =3D atomic_read(&sp->rx_bufs_left[i]); + int level =3D rx_buffer_level(sp, rxb_size, i); + + if ((level =3D=3D PANIC) && (!TASKLET_IN_USE)) { + int ret; =20 - for (i =3D 0; i < config->RxRingNum; i++) { - int rxb_size =3D atomic_read(&sp->rx_bufs_left[i]); - int level =3D rx_buffer_level(sp, rxb_size, i); - - if ((level =3D=3D PANIC) && (!TASKLET_IN_USE)) { - int ret; - - DBG_PRINT(ERR_DBG, "%s: Rx BD hit ", dev->name); - DBG_PRINT(ERR_DBG, "PANIC levels\n"); - if ((ret =3D fill_rx_buffers(sp, i)) =3D=3D -ENOMEM) { - DBG_PRINT(ERR_DBG, "%s:Out of memory", + DBG_PRINT(INTR_DBG, "%s: Rx BD hit ", dev->name); - DBG_PRINT(ERR_DBG, " in ISR!!\n"); - writeq(general_mask, - &bar0->general_int_mask); - spin_unlock(&sp->isr_lock); - return IRQ_HANDLED; + DBG_PRINT(INTR_DBG, "PANIC levels\n"); + if ((ret =3D + fill_rx_buffers(sp, i)) =3D=3D -ENOMEM) { + DBG_PRINT(ERR_DBG, + "%s:Out of memory", + dev->name); + DBG_PRINT(ERR_DBG, " in ISR!!\n"); + writeq(general_mask, + &bar0->general_int_mask); + spin_unlock(&sp->isr_lock); + return IRQ_HANDLED; + } + clear_bit(0, + (unsigned long *) (&sp-> + tasklet_status)); + } else if ((level =3D=3D LOW) + && (!atomic_read(&sp->tasklet_status))) { + tasklet_schedule(&sp->task); } - clear_bit(0, - (unsigned long *) (&sp->tasklet_status)); - } else if ((level =3D=3D LOW) - && (!atomic_read(&sp->tasklet_status))) { - tasklet_schedule(&sp->task); - } =20 - } + } =20 } #else tasklet_schedule(&sp->task); #endif =20 - /* Unmask all the previously enabled interrupts on the NIC */ + /* Unmask all previously enabled interrupts on the NIC. */ writeq(general_mask, &bar0->general_int_mask); =20 spin_unlock(&sp->isr_lock); return IRQ_HANDLED; } =20 -/* - * Input Argument/s:=20 - * dev - pointer to the device structure. - * Return value: - * pointer to the updated net_device_stats structure. +/** + * s2io_get_stats - Updates the device statistics structure.=20 + * @dev : pointer to the device structure. * Description: * This function updates the device statistics structure in the = s2io_nic=20 * structure and returns a pointer to the same. + * Return value: + * pointer to the updated net_device_stats structure. */ + struct net_device_stats *s2io_get_stats(struct net_device *dev) { nic_t *sp =3D dev->priv; @@ -2463,27 +2514,28 @@ mac_control =3D &sp->mac_control; config =3D &sp->config; =20 - sp->stats.tx_errors =3D mac_control->StatsInfo->tmac_any_err_frms; - sp->stats.rx_errors =3D mac_control->StatsInfo->rmac_drop_frms; - sp->stats.multicast =3D mac_control->StatsInfo->rmac_vld_mcst_frms; + sp->stats.tx_errors =3D mac_control->stats_info->tmac_any_err_frms; + sp->stats.rx_errors =3D mac_control->stats_info->rmac_drop_frms; + sp->stats.multicast =3D mac_control->stats_info->rmac_vld_mcst_frms; sp->stats.rx_length_errors =3D - mac_control->StatsInfo->rmac_long_frms; + mac_control->stats_info->rmac_long_frms; =20 return (&sp->stats); } =20 -/* - * Input Argument/s:=20 - * dev - pointer to the device structure - * Return value: - * void. +/** + * s2io_set_multicast - entry point for multicast address = enable/disable. + * @dev : pointer to the device structure * Description: * This function is a driver entry point which gets called by the = kernel=20 * whenever multicast addresses must be enabled/disabled. This also = gets=20 * called to set/reset promiscuous mode. Depending on the deivce flag, = we * determine, if multicast address must be enabled or if promiscuous = mode * is to be disabled etc. + * Return value: + * void. */ + static void s2io_set_multicast(struct net_device *dev) { int i, j, prev_cnt; @@ -2506,7 +2558,7 @@ RMAC_ADDR_CMD_MEM_OFFSET(MAC_MC_ALL_MC_ADDR_OFFSET); writeq(val64, &bar0->rmac_addr_cmd_mem); /* Wait till command completes */ - waitForCmdComplete(sp); + wait_for_cmd_complete(sp); =20 sp->m_cast_flg =3D 1; sp->all_multi_pos =3D MAC_MC_ALL_MC_ADDR_OFFSET; @@ -2519,7 +2571,7 @@ RMAC_ADDR_CMD_MEM_OFFSET(sp->all_multi_pos); writeq(val64, &bar0->rmac_addr_cmd_mem); /* Wait till command completes */ - waitForCmdComplete(sp); + wait_for_cmd_complete(sp); =20 sp->m_cast_flg =3D 0; sp->all_multi_pos =3D 0; @@ -2582,7 +2634,7 @@ writeq(val64, &bar0->rmac_addr_cmd_mem); =20 /* Wait for command completes */ - if (waitForCmdComplete(sp)) { + if (wait_for_cmd_complete(sp)) { DBG_PRINT(ERR_DBG, "%s: Adding ", dev->name); DBG_PRINT(ERR_DBG, "Multicasts failed\n"); @@ -2609,7 +2661,7 @@ writeq(val64, &bar0->rmac_addr_cmd_mem); =20 /* Wait for command completes */ - if (waitForCmdComplete(sp)) { + if (wait_for_cmd_complete(sp)) { DBG_PRINT(ERR_DBG, "%s: Adding ", dev->name); DBG_PRINT(ERR_DBG, "Multicasts failed\n"); @@ -2619,17 +2671,16 @@ } } =20 -/* - * Input Argument/s:=20 - * dev - pointer to the device structure. - * new_mac - a uchar pointer to the new mac address which is to be = set. - * Return value: - * SUCCESS on success and an appropriate (-)ve integer as defined in = errno.h - * file on failure. - * Description: - * This procedure will program the Xframe to receive frames with new - * Mac Address +/** + * s2io_set_mac_addr - Programs the Xframe mac address=20 + * @dev : pointer to the device structure. + * @addr: a uchar pointer to the new mac address which is to be set. + * Description : This procedure will program the Xframe to receive=20 + * frames with new Mac Address + * Return value: SUCCESS on success and an appropriate (-)ve integer=20 + * as defined in errno.h file on failure. */ + int s2io_set_mac_addr(struct net_device *dev, u8 * addr) { nic_t *sp =3D dev->priv; @@ -2655,7 +2706,7 @@ RMAC_ADDR_CMD_MEM_OFFSET(0); writeq(val64, &bar0->rmac_addr_cmd_mem); /* Wait till command completes */ - if (waitForCmdComplete(sp)) { + if (wait_for_cmd_complete(sp)) { DBG_PRINT(ERR_DBG, "%s: set_mac_addr failed\n", dev->name); return FAILURE; } @@ -2663,18 +2714,18 @@ return SUCCESS; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * info - pointer to the structure with parameters given by ethtool to = set - * link information. - * Return value: - * 0 on success. +/** + * s2io_ethtool_sset - Sets different link parameters.=20 + * @sp : private member of the device structure, which is a pointer to = the * s2io_nic structure. + * @info: pointer to the structure with parameters given by ethtool to = set + * link information. * Description: - * The function sets different link parameters provided by the user = onto=20 - * the NIC. - */ + * The function sets different link parameters provided by the user = onto=20 + * the NIC. + * Return value: + * 0 on success. +*/ + static int s2io_ethtool_sset(struct net_device *dev, struct ethtool_cmd *info) { @@ -2690,17 +2741,18 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * info - pointer to the structure with parameters given by ethtool to = return - * link information. - * Return value: - * void +/** + * s2io_ethtol_gset - Return link specific information.=20 + * @sp : private member of the device structure, pointer to the + * s2io_nic structure. + * @info : pointer to the structure with parameters given by ethtool + * to return link information. * Description: - * Returns link specefic information like speed, duplex etc.. to = ethtool. + * Returns link specific information like speed, duplex etc.. to = ethtool. + * Return value : + * return 0 on success. */ + int s2io_ethtool_gset(struct net_device *dev, struct ethtool_cmd *info) { nic_t *sp =3D dev->priv; @@ -2721,17 +2773,18 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * info - pointer to the structure with parameters given by ethtool to = return - * driver information. +/** + * s2io_ethtool_gdrvinfo - Returns driver specific information.=20 + * @sp : private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * @info : pointer to the structure with parameters given by ethtool to + * return driver information. + * Description: + * Returns driver specefic information like name, version etc.. to = ethtool. * Return value: * void - * Description: - * Returns driver specefic information like name, version etc.. to = ethtool. */ + static void s2io_ethtool_gdrvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { @@ -2748,19 +2801,20 @@ info->n_stats =3D S2IO_STAT_LEN; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * regs - pointer to the structure with parameters given by ethtool = for=20 +/** + * s2io_ethtool_gregs - dumps the entire space of Xfame into the = buffer. + * @sp: private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * @regs : pointer to the structure with parameters given by ethtool = for=20 * dumping the registers. - * reg_space - The input argumnet into which all the registers are = dumped. - * Return value: - * void - * Description: - * Dumps the entire register space of xFrame NIC into the user given = buffer=20 - * area. - */ + * @reg_space: The input argumnet into which all the registers are = dumped. + * Description: + * Dumps the entire register space of xFrame NIC into the user given + * buffer area. + * Return value : + * void . +*/ + static void s2io_ethtool_gregs(struct net_device *dev, struct ethtool_regs *regs, void *space) { @@ -2778,17 +2832,15 @@ } } =20 -/* - * Input Argument/s:=20 - * data - address of the private member of the device structure, which = +/** + * s2io_phy_id - timer function that alternates adapter LED. + * @data : address of the private member of the device structure, = which=20 * is a pointer to the s2io_nic structure, provided as an u32. - * Return value: - * void - * Description: - * This is actually the timer function that alternates the adapter LED = bit - * of the adapter control bit to set/reset every time on invocation. - * The timer is set for 1/2 a second, hence tha NIC blinks once every = second. - */ + * Description: This is actually the timer function that alternates the = + * adapter LED bit of the adapter control bit to set/reset every time = on=20 + * invocation. The timer is set for 1/2 a second, hence tha NIC blinks=20 + * once every second. +*/ static void s2io_phy_id(unsigned long data) { nic_t *sp =3D (nic_t *) data; @@ -2810,20 +2862,21 @@ mod_timer(&sp->id_timer, jiffies + HZ / 2); } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * id - pointer to the structure with identification parameters given = by=20 - * ethtool. +/** + * s2io_ethtool_idnic - To physically identify the nic on the system. + * @sp : private member of the device structure, which is a pointer to = the + * s2io_nic structure. + * @id : pointer to the structure with identification parameters given = by=20 + * ethtool. + * Description: Used to physically identify the NIC on the system. + * The Link LED will blink for a time specified by the user for=20 + * identification. + * NOTE: The Link has to be Up to be able to blink the LED. Hence=20 + * identification is possible only if it's link is up. * Return value: - * int , returns '0' on success - * Description: - * Used to physically identify the NIC on the system. The Link LED = will blink - * for a time specified by the user for identification. - * NOTE: The Link has to be Up to be able to blink the LED. Hence=20 - * identification is possible only if it's link is up. + * int , returns 0 on success */ + static int s2io_ethtool_idnic(struct net_device *dev, u32 data) { u64 val64 =3D 0; @@ -2856,15 +2909,14 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * ep - pointer to the structure with pause parameters given by = ethtool. +/** + * s2io_ethtool_getpause_data -Pause frame frame generation and = reception. + * @sp : private member of the device structure, which is a pointer to = the * s2io_nic structure. + * @ep : pointer to the structure with pause parameters given by = ethtool. + * Description: + * Returns the Pause frame generation and reception capability of the = NIC. * Return value: * void - * Description: - * Returns the Pause frame generation and reception capability of the = NIC. */ static void s2io_ethtool_getpause_data(struct net_device *dev, struct ethtool_pauseparam *ep) @@ -2881,17 +2933,18 @@ ep->autoneg =3D FALSE; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * ep - pointer to the structure with pause parameters given by = ethtool. - * Return value: - * int, returns '0' on Success +/** + * s2io_ethtool-setpause_data - set/reset pause frame generation. + * @sp : private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * @ep : pointer to the structure with pause parameters given by = ethtool. * Description: - * It can be used to set or reset Pause frame generation or reception = support=20 - * of the NIC. + * It can be used to set or reset Pause frame generation or reception + * support of the NIC. + * Return value: + * int, returns 0 on Success */ + int s2io_ethtool_setpause_data(struct net_device *dev, struct ethtool_pauseparam *ep) { @@ -2912,21 +2965,24 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * off - offset at which the data must be written - * Return value: - * -1 on failure and the value read from the Eeprom if successful. +/** + * read_eeprom - reads 4 bytes of data from user given offset. + * @sp : private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * @off : offset at which the data must be written + * @data : Its an output parameter where the data read at the given + * offset is stored. * Description: - * Will read 4 bytes of data from the user given offset and return the = - * read data. + * Will read 4 bytes of data from the user given offset and return the=20 + * read data. * NOTE: Will allow to read only part of the EEPROM visible through the - * I2C bus. + * I2C bus. + * Return value: + * -1 on failure and 0 on success. */ + #define S2IO_DEV_ID 5 -static u32 readEeprom(nic_t * sp, int off) +static u32 read_eeprom(nic_t * sp, int off) { u32 data =3D -1, exit_cnt =3D 0; u64 val64; @@ -2951,21 +3007,22 @@ return data; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * off - offset at which the data must be written - * data - The data that is to be written - * cnt - Number of bytes of the data that are actually to be written = into=20 +/** + * write_eeprom - actually writes the relevant part of the data value. + * @sp : private member of the device structure, which is a pointer to = the + * s2io_nic structure. + * @off : offset at which the data must be written + * @data : The data that is to be written + * @cnt : Number of bytes of the data that are actually to be written = into=20 * the Eeprom. (max of 3) - * Return value: - * '0' on success, -1 on failure. * Description: * Actually writes the relevant part of the data value into the Eeprom * through the I2C bus. + * Return value: + * 0 on success, -1 on failure. */ -static int writeEeprom(nic_t * sp, int off, u32 data, int cnt) + +static int write_eeprom(nic_t * sp, int off, u32 data, int cnt) { int exit_cnt =3D 0, ret =3D -1; u64 val64; @@ -2991,39 +3048,19 @@ return ret; } =20 -/*=20 - * A helper function used to invert the 4 byte u32 data field - * byte by byte. This will be used by the Read Eeprom function - * for display purposes. - */ -u32 inv(u32 data) -{ - static u32 ret =3D 0; - - if (data) { - u8 c =3D data; - ret =3D ((ret << 8) + c); - data >>=3D 8; - inv(data); - } - - return ret; -} - -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * eeprom - pointer to the user level structure provided by ethtool,=20 - * containing all relevant information. - * data_buf - user defined value to be written into Eeprom. - * Return value: - * int '0' on success - * Description: - * Reads the values stored in the Eeprom at given offset for a given = length. - * Stores these values int the input argument data buffer 'data_buf' = and - * returns these to the caller (ethtool.) +/** + * s2io_ethtool_geeprom - reads the value stored in the Eeprom. + * @sp : private member of the device structure, which is a pointer to = the * s2io_nic structure. + * @eeprom : pointer to the user level structure provided by ethtool,=20 + * containing all relevant information. + * @data_buf : user defined value to be written into Eeprom. + * Description: Reads the values stored in the Eeprom at given offset + * for a given length. Stores these values int the input argument data + * buffer 'data_buf' and returns these to the caller (ethtool.) + * Return value: + * int 0 on success */ + int s2io_ethtool_geeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, u8 * data_buf) { @@ -3036,30 +3073,31 @@ eeprom->len =3D XENA_EEPROM_SPACE - eeprom->offset; =20 for (i =3D 0; i < eeprom->len; i +=3D 4) { - data =3D readEeprom(sp, eeprom->offset + i); + data =3D read_eeprom(sp, eeprom->offset + i); if (data < 0) { DBG_PRINT(ERR_DBG, "Read of EEPROM failed\n"); return -EFAULT; } - valid =3D inv(data); + valid =3D INV(data); memcpy((data_buf + i), &valid, 4); } return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * eeprom - pointer to the user level structure provided by ethtool,=20 - * containing all relevant information. - * data_buf - user defined value to be written into Eeprom. - * Return value: - * '0' on success, -EFAULT on failure. - * Description: +/** + * s2io_ethtool_seeprom - tries to write the user provided value in = Eeprom + * @sp : private member of the device structure, which is a pointer to = the + * s2io_nic structure. + * @eeprom : pointer to the user level structure provided by ethtool,=20 + * containing all relevant information. + * @data_buf ; user defined value to be written into Eeprom. + * Description: * Tries to write the user provided value in the Eeprom, at the offset * given by the user. + * Return value: + * 0 on success, -EFAULT on failure. */ + static int s2io_ethtool_seeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, u8 * data_buf) @@ -3083,7 +3121,7 @@ } else valid =3D data; =20 - if (writeEeprom(sp, (eeprom->offset + cnt), valid, 0)) { + if (write_eeprom(sp, (eeprom->offset + cnt), valid, 0)) { DBG_PRINT(ERR_DBG, "ETHTOOL_WRITE_EEPROM Err: Cannot "); DBG_PRINT(ERR_DBG, @@ -3097,19 +3135,20 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * data - variable that returns the result of each of the test = conducted by=20 - * the driver. - * Return value: - * '0' on success. +/** + * s2io_register_test - reads and writes into all clock domains.=20 + * @sp : private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * @data : variable that returns the result of each of the test = conducted b + * by the driver. * Description: - * Read and write into all clock domains. The NIC has 3 clock domains, - * see that registers in all the three regions are accessible. + * Read and write into all clock domains. The NIC has 3 clock domains, + * see that registers in all the three regions are accessible. + * Return value: + * 0 on success. */ -static int s2io_registerTest(nic_t * sp, uint64_t * data) + +static int s2io_register_test(nic_t * sp, uint64_t * data) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; u64 val64 =3D 0; @@ -3159,88 +3198,90 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * data - variable that returns the result of each of the test = conducted by=20 - * the driver. - * Return value: - * '0' on success. +/** + * s2io_eeprom_test - to verify that EEprom in the xena can be = programmed.=20 + * @sp : private member of the device structure, which is a pointer to = the + * s2io_nic structure. + * @data:variable that returns the result of each of the test conducted = by + * the driver. * Description: - * Verify that EEPROM in the xena can be programmed using I2C_CONTROL=20 - * register. + * Verify that EEPROM in the xena can be programmed using I2C_CONTROL=20 + * register. + * Return value: + * 0 on success. */ -static int s2io_eepromTest(nic_t * sp, uint64_t * data) + +static int s2io_eeprom_test(nic_t * sp, uint64_t * data) { int fail =3D 0, ret_data; =20 /* Test Write Error at offset 0 */ - if (!writeEeprom(sp, 0, 0, 3)) + if (!write_eeprom(sp, 0, 0, 3)) fail =3D 1; =20 /* Test Write at offset 4f0 */ - if (writeEeprom(sp, 0x4F0, 0x01234567, 3)) + if (write_eeprom(sp, 0x4F0, 0x01234567, 3)) fail =3D 1; - if ((ret_data =3D readEeprom(sp, 0x4f0)) < 0) + if ((ret_data =3D read_eeprom(sp, 0x4F0)) < 0) fail =3D 1; =20 if (ret_data !=3D 0x01234567) fail =3D 1; =20 /* Reset the EEPROM data go FFFF */ - writeEeprom(sp, 0x4F0, 0xFFFFFFFF, 3); + write_eeprom(sp, 0x4F0, 0xFFFFFFFF, 3); =20 /* Test Write Request Error at offset 0x7c */ - if (!writeEeprom(sp, 0x07C, 0, 3)) + if (!write_eeprom(sp, 0x07C, 0, 3)) fail =3D 1; =20 /* Test Write Request at offset 0x7fc */ - if (writeEeprom(sp, 0x7FC, 0x01234567, 3)) + if (write_eeprom(sp, 0x7FC, 0x01234567, 3)) fail =3D 1; - if ((ret_data =3D readEeprom(sp, 0x7FC)) < 0) + if ((ret_data =3D read_eeprom(sp, 0x7FC)) < 0) fail =3D 1; =20 if (ret_data !=3D 0x01234567) fail =3D 1; =20 /* Reset the EEPROM data go FFFF */ - writeEeprom(sp, 0x7FC, 0xFFFFFFFF, 3); + write_eeprom(sp, 0x7FC, 0xFFFFFFFF, 3); =20 /* Test Write Error at offset 0x80 */ - if (!writeEeprom(sp, 0x080, 0, 3)) + if (!write_eeprom(sp, 0x080, 0, 3)) fail =3D 1; =20 /* Test Write Error at offset 0xfc */ - if (!writeEeprom(sp, 0x0FC, 0, 3)) + if (!write_eeprom(sp, 0x0FC, 0, 3)) fail =3D 1; =20 /* Test Write Error at offset 0x100 */ - if (!writeEeprom(sp, 0x100, 0, 3)) + if (!write_eeprom(sp, 0x100, 0, 3)) fail =3D 1; =20 /* Test Write Error at offset 4ec */ - if (!writeEeprom(sp, 0x4EC, 0, 3)) + if (!write_eeprom(sp, 0x4EC, 0, 3)) fail =3D 1; =20 *data =3D fail; return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * data - variable that returns the result of each of the test = conducted by=20 - * the driver. - * Return value: - * '0' on success and -1 on failure. +/** + * s2io_bist_test - invokes the MemBist test of the card . + * @sp : private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * @data:variable that returns the result of each of the test conducted = by=20 + * the driver. * Description: - * This invokes the MemBist test of the card. We give around - * 2 secs time for the Test to complete. If it's still not complete - * within this peiod, we consider that the test failed.=20 + * This invokes the MemBist test of the card. We give around + * 2 secs time for the Test to complete. If it's still not complete + * within this peiod, we consider that the test failed.=20 + * Return value: + * 0 on success and -1 on failure. */ -static int s2io_bistTest(nic_t * sp, uint64_t * data) + +static int s2io_bist_test(nic_t * sp, uint64_t * data) { u8 bist =3D 0; int cnt =3D 0, ret =3D -1; @@ -3264,19 +3305,20 @@ return ret; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * data - variable that returns the result of each of the test = conducted by=20 - * the driver. - * Return value: - * '0' on success. +/** + * s2io-link_test - verifies the link state of the nic =20 + * @sp ; private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * @data: variable that returns the result of each of the test = conducted by + * the driver. * Description: - * The function verifies the link state of the NIC and updates the = input=20 - * argument 'data' appropriately. + * The function verifies the link state of the NIC and updates the = input=20 + * argument 'data' appropriately. + * Return value: + * 0 on success. */ -static int s2io_linkTest(nic_t * sp, uint64_t * data) + +static int s2io_link_test(nic_t * sp, uint64_t * data) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; u64 val64; @@ -3288,19 +3330,20 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * data - variable that returns the result of each of the test = conducted by=20 - * the driver. - * Return value: - * '0' on success. +/** + * s2io_rldram_test - offline test for access to the RldRam chip on the = NIC=20 + * @sp - private member of the device structure, which is a pointer to = the =20 + * s2io_nic structure. + * @data - variable that returns the result of each of the test=20 + * conducted by the driver. * Description: * This is one of the offline test that tests the read and write=20 * access to the RldRam chip on the NIC. + * Return value: + * 0 on success. */ -static int s2io_rldramTest(nic_t * sp, uint64_t * data) + +static int s2io_rldram_test(nic_t * sp, uint64_t * data) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; u64 val64; @@ -3395,20 +3438,21 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * ethtest - pointer to a ethtool command specific structure that will = be - * returned to the user. - * data - variable that returns the result of each of the test = conducted by=20 - * the driver. - * Return value: - * SUCCESS on success and an appropriate -1 on failure. +/** + * s2io_ethtool_test - conducts 6 tsets to determine the health of = card. + * @sp : private member of the device structure, which is a pointer to = the + * s2io_nic structure. + * @ethtest : pointer to a ethtool command specific structure that = will be + * returned to the user. + * @data : variable that returns the result of each of the test=20 + * conducted by the driver. * Description: * This function conducts 6 tests ( 4 offline and 2 online) to = determine - * the health of the card. + * the health of the card. + * Return value: + * void */ + static void s2io_ethtool_test(struct net_device *dev, struct ethtool_test *ethtest, uint64_t * data) @@ -3424,22 +3468,22 @@ } else s2io_set_swapper(sp); =20 - if (s2io_registerTest(sp, &data[0])) + if (s2io_register_test(sp, &data[0])) ethtest->flags |=3D ETH_TEST_FL_FAILED; =20 s2io_reset(sp); s2io_set_swapper(sp); =20 - if (s2io_rldramTest(sp, &data[3])) + if (s2io_rldram_test(sp, &data[3])) ethtest->flags |=3D ETH_TEST_FL_FAILED; =20 s2io_reset(sp); s2io_set_swapper(sp); =20 - if (s2io_eepromTest(sp, &data[1])) + if (s2io_eeprom_test(sp, &data[1])) ethtest->flags |=3D ETH_TEST_FL_FAILED; =20 - if (s2io_bistTest(sp, &data[4])) + if (s2io_bist_test(sp, &data[4])) ethtest->flags |=3D ETH_TEST_FL_FAILED; =20 if (orig_state) @@ -3459,7 +3503,7 @@ data[4] =3D -1; } =20 - if (s2io_linkTest(sp, &data[2])) + if (s2io_link_test(sp, &data[2])) ethtest->flags |=3D ETH_TEST_FL_FAILED; =20 data[0] =3D 0; @@ -3475,7 +3519,7 @@ { int i =3D 0; nic_t *sp =3D dev->priv; - StatInfo_t *stat_info =3D sp->mac_control.StatsInfo; + StatInfo_t *stat_info =3D sp->mac_control.stats_info; =20 tmp_stats[i++] =3D stat_info->tmac_frms; tmp_stats[i++] =3D stat_info->tmac_data_octets; @@ -3597,36 +3641,37 @@ .get_ethtool_stats =3D s2io_get_ethtool_stats }; =20 -/* - * Input Argument/s:=20 - * dev - Device pointer. - * ifr - An IOCTL specefic structure, that can contain a pointer to - * a proprietary structure used to pass information to the driver. - * cmd - This is used to distinguish between the different commands = that - * can be passed to the IOCTL functions. - * Return value: - * '0' on success and an appropriate (-)ve integer as defined in = errno.h - * file on failure. +/** + * s2io_ioctl - Entry point for the Ioctl=20 + * @dev : Device pointer. + * @ifr : An IOCTL specefic structure, that can contain a pointer to + * a proprietary structure used to pass information to the driver. + * @cmd : This is used to distinguish between the different commands = that + * can be passed to the IOCTL functions. * Description: * This function has support for ethtool, adding multiple MAC = addresses on=20 * the NIC and some DBG commands for the util tool. + * Return value: + * Currently the IOCTL supports no operations, hence by default this + * function returns OP NOT SUPPORTED value. */ + int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { return -EOPNOTSUPP; } =20 -/* - * Input Argument/s:=20 - * dev - device pointer. - * new_mtu - the new MTU size for the device. +/** + * s2io_change_mtu - entry point to change MTU size for the device. + * @dev : device pointer. + * @new_mtu : the new MTU size for the device. + * Description: A driver entry point to change MTU size for the = device. + * Before changing the MTU the device must be stopped. * Return value: - * '0' on success and an appropriate (-)ve integer as defined in = errno.h + * 0 on success and an appropriate (-)ve integer as defined in = errno.h * file on failure. - * Description: - * A driver entry point to change MTU size for the device. Before = changing - * the MTU the device must be stopped. */ + int s2io_change_mtu(struct net_device *dev, int new_mtu) { nic_t *sp =3D dev->priv; @@ -3645,7 +3690,7 @@ return -EPERM; } =20 -/* Set the new MTU into the PYLD register of the NIC */ + /* Set the new MTU into the PYLD register of the NIC */ val64 =3D new_mtu; writeq(vBIT(val64, 2, 14), &bar0->rmac_max_pyld_len); =20 @@ -3654,18 +3699,19 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * dev_adr - address of the device structure in dma_addr_t format. - * Return value: - * void. +/** + * s2io_tasklet - Bottom half of the ISR. + * @dev_adr : address of the device structure in dma_addr_t format. * Description: * This is the tasklet or the bottom half of the ISR. This is * an extension of the ISR which is scheduled by the scheduler to be = run=20 * when the load on the CPU is low. All low priority tasks of the ISR = can * be pushed into the tasklet. For now the tasklet is used only to=20 * replenish the Rx buffers in the Rx buffer descriptors. + * Return value: + * void. */ + static void s2io_tasklet(unsigned long dev_addr) { struct net_device *dev =3D (struct net_device *) dev_addr; @@ -3678,29 +3724,30 @@ config =3D &sp->config; =20 if (!TASKLET_IN_USE) { - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { ret =3D fill_rx_buffers(sp, i); if (ret =3D=3D -ENOMEM) { DBG_PRINT(ERR_DBG, "%s: Out of ", dev->name); DBG_PRINT(ERR_DBG, "memory in tasklet\n"); - return; + break; } else if (ret =3D=3D -EFILL) { DBG_PRINT(ERR_DBG, "%s: Rx Ring %d is full\n", dev->name, i); - return; + break; } } clear_bit(0, (unsigned long *) (&sp->tasklet_status)); } } =20 - -/* - * Description: - *=20 +/** + * s2io_set_link - Set the LInk status + * @data: long pointer to device private structue + * Description: Sets the link status for the adapter */ + static void s2io_set_link(unsigned long data) { nic_t *nic =3D (nic_t *) data; @@ -3708,7 +3755,8 @@ XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; register u64 val64, err_reg; =20 - /* Allow a small delay for the NICs self initiated=20 + /*=20 + * Allow a small delay for the NICs self initiated=20 * cleanup to complete. */ set_current_state(TASK_UNINTERRUPTIBLE); @@ -3716,7 +3764,7 @@ =20 val64 =3D readq(&bar0->adapter_status); if (verify_xena_quiescence(val64, nic->device_enabled_once)) { - /* Acknowledge interrupt and clear the R1 register */ + /* Acknowledge Intr and clear R1 register. */ err_reg =3D readq(&bar0->mac_rmac_err_reg); writeq(err_reg, &bar0->mac_rmac_err_reg); =20 @@ -3748,13 +3796,16 @@ } } =20 -/* +/**=20 + * s2io_restart_nic - Resets the NIC. + * @data : long pointer to the device private structure * Description: * This function is scheduled to be run by the s2io_tx_watchdog * function after 0.5 secs to reset the NIC. The idea is to reduce=20 * the run time of the watch dog routine which is run holding a * spin lock. */ + static void s2io_restart_nic(unsigned long data) { struct net_device *dev =3D (struct net_device *) data; @@ -3767,18 +3818,19 @@ "%s: was reset by Tx watchdog timer.\n", dev->name); } =20 -/* - * Input Argument/s:=20 - * dev - device pointer. - * Return value: - * void +/**=20 + * s2io_tx_watchdog - Watchdog for transmit side.=20 + * @dev : Pointer to net device structure * Description: * This function is triggered if the Tx Queue is stopped * for a pre-defined amount of time when the Interface is still up. * If the Interface is jammed in such a situation, the hardware is * reset (by s2io_close) and restarted again (by s2io_open) to * overcome any problem that might have been caused in the hardware. + * Return value: + * void */ + static void s2io_tx_watchdog(struct net_device *dev) { nic_t *sp =3D dev->priv; @@ -3788,25 +3840,24 @@ } } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * skb - the socket buffer pointer. - * len - length of the packet - * cksum - FCS checksum of the frame. - * ring_no - the ring from which this RxD was extracted. - * Return value: - * SUCCESS on success and -1 on failure. - * Description:=20 - * This function is called by the Tx interrupt serivce routine to = perform=20 +/** + * rx_osm_handler - To perform some OS related operations on SKB. + * @sp: private member of the device structure,pointer to s2io_nic = structure. + * @skb : the socket buffer pointer. + * @len : length of the packet + * @cksum : FCS checksum of the frame. + * @ring_no : the ring from which this RxD was extracted. + * Description:=20 + * This function is called by the Tx interrupt serivce routine to = perform * some OS related operations on the SKB before passing it to the = upper * layers. It mainly checks if the checksum is OK, if so adds it to = the * SKBs cksum variable, increments the Rx packet count and passes the = SKB * to the upper layer. If the checksum is wrong, it increments the Rx * packet error count, frees the SKB and returns error. + * Return value: + * SUCCESS on success and -1 on failure. */ -static int rxOsmHandler(nic_t * sp, u16 len, RxD_t * rxdp, int ring_no) +static int rx_osm_handler(nic_t * sp, u16 len, RxD_t * rxdp, int = ring_no) { struct net_device *dev =3D (struct net_device *) sp->dev; struct sk_buff *skb =3D @@ -3817,7 +3868,8 @@ if ((rxdp->Control_1 & TCP_OR_UDP_FRAME) && (sp->rx_csum)) { l4_csum =3D RXD_GET_L4_CKSUM(rxdp->Control_1); if ((l3_csum =3D=3D L3_CKSUM_OK) && (l4_csum =3D=3D L4_CKSUM_OK)) { - /* NIC verifies if the Checksum of the received + /*=20 + * NIC verifies if the Checksum of the received * frame is Ok or not and accordingly returns * a flag in the RxD. */ @@ -3844,25 +3896,21 @@ #endif =20 dev->last_rx =3D jiffies; -#if DEBUG_ON - sp->rxpkt_cnt++; -#endif sp->rx_pkt_count++; sp->stats.rx_packets++; sp->stats.rx_bytes +=3D len; - sp->rxpkt_bytes +=3D len; =20 atomic_dec(&sp->rx_bufs_left[ring_no]); rxdp->Host_Control =3D 0; return SUCCESS; } =20 -int check_for_txSpace(nic_t * sp) +int check_for_tx_space(nic_t * sp) { u32 put_off, get_off, queue_len; int ret =3D TRUE, i; =20 - for (i =3D 0; i < sp->config.TxFIFONum; i++) { + for (i =3D 0; i < sp->config.tx_fifo_num; i++) { queue_len =3D sp->mac_control.tx_curr_put_info[i].fifo_len + 1; put_off =3D sp->mac_control.tx_curr_put_info[i].offset; @@ -3876,18 +3924,19 @@ return ret; } =20 -/* -* Input Argument/s:=20 -* sp - private member of the device structure, which is a pointer to = the=20 -* s2io_nic structure. -* link - inidicates whether link is UP/DOWN. -* Return value: -* void. -* Description: -* This function stops/starts the Tx queue depending on whether the = link -* status of the NIC is is down or up. This is called by the Alarm = interrupt=20 -* handler whenever a link change interrupt comes up.=20 -*/ +/** + * s2io_link - stops/starts the Tx queue. + * @sp : private member of the device structure, which is a pointer to = the + * s2io_nic structure. + * @link : inidicates whether link is UP/DOWN. + * Description: + * This function stops/starts the Tx queue depending on whether the = link + * status of the NIC is is down or up. This is called by the Alarm=20 + * interrupt handler whenever a link change interrupt comes up.=20 + * Return value: + * void. + */ + void s2io_link(nic_t * sp, int link) { struct net_device *dev =3D (struct net_device *) sp->dev; @@ -3900,8 +3949,9 @@ } else { DBG_PRINT(ERR_DBG, "%s: Link Up\n", dev->name); netif_carrier_on(dev); - if (check_for_txSpace(sp) =3D=3D TRUE) { - /* Don't wake the queue, if we know there + if (check_for_tx_space(sp) =3D=3D TRUE) { + /* + * Dont wake the queue if we know there * are no free TxDs available. */ netif_wake_queue(dev); @@ -3911,14 +3961,15 @@ sp->last_link_state =3D link; } =20 -/* -* Input Argument/s:=20 -* pdev - structure containing the PCI related information of the = device. -* Return value: -* returns the revision ID of the device. -* Description: -* Function to identify the Revision ID of xena. -*/ +/** + * get_xena_rev_id - to identify revision ID of xena.=20 + * @pdev : PCI Dev structure + * Description: + * Function to identify the Revision ID of xena. + * Return value: + * returns the revision ID of the device. + */ + int get_xena_rev_id(struct pci_dev *pdev) { u8 id =3D 0; @@ -3927,21 +3978,22 @@ return id; } =20 -/* -* Input Argument/s:=20 -* sp - private member of the device structure, which is a pointer to = the=20 -* s2io_nic structure. -* Return value: -* void -* Description: -* This function initializes a few of the PCI and PCI-X configuration = registers -* with recommended values. -*/ +/** + * s2io_init_pci -Initialization of PCI and PCI-X configuration = registers .=20 + * @sp : private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * Description: + * This function initializes a few of the PCI and PCI-X configuration = registers + * with recommended values. + * Return value: + * void + */ + static void s2io_init_pci(nic_t * sp) { u16 pci_cmd =3D 0; =20 -/* Enable Data Parity Error Recovery in PCI-X command register. */ + /* Enable Data Parity Error Recovery in PCI-X command register. */ pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, @@ -3949,13 +4001,13 @@ pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); =20 -/* Set the PErr Response bit in PCI command register. */ + /* Set the PErr Response bit in PCI command register. */ pci_read_config_word(sp->pdev, PCI_COMMAND, &pci_cmd); pci_write_config_word(sp->pdev, PCI_COMMAND, (pci_cmd | PCI_COMMAND_PARITY)); pci_read_config_word(sp->pdev, PCI_COMMAND, &pci_cmd); =20 -/* Set user specified value in Latency Timer */ + /* Set user specified value in Latency Timer */ if (latency_timer) { pci_write_config_byte(sp->pdev, PCI_LATENCY_TIMER, latency_timer); @@ -3963,14 +4015,14 @@ &latency_timer); } =20 -/* Set MMRB count to 4096 in PCI-X Command register. */ + /* Set MMRB count to 4096 in PCI-X Command register. */ pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, (sp->pcix_cmd | 0x0C)); pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); =20 -/* Setting Maximum outstanding splits to two for now. */ - sp->pcix_cmd &=3D 0xFF1F; + /* Setting Maximum outstanding splits based on system type. */ + sp->pcix_cmd &=3D 0xFF8F; =20 sp->pcix_cmd |=3D XENA_MAX_OUTSTANDING_SPLITS(XENA_TWO_SPLIT_TRANSACTION); @@ -3978,7 +4030,6 @@ sp->pcix_cmd); pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); - } =20 MODULE_AUTHOR("Raghavendra Koushik "); @@ -3991,21 +4042,20 @@ MODULE_PARM(rx_prio, "1-" __MODULE_STRING(1) "i"); MODULE_PARM(tx_prio, "1-" __MODULE_STRING(1) "i"); MODULE_PARM(latency_timer, "1-" __MODULE_STRING(1) "i"); +/** + * s2io_init_nic - Initialization of the adapter .=20 + * @pdev : structure containing the PCI related information of the = device. + * @pre: List of PCI devices supported by the driver listed in = s2io_tbl. + * Description: + * The function initializes an adapter identified by the pci_dec = structure. + * All OS related initialization including memory and device structure = and=20 + * initlaization of the device private variable is done. Also the = swapper=20 + * control register is initialized to enable read and write into the = I/O=20 + * registers of the device. + * Return value: + * returns 0 on success and negative on failure. + */ =20 -/* -* Input Argument/s:=20 -* pdev - structure containing the PCI related information of the = device. -* pre - the List of PCI devices supported by the driver listed in = s2io_tbl. -* Return value: -* returns '0' on success and negative on failure. -* Description: -* The function initializes an adapter identified by the pci_dec = structure. -* All OS related initialization including memory and device structure = and=20 -* initlaization of the device private variable is done. Also the = swapper=20 -* control register is initialized to enable read and write into the = I/O=20 -* registers of the device. -* =20 -*/ static int __devinit s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) { @@ -4031,6 +4081,7 @@ if (!pci_set_dma_mask(pdev, 0xffffffffffffffffULL)) { DBG_PRINT(INIT_DBG, "s2io_init_nic: Using 64bit DMA\n"); dma_flag =3D TRUE; + if (pci_set_consistent_dma_mask (pdev, 0xffffffffffffffffULL)) { DBG_PRINT(ERR_DBG, @@ -4080,7 +4131,8 @@ /* Initialize some PCI/PCI-X fields of the NIC. */ s2io_init_pci(sp); =20 - /* Setting the device configuration parameters. + /*=20 + * Setting the device configuration parameters. * Most of these parameters can be specified by the user during=20 * module insertion as they are module loadable parameters. If=20 * these parameters are not not specified during load time, they=20 @@ -4090,7 +4142,7 @@ config =3D &sp->config; =20 /* Tx side parameters. */ - config->TxFIFONum =3D fifo_num ? fifo_num : 1; + config->tx_fifo_num =3D fifo_num ? fifo_num : 1; =20 if (!fifo_len[0] && (fifo_num > 1)) { printk(KERN_ERR "Fifo Lens not specified for all FIFOs\n"); @@ -4109,67 +4161,56 @@ goto init_failed; } } - for (cnt =3D 0; cnt < config->TxFIFONum; cnt++) { - config->TxCfg[cnt].FifoLen =3D fifo_len[cnt]; - config->TxCfg[cnt].FifoPriority =3D cnt; + for (cnt =3D 0; cnt < config->tx_fifo_num; cnt++) { + config->tx_cfg[cnt].fifo_len =3D fifo_len[cnt]; + config->tx_cfg[cnt].fifo_priority =3D cnt; } } else { - config->TxCfg[0].FifoLen =3D DEFAULT_FIFO_LEN; - config->TxCfg[0].FifoPriority =3D 0; + config->tx_cfg[0].fifo_len =3D DEFAULT_FIFO_LEN; + config->tx_cfg[0].fifo_priority =3D 0; } =20 - config->TxIntrType =3D TXD_INT_TYPE_UTILZ; - for (i =3D 0; i < config->TxFIFONum; i++) { - if (config->TxCfg[i].FifoLen < 65) { - config->TxIntrType =3D TXD_INT_TYPE_PER_LIST; + config->tx_intr_type =3D TXD_INT_TYPE_UTILZ; + for (i =3D 0; i < config->tx_fifo_num; i++) { + config->tx_cfg[i].f_no_snoop =3D + (NO_SNOOP_TXD | NO_SNOOP_TXD_BUFFER); + if (config->tx_cfg[i].fifo_len < 65) { + config->tx_intr_type =3D TXD_INT_TYPE_PER_LIST; break; } } - - config->TxCfg[0].fNoSnoop =3D (NO_SNOOP_TXD | NO_SNOOP_TXD_BUFFER); - config->MaxTxDs =3D MAX_SKB_FRAGS; - config->TxFlow =3D TRUE; + config->max_txds =3D MAX_SKB_FRAGS; =20 /* Rx side parameters. */ - config->RxRingNum =3D ring_num ? ring_num : 1; + config->rx_ring_num =3D ring_num ? ring_num : 1; =20 if (ring_len[0]) { int cnt; - for (cnt =3D 0; cnt < config->RxRingNum; cnt++) { - config->RxCfg[cnt].NumRxd =3D ring_len[cnt]; - config->RxCfg[cnt].RingPriority =3D cnt; + for (cnt =3D 0; cnt < config->rx_ring_num; cnt++) { + config->rx_cfg[cnt].num_rxd =3D ring_len[cnt]; + config->rx_cfg[cnt].ring_priority =3D cnt; } } else { - int id; - if ((id =3D get_xena_rev_id(pdev)) =3D=3D 1) { - config->RxCfg[0].NumRxd =3D LARGE_RXD_CNT; + config->rx_cfg[0].num_rxd =3D SMALL_RXD_CNT; + config->rx_cfg[0].ring_priority =3D 0; + } =20 - } else { - config->RxCfg[0].NumRxd =3D SMALL_RXD_CNT; - } - config->RxCfg[0].RingPriority =3D 0; + for (i =3D 0; i < config->rx_ring_num; i++) { + config->rx_cfg[i].ring_org =3D RING_ORG_BUFF1; + config->rx_cfg[i].f_no_snoop =3D + (NO_SNOOP_RXD | NO_SNOOP_RXD_BUFFER); } - config->RxCfg[0].RingOrg =3D RING_ORG_BUFF1; - config->RxCfg[0].RxdThresh =3D DEFAULT_RXD_THRESHOLD; - config->RxCfg[0].fNoSnoop =3D (NO_SNOOP_RXD | NO_SNOOP_RXD_BUFFER); - config->RxCfg[0].RxD_BackOff_Interval =3D TBD; - config->RxFlow =3D TRUE; - - /* Miscellaneous parameters. */ - config->RxVLANEnable =3D TRUE; - config->MTU =3D MAX_MTU_VLAN; - config->JumboEnable =3D FALSE; =20 /* Setting Mac Control parameters */ - mac_control->txdl_len =3D MAX_SKB_FRAGS; mac_control->rmac_pause_time =3D 0; =20 + /* Initialize Ring buffer parameters. */ - for (i =3D 0; i < config->RxRingNum; i++) + for (i =3D 0; i < config->rx_ring_num; i++) atomic_set(&sp->rx_bufs_left[i], 0); =20 /* initialize the shared memory used by the NIC and the host */ - if (initSharedMem(sp)) { + if (init_shared_mem(sp)) { DBG_PRINT(ERR_DBG, "%s: Memory allocation failed\n", dev->name); goto mem_alloc_failed; @@ -4208,15 +4249,16 @@ dev->set_multicast_list =3D &s2io_set_multicast; dev->do_ioctl =3D &s2io_ioctl; dev->change_mtu =3D &s2io_change_mtu; +#ifdef SET_ETHTOOL_OPS SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); - +#endif /* * will use eth_mac_addr() for dev->set_mac_address * mac address will be set every time dev->open() is called */ #ifdef CONFIG_S2IO_NAPI dev->poll =3D s2io_poll; - dev->weight =3D 128; /* For now. */ + dev->weight =3D 90; /* For now. */ #endif =20 dev->features |=3D NETIF_F_SG | NETIF_F_IP_CSUM; @@ -4244,14 +4286,15 @@ if (s2io_set_swapper(sp)) { DBG_PRINT(ERR_DBG, "%s:swapper settings are wrong\n", dev->name); - goto set_swap_failed; + goto register_failed; } =20 /* Fix for all "FFs" MAC address problems observed on Alpha platforms = */ - FixMacAddress(sp); + fix_mac_address(sp); s2io_reset(sp); =20 - /* Setting swapper control on the NIC, so the MAC address can be read. + /* + * Setting swapper control on the NIC, so the MAC address can be read. */ if (s2io_set_swapper(sp)) { DBG_PRINT(ERR_DBG, @@ -4260,50 +4303,52 @@ goto set_swap_failed; } =20 - /* MAC address initialization. - * For now only one mac address will be read and used. + /* =20 + * MAC address initialization. + * For now only one mac address will be read and used. */ bar0 =3D (XENA_dev_config_t *) sp->bar0; val64 =3D RMAC_ADDR_CMD_MEM_RD | RMAC_ADDR_CMD_MEM_STROBE_NEW_CMD | RMAC_ADDR_CMD_MEM_OFFSET(0 + MAC_MAC_ADDR_START_OFFSET); writeq(val64, &bar0->rmac_addr_cmd_mem); - waitForCmdComplete(sp); + wait_for_cmd_complete(sp); =20 tmp64 =3D readq(&bar0->rmac_addr_data0_mem); mac_down =3D (u32) tmp64; mac_up =3D (u32) (tmp64 >> 32); =20 - memset(sp->defMacAddr[0].mac_addr, 0, sizeof(ETH_ALEN)); + memset(sp->def_mac_addr[0].mac_addr, 0, sizeof(ETH_ALEN)); =20 - sp->defMacAddr[0].mac_addr[3] =3D (u8) (mac_up); - sp->defMacAddr[0].mac_addr[2] =3D (u8) (mac_up >> 8); - sp->defMacAddr[0].mac_addr[1] =3D (u8) (mac_up >> 16); - sp->defMacAddr[0].mac_addr[0] =3D (u8) (mac_up >> 24); - sp->defMacAddr[0].mac_addr[5] =3D (u8) (mac_down >> 16); - sp->defMacAddr[0].mac_addr[4] =3D (u8) (mac_down >> 24); + sp->def_mac_addr[0].mac_addr[3] =3D (u8) (mac_up); + sp->def_mac_addr[0].mac_addr[2] =3D (u8) (mac_up >> 8); + sp->def_mac_addr[0].mac_addr[1] =3D (u8) (mac_up >> 16); + sp->def_mac_addr[0].mac_addr[0] =3D (u8) (mac_up >> 24); + sp->def_mac_addr[0].mac_addr[5] =3D (u8) (mac_down >> 16); + sp->def_mac_addr[0].mac_addr[4] =3D (u8) (mac_down >> 24); =20 DBG_PRINT(INIT_DBG, "DEFAULT MAC ADDR:0x%02x-%02x-%02x-%02x-%02x-%02x\n", - sp->defMacAddr[0].mac_addr[0], - sp->defMacAddr[0].mac_addr[1], - sp->defMacAddr[0].mac_addr[2], - sp->defMacAddr[0].mac_addr[3], - sp->defMacAddr[0].mac_addr[4], - sp->defMacAddr[0].mac_addr[5]); + sp->def_mac_addr[0].mac_addr[0], + sp->def_mac_addr[0].mac_addr[1], + sp->def_mac_addr[0].mac_addr[2], + sp->def_mac_addr[0].mac_addr[3], + sp->def_mac_addr[0].mac_addr[4], + sp->def_mac_addr[0].mac_addr[5]); =20 /* Set the factory defined MAC address initially */ dev->addr_len =3D ETH_ALEN; - memcpy(dev->dev_addr, sp->defMacAddr, ETH_ALEN); + memcpy(dev->dev_addr, sp->def_mac_addr, ETH_ALEN); =20 /* Initialize the tasklet status flag */ atomic_set(&(sp->tasklet_status), 0); =20 =20 /* Initialize spinlocks */ - spin_lock_init(&sp->isr_lock); spin_lock_init(&sp->tx_lock); + spin_lock_init(&sp->isr_lock); =20 - /* SXE-002: Configure link and activity LED to init state=20 + /*=20 + * SXE-002: Configure link and activity LED to init state=20 * on driver load.=20 */ subid =3D sp->pdev->subsystem_device; @@ -4316,15 +4361,16 @@ val64 =3D readq(&bar0->gpio_control); } =20 - /* Make Link state as off at this point, when the Link change=20 + sp->rx_csum =3D 1; /* Rx chksum verify enabled by default */ + + /*=20 + * Make Link state as off at this point, when the Link change=20 * interrupt comes the state will be automatically changed to=20 * the right state. */ netif_carrier_off(dev); sp->last_link_state =3D LINK_DOWN; =20 - sp->rx_csum =3D 1; /* Rx chksum verify enabled by default */ - return 0; =20 set_swap_failed: @@ -4335,7 +4381,7 @@ iounmap(sp->bar0); bar0_remap_failed: mem_alloc_failed: - freeSharedMem(sp); + free_shared_mem(sp); init_failed: pci_disable_device(pdev); pci_release_regions(pdev); @@ -4345,16 +4391,15 @@ return -ENODEV; } =20 -/* -* Input Argument/s:=20 -* pdev - structure containing the PCI related information of the = device. -* Return value: -* void -* Description: -* This function is called by the Pci subsystem to release a PCI device = -* and free up all resource held up by the device. This could be in = response=20 -* to a Hot plug event or when the driver is to be removed from memory. -*/ +/** + * s2io_rem_nic - Free the PCI device=20 + * @pdev: structure containing the PCI related information of the = device. + * Description: This function is called by the Pci subsystem to release = a=20 + * PCI device and free up all resource held up by the device. This = could + * be in response to a Hot plug event or when the driver is to be = removed=20 + * from memory. + */ + static void __devexit s2io_rem_nic(struct pci_dev *pdev) { struct net_device *dev =3D @@ -4365,24 +4410,36 @@ DBG_PRINT(ERR_DBG, "Driver Data is NULL!!\n"); return; } + sp =3D dev->priv; - freeSharedMem(sp); + unregister_netdev(dev); + + free_shared_mem(sp); iounmap(sp->bar0); iounmap(sp->bar1); pci_disable_device(pdev); pci_release_regions(pdev); pci_set_drvdata(pdev, NULL); =20 - unregister_netdev(dev); - free_netdev(dev); } =20 +/** + * s2io_starter - Entry point for the driver + * Description: This function is the entry point for the driver. It = verifies + * the module loadable parameters and initializes PCI configuration = space. + */ + int __init s2io_starter(void) { return pci_module_init(&s2io_driver); } =20 +/** + * s2io_closer - Cleanup routine for the driver=20 + * Description: This function is the cleanup routine for the driver. It = unregist * ers the driver. + */ + void s2io_closer(void) { pci_unregister_driver(&s2io_driver); diff -urN vanilla-linux/drivers/net/s2io.h = linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-06 11:31:09.532308264 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-06 13:03:08.087360376 -0700 @@ -16,6 +16,7 @@ #define TBD 0 #define BIT(loc) (0x8000000000000000ULL >> (loc)) #define vBIT(val, loc, sz) (((u64)val) << (64-loc-sz)) +#define INV(d) ((d&0xff)<<24) | (((d>>8)&0xff)<<16) | = (((d>>16)&0xff)<<8)| ((d>>24)&0xff) =20 #ifndef BOOL #define BOOL int @@ -49,11 +50,13 @@ #define ALIGN_SIZE 127 #define PCIX_COMMAND_REGISTER 0x62 =20 +#ifndef SET_ETHTOOL_OPS +#define SUPPORTED_10000baseT_Full (1 << 12) +#endif + /* * Debug related variables. */ -#define DEBUG_ON TRUE - /* different debug levels. */ #define ERR_DBG 0 #define INIT_DBG 1 @@ -312,7 +315,7 @@ /* Maintains Per FIFO related information. */ typedef struct tx_fifo_config { #define MAX_AVAILABLE_TXDS 8192 - u32 FifoLen; /* specifies len of FIFO upto 8192, ie no of TxDLs */ + u32 fifo_len; /* specifies len of FIFO upto 8192, ie no of TxDLs */ /* Priority definition */ #define TX_FIFO_PRI_0 0 /*Highest */ #define TX_FIFO_PRI_1 1 @@ -322,9 +325,9 @@ #define TX_FIFO_PRI_5 5 #define TX_FIFO_PRI_6 6 #define TX_FIFO_PRI_7 7 /*lowest */ - u8 FifoPriority; /* specifies pointer level for FIFO */ + u8 fifo_priority; /* specifies pointer level for FIFO */ /* user should not set twos fifos with same pri */ - u8 fNoSnoop; + u8 f_no_snoop; #define NO_SNOOP_TXD 0x01 #define NO_SNOOP_TXD_BUFFER 0x02 } tx_fifo_config_t; @@ -332,7 +335,7 @@ =20 /* Maintains per Ring related information */ typedef struct rx_ring_config { - u32 NumRxd; /*No of RxDs per Rx Ring */ + u32 num_rxd; /*No of RxDs per Rx Ring */ #define RX_RING_PRI_0 0 /* highest */ #define RX_RING_PRI_1 1 #define RX_RING_PRI_2 2 @@ -342,70 +345,37 @@ #define RX_RING_PRI_6 6 #define RX_RING_PRI_7 7 /* lowest */ =20 - u8 RingPriority; /*Specifies service priority of ring */ + u8 ring_priority; /*Specifies service priority of ring */ /* OSM should not set any two rings with same priority */ - u8 RingOrg; /*Organization of ring */ + u8 ring_org; /*Organization of ring */ #define RING_ORG_BUFF1 0x01 #define RX_RING_ORG_BUFF3 0x03 #define RX_RING_ORG_BUFF5 0x05 =20 -/* In case of 3 buffer recv. mode, size of three buffers is expected = as.. */ -#define BUFF_SZ_1 22 /* ethernet header */ -#define BUFF_SZ_2 (64+64) /* max. IP+TCP header size = */ -#define BUFF_SZ_3 (1500-20-20) /* TCP payload */ -#define BUFF_SZ_3_JUMBO (9600-20-20) /* Jumbo TCP payload = */ - - u32 RxdThresh; /*No of used Rxds NIC can store before transfer to = host */ -#define DEFAULT_RXD_THRESHOLD 0x1 /* TODO */ - u8 fNoSnoop; + u8 f_no_snoop; #define NO_SNOOP_RXD 0x01 #define NO_SNOOP_RXD_BUFFER 0x02 - u32 RxD_BackOff_Interval; -#define RXD_BACKOFF_INTERVAL_DEF 0x0 -#define RXD_BACKOFF_INTERVAL_MIN 0x0 -#define RXD_BACKOFF_INTERVAL_MAX 0x0 } rx_ring_config_t; =20 /* This structure provides contains values of the tunable parameters=20 * of the H/W=20 */ struct config_param { - /* Tx Side */ - u32 TxFIFONum; /*Number of Tx FIFOs */ + u32 tx_fifo_num; /*Number of Tx FIFOs */ #define MAX_TX_FIFOS 8 =20 - tx_fifo_config_t TxCfg[MAX_TX_FIFOS]; /*Per-Tx FIFO config */ - u32 MaxTxDs; /*Max no. of Tx buffer descriptor per TxDL */ - BOOL TxVLANEnable; /*TRUE: Insert VLAN ID, FALSE: Don't insert */ -#define TX_REQ_TIMEOUT_DEFAULT 0x0 -#define TX_REQ_TIMEOUT_MIN 0x0 -#define TX_REQ_TIMEOUT_MAX 0x0 - u32 TxReqTimeOut; - BOOL TxFlow; /*Tx flow control enable */ - BOOL RxFlow; - BOOL OverrideTxServiceState; /* TRUE: Overide, FALSE: Do not override=20 - Use the new priority information - of service state. It is not recommended - to change but OSM can opt to do so */ -#define MAX_SERVICE_STATES 36 - u8 TxServiceState[MAX_SERVICE_STATES]; - /* Array element represent 'priority'=20 - * and array index represents - * 'Service state' e.g.=20 - * TxServiceState[3]=3D7; it means=20 - * Service state 3 is associated=20 - * with priority 7 of a Tx FIFO */ - u64 TxIntrType; /* Specifies if Tx Intr is UTILZ or PER_LIST type. */ + tx_fifo_config_t tx_cfg[MAX_TX_FIFOS]; /*Per-Tx FIFO config */ + u32 max_txds; /*Max no. of Tx buffer descriptor per TxDL */ + u64 tx_intr_type; + /* Specifies if Tx Intr is UTILZ or PER_LIST type. */ =20 /* Rx Side */ - u32 RxRingNum; /*Number of receive rings */ + u32 rx_ring_num; /*Number of receive rings */ #define MAX_RX_RINGS 8 #define MAX_RX_BLOCKS_PER_RING 150 =20 - rx_ring_config_t RxCfg[MAX_RX_RINGS]; /*Per-Rx Ring config */ - BOOL RxVLANEnable; /*TRUE: Strip off VLAN tag from the frame, - FALSE: Don't strip off VLAN tag */ + rx_ring_config_t rx_cfg[MAX_RX_RINGS]; /*Per-Rx Ring config */ =20 #define HEADER_ETHERNET_II_802_3_SIZE 14 #define HEADER_802_2_SIZE 3 @@ -419,23 +389,6 @@ #define MAX_PYLD_JUMBO 9600 #define MAX_MTU_JUMBO (MAX_PYLD_JUMBO+18) #define MAX_MTU_JUMBO_VLAN (MAX_PYLD_JUMBO+22) - u32 MTU; /*Maximum Payload */ - BOOL JumboEnable; /*Enable Jumbo frames recv/send */ - BOOL OverrideRxServiceState; /* TRUE: Overide, FALSE: Do not override=20 - Use the new priority information - of service state. It is not recommended - to change but OSM can opt to do so */ -#define MAX_SERVICE_STATES 36 - u8 RxServiceState[MAX_SERVICE_STATES]; - /* Array element represent 'priority'=20 - * and array index represents=20 - * 'Service state'e.g.=20 - * RxServiceState[3]=3D7; it means=20 - * Service state 3 is associated=20 - * with priority 7 of a Rx FIFO */ - BOOL StatAutoRefresh; /* When true, StatRefreshTime have valid value = */ - u32 StatRefreshTime; /*Time for refreshing statistics */ -#define STAT_TRSF_PER_1_SECOND 0x208D5 }; =20 /* Structure representing MAC Addrs */ @@ -514,14 +467,9 @@ #define SET_NUM_TAG(val) vBIT(val,16,32) =20 #define RXD_GET_BUFFER0_SIZE(Control_2) (u64)((Control_2 & = vBIT(0xFFFF,0,16))) -/* =20 -#define TXD_GET_BUFFER1_SIZE(Control_2) (u16)((Control_2 & = MASK_BUFFER1_SIZE) >> (63-31)) =20 -#define TXD_GET_BUFFER2_SIZE(Control_2) (u16)((Control_2 & = MASK_BUFFER2_SIZE) >> (63-47)) =20 -*/ u64 Buffer0_ptr; } RxD_t; =20 - /* Structure that represents the Rx descriptor block which contains=20 * 128 Rx descriptors. */ @@ -531,11 +479,12 @@ =20 u64 reserved_0; #define END_OF_BLOCK 0xFEFFFFFFFFFFFFFFULL - u64 reserved_1; /* 0xFEFFFFFFFFFFFFFF to mark last Rxd in this blk */ - u64 reserved_2_pNext_RxD_block; /*@ Logical ptr to next */ - u64 pNext_RxD_Blk_physical; /* Buff0_ptr. - In a 32 bit arch the upper 32 bits=20 - should be 0 */ + u64 reserved_1; /* 0xFEFFFFFFFFFFFFFF to mark last=20 + * Rxd in this blk */ + u64 reserved_2_pNext_RxD_block; /* Logical ptr to next */ + u64 pNext_RxD_Blk_physical; /* Buff0_ptr.In a 32 bit arch + * the upper 32 bits should=20 + * be 0 */ } RxD_block_t; =20 /* Structure which stores all the MAC control parameters */ @@ -568,10 +517,6 @@ */ typedef struct mac_info { /* rx side stuff */ - u32 rxd_ring_mem_sz; - RxD_t *RxRing[MAX_RX_RINGS]; /* Logical Rx ring pointers */ - dma_addr_t RxRing_Phy[MAX_RX_RINGS]; - /* Put pointer info which indictes which RxD has to be replenished=20 * with a new buffer. */ @@ -583,41 +528,29 @@ rx_curr_get_info_t rx_curr_get_info[MAX_RX_RINGS]; =20 u16 rmac_pause_time; - - /* this will be used in receive function, this decides which ring = would - be processed first. eg: ring with priority value 0 (highest) should - be processed first.=20 - first 3 LSB bits represent ring number which should be processed=20 - first, similarly next 3 bits represent next ring to be processed. - eg: value of _rx_ring_pri_map =3D 0x0000 003A means=20 - ring #2 would be processed first and #7 would be processed next - */ - u32 _rx_ring_pri_map; + u16 mc_pause_threshold_q0q3; + u16 mc_pause_threshold_q4q7; =20 /* tx side stuff */ - void *txd_list_mem; /* orignal pointer to allocated mem */ + void *txd_list_mem; /* original pointer to allocated mem */ dma_addr_t txd_list_mem_phy; u32 txd_list_mem_sz; =20 /* logical pointer of start of each Tx FIFO */ TxFIFO_element_t *tx_FIFO_start[MAX_TX_FIFOS]; =20 - /* logical pointer of start of TxDL which corresponds to each Tx FIFO = */ + /* The Phy and virtual mem loactions of the Tx descriptors. */ TxD_t *txdl_start[MAX_TX_FIFOS]; - - /* Same as txdl_start but phy addr */ dma_addr_t txdl_start_phy[MAX_TX_FIFOS]; =20 /* Current offset within tx_FIFO_start, where driver would write new Tx = frame*/ tx_curr_put_info_t tx_curr_put_info[MAX_TX_FIFOS]; tx_curr_get_info_t tx_curr_get_info[MAX_TX_FIFOS]; =20 - u16 txdl_len; /* length of a TxDL, same for all */ - void *stats_mem; /* orignal pointer to allocated mem */ dma_addr_t stats_mem_phy; /* Physical address of the stat block */ u32 stats_mem_sz; - StatInfo_t *StatsInfo; /* Logical address of the stat block */ + StatInfo_t *stats_info; /* Logical address of the stat block */ } mac_info_t; =20 /* structure representing the user defined MAC addresses */ @@ -632,13 +565,20 @@ dma_addr_t block_dma_addr; } rx_block_info_t; =20 +/* Default Tunable parameters of the NIC. */ +#define DEFAULT_FIFO_LEN 4096 +#define SMALL_RXD_CNT 30 * (MAX_RXDS_PER_BLOCK+1) +#define LARGE_RXD_CNT 100 * (MAX_RXDS_PER_BLOCK+1) +#define SMALL_BLK_CNT 30 +#define LARGE_BLK_CNT 100 + /* Structure representing one instance of the NIC */ typedef struct s2io_nic { #define MAX_MAC_SUPPORTED 16 #define MAX_SUPPORTED_MULTICASTS MAX_MAC_SUPPORTED =20 - macaddr_t defMacAddr[MAX_MAC_SUPPORTED]; - macaddr_t preMacAddr[MAX_MAC_SUPPORTED]; + macaddr_t def_mac_addr[MAX_MAC_SUPPORTED]; + macaddr_t pre_mac_addr[MAX_MAC_SUPPORTED]; =20 struct net_device_stats stats; caddr_t bar0; @@ -671,8 +611,8 @@ u32 irq; atomic_t rx_bufs_left[MAX_RX_RINGS]; =20 - spinlock_t isr_lock; spinlock_t tx_lock; + spinlock_t isr_lock; =20 #define PROMISC 1 #define ALL_MULTI 2 @@ -691,20 +631,11 @@ u16 tx_err_count; u16 rx_err_count; =20 -#if DEBUG_ON - u64 rxpkt_bytes; - u64 txpkt_bytes; - int int_cnt; - int rxint_cnt; - int txint_cnt; - u64 rxpkt_cnt; -#endif - - /* Place holders for the virtual and physical addresses of=20 + /* + * Place holders for the virtual and physical addresses of=20 * all the Rx Blocks */ - struct rx_block_info - rx_blocks[MAX_RX_RINGS][MAX_RX_BLOCKS_PER_RING]; + rx_block_info_t rx_blocks[MAX_RX_RINGS][MAX_RX_BLOCKS_PER_RING]; int block_count[MAX_RX_RINGS]; int pkt_cnt[MAX_RX_RINGS]; =20 @@ -742,19 +673,14 @@ #define RESET_ERROR 1; #define CMD_ERROR 2; =20 -/* Default Tunable parameters of the NIC. */ -#define DEFAULT_FIFO_LEN 4096 -#define SMALL_RXD_CNT 40 * (MAX_RXDS_PER_BLOCK+1) -#define LARGE_RXD_CNT 100 * (MAX_RXDS_PER_BLOCK+1) - /* OS related system calls */ #ifndef readq static inline u64 readq(void *addr) { u64 ret =3D 0; ret =3D readl(addr + 4); - ret <<=3D 32; - ret |=3D readl(addr); + (u64) ret <<=3D 32; + (u64) ret |=3D readl(addr); =20 return ret; } @@ -816,30 +742,36 @@ =20 /* DMA level Inressupts */ #define TXDMA_PFC_INT_M BIT(0) - /* PFC block interrupts */ +#define TXDMA_PCC_INT_M BIT(2) + +/* PFC block interrupts */ #define PFC_MISC_ERR_1 BIT(0) /* Interrupt to indicate FIFO full = */ =20 +/* PCC block interrupts. */ +#define PCC_FB_ECC_ERR vBIT(0xff, 16, 8) /* Interrupt to indicate + PCC_FB_ECC Error. */ + /* * Prototype declaration. */ static int __devinit s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre); static void __devexit s2io_rem_nic(struct pci_dev *pdev); -static int initSharedMem(struct s2io_nic *sp); -static void freeSharedMem(struct s2io_nic *sp); -static int initNic(struct s2io_nic *nic); +static int init_shared_mem(struct s2io_nic *sp); +static void free_shared_mem(struct s2io_nic *sp); +static int init_nic(struct s2io_nic *nic); #ifndef CONFIG_S2IO_NAPI -static void rxIntrHandler(struct s2io_nic *sp); +static void rx_intr_handler(struct s2io_nic *sp); #endif -static void txIntrHandler(struct s2io_nic *sp); -static void alarmIntrHandler(struct s2io_nic *sp); +static void tx_intr_handler(struct s2io_nic *sp); +static void alarm_intr_handler(struct s2io_nic *sp); =20 static int s2io_starter(void); void s2io_closer(void); static void s2io_tx_watchdog(struct net_device *dev); static void s2io_tasklet(unsigned long dev_addr); static void s2io_set_multicast(struct net_device *dev); -static int rxOsmHandler(nic_t * sp, u16 len, RxD_t * rxdp, int = ring_no); +static int rx_osm_handler(nic_t * sp, u16 len, RxD_t * rxdp, int = ring_no); void s2io_link(nic_t * sp, int link); void s2io_reset(nic_t * sp); #ifdef CONFIG_S2IO_NAPI @@ -849,6 +781,10 @@ int s2io_set_mac_addr(struct net_device *dev, u8 * addr); static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs = *regs); static int verify_xena_quiescence(u64 val64, int flag); +int verify_load_parm(void); +#ifdef SET_ETHTOOL_OPS static struct ethtool_ops netdev_ethtool_ops; +#endif +static void s2io_set_link(unsigned long data); =20 #endif /* _S2IO_H */ diff -urN vanilla-linux/drivers/net/s2io-regs.h = linux-2.6.8.1/drivers/net/s2io-regs.h --- vanilla-linux/drivers/net/s2io-regs.h 2004-10-06 11:31:09.539307200 = -0700 +++ linux-2.6.8.1/drivers/net/s2io-regs.h 2004-10-06 13:03:08.087360376 = -0700 @@ -289,6 +289,8 @@ u64 tda_err_alarm; =20 u64 pcc_err_reg; +#define PCC_FB_ECC_DB_ERR vBIT(0xFF, 16, 8) + u64 pcc_err_mask; u64 pcc_err_alarm; =20 @@ -512,6 +514,7 @@ #define RX_PA_CFG_IGNORE_FRM_ERR BIT(1) #define RX_PA_CFG_IGNORE_SNAP_OUI BIT(2) #define RX_PA_CFG_IGNORE_LLC_CTRL BIT(3) +#define RX_PA_CFG_IGNORE_L2_ERR BIT(6) =20 u8 unused12[0x700 - 0x1D8]; =20 ------=_NextPart_000_0038_01C4ABA6.66D0B050-- From garzik@havoc.gtf.org Wed Oct 6 13:10:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 13:10:16 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [69.28.190.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96KA4Jj008631 for ; Wed, 6 Oct 2004 13:10:05 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id 14FB277AD; Wed, 6 Oct 2004 16:09:31 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i96K9Vqi019470; Wed, 6 Oct 2004 16:09:31 -0400 Date: Wed, 6 Oct 2004 16:09:30 -0400 From: Jeff Garzik To: Ravinandan Arakali Cc: netdev@oss.sgi.com, leonid.grossman@s2io.com, raghavendra.koushik@s2io.com, rapuru.sriram@s2io.com Subject: Re: Patch submission for S2io Xframe driver to 2.6 kernel Message-ID: <20041006200930.GA19395@havoc.gtf.org> References: <41597DA4.5040200@pobox.com> <003701c4abe1$132f8850$9810100a@S2IOtech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <003701c4abe1$132f8850$9810100a@S2IOtech.com> User-Agent: Mutt/1.4.1i X-archive-position: 9987 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: 578 Lines: 23 On Wed, Oct 06, 2004 at 01:14:24PM -0700, Ravinandan Arakali wrote: > Please let us know if you want us to send the subsequent > patches one-after-another right now, or do you want us > to send them only after you have completed review and accepted > this first patch. Please send all patches at once, as described in the URLs I mentioned previously. Example: [PATCH 2.6.9-rc3 1/8] whitespace changes [PATCH 2.6.9-rc3 2/8] fix 32bit issue [PATCH 2.6.9-rc3 3/8] add a feature [PATCH 2.6.9-rc3 4/8] etc... and I will review and apply in the order that you specify. Jeff From romieu@fr.zoreil.com Wed Oct 6 13:21:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 13:21:08 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96KL1VN009101 for ; Wed, 6 Oct 2004 13:21:02 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i96KK2vr028999; Wed, 6 Oct 2004 22:20:02 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i96KK15o028997; Wed, 6 Oct 2004 22:20:01 +0200 Date: Wed, 6 Oct 2004 22:20:01 +0200 From: Francois Romieu To: Jeff Garzik Cc: Ravinandan Arakali , netdev@oss.sgi.com, leonid.grossman@s2io.com, raghavendra.koushik@s2io.com, rapuru.sriram@s2io.com Subject: Re: Patch submission for S2io Xframe driver to 2.6 kernel Message-ID: <20041006202001.GA27663@electric-eye.fr.zoreil.com> References: <41597DA4.5040200@pobox.com> <003701c4abe1$132f8850$9810100a@S2IOtech.com> <20041006200930.GA19395@havoc.gtf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041006200930.GA19395@havoc.gtf.org> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 9988 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 Content-Length: 385 Lines: 16 Jeff Garzik : [...] > [PATCH 2.6.9-rc3 1/8] whitespace changes > [PATCH 2.6.9-rc3 2/8] fix 32bit issue > [PATCH 2.6.9-rc3 3/8] add a feature > [PATCH 2.6.9-rc3 4/8] etc... [PATCH 2.6.9-rc3 1/8] S2io: whitespace changes [PATCH 2.6.9-rc3 2/8] S2io: fix 32bit issue [PATCH 2.6.9-rc3 3/8] S2io: add a feature [PATCH 2.6.9-rc3 4/8] S2io: etc... -- Ueimor From greearb@candelatech.com Wed Oct 6 14:37:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 14:37:33 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96LbQwM010640 for ; Wed, 6 Oct 2004 14:37:26 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i96LgALH002753; Wed, 6 Oct 2004 14:42:11 -0700 Message-ID: <41646587.7070401@candelatech.com> Date: Wed, 06 Oct 2004 14:37:11 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Robert Olsson CC: "'netdev@oss.sgi.com'" Subject: Re: 2.6.7 tulip performance (with NAPI) References: <41633174.7070805@candelatech.com> <16740.17875.574967.11417@robur.slu.se> In-Reply-To: <16740.17875.574967.11417@robur.slu.se> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 9989 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Content-Length: 996 Lines: 27 Robert Olsson wrote: > Ben Greear writes: > > > I tried setting the NICE level of pktgen to -10 and softirq to -18. I > > still see way more packets transmitted than received. > > If you have "max_before_softirq" in your version pktgen you can try it > to balance your load. HZ=1000 in 2.6 can make scheduling different. Yes, I was able to get it to smooth out by doing something like that. I also got better desktop performance by simply decreasing the niceness of the pktgen thread to 0 instead of -10. On a related note, I am now working on a way to use a hook in the netif_wake_queue callback to wake up pktgen. This should allow me to have a pktgen that does not need to spin in a tight loop like it does now. So far, I was able to saturate two GigE ports using about 3% of the CPU (as reported by top), using 1514 byte pkts. Still tweaking to fix some corner cases... Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From oxymoron@waste.org Wed Oct 6 14:43:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 14:44:04 -0700 (PDT) Received: from waste.org (waste.org [209.173.204.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96LhvTa011026 for ; Wed, 6 Oct 2004 14:43:57 -0700 Received: from waste.org (localhost [127.0.0.1]) by waste.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id i96LhMWk015002; Wed, 6 Oct 2004 16:43:22 -0500 Received: (from oxymoron@localhost) by waste.org (8.12.3/8.12.3/Debian-7.1) id i96LhMvc014997; Wed, 6 Oct 2004 16:43:22 -0500 Date: Wed, 6 Oct 2004 16:43:22 -0500 From: Matt Mackall To: Colin Leroy Cc: Andrew Morton , netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041006214322.GG31237@waste.org> References: <20041006232544.53615761@jack.colino.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041006232544.53615761@jack.colino.net> User-Agent: Mutt/1.3.28i X-Virus-Scanned: by amavisd-new X-archive-position: 9990 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mpm@selenic.com Precedence: bulk X-list: netdev Content-Length: 702 Lines: 23 On Wed, Oct 06, 2004 at 11:25:44PM +0200, Colin Leroy wrote: > Hi, > > this patch fixes a (quite big) problem with netpoll: when link is down, > it hangs. > > This patch fixes it. Tested with no carrier (no more hang) and with > carrier (same behaviour as before). [cc:ed to netdev] Well this doesn't look unreasonable, but I haven't run into it with the NICs I've tested. Nor have I seen this reported before. Which NICs is this with? > - if(!np || !np->dev || !netif_running(np->dev)) { > + if(!np || !np->dev || !netif_running(np->dev) || > + !netif_carrier_ok(np->dev)) { I wonder if netif_running is redundant if netif_carrier_ok. -- Mathematics is the supreme nostalgia of our time. From acme@conectiva.com.br Wed Oct 6 14:56:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 14:56:43 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96LuaLx011663 for ; Wed, 6 Oct 2004 14:56:38 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 62AC9473B6; Wed, 6 Oct 2004 18:56:22 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 1FF2A47360 for ; Wed, 6 Oct 2004 18:56:22 -0300 (BRT) Received: (qmail 8355 invoked by uid 0); 6 Oct 2004 22:53:25 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 6 Oct 2004 22:53:25 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id 72A2E14639; Wed, 6 Oct 2004 18:59:36 -0300 (BRT) Message-ID: <41646A88.4050609@conectiva.com.br> Date: Wed, 06 Oct 2004 18:58:32 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: PATCH: [LLC] set mac.raw if tr_source_route is called X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------040304090308000805060400" X-Bogosity: No, tests=bogofilter, spamicity=0.022139, version=0.16.3 X-archive-position: 9991 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 Content-Length: 1278 Lines: 51 This is a multi-part message in MIME format. --------------040304090308000805060400 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi David, Here is the fix for the problem Thomas pointed out, its at the usual place: bk://kernel.bkbits.net/acme/sk_buff-2.6 - Arnaldo --------------040304090308000805060400 Content-Type: text/plain; name="tr_hdr-fix.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="tr_hdr-fix.patch" =================================================================== ChangeSet@1.2057, 2004-10-06 18:51:11-03:00, acme@conectiva.com.br [LLC] set mac.raw if tr_source_route is called Thanks to Thomas Graf for spotting this. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller llc_output.c | 1 + 1 files changed, 1 insertion(+) diff -Nru a/net/llc/llc_output.c b/net/llc/llc_output.c --- a/net/llc/llc_output.c 2004-10-06 18:56:17 -03:00 +++ b/net/llc/llc_output.c 2004-10-06 18:56:17 -03:00 @@ -51,6 +51,7 @@ if (da) { memcpy(trh->daddr, da, dev->addr_len); tr_source_route(skb, trh, dev); + skb->mac.raw = skb->data; } break; } --------------040304090308000805060400-- From fr.casadei@tiscali.it Wed Oct 6 14:57:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 14:57:17 -0700 (PDT) Received: from mail-relay-4.tiscali.it (mail-relay-4.tiscali.it [213.205.33.44]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96LvCSi011801 for ; Wed, 6 Oct 2004 14:57:13 -0700 Received: from [192.168.1.30] (82.84.234.196) by mail-relay-4.tiscali.it (7.1.021.3) id 415D98E2001155A3 for netdev@oss.sgi.com; Wed, 6 Oct 2004 23:56:54 +0200 Message-ID: <41646A15.2010906@tiscali.it> Date: Wed, 06 Oct 2004 23:56:37 +0200 From: Francesco Casadei User-Agent: Mozilla Thunderbird 0.8 (X11/20040927) X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com Subject: Destroying a socket without sending FIN X-Enigmail-Version: 0.86.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 9992 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: fr.casadei@tiscali.it Precedence: bulk X-list: netdev Content-Length: 448 Lines: 12 Hi all, sorry to bother you, but I need to know how to destroy a sock structure from modular code without having the kernel sending FIN, i.e. a kernel space implementation of a close() that simply don't talk to the other end about what's going on. Is there a way to achieve this? I know it may seems a little bit strange, but I need this as part of a research project. Please, don't be too rude with me! :-) Best regards, Francesco Casadei From tadavis@lbl.gov Wed Oct 6 15:00:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 15:00:22 -0700 (PDT) Received: from mx1.nersc.gov (mx1.nersc.gov [128.55.6.21]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96M0Hm1012331 for ; Wed, 6 Oct 2004 15:00:18 -0700 Received: by mx1.nersc.gov (Postfix, from userid 4002) id F12D21F39B; Wed, 6 Oct 2004 15:00:04 -0700 (PDT) Received: from mx1.nersc.gov (localhost [127.0.0.1]) by localhost.nersc.gov (Postfix) with ESMTP id B8C861F3A9; Wed, 6 Oct 2004 14:59:59 -0700 (PDT) Received: from lanshark.nersc.gov (lanshark.nersc.gov [128.55.16.114]) by mx1.nersc.gov (Postfix) with ESMTP id 97C0A1F39B; Wed, 6 Oct 2004 14:59:58 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) by lanshark.nersc.gov (8.12.10/8.12.10) with ESMTP id i96LxnPq013565; Wed, 6 Oct 2004 14:59:50 -0700 Message-ID: <41646AD5.1070800@lbl.gov> Date: Wed, 06 Oct 2004 14:59:49 -0700 From: Thomas Davis User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jeff Garzik Cc: Linus Torvalds , Arnaldo Carvalho de Melo , Corey Thomas , netdev@oss.sgi.com, Kernel Mailing List Subject: Re: Raylink/WebGear testing - ray_cs.c iomem bug? References: <41644492.1000400@pobox.com> In-Reply-To: <41644492.1000400@pobox.com> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 9993 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tadavis@lbl.gov Precedence: bulk X-list: netdev Content-Length: 192 Lines: 8 Jeff Garzik wrote: > I'm not aware of anyone with ray_cs hardware, alas... > I do believe I still have two of these squirreled away someplace.. Let me check and see later tonight. thomas From jgarzik@pobox.com Wed Oct 6 15:53:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 15:53:17 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i96MrBqr013383 for ; Wed, 6 Oct 2004 15:53:12 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CFKeY-0001ic-0A; Wed, 06 Oct 2004 23:52:58 +0100 Message-ID: <4164773A.1090907@pobox.com> Date: Wed, 06 Oct 2004 18:52:42 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Francois Romieu CC: Ravinandan Arakali , netdev@oss.sgi.com, leonid.grossman@s2io.com, raghavendra.koushik@s2io.com, rapuru.sriram@s2io.com Subject: Re: Patch submission for S2io Xframe driver to 2.6 kernel References: <41597DA4.5040200@pobox.com> <003701c4abe1$132f8850$9810100a@S2IOtech.com> <20041006200930.GA19395@havoc.gtf.org> <20041006202001.GA27663@electric-eye.fr.zoreil.com> In-Reply-To: <20041006202001.GA27663@electric-eye.fr.zoreil.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 9994 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: 466 Lines: 23 Francois Romieu wrote: > Jeff Garzik : > [...] > >>[PATCH 2.6.9-rc3 1/8] whitespace changes >>[PATCH 2.6.9-rc3 2/8] fix 32bit issue >>[PATCH 2.6.9-rc3 3/8] add a feature >>[PATCH 2.6.9-rc3 4/8] etc... > > > > [PATCH 2.6.9-rc3 1/8] S2io: whitespace changes > [PATCH 2.6.9-rc3 2/8] S2io: fix 32bit issue > [PATCH 2.6.9-rc3 3/8] S2io: add a feature > [PATCH 2.6.9-rc3 4/8] S2io: etc... > Yes, thanks for the correction :) Jeff From greearb@candelatech.com Wed Oct 6 17:56:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 17:56:38 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i970uOXm021350 for ; Wed, 6 Oct 2004 17:56:24 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i97115LH005314; Wed, 6 Oct 2004 18:01:05 -0700 Message-ID: <41649425.1010102@candelatech.com> Date: Wed, 06 Oct 2004 17:56:05 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Robert Olsson CC: "'netdev@oss.sgi.com'" Subject: Re: 2.6.7 tulip performance (with NAPI) References: <41633174.7070805@candelatech.com> <16740.17875.574967.11417@robur.slu.se> <41646587.7070401@candelatech.com> In-Reply-To: <41646587.7070401@candelatech.com> Content-Type: multipart/mixed; boundary="------------020306080600040204070804" X-archive-position: 9995 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Content-Length: 118085 Lines: 3666 This is a multi-part message in MIME format. --------------020306080600040204070804 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Ben Greear wrote: > On a related note, I am now working on a way to use a hook in the > netif_wake_queue callback to wake up pktgen. This should allow me to > have a pktgen that does not need to spin in a tight loop like it does > now. So far, I was able to saturate two GigE ports using about 3% of > the CPU (as reported by top), using 1514 byte pkts. Still tweaking > to fix some corner cases... I think this is mostly working now. The patch to netdevice.h looks like this:: --- linux-2.6.7/include/linux/netdevice.h 2004-06-15 22:20:04.000000000 -0700 +++ linux-2.6.7.p4s/include/linux/netdevice.h 2004-10-06 14:31:54.000000000 -0700 @@ -466,9 +474,17 @@ void (*poll_controller)(struct net_device *dev); #endif + /* Callback for when the queue is woken, used by pktgen currently */ + int (*notify_queue_woken)(struct net_device *dev); + void* nqw_data; /* To be used by the method above as needed */ + /* bridge stuff */ struct net_bridge_port *br_port; +#if defined(CONFIG_MACVLAN) || defined(CONFIG_MACVLAN_MODULE) + struct macvlan_port *macvlan_priv; +#endif + #ifdef CONFIG_NET_FASTROUTE #define NETDEV_FASTROUTE_HMASK 0xF /* Semi-private data. Keep it at the end of device struct. */ @@ -619,8 +635,13 @@ if (netpoll_trap()) return; #endif - if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state)) + if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state)) { __netif_schedule(dev); + + if (dev->notify_queue_woken) { + dev->notify_queue_woken(dev); + } + } } I'm attaching my version of pktgen since the diff is bigger than the actual file. With this, I can send right at 600kpps to myself (60 byte + CRC pkts), and only use about 35% cpu as reported by top. I also tried maxing out 6 ports and I hit what I believe is the PCI-X limit on my machine with an aggregate throughput of about 1.3Gbps tx + 1.3Gbps rx. CPU load is about 21% in this case. It may be that other programs would like to use the notify_queue_woken hook, so if this were ever to hit the kernel proper, might want to make this a linked list of callbacks instead of a simple pointer. Enjoy, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com --------------020306080600040204070804 Content-Type: text/plain; name="pktgen.c" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="pktgen.c" /* -*-linux-c-*- * * Copyright 2001, 2002 by Robert Olsson * Uppsala University, Sweden * 2002 Ben Greear * * A tool for loading the network with preconfigurated packets. * The tool is implemented as a linux module. Parameters are output * device, IPG (interpacket gap), number of packets, and whether * to use multiple SKBs or just the same one. * pktgen uses the installed interface's output routine. * * Additional hacking by: * * Jens.Laas@data.slu.se * Improved by ANK. 010120. * Improved by ANK even more. 010212. * MAC address typo fixed. 010417 --ro * Integrated. 020301 --DaveM * Added multiskb option 020301 --DaveM * Scaling of results. 020417--sigurdur@linpro.no * Significant re-work of the module: * * Convert to threaded model to more efficiently be able to transmit * and receive on multiple interfaces at once. * * Converted many counters to __u64 to allow longer runs. * * Allow configuration of ranges, like min/max IP address, MACs, * and UDP-ports, for both source and destination, and can * set to use a random distribution or sequentially walk the range. * * Can now change most values after starting. * * Place 12-byte packet in UDP payload with magic number, * sequence number, and timestamp. * * Add receiver code that detects dropped pkts, re-ordered pkts, and * latencies (with micro-second) precision. * * Add IOCTL interface to easily get counters & configuration. * --Ben Greear * Fix refcount off by one if first packet fails, potential null deref, * memleak 030710- KJP * * * Added the IPMAC option to allow the MAC addresses to mirror IP addresses. * -- (dhetheri) Dave Hetherington 03/09/29 * * Allow the user to change the protocol field via 'pgset "prot 0"' command * -- (dhetheri) Dave Hetherington 03/10/7 * Integrated to 2.5.x 021029 --Lucio Maciel (luciomaciel@zipmail.com.br) * * * Renamed multiskb to clone_skb and cleaned up sending core for two distinct * skb modes. A clone_skb=0 mode for Ben "ranges" work and a clone_skb != 0 * as a "fastpath" with a configurable number of clones after alloc's. * clone_skb=0 means all packets are allocated this also means ranges time * stamps etc can be used. clone_skb=100 means 1 malloc is followed by 100 * clones. * * Also moved to /proc/net/pktgen/ * --ro * * Fix refcount off by one if first packet fails, potential null deref, * memleak 030710- KJP * * * Sept 10: Fixed threading/locking. Lots of bone-headed and more clever * mistakes. Also merged in DaveM's patch in the -pre6 patch. * * See Documentation/networking/pktgen.txt for how to use this. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* for lock kernel */ #include /* do_div */ #include "pktgen.h" #define VERSION "pktgen version 1.9.2 (nospin)" static char version[] __initdata = "pktgen.c: v1.9.2 (nospin): Packet Generator for packet performance testing.\n"; /* Used to help with determining the pkts on receive */ #define PKTGEN_MAGIC 0xbe9be955 /* #define PG_DEBUG(a) a */ #define PG_DEBUG(a) /* a */ /* cycles per micro-second */ static u32 pg_cycles_per_ns; static u32 pg_cycles_per_us; static u32 pg_cycles_per_ms; /* Module parameters, defaults. */ static int pg_count_d = 0; /* run forever by default */ static int pg_ipg_d = 0; static int pg_multiskb_d = 0; static int pg_thread_count = 1; /* Initial threads to create */ static int debug = 0; /* List of all running threads */ static struct pktgen_thread_info* pktgen_threads = NULL; spinlock_t _pg_threadlist_lock = SPIN_LOCK_UNLOCKED; /* Holds interfaces for all threads */ #define PG_INFO_HASH_MAX 32 static struct pktgen_interface_info* pg_info_hash[PG_INFO_HASH_MAX]; spinlock_t _pg_hash_lock = SPIN_LOCK_UNLOCKED; #define PG_PROC_DIR "pktgen" static struct proc_dir_entry *pg_proc_dir = NULL; char module_fname[128]; struct proc_dir_entry *module_proc_ent = NULL; static void init_pktgen_kthread(struct pktgen_thread_info *kthread, char *name); static int pg_rem_interface_info(struct pktgen_thread_info* pg_thread, struct pktgen_interface_info* i); static int pg_add_interface_info(struct pktgen_thread_info* pg_thread, const char* ifname); static void exit_pktgen_kthread(struct pktgen_thread_info *kthread); static void stop_pktgen_kthread(struct pktgen_thread_info *kthread); static struct pktgen_thread_info* pg_find_thread(const char* name); static int pg_add_thread_info(const char* name); static struct pktgen_interface_info* pg_find_interface(struct pktgen_thread_info* pg_thread, const char* ifname); static int pktgen_device_event(struct notifier_block *, unsigned long, void *); struct notifier_block pktgen_notifier_block = { notifier_call: pktgen_device_event, }; /* This code works around the fact that do_div cannot handle two 64-bit numbers, and regular 64-bit division doesn't work on x86 kernels. --Ben */ #define PG_DIV 0 #define PG_REM 1 /* This was emailed to LMKL by: Chris Caputo * Function copied/adapted/optimized from: * * nemesis.sourceforge.net/browse/lib/static/intmath/ix86/intmath.c.html * * Copyright 1994, University of Cambridge Computer Laboratory * All Rights Reserved. * * TODO: When running on a 64-bit CPU platform, this should no longer be * TODO: necessary. */ inline static s64 divremdi3(s64 x, s64 y, int type) { u64 a = (x < 0) ? -x : x; u64 b = (y < 0) ? -y : y; u64 res = 0, d = 1; if (b > 0) { while (b < a) { b <<= 1; d <<= 1; } } do { if ( a >= b ) { a -= b; res += d; } b >>= 1; d >>= 1; } while (d); if (PG_DIV == type) { return (((x ^ y) & (1ll<<63)) == 0) ? res : -(s64)res; } else { return ((x & (1ll<<63)) == 0) ? a : -(s64)a; } }/* divremdi3 */ /* End of hacks to deal with 64-bit math on x86 */ inline static void pg_lock_thread_list(const char* msg) { if (debug > 1) { printk("before pg_lock_thread_list, msg: %s\n", msg); } spin_lock(&_pg_threadlist_lock); if (debug > 1) { printk("after pg_lock_thread_list, msg: %s\n", msg); } } inline static void pg_unlock_thread_list(const char* msg) { if (debug > 1) { printk("before pg_unlock_thread_list, msg: %s\n", msg); } spin_unlock(&_pg_threadlist_lock); if (debug > 1) { printk("after pg_unlock_thread_list, msg: %s\n", msg); } } inline static void pg_lock_hash(const char* msg) { if (debug > 1) { printk("before pg_lock_hash, msg: %s\n", msg); } spin_lock(&_pg_hash_lock); if (debug > 1) { printk("before pg_lock_hash, msg: %s\n", msg); } } inline static void pg_unlock_hash(const char* msg) { if (debug > 1) { printk("before pg_unlock_hash, msg: %s\n", msg); } spin_unlock(&_pg_hash_lock); if (debug > 1) { printk("after pg_unlock_hash, msg: %s\n", msg); } } inline static void pg_lock(struct pktgen_thread_info* pg_thread, const char* msg) { if (debug > 1) { printk("before pg_lock thread, msg: %s\n", msg); } spin_lock(&(pg_thread->pg_threadlock)); if (debug > 1) { printk("after pg_lock thread, msg: %s\n", msg); } } inline static void pg_unlock(struct pktgen_thread_info* pg_thread, const char* msg) { if (debug > 1) { printk("before pg_unlock thread, thread: %p msg: %s\n", pg_thread, msg); } spin_unlock(&(pg_thread->pg_threadlock)); if (debug > 1) { printk("after pg_unlock thread, thread: %p msg: %s\n", pg_thread, msg); } } /** Convert to miliseconds */ static inline __u64 tv_to_ms(const struct timeval* tv) { __u64 ms = tv->tv_usec / 1000; ms += (__u64)tv->tv_sec * (__u64)1000; return ms; } /** Convert to micro-seconds */ static inline __u64 tv_to_us(const struct timeval* tv) { __u64 us = tv->tv_usec; us += (__u64)tv->tv_sec * (__u64)1000000; return us; } static inline __u64 pg_div(__u64 n, __u32 base) { __u64 tmp = n; do_div(tmp, base); /* printk("pg_div, n: %llu base: %d rv: %llu\n", n, base, tmp); */ return tmp; } /* Fast, not horribly accurate, since the machine started. */ static inline __u64 getRelativeCurMs(void) { return pg_div(get_cycles(), pg_cycles_per_ms); } /* Since the epoc. More precise over long periods of time than * getRelativeCurMs */ static inline __u64 getCurMs(void) { struct timeval tv; do_gettimeofday(&tv); return tv_to_ms(&tv); } /* Since the epoc. More precise over long periods of time than * getRelativeCurMs */ static inline __u64 getCurUs(void) { struct timeval tv; do_gettimeofday(&tv); return tv_to_us(&tv); } /* Since the machine booted. */ static inline __u64 getRelativeCurUs(void) { return pg_div(get_cycles(), pg_cycles_per_us); } /* Since the machine booted. */ static inline __u64 getRelativeCurNs(void) { return pg_div(get_cycles(), pg_cycles_per_ns); } static inline __u64 tv_diff(const struct timeval* a, const struct timeval* b) { return tv_to_us(a) - tv_to_us(b); } int pktgen_proc_ioctl(struct inode* inode, struct file* file, unsigned int cmd, unsigned long arg) { int err = 0; struct pktgen_ioctl_info args; struct pktgen_thread_info* targ = NULL; /* if (!capable(CAP_NET_ADMIN)){ return -EPERM; } */ if (copy_from_user(&args, (void*)arg, sizeof(args))) { return -EFAULT; } /* Null terminate the names */ args.thread_name[31] = 0; args.interface_name[31] = 0; /* printk("pktgen: thread_name: %s interface_name: %s\n", * args.thread_name, args.interface_name); */ switch (cmd) { case GET_PKTGEN_INTERFACE_INFO: { targ = pg_find_thread(args.thread_name); if (targ) { struct pktgen_interface_info* info; info = pg_find_interface(targ, args.interface_name); if (info) { memcpy(&(args.info), info, sizeof(args.info)); if (copy_to_user((void*)(arg), &args, sizeof(args))) { printk("ERROR: pktgen: copy_to_user failed.\n"); err = -EFAULT; } else { err = 0; } } else { /* printk("ERROR: pktgen: Could not find interface -:%s:-\n", args.interface_name);*/ err = -ENODEV; } } else { printk("ERROR: pktgen: Could not find thread -:%s:-.\n", args.thread_name); err = -ENODEV; } break; } default: /* pass on to underlying device instead?? */ printk("%s: Unknown pktgen IOCTL: %x \n", __FUNCTION__, cmd); return -EINVAL; } return err; }/* pktgen_proc_ioctl */ static struct file_operations pktgen_fops = { ioctl: pktgen_proc_ioctl, }; static void remove_pg_info_from_hash(struct pktgen_interface_info* info) { pg_lock_hash(__FUNCTION__); { int device_idx = info->odev ? info->odev->ifindex : 0; int b = device_idx % PG_INFO_HASH_MAX; struct pktgen_interface_info* p = pg_info_hash[b]; struct pktgen_interface_info* prev = pg_info_hash[b]; PG_DEBUG(printk("remove_pg_info_from_hash, p: %p info: %p device_idx: %i\n", p, info, device_idx)); if (p != NULL) { if (p == info) { pg_info_hash[b] = p->next_hash; p->next_hash = NULL; } else { while (prev->next_hash) { p = prev->next_hash; if (p == info) { prev->next_hash = p->next_hash; p->next_hash = NULL; break; } prev = p; } } } if (info->odev) { info->odev->priv_flags &= ~(IFF_PKTGEN_RCV); info->odev->notify_queue_woken = NULL; info->odev->nqw_data = NULL; } } pg_unlock_hash(__FUNCTION__); }/* remove_pg_info_from_hash */ int pg_notify_queue_woken(struct net_device* dev) { struct pktgen_interface_info* info = dev->nqw_data; if (info && info->pg_thread->sleeping) { if (getRelativeCurNs() > (info->next_tx_ns - 1000)) { /* See if we should wake up the thread, wake * slightly early (1000 ns) */ info->pg_thread->sleeping = 0; wake_up_interruptible(&(info->pg_thread->queue)); } } return 0; } static void add_pg_info_to_hash(struct pktgen_interface_info* info) { /* First remove it, just in case it's already there. */ remove_pg_info_from_hash(info); pg_lock_hash(__FUNCTION__); { int device_idx = info->odev ? info->odev->ifindex : 0; int b = device_idx % PG_INFO_HASH_MAX; PG_DEBUG(printk("add_pg_info_from_hash, b: %i info: %p device_idx: %i\n", b, info, device_idx)); info->next_hash = pg_info_hash[b]; pg_info_hash[b] = info; if (info->odev) { info->odev->nqw_data = info; info->odev->notify_queue_woken = pg_notify_queue_woken; info->odev->priv_flags |= (IFF_PKTGEN_RCV); } } pg_unlock_hash(__FUNCTION__); }/* add_pg_info_to_hash */ /* Find the pktgen_interface_info for a device idx */ struct pktgen_interface_info* find_pg_info(int device_idx) { struct pktgen_interface_info* p = NULL; if (debug > 1) { printk("in find_pg_info...\n"); } pg_lock_hash(__FUNCTION__); { int b = device_idx % PG_INFO_HASH_MAX; p = pg_info_hash[b]; while (p) { if (p->odev && (p->odev->ifindex == device_idx)) { break; } p = p->next_hash; } } pg_unlock_hash(__FUNCTION__); return p; } /* Remove an interface from our hash, dissassociate pktgen_interface_info * from interface */ static void check_remove_device(struct pktgen_interface_info* info) { struct pktgen_interface_info* pi = NULL; if (info->odev) { pi = find_pg_info(info->odev->ifindex); if (pi != info) { printk("ERROR: pi != info, pi: %p info: %p\n", pi, info); } else { /* Remove info from our hash */ remove_pg_info_from_hash(info); } rtnl_lock(); info->odev->priv_flags &= ~(IFF_PKTGEN_RCV); atomic_dec(&(info->odev->refcnt)); info->odev = NULL; rtnl_unlock(); } }/* check_remove_device */ static int pg_remove_interface_from_all_threads(const char* dev_name) { int cnt = 0; pg_lock_thread_list(__FUNCTION__); { struct pktgen_thread_info* tmp = pktgen_threads; struct pktgen_interface_info* info = NULL; while (tmp) { info = pg_find_interface(tmp, dev_name); if (info) { printk("pktgen: Removing interface: %s from pktgen control.\n", dev_name); pg_rem_interface_info(tmp, info); cnt++; } else { /* printk("pktgen: Could not find interface: %s in rem_from_all.\n", dev_name); */ } tmp = tmp->next; } } pg_unlock_thread_list(__FUNCTION__); return cnt; }/* pg_rem_interface_from_all_threads */ static int pktgen_device_event(struct notifier_block *unused, unsigned long event, void *ptr) { struct net_device *dev = (struct net_device *)(ptr); /* It is OK that we do not hold the group lock right now, * as we run under the RTNL lock. */ switch (event) { case NETDEV_CHANGEADDR: case NETDEV_GOING_DOWN: case NETDEV_DOWN: case NETDEV_UP: /* Ignore for now */ break; case NETDEV_UNREGISTER: pg_remove_interface_from_all_threads(dev->name); break; }; return NOTIFY_DONE; } /* Associate pktgen_interface_info with a device. */ static struct net_device* pg_setup_interface(struct pktgen_interface_info* info) { struct net_device *odev; int keep_it = 0; check_remove_device(info); odev = dev_get_by_name(info->ifname); if (!odev) { printk("No such netdevice: \"%s\"\n", info->ifname); } else if (odev->type != ARPHRD_ETHER) { printk("Not an ethernet device: \"%s\"\n", info->ifname); } else if (!netif_running(odev)) { printk("Device is down: \"%s\"\n", info->ifname); } else if (odev->priv_flags & IFF_PKTGEN_RCV) { printk("ERROR: Device: \"%s\" is already assigned to a pktgen interface.\n", info->ifname); } else { info->odev = odev; info->odev->priv_flags |= (IFF_PKTGEN_RCV); keep_it = 1; } if (info->odev) { add_pg_info_to_hash(info); } if ((!keep_it) && odev) { dev_put(odev); } return info->odev; } /* Read info from the interface and set up internal pktgen_interface_info * structure to have the right information to create/send packets */ static void pg_setup_inject(struct pktgen_interface_info* info) { if (!info->odev) { /* Try once more, just in case it works now. */ pg_setup_interface(info); } if (!info->odev) { printk("ERROR: info->odev == NULL in setup_inject.\n"); sprintf(info->result, "ERROR: info->odev == NULL in setup_inject.\n"); return; } /* Default to the interface's mac if not explicitly set. */ if (!(info->flags & F_SET_SRCMAC)) { memcpy(&(info->hh[6]), info->odev->dev_addr, 6); } else { memcpy(&(info->hh[6]), info->src_mac, 6); } /* Set up Dest MAC */ memcpy(&(info->hh[0]), info->dst_mac, 6); /* Set up pkt size */ info->cur_pkt_size = info->min_pkt_size; info->saddr_min = 0; info->saddr_max = 0; if (strlen(info->src_min) == 0) { if (info->odev->ip_ptr) { struct in_device *in_dev = info->odev->ip_ptr; if (in_dev->ifa_list) { info->saddr_min = in_dev->ifa_list->ifa_address; info->saddr_max = info->saddr_min; } } } else { info->saddr_min = in_aton(info->src_min); info->saddr_max = in_aton(info->src_max); } info->daddr_min = in_aton(info->dst_min); info->daddr_max = in_aton(info->dst_max); /* Initialize current values. */ info->cur_dst_mac_offset = 0; info->cur_src_mac_offset = 0; info->cur_saddr = info->saddr_min; info->cur_daddr = info->daddr_min; info->cur_udp_dst = info->udp_dst_min; info->cur_udp_src = info->udp_src_min; } /* delay_ns is in nano-seconds */ static void pg_nanodelay(int delay_ns, struct pktgen_interface_info* info, struct pktgen_thread_info* pg_thread) { u64 idle_start = getRelativeCurNs(); u64 last_time; u64 itmp = idle_start; info->nanodelays++; info->accum_delay_ns += delay_ns; while (info->accum_delay_ns > PG_MAX_ACCUM_DELAY_NS) { info->sleeps++; pg_thread->sleeping = 1; interruptible_sleep_on_timeout(&(pg_thread->queue), 1); pg_thread->sleeping = 0; /* will wake after one tick */ last_time = itmp; itmp = getRelativeCurNs(); info->accum_delay_ns -= (itmp - last_time); info->idle_acc += (itmp - last_time); if (!info->do_run_run) { break; } }/* while */ }//pg_nanodelay /* Returns: cycles per micro-second */ static int calc_mhz(void) { struct timeval start, stop; u64 start_s; u64 t1, t2; u32 elapsed; u32 clock_time = 0; do_gettimeofday(&start); start_s = get_cycles(); /* Spin for 50,000,000 cycles */ do { barrier(); elapsed = (u32)(get_cycles() - start_s); if (elapsed == 0) return 0; } while (elapsed < 50000000); do_gettimeofday(&stop); t1 = tv_to_us(&start); t2 = tv_to_us(&stop); clock_time = (u32)(t2 - t1); if (clock_time == 0) { printk("pktgen: ERROR: clock_time was zero..things may not work right, t1: %u t2: %u ...\n", (u32)(t1), (u32)(t2)); return 0x7FFFFFFF; } return elapsed / clock_time; } /* Calibrate cycles per micro-second */ static void cycles_calibrate(void) { int i; for (i = 0; i < 3; i++) { u32 res = calc_mhz(); if (res > pg_cycles_per_us) pg_cycles_per_us = res; } /* Set these up too, only need to calculate these once. */ pg_cycles_per_ns = pg_cycles_per_us / 1000; if (pg_cycles_per_ns == 0) { pg_cycles_per_ns = 1; } pg_cycles_per_ms = pg_cycles_per_us * 1000; printk("pktgen: cycles_calibrate, cycles_per_ns: %d per_us: %d per_ms: %d\n", pg_cycles_per_ns, pg_cycles_per_us, pg_cycles_per_ms); } /* Increment/randomize headers according to flags and current values * for IP src/dest, UDP src/dst port, MAC-Addr src/dst */ static void mod_cur_headers(struct pktgen_interface_info* info) { __u32 imn; __u32 imx; /* Deal with source MAC */ if (info->src_mac_count > 1) { __u32 mc; __u32 tmp; if (info->flags & F_MACSRC_RND) { mc = net_random() % (info->src_mac_count); } else { mc = info->cur_src_mac_offset++; if (info->cur_src_mac_offset > info->src_mac_count) { info->cur_src_mac_offset = 0; } } tmp = info->src_mac[5] + (mc & 0xFF); info->hh[11] = tmp; tmp = (info->src_mac[4] + ((mc >> 8) & 0xFF) + (tmp >> 8)); info->hh[10] = tmp; tmp = (info->src_mac[3] + ((mc >> 16) & 0xFF) + (tmp >> 8)); info->hh[9] = tmp; tmp = (info->src_mac[2] + ((mc >> 24) & 0xFF) + (tmp >> 8)); info->hh[8] = tmp; tmp = (info->src_mac[1] + (tmp >> 8)); info->hh[7] = tmp; } /* Deal with Destination MAC */ if (info->dst_mac_count > 1) { __u32 mc; __u32 tmp; if (info->flags & F_MACDST_RND) { mc = net_random() % (info->dst_mac_count); } else { mc = info->cur_dst_mac_offset++; if (info->cur_dst_mac_offset > info->dst_mac_count) { info->cur_dst_mac_offset = 0; } } tmp = info->dst_mac[5] + (mc & 0xFF); info->hh[5] = tmp; tmp = (info->dst_mac[4] + ((mc >> 8) & 0xFF) + (tmp >> 8)); info->hh[4] = tmp; tmp = (info->dst_mac[3] + ((mc >> 16) & 0xFF) + (tmp >> 8)); info->hh[3] = tmp; tmp = (info->dst_mac[2] + ((mc >> 24) & 0xFF) + (tmp >> 8)); info->hh[2] = tmp; tmp = (info->dst_mac[1] + (tmp >> 8)); info->hh[1] = tmp; } if (info->udp_src_min < info->udp_src_max) { if (info->flags & F_UDPSRC_RND) { info->cur_udp_src = ((net_random() % (info->udp_src_max - info->udp_src_min)) + info->udp_src_min); } else { info->cur_udp_src++; if (info->cur_udp_src >= info->udp_src_max) { info->cur_udp_src = info->udp_src_min; } } } if (info->udp_dst_min < info->udp_dst_max) { if (info->flags & F_UDPDST_RND) { info->cur_udp_dst = ((net_random() % (info->udp_dst_max - info->udp_dst_min)) + info->udp_dst_min); } else { info->cur_udp_dst++; if (info->cur_udp_dst >= info->udp_dst_max) { info->cur_udp_dst = info->udp_dst_min; } } } if ((imn = ntohl(info->saddr_min)) < (imx = ntohl(info->saddr_max))) { __u32 t; if (info->flags & F_IPSRC_RND) { t = ((net_random() % (imx - imn)) + imn); } else { t = ntohl(info->cur_saddr); t++; if (t > imx) { t = imn; } } info->cur_saddr = htonl(t); } if ((imn = ntohl(info->daddr_min)) < (imx = ntohl(info->daddr_max))) { __u32 t; if (info->flags & F_IPDST_RND) { t = ((net_random() % (imx - imn)) + imn); } else { t = ntohl(info->cur_daddr); t++; if (t > imx) { t = imn; } } info->cur_daddr = htonl(t); } /* dhetheri - Make MAC address = 00:00:IP address */ if (info->flags & F_IPMAC) { __u32 tmp; __u32 t; /* SRC MAC = 00:00:IP address */ t = ntohl(info->cur_saddr); tmp = info->src_mac[5] + (t & 0xFF); info->hh[11] = tmp; tmp = (info->src_mac[4] + ((t >> 8) & 0xFF) + (tmp >> 8)); info->hh[10] = tmp; tmp = (info->src_mac[3] + ((t >> 16) & 0xFF) + (tmp >> 8)); info->hh[9] = tmp; tmp = (info->src_mac[2] + ((t >> 24) & 0xFF) + (tmp >> 8)); info->hh[8] = tmp; tmp = (info->src_mac[1] + (tmp >> 8)); info->hh[7] = tmp; info->cur_saddr = htonl(t); /* DST MAC = 00:00:IP address */ t = ntohl(info->cur_daddr); tmp = info->dst_mac[5] + (t & 0xFF); info->hh[5] = tmp; tmp = (info->dst_mac[4] + ((t >> 8) & 0xFF) + (tmp >> 8)); info->hh[4] = tmp; tmp = (info->dst_mac[3] + ((t >> 16) & 0xFF) + (tmp >> 8)); info->hh[3] = tmp; tmp = (info->dst_mac[2] + ((t >> 24) & 0xFF) + (tmp >> 8)); info->hh[2] = tmp; tmp = (info->dst_mac[1] + (tmp >> 8)); info->hh[1] = tmp; info->cur_daddr = htonl(t); } /* MAC = 00:00:IP address (dhetheri) */ }/* mod_cur_headers */ static struct sk_buff *fill_packet(struct net_device *odev, struct pktgen_interface_info* info) { struct sk_buff *skb = NULL; __u8 *eth; struct udphdr *udph; int datalen, iplen; struct iphdr *iph; struct pktgen_hdr *pgh = NULL; /* dhetheri - Moved out of mod_cur_headers. */ if (info->min_pkt_size < info->max_pkt_size) { __u32 t; if (info->flags & F_TXSIZE_RND) { t = ((net_random() % (info->max_pkt_size - info->min_pkt_size)) + info->min_pkt_size); } else { t = info->cur_pkt_size + 1; if (t > info->max_pkt_size) { t = info->min_pkt_size; } } info->cur_pkt_size = t; } skb = alloc_skb(info->cur_pkt_size + 64 + 16, GFP_ATOMIC); if (!skb) { sprintf(info->result, "No memory"); return NULL; } skb_reserve(skb, 16); /* Reserve for ethernet and IP header */ eth = (__u8 *) skb_push(skb, 14); iph = (struct iphdr *)skb_put(skb, sizeof(struct iphdr)); udph = (struct udphdr *)skb_put(skb, sizeof(struct udphdr)); /* Update any of the values, used when we're incrementing various * fields. */ mod_cur_headers(info); memcpy(eth, info->hh, 14); datalen = info->cur_pkt_size - 14 - 20 - 8; /* Eth + IPh + UDPh */ if (datalen < sizeof(struct pktgen_hdr)) { datalen = sizeof(struct pktgen_hdr); } udph->source = htons(info->cur_udp_src); udph->dest = htons(info->cur_udp_dst); udph->len = htons(datalen + 8); /* DATA + udphdr */ udph->check = 0; /* No checksum */ iph->ihl = 5; iph->version = 4; iph->ttl = 32; iph->tos = 0; if (info->prot) { /* dhetheri */ iph->protocol = info->prot; /* dhetheri */ } else { iph->protocol = IPPROTO_UDP; /* UDP */ } iph->saddr = info->cur_saddr; iph->daddr = info->cur_daddr; iph->frag_off = 0; iplen = 20 + 8 + datalen; iph->tot_len = htons(iplen); iph->check = 0; iph->check = ip_fast_csum((void *) iph, iph->ihl); skb->protocol = __constant_htons(ETH_P_IP); skb->mac.raw = ((u8 *)iph) - 14; skb->dev = odev; skb->pkt_type = PACKET_HOST; if (info->nfrags <= 0) { pgh = (struct pktgen_hdr *)skb_put(skb, datalen); } else { int frags = info->nfrags; int i; pgh = (struct pktgen_hdr*)(((char*)(udph)) + 8); if (frags > MAX_SKB_FRAGS) frags = MAX_SKB_FRAGS; if (datalen > frags*PAGE_SIZE) { skb_put(skb, datalen-frags*PAGE_SIZE); datalen = frags*PAGE_SIZE; } i = 0; while (datalen > 0) { struct page *page = alloc_pages(GFP_KERNEL, 0); skb_shinfo(skb)->frags[i].page = page; skb_shinfo(skb)->frags[i].page_offset = 0; skb_shinfo(skb)->frags[i].size = (datalen < PAGE_SIZE ? datalen : PAGE_SIZE); datalen -= skb_shinfo(skb)->frags[i].size; skb->len += skb_shinfo(skb)->frags[i].size; skb->data_len += skb_shinfo(skb)->frags[i].size; i++; skb_shinfo(skb)->nr_frags = i; } while (i < frags) { int rem; if (i == 0) break; rem = skb_shinfo(skb)->frags[i - 1].size / 2; if (rem == 0) break; skb_shinfo(skb)->frags[i - 1].size -= rem; skb_shinfo(skb)->frags[i] = skb_shinfo(skb)->frags[i - 1]; get_page(skb_shinfo(skb)->frags[i].page); skb_shinfo(skb)->frags[i].page = skb_shinfo(skb)->frags[i - 1].page; skb_shinfo(skb)->frags[i].page_offset += skb_shinfo(skb)->frags[i - 1].size; skb_shinfo(skb)->frags[i].size = rem; i++; skb_shinfo(skb)->nr_frags = i; } } /* Stamp the time, and sequence number, convert them to network byte order */ if (pgh) { pgh->pgh_magic = __constant_htonl(PKTGEN_MAGIC); do_gettimeofday(&(pgh->timestamp)); pgh->timestamp.tv_usec = htonl(pgh->timestamp.tv_usec); pgh->timestamp.tv_sec = htonl(pgh->timestamp.tv_sec); pgh->seq_num = htonl(info->seq_num); } info->seq_num++; return skb; } static void record_latency(struct pktgen_interface_info* info, int latency) { /* NOTE: Latency can be negative */ int div = 100; int diff; int vl; int i; info->pkts_rcvd_since_clear++; if (info->pkts_rcvd_since_clear < 100) { div = info->pkts_rcvd; if (info->pkts_rcvd_since_clear == 1) { info->avg_latency = latency; } } if ((div + 1) == 0) { info->avg_latency = 0; } else { info->avg_latency = ((info->avg_latency * div + latency) / (div + 1)); } if (latency < info->min_latency) { info->min_latency = latency; } if (latency > info->max_latency) { info->max_latency = latency; } /* Place the latency in the right 'bucket' */ diff = (latency - info->min_latency); for (i = 0; ilatency_bkts[i]++; break; } } }/* record latency */ /* Returns < 0 if the skb is not a pktgen buffer. */ int pktgen_receive(struct sk_buff* skb) { /* int i; */ /* Debugging only */ /* unsigned char* tmp; */ /* dhetheri */ //printk("pktgen receive:\n"); //tmp=(char *)(skb->data); //for (i=0; i<90; i++) { // printk("%02hx ", tmp[i]); // if (((i+1) % 15) == 0) { // printk("\n"); // } //} //printk("\n"); /* dhetheri */ /* See if we have a pktgen packet */ if ((skb->len >= (20 + 8 + sizeof(struct pktgen_hdr))) && (skb->protocol == __constant_htons(ETH_P_IP))) { struct pktgen_hdr* pgh; /* It's IP, and long enough, lets check the magic number. * TODO: This is a hack not always guaranteed to catch the right * packets. */ /* printk("Length & protocol passed, skb->data: %p, raw: %p\n", skb->data, skb->h.raw); */ pgh = (struct pktgen_hdr*)(skb->data + 20 + 8); /* tmp = (char*)(skb->data); for (i = 0; i<90; i++) { printk("%02hx ", tmp[i]); if (((i + 1) % 15) == 0) { printk("\n"); } } printk("\n"); */ if (pgh->pgh_magic == __constant_ntohl(PKTGEN_MAGIC)) { struct net_device* dev = skb->dev; struct pktgen_interface_info* info = find_pg_info(dev->ifindex); /* Got one! */ /* TODO: Check UDP checksum ?? */ __u32 seq = ntohl(pgh->seq_num); if (!info) { return -1; } info->pkts_rcvd++; info->bytes_rcvd += (skb->len + 4); /* +4 for the checksum */ /* Check for out-of-sequence packets */ if (info->last_seq_rcvd == seq) { info->dup_rcvd++; info->dup_since_incr++; } else { __s64 rx; __s64 tx; struct timeval txtv; if (!skb->stamp.tv_sec) { do_gettimeofday(&skb->stamp); } rx = tv_to_us(&(skb->stamp)); txtv.tv_usec = ntohl(pgh->timestamp.tv_usec); txtv.tv_sec = ntohl(pgh->timestamp.tv_sec); tx = tv_to_us(&txtv); record_latency(info, rx - tx); if ((info->last_seq_rcvd + 1) == seq) { if ((info->peer_multiskb > 1) && (info->peer_multiskb > (info->dup_since_incr + 1))) { info->seq_gap_rcvd += (info->peer_multiskb - info->dup_since_incr - 1); } /* Great, in order...all is well */ } else if (info->last_seq_rcvd < seq) { /* sequence gap, means we dropped a pkt most likely */ if (info->peer_multiskb > 1) { /* We dropped more than one sequence number's worth, * and if we're using multiskb, then this is quite * a few. This number still will not be exact, but * it will be closer. */ info->seq_gap_rcvd += (((seq - info->last_seq_rcvd) * info->peer_multiskb) - info->dup_since_incr); } else { info->seq_gap_rcvd += (seq - info->last_seq_rcvd - 1); } } else { info->ooo_rcvd++; /* out-of-order */ } info->dup_since_incr = 0; } info->last_seq_rcvd = seq; kfree_skb(skb); if (debug > 1) { printk("done with pktgen_receive, free'd pkt\n"); } return 0; } } return -1; /* Let another protocol handle it, it's not for us! */ }/* pktgen_receive */ static void pg_reset_latency_counters(struct pktgen_interface_info* info) { int i; info->avg_latency = 0; info->min_latency = 0x7fffffff; /* largest integer */ info->max_latency = 0x80000000; /* smallest integer */ info->pkts_rcvd_since_clear = 0; for (i = 0; ilatency_bkts[i] = 0; } } static void pg_clear_counters(struct pktgen_interface_info* info, int seq_too) { info->idle_acc = 0; info->sofar = 0; info->tx_bytes = 0; info->errors = 0; info->ooo_rcvd = 0; info->dup_rcvd = 0; info->pkts_rcvd = 0; info->bytes_rcvd = 0; info->non_pg_pkts_rcvd = 0; info->seq_gap_rcvd = 0; /* dropped */ /* Clear some transient state */ info->accum_delay_ns = 0; info->sleeps = 0; info->nanodelays = 0; /* This is a bit of a hack, but it gets the dup counters * in line so we don't have false alarms on dropped pkts. */ if (seq_too) { info->dup_since_incr = info->peer_multiskb - 1; info->seq_num = 1; info->last_seq_rcvd = 0; } pg_reset_latency_counters(info); } /* Adds an interface to the thread. The interface will be in * the stopped queue untill started. */ static int add_interface_to_thread(struct pktgen_thread_info* pg_thread, struct pktgen_interface_info* info) { int rv = 0; /* grab lock & insert into the stopped list */ pg_lock(pg_thread, __FUNCTION__); if (info->pg_thread) { printk("pktgen: ERROR: Already assigned to a thread.\n"); rv = -EBUSY; goto out; } info->next = pg_thread->stopped_if_infos; pg_thread->stopped_if_infos = info; info->pg_thread = pg_thread; out: pg_unlock(pg_thread, __FUNCTION__); return rv; } /* Set up structure for sending pkts, clear counters, add to rcv hash, * create initial packet, and move from the stopped to the running * interface_info list */ static int pg_start_interface(struct pktgen_thread_info* pg_thread, struct pktgen_interface_info* info) { PG_DEBUG(printk("Entering pg_start_interface..\n")); pg_setup_inject(info); if (!info->odev) { return -1; } PG_DEBUG(printk("About to clean counters..\n")); pg_clear_counters(info, 1); info->do_run_run = 1; /* Cranke yeself! */ info->skb = NULL; info->started_at = getCurUs(); pg_lock(pg_thread, __FUNCTION__); { /* Remove from the stopped list */ struct pktgen_interface_info* p = pg_thread->stopped_if_infos; if (p == info) { pg_thread->stopped_if_infos = p->next; p->next = NULL; } else { while (p) { if (p->next == info) { p->next = p->next->next; info->next = NULL; break; } p = p->next; } } info->next_tx_ns = 0; /* Transmit immediately */ /* Move to the front of the running list */ info->next = pg_thread->running_if_infos; pg_thread->running_if_infos = info; pg_thread->running_if_sz++; } pg_unlock(pg_thread, __FUNCTION__); PG_DEBUG(printk("Leaving pg_start_interface..\n")); return 0; }/* pg_start_interface */ /* set stopped-at timer, remove from running list, do counters & statistics * NOTE: We do not remove from the rcv hash. */ static int pg_stop_interface(struct pktgen_thread_info* pg_thread, struct pktgen_interface_info* info) { __u64 total_us; if (!info->do_run_run) { printk("pktgen interface: %s is already stopped\n", info->ifname); return -EINVAL; } info->stopped_at = getCurMs(); info->do_run_run = 0; /* The main worker loop will place it onto the stopped list if needed, * next time this interface is asked to be re-inserted into the * list. */ total_us = info->stopped_at - info->started_at; { __u64 idle = pg_div(info->idle_acc, 1000); /* convert to us */ char *p = info->result; __u64 pps = divremdi3(info->sofar * 1000, pg_div(total_us, 1000), PG_DIV); __u64 bps = pps * 8 * (info->cur_pkt_size + 4); /* take 32bit ethernet CRC into account */ p += sprintf(p, "OK: %llu(c%llu+d%llu) usec, %llu (%dbyte) %llupps %lluMb/sec (%llubps) errors: %llu", total_us, total_us - idle, idle, info->sofar, info->cur_pkt_size + 4, /* Add 4 to account for the ethernet checksum */ pps, bps >> 20, bps, info->errors ); } return 0; }/* pg_stop_interface */ /* Re-inserts 'last' into the pg_thread's list. Calling code should * make sure that 'last' is not already in the list. */ static struct pktgen_interface_info* pg_resort_pginfos(struct pktgen_thread_info* pg_thread, struct pktgen_interface_info* last, int setup_cur_if) { struct pktgen_interface_info* rv = NULL; pg_lock(pg_thread, __FUNCTION__); { struct pktgen_interface_info* p = pg_thread->running_if_infos; if (last) { if (!last->do_run_run) { /* If this guy was stopped while 'current', then * we'll want to place him on the stopped list * here. */ last->next = pg_thread->stopped_if_infos; pg_thread->stopped_if_infos = last; pg_thread->running_if_sz--; } else { /* re-insert */ if (!p) { pg_thread->running_if_infos = last; last->next = NULL; } else { /* Another special case, check to see if we should go at the * front of the queue. */ if (p->next_tx_ns > last->next_tx_ns) { last->next = p; pg_thread->running_if_infos = last; } else { int inserted = 0; while (p->next) { if (p->next->next_tx_ns > last->next_tx_ns) { /* Insert into the list */ last->next = p->next; p->next = last; inserted = 1; break; } p = p->next; } if (!inserted) { /* place at the end */ last->next = NULL; p->next = last; } } } } } /* List is re-sorted, so grab the first one to return */ rv = pg_thread->running_if_infos; if (rv) { /* Pop him off of the list. We do this here because we already * have the lock. Calling code just has to be aware of this * feature. */ pg_thread->running_if_infos = rv->next; } } if (setup_cur_if) { pg_thread->cur_if = rv; } pg_unlock(pg_thread, __FUNCTION__); return rv; }/* pg_resort_pginfos */ void pg_stop_all_ifs(struct pktgen_thread_info* pg_thread) { struct pktgen_interface_info* next = NULL; pg_lock(pg_thread, __FUNCTION__); if (pg_thread->cur_if) { /* Move it onto the stopped list */ pg_stop_interface(pg_thread, pg_thread->cur_if); pg_thread->cur_if->next = pg_thread->stopped_if_infos; pg_thread->stopped_if_infos = pg_thread->cur_if; pg_thread->cur_if = NULL; } pg_unlock(pg_thread, __FUNCTION__); /* These have their own locking */ next = pg_resort_pginfos(pg_thread, NULL, 0); while (next) { pg_stop_interface(pg_thread, next); next = pg_resort_pginfos(pg_thread, NULL, 0); } }/* pg_stop_all_ifs */ void pg_rem_all_ifs(struct pktgen_thread_info* pg_thread) { struct pktgen_interface_info* next = NULL; /* Remove all interfaces, clean up memory */ while ((next = pg_thread->stopped_if_infos)) { int rv = pg_rem_interface_info(pg_thread, next); if (rv >= 0) { kfree(next); } else { printk("ERROR: failed to rem_interface: %i\n", rv); } } }/* pg_rem_all_ifs */ void pg_rem_from_thread_list(struct pktgen_thread_info* pg_thread) { /* Remove from the thread list */ pg_lock_thread_list(__FUNCTION__); { struct pktgen_thread_info* tmp = pktgen_threads; if (tmp == pg_thread) { pktgen_threads = tmp->next; } else { while (tmp) { if (tmp->next == pg_thread) { tmp->next = pg_thread->next; pg_thread->next = NULL; break; } tmp = tmp->next; } } } pg_unlock_thread_list(__FUNCTION__); }/* pg_rem_from_thread_list */ /* Main loop of the thread. Send pkts. */ void pg_thread_worker(struct pktgen_thread_info* pg_thread) { struct net_device *odev = NULL; __u64 idle_start = 0; struct pktgen_interface_info* next = NULL; u32 next_ipg = 0; u64 now = 0; /* in nano-seconds */ u32 tx_since_softirq = 0; u32 queue_stopped = 0; /* setup the thread environment */ init_pktgen_kthread(pg_thread, "kpktgend"); PG_DEBUG(printk("Starting up pktgen thread: %s\n", pg_thread->name)); /* an endless loop in which we are doing our work */ while (1) { if (queue_stopped > pg_thread->running_if_sz) { /* All our devices are all fulled up, schedule and hope to run * again soon. */ /* Take this opportunity to run the soft-irq */ do_softirq(); tx_since_softirq = 0; pg_thread->queues_stopped++; pg_thread->sleeping = 1; interruptible_sleep_on_timeout(&(pg_thread->queue), 1); pg_thread->sleeping = 0; queue_stopped = 0; } /* Re-sorts the list, inserting 'next' (which is really the last one * we used). It pops the top one off of the queue and returns it. * Calling code must make sure to re-insert the returned value */ next = pg_resort_pginfos(pg_thread, next, 1); if (next) { odev = next->odev; if (next->ipg || (next->accum_delay_ns > 0)) { now = getRelativeCurNs(); if (now < next->next_tx_ns) { next_ipg = (u32)(next->next_tx_ns - now); /* These will not actually busy-spin now. Will run as * much as 1ms fast, and will sleep in 1ms units, assuming * our tick is 1ms. */ pg_nanodelay(next_ipg, next, pg_thread); if (!next->do_run_run) { /* We were stopped while sleeping */ continue; } } /* This is max IPG, this has special meaning of * "never transmit" */ if (next->ipg == 0x7FFFFFFF) { next->next_tx_ns = getRelativeCurNs() + next->ipg; continue; } } if (need_resched()) { idle_start = getRelativeCurNs(); schedule(); next->idle_acc += getRelativeCurNs() - idle_start; } if (netif_queue_stopped(odev)) { next->queue_stopped++; queue_stopped++; if (!netif_running(odev)) { pg_stop_interface(pg_thread, next); } continue; /* Try the next interface */ } if (next->last_ok || !next->skb) { if ((++next->fp_tmp >= next->multiskb ) || (!next->skb)) { /* build a new pkt */ if (next->skb) { kfree_skb(next->skb); } next->skb = fill_packet(odev, next); if (next->skb == NULL) { if (net_ratelimit()) { printk(KERN_INFO "pktgen: Couldn't allocate skb in fill_packet.\n"); } schedule(); next->fp_tmp--; /* back out increment, OOM */ continue; } next->fp++; next->fp_tmp = 0; /* reset counter */ /* Not sure what good knowing nr_frags is... next->nr_frags = skb_shinfo(skb)->nr_frags; */ } atomic_inc(&(next->skb->users)); } spin_lock_bh(&odev->xmit_lock); if (!netif_queue_stopped(odev)) { if (odev->hard_start_xmit(next->skb, odev)) { if (net_ratelimit()) { printk(KERN_INFO "Hard xmit error\n"); } next->errors++; next->last_ok = 0; next->queue_stopped++; queue_stopped++; } else { queue_stopped = 0; /* reset this, we tx'd one successfully */ next->last_ok = 1; next->sofar++; next->tx_bytes += (next->cur_pkt_size + 4); /* count csum */ } } else { /* Re-try it next time */ queue_stopped++; next->queue_stopped++; next->last_ok = 0; } spin_unlock_bh(&odev->xmit_lock); next->next_tx_ns = getRelativeCurNs() + next->ipg; if (++tx_since_softirq > pg_thread->max_before_softirq) { do_softirq(); tx_since_softirq = 0; } /* If next->count is zero, then run forever */ if ((next->count != 0) && (next->sofar >= next->count)) { if (atomic_read(&(next->skb->users)) != 1) { idle_start = getRelativeCurNs(); while (atomic_read(&(next->skb->users)) != 1) { if (signal_pending(current)) { break; } schedule(); } next->idle_acc += getRelativeCurNs() - idle_start; } pg_stop_interface(pg_thread, next); }/* if we're done with a particular interface. */ }/* if could find the next interface to send on. */ else { /* fall asleep for a bit */ pg_thread->sleeping = 1; interruptible_sleep_on_timeout(&(pg_thread->queue), HZ/10); pg_thread->sleeping = 0; } /* here we are back from sleep, either due to the timeout (one second), or because we caught a signal. */ if (pg_thread->terminate || signal_pending(current)) { /* we received a request to terminate ourself */ break; } }//while true /* here we go only in case of termination of the thread */ PG_DEBUG(printk("pgthread: %s stopping all Interfaces.\n", pg_thread->name)); pg_stop_all_ifs(pg_thread); PG_DEBUG(printk("pgthread: %s removing all Interfaces.\n", pg_thread->name)); pg_rem_all_ifs(pg_thread); pg_rem_from_thread_list(pg_thread); /* cleanup the thread, leave */ PG_DEBUG(printk("pgthread: %s calling exit_pktgen_kthread.\n", pg_thread->name)); exit_pktgen_kthread(pg_thread); } /* private functions */ static void kthread_launcher(void *data) { struct pktgen_thread_info *kthread = data; kernel_thread((int (*)(void *))kthread->function, (void *)kthread, 0); } /* create a new kernel thread. Called by the creator. */ void start_pktgen_kthread(struct pktgen_thread_info *kthread) { /* initialize the semaphore: we start with the semaphore locked. The new kernel thread will setup its stuff and unlock it. This control flow (the one that creates the thread) blocks in the down operation below until the thread has reached the up() operation. */ init_MUTEX_LOCKED(&kthread->startstop_sem); /* store the function to be executed in the data passed to the launcher */ kthread->function = pg_thread_worker; /* create the new thread my running a task through keventd */ INIT_WORK(&(kthread->wq), kthread_launcher, kthread); /* and schedule it for execution */ schedule_work(&kthread->wq); /* wait till it has reached the setup_thread routine */ down(&kthread->startstop_sem); } /* stop a kernel thread. Called by the removing instance */ static void stop_pktgen_kthread(struct pktgen_thread_info *kthread) { PG_DEBUG(printk("pgthread: %s stop_pktgen_kthread.\n", kthread->name)); if (kthread->thread == NULL) { printk("stop_kthread: killing non existing thread!\n"); return; } /* Stop each interface */ pg_lock(kthread, __FUNCTION__); { struct pktgen_interface_info* tmp = kthread->running_if_infos; while (tmp) { tmp->do_run_run = 0; tmp->next_tx_ns = 0; tmp = tmp->next; } if (kthread->cur_if) { kthread->cur_if->do_run_run = 0; kthread->cur_if->next_tx_ns = 0; } } pg_unlock(kthread, __FUNCTION__); /* Wait for everything to fully stop */ while (1) { pg_lock(kthread, __FUNCTION__); if (kthread->cur_if || kthread->running_if_infos) { pg_unlock(kthread, __FUNCTION__); if (need_resched()) { schedule(); } mdelay(1); } else { pg_unlock(kthread, __FUNCTION__); break; } } /* this function needs to be protected with the big kernel lock (lock_kernel()). The lock must be grabbed before changing the terminate flag and released after the down() call. */ lock_kernel(); /* initialize the semaphore. We lock it here, the leave_thread call of the thread to be terminated will unlock it. As soon as we see the semaphore unlocked, we know that the thread has exited. */ init_MUTEX_LOCKED(&kthread->startstop_sem); /* We need to do a memory barrier here to be sure that the flags are visible on all CPUs. */ mb(); /* set flag to request thread termination */ kthread->terminate = 1; /* We need to do a memory barrier here to be sure that the flags are visible on all CPUs. */ mb(); kill_proc(kthread->thread->pid, SIGKILL, 1); /* block till thread terminated */ down(&kthread->startstop_sem); kthread->in_use = 0; /* release the big kernel lock */ unlock_kernel(); /* now we are sure the thread is in zombie state. We notify keventd to clean the process up. */ kill_proc(2, SIGCHLD, 1); PG_DEBUG(printk("pgthread: %s done with stop_pktgen_kthread.\n", kthread->name)); }/* stop_pktgen_kthread */ /* initialize new created thread. Called by the new thread. */ void init_pktgen_kthread(struct pktgen_thread_info *kthread, char *name) { /* lock the kernel. A new kernel thread starts without the big kernel lock, regardless of the lock state of the creator (the lock level is *not* inheritated) */ lock_kernel(); /* fill in thread structure */ kthread->thread = current; /* set signal mask to what we want to respond */ siginitsetinv(¤t->blocked, sigmask(SIGKILL)|sigmask(SIGINT)|sigmask(SIGTERM)); /* initialise wait queue */ init_waitqueue_head(&kthread->queue); /* initialise termination flag */ kthread->terminate = 0; /* set name of this process (max 15 chars + 0 !) */ sprintf(current->comm, name); /* let others run */ unlock_kernel(); /* tell the creator that we are ready and let him continue */ up(&kthread->startstop_sem); }/* init_pktgen_kthread */ /* cleanup of thread. Called by the exiting thread. */ static void exit_pktgen_kthread(struct pktgen_thread_info *kthread) { /* we are terminating */ /* lock the kernel, the exit will unlock it */ lock_kernel(); kthread->thread = NULL; mb(); /* Clean up proc file system */ if (strlen(kthread->fname)) { remove_proc_entry(kthread->fname, NULL); } /* notify the stop_kthread() routine that we are terminating. */ up(&kthread->startstop_sem); /* the kernel_thread that called clone() does a do_exit here. */ /* there is no race here between execution of the "killer" and real termination of the thread (race window between up and do_exit), since both the thread and the "killer" function are running with the kernel lock held. The kernel lock will be freed after the thread exited, so the code is really not executed anymore as soon as the unload functions gets the kernel lock back. The init process may not have made the cleanup of the process here, but the cleanup can be done safely with the module unloaded. */ }/* exit_pktgen_kthread */ /* proc/net/pg */ static char* pg_display_latency(struct pktgen_interface_info* info, char* p, int reset_latency) { int i; p += sprintf(p, " avg_latency: %dus min_lat: %dus max_lat: %dus pkts_in_sample: %llu\n", info->avg_latency, info->min_latency, info->max_latency, info->pkts_rcvd_since_clear); p += sprintf(p, " Buckets(us) [ "); for (i = 0; ilatency_bkts[i]); } p += sprintf(p, "]\n"); if (reset_latency) { pg_reset_latency_counters(info); } return p; } static int proc_pg_if_read(char *buf , char **start, off_t offset, int len, int *eof, void *data) { char *p; int i; struct pktgen_interface_info* info = (struct pktgen_interface_info*)(data); __u64 sa; __u64 stopped; __u64 now = getCurUs(); __u64 now_rel_ns = getRelativeCurNs(); p = buf; p += sprintf(p, "VERSION-1\n"); /* Help with parsing compatibility */ p += sprintf(p, "Params: count %llu min_pkt_size: %u max_pkt_size: %u cur_pkt_size %u\n frags: %d ipg: %u multiskb: %d ifname: %s\n", info->count, info->min_pkt_size, info->max_pkt_size, info->cur_pkt_size, info->nfrags, info->ipg, info->multiskb, info->ifname); p += sprintf(p, " dst_min: %s dst_max: %s\n src_min: %s src_max: %s\n", info->dst_min, info->dst_max, info->src_min, info->src_max); p += sprintf(p, " src_mac: "); for (i = 0; i < 6; i++) { p += sprintf(p, "%02X%s", info->src_mac[i], i == 5 ? " " : ":"); } p += sprintf(p, "dst_mac: "); for (i = 0; i < 6; i++) { p += sprintf(p, "%02X%s", info->dst_mac[i], i == 5 ? "\n" : ":"); } p += sprintf(p, " udp_src_min: %d udp_src_max: %d udp_dst_min: %d udp_dst_max: %d\n", info->udp_src_min, info->udp_src_max, info->udp_dst_min, info->udp_dst_max); p += sprintf(p, " src_mac_count: %d dst_mac_count: %d peer_multiskb: %d\n Flags: ", info->src_mac_count, info->dst_mac_count, info->peer_multiskb); if (info->flags & F_IPSRC_RND) { p += sprintf(p, "IPSRC_RND "); } if (info->flags & F_IPDST_RND) { p += sprintf(p, "IPDST_RND "); } if (info->flags & F_TXSIZE_RND) { p += sprintf(p, "TXSIZE_RND "); } if (info->flags & F_UDPSRC_RND) { p += sprintf(p, "UDPSRC_RND "); } if (info->flags & F_UDPDST_RND) { p += sprintf(p, "UDPDST_RND "); } if (info->flags & F_MACSRC_RND) { p += sprintf(p, "MACSRC_RND "); } if (info->flags & F_MACDST_RND) { p += sprintf(p, "MACDST_RND "); } if (info->flags & F_IPMAC) { /* dhetheri */ p += sprintf(p, "IPMAC "); } p += sprintf(p, "\n"); sa = info->started_at; stopped = info->stopped_at; if (info->do_run_run) { stopped = now; /* not really stopped, more like last-running-at */ } p += sprintf(p, "Current:\n pkts-sofar: %llu errors: %llu\naccum_delay: %lluns sleeps: %u nanodelays: %llu\n started: %lluus elapsed: %lluus\n idle: %lluns next_tx: %llu(%lli)ns\n", info->sofar, info->errors, info->accum_delay_ns, info->sleeps, info->nanodelays, sa, (stopped - sa), info->idle_acc, info->next_tx_ns, (long long)(info->next_tx_ns) - (long long)(now_rel_ns)); p += sprintf(p, " seq_num: %d cur_dst_mac_offset: %d cur_src_mac_offset: %d\n", info->seq_num, info->cur_dst_mac_offset, info->cur_src_mac_offset); p += sprintf(p, " cur_saddr: 0x%x cur_daddr: 0x%x cur_udp_dst: %d cur_udp_src: %d\n", info->cur_saddr, info->cur_daddr, info->cur_udp_dst, info->cur_udp_src); p += sprintf(p, " pkts_rcvd: %llu bytes_rcvd: %llu last_seq_rcvd: %d ooo_rcvd: %llu\n", info->pkts_rcvd, info->bytes_rcvd, info->last_seq_rcvd, info->ooo_rcvd); p += sprintf(p, " dup_rcvd: %llu seq_gap_rcvd(dropped): %llu non_pg_rcvd: %llu\n", info->dup_rcvd, info->seq_gap_rcvd, info->non_pg_pkts_rcvd); p = pg_display_latency(info, p, 0); if (info->result[0]) p += sprintf(p, "Result: %s\n", info->result); else p += sprintf(p, "Result: Idle\n"); *eof = 1; return p - buf; } static int proc_pg_thread_read(char *buf , char **start, off_t offset, int len, int *eof, void *data) { char *p; struct pktgen_thread_info* pg_thread = (struct pktgen_thread_info*)(data); struct pktgen_interface_info* info = NULL; if (!pg_thread) { printk("ERROR: could not find pg_thread in proc_pg_thread_read\n"); return -EINVAL; } p = buf; p += sprintf(p, "VERSION-1 CFG_RT\n"); /* Help with parsing compatibility */ p += sprintf(p, "PID: %i Name: %s max_before_softirq: %d queues_stopped: %u\n", pg_thread->thread->pid, pg_thread->name, pg_thread->max_before_softirq, pg_thread->queues_stopped); pg_lock(pg_thread, __FUNCTION__); if (pg_thread->cur_if) { p += sprintf(p, "Current: %s\n", pg_thread->cur_if->ifname); } else { p += sprintf(p, "Current: NULL\n"); } pg_unlock(pg_thread, __FUNCTION__); p += sprintf(p, "Running: "); pg_lock(pg_thread, __FUNCTION__); info = pg_thread->running_if_infos; while (info) { p += sprintf(p, "%s ", info->ifname); info = info->next; } p += sprintf(p, "\nStopped: "); info = pg_thread->stopped_if_infos; while (info) { p += sprintf(p, "%s ", info->ifname); info = info->next; } if (pg_thread->result[0]) p += sprintf(p, "\nResult: %s\n", pg_thread->result); else p += sprintf(p, "\nResult: NA\n"); *eof = 1; pg_unlock(pg_thread, __FUNCTION__); return p - buf; }/* proc_pg_thread_read */ static int proc_pg_ctrl_read(char *buf , char **start, off_t offset, int len, int *eof, void *data) { char *p; struct pktgen_thread_info* pg_thread = NULL; p = buf; p += sprintf(p, "VERSION-1\n"); /* Help with parsing compatibility */ p += sprintf(p, "Threads: "); pg_lock_thread_list(__FUNCTION__); pg_thread = pktgen_threads; while (pg_thread) { p += sprintf(p, "%s ", pg_thread->name); pg_thread = pg_thread->next; } p += sprintf(p, "\n"); *eof = 1; pg_unlock_thread_list(__FUNCTION__); return p - buf; }/* proc_pg_ctrl_read */ static int isdelim(const char c) { switch (c) { case '\"': case '\n': case '\r': case '\t': case ' ': case '=': return 1; } return 0; } static int count_trail_chars(const char *buf, unsigned int maxlen) { int i; for (i = 0; i < maxlen; i++) { if (!isdelim(buf[i])) { break; } } return i; } static int strncpy_token(char* dst, const char* src, int mx) { int i; for (i = 0; i= '0') && (c <= '9')) { num *= 10; num += c - '0'; } else { break; } } return num; } static int proc_pg_if_write(struct file *file, const char *user_buffer, unsigned long count, void *data) { char name[16]; struct pktgen_interface_info* info = (struct pktgen_interface_info*)(data); char* kbuf; char* p; char* pg_result = &(info->result[0]); int len; int value; if (count < 1) { sprintf(pg_result, "Wrong command format"); return -EINVAL; } kbuf = kmalloc(count, GFP_KERNEL); if (copy_from_user(kbuf, user_buffer, count)) { kfree(kbuf); return -EFAULT; } p = kbuf; while (p < (kbuf + count)) { p += count_trail_chars(p, count - (p - kbuf)); if (p >= (kbuf + count)) { break; } /* Read variable name */ if (debug) { printk("pg_thread: %s,%lu\n", name, count); } len = strlen("stop"); if (!strncmp(p, "stop", len)) { p += len; if (info->do_run_run) { strcpy(pg_result, "Stopping"); pg_stop_interface(info->pg_thread, info); } else { strcpy(pg_result, "Already stopped...\n"); } goto foundcmd; } len = strlen("min_pkt_size "); if (!strncmp(p, "min_pkt_size ", len)) { char f[32]; p += len; p += count_trail_chars(p, count - (p - kbuf)); strncpy_token(f, p, min(31, (int)(count - (p - kbuf)))); f[31] = 0; p += strlen(f); value = atoui(f); if (value < 14+20+8) value = 14+20+8; if (value != info->min_pkt_size) { info->min_pkt_size = value; info->cur_pkt_size = value; } sprintf(pg_result, "OK: min_pkt_size=%u", info->min_pkt_size); goto foundcmd; } len = strlen("max_pkt_size "); if (!strncmp(p, "max_pkt_size ", len)) { char f[32]; p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(31, (int)(count - (p - kbuf)))); f[31] = 0; p += strlen(f); value = atoui(f); if (value < 14+20+8) value = 14+20+8; if (value != info->max_pkt_size) { info->max_pkt_size = value; info->cur_pkt_size = value; } sprintf(pg_result, "OK: max_pkt_size=%u", info->max_pkt_size); goto foundcmd; } len = strlen("min_pkt_size "); if (!strncmp(p, "min_pkt_size ", len)) { char f[32]; p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(31, (int)(count - (p - kbuf)))); f[31] = 0; p += strlen(f); debug = atoui(f); sprintf(pg_result, "OK: debug=%u", debug); goto foundcmd; } len = strlen("frags "); if (!strncmp(p, "frags ", len)) { char f[32]; p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(31, (int)(count - (p - kbuf)))); f[31] = 0; p += strlen(f); info->nfrags = atoui(f); sprintf(pg_result, "OK: frags=%u", info->nfrags); goto foundcmd; } len = strlen("ipg "); if (!strncmp(p, "ipg ", len)) { char f[32]; p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(31, (int)(count - (p - kbuf)))); f[31] = 0; p += strlen(f); info->ipg = atoui(f); if ((getRelativeCurNs() + info->ipg) > info->next_tx_ns) { info->next_tx_ns = getRelativeCurNs() + info->ipg; } sprintf(pg_result, "OK: ipg=%u", info->ipg); goto foundcmd; } len = strlen("udp_src_min "); if (!strncmp(p, "udp_src_min ", len)) { char f[32]; p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(31, (int)(count - (p - kbuf)))); f[31] = 0; p += strlen(f); value = atoui(f); if (value != info->udp_src_min) { info->udp_src_min = value; info->cur_udp_src = value; } sprintf(pg_result, "OK: udp_src_min=%u", info->udp_src_min); goto foundcmd; } len = strlen("udp_dst_min "); if (!strncmp(p, "udp_dst_min ", len)) { char f[32]; p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(31, (int)(count - (p - kbuf)))); f[31] = 0; p += strlen(f); value = atoui(f); if (value != info->udp_dst_min) { info->udp_dst_min = value; info->cur_udp_dst = value; } sprintf(pg_result, "OK: udp_dst_min=%u", info->udp_dst_min); goto foundcmd; } len = strlen("udp_src_max "); if (!strncmp(p, "udp_src_max ", len)) { char f[32]; p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(31, (int)(count - (p - kbuf)))); f[31] = 0; p += strlen(f); value = atoui(f); if (value != info->udp_src_max) { info->udp_src_max = value; info->cur_udp_src = value; } sprintf(pg_result, "OK: udp_src_max=%u", info->udp_src_max); goto foundcmd; } len = strlen("udp_dst_max "); if (!strncmp(p, "udp_dst_max ", len)) { char f[32]; p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(31, (int)(count - (p - kbuf)))); f[31] = 0; p += strlen(f); value = atoui(f); if (value != info->udp_dst_max) { info->udp_dst_max = value; info->cur_udp_dst = value; } sprintf(pg_result, "OK: udp_dst_max=%u", info->udp_dst_max); goto foundcmd; } len = strlen("multiskb "); if (!strncmp(p, "multiskb ", len)) { char f[32]; p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(31, (int)(count - (p - kbuf)))); f[31] = 0; p += strlen(f); info->multiskb = atoui(f); sprintf(pg_result, "OK: multiskb=%d", info->multiskb); goto foundcmd; } len = strlen("peer_multiskb "); if (!strncmp(p, "peer_multiskb ", len)) { char f[32]; p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(31, (int)(count - (p - kbuf)))); f[31] = 0; p += strlen(f); info->peer_multiskb = atoui(f); sprintf(pg_result, "OK: peer_multiskb=%d", info->peer_multiskb); goto foundcmd; } len = strlen("count "); if (!strncmp(p, "count ", len)) { char f[32]; p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(31, (int)(count - (p - kbuf)))); f[31] = 0; p += strlen(f); info->count = atoui(f); sprintf(pg_result, "OK: count=%llu", info->count); goto foundcmd; } len = strlen("prot "); if (!strncmp(p, "prot ", len)) { char f[32]; p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(31, (int)(count - (p - kbuf)))); f[31] = 0; p += strlen(f); info->prot = atoui(f); sprintf(pg_result, "OK: prot=%u", info->prot); goto foundcmd; } len = strlen("src_mac_count "); if (!strncmp(p, "src_mac_count ", len)) { char f[32]; p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(31, (int)(count - (p - kbuf)))); f[31] = 0; p += strlen(f); value = atoui(f); if (info->src_mac_count != value) { info->src_mac_count = value; info->cur_src_mac_offset = 0; } sprintf(pg_result, "OK: src_mac_count=%d", info->src_mac_count); goto foundcmd; } len = strlen("dst_mac_count "); if (!strncmp(p, "dst_mac_count ", len)) { char f[32]; p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(31, (int)(count - (p - kbuf)))); f[31] = 0; p += strlen(f); value = atoui(f); if (info->dst_mac_count != value) { info->dst_mac_count = value; info->cur_dst_mac_offset = 0; } sprintf(pg_result, "OK: dst_mac_count=%d", info->dst_mac_count); goto foundcmd; } len = strlen("flag "); if (!strncmp(p, "flag ", len)) { char f[32]; p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(31, (int)(count - (p - kbuf)))); f[31] = 0; p += strlen(f); if (strcmp(f, "IPSRC_RND") == 0) { info->flags |= F_IPSRC_RND; } else if (strcmp(f, "!IPSRC_RND") == 0) { info->flags &= ~F_IPSRC_RND; } else if (strcmp(f, "TXSIZE_RND") == 0) { info->flags |= F_TXSIZE_RND; } else if (strcmp(f, "!TXSIZE_RND") == 0) { info->flags &= ~F_TXSIZE_RND; } else if (strcmp(f, "IPDST_RND") == 0) { info->flags |= F_IPDST_RND; } else if (strcmp(f, "!IPDST_RND") == 0) { info->flags &= ~F_IPDST_RND; } else if (strcmp(f, "UDPSRC_RND") == 0) { info->flags |= F_UDPSRC_RND; } else if (strcmp(f, "!UDPSRC_RND") == 0) { info->flags &= ~F_UDPSRC_RND; } else if (strcmp(f, "UDPDST_RND") == 0) { info->flags |= F_UDPDST_RND; } else if (strcmp(f, "!UDPDST_RND") == 0) { info->flags &= ~F_UDPDST_RND; } else if (strcmp(f, "MACSRC_RND") == 0) { info->flags |= F_MACSRC_RND; } else if (strcmp(f, "!MACSRC_RND") == 0) { info->flags &= ~F_MACSRC_RND; } else if (strcmp(f, "MACDST_RND") == 0) { info->flags |= F_MACDST_RND; } else if (strcmp(f, "!MACDST_RND") == 0) { info->flags &= ~F_MACDST_RND; } else if (strcmp(f, "IPMAC") == 0) { /* dhetheri */ info->flags |= F_IPMAC; /* dhetheri */ } /* dhetheri */ else if (strcmp(f, "!IPMAC") == 0) { /* dhetheri */ info->flags &= ~F_IPMAC; /* dhetheri */ } /* dhetheri */ else { sprintf(pg_result, "Flag -:%s:- unknown\nAvailable flags, (prepend ! to un-set flag):\n%s", f, "IPSRC_RND, IPDST_RND, TXSIZE_RND, UDPSRC_RND, UDPDST_RND, MACSRC_RND, MACDST_RND, IPMAC\n"); } sprintf(pg_result, "OK: flags=0x%x", info->flags); goto foundcmd; } len = strlen("dst_min "); if (!strncmp(p, "dst_min ", 6)) { char f[IP_NAME_SZ]; p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(IP_NAME_SZ-1, (int)(count - (p - kbuf)))); f[IP_NAME_SZ-1] = 0; p += strlen(f); if (strcmp(f, info->dst_min) != 0) { memset(info->dst_min, 0, sizeof(info->dst_min)); strcpy(info->dst_min, f); info->daddr_min = in_aton(info->dst_min); info->cur_daddr = info->daddr_min; } if(debug) printk("pg: dst_min set to: %s\n", info->dst_min); sprintf(pg_result, "OK: dst_min=%s", info->dst_min); goto foundcmd; } len = strlen("dst_max "); if (!strncmp(p, "dst_max ", len)) { char f[IP_NAME_SZ]; p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(IP_NAME_SZ-1, (int)(count - (p - kbuf)))); f[IP_NAME_SZ-1] = 0; p += strlen(f); if (strcmp(f, info->dst_max) != 0) { memset(info->dst_max, 0, sizeof(info->dst_max)); strcpy(info->dst_max, f); info->daddr_max = in_aton(info->dst_max); info->cur_daddr = info->daddr_max; } if(debug) printk("pg: dst_max set to: %s\n", info->dst_max); sprintf(pg_result, "OK: dst_max=%s", info->dst_max); goto foundcmd; } len = strlen("src_min "); if (!strncmp(p, "src_min ", len)) { char f[IP_NAME_SZ]; p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(IP_NAME_SZ-1, (int)(count - (p - kbuf)))); f[IP_NAME_SZ-1] = 0; p += strlen(f); if (strcmp(f, info->src_min) != 0) { memset(info->src_min, 0, sizeof(info->src_min)); strcpy(info->src_min, f); info->saddr_min = in_aton(info->src_min); info->cur_saddr = info->saddr_min; } if(debug) printk("pg: src_min set to: %s\n", info->src_min); sprintf(pg_result, "OK: src_min=%s", info->src_min); goto foundcmd; } len = strlen("src_max "); if (!strncmp(p, "src_max ", len)) { char f[IP_NAME_SZ]; p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(IP_NAME_SZ-1, (int)(count - (p - kbuf)))); f[IP_NAME_SZ-1] = 0; p += strlen(f); if (strcmp(f, info->src_max) != 0) { memset(info->src_max, 0, sizeof(info->src_max)); strcpy(info->src_max, f); info->saddr_min = in_aton(info->src_max); info->cur_saddr = info->saddr_max; } if(debug) printk("pg: src_min set to: %s\n", info->src_min); sprintf(pg_result, "OK: src_max=%s", info->src_max); goto foundcmd; } len = strlen("dst_max "); if (!strncmp(p, "dst_mac ", len)) { char f[IP_NAME_SZ]; unsigned char old_dmac[6]; unsigned char *m = info->dst_mac; char* v = f; memcpy(old_dmac, info->dst_mac, 6); p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(IP_NAME_SZ-1, (int)(count - (p - kbuf)))); f[IP_NAME_SZ-1] = 0; p += strlen(f); for(*m = 0;*v && m < info->dst_mac + 6; v++) { if (*v >= '0' && *v <= '9') { *m *= 16; *m += *v - '0'; } if (*v >= 'A' && *v <= 'F') { *m *= 16; *m += *v - 'A' + 10; } if (*v >= 'a' && *v <= 'f') { *m *= 16; *m += *v - 'a' + 10; } if (*v == ':') { m++; *m = 0; } } if (memcmp(old_dmac, info->dst_mac, 6) != 0) { /* Set up Dest MAC */ memcpy(&(info->hh[0]), info->dst_mac, 6); } sprintf(pg_result, "OK: dstmac"); goto foundcmd; } len = strlen("src_mac "); if (!strncmp(p, "src_mac ", len)) { char f[IP_NAME_SZ]; char* v = f; unsigned char old_smac[6]; unsigned char *m = info->src_mac; memcpy(old_smac, info->src_mac, 6); p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(IP_NAME_SZ-1, (int)(count - (p - kbuf)))); f[IP_NAME_SZ-1] = 0; p += strlen(f); for(*m = 0;*v && m < info->src_mac + 6; v++) { if (*v >= '0' && *v <= '9') { *m *= 16; *m += *v - '0'; } if (*v >= 'A' && *v <= 'F') { *m *= 16; *m += *v - 'A' + 10; } if (*v >= 'a' && *v <= 'f') { *m *= 16; *m += *v - 'a' + 10; } if (*v == ':') { m++; *m = 0; } } if (memcmp(old_smac, info->src_mac, 6) != 0) { /* Default to the interface's mac if not explicitly set. */ if ((!(info->flags & F_SET_SRCMAC)) && info->odev) { memcpy(&(info->hh[6]), info->odev->dev_addr, 6); } else { memcpy(&(info->hh[6]), info->src_mac, 6); } } sprintf(pg_result, "OK: srcmac"); goto foundcmd; } len = strlen("clear_counters"); if (!strncmp(p, "clear_counters", len)) { p += len; pg_clear_counters(info, 0); sprintf(pg_result, "OK: Clearing counters...\n"); goto foundcmd; } if (!strncmp(p, "inject", 6) || !strncmp(p, "start", 5)) { if (strncmp(p, "start", 5) == 0) { p += 5; } else { p += 6; } if (info->do_run_run) { strcpy(info->result, "Already running...\n"); sprintf(pg_result, "Already running...\n"); } else { int rv; if ((rv = pg_start_interface(info->pg_thread, info)) >= 0) { strcpy(info->result, "Starting"); sprintf(pg_result, "Starting"); } else { sprintf(info->result, "Error starting: %i\n", rv); sprintf(pg_result, "Error starting: %i\n", rv); } } goto foundcmd; } printk("Pktgen:pg_if_write: Unknown command -:%20s:-\n", p); p++; foundcmd: if (debug & 0x1000) { printk("Command succeeded.\n"); } }/* while */ kfree(kbuf); return count; }/* proc_pg_if_write */ static int proc_pg_ctrl_write(struct file *file, const char *user_buffer, unsigned long count, void *data) { char name[16]; struct pktgen_thread_info* pg_thread = NULL; char* kbuf; char* p; int len; if (count < 1) { return -EINVAL; } kbuf = kmalloc(count, GFP_KERNEL); if (copy_from_user(kbuf, user_buffer, count)) { kfree(kbuf); return -EFAULT; } p = kbuf; while (p < (kbuf + count)) { p += count_trail_chars(p, (int)(count - (p - kbuf))); if (p >= (kbuf + count)) { break; } /* Read variable name */ if (debug) { printk("pg_thread: %s,%lu\n", name, count); } len = strlen("stop "); if (!strncmp(p, "stop ", len)) { char f[32]; p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(31, (int)(count - (p - kbuf)))); f[31] = 0; p += strlen(f); pg_thread = pg_find_thread(f); if (pg_thread) { printk("pktgen INFO: stopping thread: %s\n", pg_thread->name); stop_pktgen_kthread(pg_thread); } goto foundcmd; } len = strlen("start "); if (!strncmp(p, "start ", len)) { char f[32]; p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(31, (int)(count - (p - kbuf)))); f[31] = 0; p += strlen(f); pg_add_thread_info(f); goto foundcmd; } printk("Pktgen:pgctrl_write: Unknown command -:%20s:-\n", p); p++; foundcmd: if (debug & 0x1000) { printk("Command handled successfully.\n"); } }/* while */ kfree(kbuf); return count; }/* proc_pg_ctrl_write */ static int proc_pg_thread_write(struct file *file, const char *user_buffer, unsigned long count, void *data) { char name[16]; struct pktgen_thread_info* pg_thread = (struct pktgen_thread_info*)(data); char* pg_result = &(pg_thread->result[0]); char* kbuf; char* p; int len; if (count < 1) { sprintf(pg_result, "Wrong command format"); return -EINVAL; } kbuf = kmalloc(count, GFP_KERNEL); if (copy_from_user(kbuf, user_buffer, count)) { kfree(kbuf); return -EFAULT; } p = kbuf; while (p < (kbuf + count)) { p += count_trail_chars(p, (int)(count - (p - kbuf))); if (p >= (kbuf + count)) { break; } /* Read variable name */ if (debug) { printk("pg_thread: %s,%lu\n", name, count); } len = strlen("add_interface "); if (!strncmp(p, "add_interface ", len)) { char f[32]; p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(31, (int)(count - (p - kbuf)))); f[31] = 0; p += strlen(f); pg_add_interface_info(pg_thread, f); goto foundcmd; } len = strlen("rem_interface "); if (!strncmp(p, "rem_interface ", len)) { struct pktgen_interface_info* info = NULL; char f[32]; p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(31, (int)(count - (p - kbuf)))); f[31] = 0; p += strlen(f); info = pg_find_interface(pg_thread, f); if (info) { pg_rem_interface_info(pg_thread, info); } else { printk("ERROR: Interface: %s is not found.\n", f); } goto foundcmd; } len = strlen("max_before_softirq "); if (!strncmp(p, "max_before_softirq", len)) { char f[32]; p += len; p += count_trail_chars(p, (int)(count - (p - kbuf))); strncpy_token(f, p, min(31, (int)(count - (p - kbuf)))); f[31] = 0; p += strlen(f); pg_thread->max_before_softirq = atoui(f); goto foundcmd; } printk("Pktgen:pg_thread_write: Unknown command -:%20s:-\n", p); p++; foundcmd: strcpy(pg_result, "ok"); } kfree(kbuf); return count; }/* proc_pg_thread_write */ int create_proc_dir(void) { int len; /* does proc_dir already exists */ len = strlen(PG_PROC_DIR); for (pg_proc_dir = proc_net->subdir; pg_proc_dir; pg_proc_dir=pg_proc_dir->next) { if ((pg_proc_dir->namelen == len) && (! memcmp(pg_proc_dir->name, PG_PROC_DIR, len))) { break; } } if (!pg_proc_dir) { pg_proc_dir = create_proc_entry(PG_PROC_DIR, S_IFDIR, proc_net); } if (!pg_proc_dir) { return -ENODEV; } return 0; } int remove_proc_dir(void) { remove_proc_entry(PG_PROC_DIR, proc_net); return 0; } static struct pktgen_interface_info* pg_find_interface(struct pktgen_thread_info* pg_thread, const char* ifname) { struct pktgen_interface_info* rv = NULL; pg_lock(pg_thread, __FUNCTION__); if (pg_thread->cur_if && (strcmp(pg_thread->cur_if->ifname, ifname) == 0)) { rv = pg_thread->cur_if; goto found; } rv = pg_thread->running_if_infos; while (rv) { if (strcmp(rv->ifname, ifname) == 0) { goto found; } rv = rv->next; } rv = pg_thread->stopped_if_infos; while (rv) { if (strcmp(rv->ifname, ifname) == 0) { goto found; } rv = rv->next; } found: pg_unlock(pg_thread, __FUNCTION__); return rv; }/* pg_find_interface */ static int pg_add_interface_info(struct pktgen_thread_info* pg_thread, const char* ifname) { struct pktgen_interface_info* i = pg_find_interface(pg_thread, ifname); if (!i) { i = kmalloc(sizeof(struct pktgen_interface_info), GFP_KERNEL); if (!i) { return -ENOMEM; } memset(i, 0, sizeof(struct pktgen_interface_info)); i->min_pkt_size = ETH_ZLEN; i->max_pkt_size = ETH_ZLEN; i->nfrags = 0; i->multiskb = pg_multiskb_d; i->peer_multiskb = 0; i->ipg = pg_ipg_d; i->count = pg_count_d; i->sofar = 0; i->hh[12] = 0x08; /* fill in protocol. Rest is filled in later. */ i->hh[13] = 0x00; i->udp_src_min = 9; /* sink NULL */ i->udp_src_max = 9; i->udp_dst_min = 9; i->udp_dst_max = 9; i->rcv = pktgen_receive; strncpy(i->ifname, ifname, 31); sprintf(i->fname, "net/%s/%s", PG_PROC_DIR, ifname); if (! pg_setup_interface(i)) { printk("ERROR: pg_setup_interface failed.\n"); kfree(i); return -ENODEV; } i->proc_ent = create_proc_entry(i->fname, 0600, 0); if (!i->proc_ent) { printk("pktgen: Error: cannot create %s procfs entry.\n", i->fname); kfree(i); return -EINVAL; } i->proc_ent->read_proc = proc_pg_if_read; i->proc_ent->write_proc = proc_pg_if_write; i->proc_ent->data = (void*)(i); i->proc_ent->owner = THIS_MODULE; return add_interface_to_thread(pg_thread, i); } else { printk("ERROR: interface already exists.\n"); return -EBUSY; } }/* pg_add_interface_info */ /* return the first !in_use thread structure */ static struct pktgen_thread_info* pg_gc_thread_list_helper(void) { struct pktgen_thread_info* rv = NULL; pg_lock_thread_list(__FUNCTION__); rv = pktgen_threads; while (rv) { if (!rv->in_use) { break; } rv = rv->next; } pg_unlock_thread_list(__FUNCTION__); return rv; }/* pg_find_thread */ static void pg_gc_thread_list(void) { struct pktgen_thread_info* t = NULL; struct pktgen_thread_info* w = NULL; while ((t = pg_gc_thread_list_helper())) { pg_lock_thread_list(__FUNCTION__); if (pktgen_threads == t) { pktgen_threads = t->next; kfree(t); } else { w = pktgen_threads; while (w) { if (w->next == t) { w->next = t->next; t->next = NULL; kfree(t); break; } w = w->next; } } pg_unlock_thread_list(__FUNCTION__); } }/* pg_gc_thread_list */ static struct pktgen_thread_info* pg_find_thread(const char* name) { struct pktgen_thread_info* rv = NULL; pg_gc_thread_list(); pg_lock_thread_list(__FUNCTION__); rv = pktgen_threads; while (rv) { if (strcmp(rv->name, name) == 0) { break; } rv = rv->next; } pg_unlock_thread_list(__FUNCTION__); return rv; }/* pg_find_thread */ static int pg_add_thread_info(const char* name) { struct pktgen_thread_info* pg_thread = NULL; if (strlen(name) > 31) { printk("pktgen ERROR: Thread name cannot be more than 31 characters.\n"); return -EINVAL; } if (pg_find_thread(name)) { printk("pktgen ERROR: Thread: %s already exists\n", name); return -EINVAL; } pg_thread = (struct pktgen_thread_info*)(kmalloc(sizeof(struct pktgen_thread_info), GFP_KERNEL)); if (!pg_thread) { printk("pktgen: ERROR: out of memory, can't create new thread.\n"); return -ENOMEM; } memset(pg_thread, 0, sizeof(struct pktgen_thread_info)); strcpy(pg_thread->name, name); spin_lock_init(&(pg_thread->pg_threadlock)); pg_thread->in_use = 1; pg_thread->max_before_softirq = 10000000; sprintf(pg_thread->fname, "net/%s/%s", PG_PROC_DIR, pg_thread->name); pg_thread->proc_ent = create_proc_entry(pg_thread->fname, 0600, 0); if (!pg_thread->proc_ent) { printk("pktgen: Error: cannot create %s procfs entry.\n", pg_thread->fname); kfree(pg_thread); return -EINVAL; } pg_thread->proc_ent->read_proc = proc_pg_thread_read; pg_thread->proc_ent->write_proc = proc_pg_thread_write; pg_thread->proc_ent->data = (void*)(pg_thread); pg_thread->proc_ent->owner = THIS_MODULE; pg_thread->next = pktgen_threads; pktgen_threads = pg_thread; /* Start the thread running */ start_pktgen_kthread(pg_thread); return 0; }/* pg_add_thread_info */ /* interface_info must be stopped and on the pg_thread stopped list */ static int pg_rem_interface_info(struct pktgen_thread_info* pg_thread, struct pktgen_interface_info* info) { if (info->do_run_run) { printk("WARNING: trying to remove a running interface, stopping it now.\n"); pg_stop_interface(pg_thread, info); } /* Diss-associate from the interface */ check_remove_device(info); /* Clean up proc file system */ if (strlen(info->fname)) { remove_proc_entry(info->fname, NULL); } pg_lock(pg_thread, __FUNCTION__); { /* Remove from the stopped list */ struct pktgen_interface_info* p = pg_thread->stopped_if_infos; if (p == info) { pg_thread->stopped_if_infos = p->next; p->next = NULL; } else { while (p) { if (p->next == info) { p->next = p->next->next; info->next = NULL; break; } p = p->next; } } info->pg_thread = NULL; } pg_unlock(pg_thread, __FUNCTION__); return 0; }/* pg_rem_interface_info */ static int __init pg_init(void) { int i; printk(version); /* Initialize our global variables */ for (i = 0; iread_proc = proc_pg_ctrl_read; module_proc_ent->write_proc = proc_pg_ctrl_write; module_proc_ent->proc_fops = &(pktgen_fops); /* IOCTL hook */ module_proc_ent->data = NULL; module_proc_ent->owner = THIS_MODULE; /* Register us to receive netdevice events */ register_netdevice_notifier(&pktgen_notifier_block); /* Register handler */ handle_pktgen_hook = pktgen_receive; for (i = 0; i"); MODULE_DESCRIPTION("Packet Generator tool"); MODULE_LICENSE("GPL"); MODULE_PARM(pg_count_d, "i"); MODULE_PARM(pg_ipg_d, "i"); MODULE_PARM(pg_thread_count, "i"); MODULE_PARM(pg_multiskb_d, "i"); MODULE_PARM(debug, "i"); --------------020306080600040204070804 Content-Type: text/plain; name="pktgen.h" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="pktgen.h" /* -*-linux-c-*- * $Id: pg_patch.txt,v 1.2 2002/07/07 07:23:50 greear Exp $ * pktgen.c: Packet Generator for performance evaluation. * * See pktgen.c for details of changes, etc. */ #ifndef PKTGEN_H_INCLUDE_KERNEL__ #define PKTGEN_H_INCLUDE_KERNEL__ /* The buckets are exponential in 'width' */ #define LAT_BUCKETS_MAX 32 #define IP_NAME_SZ 32 #define PG_MAX_ACCUM_DELAY_NS 1000000 /* one ms */ /* Keep information per interface */ struct pktgen_interface_info { char ifname[32]; /* Parameters */ /* If min != max, then we will either do a linear iteration, or * we will do a random selection from within the range. */ __u32 flags; #define F_IPSRC_RND (1<<0) /* IP-Src Random */ #define F_IPDST_RND (1<<1) /* IP-Dst Random */ #define F_UDPSRC_RND (1<<2) /* UDP-Src Random */ #define F_UDPDST_RND (1<<3) /* UDP-Dst Random */ #define F_MACSRC_RND (1<<4) /* MAC-Src Random */ #define F_MACDST_RND (1<<5) /* MAC-Dst Random */ #define F_SET_SRCMAC (1<<6) /* Specify-Src-Mac (default is to use Interface's MAC Addr) */ #define F_SET_SRCIP (1<<7) /* Specify-Src-IP (default is to use Interface's IP Addr) */ #define F_TXSIZE_RND (1<<8) /* Transmit size is random */ #define F_IPMAC (1<<9) /* MAC address = 00:00:IP address (dhetheri) */ int min_pkt_size; /* = ETH_ZLEN; */ int max_pkt_size; /* = ETH_ZLEN; */ int nfrags; __u32 ipg; /* Default Interpacket gap in nsec */ __u64 count; /* Default No packets to send */ __u64 sofar; /* How many pkts we've sent so far */ __u64 tx_bytes; /* How many bytes we've transmitted */ __u64 errors; /* Errors when trying to transmit, pkts will be re-sent */ /* runtime counters relating to multiskb */ __u64 next_tx_ns; /* timestamp of when to tx next, in nano-seconds */ __u64 fp; __u32 fp_tmp; int last_ok; /* Was last skb sent? * Or a failed transmit of some sort? This will keep * sequence numbers in order, for example. */ /* Fields relating to receiving pkts */ __u32 last_seq_rcvd; __u64 ooo_rcvd; /* out-of-order packets received */ __u64 pkts_rcvd; /* packets received */ __u64 dup_rcvd; /* duplicate packets received */ __u64 bytes_rcvd; /* total bytes received, as obtained from the skb */ __u64 seq_gap_rcvd; /* how many gaps we received. This coorelates to * dropped pkts, except perhaps in cases where we also * have re-ordered pkts. In that case, you have to tie-break * by looking at send v/s received pkt totals for the interfaces * involved. */ __u64 non_pg_pkts_rcvd; /* Count how many non-pktgen skb's we are sent to check. */ __u64 dup_since_incr; /* How many dumplicates since the last seq number increment, * used to detect gaps when multiskb > 1 */ int avg_latency; /* in micro-seconds */ int min_latency; int max_latency; __u64 latency_bkts[LAT_BUCKETS_MAX]; __u64 pkts_rcvd_since_clear; /* with regard to clearing/resetting the latency logic */ __u64 started_at; /* micro-seconds */ __u64 stopped_at; /* micro-seconds */ __u64 idle_acc; __u32 seq_num; int multiskb; /* Use multiple SKBs during packet gen. If this number * is greater than 1, then that many coppies of the same * packet will be sent before a new packet is allocated. * For instance, if you want to send 1024 identical packets * before creating a new packet, set multiskb to 1024. */ int peer_multiskb; /* Helps detect drops when multiskb > 1 on peer */ int do_run_run; /* if this changes to false, the test will stop */ char dst_min[IP_NAME_SZ]; /* IP, ie 1.2.3.4 */ char dst_max[IP_NAME_SZ]; /* IP, ie 1.2.3.4 */ char src_min[IP_NAME_SZ]; /* IP, ie 1.2.3.4 */ char src_max[IP_NAME_SZ]; /* IP, ie 1.2.3.4 */ /* If we're doing ranges, random or incremental, then this * defines the min/max for those ranges. */ __u32 saddr_min; /* inclusive, source IP address */ __u32 saddr_max; /* exclusive, source IP address */ __u32 daddr_min; /* inclusive, dest IP address */ __u32 daddr_max; /* exclusive, dest IP address */ __u16 udp_src_min; /* inclusive, source UDP port */ __u16 udp_src_max; /* exclusive, source UDP port */ __u16 udp_dst_min; /* inclusive, dest UDP port */ __u16 udp_dst_max; /* exclusive, dest UDP port */ __u32 src_mac_count; /* How many MACs to iterate through */ __u32 dst_mac_count; /* How many MACs to iterate through */ unsigned char dst_mac[6]; unsigned char src_mac[6]; __u32 cur_dst_mac_offset; __u32 cur_src_mac_offset; __u32 cur_saddr; __u32 cur_daddr; __u16 cur_udp_dst; __u16 cur_udp_src; __u32 cur_pkt_size; __u8 hh[14]; /* = { 0x00, 0x80, 0xC8, 0x79, 0xB3, 0xCB, We fill in SRC address later 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00 }; */ __u16 prot; /* pad out the hh struct to an even 16 bytes, prot can * be used to specify an IP protocol too (default is 0, * which implies UDP */ char result[512]; /* proc file names */ char fname[80]; /* End of stuff that user-space should care about */ long long accum_delay_ns; /* Used to sleep small amounts on average, w/out spinning */ __u32 sleeps; /* How many times did it sleep on the wait queue? */ __u32 queue_stopped; /* How many times was our network device queue stopped? */ __u64 nanodelays; /* How many times has the nano-delay method been called? */ struct sk_buff* skb; /* skb we are to transmit next, mainly used for when we * are transmitting the same one multiple times */ struct pktgen_thread_info* pg_thread; /* the owner */ struct pktgen_interface_info* next_hash; /* Used for chaining in the hash buckets */ struct pktgen_interface_info* next; /* Used for chaining in the thread's run-queue */ struct net_device* odev; /* The out-going device. Note that the device should * have it's pg_info pointer pointing back to this * device. This will be set when the user specifies * the out-going device name (not when the inject is * started as it used to do.) */ struct proc_dir_entry *proc_ent; int (*rcv) (struct sk_buff *skb); }; /* pktgen_interface_info */ struct pktgen_hdr { __u32 pgh_magic; __u32 seq_num; struct timeval timestamp; }; /* Define some IOCTLs. Just picking random numbers, basically. */ #define GET_PKTGEN_INTERFACE_INFO 0x7450 struct pktgen_ioctl_info { char thread_name[32]; char interface_name[32]; struct pktgen_interface_info info; }; struct pktgen_thread_info { struct pktgen_interface_info* running_if_infos; /* list of running interfaces, current will * not be in this list. */ struct pktgen_interface_info* stopped_if_infos; /* list of stopped interfaces. */ struct pktgen_interface_info* cur_if; /* Current (running) interface we are servicing in * the main thread loop. */ int running_if_sz; struct pktgen_thread_info* next; char name[32]; char fname[128]; /* name of proc file */ struct proc_dir_entry *proc_ent; char result[512]; u32 max_before_softirq; /* We'll call do_softirq to prevent starvation. */ spinlock_t pg_threadlock; /* Linux task structure of thread */ struct task_struct *thread; /* Task queue need to launch thread */ struct work_struct wq; /* function to be started as thread */ void (*function) (struct pktgen_thread_info *kthread); /* semaphore needed on start and creation of thread. */ struct semaphore startstop_sem; /* public data */ /* queue thread is waiting on. Gets initialized by init_kthread, can be used by thread itself. */ wait_queue_head_t queue; /* flag to tell thread whether to die or not. When the thread receives a signal, it must check the value of terminate and call exit_kthread and terminate if set. */ int terminate; int in_use; /* if 0, then we can delete or re-use this struct */ u32 queues_stopped; /* How many times were all queues blocked */ char sleeping; /* Are we sleeping or not */ char pad[3]; /* additional data to pass to kernel thread */ void *arg; };/* struct pktgen_thread_info */ /* Defined in dev.c */ extern int (*handle_pktgen_hook)(struct sk_buff *skb); /* Returns < 0 if the skb is not a pktgen buffer. */ int pktgen_receive(struct sk_buff* skb); #endif --------------020306080600040204070804-- From ravinandan.arakali@s2io.com Wed Oct 6 17:58:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 17:58:11 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i970w4iP021635 for ; Wed, 6 Oct 2004 17:58:05 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i970vTje003757; Wed, 6 Oct 2004 20:57:29 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i970vK39008849; Wed, 6 Oct 2004 20:57:20 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , Subject: [PATCH 2.6.9-rc2 1/8] S2io: cosmetic changes Date: Wed, 6 Oct 2004 18:04:47 -0700 Message-ID: <005e01c4ac09$a49d6c80$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_005F_01C4ABCE.F83E9480" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-Reply-To: <4164773A.1090907@pobox.com> Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 9996 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Content-Length: 131242 Lines: 4267 This is a multi-part message in MIME format. ------=_NextPart_000_005F_01C4ABCE.F83E9480 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, I'm resending the first patch which has cosmetic changes such as indentation, change in comment styles, variable name changes. I'll follow up with subsequent patches. Thanks, Ravi ------=_NextPart_000_005F_01C4ABCE.F83E9480 Content-Type: application/octet-stream; name="s2io_cosmetic.patch1" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="s2io_cosmetic.patch1" diff -urN vanilla-linux/drivers/net/s2io.c = linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-06 11:31:09.552305224 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-06 13:03:08.087360376 -0700 @@ -69,7 +69,7 @@ =20 /* S2io Driver name & version. */ static char s2io_driver_name[] =3D "s2io"; -static char s2io_driver_version[] =3D "Version 1.0"; +static char s2io_driver_version[] =3D "Version 1.7.5.1"; =20 #define LINK_IS_UP(val64) (!(val64 & (ADAPTER_STATUS_RMAC_REMOTE_FAULT = | \ ADAPTER_STATUS_RMAC_LOCAL_FAULT))) @@ -99,45 +99,45 @@ }; =20 static char ethtool_stats_keys[][ETH_GSTRING_LEN] =3D { - "tmac_frms", - "tmac_data_octets", - "tmac_drop_frms", - "tmac_mcst_frms", - "tmac_bcst_frms", - "tmac_pause_ctrl_frms", - "tmac_any_err_frms", - "tmac_vld_ip_octets", - "tmac_vld_ip", - "tmac_drop_ip", - "tmac_icmp", - "tmac_rst_tcp", - "tmac_tcp", - "tmac_udp", - "rmac_vld_frms", - "rmac_data_octets", - "rmac_fcs_err_frms", - "rmac_drop_frms", - "rmac_vld_mcst_frms", - "rmac_vld_bcst_frms", - "rmac_in_rng_len_err_frms", - "rmac_long_frms", - "rmac_pause_ctrl_frms", - "rmac_discarded_frms", - "rmac_usized_frms", - "rmac_osized_frms", - "rmac_frag_frms", - "rmac_jabber_frms", - "rmac_ip", - "rmac_ip_octets", - "rmac_hdr_err_ip", - "rmac_drop_ip", - "rmac_icmp", - "rmac_tcp", - "rmac_udp", - "rmac_err_drp_udp", - "rmac_pause_cnt", - "rmac_accepted_ip", - "rmac_err_tcp", + {"tmac_frms"}, + {"tmac_data_octets"}, + {"tmac_drop_frms"}, + {"tmac_mcst_frms"}, + {"tmac_bcst_frms"}, + {"tmac_pause_ctrl_frms"}, + {"tmac_any_err_frms"}, + {"tmac_vld_ip_octets"}, + {"tmac_vld_ip"}, + {"tmac_drop_ip"}, + {"tmac_icmp"}, + {"tmac_rst_tcp"}, + {"tmac_tcp"}, + {"tmac_udp"}, + {"rmac_vld_frms"}, + {"rmac_data_octets"}, + {"rmac_fcs_err_frms"}, + {"rmac_drop_frms"}, + {"rmac_vld_mcst_frms"}, + {"rmac_vld_bcst_frms"}, + {"rmac_in_rng_len_err_frms"}, + {"rmac_long_frms"}, + {"rmac_pause_ctrl_frms"}, + {"rmac_discarded_frms"}, + {"rmac_usized_frms"}, + {"rmac_osized_frms"}, + {"rmac_frag_frms"}, + {"rmac_jabber_frms"}, + {"rmac_ip"}, + {"rmac_ip_octets"}, + {"rmac_hdr_err_ip"}, + {"rmac_drop_ip"}, + {"rmac_icmp"}, + {"rmac_tcp"}, + {"rmac_udp"}, + {"rmac_err_drp_udp"}, + {"rmac_pause_cnt"}, + {"rmac_accepted_ip"}, + {"rmac_err_tcp"}, }; =20 #define S2IO_STAT_LEN sizeof(ethtool_stats_keys)/ ETH_GSTRING_LEN @@ -147,7 +147,8 @@ #define S2IO_STRINGS_LEN S2IO_TEST_LEN * ETH_GSTRING_LEN =20 =20 -/* Constants to be programmed into the Xena's registers to configure +/*=20 + * Constants to be programmed into the Xena's registers, to configure * the XAUI. */ =20 @@ -188,7 +189,9 @@ END_SIGN }; =20 -/* Constants for Fixing the MacAddress problem seen mostly on + +/*=20 + * Constants for Fixing the MacAddress problem seen mostly on * Alpha machines. */ static u64 fix_mac[] =3D { @@ -209,7 +212,6 @@ END_SIGN }; =20 - /* Module Loadable parameters. */ static u32 ring_num; static u32 frame_len[MAX_RX_RINGS]; @@ -218,7 +220,7 @@ static u32 fifo_len[MAX_TX_FIFOS]; static u32 rx_prio; static u32 tx_prio; -static u8 latency_timer =3D 0; +static u8 latency_timer; =20 /*=20 * S2IO device table. @@ -241,17 +243,15 @@ remove:__devexit_p(s2io_rem_nic), }; =20 -/* =20 - * Input Arguments:=20 - * Device private variable. - * Return Value:=20 - * SUCCESS on success and an appropriate -ve value on failure. - * Description:=20 - * The function allocates the all memory areas shared=20 - * between the NIC and the driver. This includes Tx descriptors,=20 - * Rx descriptors and the statistics block. +/** + * init_shared_mem - Allocation and Initialization of Memory + * @nic: Device private variable. + * Description: The function allocates all the memory areas shared=20 + * between the NIC and the driver. This includes Tx descriptors,=20 + * Rx descriptors and the statistics block. */ -static int initSharedMem(struct s2io_nic *nic) + +static int init_shared_mem(struct s2io_nic *nic) { u32 size; void *tmp_v_addr, *tmp_v_addr_next; @@ -269,8 +269,8 @@ =20 /* Allocation and initialization of TXDLs in FIOFs */ size =3D 0; - for (i =3D 0; i < config->TxFIFONum; i++) { - size +=3D config->TxCfg[i].FifoLen; + for (i =3D 0; i < config->tx_fifo_num; i++) { + size +=3D config->tx_cfg[i].fifo_len; } if (size > MAX_AVAILABLE_TXDS) { DBG_PRINT(ERR_DBG, "%s: Total number of Tx FIFOs ", @@ -279,7 +279,7 @@ DBG_PRINT(ERR_DBG, "that can be used\n"); return FAILURE; } - size *=3D (sizeof(TxD_t) * config->MaxTxDs); + size *=3D (sizeof(TxD_t) * config->max_txds); =20 mac_control->txd_list_mem =3D pci_alloc_consistent (nic->pdev, size, &mac_control->txd_list_mem_phy); @@ -295,61 +295,60 @@ DBG_PRINT(INIT_DBG, "%s:List Mem PHY: 0x%llx\n", dev->name, (unsigned long long) tmp_p_addr); =20 - for (i =3D 0; i < config->TxFIFONum; i++) { + for (i =3D 0; i < config->tx_fifo_num; i++) { mac_control->txdl_start_phy[i] =3D tmp_p_addr; mac_control->txdl_start[i] =3D (TxD_t *) tmp_v_addr; mac_control->tx_curr_put_info[i].offset =3D 0; mac_control->tx_curr_put_info[i].fifo_len =3D - config->TxCfg[i].FifoLen - 1; + config->tx_cfg[i].fifo_len - 1; mac_control->tx_curr_get_info[i].offset =3D 0; mac_control->tx_curr_get_info[i].fifo_len =3D - config->TxCfg[i].FifoLen - 1; + config->tx_cfg[i].fifo_len - 1; =20 tmp_p_addr +=3D - (config->TxCfg[i].FifoLen * (sizeof(TxD_t)) * - config->MaxTxDs); + (config->tx_cfg[i].fifo_len * (sizeof(TxD_t)) * + config->max_txds); tmp_v_addr +=3D - (config->TxCfg[i].FifoLen * (sizeof(TxD_t)) * - config->MaxTxDs); + (config->tx_cfg[i].fifo_len * (sizeof(TxD_t)) * + config->max_txds); } =20 /* Allocation and initialization of RXDs in Rings */ size =3D 0; - for (i =3D 0; i < config->RxRingNum; i++) { - if (config->RxCfg[i].NumRxd % (MAX_RXDS_PER_BLOCK + 1)) { + for (i =3D 0; i < config->rx_ring_num; i++) { + if (config->rx_cfg[i].num_rxd % (MAX_RXDS_PER_BLOCK + 1)) { DBG_PRINT(ERR_DBG, "%s: RxD count of ", dev->name); DBG_PRINT(ERR_DBG, "Ring%d is not a multiple of ", i); DBG_PRINT(ERR_DBG, "RxDs per Block"); return FAILURE; } - size +=3D config->RxCfg[i].NumRxd; + size +=3D config->rx_cfg[i].num_rxd; nic->block_count[i] =3D - config->RxCfg[i].NumRxd / (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1); nic->pkt_cnt[i] =3D - config->RxCfg[i].NumRxd - nic->block_count[i]; + config->rx_cfg[i].num_rxd - nic->block_count[i]; } - size =3D (size * (sizeof(RxD_t))); - mac_control->rxd_ring_mem_sz =3D size; =20 - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { mac_control->rx_curr_get_info[i].block_index =3D 0; mac_control->rx_curr_get_info[i].offset =3D 0; mac_control->rx_curr_get_info[i].ring_len =3D - config->RxCfg[i].NumRxd - 1; + config->rx_cfg[i].num_rxd - 1; mac_control->rx_curr_put_info[i].block_index =3D 0; mac_control->rx_curr_put_info[i].offset =3D 0; mac_control->rx_curr_put_info[i].ring_len =3D - config->RxCfg[i].NumRxd - 1; + config->rx_cfg[i].num_rxd - 1; blk_cnt =3D - config->RxCfg[i].NumRxd / (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1); /* Allocating all the Rx blocks */ for (j =3D 0; j < blk_cnt; j++) { size =3D (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t)); tmp_v_addr =3D pci_alloc_consistent(nic->pdev, size, &tmp_p_addr); if (tmp_v_addr =3D=3D NULL) { - /* In case of failure, freeSharedMem()=20 + /* + * In case of failure, free_shared_mem()=20 * is called, which should free any=20 * memory that was alloced till the=20 * failure happened. @@ -390,7 +389,8 @@ (nic->pdev, size, &mac_control->stats_mem_phy); =20 if (!mac_control->stats_mem) { - /* In case of failure, freeSharedMem() is called, which=20 + /*=20 + * In case of failure, free_shared_mem() is called, which=20 * should free any memory that was alloced till the=20 * failure happened. */ @@ -399,7 +399,7 @@ mac_control->stats_mem_sz =3D size; =20 tmp_v_addr =3D mac_control->stats_mem; - mac_control->StatsInfo =3D (StatInfo_t *) tmp_v_addr; + mac_control->stats_info =3D (StatInfo_t *) tmp_v_addr; memset(tmp_v_addr, 0, size); =20 DBG_PRINT(INIT_DBG, "%s:Ring Mem PHY: 0x%llx\n", dev->name, @@ -408,16 +408,14 @@ return SUCCESS; } =20 -/* =20 - * Input Arguments:=20 - * Device peivate variable. - * Return Value:=20 - * NONE - * Description:=20 - * This function is to free all memory locations allocated by - * the initSharedMem() function and return it to the kernel. +/** =20 + * free_shared_mem - Free the allocated Memory=20 + * @nic: Device private variable. + * Description: This function is to free all memory locations allocated = by + * the init_shared_mem() function and return it to the kernel. */ -static void freeSharedMem(struct s2io_nic *nic) + +static void free_shared_mem(struct s2io_nic *nic) { int i, j, blk_cnt, size; void *tmp_v_addr; @@ -440,7 +438,7 @@ } =20 size =3D (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t)); - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { blk_cnt =3D nic->block_count[i]; for (j =3D 0; j < blk_cnt; j++) { tmp_v_addr =3D nic->rx_blocks[i][j].block_virt_addr; @@ -452,6 +450,7 @@ } } =20 + if (mac_control->stats_mem) { pci_free_consistent(nic->pdev, mac_control->stats_mem_sz, @@ -460,16 +459,16 @@ } } =20 -/* =20 - * Input Arguments:=20 - * device peivate variable - * Return Value:=20 - * SUCCESS on success and '-1' on failure (endian settings incorrect). - * Description:=20 - * The function sequentially configures every block=20 +/** =20 + * init_nic - Initialization of hardware=20 + * @nic: device peivate variable + * Description: The function sequentially configures every block=20 * of the H/W from their reset values.=20 + * Return Value: SUCCESS on success and=20 + * '-1' on failure (endian settings incorrect). */ -static int initNic(struct s2io_nic *nic) + +static int init_nic(struct s2io_nic *nic) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; struct net_device *dev =3D nic->dev; @@ -485,11 +484,13 @@ mac_control =3D &nic->mac_control; config =3D &nic->config; =20 - /* Set proper endian settings and verify the same by=20 - * reading the PIF Feed-back register. + /*=20 + * Set proper endian settings and verify the same by=20 + * reading the PIF Feed-back register. */ #ifdef __BIG_ENDIAN - /* The device by default set to a big endian format, so=20 + /* + * The device by default set to a big endian format, so=20 * a big endian driver need not set anything. */ writeq(0xffffffffffffffffULL, &bar0->swapper_ctrl); @@ -510,7 +511,8 @@ SWAPPER_CTRL_STATS_FE | SWAPPER_CTRL_STATS_SE); writeq(val64, &bar0->swapper_ctrl); #else - /* Initially we enable all bits to make it accessible by=20 + /*=20 + * Initially we enable all bits to make it accessible by=20 * the driver, then we selectively enable only those bits=20 * that we want to set. */ @@ -537,8 +539,9 @@ writeq(val64, &bar0->swapper_ctrl); #endif =20 - /* Verifying if endian settings are accurate by reading=20 - * a feedback register. + /*=20 + * Verifying if endian settings are accurate by=20 + * reading a feedback register. */ val64 =3D readq(&bar0->pif_rd_swapper_fb); if (val64 !=3D 0x0123456789ABCDEFULL) { @@ -573,8 +576,9 @@ val64 =3D dev->mtu; writeq(vBIT(val64, 2, 14), &bar0->rmac_max_pyld_len); =20 - /* Configuring the XAUI Interface of Xena.=20 - ***************************************** + /*=20 + * Configuring the XAUI Interface of Xena.=20 + * *************************************** * To Configure the Xena's XAUI, one has to write a series=20 * of 64 bit values into two registers in a particular=20 * sequence. Hence a macro 'SWITCH_SIGN' has been defined=20 @@ -625,13 +629,13 @@ writeq(val64, &bar0->tx_fifo_partition_3); =20 =20 - for (i =3D 0, j =3D 0; i < config->TxFIFONum; i++) { + for (i =3D 0, j =3D 0; i < config->tx_fifo_num; i++) { val64 |=3D - vBIT(config->TxCfg[i].FifoLen - 1, ((i * 32) + 19), - 13) | vBIT(config->TxCfg[i].FifoPriority, + vBIT(config->tx_cfg[i].fifo_len - 1, ((i * 32) + 19), + 13) | vBIT(config->tx_cfg[i].fifo_priority, ((i * 32) + 5), 3); =20 - if (i =3D=3D (config->TxFIFONum - 1)) { + if (i =3D=3D (config->tx_fifo_num - 1)) { if (i % 2 =3D=3D 0) i++; } @@ -675,56 +679,59 @@ =20 /* Rx DMA intialization. */ val64 =3D 0; - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { val64 |=3D - vBIT(config->RxCfg[i].RingPriority, (5 + (i * 8)), 3); + vBIT(config->rx_cfg[i].ring_priority, (5 + (i * 8)), + 3); } writeq(val64, &bar0->rx_queue_priority); =20 - /* Allocating equal share of memory to all the configured=20 - * Rings. + /*=20 + * Allocating equal share of memory to all the=20 + * configured Rings. */ val64 =3D 0; - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { switch (i) { case 0: - mem_share =3D (64 / config->RxRingNum + - 64 % config->RxRingNum); + mem_share =3D (64 / config->rx_ring_num + + 64 % config->rx_ring_num); val64 |=3D RX_QUEUE_CFG_Q0_SZ(mem_share); continue; case 1: - mem_share =3D (64 / config->RxRingNum); + mem_share =3D (64 / config->rx_ring_num); val64 |=3D RX_QUEUE_CFG_Q1_SZ(mem_share); continue; case 2: - mem_share =3D (64 / config->RxRingNum); + mem_share =3D (64 / config->rx_ring_num); val64 |=3D RX_QUEUE_CFG_Q2_SZ(mem_share); continue; case 3: - mem_share =3D (64 / config->RxRingNum); + mem_share =3D (64 / config->rx_ring_num); val64 |=3D RX_QUEUE_CFG_Q3_SZ(mem_share); continue; case 4: - mem_share =3D (64 / config->RxRingNum); + mem_share =3D (64 / config->rx_ring_num); val64 |=3D RX_QUEUE_CFG_Q4_SZ(mem_share); continue; case 5: - mem_share =3D (64 / config->RxRingNum); + mem_share =3D (64 / config->rx_ring_num); val64 |=3D RX_QUEUE_CFG_Q5_SZ(mem_share); continue; case 6: - mem_share =3D (64 / config->RxRingNum); + mem_share =3D (64 / config->rx_ring_num); val64 |=3D RX_QUEUE_CFG_Q6_SZ(mem_share); continue; case 7: - mem_share =3D (64 / config->RxRingNum); + mem_share =3D (64 / config->rx_ring_num); val64 |=3D RX_QUEUE_CFG_Q7_SZ(mem_share); continue; } } writeq(val64, &bar0->rx_queue_cfg); =20 - /* Initializing the Tx round robin registers to 0. + /*=20 + * Initializing the Tx round robin registers to 0. * Filling Tx and Rx round robin registers as per the=20 * number of FIFOs and Rings is still TODO. */ @@ -734,13 +741,15 @@ writeq(0, &bar0->tx_w_round_robin_3); writeq(0, &bar0->tx_w_round_robin_4); =20 - /* Disable Rx steering. Hard coding all packets be steered to + /*=20 + * TODO + * Disable Rx steering. Hard coding all packets be steered to * Queue 0 for now.=20 - * TODO*/ + */ if (rx_prio) { u64 def =3D 0x8000000000000000ULL, tmp; for (i =3D 0; i < MAX_RX_RINGS; i++) { - tmp =3D (u64) (def >> (i % config->RxRingNum)); + tmp =3D (u64) (def >> (i % config->rx_ring_num)); val64 |=3D (u64) (tmp >> (i * 8)); } writeq(val64, &bar0->rts_qos_steering); @@ -763,14 +772,16 @@ val64 =3D SET_UPDT_PERIOD(8) | STAT_CFG_STAT_RO | STAT_CFG_STAT_EN; writeq(val64, &bar0->stat_cfg); =20 - /* Initializing the sampling rate for the device to calculate the + /*=20 + * Initializing the sampling rate for the device to calculate the * bandwidth utilization. */ val64 =3D MAC_TX_LINK_UTIL_VAL(0x5) | MAC_RX_LINK_UTIL_VAL(0x5); writeq(val64, &bar0->mac_link_util); =20 =20 - /* Initializing the Transmit and Receive Traffic Interrupt=20 + /*=20 + * Initializing the Transmit and Receive Traffic Interrupt=20 * Scheme. */ /* TTI Initialization */ @@ -787,7 +798,8 @@ val64 =3D TTI_CMD_MEM_WE | TTI_CMD_MEM_STROBE_NEW_CMD; writeq(val64, &bar0->tti_command_mem); =20 - /* Once the operation completes, the Strobe bit of the command + /*=20 + * Once the operation completes, the Strobe bit of the command * register will be reset. We poll for this particular condition * We wait for a maximum of 500ms for the operation to complete, * if it's not complete by then we return error. @@ -821,7 +833,8 @@ val64 =3D RTI_CMD_MEM_WE | RTI_CMD_MEM_STROBE_NEW_CMD; writeq(val64, &bar0->rti_command_mem); =20 - /* Once the operation completes, the Strobe bit of the command + /*=20 + * Once the operation completes, the Strobe bit of the command * register will be reset. We poll for this particular condition * We wait for a maximum of 500ms for the operation to complete, * if it's not complete by then we return error. @@ -842,7 +855,8 @@ schedule_timeout(HZ / 20); } =20 - /* Initializing proper values as Pause threshold into all=20 + /*=20 + * Initializing proper values as Pause threshold into all=20 * the 8 Queues on Rx side. */ writeq(0xffbbffbbffbbffbbULL, &bar0->mc_pause_thresh_q0q3); @@ -861,19 +875,18 @@ return SUCCESS; } =20 -/* =20 - * Input Arguments:=20 - * device private variable, - * A mask indicating which Intr block must be modified and, - * A flag indicating whether to enable or disable the Intrs. - * Return Value:=20 - * NONE. - * Description:=20 - * This function will either disable or enable the interrupts=20 +/** =20 + * en_dis_able_nic_intrs - Enable or Disable the interrupts=20 + * @nic: device private variable, + * @mask: A mask indicating which Intr block must be modified and, + * @flag: A flag indicating whether to enable or disable the Intrs. + * Description: This function will either disable or enable the = interrupts * depending on the flag argument. The mask argument can be used to=20 * enable/disable any Intr block.=20 + * Return Value: NONE. */ -static void en_dis_able_NicIntrs(struct s2io_nic *nic, u16 mask, int = flag) + +static void en_dis_able_nic_intrs(struct s2io_nic *nic, u16 mask, int = flag) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; register u64 val64 =3D 0, temp64 =3D 0; @@ -887,15 +900,20 @@ temp64 =3D readq(&bar0->general_int_mask); temp64 &=3D ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* Disabled all PCIX, Flash, MDIO, IIC and GPIO - * interrupts for now.=20 - * TODO */ + /* =20 + * Disabled all PCIX, Flash, MDIO, IIC and GPIO + * interrupts for now.=20 + * TODO=20 + */ writeq(DISABLE_ALL_INTRS, &bar0->pic_int_mask); - /* No MSI Support is available presently, so TTI and + /*=20 + * No MSI Support is available presently, so TTI and * RTI interrupts are also disabled. */ } else if (flag =3D=3D DISABLE_INTRS) { - /* Disable PIC Intrs in the general intr mask register=20 + /* =20 + * Disable PIC Intrs in the general=20 + * intr mask register=20 */ writeq(DISABLE_ALL_INTRS, &bar0->pic_int_mask); temp64 =3D readq(&bar0->general_int_mask); @@ -907,24 +925,34 @@ /* DMA Interrupts */ /* Enabling/Disabling Tx DMA interrupts */ if (mask & TX_DMA_INTR) { - /* Enable TxDMA Intrs in the general intr mask register */ + /* Enable TxDMA Intrs in the general intr mask register */ val64 =3D TXDMA_INT_M; if (flag =3D=3D ENABLE_INTRS) { temp64 =3D readq(&bar0->general_int_mask); temp64 &=3D ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* Disable all interrupts other than PFC interrupt in=20 - * DMA level. + /*=20 + * Keep all interrupts other than PFC interrupt=20 + * and PCC interrupt disabled in DMA level. */ - val64 =3D DISABLE_ALL_INTRS & (~TXDMA_PFC_INT_M); + val64 =3D DISABLE_ALL_INTRS & ~(TXDMA_PFC_INT_M | + TXDMA_PCC_INT_M); writeq(val64, &bar0->txdma_int_mask); - /* Enable only the MISC error 1 interrupt in PFC block=20 + /*=20 + * Enable only the MISC error 1 interrupt in PFC block=20 */ val64 =3D DISABLE_ALL_INTRS & (~PFC_MISC_ERR_1); writeq(val64, &bar0->pfc_err_mask); + /*=20 + * Enable only the FB_ECC error interrupt in PCC block=20 + */ + val64 =3D DISABLE_ALL_INTRS & (~PCC_FB_ECC_ERR); + writeq(val64, &bar0->pcc_err_mask); } else if (flag =3D=3D DISABLE_INTRS) { - /* Disable TxDMA Intrs in the general intr mask=20 - * register */ + /*=20 + * Disable TxDMA Intrs in the general intr mask=20 + * register=20 + */ writeq(DISABLE_ALL_INTRS, &bar0->txdma_int_mask); writeq(DISABLE_ALL_INTRS, &bar0->pfc_err_mask); temp64 =3D readq(&bar0->general_int_mask); @@ -941,12 +969,16 @@ temp64 =3D readq(&bar0->general_int_mask); temp64 &=3D ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* All RxDMA block interrupts are disabled for now=20 - * TODO */ + /*=20 + * All RxDMA block interrupts are disabled for now=20 + * TODO=20 + */ writeq(DISABLE_ALL_INTRS, &bar0->rxdma_int_mask); } else if (flag =3D=3D DISABLE_INTRS) { - /* Disable RxDMA Intrs in the general intr mask=20 - * register */ + /* =20 + * Disable RxDMA Intrs in the general intr mask=20 + * register=20 + */ writeq(DISABLE_ALL_INTRS, &bar0->rxdma_int_mask); temp64 =3D readq(&bar0->general_int_mask); val64 |=3D temp64; @@ -962,9 +994,11 @@ temp64 =3D readq(&bar0->general_int_mask); temp64 &=3D ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* All MAC block error interrupts are disabled for now=20 + /*=20 + * All MAC block error interrupts are disabled for now=20 * except the link status change interrupt. - * TODO*/ + * TODO + */ val64 =3D MAC_INT_STATUS_RMAC_INT; temp64 =3D readq(&bar0->mac_int_mask); temp64 &=3D ~((u64) val64); @@ -974,7 +1008,8 @@ val64 &=3D ~((u64) RMAC_LINK_STATE_CHANGE_INT); writeq(val64, &bar0->mac_rmac_err_mask); } else if (flag =3D=3D DISABLE_INTRS) { - /* Disable MAC Intrs in the general intr mask register=20 + /* =20 + * Disable MAC Intrs in the general intr mask register=20 */ writeq(DISABLE_ALL_INTRS, &bar0->mac_int_mask); writeq(DISABLE_ALL_INTRS, @@ -993,11 +1028,14 @@ temp64 =3D readq(&bar0->general_int_mask); temp64 &=3D ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* All XGXS block error interrupts are disabled for now - * TODO */ + /*=20 + * All XGXS block error interrupts are disabled for now + * TODO=20 + */ writeq(DISABLE_ALL_INTRS, &bar0->xgxs_int_mask); } else if (flag =3D=3D DISABLE_INTRS) { - /* Disable MC Intrs in the general intr mask register=20 + /* =20 + * Disable MC Intrs in the general intr mask register=20 */ writeq(DISABLE_ALL_INTRS, &bar0->xgxs_int_mask); temp64 =3D readq(&bar0->general_int_mask); @@ -1013,11 +1051,14 @@ temp64 =3D readq(&bar0->general_int_mask); temp64 &=3D ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* All MC block error interrupts are disabled for now - * TODO */ + /*=20 + * All MC block error interrupts are disabled for now + * TODO=20 + */ writeq(DISABLE_ALL_INTRS, &bar0->mc_int_mask); } else if (flag =3D=3D DISABLE_INTRS) { - /* Disable MC Intrs in the general intr mask register + /* + * Disable MC Intrs in the general intr mask register */ writeq(DISABLE_ALL_INTRS, &bar0->mc_int_mask); temp64 =3D readq(&bar0->general_int_mask); @@ -1034,15 +1075,15 @@ temp64 =3D readq(&bar0->general_int_mask); temp64 &=3D ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* Enable all the Tx side interrupts */ - writeq(0x0, &bar0->tx_traffic_mask); /* '0' Enables=20 - * all 64 TX=20 - * interrupt=20 - * levels. - */ + /*=20 + * Enable all the Tx side interrupts + * writing 0 Enables all 64 TX interrupt levels=20 + */ + writeq(0x0, &bar0->tx_traffic_mask); } else if (flag =3D=3D DISABLE_INTRS) { - /* Disable Tx Traffic Intrs in the general intr mask=20 - * register. + /*=20 + * Disable Tx Traffic Intrs in the general intr mask=20 + * register. */ writeq(DISABLE_ALL_INTRS, &bar0->tx_traffic_mask); temp64 =3D readq(&bar0->general_int_mask); @@ -1058,14 +1099,12 @@ temp64 =3D readq(&bar0->general_int_mask); temp64 &=3D ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - writeq(0x0, &bar0->rx_traffic_mask); /* '0' Enables=20 - * all 8 RX=20 - * interrupt=20 - * levels. - */ + /* writing 0 Enables all 8 RX interrupt levels */ + writeq(0x0, &bar0->rx_traffic_mask); } else if (flag =3D=3D DISABLE_INTRS) { - /* Disable Rx Traffic Intrs in the general intr mask=20 - * register. + /* =20 + * Disable Rx Traffic Intrs in the general intr mask=20 + * register. */ writeq(DISABLE_ALL_INTRS, &bar0->rx_traffic_mask); temp64 =3D readq(&bar0->general_int_mask); @@ -1075,17 +1114,19 @@ } } =20 -/* =20 - * Input Arguments:=20 - * val64 - Value read from adapter status register. - * flag - indicates if the adapter enable bit was ever written once = before. - * Return Value:=20 - * void. - * Description:=20 - * Returns whether the H/W is ready to go or not. Depending on = whether=20 - * adapter enable bit was written or not the comparison differs and = the=20 - * calling function passes the input argument flag to indicate this. +/** =20 + * verify_xena_quiescence - Checks whether the H/W is ready=20 + * @val64 : Value read from adapter status register. + * @flag : indicates if the adapter enable bit was ever written once + * before. + * Description: Returns whether the H/W is ready to go or not. = Depending + * on whether adapter enable bit was written or not the comparison=20 + * differs and the calling function passes the input argument flag to + * indicate this. + * Return: 1 If xena is quiescence=20 + * 0 If Xena is not quiescence */ + static int verify_xena_quiescence(u64 val64, int flag) { int ret =3D 0; @@ -1122,11 +1163,15 @@ return ret; } =20 -/*=20 +/** + * fix_mac_address - Fix for Mac addr problem on Alpha platforms + * @sp: Pointer to device specifc structure + * Description :=20 * New procedure to clear mac address reading problems on Alpha = platforms * */ -void FixMacAddress(nic_t * sp) + +void fix_mac_address(nic_t * sp) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; u64 val64; @@ -1138,19 +1183,20 @@ } } =20 -/* =20 - * Input Arguments:=20 - * device private variable. - * Return Value:=20 - * SUCCESS on success and -1 on failure. +/** + * start_nic - Turns the device on =20 + * @nic : device private variable. * Description:=20 - * This function actually turns the device on. Before this=20 - * function is called, all Registers are configured from their reset = states=20 + * This function actually turns the device on. Before this function = is=20 + * called,all Registers are configured from their reset states=20 * and shared memory is allocated but the NIC is still quiescent. On=20 * calling this function, the device interrupts are cleared and the = NIC is * literally switched on by writing into the adapter control register. + * Return Value:=20 + * SUCCESS on success and -1 on failure. */ -static int startNic(struct s2io_nic *nic) + +static int start_nic(struct s2io_nic *nic) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; struct net_device *dev =3D nic->dev; @@ -1164,7 +1210,7 @@ config =3D &nic->config; =20 /* PRC Initialization and configuration */ - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { writeq((u64) nic->rx_blocks[i][0].block_dma_addr, &bar0->prc_rxd0_n[i]); =20 @@ -1173,7 +1219,8 @@ writeq(val64, &bar0->prc_ctrl_n[i]); } =20 - /* Enabling MC-RLDRAM. After enabling the device, we timeout + /*=20 + * Enabling MC-RLDRAM. After enabling the device, we timeout * for around 100ms, which is approximately the time required * for the device to be ready for operation. */ @@ -1190,14 +1237,16 @@ val64 &=3D ~ADAPTER_ECC_EN; writeq(val64, &bar0->adapter_control); =20 - /* Clearing any possible Link state change interrupts that=20 + /*=20 + * Clearing any possible Link state change interrupts that=20 * could have popped up just before Enabling the card. */ val64 =3D readq(&bar0->mac_rmac_err_reg); if (val64) writeq(val64, &bar0->mac_rmac_err_reg); =20 - /* Verify if the device is ready to be enabled, if so enable=20 + /*=20 + * Verify if the device is ready to be enabled, if so enable=20 * it. */ val64 =3D readq(&bar0->adapter_status); @@ -1211,9 +1260,10 @@ /* Enable select interrupts */ interruptible =3D TX_TRAFFIC_INTR | RX_TRAFFIC_INTR | TX_MAC_INTR | RX_MAC_INTR; - en_dis_able_NicIntrs(nic, interruptible, ENABLE_INTRS); + en_dis_able_nic_intrs(nic, interruptible, ENABLE_INTRS); =20 - /* With some switches, link might be already up at this point. + /*=20 + * With some switches, link might be already up at this point. * Because of this weird behavior, when we enable laser,=20 * we may not get link. We need to handle this. We cannot=20 * figure out which switch is misbehaving. So we are forced to=20 @@ -1240,82 +1290,72 @@ * force link down. Since link is already up, we will get * link state change interrupt after this reset */ - writeq(0x8007051500000000ULL, &bar0->dtx_control); + writeq(0x80010515001E0000ULL, &bar0->dtx_control); val64 =3D readq(&bar0->dtx_control); - writeq(0x80070515000000E0ULL, &bar0->dtx_control); + udelay(50); + writeq(0x80010515001E00E0ULL, &bar0->dtx_control); val64 =3D readq(&bar0->dtx_control); + udelay(50); writeq(0x80070515001F00E4ULL, &bar0->dtx_control); val64 =3D readq(&bar0->dtx_control); + udelay(50); =20 return SUCCESS; } =20 -/* =20 - * Input Arguments:=20 - * nic - device private variable. - * Return Value:=20 - * void. +/**=20 + * free_tx_buffers - Free all queued Tx buffers=20 + * @nic : device private variable. * Description:=20 - * Free all queued Tx buffers. - */ -void freeTxBuffers(struct s2io_nic *nic) + * Free all queued Tx buffers. + * Return Value: void=20 +*/ + +void free_tx_buffers(struct s2io_nic *nic) { struct net_device *dev =3D nic->dev; struct sk_buff *skb; TxD_t *txdp; int i, j; -#if DEBUG_ON - int cnt =3D 0; -#endif mac_info_t *mac_control; struct config_param *config; + int cnt =3D 0; =20 mac_control =3D &nic->mac_control; config =3D &nic->config; =20 - for (i =3D 0; i < config->TxFIFONum; i++) { - for (j =3D 0; j < config->TxCfg[i].FifoLen - 1; j++) { + for (i =3D 0; i < config->tx_fifo_num; i++) { + for (j =3D 0; j < config->tx_cfg[i].fifo_len - 1; j++) { txdp =3D mac_control->txdl_start[i] + - (config->MaxTxDs * j); - - if (!(txdp->Control_1 & TXD_LIST_OWN_XENA)) { - /* If owned by host, ignore */ - continue; - } + (config->max_txds * j); skb =3D (struct sk_buff *) ((unsigned long) txdp-> Host_Control); if (skb =3D=3D NULL) { - DBG_PRINT(ERR_DBG, "%s: NULL skb ", - dev->name); - DBG_PRINT(ERR_DBG, "in Tx Int\n"); - return; + memset(txdp, 0, sizeof(TxD_t)); + continue; } -#if DEBUG_ON - cnt++; -#endif dev_kfree_skb(skb); memset(txdp, 0, sizeof(TxD_t)); + cnt++; } -#if DEBUG_ON DBG_PRINT(INTR_DBG, "%s:forcibly freeing %d skbs on FIFO%d\n", dev->name, cnt, i); -#endif } } =20 -/* =20 - * Input Arguments:=20 - * nic - device private variable. - * Return Value:=20 +/** =20 + * stop_nic - To stop the nic =20 + * @nic ; device private variable. + * Description:=20 + * This function does exactly the opposite of what the start_nic()=20 + * function does. This function is called to stop the device. + * Return Value: * void. - * Description:=20 - * This function does exactly the opposite of what the startNic()=20 - * function does. This function is called to stop=20 - * the device. */ -static void stopNic(struct s2io_nic *nic) + +static void stop_nic(struct s2io_nic *nic) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; register u64 val64 =3D 0; @@ -1326,24 +1366,23 @@ mac_control =3D &nic->mac_control; config =3D &nic->config; =20 -/* Disable all interrupts */ + /* Disable all interrupts */ interruptible =3D TX_TRAFFIC_INTR | RX_TRAFFIC_INTR | TX_MAC_INTR | RX_MAC_INTR; - en_dis_able_NicIntrs(nic, interruptible, DISABLE_INTRS); + en_dis_able_nic_intrs(nic, interruptible, DISABLE_INTRS); =20 -/* Disable PRCs */ - for (i =3D 0; i < config->RxRingNum; i++) { + /* Disable PRCs */ + for (i =3D 0; i < config->rx_ring_num; i++) { val64 =3D readq(&bar0->prc_ctrl_n[i]); val64 &=3D ~((u64) PRC_CTRL_RC_ENABLED); writeq(val64, &bar0->prc_ctrl_n[i]); } } =20 -/* =20 - * Input Arguments:=20 - * device private variable - * Return Value:=20 - * SUCCESS on success or an appropriate -ve value on failure. +/** =20 + * fill_rx_buffers - Allocates the Rx side skbs=20 + * @nic: device private variable + * @ring_no: ring number=20 * Description:=20 * The function allocates Rx side skbs and puts the physical * address of these buffers into the RxD buffer pointers, so that the = NIC @@ -1354,9 +1393,13 @@ * 3. Five buffer modes. * Each mode defines how many fragments the received frame will be = split=20 * up into by the NIC. The frame is split into L3 header, L4 Header,=20 - * L4 payload in three buffer mode and in 5 buffer mode, L4 payload = itself=20 - * is split into 3 fragments. As of now only single buffer mode is = supported. + * L4 payload in three buffer mode and in 5 buffer mode, L4 payload = itself + * is split into 3 fragments. As of now only single buffer mode is + * supported. + * Return Value: + * SUCCESS on success or an appropriate -ve value on failure. */ + int fill_rx_buffers(struct s2io_nic *nic, int ring_no) { struct net_device *dev =3D nic->dev; @@ -1392,7 +1435,8 @@ off1 =3D mac_control->rx_curr_get_info[ring_no].offset; offset =3D block_no * (MAX_RXDS_PER_BLOCK + 1) + off; offset1 =3D block_no1 * (MAX_RXDS_PER_BLOCK + 1) + off1; - + offset =3D block_no * (MAX_RXDS_PER_BLOCK) + off; + offset1 =3D block_no1 * (MAX_RXDS_PER_BLOCK) + off1; rxdp =3D nic->rx_blocks[ring_no][block_no]. block_virt_addr + off; if ((offset =3D=3D offset1) && (rxdp->Host_Control)) { @@ -1400,7 +1444,6 @@ DBG_PRINT(INTR_DBG, " info equated\n"); goto end; } - if (rxdp->Control_1 =3D=3D END_OF_BLOCK) { mac_control->rx_curr_put_info[ring_no]. block_index++; @@ -1412,8 +1455,6 @@ off %=3D (MAX_RXDS_PER_BLOCK + 1); mac_control->rx_curr_put_info[ring_no].offset =3D off; - /*rxdp =3D nic->rx_blocks[ring_no][block_no]. - block_virt_addr + off; */ rxdp =3D (RxD_t *) ((unsigned long) rxdp->Control_2); DBG_PRINT(INTR_DBG, "%s: Next block at: %p\n", dev->name, rxdp); @@ -1450,15 +1491,16 @@ return SUCCESS; } =20 -/* =20 - * Input Arguments:=20 - * device private variable. - * Return Value:=20 - * NONE. +/** + * free_rx_buffers - Frees all Rx buffers =20 + * @sp: device private variable. * Description:=20 * This function will free all Rx buffers allocated by host. + * Return Value: + * NONE. */ -static void freeRxBuffers(struct s2io_nic *sp) + +static void free_rx_buffers(struct s2io_nic *sp) { struct net_device *dev =3D sp->dev; int i, j, blk =3D 0, off, buf_cnt =3D 0; @@ -1470,8 +1512,8 @@ mac_control =3D &sp->mac_control; config =3D &sp->config; =20 - for (i =3D 0; i < config->RxRingNum; i++) { - for (j =3D 0, blk =3D 0; j < config->RxCfg[i].NumRxd; j++) { + for (i =3D 0; i < config->rx_ring_num; i++) { + for (j =3D 0, blk =3D 0; j < config->rx_cfg[i].num_rxd; j++) { off =3D j % (MAX_RXDS_PER_BLOCK + 1); rxdp =3D sp->rx_blocks[i][blk].block_virt_addr + off; =20 @@ -1510,18 +1552,19 @@ } } =20 -/* - * Input Argument:=20 - * dev - pointer to the device structure. - * budget - The number of packets that were budgeted to be processed = during - * one pass through the 'Poll" function. - * Return value: - * 0 on success and 1 if there are No Rx packets to be processed. - * Description: - * Comes into picture only if NAPI support has been incorporated. It = does - * the same thing that rxIntrHandler does, but not in a interrupt = context - * also It will process only a given number of packets. +/** + * s2io_poll - Rx interrupt handler for NAPI support + * @dev : pointer to the device structure. + * @budget : The number of packets that were budgeted to be processed=20 + * during one pass through the 'Poll" function. + * Description: + * Comes into picture only if NAPI support has been incorporated. It = does + * the same thing that rx_intr_handler does, but not in a interrupt = context + * also It will process only a given number of packets. + * Return value: + * 0 on success and 1 if there are No Rx packets to be processed. */ + #ifdef CONFIG_S2IO_NAPI static int s2io_poll(struct net_device *dev, int *budget) { @@ -1546,7 +1589,7 @@ val64 =3D readq(&bar0->rx_traffic_int); writeq(val64, &bar0->rx_traffic_int); =20 - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { if (--pkts_to_process < 0) { goto no_rx; } @@ -1589,7 +1632,7 @@ HEADER_802_2_SIZE + HEADER_SNAP_SIZE, PCI_DMA_FROMDEVICE); - rxOsmHandler(nic, val16, rxdp, i); + rx_osm_handler(nic, val16, rxdp, i); pkt_cnt++; offset_info.offset++; offset_info.offset %=3D (MAX_RXDS_PER_BLOCK + 1); @@ -1603,38 +1646,39 @@ if (!pkt_cnt) pkt_cnt =3D 1; =20 - for (i =3D 0; i < config->RxRingNum; i++) + for (i =3D 0; i < config->rx_ring_num; i++) fill_rx_buffers(nic, i); =20 dev->quota -=3D pkt_cnt; *budget -=3D pkt_cnt; netif_rx_complete(dev); =20 -/* Re enable the Rx interrupts. */ - en_dis_able_NicIntrs(nic, RX_TRAFFIC_INTR, ENABLE_INTRS); + /* Re enable the Rx interrupts. */ + en_dis_able_nic_intrs(nic, RX_TRAFFIC_INTR, ENABLE_INTRS); return 0; =20 no_rx: - for (i =3D 0; i < config->RxRingNum; i++) + for (i =3D 0; i < config->rx_ring_num; i++) fill_rx_buffers(nic, i); dev->quota -=3D pkt_cnt; *budget -=3D pkt_cnt; return 1; } #else -/* =20 - * Input Arguments:=20 - * device private variable. - * Return Value:=20 - * NONE. +/** =20 + * rx_intr_handler - Rx interrupt handler + * @nic: device private variable. * Description:=20 - * If the interrupt is because of a received frame or if the=20 - * receive ring contains fresh as yet un-processed frames, this = function is + * If the interrupt is because of a received frame or if the=20 + * receive ring contains fresh as yet un-processed frames,this = function is * called. It picks out the RxD at which place the last Rx processing = had=20 * stopped and sends the skb to the OSM's Rx handler and then = increments=20 * the offset. + * Return Value: + * NONE. */ -static void rxIntrHandler(struct s2io_nic *nic) + +static void rx_intr_handler(struct s2io_nic *nic) { struct net_device *dev =3D (struct net_device *) nic->dev; XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; @@ -1643,24 +1687,21 @@ struct sk_buff *skb; u16 val16, cksum; register u64 val64 =3D 0; - int i, block_no; + int i, block_no, pkt_cnt =3D 0; mac_info_t *mac_control; struct config_param *config; =20 mac_control =3D &nic->mac_control; config =3D &nic->config; =20 -#if DEBUG_ON - nic->rxint_cnt++; -#endif - -/* rx_traffic_int reg is an R1 register, hence we read and write back=20 - * the samevalue in the register to clear it. - */ + /*=20 + * rx_traffic_int reg is an R1 register, hence we read and write back=20 + * the samevalue in the register to clear it. + */ val64 =3D readq(&bar0->rx_traffic_int); writeq(val64, &bar0->rx_traffic_int); =20 - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { offset_info =3D mac_control->rx_curr_get_info[i]; block_no =3D offset_info.block_index; rxdp =3D nic->rx_blocks[i][block_no].block_virt_addr + @@ -1698,7 +1739,7 @@ HEADER_802_2_SIZE + HEADER_SNAP_SIZE, PCI_DMA_FROMDEVICE); - rxOsmHandler(nic, val16, rxdp, i); + rx_osm_handler(nic, val16, rxdp, i); offset_info.offset++; offset_info.offset %=3D (MAX_RXDS_PER_BLOCK + 1); rxdp =3D @@ -1706,23 +1747,24 @@ offset_info.offset; mac_control->rx_curr_get_info[i].offset =3D offset_info.offset; + pkt_cnt++; } } } #endif - -/* =20 - * Input Arguments:=20 - * device private variable - * Return Value:=20 - * NONE +/** =20 + * tx_intr_handler - Transmit interrupt handler + * @nic : device private variable * Description:=20 * If an interrupt was raised to indicate DMA complete of the=20 - * Tx packet, this function is called. It identifies the last TxD = whose buffer - * was freed and frees all skbs whose data have already DMA'ed into = the NICs - * internal memory. + * Tx packet, this function is called. It identifies the last TxD=20 + * whose buffer was freed and frees all skbs whose data have already=20 + * DMA'ed into the NICs internal memory. + * Return Value: + * NONE */ -static void txIntrHandler(struct s2io_nic *nic) + +static void tx_intr_handler(struct s2io_nic *nic) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; struct net_device *dev =3D (struct net_device *) nic->dev; @@ -1734,25 +1776,22 @@ u16 j, frg_cnt; mac_info_t *mac_control; struct config_param *config; -#if DEBUG_ON - int cnt =3D 0; - nic->txint_cnt++; -#endif =20 mac_control =3D &nic->mac_control; config =3D &nic->config; =20 - /* tx_traffic_int reg is an R1 register, hence we read and write=20 + /*=20 + * tx_traffic_int reg is an R1 register, hence we read and write=20 * back the samevalue in the register to clear it. */ val64 =3D readq(&bar0->tx_traffic_int); writeq(val64, &bar0->tx_traffic_int); =20 - for (i =3D 0; i < config->TxFIFONum; i++) { + for (i =3D 0; i < config->tx_fifo_num; i++) { offset_info =3D mac_control->tx_curr_get_info[i]; offset_info1 =3D mac_control->tx_curr_put_info[i]; txdlp =3D mac_control->txdl_start[i] + - (config->MaxTxDs * offset_info.offset); + (config->max_txds * offset_info.offset); while ((!(txdlp->Control_1 & TXD_LIST_OWN_XENA)) && (offset_info.offset !=3D offset_info1.offset) && (txdlp->Host_Control)) { @@ -1797,28 +1836,20 @@ txdlp =3D temp; } memset(txdlp, 0, - (sizeof(TxD_t) * config->MaxTxDs)); + (sizeof(TxD_t) * config->max_txds)); =20 /* Updating the statistics block */ nic->stats.tx_packets++; nic->stats.tx_bytes +=3D skb->len; -#if DEBUG_ON - nic->txpkt_bytes +=3D skb->len; - cnt++; -#endif dev_kfree_skb_irq(skb); =20 offset_info.offset++; offset_info.offset %=3D offset_info.fifo_len + 1; txdlp =3D mac_control->txdl_start[i] + - (config->MaxTxDs * offset_info.offset); + (config->max_txds * offset_info.offset); mac_control->tx_curr_get_info[i].offset =3D offset_info.offset; } -#if DEBUG_ON - DBG_PRINT(INTR_DBG, "%s: freed %d Tx Pkts\n", dev->name, - cnt); -#endif } =20 spin_lock(&nic->tx_lock); @@ -1827,55 +1858,53 @@ spin_unlock(&nic->tx_lock); } =20 -/* =20 - * Input Arguments:=20 - * device private variable - * Return Value:=20 +/** =20 + * alarm_intr_handler - Alarm Interrrupt handler + * @nic: device private variable + * Description: If the interrupt was neither because of Rx packet or = Tx=20 + * complete, this function is called. If the interrupt was to indicate + * a loss of link, the OSM link status handler is invoked for any = other=20 + * alarm interrupt the block that raised the interrupt is displayed=20 + * and a H/W reset is issued. + * Return Value: * NONE - * Description:=20 - * If the interrupt was neither because of Rx packet or Tx=20 - * complete, this function is called. If the interrupt was to indicate = a loss - * of link, the OSM link status handler is invoked for any other alarm = - * interrupt the block that raised the interrupt is displayed and a = H/W reset=20 - * is issued. - */ -static void alarmIntrHandler(struct s2io_nic *nic) +*/ + +static void alarm_intr_handler(struct s2io_nic *nic) { struct net_device *dev =3D (struct net_device *) nic->dev; XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; register u64 val64 =3D 0, err_reg =3D 0; =20 - /* Handling link status change error Intr */ err_reg =3D readq(&bar0->mac_rmac_err_reg); if (err_reg & RMAC_LINK_STATE_CHANGE_INT) { schedule_work(&nic->set_link_task); } =20 - /* Handling SERR errors by stopping device Xmit queue and forcing=20 - * a H/W reset. - */ + /* In case of a serious error, the device will be Reset. */ val64 =3D readq(&bar0->serr_source); if (val64 & SERR_SOURCE_ANY) { DBG_PRINT(ERR_DBG, "%s: Device indicates ", dev->name); DBG_PRINT(ERR_DBG, "serious error!!\n"); netif_stop_queue(dev); } -/* Other type of interrupts are not being handled now, TODO*/ + + /* Other type of interrupts are not being handled now, TODO */ } =20 -/* - * Input Argument:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. +/**=20 + * wait_for_cmd_complete - waits for a command to complete. + * @sp : private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * Description: Function that waits for a command to Write into RMAC=20 + * ADDR DATA registers to be completed and returns either success or=20 + * error depending on whether the command was complete or not.=20 * Return value: * SUCCESS on success and FAILURE on failure. - * Description: - * Function that waits for a command to Write into RMAC ADDR DATA = registers=20 - * to be completed and returns either success or error depending on = whether=20 - * the command was complete or not.=20 */ -int waitForCmdComplete(nic_t * sp) + +int wait_for_cmd_complete(nic_t * sp) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; int ret =3D FAILURE, cnt =3D 0; @@ -1900,17 +1929,16 @@ return ret; } =20 -/* - * Input Argument:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. +/**=20 + * s2io_reset - Resets the card.=20 + * @sp : private member of the device structure. + * Description: Function to Reset the card. This function then also + * restores the previously saved PCI configuration space registers as=20 + * the card reset also resets the configuration space. * Return value: - * void. - * Description: - * Function to Reset the card. This function then also restores the = previously - * saved PCI configuration space registers as the card reset also = resets the - * Configration space. + * void. */ + void s2io_reset(nic_t * sp) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; @@ -1920,7 +1948,8 @@ val64 =3D SW_RESET_ALL; writeq(val64, &bar0->sw_reset); =20 - /* At this stage, if the PCI write is indeed completed, the=20 + /*=20 + * At this stage, if the PCI write is indeed completed, the=20 * card is reset and so is the PCI Config space of the device.=20 * So a read cannot be issued at this stage on any of the=20 * registers to ensure the write into "sw_reset" register @@ -1954,29 +1983,31 @@ sp->device_enabled_once =3D FALSE; } =20 -/* - * Input Argument:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. +/** + * s2io_set_swapper - to set the swapper controle on the card=20 + * @sp : private member of the device structure,=20 + * pointer to the s2io_nic structure. + * Description: Function to set the swapper control on the card=20 + * correctly depending on the 'endianness' of the system. * Return value: * SUCCESS on success and FAILURE on failure. - * Description: - * Function to set the swapper control on the card correctly depending = on the - * 'endianness' of the system. */ + int s2io_set_swapper(nic_t * sp) { struct net_device *dev =3D sp->dev; XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; u64 val64; =20 -/* Set proper endian settings and verify the same by reading the PIF=20 - * Feed-back register. - */ + /*=20 + * Set proper endian settings and verify the same by reading + * the PIF Feed-back register. + */ #ifdef __BIG_ENDIAN -/* The device by default set to a big endian format, so a big endian=20 - * driver need not set anything. - */ + /*=20 + * The device by default set to a big endian format, so a=20 + * big endian driver need not set anything. + */ writeq(0xffffffffffffffffULL, &bar0->swapper_ctrl); val64 =3D (SWAPPER_CTRL_PIF_R_FE | SWAPPER_CTRL_PIF_R_SE | @@ -1995,9 +2026,11 @@ SWAPPER_CTRL_STATS_FE | SWAPPER_CTRL_STATS_SE); writeq(val64, &bar0->swapper_ctrl); #else -/* Initially we enable all bits to make it accessible by the driver, - * then we selectively enable only those bits that we want to set. - */ + /*=20 + * Initially we enable all bits to make it accessible by the + * driver, then we selectively enable only those bits that=20 + * we want to set. + */ writeq(0xffffffffffffffffULL, &bar0->swapper_ctrl); val64 =3D (SWAPPER_CTRL_PIF_R_FE | SWAPPER_CTRL_PIF_R_SE | @@ -2021,9 +2054,10 @@ writeq(val64, &bar0->swapper_ctrl); #endif =20 -/* Verifying if endian settings are accurate by reading a feedback - * register. - */ + /*=20 + * Verifying if endian settings are accurate by reading a=20 + * feedback register. + */ val64 =3D readq(&bar0->pif_rd_swapper_fb); if (val64 !=3D 0x0123456789ABCDEFULL) { /* Endian settings are incorrect, calls for another dekko. */ @@ -2041,17 +2075,18 @@ * Functions defined below concern the OS part of the driver * * ********************************************************* */ =20 -/* - * Input Argument:=20 - * dev - pointer to the device structure. - * Return value: - * '0' on success and an appropriate (-)ve integer as defined in = errno.h - * file on failure. +/** =20 + * s2io-open - open entry point of the driver + * @dev : pointer to the device structure. * Description: * This function is the open entry point of the driver. It mainly = calls a * function to allocate Rx buffers and inserts them into the buffer * descriptors and then enables the Rx part of the NIC.=20 + * Return value: + * 0 on success and an appropriate (-)ve integer as defined in errno.h + * file on failure. */ + int s2io_open(struct net_device *dev) { nic_t *sp =3D dev->priv; @@ -2060,18 +2095,21 @@ struct config_param *config; =20 =20 -/* Make sure you have link off by default every time Nic is = initialized*/ + /*=20 + * Make sure you have link off by default every time=20 + * Nic is initialized + */ netif_carrier_off(dev); sp->last_link_state =3D LINK_DOWN; =20 -/* Initialize the H/W I/O registers */ - if (initNic(sp) !=3D 0) { + /* Initialize the H/W I/O registers */ + if (init_nic(sp) !=3D 0) { DBG_PRINT(ERR_DBG, "%s: H/W initialization failed\n", dev->name); return -ENODEV; } =20 -/* After proper initialization of H/W, register ISR */ + /* After proper initialization of H/W, register ISR */ err =3D request_irq((int) sp->irq, s2io_isr, SA_SHIRQ, sp->name, dev); if (err) { @@ -2087,38 +2125,39 @@ } =20 =20 -/* Setting its receive mode */ + /* Setting its receive mode */ s2io_set_multicast(dev); =20 -/* Initializing the Rx buffers. For now we are considering only 1 Rx = ring - * and initializing buffers into 1016 RxDs or 8 Rx blocks - */ + /*=20 + * Initializing the Rx buffers. For now we are considering only 1=20 + * Rx ring and initializing buffers into 1016 RxDs or 8 Rx blocks + */ mac_control =3D &sp->mac_control; config =3D &sp->config; =20 - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { if ((ret =3D fill_rx_buffers(sp, i))) { DBG_PRINT(ERR_DBG, "%s: Out of memory in Open\n", dev->name); s2io_reset(sp); free_irq(dev->irq, dev); - freeRxBuffers(sp); + free_rx_buffers(sp); return -ENOMEM; } DBG_PRINT(INFO_DBG, "Buf in ring:%d is %d:\n", i, atomic_read(&sp->rx_bufs_left[i])); } =20 -/* Enable tasklet for the device */ + /* Enable tasklet for the device */ tasklet_init(&sp->task, s2io_tasklet, (unsigned long) dev); =20 -/* Enable Rx Traffic and interrupts on the NIC */ - if (startNic(sp)) { + /* Enable Rx Traffic and interrupts on the NIC */ + if (start_nic(sp)) { DBG_PRINT(ERR_DBG, "%s: Starting NIC failed\n", dev->name); tasklet_kill(&sp->task); s2io_reset(sp); free_irq(dev->irq, dev); - freeRxBuffers(sp); + free_rx_buffers(sp); return -ENODEV; } =20 @@ -2128,18 +2167,19 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * dev - device pointer. - * Return value: - * '0' on success and an appropriate (-)ve integer as defined in = errno.h - * file on failure. +/** + * s2io_close -close entry point of the driver + * @dev : device pointer. * Description: * This is the stop entry point of the driver. It needs to undo = exactly - * whatever was done by the open entry point, thus it's usually = referred to - * as the close function. Among other things this function mainly = stops the + * whatever was done by the open entry point,thus it's usually = referred to + * as the close function.Among other things this function mainly stops = the * Rx side of the NIC and frees all the Rx buffers in the Rx rings. + * Return value: + * 0 on success and an appropriate (-)ve integer as defined in errno.h + * file on failure. */ + int s2io_close(struct net_device *dev) { nic_t *sp =3D dev->priv; @@ -2150,19 +2190,22 @@ spin_lock(&sp->isr_lock); netif_stop_queue(dev); =20 -/* disable Tx and Rx traffic on the NIC */ - stopNic(sp); + /* disable Tx and Rx traffic on the NIC */ + stop_nic(sp); =20 spin_unlock(&sp->isr_lock); =20 -/* If the device tasklet is running, wait till its done before killing = it */ + /*=20 + * If the device tasklet is running, wait till its done=20 + * before killing it=20 + */ while (atomic_read(&(sp->tasklet_status))) { set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(HZ / 10); } tasklet_kill(&sp->task); =20 -/* Check if the device is Quiescent and then Reset the NIC */ + /* Check if the device is Quiescent and then Reset the NIC */ do { val64 =3D readq(&bar0->adapter_status); if (verify_xena_quiescence(val64, sp->device_enabled_once)) { @@ -2182,32 +2225,33 @@ } while (1); s2io_reset(sp); =20 -/* Free the Registered IRQ */ + /* Free the Registered IRQ */ free_irq(dev->irq, dev); =20 -/* Free all Tx Buffers waiting for transmission */ - freeTxBuffers(sp); + /* Free all Tx Buffers waiting for transmission */ + free_tx_buffers(sp); =20 -/* Free all Rx buffers allocated by host */ - freeRxBuffers(sp); + /* Free all Rx buffers allocated by host */ + free_rx_buffers(sp); =20 sp->device_close_flag =3D TRUE; /* Device is shut down. */ =20 return 0; } =20 -/* - * Input Argument/s:=20 - * skb - the socket buffer containing the Tx data. - * dev - device pointer. - * Return value: - * '0' on success & 1 on failure.=20 - * NOTE: when device cant queue the pkt, just the trans_start variable = will - * not be upadted. - * Description: +/** + * s2io_xmit - Tx entry point of te driver + * @skb : the socket buffer containing the Tx data. + * @dev : device pointer. + * Description : * This function is the Tx entry point of the driver. S2IO NIC = supports * certain protocol assist features on Tx side, namely CSO, S/G, LSO. + * NOTE: when device cant queue the pkt,just the trans_start variable = will + * not be upadted. + * Return value: + * 0 on success & 1 on failure. */ + int s2io_xmit(struct sk_buff *skb, struct net_device *dev) { nic_t *sp =3D dev->priv; @@ -2221,6 +2265,7 @@ #endif mac_info_t *mac_control; struct config_param *config; + XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; =20 mac_control =3D &sp->mac_control; config =3D &sp->config; @@ -2232,14 +2277,14 @@ /* Multi FIFO Tx is disabled for now. */ if (!queue && tx_prio) { u8 x =3D (skb->data)[5]; - queue =3D x % config->TxFIFONum; + queue =3D x % config->tx_fifo_num; } =20 =20 off =3D (u16) mac_control->tx_curr_put_info[queue].offset; off1 =3D (u16) mac_control->tx_curr_get_info[queue].offset; - txd_len =3D mac_control->txdl_len; - txdp =3D mac_control->txdl_start[queue] + (config->MaxTxDs * off); + txd_len =3D config->max_txds; + txdp =3D mac_control->txdl_start[queue] + (config->max_txds * off); =20 queue_len =3D mac_control->tx_curr_put_info[queue].fifo_len + 1; /* Avoid "put" pointer going beyond "get" pointer */ @@ -2250,7 +2295,6 @@ spin_unlock_irqrestore(&sp->tx_lock, flags); return 0; } - #ifdef NETIF_F_TSO mss =3D skb_shinfo(skb)->tso_size; if (mss) { @@ -2271,7 +2315,7 @@ TXD_TX_CKO_UDP_EN); } =20 - txdp->Control_2 |=3D config->TxIntrType; + txdp->Control_2 |=3D config->tx_intr_type; =20 txdp->Control_1 |=3D (TXD_BUFFER0_SIZE(frg_len) | TXD_GATHER_CODE_FIRST); @@ -2301,15 +2345,18 @@ #endif writeq(val64, &tx_fifo->List_Control); =20 + /* Perform a PCI read to flush previous writes */ + val64 =3D readq(&bar0->general_int_status); + off++; off %=3D mac_control->tx_curr_put_info[queue].fifo_len + 1; mac_control->tx_curr_put_info[queue].offset =3D off; =20 /* Avoid "put" pointer going beyond "get" pointer */ if (((off + 1) % queue_len) =3D=3D off1) { - DBG_PRINT(TX_DBG,=20 - "No free TxDs for xmit, Put: 0x%x Get:0x%x\n", - off, off1); + DBG_PRINT(TX_DBG, + "No free TxDs for xmit, Put: 0x%x Get:0x%x\n", + off, off1); netif_stop_queue(dev); } =20 @@ -2319,21 +2366,20 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * irq: the irq of the device. - * dev_id: a void pointer to the dev structure of the NIC. - * ptregs: pointer to the registers pushed on the stack. +/** + * s2io_isr - ISR handler of the device . + * @irq: the irq of the device. + * @dev_id: a void pointer to the dev structure of the NIC. + * @pt_regs: pointer to the registers pushed on the stack. + * Description: This function is the ISR handler of the device. It=20 + * identifies the reason for the interrupt and calls the relevant=20 + * service routines. As a contongency measure, this ISR allocates the=20 + * recv buffers, if their numbers are below the panic value which is + * presently set to 25% of the original number of rcv buffers = allocated. * Return value: - * void. - * Description: - * This function is the ISR handler of the device. It identifies the = reason=20 - * for the interrupt and calls the relevant service routines. - * As a contongency measure, this ISR allocates the recv buffers, if = their=20 - * numbers are below the panic value which is presently set to 25% of = the - * original number of rcv buffers allocated. + * IRQ_HANDLED: will be returned if IRQ was handled by this routine=20 + * IRQ_NONE: will be returned if interrupt is not from our device */ - static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs = *regs) { struct net_device *dev =3D (struct net_device *) dev_id; @@ -2348,7 +2394,8 @@ =20 spin_lock(&sp->isr_lock); =20 - /* Identify the cause for interrupt and call the appropriate + /*=20 + * Identify the cause for interrupt and call the appropriate * interrupt handler. Causes for the interrupt could be; * 1. Rx of packet. * 2. Tx complete. @@ -2362,30 +2409,28 @@ spin_unlock(&sp->isr_lock); return IRQ_NONE; } - /* Mask the interrupts on the NIC */ + + /* Mask the Interrupts on the NIC. */ general_mask =3D readq(&bar0->general_int_mask); writeq(0xFFFFFFFFFFFFFFFFULL, &bar0->general_int_mask); =20 -#if DEBUG_ON - sp->int_cnt++; -#endif - /* If Intr is because of Tx Traffic */ if (reason & GEN_INTR_TXTRAFFIC) { - txIntrHandler(sp); + tx_intr_handler(sp); } =20 /* If Intr is because of an error */ if (reason & (GEN_ERROR_INTR)) - alarmIntrHandler(sp); + alarm_intr_handler(sp); =20 #ifdef CONFIG_S2IO_NAPI if (reason & GEN_INTR_RXTRAFFIC) { if (netif_rx_schedule_prep(dev)) { - en_dis_able_NicIntrs(sp, RX_TRAFFIC_INTR, - DISABLE_INTRS); - /* We retake the snap shot of the general interrupt=20 - * register. + en_dis_able_nic_intrs(sp, RX_TRAFFIC_INTR, + DISABLE_INTRS); + /*=20 + * Here we take a snap shot of the general=20 + * Intr Register. */ general_mask =3D readq(&bar0->general_int_mask); __netif_rx_schedule(dev); @@ -2394,66 +2439,72 @@ #else /* If Intr is because of Rx Traffic */ if (reason & GEN_INTR_RXTRAFFIC) { - rxIntrHandler(sp); + rx_intr_handler(sp); } #endif =20 -/* If the Rx buffer count is below the panic threshold then reallocate = the - * buffers from the interrupt handler itself, else schedule a tasklet = to=20 - * reallocate the buffers. - */ + /*=20 + * If the Rx buffer count is below the panic threshold then=20 + * reallocate the buffers from the interrupt handler itself,=20 + * else schedule a tasklet to reallocate the buffers. + */ #if 1 { - int i; + int i; + + for (i =3D 0; i < config->rx_ring_num; i++) { + int rxb_size =3D atomic_read(&sp->rx_bufs_left[i]); + int level =3D rx_buffer_level(sp, rxb_size, i); + + if ((level =3D=3D PANIC) && (!TASKLET_IN_USE)) { + int ret; =20 - for (i =3D 0; i < config->RxRingNum; i++) { - int rxb_size =3D atomic_read(&sp->rx_bufs_left[i]); - int level =3D rx_buffer_level(sp, rxb_size, i); - - if ((level =3D=3D PANIC) && (!TASKLET_IN_USE)) { - int ret; - - DBG_PRINT(ERR_DBG, "%s: Rx BD hit ", dev->name); - DBG_PRINT(ERR_DBG, "PANIC levels\n"); - if ((ret =3D fill_rx_buffers(sp, i)) =3D=3D -ENOMEM) { - DBG_PRINT(ERR_DBG, "%s:Out of memory", + DBG_PRINT(INTR_DBG, "%s: Rx BD hit ", dev->name); - DBG_PRINT(ERR_DBG, " in ISR!!\n"); - writeq(general_mask, - &bar0->general_int_mask); - spin_unlock(&sp->isr_lock); - return IRQ_HANDLED; + DBG_PRINT(INTR_DBG, "PANIC levels\n"); + if ((ret =3D + fill_rx_buffers(sp, i)) =3D=3D -ENOMEM) { + DBG_PRINT(ERR_DBG, + "%s:Out of memory", + dev->name); + DBG_PRINT(ERR_DBG, " in ISR!!\n"); + writeq(general_mask, + &bar0->general_int_mask); + spin_unlock(&sp->isr_lock); + return IRQ_HANDLED; + } + clear_bit(0, + (unsigned long *) (&sp-> + tasklet_status)); + } else if ((level =3D=3D LOW) + && (!atomic_read(&sp->tasklet_status))) { + tasklet_schedule(&sp->task); } - clear_bit(0, - (unsigned long *) (&sp->tasklet_status)); - } else if ((level =3D=3D LOW) - && (!atomic_read(&sp->tasklet_status))) { - tasklet_schedule(&sp->task); - } =20 - } + } =20 } #else tasklet_schedule(&sp->task); #endif =20 - /* Unmask all the previously enabled interrupts on the NIC */ + /* Unmask all previously enabled interrupts on the NIC. */ writeq(general_mask, &bar0->general_int_mask); =20 spin_unlock(&sp->isr_lock); return IRQ_HANDLED; } =20 -/* - * Input Argument/s:=20 - * dev - pointer to the device structure. - * Return value: - * pointer to the updated net_device_stats structure. +/** + * s2io_get_stats - Updates the device statistics structure.=20 + * @dev : pointer to the device structure. * Description: * This function updates the device statistics structure in the = s2io_nic=20 * structure and returns a pointer to the same. + * Return value: + * pointer to the updated net_device_stats structure. */ + struct net_device_stats *s2io_get_stats(struct net_device *dev) { nic_t *sp =3D dev->priv; @@ -2463,27 +2514,28 @@ mac_control =3D &sp->mac_control; config =3D &sp->config; =20 - sp->stats.tx_errors =3D mac_control->StatsInfo->tmac_any_err_frms; - sp->stats.rx_errors =3D mac_control->StatsInfo->rmac_drop_frms; - sp->stats.multicast =3D mac_control->StatsInfo->rmac_vld_mcst_frms; + sp->stats.tx_errors =3D mac_control->stats_info->tmac_any_err_frms; + sp->stats.rx_errors =3D mac_control->stats_info->rmac_drop_frms; + sp->stats.multicast =3D mac_control->stats_info->rmac_vld_mcst_frms; sp->stats.rx_length_errors =3D - mac_control->StatsInfo->rmac_long_frms; + mac_control->stats_info->rmac_long_frms; =20 return (&sp->stats); } =20 -/* - * Input Argument/s:=20 - * dev - pointer to the device structure - * Return value: - * void. +/** + * s2io_set_multicast - entry point for multicast address = enable/disable. + * @dev : pointer to the device structure * Description: * This function is a driver entry point which gets called by the = kernel=20 * whenever multicast addresses must be enabled/disabled. This also = gets=20 * called to set/reset promiscuous mode. Depending on the deivce flag, = we * determine, if multicast address must be enabled or if promiscuous = mode * is to be disabled etc. + * Return value: + * void. */ + static void s2io_set_multicast(struct net_device *dev) { int i, j, prev_cnt; @@ -2506,7 +2558,7 @@ RMAC_ADDR_CMD_MEM_OFFSET(MAC_MC_ALL_MC_ADDR_OFFSET); writeq(val64, &bar0->rmac_addr_cmd_mem); /* Wait till command completes */ - waitForCmdComplete(sp); + wait_for_cmd_complete(sp); =20 sp->m_cast_flg =3D 1; sp->all_multi_pos =3D MAC_MC_ALL_MC_ADDR_OFFSET; @@ -2519,7 +2571,7 @@ RMAC_ADDR_CMD_MEM_OFFSET(sp->all_multi_pos); writeq(val64, &bar0->rmac_addr_cmd_mem); /* Wait till command completes */ - waitForCmdComplete(sp); + wait_for_cmd_complete(sp); =20 sp->m_cast_flg =3D 0; sp->all_multi_pos =3D 0; @@ -2582,7 +2634,7 @@ writeq(val64, &bar0->rmac_addr_cmd_mem); =20 /* Wait for command completes */ - if (waitForCmdComplete(sp)) { + if (wait_for_cmd_complete(sp)) { DBG_PRINT(ERR_DBG, "%s: Adding ", dev->name); DBG_PRINT(ERR_DBG, "Multicasts failed\n"); @@ -2609,7 +2661,7 @@ writeq(val64, &bar0->rmac_addr_cmd_mem); =20 /* Wait for command completes */ - if (waitForCmdComplete(sp)) { + if (wait_for_cmd_complete(sp)) { DBG_PRINT(ERR_DBG, "%s: Adding ", dev->name); DBG_PRINT(ERR_DBG, "Multicasts failed\n"); @@ -2619,17 +2671,16 @@ } } =20 -/* - * Input Argument/s:=20 - * dev - pointer to the device structure. - * new_mac - a uchar pointer to the new mac address which is to be = set. - * Return value: - * SUCCESS on success and an appropriate (-)ve integer as defined in = errno.h - * file on failure. - * Description: - * This procedure will program the Xframe to receive frames with new - * Mac Address +/** + * s2io_set_mac_addr - Programs the Xframe mac address=20 + * @dev : pointer to the device structure. + * @addr: a uchar pointer to the new mac address which is to be set. + * Description : This procedure will program the Xframe to receive=20 + * frames with new Mac Address + * Return value: SUCCESS on success and an appropriate (-)ve integer=20 + * as defined in errno.h file on failure. */ + int s2io_set_mac_addr(struct net_device *dev, u8 * addr) { nic_t *sp =3D dev->priv; @@ -2655,7 +2706,7 @@ RMAC_ADDR_CMD_MEM_OFFSET(0); writeq(val64, &bar0->rmac_addr_cmd_mem); /* Wait till command completes */ - if (waitForCmdComplete(sp)) { + if (wait_for_cmd_complete(sp)) { DBG_PRINT(ERR_DBG, "%s: set_mac_addr failed\n", dev->name); return FAILURE; } @@ -2663,18 +2714,18 @@ return SUCCESS; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * info - pointer to the structure with parameters given by ethtool to = set - * link information. - * Return value: - * 0 on success. +/** + * s2io_ethtool_sset - Sets different link parameters.=20 + * @sp : private member of the device structure, which is a pointer to = the * s2io_nic structure. + * @info: pointer to the structure with parameters given by ethtool to = set + * link information. * Description: - * The function sets different link parameters provided by the user = onto=20 - * the NIC. - */ + * The function sets different link parameters provided by the user = onto=20 + * the NIC. + * Return value: + * 0 on success. +*/ + static int s2io_ethtool_sset(struct net_device *dev, struct ethtool_cmd *info) { @@ -2690,17 +2741,18 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * info - pointer to the structure with parameters given by ethtool to = return - * link information. - * Return value: - * void +/** + * s2io_ethtol_gset - Return link specific information.=20 + * @sp : private member of the device structure, pointer to the + * s2io_nic structure. + * @info : pointer to the structure with parameters given by ethtool + * to return link information. * Description: - * Returns link specefic information like speed, duplex etc.. to = ethtool. + * Returns link specific information like speed, duplex etc.. to = ethtool. + * Return value : + * return 0 on success. */ + int s2io_ethtool_gset(struct net_device *dev, struct ethtool_cmd *info) { nic_t *sp =3D dev->priv; @@ -2721,17 +2773,18 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * info - pointer to the structure with parameters given by ethtool to = return - * driver information. +/** + * s2io_ethtool_gdrvinfo - Returns driver specific information.=20 + * @sp : private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * @info : pointer to the structure with parameters given by ethtool to + * return driver information. + * Description: + * Returns driver specefic information like name, version etc.. to = ethtool. * Return value: * void - * Description: - * Returns driver specefic information like name, version etc.. to = ethtool. */ + static void s2io_ethtool_gdrvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { @@ -2748,19 +2801,20 @@ info->n_stats =3D S2IO_STAT_LEN; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * regs - pointer to the structure with parameters given by ethtool = for=20 +/** + * s2io_ethtool_gregs - dumps the entire space of Xfame into the = buffer. + * @sp: private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * @regs : pointer to the structure with parameters given by ethtool = for=20 * dumping the registers. - * reg_space - The input argumnet into which all the registers are = dumped. - * Return value: - * void - * Description: - * Dumps the entire register space of xFrame NIC into the user given = buffer=20 - * area. - */ + * @reg_space: The input argumnet into which all the registers are = dumped. + * Description: + * Dumps the entire register space of xFrame NIC into the user given + * buffer area. + * Return value : + * void . +*/ + static void s2io_ethtool_gregs(struct net_device *dev, struct ethtool_regs *regs, void *space) { @@ -2778,17 +2832,15 @@ } } =20 -/* - * Input Argument/s:=20 - * data - address of the private member of the device structure, which = +/** + * s2io_phy_id - timer function that alternates adapter LED. + * @data : address of the private member of the device structure, = which=20 * is a pointer to the s2io_nic structure, provided as an u32. - * Return value: - * void - * Description: - * This is actually the timer function that alternates the adapter LED = bit - * of the adapter control bit to set/reset every time on invocation. - * The timer is set for 1/2 a second, hence tha NIC blinks once every = second. - */ + * Description: This is actually the timer function that alternates the = + * adapter LED bit of the adapter control bit to set/reset every time = on=20 + * invocation. The timer is set for 1/2 a second, hence tha NIC blinks=20 + * once every second. +*/ static void s2io_phy_id(unsigned long data) { nic_t *sp =3D (nic_t *) data; @@ -2810,20 +2862,21 @@ mod_timer(&sp->id_timer, jiffies + HZ / 2); } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * id - pointer to the structure with identification parameters given = by=20 - * ethtool. +/** + * s2io_ethtool_idnic - To physically identify the nic on the system. + * @sp : private member of the device structure, which is a pointer to = the + * s2io_nic structure. + * @id : pointer to the structure with identification parameters given = by=20 + * ethtool. + * Description: Used to physically identify the NIC on the system. + * The Link LED will blink for a time specified by the user for=20 + * identification. + * NOTE: The Link has to be Up to be able to blink the LED. Hence=20 + * identification is possible only if it's link is up. * Return value: - * int , returns '0' on success - * Description: - * Used to physically identify the NIC on the system. The Link LED = will blink - * for a time specified by the user for identification. - * NOTE: The Link has to be Up to be able to blink the LED. Hence=20 - * identification is possible only if it's link is up. + * int , returns 0 on success */ + static int s2io_ethtool_idnic(struct net_device *dev, u32 data) { u64 val64 =3D 0; @@ -2856,15 +2909,14 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * ep - pointer to the structure with pause parameters given by = ethtool. +/** + * s2io_ethtool_getpause_data -Pause frame frame generation and = reception. + * @sp : private member of the device structure, which is a pointer to = the * s2io_nic structure. + * @ep : pointer to the structure with pause parameters given by = ethtool. + * Description: + * Returns the Pause frame generation and reception capability of the = NIC. * Return value: * void - * Description: - * Returns the Pause frame generation and reception capability of the = NIC. */ static void s2io_ethtool_getpause_data(struct net_device *dev, struct ethtool_pauseparam *ep) @@ -2881,17 +2933,18 @@ ep->autoneg =3D FALSE; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * ep - pointer to the structure with pause parameters given by = ethtool. - * Return value: - * int, returns '0' on Success +/** + * s2io_ethtool-setpause_data - set/reset pause frame generation. + * @sp : private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * @ep : pointer to the structure with pause parameters given by = ethtool. * Description: - * It can be used to set or reset Pause frame generation or reception = support=20 - * of the NIC. + * It can be used to set or reset Pause frame generation or reception + * support of the NIC. + * Return value: + * int, returns 0 on Success */ + int s2io_ethtool_setpause_data(struct net_device *dev, struct ethtool_pauseparam *ep) { @@ -2912,21 +2965,24 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * off - offset at which the data must be written - * Return value: - * -1 on failure and the value read from the Eeprom if successful. +/** + * read_eeprom - reads 4 bytes of data from user given offset. + * @sp : private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * @off : offset at which the data must be written + * @data : Its an output parameter where the data read at the given + * offset is stored. * Description: - * Will read 4 bytes of data from the user given offset and return the = - * read data. + * Will read 4 bytes of data from the user given offset and return the=20 + * read data. * NOTE: Will allow to read only part of the EEPROM visible through the - * I2C bus. + * I2C bus. + * Return value: + * -1 on failure and 0 on success. */ + #define S2IO_DEV_ID 5 -static u32 readEeprom(nic_t * sp, int off) +static u32 read_eeprom(nic_t * sp, int off) { u32 data =3D -1, exit_cnt =3D 0; u64 val64; @@ -2951,21 +3007,22 @@ return data; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * off - offset at which the data must be written - * data - The data that is to be written - * cnt - Number of bytes of the data that are actually to be written = into=20 +/** + * write_eeprom - actually writes the relevant part of the data value. + * @sp : private member of the device structure, which is a pointer to = the + * s2io_nic structure. + * @off : offset at which the data must be written + * @data : The data that is to be written + * @cnt : Number of bytes of the data that are actually to be written = into=20 * the Eeprom. (max of 3) - * Return value: - * '0' on success, -1 on failure. * Description: * Actually writes the relevant part of the data value into the Eeprom * through the I2C bus. + * Return value: + * 0 on success, -1 on failure. */ -static int writeEeprom(nic_t * sp, int off, u32 data, int cnt) + +static int write_eeprom(nic_t * sp, int off, u32 data, int cnt) { int exit_cnt =3D 0, ret =3D -1; u64 val64; @@ -2991,39 +3048,19 @@ return ret; } =20 -/*=20 - * A helper function used to invert the 4 byte u32 data field - * byte by byte. This will be used by the Read Eeprom function - * for display purposes. - */ -u32 inv(u32 data) -{ - static u32 ret =3D 0; - - if (data) { - u8 c =3D data; - ret =3D ((ret << 8) + c); - data >>=3D 8; - inv(data); - } - - return ret; -} - -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * eeprom - pointer to the user level structure provided by ethtool,=20 - * containing all relevant information. - * data_buf - user defined value to be written into Eeprom. - * Return value: - * int '0' on success - * Description: - * Reads the values stored in the Eeprom at given offset for a given = length. - * Stores these values int the input argument data buffer 'data_buf' = and - * returns these to the caller (ethtool.) +/** + * s2io_ethtool_geeprom - reads the value stored in the Eeprom. + * @sp : private member of the device structure, which is a pointer to = the * s2io_nic structure. + * @eeprom : pointer to the user level structure provided by ethtool,=20 + * containing all relevant information. + * @data_buf : user defined value to be written into Eeprom. + * Description: Reads the values stored in the Eeprom at given offset + * for a given length. Stores these values int the input argument data + * buffer 'data_buf' and returns these to the caller (ethtool.) + * Return value: + * int 0 on success */ + int s2io_ethtool_geeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, u8 * data_buf) { @@ -3036,30 +3073,31 @@ eeprom->len =3D XENA_EEPROM_SPACE - eeprom->offset; =20 for (i =3D 0; i < eeprom->len; i +=3D 4) { - data =3D readEeprom(sp, eeprom->offset + i); + data =3D read_eeprom(sp, eeprom->offset + i); if (data < 0) { DBG_PRINT(ERR_DBG, "Read of EEPROM failed\n"); return -EFAULT; } - valid =3D inv(data); + valid =3D INV(data); memcpy((data_buf + i), &valid, 4); } return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * eeprom - pointer to the user level structure provided by ethtool,=20 - * containing all relevant information. - * data_buf - user defined value to be written into Eeprom. - * Return value: - * '0' on success, -EFAULT on failure. - * Description: +/** + * s2io_ethtool_seeprom - tries to write the user provided value in = Eeprom + * @sp : private member of the device structure, which is a pointer to = the + * s2io_nic structure. + * @eeprom : pointer to the user level structure provided by ethtool,=20 + * containing all relevant information. + * @data_buf ; user defined value to be written into Eeprom. + * Description: * Tries to write the user provided value in the Eeprom, at the offset * given by the user. + * Return value: + * 0 on success, -EFAULT on failure. */ + static int s2io_ethtool_seeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, u8 * data_buf) @@ -3083,7 +3121,7 @@ } else valid =3D data; =20 - if (writeEeprom(sp, (eeprom->offset + cnt), valid, 0)) { + if (write_eeprom(sp, (eeprom->offset + cnt), valid, 0)) { DBG_PRINT(ERR_DBG, "ETHTOOL_WRITE_EEPROM Err: Cannot "); DBG_PRINT(ERR_DBG, @@ -3097,19 +3135,20 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * data - variable that returns the result of each of the test = conducted by=20 - * the driver. - * Return value: - * '0' on success. +/** + * s2io_register_test - reads and writes into all clock domains.=20 + * @sp : private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * @data : variable that returns the result of each of the test = conducted b + * by the driver. * Description: - * Read and write into all clock domains. The NIC has 3 clock domains, - * see that registers in all the three regions are accessible. + * Read and write into all clock domains. The NIC has 3 clock domains, + * see that registers in all the three regions are accessible. + * Return value: + * 0 on success. */ -static int s2io_registerTest(nic_t * sp, uint64_t * data) + +static int s2io_register_test(nic_t * sp, uint64_t * data) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; u64 val64 =3D 0; @@ -3159,88 +3198,90 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * data - variable that returns the result of each of the test = conducted by=20 - * the driver. - * Return value: - * '0' on success. +/** + * s2io_eeprom_test - to verify that EEprom in the xena can be = programmed.=20 + * @sp : private member of the device structure, which is a pointer to = the + * s2io_nic structure. + * @data:variable that returns the result of each of the test conducted = by + * the driver. * Description: - * Verify that EEPROM in the xena can be programmed using I2C_CONTROL=20 - * register. + * Verify that EEPROM in the xena can be programmed using I2C_CONTROL=20 + * register. + * Return value: + * 0 on success. */ -static int s2io_eepromTest(nic_t * sp, uint64_t * data) + +static int s2io_eeprom_test(nic_t * sp, uint64_t * data) { int fail =3D 0, ret_data; =20 /* Test Write Error at offset 0 */ - if (!writeEeprom(sp, 0, 0, 3)) + if (!write_eeprom(sp, 0, 0, 3)) fail =3D 1; =20 /* Test Write at offset 4f0 */ - if (writeEeprom(sp, 0x4F0, 0x01234567, 3)) + if (write_eeprom(sp, 0x4F0, 0x01234567, 3)) fail =3D 1; - if ((ret_data =3D readEeprom(sp, 0x4f0)) < 0) + if ((ret_data =3D read_eeprom(sp, 0x4F0)) < 0) fail =3D 1; =20 if (ret_data !=3D 0x01234567) fail =3D 1; =20 /* Reset the EEPROM data go FFFF */ - writeEeprom(sp, 0x4F0, 0xFFFFFFFF, 3); + write_eeprom(sp, 0x4F0, 0xFFFFFFFF, 3); =20 /* Test Write Request Error at offset 0x7c */ - if (!writeEeprom(sp, 0x07C, 0, 3)) + if (!write_eeprom(sp, 0x07C, 0, 3)) fail =3D 1; =20 /* Test Write Request at offset 0x7fc */ - if (writeEeprom(sp, 0x7FC, 0x01234567, 3)) + if (write_eeprom(sp, 0x7FC, 0x01234567, 3)) fail =3D 1; - if ((ret_data =3D readEeprom(sp, 0x7FC)) < 0) + if ((ret_data =3D read_eeprom(sp, 0x7FC)) < 0) fail =3D 1; =20 if (ret_data !=3D 0x01234567) fail =3D 1; =20 /* Reset the EEPROM data go FFFF */ - writeEeprom(sp, 0x7FC, 0xFFFFFFFF, 3); + write_eeprom(sp, 0x7FC, 0xFFFFFFFF, 3); =20 /* Test Write Error at offset 0x80 */ - if (!writeEeprom(sp, 0x080, 0, 3)) + if (!write_eeprom(sp, 0x080, 0, 3)) fail =3D 1; =20 /* Test Write Error at offset 0xfc */ - if (!writeEeprom(sp, 0x0FC, 0, 3)) + if (!write_eeprom(sp, 0x0FC, 0, 3)) fail =3D 1; =20 /* Test Write Error at offset 0x100 */ - if (!writeEeprom(sp, 0x100, 0, 3)) + if (!write_eeprom(sp, 0x100, 0, 3)) fail =3D 1; =20 /* Test Write Error at offset 4ec */ - if (!writeEeprom(sp, 0x4EC, 0, 3)) + if (!write_eeprom(sp, 0x4EC, 0, 3)) fail =3D 1; =20 *data =3D fail; return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * data - variable that returns the result of each of the test = conducted by=20 - * the driver. - * Return value: - * '0' on success and -1 on failure. +/** + * s2io_bist_test - invokes the MemBist test of the card . + * @sp : private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * @data:variable that returns the result of each of the test conducted = by=20 + * the driver. * Description: - * This invokes the MemBist test of the card. We give around - * 2 secs time for the Test to complete. If it's still not complete - * within this peiod, we consider that the test failed.=20 + * This invokes the MemBist test of the card. We give around + * 2 secs time for the Test to complete. If it's still not complete + * within this peiod, we consider that the test failed.=20 + * Return value: + * 0 on success and -1 on failure. */ -static int s2io_bistTest(nic_t * sp, uint64_t * data) + +static int s2io_bist_test(nic_t * sp, uint64_t * data) { u8 bist =3D 0; int cnt =3D 0, ret =3D -1; @@ -3264,19 +3305,20 @@ return ret; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * data - variable that returns the result of each of the test = conducted by=20 - * the driver. - * Return value: - * '0' on success. +/** + * s2io-link_test - verifies the link state of the nic =20 + * @sp ; private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * @data: variable that returns the result of each of the test = conducted by + * the driver. * Description: - * The function verifies the link state of the NIC and updates the = input=20 - * argument 'data' appropriately. + * The function verifies the link state of the NIC and updates the = input=20 + * argument 'data' appropriately. + * Return value: + * 0 on success. */ -static int s2io_linkTest(nic_t * sp, uint64_t * data) + +static int s2io_link_test(nic_t * sp, uint64_t * data) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; u64 val64; @@ -3288,19 +3330,20 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * data - variable that returns the result of each of the test = conducted by=20 - * the driver. - * Return value: - * '0' on success. +/** + * s2io_rldram_test - offline test for access to the RldRam chip on the = NIC=20 + * @sp - private member of the device structure, which is a pointer to = the =20 + * s2io_nic structure. + * @data - variable that returns the result of each of the test=20 + * conducted by the driver. * Description: * This is one of the offline test that tests the read and write=20 * access to the RldRam chip on the NIC. + * Return value: + * 0 on success. */ -static int s2io_rldramTest(nic_t * sp, uint64_t * data) + +static int s2io_rldram_test(nic_t * sp, uint64_t * data) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; u64 val64; @@ -3395,20 +3438,21 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * ethtest - pointer to a ethtool command specific structure that will = be - * returned to the user. - * data - variable that returns the result of each of the test = conducted by=20 - * the driver. - * Return value: - * SUCCESS on success and an appropriate -1 on failure. +/** + * s2io_ethtool_test - conducts 6 tsets to determine the health of = card. + * @sp : private member of the device structure, which is a pointer to = the + * s2io_nic structure. + * @ethtest : pointer to a ethtool command specific structure that = will be + * returned to the user. + * @data : variable that returns the result of each of the test=20 + * conducted by the driver. * Description: * This function conducts 6 tests ( 4 offline and 2 online) to = determine - * the health of the card. + * the health of the card. + * Return value: + * void */ + static void s2io_ethtool_test(struct net_device *dev, struct ethtool_test *ethtest, uint64_t * data) @@ -3424,22 +3468,22 @@ } else s2io_set_swapper(sp); =20 - if (s2io_registerTest(sp, &data[0])) + if (s2io_register_test(sp, &data[0])) ethtest->flags |=3D ETH_TEST_FL_FAILED; =20 s2io_reset(sp); s2io_set_swapper(sp); =20 - if (s2io_rldramTest(sp, &data[3])) + if (s2io_rldram_test(sp, &data[3])) ethtest->flags |=3D ETH_TEST_FL_FAILED; =20 s2io_reset(sp); s2io_set_swapper(sp); =20 - if (s2io_eepromTest(sp, &data[1])) + if (s2io_eeprom_test(sp, &data[1])) ethtest->flags |=3D ETH_TEST_FL_FAILED; =20 - if (s2io_bistTest(sp, &data[4])) + if (s2io_bist_test(sp, &data[4])) ethtest->flags |=3D ETH_TEST_FL_FAILED; =20 if (orig_state) @@ -3459,7 +3503,7 @@ data[4] =3D -1; } =20 - if (s2io_linkTest(sp, &data[2])) + if (s2io_link_test(sp, &data[2])) ethtest->flags |=3D ETH_TEST_FL_FAILED; =20 data[0] =3D 0; @@ -3475,7 +3519,7 @@ { int i =3D 0; nic_t *sp =3D dev->priv; - StatInfo_t *stat_info =3D sp->mac_control.StatsInfo; + StatInfo_t *stat_info =3D sp->mac_control.stats_info; =20 tmp_stats[i++] =3D stat_info->tmac_frms; tmp_stats[i++] =3D stat_info->tmac_data_octets; @@ -3597,36 +3641,37 @@ .get_ethtool_stats =3D s2io_get_ethtool_stats }; =20 -/* - * Input Argument/s:=20 - * dev - Device pointer. - * ifr - An IOCTL specefic structure, that can contain a pointer to - * a proprietary structure used to pass information to the driver. - * cmd - This is used to distinguish between the different commands = that - * can be passed to the IOCTL functions. - * Return value: - * '0' on success and an appropriate (-)ve integer as defined in = errno.h - * file on failure. +/** + * s2io_ioctl - Entry point for the Ioctl=20 + * @dev : Device pointer. + * @ifr : An IOCTL specefic structure, that can contain a pointer to + * a proprietary structure used to pass information to the driver. + * @cmd : This is used to distinguish between the different commands = that + * can be passed to the IOCTL functions. * Description: * This function has support for ethtool, adding multiple MAC = addresses on=20 * the NIC and some DBG commands for the util tool. + * Return value: + * Currently the IOCTL supports no operations, hence by default this + * function returns OP NOT SUPPORTED value. */ + int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { return -EOPNOTSUPP; } =20 -/* - * Input Argument/s:=20 - * dev - device pointer. - * new_mtu - the new MTU size for the device. +/** + * s2io_change_mtu - entry point to change MTU size for the device. + * @dev : device pointer. + * @new_mtu : the new MTU size for the device. + * Description: A driver entry point to change MTU size for the = device. + * Before changing the MTU the device must be stopped. * Return value: - * '0' on success and an appropriate (-)ve integer as defined in = errno.h + * 0 on success and an appropriate (-)ve integer as defined in = errno.h * file on failure. - * Description: - * A driver entry point to change MTU size for the device. Before = changing - * the MTU the device must be stopped. */ + int s2io_change_mtu(struct net_device *dev, int new_mtu) { nic_t *sp =3D dev->priv; @@ -3645,7 +3690,7 @@ return -EPERM; } =20 -/* Set the new MTU into the PYLD register of the NIC */ + /* Set the new MTU into the PYLD register of the NIC */ val64 =3D new_mtu; writeq(vBIT(val64, 2, 14), &bar0->rmac_max_pyld_len); =20 @@ -3654,18 +3699,19 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * dev_adr - address of the device structure in dma_addr_t format. - * Return value: - * void. +/** + * s2io_tasklet - Bottom half of the ISR. + * @dev_adr : address of the device structure in dma_addr_t format. * Description: * This is the tasklet or the bottom half of the ISR. This is * an extension of the ISR which is scheduled by the scheduler to be = run=20 * when the load on the CPU is low. All low priority tasks of the ISR = can * be pushed into the tasklet. For now the tasklet is used only to=20 * replenish the Rx buffers in the Rx buffer descriptors. + * Return value: + * void. */ + static void s2io_tasklet(unsigned long dev_addr) { struct net_device *dev =3D (struct net_device *) dev_addr; @@ -3678,29 +3724,30 @@ config =3D &sp->config; =20 if (!TASKLET_IN_USE) { - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { ret =3D fill_rx_buffers(sp, i); if (ret =3D=3D -ENOMEM) { DBG_PRINT(ERR_DBG, "%s: Out of ", dev->name); DBG_PRINT(ERR_DBG, "memory in tasklet\n"); - return; + break; } else if (ret =3D=3D -EFILL) { DBG_PRINT(ERR_DBG, "%s: Rx Ring %d is full\n", dev->name, i); - return; + break; } } clear_bit(0, (unsigned long *) (&sp->tasklet_status)); } } =20 - -/* - * Description: - *=20 +/** + * s2io_set_link - Set the LInk status + * @data: long pointer to device private structue + * Description: Sets the link status for the adapter */ + static void s2io_set_link(unsigned long data) { nic_t *nic =3D (nic_t *) data; @@ -3708,7 +3755,8 @@ XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; register u64 val64, err_reg; =20 - /* Allow a small delay for the NICs self initiated=20 + /*=20 + * Allow a small delay for the NICs self initiated=20 * cleanup to complete. */ set_current_state(TASK_UNINTERRUPTIBLE); @@ -3716,7 +3764,7 @@ =20 val64 =3D readq(&bar0->adapter_status); if (verify_xena_quiescence(val64, nic->device_enabled_once)) { - /* Acknowledge interrupt and clear the R1 register */ + /* Acknowledge Intr and clear R1 register. */ err_reg =3D readq(&bar0->mac_rmac_err_reg); writeq(err_reg, &bar0->mac_rmac_err_reg); =20 @@ -3748,13 +3796,16 @@ } } =20 -/* +/**=20 + * s2io_restart_nic - Resets the NIC. + * @data : long pointer to the device private structure * Description: * This function is scheduled to be run by the s2io_tx_watchdog * function after 0.5 secs to reset the NIC. The idea is to reduce=20 * the run time of the watch dog routine which is run holding a * spin lock. */ + static void s2io_restart_nic(unsigned long data) { struct net_device *dev =3D (struct net_device *) data; @@ -3767,18 +3818,19 @@ "%s: was reset by Tx watchdog timer.\n", dev->name); } =20 -/* - * Input Argument/s:=20 - * dev - device pointer. - * Return value: - * void +/**=20 + * s2io_tx_watchdog - Watchdog for transmit side.=20 + * @dev : Pointer to net device structure * Description: * This function is triggered if the Tx Queue is stopped * for a pre-defined amount of time when the Interface is still up. * If the Interface is jammed in such a situation, the hardware is * reset (by s2io_close) and restarted again (by s2io_open) to * overcome any problem that might have been caused in the hardware. + * Return value: + * void */ + static void s2io_tx_watchdog(struct net_device *dev) { nic_t *sp =3D dev->priv; @@ -3788,25 +3840,24 @@ } } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * skb - the socket buffer pointer. - * len - length of the packet - * cksum - FCS checksum of the frame. - * ring_no - the ring from which this RxD was extracted. - * Return value: - * SUCCESS on success and -1 on failure. - * Description:=20 - * This function is called by the Tx interrupt serivce routine to = perform=20 +/** + * rx_osm_handler - To perform some OS related operations on SKB. + * @sp: private member of the device structure,pointer to s2io_nic = structure. + * @skb : the socket buffer pointer. + * @len : length of the packet + * @cksum : FCS checksum of the frame. + * @ring_no : the ring from which this RxD was extracted. + * Description:=20 + * This function is called by the Tx interrupt serivce routine to = perform * some OS related operations on the SKB before passing it to the = upper * layers. It mainly checks if the checksum is OK, if so adds it to = the * SKBs cksum variable, increments the Rx packet count and passes the = SKB * to the upper layer. If the checksum is wrong, it increments the Rx * packet error count, frees the SKB and returns error. + * Return value: + * SUCCESS on success and -1 on failure. */ -static int rxOsmHandler(nic_t * sp, u16 len, RxD_t * rxdp, int ring_no) +static int rx_osm_handler(nic_t * sp, u16 len, RxD_t * rxdp, int = ring_no) { struct net_device *dev =3D (struct net_device *) sp->dev; struct sk_buff *skb =3D @@ -3817,7 +3868,8 @@ if ((rxdp->Control_1 & TCP_OR_UDP_FRAME) && (sp->rx_csum)) { l4_csum =3D RXD_GET_L4_CKSUM(rxdp->Control_1); if ((l3_csum =3D=3D L3_CKSUM_OK) && (l4_csum =3D=3D L4_CKSUM_OK)) { - /* NIC verifies if the Checksum of the received + /*=20 + * NIC verifies if the Checksum of the received * frame is Ok or not and accordingly returns * a flag in the RxD. */ @@ -3844,25 +3896,21 @@ #endif =20 dev->last_rx =3D jiffies; -#if DEBUG_ON - sp->rxpkt_cnt++; -#endif sp->rx_pkt_count++; sp->stats.rx_packets++; sp->stats.rx_bytes +=3D len; - sp->rxpkt_bytes +=3D len; =20 atomic_dec(&sp->rx_bufs_left[ring_no]); rxdp->Host_Control =3D 0; return SUCCESS; } =20 -int check_for_txSpace(nic_t * sp) +int check_for_tx_space(nic_t * sp) { u32 put_off, get_off, queue_len; int ret =3D TRUE, i; =20 - for (i =3D 0; i < sp->config.TxFIFONum; i++) { + for (i =3D 0; i < sp->config.tx_fifo_num; i++) { queue_len =3D sp->mac_control.tx_curr_put_info[i].fifo_len + 1; put_off =3D sp->mac_control.tx_curr_put_info[i].offset; @@ -3876,18 +3924,19 @@ return ret; } =20 -/* -* Input Argument/s:=20 -* sp - private member of the device structure, which is a pointer to = the=20 -* s2io_nic structure. -* link - inidicates whether link is UP/DOWN. -* Return value: -* void. -* Description: -* This function stops/starts the Tx queue depending on whether the = link -* status of the NIC is is down or up. This is called by the Alarm = interrupt=20 -* handler whenever a link change interrupt comes up.=20 -*/ +/** + * s2io_link - stops/starts the Tx queue. + * @sp : private member of the device structure, which is a pointer to = the + * s2io_nic structure. + * @link : inidicates whether link is UP/DOWN. + * Description: + * This function stops/starts the Tx queue depending on whether the = link + * status of the NIC is is down or up. This is called by the Alarm=20 + * interrupt handler whenever a link change interrupt comes up.=20 + * Return value: + * void. + */ + void s2io_link(nic_t * sp, int link) { struct net_device *dev =3D (struct net_device *) sp->dev; @@ -3900,8 +3949,9 @@ } else { DBG_PRINT(ERR_DBG, "%s: Link Up\n", dev->name); netif_carrier_on(dev); - if (check_for_txSpace(sp) =3D=3D TRUE) { - /* Don't wake the queue, if we know there + if (check_for_tx_space(sp) =3D=3D TRUE) { + /* + * Dont wake the queue if we know there * are no free TxDs available. */ netif_wake_queue(dev); @@ -3911,14 +3961,15 @@ sp->last_link_state =3D link; } =20 -/* -* Input Argument/s:=20 -* pdev - structure containing the PCI related information of the = device. -* Return value: -* returns the revision ID of the device. -* Description: -* Function to identify the Revision ID of xena. -*/ +/** + * get_xena_rev_id - to identify revision ID of xena.=20 + * @pdev : PCI Dev structure + * Description: + * Function to identify the Revision ID of xena. + * Return value: + * returns the revision ID of the device. + */ + int get_xena_rev_id(struct pci_dev *pdev) { u8 id =3D 0; @@ -3927,21 +3978,22 @@ return id; } =20 -/* -* Input Argument/s:=20 -* sp - private member of the device structure, which is a pointer to = the=20 -* s2io_nic structure. -* Return value: -* void -* Description: -* This function initializes a few of the PCI and PCI-X configuration = registers -* with recommended values. -*/ +/** + * s2io_init_pci -Initialization of PCI and PCI-X configuration = registers .=20 + * @sp : private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * Description: + * This function initializes a few of the PCI and PCI-X configuration = registers + * with recommended values. + * Return value: + * void + */ + static void s2io_init_pci(nic_t * sp) { u16 pci_cmd =3D 0; =20 -/* Enable Data Parity Error Recovery in PCI-X command register. */ + /* Enable Data Parity Error Recovery in PCI-X command register. */ pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, @@ -3949,13 +4001,13 @@ pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); =20 -/* Set the PErr Response bit in PCI command register. */ + /* Set the PErr Response bit in PCI command register. */ pci_read_config_word(sp->pdev, PCI_COMMAND, &pci_cmd); pci_write_config_word(sp->pdev, PCI_COMMAND, (pci_cmd | PCI_COMMAND_PARITY)); pci_read_config_word(sp->pdev, PCI_COMMAND, &pci_cmd); =20 -/* Set user specified value in Latency Timer */ + /* Set user specified value in Latency Timer */ if (latency_timer) { pci_write_config_byte(sp->pdev, PCI_LATENCY_TIMER, latency_timer); @@ -3963,14 +4015,14 @@ &latency_timer); } =20 -/* Set MMRB count to 4096 in PCI-X Command register. */ + /* Set MMRB count to 4096 in PCI-X Command register. */ pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, (sp->pcix_cmd | 0x0C)); pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); =20 -/* Setting Maximum outstanding splits to two for now. */ - sp->pcix_cmd &=3D 0xFF1F; + /* Setting Maximum outstanding splits based on system type. */ + sp->pcix_cmd &=3D 0xFF8F; =20 sp->pcix_cmd |=3D XENA_MAX_OUTSTANDING_SPLITS(XENA_TWO_SPLIT_TRANSACTION); @@ -3978,7 +4030,6 @@ sp->pcix_cmd); pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); - } =20 MODULE_AUTHOR("Raghavendra Koushik "); @@ -3991,21 +4042,20 @@ MODULE_PARM(rx_prio, "1-" __MODULE_STRING(1) "i"); MODULE_PARM(tx_prio, "1-" __MODULE_STRING(1) "i"); MODULE_PARM(latency_timer, "1-" __MODULE_STRING(1) "i"); +/** + * s2io_init_nic - Initialization of the adapter .=20 + * @pdev : structure containing the PCI related information of the = device. + * @pre: List of PCI devices supported by the driver listed in = s2io_tbl. + * Description: + * The function initializes an adapter identified by the pci_dec = structure. + * All OS related initialization including memory and device structure = and=20 + * initlaization of the device private variable is done. Also the = swapper=20 + * control register is initialized to enable read and write into the = I/O=20 + * registers of the device. + * Return value: + * returns 0 on success and negative on failure. + */ =20 -/* -* Input Argument/s:=20 -* pdev - structure containing the PCI related information of the = device. -* pre - the List of PCI devices supported by the driver listed in = s2io_tbl. -* Return value: -* returns '0' on success and negative on failure. -* Description: -* The function initializes an adapter identified by the pci_dec = structure. -* All OS related initialization including memory and device structure = and=20 -* initlaization of the device private variable is done. Also the = swapper=20 -* control register is initialized to enable read and write into the = I/O=20 -* registers of the device. -* =20 -*/ static int __devinit s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) { @@ -4031,6 +4081,7 @@ if (!pci_set_dma_mask(pdev, 0xffffffffffffffffULL)) { DBG_PRINT(INIT_DBG, "s2io_init_nic: Using 64bit DMA\n"); dma_flag =3D TRUE; + if (pci_set_consistent_dma_mask (pdev, 0xffffffffffffffffULL)) { DBG_PRINT(ERR_DBG, @@ -4080,7 +4131,8 @@ /* Initialize some PCI/PCI-X fields of the NIC. */ s2io_init_pci(sp); =20 - /* Setting the device configuration parameters. + /*=20 + * Setting the device configuration parameters. * Most of these parameters can be specified by the user during=20 * module insertion as they are module loadable parameters. If=20 * these parameters are not not specified during load time, they=20 @@ -4090,7 +4142,7 @@ config =3D &sp->config; =20 /* Tx side parameters. */ - config->TxFIFONum =3D fifo_num ? fifo_num : 1; + config->tx_fifo_num =3D fifo_num ? fifo_num : 1; =20 if (!fifo_len[0] && (fifo_num > 1)) { printk(KERN_ERR "Fifo Lens not specified for all FIFOs\n"); @@ -4109,67 +4161,56 @@ goto init_failed; } } - for (cnt =3D 0; cnt < config->TxFIFONum; cnt++) { - config->TxCfg[cnt].FifoLen =3D fifo_len[cnt]; - config->TxCfg[cnt].FifoPriority =3D cnt; + for (cnt =3D 0; cnt < config->tx_fifo_num; cnt++) { + config->tx_cfg[cnt].fifo_len =3D fifo_len[cnt]; + config->tx_cfg[cnt].fifo_priority =3D cnt; } } else { - config->TxCfg[0].FifoLen =3D DEFAULT_FIFO_LEN; - config->TxCfg[0].FifoPriority =3D 0; + config->tx_cfg[0].fifo_len =3D DEFAULT_FIFO_LEN; + config->tx_cfg[0].fifo_priority =3D 0; } =20 - config->TxIntrType =3D TXD_INT_TYPE_UTILZ; - for (i =3D 0; i < config->TxFIFONum; i++) { - if (config->TxCfg[i].FifoLen < 65) { - config->TxIntrType =3D TXD_INT_TYPE_PER_LIST; + config->tx_intr_type =3D TXD_INT_TYPE_UTILZ; + for (i =3D 0; i < config->tx_fifo_num; i++) { + config->tx_cfg[i].f_no_snoop =3D + (NO_SNOOP_TXD | NO_SNOOP_TXD_BUFFER); + if (config->tx_cfg[i].fifo_len < 65) { + config->tx_intr_type =3D TXD_INT_TYPE_PER_LIST; break; } } - - config->TxCfg[0].fNoSnoop =3D (NO_SNOOP_TXD | NO_SNOOP_TXD_BUFFER); - config->MaxTxDs =3D MAX_SKB_FRAGS; - config->TxFlow =3D TRUE; + config->max_txds =3D MAX_SKB_FRAGS; =20 /* Rx side parameters. */ - config->RxRingNum =3D ring_num ? ring_num : 1; + config->rx_ring_num =3D ring_num ? ring_num : 1; =20 if (ring_len[0]) { int cnt; - for (cnt =3D 0; cnt < config->RxRingNum; cnt++) { - config->RxCfg[cnt].NumRxd =3D ring_len[cnt]; - config->RxCfg[cnt].RingPriority =3D cnt; + for (cnt =3D 0; cnt < config->rx_ring_num; cnt++) { + config->rx_cfg[cnt].num_rxd =3D ring_len[cnt]; + config->rx_cfg[cnt].ring_priority =3D cnt; } } else { - int id; - if ((id =3D get_xena_rev_id(pdev)) =3D=3D 1) { - config->RxCfg[0].NumRxd =3D LARGE_RXD_CNT; + config->rx_cfg[0].num_rxd =3D SMALL_RXD_CNT; + config->rx_cfg[0].ring_priority =3D 0; + } =20 - } else { - config->RxCfg[0].NumRxd =3D SMALL_RXD_CNT; - } - config->RxCfg[0].RingPriority =3D 0; + for (i =3D 0; i < config->rx_ring_num; i++) { + config->rx_cfg[i].ring_org =3D RING_ORG_BUFF1; + config->rx_cfg[i].f_no_snoop =3D + (NO_SNOOP_RXD | NO_SNOOP_RXD_BUFFER); } - config->RxCfg[0].RingOrg =3D RING_ORG_BUFF1; - config->RxCfg[0].RxdThresh =3D DEFAULT_RXD_THRESHOLD; - config->RxCfg[0].fNoSnoop =3D (NO_SNOOP_RXD | NO_SNOOP_RXD_BUFFER); - config->RxCfg[0].RxD_BackOff_Interval =3D TBD; - config->RxFlow =3D TRUE; - - /* Miscellaneous parameters. */ - config->RxVLANEnable =3D TRUE; - config->MTU =3D MAX_MTU_VLAN; - config->JumboEnable =3D FALSE; =20 /* Setting Mac Control parameters */ - mac_control->txdl_len =3D MAX_SKB_FRAGS; mac_control->rmac_pause_time =3D 0; =20 + /* Initialize Ring buffer parameters. */ - for (i =3D 0; i < config->RxRingNum; i++) + for (i =3D 0; i < config->rx_ring_num; i++) atomic_set(&sp->rx_bufs_left[i], 0); =20 /* initialize the shared memory used by the NIC and the host */ - if (initSharedMem(sp)) { + if (init_shared_mem(sp)) { DBG_PRINT(ERR_DBG, "%s: Memory allocation failed\n", dev->name); goto mem_alloc_failed; @@ -4208,15 +4249,16 @@ dev->set_multicast_list =3D &s2io_set_multicast; dev->do_ioctl =3D &s2io_ioctl; dev->change_mtu =3D &s2io_change_mtu; +#ifdef SET_ETHTOOL_OPS SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); - +#endif /* * will use eth_mac_addr() for dev->set_mac_address * mac address will be set every time dev->open() is called */ #ifdef CONFIG_S2IO_NAPI dev->poll =3D s2io_poll; - dev->weight =3D 128; /* For now. */ + dev->weight =3D 90; /* For now. */ #endif =20 dev->features |=3D NETIF_F_SG | NETIF_F_IP_CSUM; @@ -4244,14 +4286,15 @@ if (s2io_set_swapper(sp)) { DBG_PRINT(ERR_DBG, "%s:swapper settings are wrong\n", dev->name); - goto set_swap_failed; + goto register_failed; } =20 /* Fix for all "FFs" MAC address problems observed on Alpha platforms = */ - FixMacAddress(sp); + fix_mac_address(sp); s2io_reset(sp); =20 - /* Setting swapper control on the NIC, so the MAC address can be read. + /* + * Setting swapper control on the NIC, so the MAC address can be read. */ if (s2io_set_swapper(sp)) { DBG_PRINT(ERR_DBG, @@ -4260,50 +4303,52 @@ goto set_swap_failed; } =20 - /* MAC address initialization. - * For now only one mac address will be read and used. + /* =20 + * MAC address initialization. + * For now only one mac address will be read and used. */ bar0 =3D (XENA_dev_config_t *) sp->bar0; val64 =3D RMAC_ADDR_CMD_MEM_RD | RMAC_ADDR_CMD_MEM_STROBE_NEW_CMD | RMAC_ADDR_CMD_MEM_OFFSET(0 + MAC_MAC_ADDR_START_OFFSET); writeq(val64, &bar0->rmac_addr_cmd_mem); - waitForCmdComplete(sp); + wait_for_cmd_complete(sp); =20 tmp64 =3D readq(&bar0->rmac_addr_data0_mem); mac_down =3D (u32) tmp64; mac_up =3D (u32) (tmp64 >> 32); =20 - memset(sp->defMacAddr[0].mac_addr, 0, sizeof(ETH_ALEN)); + memset(sp->def_mac_addr[0].mac_addr, 0, sizeof(ETH_ALEN)); =20 - sp->defMacAddr[0].mac_addr[3] =3D (u8) (mac_up); - sp->defMacAddr[0].mac_addr[2] =3D (u8) (mac_up >> 8); - sp->defMacAddr[0].mac_addr[1] =3D (u8) (mac_up >> 16); - sp->defMacAddr[0].mac_addr[0] =3D (u8) (mac_up >> 24); - sp->defMacAddr[0].mac_addr[5] =3D (u8) (mac_down >> 16); - sp->defMacAddr[0].mac_addr[4] =3D (u8) (mac_down >> 24); + sp->def_mac_addr[0].mac_addr[3] =3D (u8) (mac_up); + sp->def_mac_addr[0].mac_addr[2] =3D (u8) (mac_up >> 8); + sp->def_mac_addr[0].mac_addr[1] =3D (u8) (mac_up >> 16); + sp->def_mac_addr[0].mac_addr[0] =3D (u8) (mac_up >> 24); + sp->def_mac_addr[0].mac_addr[5] =3D (u8) (mac_down >> 16); + sp->def_mac_addr[0].mac_addr[4] =3D (u8) (mac_down >> 24); =20 DBG_PRINT(INIT_DBG, "DEFAULT MAC ADDR:0x%02x-%02x-%02x-%02x-%02x-%02x\n", - sp->defMacAddr[0].mac_addr[0], - sp->defMacAddr[0].mac_addr[1], - sp->defMacAddr[0].mac_addr[2], - sp->defMacAddr[0].mac_addr[3], - sp->defMacAddr[0].mac_addr[4], - sp->defMacAddr[0].mac_addr[5]); + sp->def_mac_addr[0].mac_addr[0], + sp->def_mac_addr[0].mac_addr[1], + sp->def_mac_addr[0].mac_addr[2], + sp->def_mac_addr[0].mac_addr[3], + sp->def_mac_addr[0].mac_addr[4], + sp->def_mac_addr[0].mac_addr[5]); =20 /* Set the factory defined MAC address initially */ dev->addr_len =3D ETH_ALEN; - memcpy(dev->dev_addr, sp->defMacAddr, ETH_ALEN); + memcpy(dev->dev_addr, sp->def_mac_addr, ETH_ALEN); =20 /* Initialize the tasklet status flag */ atomic_set(&(sp->tasklet_status), 0); =20 =20 /* Initialize spinlocks */ - spin_lock_init(&sp->isr_lock); spin_lock_init(&sp->tx_lock); + spin_lock_init(&sp->isr_lock); =20 - /* SXE-002: Configure link and activity LED to init state=20 + /*=20 + * SXE-002: Configure link and activity LED to init state=20 * on driver load.=20 */ subid =3D sp->pdev->subsystem_device; @@ -4316,15 +4361,16 @@ val64 =3D readq(&bar0->gpio_control); } =20 - /* Make Link state as off at this point, when the Link change=20 + sp->rx_csum =3D 1; /* Rx chksum verify enabled by default */ + + /*=20 + * Make Link state as off at this point, when the Link change=20 * interrupt comes the state will be automatically changed to=20 * the right state. */ netif_carrier_off(dev); sp->last_link_state =3D LINK_DOWN; =20 - sp->rx_csum =3D 1; /* Rx chksum verify enabled by default */ - return 0; =20 set_swap_failed: @@ -4335,7 +4381,7 @@ iounmap(sp->bar0); bar0_remap_failed: mem_alloc_failed: - freeSharedMem(sp); + free_shared_mem(sp); init_failed: pci_disable_device(pdev); pci_release_regions(pdev); @@ -4345,16 +4391,15 @@ return -ENODEV; } =20 -/* -* Input Argument/s:=20 -* pdev - structure containing the PCI related information of the = device. -* Return value: -* void -* Description: -* This function is called by the Pci subsystem to release a PCI device = -* and free up all resource held up by the device. This could be in = response=20 -* to a Hot plug event or when the driver is to be removed from memory. -*/ +/** + * s2io_rem_nic - Free the PCI device=20 + * @pdev: structure containing the PCI related information of the = device. + * Description: This function is called by the Pci subsystem to release = a=20 + * PCI device and free up all resource held up by the device. This = could + * be in response to a Hot plug event or when the driver is to be = removed=20 + * from memory. + */ + static void __devexit s2io_rem_nic(struct pci_dev *pdev) { struct net_device *dev =3D @@ -4365,24 +4410,36 @@ DBG_PRINT(ERR_DBG, "Driver Data is NULL!!\n"); return; } + sp =3D dev->priv; - freeSharedMem(sp); + unregister_netdev(dev); + + free_shared_mem(sp); iounmap(sp->bar0); iounmap(sp->bar1); pci_disable_device(pdev); pci_release_regions(pdev); pci_set_drvdata(pdev, NULL); =20 - unregister_netdev(dev); - free_netdev(dev); } =20 +/** + * s2io_starter - Entry point for the driver + * Description: This function is the entry point for the driver. It = verifies + * the module loadable parameters and initializes PCI configuration = space. + */ + int __init s2io_starter(void) { return pci_module_init(&s2io_driver); } =20 +/** + * s2io_closer - Cleanup routine for the driver=20 + * Description: This function is the cleanup routine for the driver. It = unregist * ers the driver. + */ + void s2io_closer(void) { pci_unregister_driver(&s2io_driver); diff -urN vanilla-linux/drivers/net/s2io.h = linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-06 11:31:09.532308264 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-06 13:03:08.087360376 -0700 @@ -16,6 +16,7 @@ #define TBD 0 #define BIT(loc) (0x8000000000000000ULL >> (loc)) #define vBIT(val, loc, sz) (((u64)val) << (64-loc-sz)) +#define INV(d) ((d&0xff)<<24) | (((d>>8)&0xff)<<16) | = (((d>>16)&0xff)<<8)| ((d>>24)&0xff) =20 #ifndef BOOL #define BOOL int @@ -49,11 +50,13 @@ #define ALIGN_SIZE 127 #define PCIX_COMMAND_REGISTER 0x62 =20 +#ifndef SET_ETHTOOL_OPS +#define SUPPORTED_10000baseT_Full (1 << 12) +#endif + /* * Debug related variables. */ -#define DEBUG_ON TRUE - /* different debug levels. */ #define ERR_DBG 0 #define INIT_DBG 1 @@ -312,7 +315,7 @@ /* Maintains Per FIFO related information. */ typedef struct tx_fifo_config { #define MAX_AVAILABLE_TXDS 8192 - u32 FifoLen; /* specifies len of FIFO upto 8192, ie no of TxDLs */ + u32 fifo_len; /* specifies len of FIFO upto 8192, ie no of TxDLs */ /* Priority definition */ #define TX_FIFO_PRI_0 0 /*Highest */ #define TX_FIFO_PRI_1 1 @@ -322,9 +325,9 @@ #define TX_FIFO_PRI_5 5 #define TX_FIFO_PRI_6 6 #define TX_FIFO_PRI_7 7 /*lowest */ - u8 FifoPriority; /* specifies pointer level for FIFO */ + u8 fifo_priority; /* specifies pointer level for FIFO */ /* user should not set twos fifos with same pri */ - u8 fNoSnoop; + u8 f_no_snoop; #define NO_SNOOP_TXD 0x01 #define NO_SNOOP_TXD_BUFFER 0x02 } tx_fifo_config_t; @@ -332,7 +335,7 @@ =20 /* Maintains per Ring related information */ typedef struct rx_ring_config { - u32 NumRxd; /*No of RxDs per Rx Ring */ + u32 num_rxd; /*No of RxDs per Rx Ring */ #define RX_RING_PRI_0 0 /* highest */ #define RX_RING_PRI_1 1 #define RX_RING_PRI_2 2 @@ -342,70 +345,37 @@ #define RX_RING_PRI_6 6 #define RX_RING_PRI_7 7 /* lowest */ =20 - u8 RingPriority; /*Specifies service priority of ring */ + u8 ring_priority; /*Specifies service priority of ring */ /* OSM should not set any two rings with same priority */ - u8 RingOrg; /*Organization of ring */ + u8 ring_org; /*Organization of ring */ #define RING_ORG_BUFF1 0x01 #define RX_RING_ORG_BUFF3 0x03 #define RX_RING_ORG_BUFF5 0x05 =20 -/* In case of 3 buffer recv. mode, size of three buffers is expected = as.. */ -#define BUFF_SZ_1 22 /* ethernet header */ -#define BUFF_SZ_2 (64+64) /* max. IP+TCP header size = */ -#define BUFF_SZ_3 (1500-20-20) /* TCP payload */ -#define BUFF_SZ_3_JUMBO (9600-20-20) /* Jumbo TCP payload = */ - - u32 RxdThresh; /*No of used Rxds NIC can store before transfer to = host */ -#define DEFAULT_RXD_THRESHOLD 0x1 /* TODO */ - u8 fNoSnoop; + u8 f_no_snoop; #define NO_SNOOP_RXD 0x01 #define NO_SNOOP_RXD_BUFFER 0x02 - u32 RxD_BackOff_Interval; -#define RXD_BACKOFF_INTERVAL_DEF 0x0 -#define RXD_BACKOFF_INTERVAL_MIN 0x0 -#define RXD_BACKOFF_INTERVAL_MAX 0x0 } rx_ring_config_t; =20 /* This structure provides contains values of the tunable parameters=20 * of the H/W=20 */ struct config_param { - /* Tx Side */ - u32 TxFIFONum; /*Number of Tx FIFOs */ + u32 tx_fifo_num; /*Number of Tx FIFOs */ #define MAX_TX_FIFOS 8 =20 - tx_fifo_config_t TxCfg[MAX_TX_FIFOS]; /*Per-Tx FIFO config */ - u32 MaxTxDs; /*Max no. of Tx buffer descriptor per TxDL */ - BOOL TxVLANEnable; /*TRUE: Insert VLAN ID, FALSE: Don't insert */ -#define TX_REQ_TIMEOUT_DEFAULT 0x0 -#define TX_REQ_TIMEOUT_MIN 0x0 -#define TX_REQ_TIMEOUT_MAX 0x0 - u32 TxReqTimeOut; - BOOL TxFlow; /*Tx flow control enable */ - BOOL RxFlow; - BOOL OverrideTxServiceState; /* TRUE: Overide, FALSE: Do not override=20 - Use the new priority information - of service state. It is not recommended - to change but OSM can opt to do so */ -#define MAX_SERVICE_STATES 36 - u8 TxServiceState[MAX_SERVICE_STATES]; - /* Array element represent 'priority'=20 - * and array index represents - * 'Service state' e.g.=20 - * TxServiceState[3]=3D7; it means=20 - * Service state 3 is associated=20 - * with priority 7 of a Tx FIFO */ - u64 TxIntrType; /* Specifies if Tx Intr is UTILZ or PER_LIST type. */ + tx_fifo_config_t tx_cfg[MAX_TX_FIFOS]; /*Per-Tx FIFO config */ + u32 max_txds; /*Max no. of Tx buffer descriptor per TxDL */ + u64 tx_intr_type; + /* Specifies if Tx Intr is UTILZ or PER_LIST type. */ =20 /* Rx Side */ - u32 RxRingNum; /*Number of receive rings */ + u32 rx_ring_num; /*Number of receive rings */ #define MAX_RX_RINGS 8 #define MAX_RX_BLOCKS_PER_RING 150 =20 - rx_ring_config_t RxCfg[MAX_RX_RINGS]; /*Per-Rx Ring config */ - BOOL RxVLANEnable; /*TRUE: Strip off VLAN tag from the frame, - FALSE: Don't strip off VLAN tag */ + rx_ring_config_t rx_cfg[MAX_RX_RINGS]; /*Per-Rx Ring config */ =20 #define HEADER_ETHERNET_II_802_3_SIZE 14 #define HEADER_802_2_SIZE 3 @@ -419,23 +389,6 @@ #define MAX_PYLD_JUMBO 9600 #define MAX_MTU_JUMBO (MAX_PYLD_JUMBO+18) #define MAX_MTU_JUMBO_VLAN (MAX_PYLD_JUMBO+22) - u32 MTU; /*Maximum Payload */ - BOOL JumboEnable; /*Enable Jumbo frames recv/send */ - BOOL OverrideRxServiceState; /* TRUE: Overide, FALSE: Do not override=20 - Use the new priority information - of service state. It is not recommended - to change but OSM can opt to do so */ -#define MAX_SERVICE_STATES 36 - u8 RxServiceState[MAX_SERVICE_STATES]; - /* Array element represent 'priority'=20 - * and array index represents=20 - * 'Service state'e.g.=20 - * RxServiceState[3]=3D7; it means=20 - * Service state 3 is associated=20 - * with priority 7 of a Rx FIFO */ - BOOL StatAutoRefresh; /* When true, StatRefreshTime have valid value = */ - u32 StatRefreshTime; /*Time for refreshing statistics */ -#define STAT_TRSF_PER_1_SECOND 0x208D5 }; =20 /* Structure representing MAC Addrs */ @@ -514,14 +467,9 @@ #define SET_NUM_TAG(val) vBIT(val,16,32) =20 #define RXD_GET_BUFFER0_SIZE(Control_2) (u64)((Control_2 & = vBIT(0xFFFF,0,16))) -/* =20 -#define TXD_GET_BUFFER1_SIZE(Control_2) (u16)((Control_2 & = MASK_BUFFER1_SIZE) >> (63-31)) =20 -#define TXD_GET_BUFFER2_SIZE(Control_2) (u16)((Control_2 & = MASK_BUFFER2_SIZE) >> (63-47)) =20 -*/ u64 Buffer0_ptr; } RxD_t; =20 - /* Structure that represents the Rx descriptor block which contains=20 * 128 Rx descriptors. */ @@ -531,11 +479,12 @@ =20 u64 reserved_0; #define END_OF_BLOCK 0xFEFFFFFFFFFFFFFFULL - u64 reserved_1; /* 0xFEFFFFFFFFFFFFFF to mark last Rxd in this blk */ - u64 reserved_2_pNext_RxD_block; /*@ Logical ptr to next */ - u64 pNext_RxD_Blk_physical; /* Buff0_ptr. - In a 32 bit arch the upper 32 bits=20 - should be 0 */ + u64 reserved_1; /* 0xFEFFFFFFFFFFFFFF to mark last=20 + * Rxd in this blk */ + u64 reserved_2_pNext_RxD_block; /* Logical ptr to next */ + u64 pNext_RxD_Blk_physical; /* Buff0_ptr.In a 32 bit arch + * the upper 32 bits should=20 + * be 0 */ } RxD_block_t; =20 /* Structure which stores all the MAC control parameters */ @@ -568,10 +517,6 @@ */ typedef struct mac_info { /* rx side stuff */ - u32 rxd_ring_mem_sz; - RxD_t *RxRing[MAX_RX_RINGS]; /* Logical Rx ring pointers */ - dma_addr_t RxRing_Phy[MAX_RX_RINGS]; - /* Put pointer info which indictes which RxD has to be replenished=20 * with a new buffer. */ @@ -583,41 +528,29 @@ rx_curr_get_info_t rx_curr_get_info[MAX_RX_RINGS]; =20 u16 rmac_pause_time; - - /* this will be used in receive function, this decides which ring = would - be processed first. eg: ring with priority value 0 (highest) should - be processed first.=20 - first 3 LSB bits represent ring number which should be processed=20 - first, similarly next 3 bits represent next ring to be processed. - eg: value of _rx_ring_pri_map =3D 0x0000 003A means=20 - ring #2 would be processed first and #7 would be processed next - */ - u32 _rx_ring_pri_map; + u16 mc_pause_threshold_q0q3; + u16 mc_pause_threshold_q4q7; =20 /* tx side stuff */ - void *txd_list_mem; /* orignal pointer to allocated mem */ + void *txd_list_mem; /* original pointer to allocated mem */ dma_addr_t txd_list_mem_phy; u32 txd_list_mem_sz; =20 /* logical pointer of start of each Tx FIFO */ TxFIFO_element_t *tx_FIFO_start[MAX_TX_FIFOS]; =20 - /* logical pointer of start of TxDL which corresponds to each Tx FIFO = */ + /* The Phy and virtual mem loactions of the Tx descriptors. */ TxD_t *txdl_start[MAX_TX_FIFOS]; - - /* Same as txdl_start but phy addr */ dma_addr_t txdl_start_phy[MAX_TX_FIFOS]; =20 /* Current offset within tx_FIFO_start, where driver would write new Tx = frame*/ tx_curr_put_info_t tx_curr_put_info[MAX_TX_FIFOS]; tx_curr_get_info_t tx_curr_get_info[MAX_TX_FIFOS]; =20 - u16 txdl_len; /* length of a TxDL, same for all */ - void *stats_mem; /* orignal pointer to allocated mem */ dma_addr_t stats_mem_phy; /* Physical address of the stat block */ u32 stats_mem_sz; - StatInfo_t *StatsInfo; /* Logical address of the stat block */ + StatInfo_t *stats_info; /* Logical address of the stat block */ } mac_info_t; =20 /* structure representing the user defined MAC addresses */ @@ -632,13 +565,20 @@ dma_addr_t block_dma_addr; } rx_block_info_t; =20 +/* Default Tunable parameters of the NIC. */ +#define DEFAULT_FIFO_LEN 4096 +#define SMALL_RXD_CNT 30 * (MAX_RXDS_PER_BLOCK+1) +#define LARGE_RXD_CNT 100 * (MAX_RXDS_PER_BLOCK+1) +#define SMALL_BLK_CNT 30 +#define LARGE_BLK_CNT 100 + /* Structure representing one instance of the NIC */ typedef struct s2io_nic { #define MAX_MAC_SUPPORTED 16 #define MAX_SUPPORTED_MULTICASTS MAX_MAC_SUPPORTED =20 - macaddr_t defMacAddr[MAX_MAC_SUPPORTED]; - macaddr_t preMacAddr[MAX_MAC_SUPPORTED]; + macaddr_t def_mac_addr[MAX_MAC_SUPPORTED]; + macaddr_t pre_mac_addr[MAX_MAC_SUPPORTED]; =20 struct net_device_stats stats; caddr_t bar0; @@ -671,8 +611,8 @@ u32 irq; atomic_t rx_bufs_left[MAX_RX_RINGS]; =20 - spinlock_t isr_lock; spinlock_t tx_lock; + spinlock_t isr_lock; =20 #define PROMISC 1 #define ALL_MULTI 2 @@ -691,20 +631,11 @@ u16 tx_err_count; u16 rx_err_count; =20 -#if DEBUG_ON - u64 rxpkt_bytes; - u64 txpkt_bytes; - int int_cnt; - int rxint_cnt; - int txint_cnt; - u64 rxpkt_cnt; -#endif - - /* Place holders for the virtual and physical addresses of=20 + /* + * Place holders for the virtual and physical addresses of=20 * all the Rx Blocks */ - struct rx_block_info - rx_blocks[MAX_RX_RINGS][MAX_RX_BLOCKS_PER_RING]; + rx_block_info_t rx_blocks[MAX_RX_RINGS][MAX_RX_BLOCKS_PER_RING]; int block_count[MAX_RX_RINGS]; int pkt_cnt[MAX_RX_RINGS]; =20 @@ -742,19 +673,14 @@ #define RESET_ERROR 1; #define CMD_ERROR 2; =20 -/* Default Tunable parameters of the NIC. */ -#define DEFAULT_FIFO_LEN 4096 -#define SMALL_RXD_CNT 40 * (MAX_RXDS_PER_BLOCK+1) -#define LARGE_RXD_CNT 100 * (MAX_RXDS_PER_BLOCK+1) - /* OS related system calls */ #ifndef readq static inline u64 readq(void *addr) { u64 ret =3D 0; ret =3D readl(addr + 4); - ret <<=3D 32; - ret |=3D readl(addr); + (u64) ret <<=3D 32; + (u64) ret |=3D readl(addr); =20 return ret; } @@ -816,30 +742,36 @@ =20 /* DMA level Inressupts */ #define TXDMA_PFC_INT_M BIT(0) - /* PFC block interrupts */ +#define TXDMA_PCC_INT_M BIT(2) + +/* PFC block interrupts */ #define PFC_MISC_ERR_1 BIT(0) /* Interrupt to indicate FIFO full = */ =20 +/* PCC block interrupts. */ +#define PCC_FB_ECC_ERR vBIT(0xff, 16, 8) /* Interrupt to indicate + PCC_FB_ECC Error. */ + /* * Prototype declaration. */ static int __devinit s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre); static void __devexit s2io_rem_nic(struct pci_dev *pdev); -static int initSharedMem(struct s2io_nic *sp); -static void freeSharedMem(struct s2io_nic *sp); -static int initNic(struct s2io_nic *nic); +static int init_shared_mem(struct s2io_nic *sp); +static void free_shared_mem(struct s2io_nic *sp); +static int init_nic(struct s2io_nic *nic); #ifndef CONFIG_S2IO_NAPI -static void rxIntrHandler(struct s2io_nic *sp); +static void rx_intr_handler(struct s2io_nic *sp); #endif -static void txIntrHandler(struct s2io_nic *sp); -static void alarmIntrHandler(struct s2io_nic *sp); +static void tx_intr_handler(struct s2io_nic *sp); +static void alarm_intr_handler(struct s2io_nic *sp); =20 static int s2io_starter(void); void s2io_closer(void); static void s2io_tx_watchdog(struct net_device *dev); static void s2io_tasklet(unsigned long dev_addr); static void s2io_set_multicast(struct net_device *dev); -static int rxOsmHandler(nic_t * sp, u16 len, RxD_t * rxdp, int = ring_no); +static int rx_osm_handler(nic_t * sp, u16 len, RxD_t * rxdp, int = ring_no); void s2io_link(nic_t * sp, int link); void s2io_reset(nic_t * sp); #ifdef CONFIG_S2IO_NAPI @@ -849,6 +781,10 @@ int s2io_set_mac_addr(struct net_device *dev, u8 * addr); static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs = *regs); static int verify_xena_quiescence(u64 val64, int flag); +int verify_load_parm(void); +#ifdef SET_ETHTOOL_OPS static struct ethtool_ops netdev_ethtool_ops; +#endif +static void s2io_set_link(unsigned long data); =20 #endif /* _S2IO_H */ diff -urN vanilla-linux/drivers/net/s2io-regs.h = linux-2.6.8.1/drivers/net/s2io-regs.h --- vanilla-linux/drivers/net/s2io-regs.h 2004-10-06 11:31:09.539307200 = -0700 +++ linux-2.6.8.1/drivers/net/s2io-regs.h 2004-10-06 13:03:08.087360376 = -0700 @@ -289,6 +289,8 @@ u64 tda_err_alarm; =20 u64 pcc_err_reg; +#define PCC_FB_ECC_DB_ERR vBIT(0xFF, 16, 8) + u64 pcc_err_mask; u64 pcc_err_alarm; =20 @@ -512,6 +514,7 @@ #define RX_PA_CFG_IGNORE_FRM_ERR BIT(1) #define RX_PA_CFG_IGNORE_SNAP_OUI BIT(2) #define RX_PA_CFG_IGNORE_LLC_CTRL BIT(3) +#define RX_PA_CFG_IGNORE_L2_ERR BIT(6) =20 u8 unused12[0x700 - 0x1D8]; =20 ------=_NextPart_000_005F_01C4ABCE.F83E9480-- From tgraf@suug.ch Wed Oct 6 18:01:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 18:01:50 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9711fuh022361 for ; Wed, 6 Oct 2004 18:01:41 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 5153182; Thu, 7 Oct 2004 03:01:04 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id BADBA1C0E9; Thu, 7 Oct 2004 03:01:46 +0200 (CEST) Date: Thu, 7 Oct 2004 03:01:46 +0200 From: Thomas Graf To: "David S. Miller" Cc: Jamal Hadi Salim , netdev@oss.sgi.com Subject: [PATCH 0/5] PKT_SCHED: Convert Qdiscs to use generic network statistics/estimator Message-ID: <20041007010146.GA18621@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 9997 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 701 Lines: 17 Dave, This patchset converts Qdiscs to use the generic network statistics/estimator. A new TLV type TCA_STATS2 is introduced carrying the new statistics while the old TLV type TCA_STATS is still provided for backward compatibility. Patch 1: Replace tc_stats with new gnet_stats in struct Qdisc Patch 2: Use gnet_stats API to copy statistics into netlink message Patch 3: Introduce gen_replace_estimator Patch 4: Use generic rate estimator Patch 5: Qdisc are not supposed to dump TCA_STATS themselves I tested these patches for a few days and didn't encounter any problems. iproute2 is able to read out statistics via backward compatibility. A slightly patched iproute2 can read the new statistics. From tgraf@suug.ch Wed Oct 6 18:03:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 18:03:15 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97136T8022770 for ; Wed, 6 Oct 2004 18:03:06 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 4066882; Thu, 7 Oct 2004 03:02:31 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 97ED01C0E9; Thu, 7 Oct 2004 03:03:14 +0200 (CEST) Date: Thu, 7 Oct 2004 03:03:14 +0200 From: Thomas Graf To: "David S. Miller" Cc: Jamal Hadi Salim , netdev@oss.sgi.com Subject: [PATCH 1/5] PKT_SCHED: Replace tc_stats with new gnet_stats in struct Qdisc Message-ID: <20041007010314.GB18621@postel.suug.ch> References: <20041007010146.GA18621@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041007010146.GA18621@postel.suug.ch> X-archive-position: 9998 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 20847 Lines: 799 Replaces tc_stats with gnet_stats replacements in struct Qdisc and adapts all qdiscs to use them. Signed-off-by: Thomas Graf diff -Nru linux-2.6.9-rc3-bk6.orig/include/net/pkt_sched.h linux-2.6.9-rc3-bk6/include/net/pkt_sched.h --- linux-2.6.9-rc3-bk6.orig/include/net/pkt_sched.h 2004-10-06 14:19:13.000000000 +0200 +++ linux-2.6.9-rc3-bk6/include/net/pkt_sched.h 2004-10-06 20:13:56.000000000 +0200 @@ -9,6 +9,7 @@ #include #include #include +#include struct rtattr; struct Qdisc; @@ -86,7 +87,9 @@ struct net_device *dev; struct list_head list; - struct tc_stats stats; + struct gnet_stats_basic bstats; + struct gnet_stats_queue qstats; + struct gnet_stats_rate_est rate_est; spinlock_t *stats_lock; struct rcu_head q_rcu; int (*reshape_fail)(struct sk_buff *skb, struct Qdisc *q); diff -Nru linux-2.6.9-rc3-bk6.orig/net/sched/sch_cbq.c linux-2.6.9-rc3-bk6/net/sched/sch_cbq.c --- linux-2.6.9-rc3-bk6.orig/net/sched/sch_cbq.c 2004-10-06 14:19:49.000000000 +0200 +++ linux-2.6.9-rc3-bk6/net/sched/sch_cbq.c 2004-10-06 20:35:09.000000000 +0200 @@ -433,8 +433,8 @@ #endif if ((ret = cl->q->enqueue(skb, cl->q)) == NET_XMIT_SUCCESS) { sch->q.qlen++; - sch->stats.packets++; - sch->stats.bytes+=len; + sch->bstats.packets++; + sch->bstats.bytes+=len; cbq_mark_toplevel(q, cl); if (!cl->next_alive) cbq_activate_class(cl); @@ -443,7 +443,7 @@ } #ifndef CONFIG_NET_CLS_ACT - sch->stats.drops++; + sch->qstats.drops++; if (cl == NULL) kfree_skb(skb); else { @@ -452,7 +452,7 @@ } #else if ( NET_XMIT_DROP == ret) { - sch->stats.drops++; + sch->qstats.drops++; } if (cl != NULL) { @@ -472,7 +472,7 @@ if ((cl = q->tx_class) == NULL) { kfree_skb(skb); - sch->stats.drops++; + sch->qstats.drops++; return NET_XMIT_CN; } q->tx_class = NULL; @@ -489,7 +489,7 @@ cbq_activate_class(cl); return 0; } - sch->stats.drops++; + sch->qstats.drops++; cl->stats.drops++; return ret; } @@ -729,17 +729,17 @@ if (cl->q->enqueue(skb, cl->q) == 0) { sch->q.qlen++; - sch->stats.packets++; - sch->stats.bytes+=len; + sch->bstats.packets++; + sch->bstats.bytes+=len; if (!cl->next_alive) cbq_activate_class(cl); return 0; } - sch->stats.drops++; + sch->qstats.drops++; return 0; } - sch->stats.drops++; + sch->qstats.drops++; return -1; } #endif @@ -1090,7 +1090,7 @@ Sigh... start watchdog timer in the last case. */ if (sch->q.qlen) { - sch->stats.overlimits++; + sch->qstats.overlimits++; if (q->wd_expires) { long delay = PSCHED_US2JIFFIE(q->wd_expires); if (delay <= 0) diff -Nru linux-2.6.9-rc3-bk6.orig/net/sched/sch_dsmark.c linux-2.6.9-rc3-bk6/net/sched/sch_dsmark.c --- linux-2.6.9-rc3-bk6.orig/net/sched/sch_dsmark.c 2004-10-06 14:19:49.000000000 +0200 +++ linux-2.6.9-rc3-bk6/net/sched/sch_dsmark.c 2004-10-06 20:45:26.000000000 +0200 @@ -241,11 +241,11 @@ #endif ((ret = p->q->enqueue(skb,p->q)) != 0)) { - sch->stats.drops++; + sch->qstats.drops++; return ret; } - sch->stats.bytes += skb->len; - sch->stats.packets++; + sch->bstats.bytes += skb->len; + sch->bstats.packets++; sch->q.qlen++; return ret; } @@ -299,7 +299,7 @@ sch->q.qlen++; return 0; } - sch->stats.drops++; + sch->qstats.drops++; return ret; } diff -Nru linux-2.6.9-rc3-bk6.orig/net/sched/sch_fifo.c linux-2.6.9-rc3-bk6/net/sched/sch_fifo.c --- linux-2.6.9-rc3-bk6.orig/net/sched/sch_fifo.c 2004-10-06 14:19:49.000000000 +0200 +++ linux-2.6.9-rc3-bk6/net/sched/sch_fifo.c 2004-10-06 20:29:31.000000000 +0200 @@ -47,14 +47,14 @@ { struct fifo_sched_data *q = qdisc_priv(sch); - if (sch->stats.backlog + skb->len <= q->limit) { + if (sch->qstats.backlog + skb->len <= q->limit) { __skb_queue_tail(&sch->q, skb); - sch->stats.backlog += skb->len; - sch->stats.bytes += skb->len; - sch->stats.packets++; + sch->qstats.backlog += skb->len; + sch->bstats.bytes += skb->len; + sch->bstats.packets++; return 0; } - sch->stats.drops++; + sch->qstats.drops++; #ifdef CONFIG_NET_CLS_POLICE if (sch->reshape_fail==NULL || sch->reshape_fail(skb, sch)) #endif @@ -66,7 +66,7 @@ bfifo_requeue(struct sk_buff *skb, struct Qdisc* sch) { __skb_queue_head(&sch->q, skb); - sch->stats.backlog += skb->len; + sch->qstats.backlog += skb->len; return 0; } @@ -77,7 +77,7 @@ skb = __skb_dequeue(&sch->q); if (skb) - sch->stats.backlog -= skb->len; + sch->qstats.backlog -= skb->len; return skb; } @@ -89,7 +89,7 @@ skb = __skb_dequeue_tail(&sch->q); if (skb) { unsigned int len = skb->len; - sch->stats.backlog -= len; + sch->qstats.backlog -= len; kfree_skb(skb); return len; } @@ -100,7 +100,7 @@ fifo_reset(struct Qdisc* sch) { skb_queue_purge(&sch->q); - sch->stats.backlog = 0; + sch->qstats.backlog = 0; } static int @@ -110,11 +110,11 @@ if (sch->q.qlen < q->limit) { __skb_queue_tail(&sch->q, skb); - sch->stats.bytes += skb->len; - sch->stats.packets++; + sch->bstats.bytes += skb->len; + sch->bstats.packets++; return 0; } - sch->stats.drops++; + sch->qstats.drops++; #ifdef CONFIG_NET_CLS_POLICE if (sch->reshape_fail==NULL || sch->reshape_fail(skb, sch)) #endif diff -Nru linux-2.6.9-rc3-bk6.orig/net/sched/sch_generic.c linux-2.6.9-rc3-bk6/net/sched/sch_generic.c --- linux-2.6.9-rc3-bk6.orig/net/sched/sch_generic.c 2004-10-06 14:19:49.000000000 +0200 +++ linux-2.6.9-rc3-bk6/net/sched/sch_generic.c 2004-10-07 00:17:21.000000000 +0200 @@ -318,11 +318,11 @@ if (list->qlen < qdisc->dev->tx_queue_len) { __skb_queue_tail(list, skb); qdisc->q.qlen++; - qdisc->stats.bytes += skb->len; - qdisc->stats.packets++; + qdisc->bstats.bytes += skb->len; + qdisc->bstats.packets++; return 0; } - qdisc->stats.drops++; + qdisc->qstats.drops++; kfree_skb(skb); return NET_XMIT_DROP; } diff -Nru linux-2.6.9-rc3-bk6.orig/net/sched/sch_gred.c linux-2.6.9-rc3-bk6/net/sched/sch_gred.c --- linux-2.6.9-rc3-bk6.orig/net/sched/sch_gred.c 2004-10-06 14:19:49.000000000 +0200 +++ linux-2.6.9-rc3-bk6/net/sched/sch_gred.c 2004-10-06 20:44:10.000000000 +0200 @@ -130,7 +130,7 @@ D2PRINTK("gred_enqueue virtualQ 0x%x classid %x backlog %d " "general backlog %d\n",skb->tc_index&0xf,sch->handle,q->backlog, - sch->stats.backlog); + sch->qstats.backlog); /* sum up all the qaves of prios <= to ours to get the new qave*/ if (!t->eqp && t->grio) { for (i=0;iDPs;i++) { @@ -161,7 +161,7 @@ q->qave >>= q->Stab[(us_idle>>q->Scell_log)&0xFF]; } else { if (t->eqp) { - q->qave += sch->stats.backlog - (q->qave >> q->Wlog); + q->qave += sch->qstats.backlog - (q->qave >> q->Wlog); } else { q->qave += q->backlog - (q->qave >> q->Wlog); } @@ -179,9 +179,9 @@ q->backlog += skb->len; do_enqueue: __skb_queue_tail(&sch->q, skb); - sch->stats.backlog += skb->len; - sch->stats.bytes += skb->len; - sch->stats.packets++; + sch->qstats.backlog += skb->len; + sch->bstats.bytes += skb->len; + sch->bstats.packets++; return 0; } else { q->pdrop++; @@ -189,12 +189,12 @@ drop: kfree_skb(skb); - sch->stats.drops++; + sch->qstats.drops++; return NET_XMIT_DROP; } if ((q->qave+qave) >= q->qth_max) { q->qcount = -1; - sch->stats.overlimits++; + sch->qstats.overlimits++; q->forced++; goto drop; } @@ -203,7 +203,7 @@ goto enqueue; q->qcount = 0; q->qR = net_random()&q->Rmask; - sch->stats.overlimits++; + sch->qstats.overlimits++; q->early++; goto drop; } @@ -221,7 +221,7 @@ PSCHED_SET_PASTPERFECT(q->qidlestart); __skb_queue_head(&sch->q, skb); - sch->stats.backlog += skb->len; + sch->qstats.backlog += skb->len; q->backlog += skb->len; return 0; } @@ -235,7 +235,7 @@ skb = __skb_dequeue(&sch->q); if (skb) { - sch->stats.backlog -= skb->len; + sch->qstats.backlog -= skb->len; q= t->tab[(skb->tc_index&0xf)]; if (q) { q->backlog -= skb->len; @@ -269,8 +269,8 @@ skb = __skb_dequeue_tail(&sch->q); if (skb) { unsigned int len = skb->len; - sch->stats.backlog -= len; - sch->stats.drops++; + sch->qstats.backlog -= len; + sch->qstats.drops++; q= t->tab[(skb->tc_index&0xf)]; if (q) { q->backlog -= len; @@ -304,7 +304,7 @@ __skb_queue_purge(&sch->q); - sch->stats.backlog = 0; + sch->qstats.backlog = 0; for (i=0;iDPs;i++) { q= t->tab[i]; diff -Nru linux-2.6.9-rc3-bk6.orig/net/sched/sch_hfsc.c linux-2.6.9-rc3-bk6/net/sched/sch_hfsc.c --- linux-2.6.9-rc3-bk6.orig/net/sched/sch_hfsc.c 2004-10-06 14:19:49.000000000 +0200 +++ linux-2.6.9-rc3-bk6/net/sched/sch_hfsc.c 2004-10-07 00:18:23.000000000 +0200 @@ -1677,14 +1677,14 @@ #ifdef CONFIG_NET_CLS_ACT if (cl == NULL) { if (NET_XMIT_DROP == ret) { - sch->stats.drops++; + sch->qstats.drops++; } return ret; } #else if (cl == NULL) { kfree_skb(skb); - sch->stats.drops++; + sch->qstats.drops++; return NET_XMIT_DROP; } #endif @@ -1692,7 +1692,7 @@ err = cl->qdisc->enqueue(skb, cl->qdisc); if (unlikely(err != NET_XMIT_SUCCESS)) { cl->stats.drops++; - sch->stats.drops++; + sch->qstats.drops++; return err; } @@ -1701,8 +1701,8 @@ cl->stats.packets++; cl->stats.bytes += len; - sch->stats.packets++; - sch->stats.bytes += len; + sch->bstats.packets++; + sch->bstats.bytes += len; sch->q.qlen++; return NET_XMIT_SUCCESS; @@ -1739,7 +1739,7 @@ */ cl = vttree_get_minvt(&q->root, cur_time); if (cl == NULL) { - sch->stats.overlimits++; + sch->qstats.overlimits++; hfsc_schedule_watchdog(sch, cur_time); return NULL; } @@ -1804,7 +1804,7 @@ list_move_tail(&cl->dlist, &q->droplist); } cl->stats.drops++; - sch->stats.drops++; + sch->qstats.drops++; sch->q.qlen--; return len; } diff -Nru linux-2.6.9-rc3-bk6.orig/net/sched/sch_htb.c linux-2.6.9-rc3-bk6/net/sched/sch_htb.c --- linux-2.6.9-rc3-bk6.orig/net/sched/sch_htb.c 2004-10-06 14:19:49.000000000 +0200 +++ linux-2.6.9-rc3-bk6/net/sched/sch_htb.c 2004-10-07 00:19:38.000000000 +0200 @@ -735,7 +735,7 @@ } } else if (!cl) { if (NET_XMIT_DROP == ret) { - sch->stats.drops++; + sch->qstats.drops++; } return ret; } @@ -747,13 +747,13 @@ q->direct_pkts++; } else { kfree_skb (skb); - sch->stats.drops++; + sch->qstats.drops++; return NET_XMIT_DROP; } } #endif else if (cl->un.leaf.q->enqueue(skb, cl->un.leaf.q) != NET_XMIT_SUCCESS) { - sch->stats.drops++; + sch->qstats.drops++; cl->stats.drops++; return NET_XMIT_DROP; } else { @@ -762,7 +762,7 @@ } sch->q.qlen++; - sch->stats.packets++; sch->stats.bytes += skb->len; + sch->bstats.packets++; sch->bstats.bytes += skb->len; HTB_DBG(1,1,"htb_enq_ok cl=%X skb=%p\n",(cl && cl != HTB_DIRECT)?cl->classid:0,skb); return NET_XMIT_SUCCESS; } @@ -783,11 +783,11 @@ __skb_queue_head(&q->direct_queue, skb); tskb = __skb_dequeue_tail(&q->direct_queue); kfree_skb (tskb); - sch->stats.drops++; + sch->qstats.drops++; return NET_XMIT_CN; } } else if (cl->un.leaf.q->ops->requeue(skb, cl->un.leaf.q) != NET_XMIT_SUCCESS) { - sch->stats.drops++; + sch->qstats.drops++; cl->stats.drops++; return NET_XMIT_DROP; } else @@ -1117,7 +1117,7 @@ /* why don't use jiffies here ? because expires can be in past */ mod_timer(&q->timer, q->jiffies + delay); sch->flags |= TCQ_F_THROTTLED; - sch->stats.overlimits++; + sch->qstats.overlimits++; HTB_DBG(3,1,"htb_deq t_delay=%ld\n",delay); } diff -Nru linux-2.6.9-rc3-bk6.orig/net/sched/sch_ingress.c linux-2.6.9-rc3-bk6/net/sched/sch_ingress.c --- linux-2.6.9-rc3-bk6.orig/net/sched/sch_ingress.c 2004-10-06 14:19:49.000000000 +0200 +++ linux-2.6.9-rc3-bk6/net/sched/sch_ingress.c 2004-10-06 20:45:04.000000000 +0200 @@ -151,12 +151,12 @@ * firewall FW_* code. */ #ifdef CONFIG_NET_CLS_ACT - sch->stats.packets++; - sch->stats.bytes += skb->len; + sch->bstats.packets++; + sch->bstats.bytes += skb->len; switch (result) { case TC_ACT_SHOT: result = TC_ACT_SHOT; - sch->stats.drops++; + sch->qstats.drops++; break; case TC_ACT_STOLEN: case TC_ACT_QUEUED: @@ -176,14 +176,14 @@ switch (result) { case TC_POLICE_SHOT: result = NF_DROP; - sch->stats.drops++; + sch->qstats.drops++; break; case TC_POLICE_RECLASSIFY: /* DSCP remarking here ? */ case TC_POLICE_OK: case TC_POLICE_UNSPEC: default: - sch->stats.packets++; - sch->stats.bytes += skb->len; + sch->bstats.packets++; + sch->bstats.bytes += skb->len; result = NF_ACCEPT; break; }; @@ -191,8 +191,8 @@ #else D2PRINTK("Overriding result to ACCEPT\n"); result = NF_ACCEPT; - sch->stats.packets++; - sch->stats.bytes += skb->len; + sch->bstats.packets++; + sch->bstats.bytes += skb->len; #endif #endif diff -Nru linux-2.6.9-rc3-bk6.orig/net/sched/sch_netem.c linux-2.6.9-rc3-bk6/net/sched/sch_netem.c --- linux-2.6.9-rc3-bk6.orig/net/sched/sch_netem.c 2004-10-06 14:19:49.000000000 +0200 +++ linux-2.6.9-rc3-bk6/net/sched/sch_netem.c 2004-10-06 21:02:46.000000000 +0200 @@ -153,12 +153,12 @@ if (likely(q->delayed.qlen < q->limit)) { __skb_queue_tail(&q->delayed, skb); sch->q.qlen++; - sch->stats.bytes += skb->len; - sch->stats.packets++; + sch->bstats.bytes += skb->len; + sch->bstats.packets++; return NET_XMIT_SUCCESS; } - sch->stats.drops++; + sch->qstats.drops++; kfree_skb(skb); return NET_XMIT_DROP; } @@ -172,7 +172,7 @@ /* Random packet drop 0 => none, ~0 => all */ if (q->loss && q->loss >= get_crandom(&q->loss_cor)) { pr_debug("netem_enqueue: random loss\n"); - sch->stats.drops++; + sch->qstats.drops++; return 0; /* lie about loss so TCP doesn't know */ } @@ -196,7 +196,7 @@ ++q->counter; ret = q->qdisc->enqueue(skb, q->qdisc); if (ret) - sch->stats.drops++; + sch->qstats.drops++; return ret; } @@ -224,7 +224,7 @@ if ((len = q->qdisc->ops->drop(q->qdisc)) != 0) { sch->q.qlen--; - sch->stats.drops++; + sch->qstats.drops++; } return len; } @@ -256,7 +256,7 @@ __skb_unlink(skb, &q->delayed); if (q->qdisc->enqueue(skb, q->qdisc)) - sch->stats.drops++; + sch->qstats.drops++; } skb = q->qdisc->dequeue(q->qdisc); diff -Nru linux-2.6.9-rc3-bk6.orig/net/sched/sch_prio.c linux-2.6.9-rc3-bk6/net/sched/sch_prio.c --- linux-2.6.9-rc3-bk6.orig/net/sched/sch_prio.c 2004-10-06 14:19:49.000000000 +0200 +++ linux-2.6.9-rc3-bk6/net/sched/sch_prio.c 2004-10-06 21:02:03.000000000 +0200 @@ -107,8 +107,8 @@ goto dropped; if ((ret = qdisc->enqueue(skb, qdisc)) == NET_XMIT_SUCCESS) { - sch->stats.bytes += skb->len; - sch->stats.packets++; + sch->bstats.bytes += skb->len; + sch->bstats.packets++; sch->q.qlen++; return NET_XMIT_SUCCESS; } @@ -117,10 +117,10 @@ #ifdef CONFIG_NET_CLS_ACT if (NET_XMIT_DROP == ret) { #endif - sch->stats.drops++; + sch->qstats.drops++; #ifdef CONFIG_NET_CLS_ACT } else { - sch->stats.overlimits++; /* abuse, but noone uses it */ + sch->qstats.overlimits++; /* abuse, but noone uses it */ } #endif return ret; @@ -142,7 +142,7 @@ return 0; } dropped: - sch->stats.drops++; + sch->qstats.drops++; return NET_XMIT_DROP; } diff -Nru linux-2.6.9-rc3-bk6.orig/net/sched/sch_red.c linux-2.6.9-rc3-bk6/net/sched/sch_red.c --- linux-2.6.9-rc3-bk6.orig/net/sched/sch_red.c 2004-10-06 14:19:49.000000000 +0200 +++ linux-2.6.9-rc3-bk6/net/sched/sch_red.c 2004-10-06 20:41:48.000000000 +0200 @@ -228,13 +228,13 @@ q->qave >>= 1; } } else { - q->qave += sch->stats.backlog - (q->qave >> q->Wlog); + q->qave += sch->qstats.backlog - (q->qave >> q->Wlog); /* NOTE: q->qave is fixed point number with point at Wlog. The formulae above is equvalent to floating point version: - qave = qave*(1-W) + sch->stats.backlog*W; + qave = qave*(1-W) + sch->qstats.backlog*W; --ANK (980924) */ } @@ -242,22 +242,22 @@ if (q->qave < q->qth_min) { q->qcount = -1; enqueue: - if (sch->stats.backlog + skb->len <= q->limit) { + if (sch->qstats.backlog + skb->len <= q->limit) { __skb_queue_tail(&sch->q, skb); - sch->stats.backlog += skb->len; - sch->stats.bytes += skb->len; - sch->stats.packets++; + sch->qstats.backlog += skb->len; + sch->bstats.bytes += skb->len; + sch->bstats.packets++; return NET_XMIT_SUCCESS; } else { q->st.pdrop++; } kfree_skb(skb); - sch->stats.drops++; + sch->qstats.drops++; return NET_XMIT_DROP; } if (q->qave >= q->qth_max) { q->qcount = -1; - sch->stats.overlimits++; + sch->qstats.overlimits++; mark: if (!(q->flags&TC_RED_ECN) || !red_ecn_mark(skb)) { q->st.early++; @@ -288,7 +288,7 @@ goto enqueue; q->qcount = 0; q->qR = net_random()&q->Rmask; - sch->stats.overlimits++; + sch->qstats.overlimits++; goto mark; } q->qR = net_random()&q->Rmask; @@ -296,7 +296,7 @@ drop: kfree_skb(skb); - sch->stats.drops++; + sch->qstats.drops++; return NET_XMIT_CN; } @@ -308,7 +308,7 @@ PSCHED_SET_PASTPERFECT(q->qidlestart); __skb_queue_head(&sch->q, skb); - sch->stats.backlog += skb->len; + sch->qstats.backlog += skb->len; return 0; } @@ -320,7 +320,7 @@ skb = __skb_dequeue(&sch->q); if (skb) { - sch->stats.backlog -= skb->len; + sch->qstats.backlog -= skb->len; return skb; } PSCHED_GET_TIME(q->qidlestart); @@ -335,8 +335,8 @@ skb = __skb_dequeue_tail(&sch->q); if (skb) { unsigned int len = skb->len; - sch->stats.backlog -= len; - sch->stats.drops++; + sch->qstats.backlog -= len; + sch->qstats.drops++; q->st.other++; kfree_skb(skb); return len; @@ -350,7 +350,7 @@ struct red_sched_data *q = qdisc_priv(sch); __skb_queue_purge(&sch->q); - sch->stats.backlog = 0; + sch->qstats.backlog = 0; PSCHED_SET_PASTPERFECT(q->qidlestart); q->qave = 0; q->qcount = -1; diff -Nru linux-2.6.9-rc3-bk6.orig/net/sched/sch_sfq.c linux-2.6.9-rc3-bk6/net/sched/sch_sfq.c --- linux-2.6.9-rc3-bk6.orig/net/sched/sch_sfq.c 2004-10-06 14:19:49.000000000 +0200 +++ linux-2.6.9-rc3-bk6/net/sched/sch_sfq.c 2004-10-06 20:46:11.000000000 +0200 @@ -227,7 +227,7 @@ kfree_skb(skb); sfq_dec(q, x); sch->q.qlen--; - sch->stats.drops++; + sch->qstats.drops++; return len; } @@ -243,7 +243,7 @@ sfq_dec(q, d); sch->q.qlen--; q->ht[q->hash[d]] = SFQ_DEPTH; - sch->stats.drops++; + sch->qstats.drops++; return len; } @@ -276,8 +276,8 @@ } } if (++sch->q.qlen < q->limit-1) { - sch->stats.bytes += skb->len; - sch->stats.packets++; + sch->bstats.bytes += skb->len; + sch->bstats.packets++; return 0; } @@ -313,7 +313,7 @@ if (++sch->q.qlen < q->limit - 1) return 0; - sch->stats.drops++; + sch->qstats.drops++; sfq_drop(sch); return NET_XMIT_CN; } diff -Nru linux-2.6.9-rc3-bk6.orig/net/sched/sch_tbf.c linux-2.6.9-rc3-bk6/net/sched/sch_tbf.c --- linux-2.6.9-rc3-bk6.orig/net/sched/sch_tbf.c 2004-10-06 14:19:49.000000000 +0200 +++ linux-2.6.9-rc3-bk6/net/sched/sch_tbf.c 2004-10-06 21:00:24.000000000 +0200 @@ -141,7 +141,7 @@ int ret; if (skb->len > q->max_size) { - sch->stats.drops++; + sch->qstats.drops++; #ifdef CONFIG_NET_CLS_POLICE if (sch->reshape_fail == NULL || sch->reshape_fail(skb, sch)) #endif @@ -151,13 +151,13 @@ } if ((ret = q->qdisc->enqueue(skb, q->qdisc)) != 0) { - sch->stats.drops++; + sch->qstats.drops++; return ret; } sch->q.qlen++; - sch->stats.bytes += skb->len; - sch->stats.packets++; + sch->bstats.bytes += skb->len; + sch->bstats.packets++; return 0; } @@ -179,7 +179,7 @@ if ((len = q->qdisc->ops->drop(q->qdisc)) != 0) { sch->q.qlen--; - sch->stats.drops++; + sch->qstats.drops++; } return len; } @@ -250,11 +250,11 @@ if (q->qdisc->ops->requeue(skb, q->qdisc) != NET_XMIT_SUCCESS) { /* When requeue fails skb is dropped */ sch->q.qlen--; - sch->stats.drops++; + sch->qstats.drops++; } sch->flags |= TCQ_F_THROTTLED; - sch->stats.overlimits++; + sch->qstats.overlimits++; } return NULL; } diff -Nru linux-2.6.9-rc3-bk6.orig/net/sched/sch_teql.c linux-2.6.9-rc3-bk6/net/sched/sch_teql.c --- linux-2.6.9-rc3-bk6.orig/net/sched/sch_teql.c 2004-10-06 14:19:49.000000000 +0200 +++ linux-2.6.9-rc3-bk6/net/sched/sch_teql.c 2004-10-06 21:01:33.000000000 +0200 @@ -96,14 +96,14 @@ __skb_queue_tail(&q->q, skb); if (q->q.qlen <= dev->tx_queue_len) { - sch->stats.bytes += skb->len; - sch->stats.packets++; + sch->bstats.bytes += skb->len; + sch->bstats.packets++; return 0; } __skb_unlink(skb, &q->q); kfree_skb(skb); - sch->stats.drops++; + sch->qstats.drops++; return NET_XMIT_DROP; } From tgraf@suug.ch Wed Oct 6 18:04:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 18:04:29 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9714N30023150 for ; Wed, 6 Oct 2004 18:04:23 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 1D07582; Thu, 7 Oct 2004 03:03:48 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 6BAC91C0E9; Thu, 7 Oct 2004 03:04:31 +0200 (CEST) Date: Thu, 7 Oct 2004 03:04:31 +0200 From: Thomas Graf To: "David S. Miller" Cc: Jamal Hadi Salim , netdev@oss.sgi.com Subject: [PATCH 2/5] PKT_SCHED: Use gnet_stats API to copy statistics into netlink message Message-ID: <20041007010431.GC18621@postel.suug.ch> References: <20041007010146.GA18621@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041007010146.GA18621@postel.suug.ch> X-archive-position: 9999 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 1701 Lines: 52 Adapts qdisc API to use new gnet_stats functions to copy statistics into netlink message. Signed-off-by: Thomas Graf diff -Nru linux-2.6.9-rc3-bk6.orig/include/linux/rtnetlink.h linux-2.6.9-rc3-bk6/include/linux/rtnetlink.h --- linux-2.6.9-rc3-bk6.orig/include/linux/rtnetlink.h 2004-10-06 14:19:13.000000000 +0200 +++ linux-2.6.9-rc3-bk6/include/linux/rtnetlink.h 2004-10-06 20:24:32.000000000 +0200 @@ -698,6 +698,7 @@ TCA_XSTATS, TCA_RATE, TCA_FCNT, + TCA_STATS2, __TCA_MAX }; diff -Nru linux-2.6.9-rc3-bk6.orig/net/sched/sch_api.c linux-2.6.9-rc3-bk6/net/sched/sch_api.c --- linux-2.6.9-rc3-bk6.orig/net/sched/sch_api.c 2004-10-06 14:19:49.000000000 +0200 +++ linux-2.6.9-rc3-bk6/net/sched/sch_api.c 2004-10-07 00:39:04.000000000 +0200 @@ -750,6 +750,7 @@ struct tcmsg *tcm; struct nlmsghdr *nlh; unsigned char *b = skb->tail; + struct gnet_dump d; nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(*tcm)); nlh->nlmsg_flags = flags; @@ -762,9 +763,22 @@ RTA_PUT(skb, TCA_KIND, IFNAMSIZ, q->ops->id); if (q->ops->dump && q->ops->dump(q, skb) < 0) goto rtattr_failure; - q->stats.qlen = q->q.qlen; - if (qdisc_copy_stats(skb, &q->stats, q->stats_lock)) + q->qstats.qlen = q->q.qlen; + + if (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS, + TCA_XSTATS, q->stats_lock, &d) < 0) + goto rtattr_failure; + + if (gnet_stats_copy_basic(&d, &q->bstats) < 0 || +#ifdef CONFIG_NET_ESTIMATOR + gnet_stats_copy_rate_est(&d, &q->rate_est) < 0 || +#endif + gnet_stats_copy_queue(&d, &q->qstats) < 0) + goto rtattr_failure; + + if (gnet_stats_finish_copy(&d) < 0) goto rtattr_failure; + nlh->nlmsg_len = skb->tail - b; return skb->len; From tgraf@suug.ch Wed Oct 6 18:05:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 18:05:39 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9715X5C023569 for ; Wed, 6 Oct 2004 18:05:33 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 87EC982; Thu, 7 Oct 2004 03:04:58 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id CE0181C0E9; Thu, 7 Oct 2004 03:05:41 +0200 (CEST) Date: Thu, 7 Oct 2004 03:05:41 +0200 From: Thomas Graf To: "David S. Miller" Cc: Jamal Hadi Salim , netdev@oss.sgi.com Subject: [PATCH 3/5] PKT_SCHED: Introduce gen_replace_estimator Message-ID: <20041007010541.GD18621@postel.suug.ch> References: <20041007010146.GA18621@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041007010146.GA18621@postel.suug.ch> X-archive-position: 10000 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 1404 Lines: 36 Introduces gen_replace_estimator. Signed-off-by: Thomas Graf diff -Nru linux-2.6.9-rc3-bk6.orig/include/net/gen_stats.h linux-2.6.9-rc3-bk6/include/net/gen_stats.h --- linux-2.6.9-rc3-bk6.orig/include/net/gen_stats.h 2004-10-06 14:19:13.000000000 +0200 +++ linux-2.6.9-rc3-bk6/include/net/gen_stats.h 2004-10-06 20:34:13.000000000 +0200 @@ -41,5 +41,8 @@ spinlock_t *stats_lock, struct rtattr *opt); extern void gen_kill_estimator(struct gnet_stats_basic *bstats, struct gnet_stats_rate_est *rate_est); +extern int gen_replace_estimator(struct gnet_stats_basic *bstats, + struct gnet_stats_rate_est *rate_est, + spinlock_t *stats_lock, struct rtattr *opt); #endif diff -Nru linux-2.6.9-rc3-bk6.orig/net/core/gen_estimator.c linux-2.6.9-rc3-bk6/net/core/gen_estimator.c --- linux-2.6.9-rc3-bk6.orig/net/core/gen_estimator.c 2004-10-06 14:19:46.000000000 +0200 +++ linux-2.6.9-rc3-bk6/net/core/gen_estimator.c 2004-10-06 20:33:43.000000000 +0200 @@ -200,5 +200,16 @@ } } +int +gen_replace_estimator(struct gnet_stats_basic *bstats, + struct gnet_stats_rate_est *rate_est, spinlock_t *stats_lock, + struct rtattr *opt) +{ + gen_kill_estimator(bstats, rate_est); + return gen_new_estimator(bstats, rate_est, stats_lock, opt); +} + + EXPORT_SYMBOL(gen_kill_estimator); EXPORT_SYMBOL(gen_new_estimator); +EXPORT_SYMBOL(gen_replace_estimator); From tgraf@suug.ch Wed Oct 6 18:07:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 18:07:07 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i971718N023982 for ; Wed, 6 Oct 2004 18:07:01 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 765BB82; Thu, 7 Oct 2004 03:06:26 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 6ACFC1C0E9; Thu, 7 Oct 2004 03:07:09 +0200 (CEST) Date: Thu, 7 Oct 2004 03:07:09 +0200 From: Thomas Graf To: "David S. Miller" Cc: Jamal Hadi Salim , netdev@oss.sgi.com Subject: [PATCH 4/5] PKT_SCHED: Use generic rate estimator Message-ID: <20041007010709.GE18621@postel.suug.ch> References: <20041007010146.GA18621@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041007010146.GA18621@postel.suug.ch> X-archive-position: 10001 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 1497 Lines: 45 Adapts qdiscs to use generic estimator. Signed-off-by: Thomas Graf diff -Nru linux-2.6.9-rc3-bk6.orig/net/sched/sch_api.c linux-2.6.9-rc3-bk6/net/sched/sch_api.c --- linux-2.6.9-rc3-bk6.orig/net/sched/sch_api.c 2004-10-07 00:48:10.000000000 +0200 +++ linux-2.6.9-rc3-bk6/net/sched/sch_api.c 2004-10-07 00:46:34.000000000 +0200 @@ -461,8 +461,8 @@ #ifdef CONFIG_NET_ESTIMATOR if (tca[TCA_RATE-1]) - qdisc_new_estimator(&sch->stats, sch->stats_lock, - tca[TCA_RATE-1]); + gen_new_estimator(&sch->bstats, &sch->rate_est, + sch->stats_lock, tca[TCA_RATE-1]); #endif return sch; } @@ -489,11 +489,9 @@ return err; } #ifdef CONFIG_NET_ESTIMATOR - if (tca[TCA_RATE-1]) { - qdisc_kill_estimator(&sch->stats); - qdisc_new_estimator(&sch->stats, sch->stats_lock, - tca[TCA_RATE-1]); - } + if (tca[TCA_RATE-1]) + gen_replace_estimator(&sch->bstats, &sch->rate_est, + sch->stats_lock, tca[TCA_RATE-1]); #endif return 0; } diff -Nru linux-2.6.9-rc3-bk6.orig/net/sched/sch_generic.c linux-2.6.9-rc3-bk6/net/sched/sch_generic.c --- linux-2.6.9-rc3-bk6.orig/net/sched/sch_generic.c 2004-10-07 00:32:25.000000000 +0200 +++ linux-2.6.9-rc3-bk6/net/sched/sch_generic.c 2004-10-07 00:46:57.000000000 +0200 @@ -465,7 +465,7 @@ struct Qdisc_ops *ops = qdisc->ops; #ifdef CONFIG_NET_ESTIMATOR - qdisc_kill_estimator(&qdisc->stats); + gen_kill_estimator(&qdisc->bstats, &qdisc->rate_est); #endif write_lock(&qdisc_tree_lock); if (ops->reset) From tgraf@suug.ch Wed Oct 6 18:08:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 18:08:15 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9718BGd024383 for ; Wed, 6 Oct 2004 18:08:11 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 386FB82; Thu, 7 Oct 2004 03:07:36 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 84B111C0E9; Thu, 7 Oct 2004 03:08:19 +0200 (CEST) Date: Thu, 7 Oct 2004 03:08:19 +0200 From: Thomas Graf To: "David S. Miller" Cc: Jamal Hadi Salim , netdev@oss.sgi.com Subject: [PATCH 5/5] PKT_SCHED: Qdisc are not supposed to dump TCA_STATS themselves Message-ID: <20041007010819.GF18621@postel.suug.ch> References: <20041007010146.GA18621@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041007010146.GA18621@postel.suug.ch> X-archive-position: 10002 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 1261 Lines: 33 hfsc and htb qdisc are not supposed to copy TCA_STATS on their own and queue length statistic is already updated in generic code part. Signed-off-by: Thomas Graf diff -Nru linux-2.6.9-rc3-bk6.orig/net/sched/sch_hfsc.c linux-2.6.9-rc3-bk6/net/sched/sch_hfsc.c --- linux-2.6.9-rc3-bk6.orig/net/sched/sch_hfsc.c 2004-10-07 00:32:25.000000000 +0200 +++ linux-2.6.9-rc3-bk6/net/sched/sch_hfsc.c 2004-10-07 00:55:35.000000000 +0200 @@ -1653,11 +1653,6 @@ qopt.defcls = q->defcls; RTA_PUT(skb, TCA_OPTIONS, sizeof(qopt), &qopt); - - sch->stats.qlen = sch->q.qlen; - if (qdisc_copy_stats(skb, &sch->stats, sch->stats_lock) < 0) - goto rtattr_failure; - return skb->len; rtattr_failure: diff -Nru linux-2.6.9-rc3-bk6.orig/net/sched/sch_htb.c linux-2.6.9-rc3-bk6/net/sched/sch_htb.c --- linux-2.6.9-rc3-bk6.orig/net/sched/sch_htb.c 2004-10-07 00:32:25.000000000 +0200 +++ linux-2.6.9-rc3-bk6/net/sched/sch_htb.c 2004-10-07 00:55:22.000000000 +0200 @@ -1332,8 +1332,6 @@ RTA_PUT(skb, TCA_OPTIONS, 0, NULL); RTA_PUT(skb, TCA_HTB_INIT, sizeof(gopt), &gopt); rta->rta_len = skb->tail - b; - sch->stats.qlen = sch->q.qlen; - RTA_PUT(skb, TCA_STATS, sizeof(sch->stats), &sch->stats); HTB_QUNLOCK(sch); return skb->len; rtattr_failure: From davem@davemloft.net Wed Oct 6 18:09:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 18:09:29 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9719OhD024777 for ; Wed, 6 Oct 2004 18:09:24 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CFMle-0000I4-00; Wed, 06 Oct 2004 18:08:26 -0700 Date: Wed, 6 Oct 2004 18:08:26 -0700 From: "David S. Miller" To: Ben Greear Cc: Robert.Olsson@data.slu.se, netdev@oss.sgi.com Subject: Re: 2.6.7 tulip performance (with NAPI) Message-Id: <20041006180826.4a092c71.davem@davemloft.net> In-Reply-To: <41649425.1010102@candelatech.com> References: <41633174.7070805@candelatech.com> <16740.17875.574967.11417@robur.slu.se> <41646587.7070401@candelatech.com> <41649425.1010102@candelatech.com> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10003 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 409 Lines: 9 On Wed, 06 Oct 2004 17:56:05 -0700 Ben Greear wrote: > It may be that other programs would like to use the notify_queue_woken hook, so > if this were ever to hit the kernel proper, might want to make this a linked list > of callbacks instead of a simple pointer. This sort of suggests that pktgen may be better implemented via a kind of special queueing discipline. Just an idea. From ravinandan.arakali@s2io.com Wed Oct 6 18:16:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 18:16:28 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i971GNSZ025534 for ; Wed, 6 Oct 2004 18:16:24 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i971Fwje003845; Wed, 6 Oct 2004 21:15:58 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i971Fu39011858; Wed, 6 Oct 2004 21:15:57 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , Subject: [PATCH 2.6.9-rc2 2/8] S2io: sw bug fixes Date: Wed, 6 Oct 2004 18:23:24 -0700 Message-ID: <006201c4ac0c$3e3da970$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-Reply-To: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10004 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Content-Length: 1213 Lines: 33 Hi, Attached is the second patch in this submission. It contains the following software bug fixes. 1. In free_rx_buffers clearing out RxDs not owned by Xena. 2. In alarm_intr_handler, when a serr error occurs, schedule a task to reset the card rather than stopping Tx queue. 3. In s2io_close freeing IRQ before calling s2io_reset also added a new call to flush queued tasks. This is not done if the s2io_close itself is called from a queued task like s2io_restart_nic. 4. read_eeprom function has been changed such that data to be returned is sent as an input argument and the return value represents a pass/fail. The previous implementation as Randy had pointed out was error prone as on failure it returned -1 which can be interpreted as all ff's, so any data area which contained ff's in the eeprom was likely to be treated as an error. 5. Added a flag "task_flag" to track if the call to s2io_close is coming from the s2io_restart_nic function or from the ifconfig down called by user. 6. Moved register_netdev call from just after setting entry points to the end of the s2io_init_nic function. 7. In s2io.h field added a new member into the s2io_nic structure called "task_flag". Thanks, Ravi From ravinandan.arakali@s2io.com Wed Oct 6 18:17:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 18:17:39 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i971HXSs025858 for ; Wed, 6 Oct 2004 18:17:33 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i971H8je003849; Wed, 6 Oct 2004 21:17:08 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i971H539011916; Wed, 6 Oct 2004 21:17:06 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , Subject: RE: [PATCH 2.6.9-rc2 2/8] S2io: sw bug fixes Date: Wed, 6 Oct 2004 18:24:33 -0700 Message-ID: <006301c4ac0c$67525310$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0064_01C4ABD1.BAF37B10" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-Reply-To: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10005 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Content-Length: 6790 Lines: 250 This is a multi-part message in MIME format. ------=_NextPart_000_0064_01C4ABD1.BAF37B10 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sorry, forgot to attach the patch. Here you go. -----Original Message----- From: Ravinandan Arakali [mailto:ravinandan.arakali@s2io.com] Sent: Wednesday, October 06, 2004 6:23 PM To: 'Jeff Garzik'; 'Francois Romieu' Cc: 'netdev@oss.sgi.com'; 'leonid.grossman@s2io.com'; 'raghavendra.koushik@s2io.com'; 'rapuru.sriram@s2io.com' Subject: [PATCH 2.6.9-rc2 2/8] S2io: sw bug fixes Hi, Attached is the second patch in this submission. It contains the following software bug fixes. 1. In free_rx_buffers clearing out RxDs not owned by Xena. 2. In alarm_intr_handler, when a serr error occurs, schedule a task to reset the card rather than stopping Tx queue. 3. In s2io_close freeing IRQ before calling s2io_reset also added a new call to flush queued tasks. This is not done if the s2io_close itself is called from a queued task like s2io_restart_nic. 4. read_eeprom function has been changed such that data to be returned is sent as an input argument and the return value represents a pass/fail. The previous implementation as Randy had pointed out was error prone as on failure it returned -1 which can be interpreted as all ff's, so any data area which contained ff's in the eeprom was likely to be treated as an error. 5. Added a flag "task_flag" to track if the call to s2io_close is coming from the s2io_restart_nic function or from the ifconfig down called by user. 6. Moved register_netdev call from just after setting entry points to the end of the s2io_init_nic function. 7. In s2io.h field added a new member into the s2io_nic structure called "task_flag". Thanks, Ravi ------=_NextPart_000_0064_01C4ABD1.BAF37B10 Content-Type: application/octet-stream; name="s2io_bugfixes.patch2" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="s2io_bugfixes.patch2" diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-06 15:18:10.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-06 16:19:52.821420504 -0700 @@ -1525,6 +1525,11 @@ blk++; } + if (!(rxdp->Control_1 & RXD_OWN_XENA)) { + memset(rxdp, 0, sizeof(RxD_t)); + continue; + } + skb = (struct sk_buff *) ((unsigned long) rxdp-> Host_Control); @@ -1887,7 +1892,7 @@ if (val64 & SERR_SOURCE_ANY) { DBG_PRINT(ERR_DBG, "%s: Device indicates ", dev->name); DBG_PRINT(ERR_DBG, "serious error!!\n"); - netif_stop_queue(dev); + schedule_work(&nic->rst_timer_task); } /* Other type of interrupts are not being handled now, TODO */ @@ -2205,6 +2210,17 @@ } tasklet_kill(&sp->task); + /* Free the Registered IRQ */ + free_irq(dev->irq, dev); + + /* Flush all scheduled tasks */ + if (sp->task_flag == 1) { + DBG_PRINT(INFO_DBG, "%s: Calling close from a task\n", + dev->name); + } else { + flush_scheduled_work(); + } + /* Check if the device is Quiescent and then Reset the NIC */ do { val64 = readq(&bar0->adapter_status); @@ -2225,9 +2241,6 @@ } while (1); s2io_reset(sp); - /* Free the Registered IRQ */ - free_irq(dev->irq, dev); - /* Free all Tx Buffers waiting for transmission */ free_tx_buffers(sp); @@ -2982,9 +2995,10 @@ */ #define S2IO_DEV_ID 5 -static u32 read_eeprom(nic_t * sp, int off) +static int read_eeprom(nic_t * sp, int off, u32 * data) { - u32 data = -1, exit_cnt = 0; + int ret = -1; + u32 exit_cnt = 0; u64 val64; XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; @@ -2996,7 +3010,8 @@ while (exit_cnt < 5) { val64 = readq(&bar0->i2c_control); if (I2C_CONTROL_CNTL_END(val64)) { - data = I2C_CONTROL_GET_DATA(val64); + *data = I2C_CONTROL_GET_DATA(val64); + ret = 0; break; } set_current_state(TASK_UNINTERRUPTIBLE); @@ -3004,7 +3019,7 @@ exit_cnt++; } - return data; + return ret; } /** @@ -3073,8 +3088,7 @@ eeprom->len = XENA_EEPROM_SPACE - eeprom->offset; for (i = 0; i < eeprom->len; i += 4) { - data = read_eeprom(sp, eeprom->offset + i); - if (data < 0) { + if (read_eeprom(sp, (eeprom->offset + i), &data)) { DBG_PRINT(ERR_DBG, "Read of EEPROM failed\n"); return -EFAULT; } @@ -3213,7 +3227,8 @@ static int s2io_eeprom_test(nic_t * sp, uint64_t * data) { - int fail = 0, ret_data; + int fail = 0; + u32 ret_data; /* Test Write Error at offset 0 */ if (!write_eeprom(sp, 0, 0, 3)) @@ -3222,7 +3237,7 @@ /* Test Write at offset 4f0 */ if (write_eeprom(sp, 0x4F0, 0x01234567, 3)) fail = 1; - if ((ret_data = read_eeprom(sp, 0x4F0)) < 0) + if (read_eeprom(sp, 0x4F0, &ret_data)) fail = 1; if (ret_data != 0x01234567) @@ -3238,7 +3253,7 @@ /* Test Write Request at offset 0x7fc */ if (write_eeprom(sp, 0x7FC, 0x01234567, 3)) fail = 1; - if ((ret_data = read_eeprom(sp, 0x7FC)) < 0) + if (read_eeprom(sp, 0x7FC, &ret_data)) fail = 1; if (ret_data != 0x01234567) @@ -3811,7 +3826,9 @@ struct net_device *dev = (struct net_device *) data; nic_t *sp = dev->priv; + sp->task_flag = 1; s2io_close(dev); + sp->task_flag = 0; sp->device_close_flag = TRUE; s2io_open(dev); DBG_PRINT(ERR_DBG, @@ -4275,18 +4292,13 @@ INIT_WORK(&sp->set_link_task, (void (*)(void *)) s2io_set_link, sp); - if (register_netdev(dev)) { - DBG_PRINT(ERR_DBG, "Device registration failed\n"); - goto register_failed; - } - pci_save_state(sp->pdev, sp->config_space); /* Setting swapper control on the NIC, for proper reset operation */ if (s2io_set_swapper(sp)) { DBG_PRINT(ERR_DBG, "%s:swapper settings are wrong\n", dev->name); - goto register_failed; + goto set_swap_failed; } /* Fix for all "FFs" MAC address problems observed on Alpha platforms */ @@ -4363,6 +4375,11 @@ sp->rx_csum = 1; /* Rx chksum verify enabled by default */ + if (register_netdev(dev)) { + DBG_PRINT(ERR_DBG, "Device registration failed\n"); + goto register_failed; + } + /* * Make Link state as off at this point, when the Link change * interrupt comes the state will be automatically changed to @@ -4373,9 +4390,8 @@ return 0; - set_swap_failed: - unregister_netdev(dev); register_failed: + set_swap_failed: iounmap(sp->bar1); bar1_remap_failed: iounmap(sp->bar0); diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-06 15:15:03.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-06 16:19:52.829419288 -0700 @@ -668,6 +668,8 @@ u16 last_link_state; #define LINK_DOWN 1 #define LINK_UP 2 + + int task_flag; } nic_t; #define RESET_ERROR 1; ------=_NextPart_000_0064_01C4ABD1.BAF37B10-- From ravinandan.arakali@s2io.com Wed Oct 6 18:20:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 18:20:51 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i971KktA026502 for ; Wed, 6 Oct 2004 18:20:46 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i971KLje003864; Wed, 6 Oct 2004 21:20:21 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i971KI39012658; Wed, 6 Oct 2004 21:20:19 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , Subject: [PATCH 2.6.9-rc2 3/8] S2io: optimizations Date: Wed, 6 Oct 2004 18:27:46 -0700 Message-ID: <006c01c4ac0c$da843920$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_006D_01C4ABD2.2E256120" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-Reply-To: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10006 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Content-Length: 7173 Lines: 258 This is a multi-part message in MIME format. ------=_NextPart_000_006D_01C4ABD2.2E256120 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, Following are the optimization-related changes made in this patch. 1. Definitions of LOW and PANIC levels of the Rx buffers have changed. 2. In wait_for_cmd_complete there is no longer a writeq but just a read and wait for strobe bit to reset. 3. In s2io_isr, the isr_lock has been done away with also the NICs interrupt are no longer disabled explicitly on entering the interrupt handler and re-enabled again before leaving it. 4. Also clearing the semaphore "tasklet_status" when exiting erroneously from s2io_isr after failing fill_rx_buffer call. 5. The set/reset Tx Csum function through ethtool was added to the ethtool_ops structure. 6. Added a Rx side error code in the rx_osm_handler function. 7. No longer stopping and waking Tx queue when link state changes in s2io_link function. 8. removed the isr_lock spinlock from the s2io_nic structure. Thanks, Ravi ------=_NextPart_000_006D_01C4ABD2.2E256120 Content-Type: application/octet-stream; name="s2io_optimizations.patch3" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="s2io_optimizations.patch3" diff -urN vanilla-linux/drivers/net/s2io.c = linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-06 17:24:02.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-06 17:37:32.751003528 -0700 @@ -80,10 +80,11 @@ static inline int rx_buffer_level(nic_t * sp, int rxb_size, int ring) { int level =3D 0; - if ((sp->pkt_cnt[ring] - rxb_size) > 128) { + if ((sp->pkt_cnt[ring] - rxb_size) > 16) { level =3D LOW; - if (rxb_size < sp->pkt_cnt[ring] / 8) + if ((sp->pkt_cnt[ring] - rxb_size) < MAX_RXDS_PER_BLOCK) { level =3D PANIC; + } } =20 return level; @@ -1916,12 +1917,8 @@ u64 val64; =20 while (TRUE) { - val64 =3D - RMAC_ADDR_CMD_MEM_RD | RMAC_ADDR_CMD_MEM_STROBE_NEW_CMD - | RMAC_ADDR_CMD_MEM_OFFSET(0); - writeq(val64, &bar0->rmac_addr_cmd_mem); val64 =3D readq(&bar0->rmac_addr_cmd_mem); - if (!val64) { + if (!(val64 & RMAC_ADDR_CMD_MEM_STROBE_CMD_EXECUTING)) { ret =3D SUCCESS; break; } @@ -2192,14 +2189,11 @@ register u64 val64 =3D 0; u16 cnt =3D 0; =20 - spin_lock(&sp->isr_lock); netif_stop_queue(dev); =20 /* disable Tx and Rx traffic on the NIC */ stop_nic(sp); =20 - spin_unlock(&sp->isr_lock); - /*=20 * If the device tasklet is running, wait till its done=20 * before killing it=20 @@ -2398,15 +2392,13 @@ struct net_device *dev =3D (struct net_device *) dev_id; nic_t *sp =3D dev->priv; XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; - u64 reason =3D 0, general_mask =3D 0; + u64 reason =3D 0; mac_info_t *mac_control; struct config_param *config; =20 mac_control =3D &sp->mac_control; config =3D &sp->config; =20 - spin_lock(&sp->isr_lock); - /*=20 * Identify the cause for interrupt and call the appropriate * interrupt handler. Causes for the interrupt could be; @@ -2419,14 +2411,9 @@ =20 if (!reason) { /* The interrupt was not raised by Xena. */ - spin_unlock(&sp->isr_lock); return IRQ_NONE; } =20 - /* Mask the Interrupts on the NIC. */ - general_mask =3D readq(&bar0->general_int_mask); - writeq(0xFFFFFFFFFFFFFFFFULL, &bar0->general_int_mask); - /* If Intr is because of Tx Traffic */ if (reason & GEN_INTR_TXTRAFFIC) { tx_intr_handler(sp); @@ -2441,11 +2428,6 @@ if (netif_rx_schedule_prep(dev)) { en_dis_able_nic_intrs(sp, RX_TRAFFIC_INTR, DISABLE_INTRS); - /*=20 - * Here we take a snap shot of the general=20 - * Intr Register. - */ - general_mask =3D readq(&bar0->general_int_mask); __netif_rx_schedule(dev); } } @@ -2481,9 +2463,9 @@ "%s:Out of memory", dev->name); DBG_PRINT(ERR_DBG, " in ISR!!\n"); - writeq(general_mask, - &bar0->general_int_mask); - spin_unlock(&sp->isr_lock); + clear_bit(0, + (unsigned long *) (&sp-> + tasklet_status)); return IRQ_HANDLED; } clear_bit(0, @@ -2501,10 +2483,6 @@ tasklet_schedule(&sp->task); #endif =20 - /* Unmask all previously enabled interrupts on the NIC. */ - writeq(general_mask, &bar0->general_int_mask); - - spin_unlock(&sp->isr_lock); return IRQ_HANDLED; } =20 @@ -3626,6 +3604,17 @@ return (S2IO_STAT_LEN); } =20 +int s2io_ethtool_op_set_tx_csum(struct net_device *dev, u32 data) +{ + if (data) + dev->features |=3D NETIF_F_IP_CSUM; + else + dev->features &=3D ~NETIF_F_IP_CSUM; + + return 0; +} + + static struct ethtool_ops netdev_ethtool_ops =3D { .get_settings =3D s2io_ethtool_gset, .set_settings =3D s2io_ethtool_sset, @@ -3641,7 +3630,7 @@ .get_rx_csum =3D s2io_ethtool_get_rx_csum, .set_rx_csum =3D s2io_ethtool_set_rx_csum, .get_tx_csum =3D ethtool_op_get_tx_csum, - .set_tx_csum =3D ethtool_op_set_tx_csum, + .set_tx_csum =3D s2io_ethtool_op_set_tx_csum, .get_sg =3D ethtool_op_get_sg, .set_sg =3D ethtool_op_set_sg, #ifdef NETIF_F_TSO @@ -3902,6 +3891,12 @@ skb->ip_summed =3D CHECKSUM_NONE; } =20 + if (rxdp->Control_1 & RXD_T_CODE) { + unsigned long long err =3D rxdp->Control_1 & RXD_T_CODE; + DBG_PRINT(ERR_DBG, "%s: Rx error Value: 0x%llx\n", + dev->name, err); + } + skb->dev =3D dev; skb_put(skb, len); skb->protocol =3D eth_type_trans(skb, dev); @@ -3922,25 +3917,6 @@ return SUCCESS; } =20 -int check_for_tx_space(nic_t * sp) -{ - u32 put_off, get_off, queue_len; - int ret =3D TRUE, i; - - for (i =3D 0; i < sp->config.tx_fifo_num; i++) { - queue_len =3D sp->mac_control.tx_curr_put_info[i].fifo_len - + 1; - put_off =3D sp->mac_control.tx_curr_put_info[i].offset; - get_off =3D sp->mac_control.tx_curr_get_info[i].offset; - if (((put_off + 1) % queue_len) =3D=3D get_off) { - ret =3D FALSE; - break; - } - } - - return ret; -} - /** * s2io_link - stops/starts the Tx queue. * @sp : private member of the device structure, which is a pointer to = the @@ -3962,17 +3938,9 @@ if (link =3D=3D LINK_DOWN) { DBG_PRINT(ERR_DBG, "%s: Link down\n", dev->name); netif_carrier_off(dev); - netif_stop_queue(dev); } else { DBG_PRINT(ERR_DBG, "%s: Link Up\n", dev->name); netif_carrier_on(dev); - if (check_for_tx_space(sp) =3D=3D TRUE) { - /* - * Dont wake the queue if we know there - * are no free TxDs available. - */ - netif_wake_queue(dev); - } } } sp->last_link_state =3D link; @@ -4357,7 +4325,6 @@ =20 /* Initialize spinlocks */ spin_lock_init(&sp->tx_lock); - spin_lock_init(&sp->isr_lock); =20 /*=20 * SXE-002: Configure link and activity LED to init state=20 diff -urN vanilla-linux/drivers/net/s2io.h = linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-06 17:24:05.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-06 17:37:47.532756360 -0700 @@ -612,7 +612,6 @@ atomic_t rx_bufs_left[MAX_RX_RINGS]; =20 spinlock_t tx_lock; - spinlock_t isr_lock; =20 #define PROMISC 1 #define ALL_MULTI 2 ------=_NextPart_000_006D_01C4ABD2.2E256120-- From tadavis@lbl.gov Wed Oct 6 22:46:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 22:46:54 -0700 (PDT) Received: from pumpkin.explorerforum.com (pumpkin.explorerforum.com [209.209.36.42]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i975knqM008098 for ; Wed, 6 Oct 2004 22:46:49 -0700 Received: from beeble.homelinux.net (c-24-7-80-28.client.comcast.net [24.7.80.28]) by pumpkin.explorerforum.com (8.12.10/8.12.10) with ESMTP id i975xl1a031946; Wed, 6 Oct 2004 22:59:47 -0700 Received: from lbl.gov ([172.16.1.2]) by beeble.homelinux.net (8.11.6/8.11.6) with ESMTP id i975akI15335; Wed, 6 Oct 2004 22:36:47 -0700 Message-ID: <4164D81F.9090808@lbl.gov> Date: Wed, 06 Oct 2004 22:46:07 -0700 From: Thomas Davis User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jeff Garzik , Linus Torvalds , netdev@oss.sgi.com, Kernel Mailing List CC: Arnaldo Carvalho de Melo , Corey Thomas Subject: Re: Raylink/WebGear testing - ray_cs.c iomem bug? References: <41644492.1000400@pobox.com> <41646AD5.1070800@lbl.gov> In-Reply-To: <41646AD5.1070800@lbl.gov> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.3.9 (pumpkin.explorerforum.com [209.209.36.42]); Wed, 06 Oct 2004 22:59:48 -0700 (PDT) X-archive-position: 10007 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tadavis@lbl.gov Precedence: bulk X-list: netdev Content-Length: 455 Lines: 17 Thomas Davis wrote: > Jeff Garzik wrote: > >> I'm not aware of anyone with ray_cs hardware, alas... >> > > I do believe I still have two of these squirreled away someplace.. Let > me check and see later tonight. > Got two of them. I can do a plug test, but I only one pcmcia slot to play with them. If anyone wants them, email me an address and I'll ship them to you. Also, what version of linux kernel is this patch against? 2.6.9-rc3? thomas From colin@colino.net Wed Oct 6 22:53:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 22:54:05 -0700 (PDT) Received: from paperstreet.colino.net (colino.net [213.41.131.56]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i975rtFu008843 for ; Wed, 6 Oct 2004 22:53:56 -0700 Received: by paperstreet.colino.net (Postfix, from userid 1015) id BA81973EC; Thu, 7 Oct 2004 07:53:34 +0200 (CEST) Received: from jack.colino.net (jack.colino.net [192.168.0.11]) by paperstreet.colino.net (Postfix) with ESMTP id 57F5473E9; Thu, 7 Oct 2004 07:53:22 +0200 (CEST) Date: Thu, 7 Oct 2004 07:53:19 +0200 From: Colin Leroy To: Matt Mackall Cc: Andrew Morton , netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041007075319.6b31430d@jack.colino.net> In-Reply-To: <20041006214322.GG31237@waste.org> References: <20041006232544.53615761@jack.colino.net> <20041006214322.GG31237@waste.org> X-Mailer: Sylpheed-Claws 0.9.12cvs119.3 (GTK+ 2.4.9; powerpc-unknown-linux-gnu) X-Face: Fy:*XpRna1/tz}cJ@O'0^:qYs:8b[Rg`*8,+o^[fI?<%5LeB,Xz8ZJK[r7V0hBs8G)*&C+XA0qHoR=LoTohe@7X5K$A-@cN6n~~J/]+{[)E4h'lK$13WQf$.R+Pi;E09tk&{t|;~dakRD%CLHrk6m!?gA,5|Sb=fJ=>[9#n1Bu8?VngkVM4{'^'V_qgdA.8yn3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10008 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: colin@colino.net Precedence: bulk X-list: netdev Content-Length: 937 Lines: 32 On 06 Oct 2004 at 16h10, Matt Mackall wrote: Hi, > On Wed, Oct 06, 2004 at 11:25:44PM +0200, Colin Leroy wrote: > > Hi, > > > > this patch fixes a (quite big) problem with netpoll: when link is > > down, it hangs. > > > > This patch fixes it. Tested with no carrier (no more hang) and with > > carrier (same behaviour as before). > > [cc:ed to netdev] > > Well this doesn't look unreasonable, but I haven't run into it with > the NICs I've tested. Nor have I seen this reported before. Which NICs > is this with? Sungem. I didn't find anything strange in sungem, but it may be... > > - if(!np || !np->dev || !netif_running(np->dev)) { > > + if(!np || !np->dev || !netif_running(np->dev) || > > + !netif_carrier_ok(np->dev)) { > > I wonder if netif_running is redundant if netif_carrier_ok. Probably... I wanted to do the less modifications possible. -- Colin http://colino.net/323/ - Presenting the Mazda 323 Rouge From jmorris@redhat.com Wed Oct 6 23:11:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 23:11:50 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i976Bi8a009639 for ; Wed, 6 Oct 2004 23:11:44 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i976BVgq018389 for ; Thu, 7 Oct 2004 02:11:31 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i976BUr16833 for ; Thu, 7 Oct 2004 02:11:30 -0400 Received: from thoron.boston.redhat.com (thoron.boston.redhat.com [172.16.80.63]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i976BUgx015098 for ; Thu, 7 Oct 2004 02:11:30 -0400 Date: Thu, 7 Oct 2004 02:11:30 -0400 (EDT) From: James Morris X-X-Sender: jmorris@thoron.boston.redhat.com To: netdev@oss.sgi.com Subject: TCP crashes when cycling loopback interface. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 10009 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jmorris@redhat.com Precedence: bulk X-list: netdev Content-Length: 2926 Lines: 81 On an FC2 system, kernel 2.6.9-rc3-mm2 (selinux=0), running this causes a often repeatable oopses: $ set -x $ while (true) ; do ifdown lo; ifup lo; done KERNEL: assertion (!skb_queue_empty(&sk->sk_write_queue)) failed at net/ipv4/tcp_timer.c (322) Unable to handle kernel NULL pointer dereference at virtual address 00000048 printing eip: c0306ef3 *pde = 00000000 Oops: 0000 [#1] PREEMPT SMP Modules linked in: ipv6 e1000 3c59x mii ac CPU: 0 EIP: 0060:[] Not tainted VLI EFLAGS: 00010246 (2.6.9-rc3-mm2) EIP is at tcp_retransmit_skb+0x50/0x333 eax: 00000000 ebx: 00000000 ecx: f4e04758 edx: 00000000 esi: f4c0d258 edi: f4c0d024 ebp: c0467f64 esp: c0467f48 ds: 007b es: 007b ss: 0068 Process swapper (pid: 0, threadinfo=c0467000 task=c03a3bc0) Stack: f4c0d024 00000000 000005a8 f4c0d258 f4c0d024 f4c0d258 f4c0d0a8 c0467fa0 c030917f c038db34 c038ee9c c038bd55 00000142 f7f7636c c192b03c c1921580 f7f76370 c0467fa4 00000282 f4c0d024 f4c0d258 f4c0d044 c0467fb8 c0309585 Call Trace: [] show_stack+0x7a/0x90 [] show_registers+0x156/0x1ce [] die+0xfb/0x181 [] do_page_fault+0x304/0x5f3 [] error_code+0x2d/0x38 [] tcp_retransmit_timer+0xf1/0x442 [] tcp_write_timer+0xb5/0xd1 [] run_timer_softirq+0xba/0x17a [] __do_softirq+0x63/0xcf [] do_softirq+0x59/0x5d [] irq_exit+0x42/0x44 [] smp_apic_timer_interrupt+0xc4/0xc9 [] apic_timer_interrupt+0x1a/0x20 [] cpu_idle+0x3b/0x5f [] start_kernel+0x184/0x1c2 [] 0xc0100211 (gdb) l *0xc0306ee3 0xc0306ee3 is in tcp_retransmit_skb (net/ipv4/tcp_output.c:1024). 1019 1020 /* Do not sent more than we queued. 1/4 is reserved for possible 1021 * copying overhead: frgagmentation, tunneling, mangling etc. 1022 */ 1023 if (atomic_read(&sk->sk_wmem_alloc) > 1024 min(sk->sk_wmem_queued + (sk->sk_wmem_queued >> 2), sk->sk_sndbuf)) 1025 return -EAGAIN; 1026 1027 if (before(TCP_SKB_CB(skb)->seq, tp->snd_una)) { 1028 if (before(TCP_SKB_CB(skb)->end_seq, tp->snd_una)) I _think_ the TCP traffic in question is over an ethernet interface (e1000), due the output of 'set -x' and running the test via ssh. The ifup and ifdown scripts are complex, so I've also tried to reproduce the problem just using ifconfig. No crash so far but several kernel messages 'retrans_out leaked.' I initially saw something like this when cycling another ethernet interface (3c59x), but did not have debugging in that kernel and switched to loopback to see if it still happened. So I'm guessing it could be caused by cycling any interface and retransmitting tcp in general. If anyone wants more info, let me know. - James -- James Morris From davem@davemloft.net Wed Oct 6 23:50:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 06 Oct 2004 23:50:33 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i976oR8w010519 for ; Wed, 6 Oct 2004 23:50:27 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CFS5R-0000uY-00; Wed, 06 Oct 2004 23:49:13 -0700 Date: Wed, 6 Oct 2004 23:49:12 -0700 From: "David S. Miller" To: Colin Leroy Cc: mpm@selenic.com, akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-Id: <20041006234912.66bfbdcc.davem@davemloft.net> In-Reply-To: <20041007075319.6b31430d@jack.colino.net> References: <20041006232544.53615761@jack.colino.net> <20041006214322.GG31237@waste.org> <20041007075319.6b31430d@jack.colino.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10010 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 1376 Lines: 35 On Thu, 7 Oct 2004 07:53:19 +0200 Colin Leroy wrote: > On 06 Oct 2004 at 16h10, Matt Mackall wrote: > > > On Wed, Oct 06, 2004 at 11:25:44PM +0200, Colin Leroy wrote: > > Well this doesn't look unreasonable, but I haven't run into it with > > the NICs I've tested. Nor have I seen this reported before. Which NICs > > is this with? > > Sungem. I didn't find anything strange in sungem, but it may be... I think this is very strange that only sungem behaves this way. I don't think netpoll is doing anything different than what would happen, f.e., when bringing an interface up using dhcp. That should cause the same kind of hang. The only thing that should make the thing spin is if gp->hw_running is zero. This is set non-zero by gem_open() after resetting the chip to bring it up. If gem_open() fails, and on entry gp->hw_running was zero, the chip will be powered back down and gp->hw_running set back to zero. gem_suspend()/gem_resume() also modify the gp->hw_running state, as appropriate. I could see it that if gp->hw_running is non-zero, we could run into troubles. np->dev->poll_controller() will run, and it won't do anything since the gem_interrupt() call is a nop when gp->hw_running is zero. Then we blindly call ingo np->dev->poll() Folks debugging this should verify that gp->hw_running is non-zero when the problematic case runs. From dada1@cosmosbay.com Thu Oct 7 00:54:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 00:54:14 -0700 (PDT) Received: from gw1.cosmosbay.com (gw1.cosmosbay.com [62.23.185.226]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i977s7q3017052 for ; Thu, 7 Oct 2004 00:54:08 -0700 Received: from [172.16.0.131] (edumazet-port [172.16.0.131]) (authenticated bits=0) by gw1.cosmosbay.com (8.12.9/8.12.9) with ESMTP id i977rmju016984 for ; Thu, 7 Oct 2004 09:53:48 +0200 Message-ID: <4164F60C.6080807@cosmosbay.com> Date: Thu, 07 Oct 2004 09:53:48 +0200 From: Eric Dumazet User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: fr, en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com Subject: Not all tcp sockets are found by ss command (iproute2) Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10011 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dada1@cosmosbay.com Precedence: bulk X-list: netdev Content-Length: 1071 Lines: 42 Hi all I sent this message 2 days ago on linux-net@vger but got no answer yet. Maybe this list is a better place ? I have two oddities with ss command (from iproute2 package) linux kernel 2.6.8.1, SMP on x86_64 ss -V ss utility, iproute2-ss040823 1) It seems TCP sockets in SYN-RECV are not displayed at all. ss state syn-recv Recv-Q Send-Q Local Address:Port Peer Address:Port 2) It seems not all tcp sockets are fetched/displayed on a very loaded server. # ss -an|wc -l ; cat /proc/net/sockstat 565859 sockets: used 611269 TCP: inuse 613140 orphan 2572 tw 4747 alloc 613820 mem 116376 UDP: inuse 7 RAW: inuse 0 FRAG: inuse 1 memory 544 You can see on this sample that ss -an displayed 565859 lines, but /proc/net/sockstat correctly said that more sockets were used. Of course, /proc/net/tcp on such machine is not an option (never completes), so I cant list all connections for this machine. I really *need* a working ss command. Are they known problems ? Thank you From herbert@gondor.apana.org.au Thu Oct 7 01:20:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 01:20:26 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i978KBjx017886 for ; Thu, 7 Oct 2004 01:20:13 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CFTV6-0008IX-00; Thu, 07 Oct 2004 18:19:48 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CFTUz-0007V6-00; Thu, 07 Oct 2004 18:19:41 +1000 From: Herbert Xu To: dada1@cosmosbay.com (Eric Dumazet) Subject: Re: Not all tcp sockets are found by ss command (iproute2) Cc: netdev@oss.sgi.com Organization: Core In-Reply-To: <4164F60C.6080807@cosmosbay.com> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) Message-Id: Date: Thu, 07 Oct 2004 18:19:41 +1000 X-archive-position: 10012 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 534 Lines: 15 Eric Dumazet wrote: > > Of course, /proc/net/tcp on such machine is not an option (never > completes), so I cant list all connections for this machine. I really > *need* a working ss command. > > Are they known problems ? They are known now :) I'm working on a fix to these problems so stay tuned. -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From colin@colino.net Thu Oct 7 01:34:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 01:34:47 -0700 (PDT) Received: from paperstreet.colino.net (colino.net [213.41.131.56]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i978YcjO018447 for ; Thu, 7 Oct 2004 01:34:39 -0700 Received: by paperstreet.colino.net (Postfix, from userid 1015) id C6F4773EC; Thu, 7 Oct 2004 10:34:16 +0200 (CEST) Received: from pirandello (unknown [195.167.234.210]) by paperstreet.colino.net (Postfix) with ESMTP id B82CE73E9; Thu, 7 Oct 2004 10:33:44 +0200 (CEST) Date: Thu, 7 Oct 2004 10:33:32 +0200 From: Colin Leroy To: "David S. Miller" Cc: mpm@selenic.com, akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041007103332.688393e3@pirandello> In-Reply-To: <20041006234912.66bfbdcc.davem@davemloft.net> References: <20041006232544.53615761@jack.colino.net> <20041006214322.GG31237@waste.org> <20041007075319.6b31430d@jack.colino.net> <20041006234912.66bfbdcc.davem@davemloft.net> X-Mailer: Sylpheed-Claws 0.9.12cvs122.1 (GTK+ 2.4.0; i686-redhat-linux-gnu) X-Face: Fy:*XpRna1/tz}cJ@O'0^:qYs:8b[Rg`*8,+o^[fI?<%5LeB,Xz8ZJK[r7V0hBs8G)*&C+XA0qHoR=LoTohe@7X5K$A-@cN6n~~J/]+{[)E4h'lK$13WQf$.R+Pi;E09tk&{t|;~dakRD%CLHrk6m!?gA,5|Sb=fJ=>[9#n1Bu8?VngkVM4{'^'V_qgdA.8yn3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10013 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: colin@colino.net Precedence: bulk X-list: netdev Content-Length: 1372 Lines: 42 On 06 Oct 2004 at 23h10, David S. Miller wrote: Hi, Thanks for your help. > I could see it that if gp->hw_running is non-zero, we could run into You meant zero here ? (or didn't I understand something) > troubles. np->dev->poll_controller() will run, and it won't do > anything since the gem_interrupt() call is a nop when gp->hw_running > is zero. Then we blindly call ingo np->dev->poll() Btw, shouldn't gem_poll() check for gp->hw_running, too? > Folks debugging this should verify that gp->hw_running is non-zero > when the problematic case runs. I added a printk at the end of gem_open(), it's 1 even when there's no link: ... netconsole: device eth0 not up yet, forcing it eth0: gp->hw_running after gem_open: 1 netconsole: timeout waiting for carrier netconsole: network logging started ... To be more precise about the netpoll-related hanging: it hangs after a few messages. From what I remember (90% sure, i'm not in front of the laptop right now so can't make it crash, it'll be harder to debug after ^^), it hangs after printing hda init stuff, which is 32 lines after "netconsole: network logging started" (MAX_SKBS == 32 in netpoll.c)... How stupid, I just added a printk at the beginning of netpoll_send_skb and rebooted, and the laptop doesn't get back online. Bitten by recursion once again... I should have thought harder first. -- Colin From colin@colino.net Thu Oct 7 01:46:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 01:46:56 -0700 (PDT) Received: from paperstreet.colino.net (colino.net [213.41.131.56]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i978koSk018927 for ; Thu, 7 Oct 2004 01:46:51 -0700 Received: by paperstreet.colino.net (Postfix, from userid 1015) id C6EBA73F1; Thu, 7 Oct 2004 10:46:30 +0200 (CEST) Received: from pirandello (unknown [195.167.234.210]) by paperstreet.colino.net (Postfix) with ESMTP id 19DF473EF; Thu, 7 Oct 2004 10:46:13 +0200 (CEST) Date: Thu, 7 Oct 2004 10:45:54 +0200 From: Colin Leroy To: "David S. Miller" Cc: mpm@selenic.com, akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041007104554.605e4d7d@pirandello> In-Reply-To: <20041007103332.688393e3@pirandello> References: <20041006232544.53615761@jack.colino.net> <20041006214322.GG31237@waste.org> <20041007075319.6b31430d@jack.colino.net> <20041006234912.66bfbdcc.davem@davemloft.net> <20041007103332.688393e3@pirandello> X-Mailer: Sylpheed-Claws 0.9.12cvs122.1 (GTK+ 2.4.0; i686-redhat-linux-gnu) X-Face: Fy:*XpRna1/tz}cJ@O'0^:qYs:8b[Rg`*8,+o^[fI?<%5LeB,Xz8ZJK[r7V0hBs8G)*&C+XA0qHoR=LoTohe@7X5K$A-@cN6n~~J/]+{[)E4h'lK$13WQf$.R+Pi;E09tk&{t|;~dakRD%CLHrk6m!?gA,5|Sb=fJ=>[9#n1Bu8?VngkVM4{'^'V_qgdA.8yn3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10014 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: colin@colino.net Precedence: bulk X-list: netdev Content-Length: 543 Lines: 18 On 07 Oct 2004 at 10h10, Colin Leroy wrote: Hi, > How stupid, I just added a printk at the beginning of netpoll_send_skb > and rebooted, and the laptop doesn't get back online. Bitten by > recursion once again... I should have thought harder first. My girlfriend told me what was outputted by my infinite loop: netpoll: netif_running 1, netif_carrier_ok 0, netif_queue_stopped 0. Shouldn't sungem stop its queue when there's no carrier ? (I really hope to be able to spare a few hours in front of the laptop to sort that out) -- Colin From herbert@gondor.apana.org.au Thu Oct 7 03:30:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 03:30:41 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97AUWY0031265 for ; Thu, 7 Oct 2004 03:30:33 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CFVXH-0000rw-00; Thu, 07 Oct 2004 20:30:11 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CFVXD-0007iJ-00; Thu, 07 Oct 2004 20:30:07 +1000 From: Herbert Xu To: jmorris@redhat.com (James Morris) Subject: Re: TCP crashes when cycling loopback interface. Cc: netdev@oss.sgi.com Organization: Core In-Reply-To: X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) Message-Id: Date: Thu, 07 Oct 2004 20:30:07 +1000 X-archive-position: 10015 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 1376 Lines: 46 James Morris wrote: > On an FC2 system, kernel 2.6.9-rc3-mm2 (selinux=0), running this causes a > often repeatable oopses: Please apply the foolowing patch and see if it produces a meaningful back trace. -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- ===== include/net/tcp.h 1.95 vs edited ===== --- 1.95/include/net/tcp.h 2004-10-04 07:31:39 +10:00 +++ edited/include/net/tcp.h 2004-10-07 20:28:08 +10:00 @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -1174,6 +1175,7 @@ static inline void tcp_inc_pcount(tcp_pcount_t *count, struct sk_buff *skb) { + WARN_ON(tcp_skb_pcount(skb) == 0); count->val += tcp_skb_pcount(skb); } @@ -1189,12 +1191,14 @@ static inline void tcp_dec_pcount(tcp_pcount_t *count, struct sk_buff *skb) { + WARN_ON(tcp_skb_pcount(skb) == 0); count->val -= tcp_skb_pcount(skb); } static inline void tcp_dec_pcount_approx(tcp_pcount_t *count, struct sk_buff *skb) { + WARN_ON(tcp_skb_pcount(skb) == 0); if (count->val) { count->val -= tcp_skb_pcount(skb); if ((int)count->val < 0) From Valdis.Kletnieks@vt.edu Thu Oct 7 06:37:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 06:38:01 -0700 (PDT) Received: from turing-police.cc.vt.edu (IDENT:root@turing-police.cc.vt.edu [128.173.14.107]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97DbpIr020168 for ; Thu, 7 Oct 2004 06:37:52 -0700 Received: from turing-police.cc.vt.edu (IDENT:valdis@turing-police.cc.vt.edu [127.0.0.1]) by turing-police.cc.vt.edu (8.13.1/8.13.1) with ESMTP id i975gkHV031259; Thu, 7 Oct 2004 01:42:46 -0400 Message-Id: <200410070542.i975gkHV031259@turing-police.cc.vt.edu> X-Mailer: exmh version 2.7.1 07/26/2004 with nmh-1.1-RC3 To: linux-kernel@vger.kernel.org, SELinux@tycho.nsa.gov, Ingo Molnar Cc: netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: 2.6.9-rc2-mm4-VP-S7 - ksoftirq and selinux oddity From: Valdis.Kletnieks@vt.edu Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1477279884P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Thu, 07 Oct 2004 01:42:46 -0400 X-archive-position: 10016 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Valdis.Kletnieks@vt.edu Precedence: bulk X-list: netdev Content-Length: 2380 Lines: 44 --==_Exmh_1477279884P Content-Type: text/plain; charset=us-ascii (linux-net and netdev please cc: on replies - am only on lkml and selinux lists) Found this in the kernel msgs during system startup. Behavior has been there at least since rc2-mm3-VP-S6. Am running with SELinx enabled in permissive mode. I haven't built a rc3-mm2 kernel that I can test on - rc3-mm2-VP-T1 dies for me with the already-known USB issues, and I haven't backed that patch out yet (maybe will try that later tonight). audit(1097111349.727:0): avc: denied { tcp_recv } for pid=2 comm=ksoftirqd/0 saddr=127.0.0.1 src=25 daddr=127.0.0.1 dest=59639 netif=lo scontext=system_u:system_r:fsdaemon_t tcontext=system_u:object_r:netif_lo_t tclass=netif audit(1097111349.754:0): avc: denied { tcp_recv } for pid=2 comm=ksoftirqd/0 saddr=127.0.0.1 src=25 daddr=127.0.0.1 dest=59639 netif=lo scontext=system_u:system_r:fsdaemon_t tcontext=system_u:object_r:node_lo_t tclass=node audit(1097111349.782:0): avc: denied { recv_msg } for pid=2 comm=ksoftirqd/0 saddr=127.0.0.1 src=25 daddr=127.0.0.1 dest=59639 netif=lo scontext=system_u:system_r:fsdaemon_t tcontext=system_u:object_r:smtp_port_t tclass=tcp_socket At least for the recv_msg error, I *think* the message is generated because when we get into net/socket.c, we call security_socket_recvmsg() in __recv_msg() - and (possibly only when we have the VP patch applied?) at that point we're in a softirqd context rather than the context of the process that will finally receive the packet, so the SELinux code ends up checking the wrong credentials. I've not waded through the code enough to figure out exactly where the two tcp_recv messages are generated, but I suspect the root cause is the same for all three messages. The messages are happening when smartd is generating an e-mail alert (the source of the fsdaemon_t). I'm not sure yet whether it's because sendmail hasn't started yet, and we're seeing ksoftirqd trying to drive the TCP stack sending an RST back to the SYN, or if there's something else strange going on. --==_Exmh_1477279884P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Exmh version 2.5 07/13/2001 iD8DBQFBZNdWcC3lWbTT17ARAsn/AJ0Waq3x671FYyFgLjQIt6Rqq3wh+ACeMNHE tKOke6la/wQKZu+x3dFwViI= =Egwh -----END PGP SIGNATURE----- --==_Exmh_1477279884P-- From sds@epoch.ncsc.mil Thu Oct 7 06:59:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 06:59:23 -0700 (PDT) Received: from epoch.ncsc.mil (facesaver.epoch.ncsc.mil [144.51.25.10]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97DxCu1031838 for ; Thu, 7 Oct 2004 06:59:12 -0700 Received: from [144.51.25.121] (moss-spartans [144.51.25.121]) by epoch.ncsc.mil (8.12.8/8.12.8) with ESMTP id i97Dx21H022150; Thu, 7 Oct 2004 09:59:03 -0400 (EDT) Subject: Re: 2.6.9-rc2-mm4-VP-S7 - ksoftirq and selinux oddity From: Stephen Smalley To: Valdis Kletnieks Cc: lkml , SELinux@tycho.nsa.gov, Ingo Molnar , netdev@oss.sgi.com, linux-net@vger.kernel.org In-Reply-To: <200410070542.i975gkHV031259@turing-police.cc.vt.edu> References: <200410070542.i975gkHV031259@turing-police.cc.vt.edu> Content-Type: text/plain Organization: National Security Agency Message-Id: <1097157367.13339.38.camel@moss-spartans.epoch.ncsc.mil> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Thu, 07 Oct 2004 09:56:07 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 10017 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sds@epoch.ncsc.mil Precedence: bulk X-list: netdev Content-Length: 1910 Lines: 29 On Thu, 2004-10-07 at 01:42, Valdis.Kletnieks@vt.edu wrote: > audit(1097111349.727:0): avc: denied { tcp_recv } for pid=2 comm=ksoftirqd/0 saddr=127.0.0.1 src=25 daddr=127.0.0.1 dest=59639 netif=lo scontext=system_u:system_r:fsdaemon_t tcontext=system_u:object_r:netif_lo_t tclass=netif > audit(1097111349.754:0): avc: denied { tcp_recv } for pid=2 comm=ksoftirqd/0 saddr=127.0.0.1 src=25 daddr=127.0.0.1 dest=59639 netif=lo scontext=system_u:system_r:fsdaemon_t tcontext=system_u:object_r:node_lo_t tclass=node > audit(1097111349.782:0): avc: denied { recv_msg } for pid=2 comm=ksoftirqd/0 saddr=127.0.0.1 src=25 daddr=127.0.0.1 dest=59639 netif=lo scontext=system_u:system_r:fsdaemon_t tcontext=system_u:object_r:smtp_port_t tclass=tcp_socket > > At least for the recv_msg error, I *think* the message is generated because > when we get into net/socket.c, we call security_socket_recvmsg() in > __recv_msg() - and (possibly only when we have the VP patch applied?) at that > point we're in a softirqd context rather than the context of the process that > will finally receive the packet, so the SELinux code ends up checking the wrong > credentials. I've not waded through the code enough to figure out exactly > where the two tcp_recv messages are generated, but I suspect the root cause is > the same for all three messages. Valdis, These permission checks are based on the receiving socket security context, not any process security context, and are performed by the sock_rcv_skb hook when mediating packet receipt on a socket. The auxiliary pid and comm or exe information is meaningless for such checks. avc_audit could possibly be modified to check whether we are in softirq and omit them in those cases from the audit messages. This has been discussed previously on the selinux mailing list, please see the archives. -- Stephen Smalley National Security Agency From colin@colino.net Thu Oct 7 07:06:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 07:06:30 -0700 (PDT) Received: from paperstreet.colino.net (colino.net [213.41.131.56]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97E6McV000432 for ; Thu, 7 Oct 2004 07:06:23 -0700 Received: by paperstreet.colino.net (Postfix, from userid 1015) id A2EAA73EF; Thu, 7 Oct 2004 16:06:00 +0200 (CEST) Received: from pirandello (unknown [195.167.234.210]) by paperstreet.colino.net (Postfix) with ESMTP id D724473EC; Thu, 7 Oct 2004 16:05:40 +0200 (CEST) Date: Thu, 7 Oct 2004 16:05:32 +0200 From: Colin Leroy To: "David S. Miller" Cc: mpm@selenic.com, akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041007160532.60c3f26b@pirandello> In-Reply-To: <20041006234912.66bfbdcc.davem@davemloft.net> References: <20041006232544.53615761@jack.colino.net> <20041006214322.GG31237@waste.org> <20041007075319.6b31430d@jack.colino.net> <20041006234912.66bfbdcc.davem@davemloft.net> X-Mailer: Sylpheed-Claws 0.9.12cvs122.1 (GTK+ 2.4.0; i686-redhat-linux-gnu) X-Face: Fy:*XpRna1/tz}cJ@O'0^:qYs:8b[Rg`*8,+o^[fI?<%5LeB,Xz8ZJK[r7V0hBs8G)*&C+XA0qHoR=LoTohe@7X5K$A-@cN6n~~J/]+{[)E4h'lK$13WQf$.R+Pi;E09tk&{t|;~dakRD%CLHrk6m!?gA,5|Sb=fJ=>[9#n1Bu8?VngkVM4{'^'V_qgdA.8yn3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10018 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: colin@colino.net Precedence: bulk X-list: netdev Content-Length: 2139 Lines: 71 On 06 Oct 2004 at 23h10, David S. Miller wrote: Hi again, > Folks debugging this should verify that gp->hw_running is non-zero > when the problematic case runs. I looked a bit more at the code and found out a possible problem. However it doesn't fix the hang, so either it's not what I found, or there's something else. First, my newbie question: is it possible to deadlock a spinlock on a Uniprocessor kernel ? For example, there's something I find suspect in netpoll/sungem interaction: it starts in netpoll_send_skb(), where xmit_lock is acquired; then, gem_start_xmit() is called. In gem_start_xmit(), if the TX ring is full, we return 1, but previously log the error via printk(). In this condition, isn't netpoll_send_skb() called again (via the whole console stuff), where it retries to get the lock on xmit_lock? Could that cause a deadlock? Also, at the end of netpoll_send_skb() is a check for the return status of hard_start_xmit. If I understand correctly, hard_start_xmit functions return 0 for success, -1 for "busy please retry" and 1 for "hard error". Shouldn't netpoll free the skb and forget about it in case status is 1 (instead of goto'ing repeat) ? Based on this, I've a new patch that I'm attaching. As said it doesn't fix the problem, but if my I understood is valid, it may still be useful ? Any insight will be greatly appreciated :) Patch following: --- a/net/core/netpoll.c 2004-10-05 21:09:49.000000000 +0200 +++ b/net/core/netpoll.c 2004-10-07 14:11:00.000000000 +0200 @@ -188,7 +188,10 @@ return; } - spin_lock(&np->dev->xmit_lock); + if (!spin_trylock(&np->dev->xmit_lock)) { + /* looks like np->dev->hard_start_xmit did a printk */ + goto bail_free; + } np->dev->xmit_lock_owner = smp_processor_id(); /* @@ -204,13 +207,18 @@ } status = np->dev->hard_start_xmit(skb, np->dev); + np->dev->xmit_lock_owner = -1; spin_unlock(&np->dev->xmit_lock); - /* transmit busy */ - if(status) { + if(status == -1) { + /* transmit busy */ netpoll_poll(np); goto repeat; + } else if (status == 1) { + /* hard error, drop this skb */ +bail_free: + __kfree_skb(skb); } } From jmorris@redhat.com Thu Oct 7 09:46:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 09:47:02 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97GklZF009321 for ; Thu, 7 Oct 2004 09:46:47 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i97GkQEl024611; Thu, 7 Oct 2004 12:46:26 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i97GkQr13185; Thu, 7 Oct 2004 12:46:26 -0400 Received: from thoron.boston.redhat.com (thoron.boston.redhat.com [172.16.80.63]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i97GkOgx023882; Thu, 7 Oct 2004 12:46:25 -0400 Date: Thu, 7 Oct 2004 12:46:25 -0400 (EDT) From: James Morris X-X-Sender: jmorris@thoron.boston.redhat.com To: Herbert Xu cc: netdev@oss.sgi.com Subject: Re: TCP crashes when cycling loopback interface. In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 10019 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jmorris@redhat.com Precedence: bulk X-list: netdev Content-Length: 4175 Lines: 126 On Thu, 7 Oct 2004, Herbert Xu wrote: > James Morris wrote: > > On an FC2 system, kernel 2.6.9-rc3-mm2 (selinux=0), running this causes a > > often repeatable oopses: > > Please apply the foolowing patch and see if it produces a meaningful > back trace. Two runs with the following crashes: KERNEL: assertion (!skb_queue_empty(&sk->sk_write_queue)) failed at net/ipv4/tcp_timer.c (322) Unable to handle kernel NULL pointer dereference at virtual address 00000048 printing eip: c03077e9 *pde = 00000000 Oops: 0000 [#1] PREEMPT SMP Modules linked in: ipv6 e1000 3c59x mii ac CPU: 0 EIP: 0060:[] Not tainted VLI EFLAGS: 00010246 (2.6.9-rc3-mm2) EIP is at tcp_retransmit_skb+0x50/0x3bb eax: 00000000 ebx: 00000000 ecx: f6317654 edx: 00000000 esi: f5ecf258 edi: f5ecf024 ebp: c0468f64 esp: c0468f3c ds: 007b es: 007b ss: 0068 Process basename (pid: 20822, threadinfo=c0468000 task=f617d170) Stack: c0468f54 c011f2be f5ecf0a8 00000000 f5ecf258 000005a8 f5ecf258 f5ecf024 f5ecf258 f5ecf0a8 c0468fa0 c0309b7f c038e540 c038f8a8 c038c773 00000142 00000000 c1812960 c03a8f80 c1812960 c0468fa0 c012ec85 f5ecf024 f5ecf258 Call Trace: [] show_stack+0x7a/0x90 [] show_registers+0x156/0x1ce [] die+0xfb/0x181 [] do_page_fault+0x304/0x5f3 [] error_code+0x2d/0x38 [] tcp_retransmit_timer+0xf1/0x442 [] tcp_write_timer+0xb5/0xd1 [] run_timer_softirq+0xba/0x17a [] __do_softirq+0x63/0xcf [] do_softirq+0x59/0x5d [] irq_exit+0x42/0x44 [] smp_apic_timer_interrupt+0xc4/0xc9 [] apic_timer_interrupt+0x1a/0x20 EIP appears to be at: static inline int before(__u32 seq1, __u32 seq2) { return (__s32)(seq1-seq2) < 0; } Unable to handle kernel NULL pointer dereference at virtual address 00000050 printing eip: c02ff74d *pde = 00000000 Oops: 0000 [#1] PREEMPT SMP Modules linked in: ipv6 e1000 3c59x mii ac CPU: 0 EIP: 0060:[] Not tainted VLI EFLAGS: 00010246 (2.6.9-rc3-mm2) EIP is at tcp_time_to_recover+0x173/0x1af eax: fffdb26b ebx: f7925c50 ecx: 00000001 edx: 00000000 esi: 00000003 edi: f7925a1c ebp: c0468ddc esp: c0468dc8 ds: 007b es: 007b ss: 0068 Process swapper (pid: 0, threadinfo=c0468000 task=c03a4bc0) Stack: f7925c50 00000001 f7925c50 00000000 1112733a c0468e20 c030031c c014214a dff494b0 c1938c80 00010800 1112733a 07925aa0 00000004 00000000 0000010e 00000003 111270e8 f7925a1c 00000002 f7925c50 1112733a c0468e60 c03019b2 Call Trace: [] show_stack+0x7a/0x90 [] show_registers+0x156/0x1ce [] die+0xfb/0x181 [] do_page_fault+0x304/0x5f3 [] error_code+0x2d/0x38 [] tcp_fastretrans_alert+0x147/0x720 [] tcp_ack+0x25a/0x5ea [] tcp_rcv_established+0x5d7/0x875 [] tcp_v4_do_rcv+0x101/0x103 [] tcp_v4_rcv+0x81c/0x930 [] ip_local_deliver+0x9e/0x26c [] ip_rcv+0x343/0x506 [] netif_receive_skb+0x1f9/0x226 [] process_backlog+0x80/0x130 [] net_rx_action+0x81/0x12e [] __do_softirq+0x63/0xcf [] do_softirq+0x59/0x5d [] irq_exit+0x42/0x44 [] do_IRQ+0x64/0x9b [] common_interrupt+0x18/0x20 [] cpu_idle+0x3b/0x5f [] start_kernel+0x184/0x1c2 [] 0xc0100211 0xc02ff74d is in tcp_time_to_recover (net/ipv4/tcp_input.c:1355). 1350 tcp_get_pcount(&tp->fackets_out); 1351 } 1352 1353 static inline int tcp_skb_timedout(struct tcp_opt *tp, struct sk_buff *skb) 1354 { 1355 return (tcp_time_stamp - TCP_SKB_CB(skb)->when > tp->rto); 1356 } 1357 1358 static inline int tcp_head_timedout(struct sock *sk, struct tcp_opt *tp) 1359 { This should be easy to reproduce: $ set -x $ while (true) ; do ifdown lo ; ifup lo; done Then start using the network via ssh or whatever. I also noticed some more "retrans_out leaked" messages followed by a stalled ssh connection. - James -- James Morris From tgraf@suug.ch Thu Oct 7 10:53:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 10:53:14 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97Hr63A011955 for ; Thu, 7 Oct 2004 10:53:07 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 0D7F381; Thu, 7 Oct 2004 19:52:30 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 491221C0E9; Thu, 7 Oct 2004 19:53:13 +0200 (CEST) Date: Thu, 7 Oct 2004 19:53:13 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2.6] CBQ: Destroy filters before destroying classes Message-ID: <20041007175313.GA19628@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 10020 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 2210 Lines: 54 Dave, CBQ destroys its classes by traversing the hashtable and thus classes are not destroyed from root to leafs which means that class Y being a subclass of class X may be destroyed before X. This is a problem if a filter is attached to class X (parent) classifying into class Y (result). In case Y gets deleted before X the filter references an already deleted class while trying to unbind (cbq_unbind_filter). Therefore all filters must be destroyed before destroying classes. An additional BUG_TRAP has been added to document this not so obvious case. Patch is relative to "Convert Qdiscs to use generic network statistics/estimator" patchset. Signed-off-by: Thomas Graf The BUG can be triggered with the following commands: $TC qdisc add dev $DEV root handle 10:0 cbq bandwidth 100Mbit avpkt 1400 mpu 64 $TC class add dev $DEV parent 10:0 classid 10:12 cbq bandwidth 100mbit \ rate 100mbit allot 1514 prio 3 maxburst 1 avpkt 500 bounded $TC class add dev $DEV parent 10:12 classid 10:13 cbq bandwidth 100mbit \ rate 100mbit allot 1514 prio 3 maxburst 1 avpkt 500 bounded $TC filter add dev $DEV parent 10:12 protocol ip prio 10 u32 match ip protocol 6 0xff flowid 10:13 $TC qdisc del dev $DEV root The deletion ordering in the above case is: 10:0 -> 10:13 -> 10:12 diff -Nru linux-2.6.9-rc3-bk6.orig/net/sched/sch_cbq.c linux-2.6.9-rc3-bk6/net/sched/sch_cbq.c --- linux-2.6.9-rc3-bk6.orig/net/sched/sch_cbq.c 2004-10-07 00:32:25.000000000 +0200 +++ linux-2.6.9-rc3-bk6/net/sched/sch_cbq.c 2004-10-07 18:44:44.000000000 +0200 @@ -1749,6 +1749,8 @@ { struct cbq_sched_data *q = qdisc_priv(sch); + BUG_TRAP(!cl->filters); + cbq_destroy_filters(cl); qdisc_destroy(cl->q); qdisc_put_rtab(cl->R_tab); @@ -1769,6 +1771,14 @@ #ifdef CONFIG_NET_CLS_POLICE q->rx_class = NULL; #endif + /* + * Filters must be destroyed first because we don't destroy the + * classes from root to leafs which means that filters can still + * be bound to classes which have been destroyed already. --TGR '04 + */ + for (h = 0; h < 16; h++) + for (cl = q->classes[h]; cl; cl = cl->next) + cbq_destroy_filters(cl); for (h = 0; h < 16; h++) { struct cbq_class *next; From tgraf@suug.ch Thu Oct 7 10:56:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 10:56:34 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97HuS6U012446 for ; Thu, 7 Oct 2004 10:56:28 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 12A2381; Thu, 7 Oct 2004 19:55:53 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 277F61C0E9; Thu, 7 Oct 2004 19:56:36 +0200 (CEST) Date: Thu, 7 Oct 2004 19:56:36 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2.4] CBQ: Destroy filters before destroying classes Message-ID: <20041007175636.GB19628@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 10021 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 1457 Lines: 41 Dave, Note: Only compile tested. CBQ destroys its classes by traversing the hashtable and thus classes are not destroyed from root to leafs which means that class Y being a subclass of class X may be destroyed before X. This is a problem if a filter is attached to class X (parent) classifying into class Y (result). In case Y gets deleted before X the filter references an already deleted class while trying to unbind (cbq_unbind_filter). Therefore all filters must be destroyed before destroying classes. An additional BUG_TRAP has been added to document this not so obvious case. Signed-off-by: Thomas Graf --- linux-2.4.28-pre3-bk7.orig/net/sched/sch_cbq.c 2004-10-04 23:00:50.000000000 +0200 +++ linux-2.4.28-pre3-bk7/net/sched/sch_cbq.c 2004-10-07 18:52:52.000000000 +0200 @@ -1716,6 +1716,8 @@ { struct cbq_sched_data *q = (struct cbq_sched_data *)sch->data; + BUG_TRAP(!cl->filters); + cbq_destroy_filters(cl); qdisc_destroy(cl->q); qdisc_put_rtab(cl->R_tab); @@ -1736,6 +1738,14 @@ #ifdef CONFIG_NET_CLS_POLICE q->rx_class = NULL; #endif + /* + * Filters must be destroyed first because we don't destroy the + * classes from root to leafs which means that filters can still + * be bound to classes which have been destroyed already. --TGR '04 + */ + for (h = 0; h < 16; h++) + for (cl = q->classes[h]; cl; cl = cl->next) + cbq_destroy_filters(cl); for (h = 0; h < 16; h++) { struct cbq_class *next; From greearb@candelatech.com Thu Oct 7 11:09:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 11:09:39 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97I9UeB013068 for ; Thu, 7 Oct 2004 11:09:30 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i97IEJLH018821; Thu, 7 Oct 2004 11:14:19 -0700 Message-ID: <4165864A.2010805@candelatech.com> Date: Thu, 07 Oct 2004 11:09:14 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" CC: Robert.Olsson@data.slu.se, netdev@oss.sgi.com Subject: Re: 2.6.7 tulip performance (with NAPI) References: <41633174.7070805@candelatech.com> <16740.17875.574967.11417@robur.slu.se> <41646587.7070401@candelatech.com> <41649425.1010102@candelatech.com> <20041006180826.4a092c71.davem@davemloft.net> In-Reply-To: <20041006180826.4a092c71.davem@davemloft.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10022 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Content-Length: 1327 Lines: 32 David S. Miller wrote: > On Wed, 06 Oct 2004 17:56:05 -0700 > Ben Greear wrote: > > >>It may be that other programs would like to use the notify_queue_woken hook, so >>if this were ever to hit the kernel proper, might want to make this a linked list >>of callbacks instead of a simple pointer. > > > This sort of suggests that pktgen may be better implemented > via a kind of special queueing discipline. Just an idea. Care to elaborate? From what I can tell, the default code wakes up the soft-irq thread when the NIC queue has available space again. I suppose that that will in turn wake up the sockets waiting to write to that NIC again. To me, it seemed more efficient, if perhaps less flexible, to have the queue-has-space callback to directly wake the writer thread(s). I do wonder how this would work with virtual interfaces, such as 802.1Q vlans, which have no queues. I could make the pktgen hook aware of the VLAN <-> ethX relationship, or could have the callback generate callbacks for all associated VLANs, but neither seems very elegant or scalable. How does the existing (non pktgen) architecture work for VLAN devices and stopping/starting the queues in the underlying devices? -- Ben Greear Candela Technologies Inc http://www.candelatech.com From davem@davemloft.net Thu Oct 7 11:30:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 11:30:37 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97IULU1013905 for ; Thu, 7 Oct 2004 11:30:23 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CFd0R-0001pJ-00; Thu, 07 Oct 2004 11:28:47 -0700 Date: Thu, 7 Oct 2004 11:28:46 -0700 From: "David S. Miller" To: Colin Leroy Cc: mpm@selenic.com, akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-Id: <20041007112846.5c85b2d9.davem@davemloft.net> In-Reply-To: <20041007160532.60c3f26b@pirandello> References: <20041006232544.53615761@jack.colino.net> <20041006214322.GG31237@waste.org> <20041007075319.6b31430d@jack.colino.net> <20041006234912.66bfbdcc.davem@davemloft.net> <20041007160532.60c3f26b@pirandello> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10023 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 2793 Lines: 97 On Thu, 7 Oct 2004 16:05:32 +0200 Colin Leroy wrote: > First, my newbie question: is it possible to deadlock a spinlock on a > Uniprocessor kernel ? For example, there's something I find suspect in > netpoll/sungem interaction: > Oh yes, it appears that netpoll doesn't support NETIF_F_LLTX locking, crap :( When a device has NETIF_F_LLTX set, it means that the driver's dev->hard_start_xmit() routine is what takes the xmit_lock, not the caller one level up. Andi Kleen didn't fix up netpoll when he did his LLTX changes, oops. So, netpoll needs to have the NETIF_F_LLTX stuff added to it. Basically: 1) If NETIF_F_LLTX is clear, same as before 2) If NETIF_F_LLTX is set: a) Do not take xmit_lock b) Check ->hard_start_xmit() return value, if it is NETDEV_TX_LOCKED, then spin_trylock(&dev->xmit_lock) failed in ->hard_start_xmit() The best example is in net/sched/sch_generic.c:qdisc_restart() unsigned nolock = (dev->features & NETIF_F_LLTX); /* * When the driver has LLTX set it does its own locking * in start_xmit. No need to add additional overhead by * locking again. These checks are worth it because * even uncongested locks can be quite expensive. * The driver can do trylock like here too, in case * of lock congestion it should return -1 and the packet * will be requeued. */ if (!nolock) { if (!spin_trylock(&dev->xmit_lock)) { collision: /* So, someone grabbed the driver. */ /* It may be transient configuration error, when hard_start_xmit() recurses. We detect it by checking xmit owner and drop the packet when deadloop is detected. */ if (dev->xmit_lock_owner == smp_processor_id()) { kfree_skb(skb); if (net_ratelimit()) printk(KERN_DEBUG "Dead loop on netdevice %s, fix it urgently!\n", dev->name); return -1; } __get_cpu_var(netdev_rx_stat).cpu_collision++; goto requeue; } /* Remember that the driver is grabbed by us. */ dev->xmit_lock_owner = smp_processor_id(); } { /* And release queue */ spin_unlock(&dev->queue_lock); if (!netif_queue_stopped(dev)) { int ret; if (netdev_nit) dev_queue_xmit_nit(skb, dev); ret = dev->hard_start_xmit(skb, dev); if (ret == NETDEV_TX_OK) { if (!nolock) { dev->xmit_lock_owner = -1; spin_unlock(&dev->xmit_lock); } spin_lock(&dev->queue_lock); return -1; } if (ret == NETDEV_TX_LOCKED && nolock) { spin_lock(&dev->queue_lock); goto collision; } } /* NETDEV_TX_BUSY - we need to requeue */ /* Release the driver */ if (!nolock) { dev->xmit_lock_owner = -1; spin_unlock(&dev->xmit_lock); } spin_lock(&dev->queue_lock); q = dev->qdisc; } From oxymoron@waste.org Thu Oct 7 11:42:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 11:42:28 -0700 (PDT) Received: from waste.org (waste.org [209.173.204.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97IgC7t014463 for ; Thu, 7 Oct 2004 11:42:14 -0700 Received: from waste.org (localhost [127.0.0.1]) by waste.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id i97IfgWk026997; Thu, 7 Oct 2004 13:41:42 -0500 Received: (from oxymoron@localhost) by waste.org (8.12.3/8.12.3/Debian-7.1) id i97Ifg5b026992; Thu, 7 Oct 2004 13:41:42 -0500 Date: Thu, 7 Oct 2004 13:41:41 -0500 From: Matt Mackall To: "David S. Miller" Cc: Colin Leroy , akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041007184141.GL31237@waste.org> References: <20041006232544.53615761@jack.colino.net> <20041006214322.GG31237@waste.org> <20041007075319.6b31430d@jack.colino.net> <20041006234912.66bfbdcc.davem@davemloft.net> <20041007160532.60c3f26b@pirandello> <20041007112846.5c85b2d9.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041007112846.5c85b2d9.davem@davemloft.net> User-Agent: Mutt/1.3.28i X-Virus-Scanned: by amavisd-new X-archive-position: 10024 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mpm@selenic.com Precedence: bulk X-list: netdev Content-Length: 3269 Lines: 105 On Thu, Oct 07, 2004 at 11:28:46AM -0700, David S. Miller wrote: > On Thu, 7 Oct 2004 16:05:32 +0200 > Colin Leroy wrote: > > > First, my newbie question: is it possible to deadlock a spinlock on a > > Uniprocessor kernel ? For example, there's something I find suspect in > > netpoll/sungem interaction: > > > > Oh yes, it appears that netpoll doesn't support NETIF_F_LLTX locking, > crap :( > > When a device has NETIF_F_LLTX set, it means that the driver's > dev->hard_start_xmit() routine is what takes the xmit_lock, not > the caller one level up. > > Andi Kleen didn't fix up netpoll when he did his LLTX changes, oops. > > So, netpoll needs to have the NETIF_F_LLTX stuff added to it. > Basically: > > 1) If NETIF_F_LLTX is clear, same as before > 2) If NETIF_F_LLTX is set: > a) Do not take xmit_lock > b) Check ->hard_start_xmit() return value, > if it is NETDEV_TX_LOCKED, then > spin_trylock(&dev->xmit_lock) failed > in ->hard_start_xmit() Colin, feeling adventurous enough to take a stab at this? It looks pretty straightforward but I'm going to be even more useless than usual for the next two weeks. > > The best example is in net/sched/sch_generic.c:qdisc_restart() > > unsigned nolock = (dev->features & NETIF_F_LLTX); > /* > * When the driver has LLTX set it does its own locking > * in start_xmit. No need to add additional overhead by > * locking again. These checks are worth it because > * even uncongested locks can be quite expensive. > * The driver can do trylock like here too, in case > * of lock congestion it should return -1 and the packet > * will be requeued. > */ > if (!nolock) { > if (!spin_trylock(&dev->xmit_lock)) { > collision: > /* So, someone grabbed the driver. */ > > /* It may be transient configuration error, > when hard_start_xmit() recurses. We detect > it by checking xmit owner and drop the > packet when deadloop is detected. > */ > if (dev->xmit_lock_owner == smp_processor_id()) { > kfree_skb(skb); > if (net_ratelimit()) > printk(KERN_DEBUG "Dead loop on netdevice %s, fix it urgently!\n", dev->name); > return -1; > } > __get_cpu_var(netdev_rx_stat).cpu_collision++; > goto requeue; > } > /* Remember that the driver is grabbed by us. */ > dev->xmit_lock_owner = smp_processor_id(); > } > > { > /* And release queue */ > spin_unlock(&dev->queue_lock); > > if (!netif_queue_stopped(dev)) { > int ret; > if (netdev_nit) > dev_queue_xmit_nit(skb, dev); > > ret = dev->hard_start_xmit(skb, dev); > if (ret == NETDEV_TX_OK) { > if (!nolock) { > dev->xmit_lock_owner = -1; > spin_unlock(&dev->xmit_lock); > } > spin_lock(&dev->queue_lock); > return -1; > } > if (ret == NETDEV_TX_LOCKED && nolock) { > spin_lock(&dev->queue_lock); > goto collision; > } > } > > /* NETDEV_TX_BUSY - we need to requeue */ > /* Release the driver */ > if (!nolock) { > dev->xmit_lock_owner = -1; > spin_unlock(&dev->xmit_lock); > } > spin_lock(&dev->queue_lock); > q = dev->qdisc; > } -- Mathematics is the supreme nostalgia of our time. From ak@suse.de Thu Oct 7 11:43:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 11:43:31 -0700 (PDT) Received: from Cantor.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97IhJhL014683 for ; Thu, 7 Oct 2004 11:43:19 -0700 Received: from hermes.suse.de (hermes-ext.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 983E7CFE982; Thu, 7 Oct 2004 20:43:00 +0200 (CEST) Date: Thu, 7 Oct 2004 20:43:00 +0200 From: Andi Kleen To: "David S. Miller" Cc: Colin Leroy , mpm@selenic.com, akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041007184259.GA25071@wotan.suse.de> References: <20041006232544.53615761@jack.colino.net> <20041006214322.GG31237@waste.org> <20041007075319.6b31430d@jack.colino.net> <20041006234912.66bfbdcc.davem@davemloft.net> <20041007160532.60c3f26b@pirandello> <20041007112846.5c85b2d9.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041007112846.5c85b2d9.davem@davemloft.net> X-archive-position: 10025 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 Content-Length: 759 Lines: 24 On Thu, Oct 07, 2004 at 11:28:46AM -0700, David S. Miller wrote: > On Thu, 7 Oct 2004 16:05:32 +0200 > Colin Leroy wrote: > > > First, my newbie question: is it possible to deadlock a spinlock on a > > Uniprocessor kernel ? For example, there's something I find suspect in > > netpoll/sungem interaction: > > > > Oh yes, it appears that netpoll doesn't support NETIF_F_LLTX locking, > crap :( > > When a device has NETIF_F_LLTX set, it means that the driver's > dev->hard_start_xmit() routine is what takes the xmit_lock, not > the caller one level up. It takes an own lock, not xmit_lock. It's fine to ignore it completely. In the worst case the poll will not be retried, but netpoll has no way to do that anyways I think. -Andi From linville@ra.tuxdriver.com Thu Oct 7 11:48:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 11:48:38 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97ImUp6015214 for ; Thu, 7 Oct 2004 11:48:31 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i97Hk1I01655; Thu, 7 Oct 2004 13:46:01 -0400 Date: Thu, 7 Oct 2004 13:46:01 -0400 From: "John W. Linville" To: Donald Becker , netdev@oss.sgi.com, akpm@osdl.org, jgarzik@pobox.com Subject: Re: [patch 2.6.9-rc2] 3c59x: do not mask reset of aism logic at rmmod Message-ID: <20041007134601.B29517@tuxdriver.com> Mail-Followup-To: Donald Becker , netdev@oss.sgi.com, akpm@osdl.org, jgarzik@pobox.com References: <20040928145455.C12480@tuxdriver.com> <20040930091407.A10417@tuxdriver.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: <20040930091407.A10417@tuxdriver.com>; from linville@tuxdriver.com on Thu, Sep 30, 2004 at 09:14:07AM -0400 X-archive-position: 10026 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 4451 Lines: 109 Bad form to reply to oneself, but someone needs to... :-) Jeff/Andrew/Don, Long message follows -- basically, I'm 100% convinced that at least certain cards covered by the 3c59x driver need to have the aismReset bit unmasked in the TotalReset command. I'm looking for some advice as to how to rework my patch in order for it to be accepted. I enumerate a few possible variations. For details, see below... On Thu, Sep 30, 2004 at 09:14:07AM -0400, John W. Linville wrote: > On Wed, Sep 29, 2004 at 01:16:01PM -0400, Donald Becker wrote: > > > > module). Changing vortex_remove_one() to allow the auto-initialize > > > state machine logic to be reset when the module is removed alleviates > > > this problem. > > > > ...and creates a new problem: resetting the link causes operational > > problems on many networks. The most obvious example is spanning tree > > detection delays on switches, where the switch does not pass traffic. > Does allowing the aismReset to occur cause the link to go down? I guess > I presumed that was what the networkReset bit was there to prevent. It appears that aismReset does not cause the link to go down. Here is the setup I used to test this: "domestic" "partner" +---------+ +---------+ | |eth2 eth1| | | 3c905 |<------------->| ns83820 | | | | | +---------+ +---------+ The ns83820 driver gets an interrupt on link state changes. For the test, the ns83820 driver was modified to log those interrupts to the system console. To verify that was working, the link was reset w/ this command on "domestic": mii-tool -r eth2 As expected, this resulted in entries in /var/log/messages on "partner" immediately after every time the command was issued. Next, I applied my patch to un-mask the aismReset bit in the TotalReset command during rmmod of the 3c59x driver (handling the 3c905). To test this, I executed the following series of comands on "domestic": ifconfig eth2 0.0.0.0 down modprobe -r 3c59x ifup 3c59x I repeated the sequence many times, and /var/log/messages on "partner" showed none of the link status interrupts. This indicates that unmasking aismReset does NOT result in resetting the link. > Even if the link does go down, is that really such a bit deal on an > rmmod? I can see wanting to avoid it on a normal close, but an rmmod > would seem like a more rare event. BTW, I still think the above is a good point... > P.S. The current state of the reset at rmmod seems to have come in the > 2.4.9 timeframe. Prior to that, FWIW all but one card left the aismReset > bit unmasked just as in my patch. Which brings me to "how do we want to fix this?" I think there are (at least) three options: -- apply (some version) of the patch I submitted a few days ago; -- add a flag to the drv_flags field to indicate which cards need the aismReset bit to be unmasked; or, -- key the reset off the IS_BOOMERANG filed of the drv_flags field. The first option is the cleanest, althought I think it would be most prudent to reimplent the patch to reinstate the EEPROM_NORESET flag that was eliminited in version LK1.1.16 of the driver. The testing I described above would suggest that the aismReset bit is not related to the "reset the interface logic on open/close/rmmod" changes that were also added in that revision. The second version would be a lot like the old EEPROM_NORESET field in reverse -- only cards w/ the flag would get the aismReset flag unmasked. This is the most flexible in case it turns-out that multiple card variations have this problem. The third version is what my gut tells me we need, but I don't have enough card variations to be sure that all/only Boomerang cards are prone to this problem. It would be less flexible than the second version if it turned-out the some Boomerang cards don't have the problem or if some Cyclone cards do, etc. I've done a lot of searching for references to this problem, and none of them go back further than 2.4.9, which is when the aismReset bit first started getting masked at rmmod (for all cards but one). I'm sure that at least certain cards (e.g. the 3c905) NEED this fix, and it seems to be safe to make it. I'm looking for some guidance on how to fix this problem in a way that makes people comfortable. I appreciate your attention and response! John -- John W. Linville linville@tuxdriver.com From mingo@redhat.com Thu Oct 7 12:00:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 12:00:22 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97J0HoO015883 for ; Thu, 7 Oct 2004 12:00:18 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i97J04ZB031352; Thu, 7 Oct 2004 15:00:04 -0400 Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i97J03r22853; Thu, 7 Oct 2004 15:00:03 -0400 Received: from devserv.devel.redhat.com (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.11/8.12.10) with ESMTP id i97IxjqE029909; Thu, 7 Oct 2004 14:59:45 -0400 Received: from localhost (mingo@localhost) by devserv.devel.redhat.com (8.12.11/8.12.11/Submit) with ESMTP id i97Ixj82029904; Thu, 7 Oct 2004 14:59:45 -0400 X-Authentication-Warning: devserv.devel.redhat.com: mingo owned process doing -bs Date: Thu, 7 Oct 2004 14:59:45 -0400 (EDT) From: Ingo Molnar X-X-Sender: mingo@devserv.devel.redhat.com To: Valdis.Kletnieks@vt.edu cc: linux-kernel@vger.kernel.org, SELinux@tycho.nsa.gov, netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Re: 2.6.9-rc2-mm4-VP-S7 - ksoftirq and selinux oddity In-Reply-To: <200410070542.i975gkHV031259@turing-police.cc.vt.edu> Message-ID: References: <200410070542.i975gkHV031259@turing-police.cc.vt.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 10027 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mingo@redhat.com Precedence: bulk X-list: netdev Content-Length: 1009 Lines: 19 On Thu, 7 Oct 2004 Valdis.Kletnieks@vt.edu wrote: > audit(1097111349.782:0): avc: denied { recv_msg } for pid=2 comm=ksoftirqd/0 saddr=127.0.0.1 src=25 daddr=127.0.0.1 dest=59639 netif=lo scontext=system_u:system_r:fsdaemon_t tcontext=system_u:object_r:smtp_port_t tclass=tcp_socket > > At least for the recv_msg error, I *think* the message is generated > because when we get into net/socket.c, we call security_socket_recvmsg() > in __recv_msg() - and (possibly only when we have the VP patch applied?) > at that point we're in a softirqd context rather than the context of the > process that will finally receive the packet, so the SELinux code ends > up checking the wrong credentials. I've not waded through the code > enough to figure out exactly where the two tcp_recv messages are > generated, but I suspect the root cause is the same for all three > messages. that would be a problem in the upstream kernel too - softirq load can execute in any process context (and in ksoftirqd too). Ingo From ckjohnson@gwi.net Thu Oct 7 12:31:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 12:31:51 -0700 (PDT) Received: from localhost.localdomain (d-216-195-164-238.gwi.net [216.195.164.238]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97JVhCx020119 for ; Thu, 7 Oct 2004 12:31:45 -0700 Received: from [127.0.0.1] (chris [127.0.0.1]) by localhost.localdomain (8.12.11/8.12.11) with ESMTP id i97JVO3W008716 for ; Thu, 7 Oct 2004 15:31:25 -0400 Message-ID: <4165998C.1010600@gwi.net> Date: Thu, 07 Oct 2004 15:31:24 -0400 From: "Christopher K. Johnson" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com Subject: Bug 132832 - ipsec malformed packet in tunnel mode with ah and esp Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10028 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ckjohnson@gwi.net Precedence: bulk X-list: netdev Content-Length: 450 Lines: 13 Please see https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=132832 I'm the person who contributed the FC2 information about the bug, including the packet trace. I would gladly provide any other information which could help you in resolving this bug. Just let me know. Chris -- ----------------------------------------------------------- "Spend less! Do more! Go Open Source..." -- Dirigo.net Chris Johnson, RHCE #807000448202021 From colin@colino.net Thu Oct 7 13:01:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 13:01:54 -0700 (PDT) Received: from paperstreet.colino.net (colino.net [213.41.131.56]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97K1kdC021293 for ; Thu, 7 Oct 2004 13:01:46 -0700 Received: by paperstreet.colino.net (Postfix, from userid 1015) id D72E573F1; Thu, 7 Oct 2004 22:01:23 +0200 (CEST) Received: from jack.colino.net (jack.colino.net [192.168.0.11]) by paperstreet.colino.net (Postfix) with ESMTP id 269A073EC; Thu, 7 Oct 2004 22:00:57 +0200 (CEST) Date: Thu, 7 Oct 2004 22:00:55 +0200 From: Colin Leroy To: Matt Mackall Cc: "David S. Miller" , akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041007220055.3cede68e@jack.colino.net> In-Reply-To: <20041007184141.GL31237@waste.org> References: <20041006232544.53615761@jack.colino.net> <20041006214322.GG31237@waste.org> <20041007075319.6b31430d@jack.colino.net> <20041006234912.66bfbdcc.davem@davemloft.net> <20041007160532.60c3f26b@pirandello> <20041007112846.5c85b2d9.davem@davemloft.net> <20041007184141.GL31237@waste.org> X-Mailer: Sylpheed-Claws 0.9.12cvs119.3 (GTK+ 2.4.9; powerpc-unknown-linux-gnu) X-Face: Fy:*XpRna1/tz}cJ@O'0^:qYs:8b[Rg`*8,+o^[fI?<%5LeB,Xz8ZJK[r7V0hBs8G)*&C+XA0qHoR=LoTohe@7X5K$A-@cN6n~~J/]+{[)E4h'lK$13WQf$.R+Pi;E09tk&{t|;~dakRD%CLHrk6m!?gA,5|Sb=fJ=>[9#n1Bu8?VngkVM4{'^'V_qgdA.8yn3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10029 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: colin@colino.net Precedence: bulk X-list: netdev Content-Length: 300 Lines: 15 On 07 Oct 2004 at 13h10, Matt Mackall wrote: Hi, > Colin, feeling adventurous enough to take a stab at this? It looks > pretty straightforward but I'm going to be even more useless than > usual for the next two weeks. I'll try :) Thanks for all the input ! -- Colin Recursion: see Recursion From Robert.Olsson@data.slu.se Thu Oct 7 14:12:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 14:12:13 -0700 (PDT) Received: from mail1.slu.se (mail1.slu.se [130.238.96.11]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97LC6gN023596 for ; Thu, 7 Oct 2004 14:12:07 -0700 Received: from robur.slu.se (robur.slu.se [130.238.98.12]) by mail1.slu.se (8.12.10/8.12.10) with ESMTP id i97LBlI1023659; Thu, 7 Oct 2004 23:11:47 +0200 Received: by robur.slu.se (Postfix, from userid 1000) id BD4DA9004B; Thu, 7 Oct 2004 23:11:47 +0200 (CEST) From: Robert Olsson MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16741.45331.743721.822091@robur.slu.se> Date: Thu, 7 Oct 2004 23:11:47 +0200 To: Ben Greear Cc: Robert Olsson , "'netdev@oss.sgi.com'" Subject: Re: 2.6.7 tulip performance (with NAPI) In-Reply-To: <41649425.1010102@candelatech.com> References: <41633174.7070805@candelatech.com> <16740.17875.574967.11417@robur.slu.se> <41646587.7070401@candelatech.com> <41649425.1010102@candelatech.com> X-Mailer: VM 7.18 under Emacs 21.3.1 X-archive-position: 10030 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Robert.Olsson@data.slu.se Precedence: bulk X-list: netdev Content-Length: 1140 Lines: 35 Ben Greear writes: > > int pg_notify_queue_woken(struct net_device* dev) { > struct pktgen_interface_info* info = dev->nqw_data; > if (info && info->pg_thread->sleeping) { > if (getRelativeCurNs() > (info->next_tx_ns - 1000)) { > /* See if we should wake up the thread, wake > * slightly early (1000 ns) > */ > info->pg_thread->sleeping = 0; > wake_up_interruptible(&(info->pg_thread->queue)); > } > } > return 0; > } Interesting... I got requests for higher performance in flow/DoS testing to be really useful. Probably only preallocation will help here. To be really aggressive we could hack the driver TX handling so at TX interrupt also refills/refresh the ring but it's not a general solution. I guess you can use an existing qdisc via dev_queue_xmit() or something to save CPU in your case. I was sending wire rate from 10 GIGE NIC's from a DUAL XEON w. HT I'm interested if anyone has done any pktgen performance tests with w. S2IO or other 10G card we need to upgrade the lab equipment. Both 64 byte pkts and MTU sized pkts is interesting. Anyone? Cheers. --ro From colin@colino.net Thu Oct 7 14:32:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 14:32:31 -0700 (PDT) Received: from paperstreet.colino.net (colino.net [213.41.131.56]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97LWPQS024380 for ; Thu, 7 Oct 2004 14:32:26 -0700 Received: by paperstreet.colino.net (Postfix, from userid 1015) id AEAB973EF; Thu, 7 Oct 2004 23:32:02 +0200 (CEST) Received: from jack.colino.net (jack.colino.net [192.168.0.11]) by paperstreet.colino.net (Postfix) with ESMTP id 51C0F73EC; Thu, 7 Oct 2004 23:31:17 +0200 (CEST) Date: Thu, 7 Oct 2004 22:44:22 +0200 From: Colin Leroy To: "David S. Miller" Cc: mpm@selenic.com, akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041007224422.1c1bea95@jack.colino.net> In-Reply-To: <20041007112846.5c85b2d9.davem@davemloft.net> References: <20041006232544.53615761@jack.colino.net> <20041006214322.GG31237@waste.org> <20041007075319.6b31430d@jack.colino.net> <20041006234912.66bfbdcc.davem@davemloft.net> <20041007160532.60c3f26b@pirandello> <20041007112846.5c85b2d9.davem@davemloft.net> X-Mailer: Sylpheed-Claws 0.9.12cvs119.3 (GTK+ 2.4.9; powerpc-unknown-linux-gnu) X-Face: Fy:*XpRna1/tz}cJ@O'0^:qYs:8b[Rg`*8,+o^[fI?<%5LeB,Xz8ZJK[r7V0hBs8G)*&C+XA0qHoR=LoTohe@7X5K$A-@cN6n~~J/]+{[)E4h'lK$13WQf$.R+Pi;E09tk&{t|;~dakRD%CLHrk6m!?gA,5|Sb=fJ=>[9#n1Bu8?VngkVM4{'^'V_qgdA.8yn3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10031 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: colin@colino.net Precedence: bulk X-list: netdev Content-Length: 1772 Lines: 81 On 07 Oct 2004 at 11h10, David S. Miller wrote: Hi again, > So, netpoll needs to have the NETIF_F_LLTX stuff added to it. This patch should do that. It works OK for me, but I'd like it checked before sent upstream... However, it doesn't fix the hang. it looks like this hang is really coming from sungem. --- a/net/core/netpoll.c 2004-10-05 21:09:49.000000000 +0200 +++ b/net/core/netpoll.c 2004-10-07 22:48:58.000000000 +0200 @@ -181,6 +181,7 @@ void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) { int status; + unsigned must_lock; repeat: if(!np || !np->dev || !netif_running(np->dev)) { @@ -188,29 +189,51 @@ return; } - spin_lock(&np->dev->xmit_lock); - np->dev->xmit_lock_owner = smp_processor_id(); + must_lock = !(np->dev->features & NETIF_F_LLTX); + + if (must_lock) { + if (!spin_trylock(&np->dev->xmit_lock)) { + if (np->dev->xmit_lock_owner == smp_processor_id()) { + __kfree_skb(skb); + return; + } + goto repeat; + } + np->dev->xmit_lock_owner = smp_processor_id(); + } + /* * network drivers do not expect to be called if the queue is * stopped. */ if (netif_queue_stopped(np->dev)) { np->dev->xmit_lock_owner = -1; - spin_unlock(&np->dev->xmit_lock); + + if (must_lock) + spin_unlock(&np->dev->xmit_lock); netpoll_poll(np); goto repeat; } status = np->dev->hard_start_xmit(skb, np->dev); - np->dev->xmit_lock_owner = -1; - spin_unlock(&np->dev->xmit_lock); + + if (must_lock) { + np->dev->xmit_lock_owner = -1; + spin_unlock(&np->dev->xmit_lock); + } /* transmit busy */ - if(status) { + if (status == NETDEV_TX_LOCKED) { netpoll_poll(np); goto repeat; + } + + /* hard error */ + if (status == NETDEV_TX_BUSY) { + __kfree_skb(skb); + return; } } From ak@suse.de Thu Oct 7 14:45:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 14:45:33 -0700 (PDT) Received: from Cantor.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97LjOOP025364 for ; Thu, 7 Oct 2004 14:45:27 -0700 Received: from hermes.suse.de (hermes-ext.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 3E5DED01236; Thu, 7 Oct 2004 23:45:06 +0200 (CEST) Date: Thu, 7 Oct 2004 23:45:05 +0200 From: Andi Kleen To: Colin Leroy Cc: "David S. Miller" , mpm@selenic.com, akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041007214505.GB31558@wotan.suse.de> References: <20041006232544.53615761@jack.colino.net> <20041006214322.GG31237@waste.org> <20041007075319.6b31430d@jack.colino.net> <20041006234912.66bfbdcc.davem@davemloft.net> <20041007160532.60c3f26b@pirandello> <20041007112846.5c85b2d9.davem@davemloft.net> <20041007224422.1c1bea95@jack.colino.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041007224422.1c1bea95@jack.colino.net> X-archive-position: 10032 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 Content-Length: 892 Lines: 25 On Thu, Oct 07, 2004 at 10:44:22PM +0200, Colin Leroy wrote: > On 07 Oct 2004 at 11h10, David S. Miller wrote: > > Hi again, > > > So, netpoll needs to have the NETIF_F_LLTX stuff added to it. > > This patch should do that. It works OK for me, but I'd like it checked > before sent upstream... > > However, it doesn't fix the hang. it looks like this hang is really > coming from sungem. IMHO it's not needed. Taking xmit_lock is harmless even when the NETIF_F_LLTX flag is set. (or at least it was with my original patchkit. In theory it's possible someone changed their driver to take xmit_lock in hard_start_xmit, but if they did that I would just consider it a driver bug) The only drawback is that there won't be a reply when the driver try lock fails, but netpoll doesn't have a queue for that anyways. You could probably poll then, but I'm not sure it's a good idea. -Andi From greearb@candelatech.com Thu Oct 7 14:48:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 14:48:07 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97Lm0eA025753 for ; Thu, 7 Oct 2004 14:48:00 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i97LqqLH021874; Thu, 7 Oct 2004 14:52:52 -0700 Message-ID: <4165B981.8060703@candelatech.com> Date: Thu, 07 Oct 2004 14:47:45 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Robert Olsson CC: "'netdev@oss.sgi.com'" Subject: Re: 2.6.7 tulip performance (with NAPI) References: <41633174.7070805@candelatech.com> <16740.17875.574967.11417@robur.slu.se> <41646587.7070401@candelatech.com> <41649425.1010102@candelatech.com> <16741.45331.743721.822091@robur.slu.se> In-Reply-To: <16741.45331.743721.822091@robur.slu.se> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10033 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Content-Length: 1933 Lines: 49 Robert Olsson wrote: > Ben Greear writes: > > > > > int pg_notify_queue_woken(struct net_device* dev) { > > struct pktgen_interface_info* info = dev->nqw_data; > > if (info && info->pg_thread->sleeping) { > > if (getRelativeCurNs() > (info->next_tx_ns - 1000)) { > > /* See if we should wake up the thread, wake > > * slightly early (1000 ns) > > */ > > info->pg_thread->sleeping = 0; > > wake_up_interruptible(&(info->pg_thread->queue)); > > } > > } > > return 0; > > } > > > Interesting... I got requests for higher performance in flow/DoS testing > to be really useful. Probably only preallocation will help here. > > To be really aggressive we could hack the driver TX handling so at TX > interrupt also refills/refresh the ring but it's not a general solution. > I guess you can use an existing qdisc via dev_queue_xmit() or something > to save CPU in your case. > > I was sending wire rate from 10 GIGE NIC's from a DUAL XEON w. HT You must have several PCI-X busses on that system? From what I can tell, my dual-xeon system (2.8Ghz, X5DPA-GG motherboard) just can't handle the PCI bandwidth. I still have processing power it appears, and I see lots of hard-start-xmit errors out of the pro/1000 NICs, so I assume I am able to drive them as hard as they can go... It may be that receiving the pkts, as I am doing, also decreases transmit in more than a linear fashion. One thing I forgot to mention earlier: I set the pktgen thread to real-time scheduling with a user-space app. This helps make sure it wakes up promptly. > I'm interested if anyone has done any pktgen performance tests with > w. S2IO or other 10G card we need to upgrade the lab equipment. > Both 64 byte pkts and MTU sized pkts is interesting. Anyone? Not I, but would be interested as well! -- Ben Greear Candela Technologies Inc http://www.candelatech.com From oxymoron@waste.org Thu Oct 7 14:51:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 14:51:19 -0700 (PDT) Received: from waste.org (waste.org [209.173.204.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97LpDSP026161 for ; Thu, 7 Oct 2004 14:51:14 -0700 Received: from waste.org (localhost [127.0.0.1]) by waste.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id i97LoXWk031433; Thu, 7 Oct 2004 16:50:33 -0500 Received: (from oxymoron@localhost) by waste.org (8.12.3/8.12.3/Debian-7.1) id i97LoRJA031411; Thu, 7 Oct 2004 16:50:27 -0500 Date: Thu, 7 Oct 2004 16:50:26 -0500 From: Matt Mackall To: Andi Kleen Cc: Colin Leroy , "David S. Miller" , akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041007215025.GT31237@waste.org> References: <20041006232544.53615761@jack.colino.net> <20041006214322.GG31237@waste.org> <20041007075319.6b31430d@jack.colino.net> <20041006234912.66bfbdcc.davem@davemloft.net> <20041007160532.60c3f26b@pirandello> <20041007112846.5c85b2d9.davem@davemloft.net> <20041007224422.1c1bea95@jack.colino.net> <20041007214505.GB31558@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041007214505.GB31558@wotan.suse.de> User-Agent: Mutt/1.3.28i X-Virus-Scanned: by amavisd-new X-archive-position: 10034 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mpm@selenic.com Precedence: bulk X-list: netdev Content-Length: 1118 Lines: 31 On Thu, Oct 07, 2004 at 11:45:05PM +0200, Andi Kleen wrote: > On Thu, Oct 07, 2004 at 10:44:22PM +0200, Colin Leroy wrote: > > On 07 Oct 2004 at 11h10, David S. Miller wrote: > > > > Hi again, > > > > > So, netpoll needs to have the NETIF_F_LLTX stuff added to it. > > > > This patch should do that. It works OK for me, but I'd like it checked > > before sent upstream... > > > > However, it doesn't fix the hang. it looks like this hang is really > > coming from sungem. > > IMHO it's not needed. Taking xmit_lock is harmless even when > the NETIF_F_LLTX flag is set. > > (or at least it was with my original patchkit. In theory it's > possible someone changed their driver to take xmit_lock in hard_start_xmit, > but if they did that I would just consider it a driver bug) Ok, this part makes sense. > The only drawback is that there won't be a reply when the driver try > lock fails, but netpoll doesn't have a queue for that anyways. You could > probably poll then, but I'm not sure it's a good idea. But your meaning here is not entirely clear. -- Mathematics is the supreme nostalgia of our time. From davem@davemloft.net Thu Oct 7 15:09:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 15:09:40 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97M9XQr027103 for ; Thu, 7 Oct 2004 15:09:33 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CFgQW-0002Id-00; Thu, 07 Oct 2004 15:07:56 -0700 Date: Thu, 7 Oct 2004 15:07:56 -0700 From: "David S. Miller" To: Matt Mackall Cc: ak@suse.de, colin@colino.net, akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-Id: <20041007150756.2373719f.davem@davemloft.net> In-Reply-To: <20041007215025.GT31237@waste.org> References: <20041006232544.53615761@jack.colino.net> <20041006214322.GG31237@waste.org> <20041007075319.6b31430d@jack.colino.net> <20041006234912.66bfbdcc.davem@davemloft.net> <20041007160532.60c3f26b@pirandello> <20041007112846.5c85b2d9.davem@davemloft.net> <20041007224422.1c1bea95@jack.colino.net> <20041007214505.GB31558@wotan.suse.de> <20041007215025.GT31237@waste.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10035 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 1230 Lines: 27 On Thu, 7 Oct 2004 16:50:26 -0500 Matt Mackall wrote: > > The only drawback is that there won't be a reply when the driver try > > lock fails, but netpoll doesn't have a queue for that anyways. You could > > probably poll then, but I'm not sure it's a good idea. > > But your meaning here is not entirely clear. If another thread on another cpu is in the dev->hard_start_xmit() routine, then it will have it's tx device lock held, and netpoll will simply get an immediate return from ->hard_start_xmit() with error NETDEV_TX_LOCKED. The packet will thus not be sent, and because netpoll does not have a backlog queue for tx packets of any kind the packet lost forever. NETDEV_TX_LOCKED is a transient condition. It works for the rest of the kernel because whoever holds the tx lock on the device, will recheck the device packet transmit queue when it drops that lock and returns from ->hard_start_xmit(). Andi is merely noting how netpoll's design does not have such a model, which is why the NETIF_F_LLTX semantics don't mesh very well. It is unclear if it ise wise that netpoll_send_skb() currently spins on ->hard_start_xmit() returning NETDEV_TX_LOCKED. That could result in some kind of deadlocks. From davem@davemloft.net Thu Oct 7 15:10:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 15:10:18 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97MACCJ027280 for ; Thu, 7 Oct 2004 15:10:12 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CFgRO-0002J3-00; Thu, 07 Oct 2004 15:08:50 -0700 Date: Thu, 7 Oct 2004 15:08:50 -0700 From: "David S. Miller" To: Colin Leroy Cc: mpm@selenic.com, akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-Id: <20041007150850.7ba2a387.davem@davemloft.net> In-Reply-To: <20041007224422.1c1bea95@jack.colino.net> References: <20041006232544.53615761@jack.colino.net> <20041006214322.GG31237@waste.org> <20041007075319.6b31430d@jack.colino.net> <20041006234912.66bfbdcc.davem@davemloft.net> <20041007160532.60c3f26b@pirandello> <20041007112846.5c85b2d9.davem@davemloft.net> <20041007224422.1c1bea95@jack.colino.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10036 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 599 Lines: 19 On Thu, 7 Oct 2004 22:44:22 +0200 Colin Leroy wrote: > On 07 Oct 2004 at 11h10, David S. Miller wrote: > > Hi again, > > > So, netpoll needs to have the NETIF_F_LLTX stuff added to it. > > This patch should do that. It works OK for me, but I'd like it checked > before sent upstream... > > However, it doesn't fix the hang. it looks like this hang is really > coming from sungem. Is it hanging inside of the ->hard_start_xmit() call or somewhere else? Do you have a way to determine this without adding printk()'s and thus causing recursion as you mentioned earlier? :-) From Robert.Olsson@data.slu.se Thu Oct 7 15:14:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 15:14:08 -0700 (PDT) Received: from mail1.slu.se (mail1.slu.se [130.238.96.11]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97ME1Z1027861 for ; Thu, 7 Oct 2004 15:14:02 -0700 Received: from robur.slu.se (robur.slu.se [130.238.98.12]) by mail1.slu.se (8.12.10/8.12.10) with ESMTP id i97MDlI1013459; Fri, 8 Oct 2004 00:13:47 +0200 Received: by robur.slu.se (Postfix, from userid 1000) id 801839004B; Fri, 8 Oct 2004 00:13:45 +0200 (CEST) From: Robert Olsson MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16741.49048.717774.307462@robur.slu.se> Date: Fri, 8 Oct 2004 00:13:44 +0200 To: Ben Greear Cc: Robert Olsson , "'netdev@oss.sgi.com'" Subject: Re: 2.6.7 tulip performance (with NAPI) In-Reply-To: <4165B981.8060703@candelatech.com> References: <41633174.7070805@candelatech.com> <16740.17875.574967.11417@robur.slu.se> <41646587.7070401@candelatech.com> <41649425.1010102@candelatech.com> <16741.45331.743721.822091@robur.slu.se> <4165B981.8060703@candelatech.com> X-Mailer: VM 7.18 under Emacs 21.3.1 X-archive-position: 10037 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Robert.Olsson@data.slu.se Precedence: bulk X-list: netdev Content-Length: 994 Lines: 24 Ben Greear writes: > You must have several PCI-X busses on that system? From what I can tell, > my dual-xeon system (2.8Ghz, X5DPA-GG motherboard) just can't handle the > PCI bandwidth. I still have processing power it appears, and I see lots > of hard-start-xmit errors out of the pro/1000 NICs, so I assume I am > able to drive them as hard as they can go... It may be that receiving > the pkts, as I am doing, also decreases transmit in more than a linear fashion. Yes the board has 4 different PCI-bus from what I remember it's was a Supermicro X5DL8-GG. Yes you need bus bandwith from what I've seen even 133 MHz PCI-X is limiting the small packet performance at GIGE speeds. > > I'm interested if anyone has done any pktgen performance tests with > > w. S2IO or other 10G card we need to upgrade the lab equipment. > > Both 64 byte pkts and MTU sized pkts is interesting. Anyone? > > Not I, but would be interested as well! Andi got one... ;-) --ro From oxymoron@waste.org Thu Oct 7 16:44:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 16:44:06 -0700 (PDT) Received: from waste.org (waste.org [209.173.204.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97Ni0FQ003363 for ; Thu, 7 Oct 2004 16:44:01 -0700 Received: from waste.org (localhost [127.0.0.1]) by waste.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id i97NhQWk029450; Thu, 7 Oct 2004 18:43:26 -0500 Received: (from oxymoron@localhost) by waste.org (8.12.3/8.12.3/Debian-7.1) id i97NhNPt029441; Thu, 7 Oct 2004 18:43:23 -0500 Date: Thu, 7 Oct 2004 18:43:23 -0500 From: Matt Mackall To: "David S. Miller" Cc: ak@suse.de, colin@colino.net, akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041007234322.GW31237@waste.org> References: <20041006232544.53615761@jack.colino.net> <20041006214322.GG31237@waste.org> <20041007075319.6b31430d@jack.colino.net> <20041006234912.66bfbdcc.davem@davemloft.net> <20041007160532.60c3f26b@pirandello> <20041007112846.5c85b2d9.davem@davemloft.net> <20041007224422.1c1bea95@jack.colino.net> <20041007214505.GB31558@wotan.suse.de> <20041007215025.GT31237@waste.org> <20041007150756.2373719f.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041007150756.2373719f.davem@davemloft.net> User-Agent: Mutt/1.3.28i X-Virus-Scanned: by amavisd-new X-archive-position: 10038 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mpm@selenic.com Precedence: bulk X-list: netdev Content-Length: 1510 Lines: 34 On Thu, Oct 07, 2004 at 03:07:56PM -0700, David S. Miller wrote: > On Thu, 7 Oct 2004 16:50:26 -0500 > Matt Mackall wrote: > > > > The only drawback is that there won't be a reply when the driver try > > > lock fails, but netpoll doesn't have a queue for that anyways. You could > > > probably poll then, but I'm not sure it's a good idea. > > > > But your meaning here is not entirely clear. > > If another thread on another cpu is in the dev->hard_start_xmit() routine, > then it will have it's tx device lock held, and netpoll will simply get an > immediate return from ->hard_start_xmit() with error NETDEV_TX_LOCKED. > > The packet will thus not be sent, and because netpoll does not have a > backlog queue for tx packets of any kind the packet lost forever. > > NETDEV_TX_LOCKED is a transient condition. It works for the rest of the > kernel because whoever holds the tx lock on the device, will recheck the > device packet transmit queue when it drops that lock and returns from > ->hard_start_xmit(). > > Andi is merely noting how netpoll's design does not have such a model, > which is why the NETIF_F_LLTX semantics don't mesh very well. > > It is unclear if it ise wise that netpoll_send_skb() currently spins > on ->hard_start_xmit() returning NETDEV_TX_LOCKED. That could > result in some kind of deadlocks. Deadlocks from recursion, presumably? We could probably throw in a max retry count, as ugly as that is.. -- Mathematics is the supreme nostalgia of our time. From buytenh@wantstofly.org Thu Oct 7 16:44:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 16:44:32 -0700 (PDT) Received: from xi.wantstofly.org (alephnull.demon.nl [212.238.201.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97NiREv003453 for ; Thu, 7 Oct 2004 16:44:27 -0700 Received: by xi.wantstofly.org (Postfix, from userid 500) id 4D1602B0EE; Fri, 8 Oct 2004 01:44:13 +0200 (MEST) Date: Fri, 8 Oct 2004 01:44:13 +0200 From: Lennert Buytenhek To: Robert Olsson Cc: Ben Greear , "'netdev@oss.sgi.com'" Subject: Re: 2.6.7 tulip performance (with NAPI) Message-ID: <20041007234413.GC24969@xi.wantstofly.org> References: <41633174.7070805@candelatech.com> <16740.17875.574967.11417@robur.slu.se> <41646587.7070401@candelatech.com> <41649425.1010102@candelatech.com> <16741.45331.743721.822091@robur.slu.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16741.45331.743721.822091@robur.slu.se> User-Agent: Mutt/1.4.1i X-archive-position: 10039 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: buytenh@wantstofly.org Precedence: bulk X-list: netdev Content-Length: 611 Lines: 14 On Thu, Oct 07, 2004 at 11:11:47PM +0200, Robert Olsson wrote: > I'm interested if anyone has done any pktgen performance tests with > w. S2IO or other 10G card we need to upgrade the lab equipment. > Both 64 byte pkts and MTU sized pkts is interesting. Anyone? If you're interested in raw pps numbers and willing to use something other than pktgen to attain them, you might want to look into the intel IXP-based boards. You actually have to write some microcode and upload it to an on-chip processor array, but you can easily sustain wirespeed at 4Gbps (IXP2400-based) or 10Gbps (IXP2800-based.) --L From ak@suse.de Thu Oct 7 16:54:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 16:54:45 -0700 (PDT) Received: from Cantor.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i97NseLW004895 for ; Thu, 7 Oct 2004 16:54:41 -0700 Received: from hermes.suse.de (hermes-ext.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 26596CFCED7; Fri, 8 Oct 2004 01:50:23 +0200 (CEST) Date: Fri, 8 Oct 2004 01:50:22 +0200 From: Andi Kleen To: Matt Mackall Cc: "David S. Miller" , ak@suse.de, colin@colino.net, akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041007235022.GB19864@wotan.suse.de> References: <20041006214322.GG31237@waste.org> <20041007075319.6b31430d@jack.colino.net> <20041006234912.66bfbdcc.davem@davemloft.net> <20041007160532.60c3f26b@pirandello> <20041007112846.5c85b2d9.davem@davemloft.net> <20041007224422.1c1bea95@jack.colino.net> <20041007214505.GB31558@wotan.suse.de> <20041007215025.GT31237@waste.org> <20041007150756.2373719f.davem@davemloft.net> <20041007234322.GW31237@waste.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041007234322.GW31237@waste.org> X-archive-position: 10040 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 Content-Length: 469 Lines: 15 > Deadlocks from recursion, presumably? We could probably throw in a max > retry count, as ugly as that is.. There should not be any recursion, no. The problem is that the poll is effectively a spinlock. But when another CPU takes an long interrupt while holding the lock it could take quite a long time to grab the lock. For most network drivers this shouldn't occur though because the net driver private lock is usually always taken with interrupts off. -Andi From acme@conectiva.com.br Thu Oct 7 19:02:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 19:02:56 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9822dJE018311 for ; Thu, 7 Oct 2004 19:02:45 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 2AE0B47386; Thu, 7 Oct 2004 23:02:22 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 501A24745E for ; Thu, 7 Oct 2004 23:02:21 -0300 (BRT) Received: (qmail 22389 invoked by uid 0); 8 Oct 2004 02:59:19 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 8 Oct 2004 02:59:19 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id C602814639; Thu, 7 Oct 2004 23:05:29 -0300 (BRT) Message-ID: <4165F5B2.5040807@conectiva.com.br> Date: Thu, 07 Oct 2004 23:04:34 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" Cc: Francois Romieu , netdev@oss.sgi.com Subject: PATCH 1/1: [SKBUFF] move common code to hdlc_type_trans X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------070203040906030808050001" X-Bogosity: No, tests=bogofilter, spamicity=0.460716, version=0.16.3 X-archive-position: 10041 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 Content-Length: 7259 Lines: 231 This is a multi-part message in MIME format. --------------070203040906030808050001 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi David, Please consider pulling from: bk://kernel.bkbits.net/acme/sk_buff-2.6 It should be equivalent to the code it was before, the only thing that seems fishy is the drivers/net/wan/dssc4.c, where the skb->mac.raw is being set after the call to hdlc_type_trans, where, in some codepaths there are calls to skb_pull and all the other hdlc layer drivers set the mac.raw _before_ the skb_pull, like eth_type_trans (that may well be called thru the hdlc layer type_trans pointer). Francois, is this really what is intended? I left it as is for now... - Arnaldo --------------070203040906030808050001 Content-Type: text/plain; name="hdlc_type_trans.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="hdlc_type_trans.patch" =================================================================== ChangeSet@1.2058, 2004-10-07 22:35:15-03:00, acme@conectiva.com.br [SKBUFF] move common code to hdlc_type_trans Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller drivers/char/pcmcia/synclink_cs.c | 4 --- drivers/char/synclink.c | 4 --- drivers/char/synclinkmp.c | 4 --- drivers/net/wan/dscc4.c | 1 drivers/net/wan/farsync.c | 42 ++++++++++++++++++-------------------- drivers/net/wan/hd6457x.c | 2 - drivers/net/wan/pc300_drv.c | 1 drivers/net/wan/wanxl.c | 2 - include/linux/hdlc.h | 8 +++++-- 9 files changed, 29 insertions(+), 39 deletions(-) diff -Nru a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c --- a/drivers/char/pcmcia/synclink_cs.c 2004-10-07 23:02:25 -03:00 +++ b/drivers/char/pcmcia/synclink_cs.c 2004-10-07 23:02:25 -03:00 @@ -4570,9 +4570,7 @@ memcpy(skb_put(skb, size),buf,size); - skb->dev = info->netdev; - skb->mac.raw = skb->data; - skb->protocol = hdlc_type_trans(skb, skb->dev); + skb->protocol = hdlc_type_trans(skb, info->netdev); stats->rx_packets++; stats->rx_bytes += size; diff -Nru a/drivers/char/synclink.c b/drivers/char/synclink.c --- a/drivers/char/synclink.c 2004-10-07 23:02:25 -03:00 +++ b/drivers/char/synclink.c 2004-10-07 23:02:25 -03:00 @@ -8150,9 +8150,7 @@ memcpy(skb_put(skb, size),buf,size); - skb->dev = info->netdev; - skb->mac.raw = skb->data; - skb->protocol = hdlc_type_trans(skb, skb->dev); + skb->protocol = hdlc_type_trans(skb, info->netdev); stats->rx_packets++; stats->rx_bytes += size; diff -Nru a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c --- a/drivers/char/synclinkmp.c 2004-10-07 23:02:25 -03:00 +++ b/drivers/char/synclinkmp.c 2004-10-07 23:02:25 -03:00 @@ -1968,9 +1968,7 @@ memcpy(skb_put(skb, size),buf,size); - skb->dev = info->netdev; - skb->mac.raw = skb->data; - skb->protocol = hdlc_type_trans(skb, skb->dev); + skb->protocol = hdlc_type_trans(skb, info->netdev); stats->rx_packets++; stats->rx_bytes += size; diff -Nru a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c --- a/drivers/net/wan/dscc4.c 2004-10-07 23:02:25 -03:00 +++ b/drivers/net/wan/dscc4.c 2004-10-07 23:02:25 -03:00 @@ -517,7 +517,6 @@ skb = dev_alloc_skb(len); dpriv->rx_skbuff[dirty] = skb; if (skb) { - skb->dev = dev; skb->protocol = hdlc_type_trans(skb, dev); skb->mac.raw = skb->data; rx_fd->data = pci_map_single(dpriv->pci_priv->pdev, skb->data, diff -Nru a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c --- a/drivers/net/wan/farsync.c 2004-10-07 23:02:25 -03:00 +++ b/drivers/net/wan/farsync.c 2004-10-07 23:02:25 -03:00 @@ -857,6 +857,18 @@ dev->trans_start = jiffies; } +/* + * Mark it for our own raw sockets interface + */ +static unsigned short farsync_type_trans(struct sk_buff *skb, + struct net_device *dev) +{ + skb->dev = dev; + skb->mac.raw = skb->data; + skb->pkt_type = PACKET_HOST; + return htons(ETH_P_CUST); +} + /* Rx dma complete interrupt */ static void @@ -881,17 +893,10 @@ /* Push upstream */ dbg(DBG_RX, "Pushing the frame up the stack\n"); - skb->mac.raw = skb->data; - skb->dev = dev; - if (port->mode == FST_RAW) { - /* - * Mark it for our own raw sockets interface - */ - skb->protocol = htons(ETH_P_CUST); - skb->pkt_type = PACKET_HOST; - } else { - skb->protocol = hdlc_type_trans(skb, skb->dev); - } + if (port->mode == FST_RAW) + skb->protocol = farsync_type_trans(skb, dev); + else + skb->protocol = hdlc_type_trans(skb, dev); rx_status = netif_rx(skb); fst_process_rx_status(rx_status, port_to_dev(port)->name); if (rx_status == NET_RX_DROP) @@ -1316,17 +1321,10 @@ /* Push upstream */ dbg(DBG_RX, "Pushing frame up the stack\n"); - skb->mac.raw = skb->data; - skb->dev = dev; - if (port->mode == FST_RAW) { - /* - * Mark it for our own raw sockets interface - */ - skb->protocol = htons(ETH_P_CUST); - skb->pkt_type = PACKET_HOST; - } else { - skb->protocol = hdlc_type_trans(skb, skb->dev); - } + if (port->mode == FST_RAW) + skb->protocol = farsync_type_trans(skb, dev); + else + skb->protocol = hdlc_type_trans(skb, dev); rx_status = netif_rx(skb); fst_process_rx_status(rx_status, port_to_dev(port)->name); if (rx_status == NET_RX_DROP) { diff -Nru a/drivers/net/wan/hd6457x.c b/drivers/net/wan/hd6457x.c --- a/drivers/net/wan/hd6457x.c 2004-10-07 23:02:25 -03:00 +++ b/drivers/net/wan/hd6457x.c 2004-10-07 23:02:25 -03:00 @@ -315,8 +315,6 @@ #endif stats->rx_packets++; stats->rx_bytes += skb->len; - skb->mac.raw = skb->data; - skb->dev = dev; skb->dev->last_rx = jiffies; skb->protocol = hdlc_type_trans(skb, dev); netif_rx(skb); diff -Nru a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c --- a/drivers/net/wan/pc300_drv.c 2004-10-07 23:02:25 -03:00 +++ b/drivers/net/wan/pc300_drv.c 2004-10-07 23:02:25 -03:00 @@ -1959,7 +1959,6 @@ cpc_trace(dev, skb, 'R'); } stats->rx_packets++; - skb->mac.raw = skb->data; skb->protocol = hdlc_type_trans(skb, dev); netif_rx(skb); } diff -Nru a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c --- a/drivers/net/wan/wanxl.c 2004-10-07 23:02:25 -03:00 +++ b/drivers/net/wan/wanxl.c 2004-10-07 23:02:25 -03:00 @@ -224,8 +224,6 @@ #endif stats->rx_packets++; stats->rx_bytes += skb->len; - skb->mac.raw = skb->data; - skb->dev = dev; dev->last_rx = jiffies; skb->protocol = hdlc_type_trans(skb, dev); netif_rx(skb); diff -Nru a/include/linux/hdlc.h b/include/linux/hdlc.h --- a/include/linux/hdlc.h 2004-10-07 23:02:25 -03:00 +++ b/include/linux/hdlc.h 2004-10-07 23:02:25 -03:00 @@ -243,11 +243,15 @@ static __inline__ unsigned short hdlc_type_trans(struct sk_buff *skb, struct net_device *dev) { - hdlc_device *hdlc = dev_to_hdlc(skb->dev); + hdlc_device *hdlc = dev_to_hdlc(dev); + + skb->mac.raw = skb->data; + skb->dev = dev; + if (hdlc->proto.type_trans) return hdlc->proto.type_trans(skb, dev); else - return __constant_htons(ETH_P_HDLC); + return htons(ETH_P_HDLC); } #endif /* __KERNEL */ --------------070203040906030808050001-- From colin@colino.net Thu Oct 7 23:47:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 23:47:41 -0700 (PDT) Received: from paperstreet.colino.net (colino.net [213.41.131.56]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i986lSPt002045 for ; Thu, 7 Oct 2004 23:47:28 -0700 Received: by paperstreet.colino.net (Postfix, from userid 1015) id A6DD673EF; Fri, 8 Oct 2004 08:47:06 +0200 (CEST) Received: from pirandello (unknown [195.167.234.210]) by paperstreet.colino.net (Postfix) with ESMTP id E27F573EC; Fri, 8 Oct 2004 08:46:47 +0200 (CEST) Date: Fri, 8 Oct 2004 08:46:40 +0200 From: Colin Leroy To: Andi Kleen Cc: Matt Mackall , "David S. Miller" , ak@suse.de, akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041008084640.58976145@pirandello> In-Reply-To: <20041007235022.GB19864@wotan.suse.de> References: <20041006214322.GG31237@waste.org> <20041007075319.6b31430d@jack.colino.net> <20041006234912.66bfbdcc.davem@davemloft.net> <20041007160532.60c3f26b@pirandello> <20041007112846.5c85b2d9.davem@davemloft.net> <20041007224422.1c1bea95@jack.colino.net> <20041007214505.GB31558@wotan.suse.de> <20041007215025.GT31237@waste.org> <20041007150756.2373719f.davem@davemloft.net> <20041007234322.GW31237@waste.org> <20041007235022.GB19864@wotan.suse.de> X-Mailer: Sylpheed-Claws 0.9.12cvs122.1 (GTK+ 2.4.0; i686-redhat-linux-gnu) X-Face: Fy:*XpRna1/tz}cJ@O'0^:qYs:8b[Rg`*8,+o^[fI?<%5LeB,Xz8ZJK[r7V0hBs8G)*&C+XA0qHoR=LoTohe@7X5K$A-@cN6n~~J/]+{[)E4h'lK$13WQf$.R+Pi;E09tk&{t|;~dakRD%CLHrk6m!?gA,5|Sb=fJ=>[9#n1Bu8?VngkVM4{'^'V_qgdA.8yn3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10042 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: colin@colino.net Precedence: bulk X-list: netdev Content-Length: 818 Lines: 25 On 08 Oct 2004 at 01h10, Andi Kleen wrote: Hi, > > Deadlocks from recursion, presumably? We could probably throw in a > > max retry count, as ugly as that is.. > > There should not be any recursion, no. If printk() is synchronous, there could be, if there's a printk() in the codepath taken by dev->hard_start_xmit()... But I don't if it is... > The problem is that the poll is effectively a spinlock. But when > another CPU takes an long interrupt while holding the lock it > could take quite a long time to grab the lock. > > For most network drivers this shouldn't occur though because > the net driver private lock is usually always taken with interrupts > off. Second newbie question: how are the interrupts disabled, is it via local_irq_save()/local_irq_restore()? or is it something else ? -- Colin From colin@colino.net Thu Oct 7 23:55:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 07 Oct 2004 23:55:07 -0700 (PDT) Received: from paperstreet.colino.net (colino.net [213.41.131.56]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i986t17Z002652 for ; Thu, 7 Oct 2004 23:55:02 -0700 Received: by paperstreet.colino.net (Postfix, from userid 1015) id 84E5D73F1; Fri, 8 Oct 2004 08:54:41 +0200 (CEST) Received: from pirandello (unknown [195.167.234.210]) by paperstreet.colino.net (Postfix) with ESMTP id B39FE73EF; Fri, 8 Oct 2004 08:54:17 +0200 (CEST) Date: Fri, 8 Oct 2004 08:54:11 +0200 From: Colin Leroy To: "David S. Miller" Cc: mpm@selenic.com, akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041008085411.1437f6c8@pirandello> In-Reply-To: <20041007150850.7ba2a387.davem@davemloft.net> References: <20041006232544.53615761@jack.colino.net> <20041006214322.GG31237@waste.org> <20041007075319.6b31430d@jack.colino.net> <20041006234912.66bfbdcc.davem@davemloft.net> <20041007160532.60c3f26b@pirandello> <20041007112846.5c85b2d9.davem@davemloft.net> <20041007224422.1c1bea95@jack.colino.net> <20041007150850.7ba2a387.davem@davemloft.net> X-Mailer: Sylpheed-Claws 0.9.12cvs122.1 (GTK+ 2.4.0; i686-redhat-linux-gnu) X-Face: Fy:*XpRna1/tz}cJ@O'0^:qYs:8b[Rg`*8,+o^[fI?<%5LeB,Xz8ZJK[r7V0hBs8G)*&C+XA0qHoR=LoTohe@7X5K$A-@cN6n~~J/]+{[)E4h'lK$13WQf$.R+Pi;E09tk&{t|;~dakRD%CLHrk6m!?gA,5|Sb=fJ=>[9#n1Bu8?VngkVM4{'^'V_qgdA.8yn3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10043 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: colin@colino.net Precedence: bulk X-list: netdev Content-Length: 1006 Lines: 35 On 07 Oct 2004 at 15h10, David S. Miller wrote: Hi, > > However, it doesn't fix the hang. it looks like this hang is really > > coming from sungem. > > Is it hanging inside of the ->hard_start_xmit() call I think so, but my way of discovering it may not be very good: I tested by replacing status = np->dev->hard_start_xmit(...); by status = NETDEV_TX_OK, then status = NETDEV_TX_BUSY, then status = NETDEV_TX_LOCKED in netpoll.c (avoiding to call hard_start_xmit()), and it didn't hang. > or somewhere else? Do you have a way to determine this without adding > printk()'s and thus causing recursion as you mentioned earlier? :-) Well, that's my big problem :-) I can't use the spinlock debugging neither, because I'm on uniprocessor and on PPC. I tried removing printk()s from gem_start_xmit() codepath, but it didn't help either, so I don't think the lock comes from a printk() recursion... (It's really hard to debug that kind of stuff! I'm learning quite a few things :)) -- Colin From colin@colino.net Fri Oct 8 00:06:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 00:07:10 -0700 (PDT) Received: from paperstreet.colino.net (colino.net [213.41.131.56]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9876rut003322 for ; Fri, 8 Oct 2004 00:06:54 -0700 Received: by paperstreet.colino.net (Postfix, from userid 1015) id 9B6FA73EC; Fri, 8 Oct 2004 09:06:32 +0200 (CEST) Received: from pirandello (unknown [195.167.234.210]) by paperstreet.colino.net (Postfix) with ESMTP id 90AEE73EF; Fri, 8 Oct 2004 09:06:16 +0200 (CEST) Date: Fri, 8 Oct 2004 09:06:10 +0200 From: Colin Leroy To: Andi Kleen Cc: "David S. Miller" , mpm@selenic.com, akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041008090610.70d7e183@pirandello> In-Reply-To: <20041007214505.GB31558@wotan.suse.de> References: <20041006232544.53615761@jack.colino.net> <20041006214322.GG31237@waste.org> <20041007075319.6b31430d@jack.colino.net> <20041006234912.66bfbdcc.davem@davemloft.net> <20041007160532.60c3f26b@pirandello> <20041007112846.5c85b2d9.davem@davemloft.net> <20041007224422.1c1bea95@jack.colino.net> <20041007214505.GB31558@wotan.suse.de> X-Mailer: Sylpheed-Claws 0.9.12cvs122.1 (GTK+ 2.4.0; i686-redhat-linux-gnu) X-Face: Fy:*XpRna1/tz}cJ@O'0^:qYs:8b[Rg`*8,+o^[fI?<%5LeB,Xz8ZJK[r7V0hBs8G)*&C+XA0qHoR=LoTohe@7X5K$A-@cN6n~~J/]+{[)E4h'lK$13WQf$.R+Pi;E09tk&{t|;~dakRD%CLHrk6m!?gA,5|Sb=fJ=>[9#n1Bu8?VngkVM4{'^'V_qgdA.8yn3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10044 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: colin@colino.net Precedence: bulk X-list: netdev Content-Length: 830 Lines: 25 On 07 Oct 2004 at 23h10, Andi Kleen wrote: Hi, > > This patch should do that. It works OK for me, but I'd like it > > checked before sent upstream... > > > > However, it doesn't fix the hang. it looks like this hang is really > > coming from sungem. > > IMHO it's not needed. Taking xmit_lock is harmless even when > the NETIF_F_LLTX flag is set. Should that be completely dropped, or is it still ok ? (I think differenciating action based on hard_start_xmit status, that is, don't goto repeat undefinitely when NETDEV_TX_BUSY, could be a good idea). I mean, should I rework that patch, forget about it or leave it as-is? Concerning the hang, I see that Andrew has put my first patch, the one checking for netif_carrier_ok(), in his tree. Is it an OK solution from your (net dev hackers) point of view? Thanks, -- Colin From akpm@osdl.org Fri Oct 8 01:43:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 01:44:02 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i988hu2i008911 for ; Fri, 8 Oct 2004 01:43:56 -0700 Received: from bix (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i988haf06052; Fri, 8 Oct 2004 01:43:36 -0700 Date: Fri, 8 Oct 2004 01:41:51 -0700 From: Andrew Morton To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: tcp heisenbug Message-Id: <20041008014151.26e17547.akpm@osdl.org> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10045 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 Content-Length: 691 Lines: 17 I just booted my main workstation into 2.6.9-rc3-mm3 (approx). fetchmail broke. It's fetching mail from localhost (ssh port-forwarded to remote servers) and then for some reason it wants to open an SMTP connection to localhost. It was failing, some error message about that SMTP connection. While I was poking at it, it started to work. `uptime' said 6 minutes. So I'd be suspecting that there's a jiffy wrap bug in TCP-to-localhost introduced since 2.6.9-rc3. I rebooted to do more diagnosis and the damn thing worked fine. I can't see anything suspicious in the post-rc3 net/ diff. But if anyone has fiddled with time-related things in networking, please double-check your work? From lkcl@lkcl.net Fri Oct 8 02:21:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 02:21:15 -0700 (PDT) Received: from open.hands.com (open.hands.com [195.224.53.39]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i989L7iv010104 for ; Fri, 8 Oct 2004 02:21:08 -0700 Received: from lkcl.net (host81-152-10-162.range81-152.btcentralplus.com [81.152.10.162]) by open.hands.com (Postfix) with ESMTP id 4F92EBF2F; Fri, 8 Oct 2004 10:20:42 +0100 (BST) Received: from lkcl by lkcl.net with local (Exim 4.24) id 1CFr6Q-0001Nb-Pt; Fri, 08 Oct 2004 10:31:54 +0100 Date: Fri, 8 Oct 2004 10:31:54 +0100 From: Luke Kenneth Casson Leighton To: Stephen Smalley Cc: Valdis Kletnieks , lkml , SELinux@tycho.nsa.gov, Ingo Molnar , netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Re: 2.6.9-rc2-mm4-VP-S7 - ksoftirq and selinux oddity Message-ID: <20041008093154.GA5089@lkcl.net> Mail-Followup-To: Stephen Smalley , Valdis Kletnieks , lkml , SELinux@tycho.nsa.gov, Ingo Molnar , netdev@oss.sgi.com, linux-net@vger.kernel.org References: <200410070542.i975gkHV031259@turing-police.cc.vt.edu> <1097157367.13339.38.camel@moss-spartans.epoch.ncsc.mil> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1097157367.13339.38.camel@moss-spartans.epoch.ncsc.mil> User-Agent: Mutt/1.5.5.1+cvs20040105i X-hands-com-MailScanner: Found to be clean X-hands-com-MailScanner-SpamScore: s X-MailScanner-From: lkcl@lkcl.net X-archive-position: 10046 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: lkcl@lkcl.net Precedence: bulk X-list: netdev Content-Length: 2320 Lines: 42 On Thu, Oct 07, 2004 at 09:56:07AM -0400, Stephen Smalley wrote: > On Thu, 2004-10-07 at 01:42, Valdis.Kletnieks@vt.edu wrote: > > audit(1097111349.727:0): avc: denied { tcp_recv } for pid=2 comm=ksoftirqd/0 saddr=127.0.0.1 src=25 daddr=127.0.0.1 dest=59639 netif=lo scontext=system_u:system_r:fsdaemon_t tcontext=system_u:object_r:netif_lo_t tclass=netif > > audit(1097111349.754:0): avc: denied { tcp_recv } for pid=2 comm=ksoftirqd/0 saddr=127.0.0.1 src=25 daddr=127.0.0.1 dest=59639 netif=lo scontext=system_u:system_r:fsdaemon_t tcontext=system_u:object_r:node_lo_t tclass=node > > audit(1097111349.782:0): avc: denied { recv_msg } for pid=2 comm=ksoftirqd/0 saddr=127.0.0.1 src=25 daddr=127.0.0.1 dest=59639 netif=lo scontext=system_u:system_r:fsdaemon_t tcontext=system_u:object_r:smtp_port_t tclass=tcp_socket > > > > At least for the recv_msg error, I *think* the message is generated because > > when we get into net/socket.c, we call security_socket_recvmsg() in > > __recv_msg() - and (possibly only when we have the VP patch applied?) at that > > point we're in a softirqd context rather than the context of the process that > > will finally receive the packet, so the SELinux code ends up checking the wrong > Valdis, > > These permission checks are based on the receiving socket security > context, not any process security context, and are performed by the > sock_rcv_skb hook when mediating packet receipt on a socket. The > auxiliary pid and comm or exe information is meaningless for such > checks. avc_audit could possibly be modified to check whether we are in > softirq and omit them in those cases from the audit messages. > This has > been discussed previously on the selinux mailing list, please see the > archives. an alternative possible solution is to get the packet _out_ from the interrupt context and have the aux pid comm exe information added. as i understand it "a" possible way to do that would be to have a userspace ip_queue which simply marks the packet as "seen it" and then does "now please reprocess it". by the time that packets get to ip_queue in userspace, they will have had their aix pid comm exe info added (and the file sock stuff). alternatively, someone could spend a lot of their time doing exactly the same thing in kernel-space. l. From P@draigBrady.com Fri Oct 8 02:25:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 02:25:42 -0700 (PDT) Received: from corvil.com (gate.corvil.net [213.94.219.177]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i989Pbpu010523 for ; Fri, 8 Oct 2004 02:25:38 -0700 Received: from draigBrady.com (pixelbeat.local.corvil.com [172.18.1.170]) by corvil.com (8.12.9/8.12.5) with ESMTP id i989PDwS016586; Fri, 8 Oct 2004 10:25:14 +0100 (IST) (envelope-from P@draigBrady.com) Message-ID: <41665CF9.3060001@draigBrady.com> Date: Fri, 08 Oct 2004 10:25:13 +0100 From: P@draigBrady.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040124 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Lennert Buytenhek CC: Robert Olsson , Ben Greear , "'netdev@oss.sgi.com'" Subject: Re: 2.6.7 tulip performance (with NAPI) References: <41633174.7070805@candelatech.com> <16740.17875.574967.11417@robur.slu.se> <41646587.7070401@candelatech.com> <41649425.1010102@candelatech.com> <16741.45331.743721.822091@robur.slu.se> <20041007234413.GC24969@xi.wantstofly.org> In-Reply-To: <20041007234413.GC24969@xi.wantstofly.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-archive-position: 10047 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: P@draigBrady.com Precedence: bulk X-list: netdev Content-Length: 852 Lines: 20 Lennert Buytenhek wrote: > On Thu, Oct 07, 2004 at 11:11:47PM +0200, Robert Olsson wrote: > > >> I'm interested if anyone has done any pktgen performance tests with >> w. S2IO or other 10G card we need to upgrade the lab equipment. >> Both 64 byte pkts and MTU sized pkts is interesting. Anyone? > > > If you're interested in raw pps numbers and willing to use something > other than pktgen to attain them, you might want to look into the intel > IXP-based boards. You actually have to write some microcode and upload > it to an on-chip processor array, but you can easily sustain wirespeed > at 4Gbps (IXP2400-based) or 10Gbps (IXP2800-based.) Good suggestion. This is exactly what I'm doing on a (2400 based) radisys enp-2611 board. Faced with the cost of a smartbits it's a no brainer for me. I haven't written the µ code yet btw. Pádraig. From buytenh@wantstofly.org Fri Oct 8 02:28:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 02:28:47 -0700 (PDT) Received: from xi.wantstofly.org (alephnull.demon.nl [212.238.201.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i989Sfxm010901 for ; Fri, 8 Oct 2004 02:28:42 -0700 Received: by xi.wantstofly.org (Postfix, from userid 500) id F10402B0EE; Fri, 8 Oct 2004 11:28:27 +0200 (MEST) Date: Fri, 8 Oct 2004 11:28:27 +0200 From: Lennert Buytenhek To: P@draigBrady.com Cc: Robert Olsson , Ben Greear , "'netdev@oss.sgi.com'" Subject: Re: 2.6.7 tulip performance (with NAPI) Message-ID: <20041008092827.GD31809@xi.wantstofly.org> References: <41633174.7070805@candelatech.com> <16740.17875.574967.11417@robur.slu.se> <41646587.7070401@candelatech.com> <41649425.1010102@candelatech.com> <16741.45331.743721.822091@robur.slu.se> <20041007234413.GC24969@xi.wantstofly.org> <41665CF9.3060001@draigBrady.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41665CF9.3060001@draigBrady.com> User-Agent: Mutt/1.4.1i X-archive-position: 10048 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: buytenh@wantstofly.org Precedence: bulk X-list: netdev Content-Length: 1076 Lines: 24 On Fri, Oct 08, 2004 at 10:25:13AM +0100, P@draigBrady.com wrote: > >>I'm interested if anyone has done any pktgen performance tests with > >>w. S2IO or other 10G card we need to upgrade the lab equipment. > >>Both 64 byte pkts and MTU sized pkts is interesting. Anyone? > > > >If you're interested in raw pps numbers and willing to use something > >other than pktgen to attain them, you might want to look into the intel > >IXP-based boards. You actually have to write some microcode and upload > >it to an on-chip processor array, but you can easily sustain wirespeed > >at 4Gbps (IXP2400-based) or 10Gbps (IXP2800-based.) > > Good suggestion. This is exactly what I'm doing on a (2400 based) > radisys enp-2611 board. Faced with the cost of a smartbits it's > a no brainer for me. I haven't written the ? code yet btw. I'm on the Radisys ENP-2611 too. Now that 2.6.9-rc3 runs on the ENP-2611 out-of-the-box, and the Fedora Core 2 port mostly works, I should have a fairly complete set of Free microcode plus supporting host-side software out soon. cheers, Lennert From sds@epoch.ncsc.mil Fri Oct 8 04:21:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 04:22:01 -0700 (PDT) Received: from epoch.ncsc.mil (facesaver.epoch.ncsc.mil [144.51.25.10]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98BLtOp019112 for ; Fri, 8 Oct 2004 04:21:55 -0700 Received: from [144.51.25.121] (moss-spartans [144.51.25.121]) by epoch.ncsc.mil (8.12.8/8.12.8) with ESMTP id i98BLd1H012176; Fri, 8 Oct 2004 07:21:40 -0400 (EDT) Subject: Re: 2.6.9-rc2-mm4-VP-S7 - ksoftirq and selinux oddity From: Stephen Smalley To: Luke Kenneth Casson Leighton Cc: Valdis Kletnieks , lkml , SELinux@tycho.nsa.gov, Ingo Molnar , netdev@oss.sgi.com, linux-net@vger.kernel.org In-Reply-To: <20041008093154.GA5089@lkcl.net> References: <200410070542.i975gkHV031259@turing-police.cc.vt.edu> <1097157367.13339.38.camel@moss-spartans.epoch.ncsc.mil> <20041008093154.GA5089@lkcl.net> Content-Type: text/plain Organization: National Security Agency Message-Id: <1097234322.16641.3.camel@moss-spartans.epoch.ncsc.mil> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Fri, 08 Oct 2004 07:18:42 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 10049 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sds@epoch.ncsc.mil Precedence: bulk X-list: netdev Content-Length: 654 Lines: 15 On Fri, 2004-10-08 at 05:31, Luke Kenneth Casson Leighton wrote: > an alternative possible solution is to get the packet _out_ from > the interrupt context and have the aux pid comm exe information added. No, the network permission checks are intentionally layered to match the network protocol implementation. There is a process-to-socket check performed in process context when the data is received from the socket by an actual process, but there is also the socket-to-netif/node/port check performed in softirq context when the packet is received on the socket from the network. -- Stephen Smalley National Security Agency From lkcl@lkcl.net Fri Oct 8 04:26:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 04:26:30 -0700 (PDT) Received: from open.hands.com (open.hands.com [195.224.53.39]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98BQPaB019512 for ; Fri, 8 Oct 2004 04:26:26 -0700 Received: from lkcl.net (host81-152-10-162.range81-152.btcentralplus.com [81.152.10.162]) by open.hands.com (Postfix) with ESMTP id C41FDC013; Fri, 8 Oct 2004 12:25:58 +0100 (BST) Received: from lkcl by lkcl.net with local (Exim 4.24) id 1CFt3e-0001mS-S8; Fri, 08 Oct 2004 12:37:10 +0100 Date: Fri, 8 Oct 2004 12:37:10 +0100 From: Luke Kenneth Casson Leighton To: Stephen Smalley Cc: Valdis Kletnieks , lkml , SELinux@tycho.nsa.gov, Ingo Molnar , netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Re: 2.6.9-rc2-mm4-VP-S7 - ksoftirq and selinux oddity Message-ID: <20041008113710.GC5551@lkcl.net> Mail-Followup-To: Stephen Smalley , Valdis Kletnieks , lkml , SELinux@tycho.nsa.gov, Ingo Molnar , netdev@oss.sgi.com, linux-net@vger.kernel.org References: <200410070542.i975gkHV031259@turing-police.cc.vt.edu> <1097157367.13339.38.camel@moss-spartans.epoch.ncsc.mil> <20041008093154.GA5089@lkcl.net> <1097234322.16641.3.camel@moss-spartans.epoch.ncsc.mil> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1097234322.16641.3.camel@moss-spartans.epoch.ncsc.mil> User-Agent: Mutt/1.5.5.1+cvs20040105i X-hands-com-MailScanner: Found to be clean X-hands-com-MailScanner-SpamScore: s X-MailScanner-From: lkcl@lkcl.net X-archive-position: 10050 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: lkcl@lkcl.net Precedence: bulk X-list: netdev Content-Length: 689 Lines: 14 On Fri, Oct 08, 2004 at 07:18:42AM -0400, Stephen Smalley wrote: > On Fri, 2004-10-08 at 05:31, Luke Kenneth Casson Leighton wrote: > > an alternative possible solution is to get the packet _out_ from > > the interrupt context and have the aux pid comm exe information added. > > No, the network permission checks are intentionally layered to match the > network protocol implementation. There is a process-to-socket check > performed in process context when the data is received from the socket > by an actual process, but there is also the socket-to-netif/node/port > check performed in softirq context when the packet is received on the > socket from the network. ah. oh well! From solt2@dns.toxicfilms.tv Fri Oct 8 05:13:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 05:13:12 -0700 (PDT) Received: from dns.toxicfilms.tv (qmailr@dns.toxicfilms.tv [150.254.37.24]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98CD6QV029954 for ; Fri, 8 Oct 2004 05:13:07 -0700 Received: (qmail 6690 invoked by uid 1026); 8 Oct 2004 14:12:48 +0200 Received: from pysiak.ae.poznan.pl (solt2@150.254.37.14) by 0 with AES256-SHA encrypted SMTP; 8 Oct 2004 14:12:48 +0200 Date: Fri, 8 Oct 2004 14:10:45 +0200 From: Maciej Soltysiak X-Mailer: The Bat! (v3.0) UNREG / CD5BF9353B3B7091 Reply-To: Maciej Soltysiak X-Priority: 3 (Normal) Message-ID: <1886784988.20041008141045@dns.toxicfilms.tv> To: netdev@oss.sgi.com CC: linux-kernel@vger.kernel.org Subject: [PATCH] Update tcp_tso_win_divisor sysctl information in ip-sysctl.txt MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----------1E1F21573E4DE261" X-archive-position: 10051 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: solt2@dns.toxicfilms.tv Precedence: bulk X-list: netdev Content-Length: 2194 Lines: 52 ------------1E1F21573E4DE261 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, I noticed that newly added tcp_tso_win_divisor did not go with a description to ip-sysctl.txt This patch updates this information. Regards, Maciej diff -u linux.orig/Documentation/networking/ip-sysctl.txt linux/Documentation/networking/ip-sysctl.txt --- linux.orig/Documentation/networking/ip-sysctl.txt 2004-10-08 13:27:36.000000000 +0200 +++ linux/Documentation/networking/ip-sysctl.txt 2004-10-08 13:28:56.000000000 +0200 @@ -355,6 +355,12 @@ conections. Default: 7 +tcp_tso_win_divisor - INTEGER + This allows control over what percentage of the congestion window + can be consumed by a single TSO frame. + The setting of this parameter is a choice between burstiness and + building larger TSO frames. + Default: 8 tcp_frto - BOOLEAN Enables F-RTO, an enhanced recovery algorithm for TCP retransmission ------------1E1F21573E4DE261 Content-Type: application/octet-stream; name="ip-sysctl.txt.diff" Content-transfer-encoding: base64 Content-Disposition: attachment; filename="ip-sysctl.txt.diff" ZGlmZiAtdSBsaW51eC5vcmlnL0RvY3VtZW50YXRpb24vbmV0d29ya2luZy9pcC1zeXNjdGwu dHh0IGxpbnV4L0RvY3VtZW50YXRpb24vbmV0d29ya2luZy9pcC1zeXNjdGwudHh0Ci0tLSBs aW51eC5vcmlnL0RvY3VtZW50YXRpb24vbmV0d29ya2luZy9pcC1zeXNjdGwudHh0ICAgMjAw NC0xMC0wOCAxMzoyNzozNi4wMDAwMDAwMDAgKzAyMDAKKysrIGxpbnV4L0RvY3VtZW50YXRp b24vbmV0d29ya2luZy9pcC1zeXNjdGwudHh0ICAgICAgICAyMDA0LTEwLTA4IDEzOjI4OjU2 LjAwMDAwMDAwMCArMDIwMApAQCAtMzU1LDYgKzM1NSwxMiBAQAogICAgICAgIGNvbmVjdGlv bnMuCiAgICAgICAgRGVmYXVsdDogNwoKK3RjcF90c29fd2luX2Rpdmlzb3IgLSBJTlRFR0VS CisgICAgICAgVGhpcyBhbGxvd3MgY29udHJvbCBvdmVyIHdoYXQgcGVyY2VudGFnZSBvZiB0 aGUgY29uZ2VzdGlvbiB3aW5kb3cKKyAgICAgICBjYW4gYmUgY29uc3VtZWQgYnkgYSBzaW5n bGUgVFNPIGZyYW1lLgorICAgICAgIFRoZSBzZXR0aW5nIG9mIHRoaXMgcGFyYW1ldGVyIGlz IGEgY2hvaWNlIGJldHdlZW4gYnVyc3RpbmVzcyBhbmQKKyAgICAgICBidWlsZGluZyBsYXJn ZXIgVFNPIGZyYW1lcy4KKyAgICAgICBEZWZhdWx0OiA4CgogdGNwX2ZydG8gLSBCT09MRUFO CiAgICAgICAgRW5hYmxlcyBGLVJUTywgYW4gZW5oYW5jZWQgcmVjb3ZlcnkgYWxnb3JpdGht IGZvciBUQ1AgcmV0cmFuc21pc3Npb24K ------------1E1F21573E4DE261-- From linville@ra.tuxdriver.com Fri Oct 8 10:15:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 10:15:57 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98HFjEg015121 for ; Fri, 8 Oct 2004 10:15:45 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i98GD8M18312; Fri, 8 Oct 2004 12:13:08 -0400 Date: Fri, 8 Oct 2004 12:13:07 -0400 From: "John W. Linville" To: linux-kernel@vger.kernel.org Cc: netdev@oss.sgi.com, akpm@osdl.org, jgarzik@pobox.com, marcelo.tosatti@cyclades.com Subject: [patch 2.4.28-pre3] 3c59x: resync with 2.6 Message-ID: <20041008121307.C14378@tuxdriver.com> Mail-Followup-To: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, akpm@osdl.org, jgarzik@pobox.com, marcelo.tosatti@cyclades.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i X-archive-position: 10052 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 49956 Lines: 1368 Backport of current 3c59x driver (minus EISA/sysfs stuff) from 2.6 to 2.4. This should ease further maintenance in 2.4. --- I've been chasing some 3c59x driver problems on both 2.4.x and 2.6.x kernels. The 3c59x driver was pretty far out of sync between the two trees, so I thought it made sense to sync them back up. drivers/net/3c59x.c | 505 ++++++++++++++++++++++++++++++++++------------------ include/linux/mii.h | 7 2 files changed, 346 insertions(+), 166 deletions(-) Successfully tested w/ 3c905 on i686 w/ 2.4.28-rc3. --- linux-2.4/drivers/net/3c59x.c.orig +++ linux-2.4/drivers/net/3c59x.c @@ -166,12 +166,19 @@ - Rename wait_for_completion() to issue_and_wait() to avoid completion.h clash. - LK1.1.18ac 01Jul02 akpm - - Fix for undocumented transceiver power-up bit on some 3c566B's - (Donald Becker, Rahul Karnik) - + LK1.1.17 18Dec01 akpm + - PCI ID 9805 is a Python-T, not a dual-port Cyclone. Apparently. + And it has NWAY. + - Mask our advertised modes (vp->advertising) with our capabilities + (MII reg5) when deciding which duplex mode to use. + - Add `global_options' as default for options[]. Ditto global_enable_wol, + global_full_duplex. + + LK1.1.18 01Jul02 akpm + - Fix for undocumented transceiver power-up bit on some 3c566B's + (Donald Becker, Rahul Karnik) - - See http://www.uow.edu.au/~andrewm/linux/#3c59x-2.3 for more details. + - See http://www.zip.com.au/~akpm/linux/#3c59x-2.3 for more details. - Also see Documentation/networking/vortex.txt */ @@ -186,7 +193,7 @@ #define DRV_NAME "3c59x" -#define DRV_VERSION "LK1.1.18-ac" +#define DRV_VERSION "LK1.1.18" #define DRV_RELDATE "1 July 2002" @@ -201,11 +208,11 @@ /* Set the copy breakpoint for the copy-only-tiny-frames scheme. Setting to > 1512 effectively disables this feature. */ #ifndef __arm__ -static const int rx_copybreak = 200; +static int rx_copybreak = 200; #else /* ARM systems perform better by disregarding the bus-master transfer capability of these cards. -- rmk */ -static const int rx_copybreak = 1513; +static int rx_copybreak = 1513; #endif /* Allow setting MTU to a larger size, bypassing the normal ethernet setup. */ static const int mtu = 1500; @@ -228,16 +235,9 @@ static int vortex_debug = VORTEX_DEBUG; static int vortex_debug = 1; #endif -#ifndef __OPTIMIZE__ -#error You must compile this file with the correct options! -#error See the last lines of the source file. -#error You must compile this driver with "-O". -#endif - #include #include #include -#include #include #include #include @@ -246,6 +246,7 @@ static int vortex_debug = 1; #include #include #include +#include #include #include #include @@ -275,10 +276,13 @@ MODULE_DESCRIPTION("3Com 3c59x/3c9xx eth MODULE_LICENSE("GPL"); MODULE_PARM(debug, "i"); +MODULE_PARM(global_options, "i"); MODULE_PARM(options, "1-" __MODULE_STRING(8) "i"); +MODULE_PARM(global_full_duplex, "i"); MODULE_PARM(full_duplex, "1-" __MODULE_STRING(8) "i"); MODULE_PARM(hw_checksums, "1-" __MODULE_STRING(8) "i"); MODULE_PARM(flow_ctrl, "1-" __MODULE_STRING(8) "i"); +MODULE_PARM(global_enable_wol, "i"); MODULE_PARM(enable_wol, "1-" __MODULE_STRING(8) "i"); MODULE_PARM(rx_copybreak, "i"); MODULE_PARM(max_interrupt_work, "i"); @@ -288,10 +292,13 @@ MODULE_PARM(compaq_device_id, "i"); MODULE_PARM(watchdog, "i"); MODULE_PARM_DESC(debug, "3c59x debug level (0-6)"); MODULE_PARM_DESC(options, "3c59x: Bits 0-3: media type, bit 4: bus mastering, bit 9: full duplex"); +MODULE_PARM_DESC(global_options, "3c59x: same as options, but applies to all NICs if options is unset"); MODULE_PARM_DESC(full_duplex, "3c59x full duplex setting(s) (1)"); +MODULE_PARM_DESC(global_full_duplex, "3c59x: same as full_duplex, but applies to all NICs if options is unset"); MODULE_PARM_DESC(hw_checksums, "3c59x Hardware checksum checking by adapter(s) (0-1)"); MODULE_PARM_DESC(flow_ctrl, "3c59x 802.3x flow control usage (PAUSE only) (0-1)"); MODULE_PARM_DESC(enable_wol, "3c59x: Turn on Wake-on-LAN for adapter(s) (0-1)"); +MODULE_PARM_DESC(global_enable_wol, "3c59x: same as enable_wol, but applies to all NICs if options is unset"); MODULE_PARM_DESC(rx_copybreak, "3c59x copy breakpoint for copy-only-tiny-frames"); MODULE_PARM_DESC(max_interrupt_work, "3c59x maximum events handled per interrupt"); MODULE_PARM_DESC(compaq_ioaddr, "3c59x PCI I/O base address (Compaq BIOS problem workaround)"); @@ -405,7 +412,8 @@ enum { IS_VORTEX=1, IS_BOOMERANG=2, IS_C EEPROM_8BIT=0x10, /* AKPM: Uses 0x230 as the base bitmaps for EEPROM reads */ HAS_PWR_CTRL=0x20, HAS_MII=0x40, HAS_NWAY=0x80, HAS_CB_FNS=0x100, INVERT_MII_PWR=0x200, INVERT_LED_PWR=0x400, MAX_COLLISION_RESET=0x800, - EEPROM_OFFSET=0x1000, HAS_HWCKSM=0x2000, WNO_XCVR_PWR=0x4000 }; + EEPROM_OFFSET=0x1000, HAS_HWCKSM=0x2000, WNO_XCVR_PWR=0x4000, + EXTRA_PREAMBLE=0x8000, }; enum vortex_chips { CH_3C590 = 0, @@ -429,6 +437,7 @@ enum vortex_chips { CH_3C905B_2, CH_3C905B_FX, CH_3C905C, + CH_3C9202, CH_3C980, CH_3C9805, @@ -484,7 +493,7 @@ static struct vortex_chip_info { {"3c900 Boomerang 10Mbps Combo", PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG, 64, }, {"3c900 Cyclone 10Mbps TPO", /* AKPM: from Don's 0.99M */ - PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, {"3c900 Cyclone 10Mbps Combo", PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, @@ -497,19 +506,21 @@ static struct vortex_chip_info { {"3c905 Boomerang 100baseT4", PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII, 64, }, {"3c905B Cyclone 100baseTx", - PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, {"3c905B Cyclone 10/100/BNC", PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, {"3c905B-FX Cyclone 100baseFx", PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, {"3c905C Tornado", - PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, + {"3c920B-EMB-WNM (ATI Radeon 9100 IGP)", + PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_MII|HAS_HWCKSM, 128, }, {"3c980 Cyclone", PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, + {"3c980C Python-T", PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, - {"3cSOHO100-TX Hurricane", PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, {"3c555 Laptop Hurricane", @@ -520,9 +531,9 @@ static struct vortex_chip_info { {"3c556B Laptop Hurricane", PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|EEPROM_OFFSET|HAS_CB_FNS|INVERT_MII_PWR| WNO_XCVR_PWR|HAS_HWCKSM, 128, }, + {"3c575 [Megahertz] 10/100 LAN CardBus", PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_8BIT, 128, }, - {"3c575 Boomerang CardBus", PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_8BIT, 128, }, {"3CCFE575BT Cyclone CardBus", @@ -534,10 +545,10 @@ static struct vortex_chip_info { {"3CCFE656 Cyclone CardBus", PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR| INVERT_LED_PWR|HAS_HWCKSM, 128, }, + {"3CCFEM656B Cyclone+Winmodem CardBus", PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR| INVERT_LED_PWR|HAS_HWCKSM, 128, }, - {"3CXFEM656C Tornado+Winmodem CardBus", /* From pcmcia-cs-3.1.5 */ PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR| MAX_COLLISION_RESET|HAS_HWCKSM, 128, }, @@ -547,19 +558,19 @@ static struct vortex_chip_info { PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, }, {"3c982 Hydra Dual Port A", PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_HWCKSM|HAS_NWAY, 128, }, + {"3c982 Hydra Dual Port B", PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_HWCKSM|HAS_NWAY, 128, }, - {"3c905B-T4", - PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, {"3c920B-EMB-WNM Tornado", PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, }, - {0,}, /* 0 terminated list. */ + {NULL,}, /* NULL terminated list. */ }; -static struct pci_device_id vortex_pci_tbl[] __devinitdata = { +static struct pci_device_id vortex_pci_tbl[] = { { 0x10B7, 0x5900, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C590 }, { 0x10B7, 0x5920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C592 }, { 0x10B7, 0x5970, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C597 }, @@ -581,6 +592,7 @@ static struct pci_device_id vortex_pci_t { 0x10B7, 0x9058, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C905B_2 }, { 0x10B7, 0x905A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C905B_FX }, { 0x10B7, 0x9200, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C905C }, + { 0x10B7, 0x9202, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C9202 }, { 0x10B7, 0x9800, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C980 }, { 0x10B7, 0x9805, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C9805 }, @@ -681,7 +693,7 @@ enum Window2 { /* Window 2. */ Wn2_ResetOptions=12, }; enum Window3 { /* Window 3: MAC/config bits. */ - Wn3_Config=0, Wn3_MAC_Ctrl=6, Wn3_Options=8, + Wn3_Config=0, Wn3_MaxPktSize=4, Wn3_MAC_Ctrl=6, Wn3_Options=8, }; #define BFEXT(value, offset, bitcount) \ @@ -709,7 +721,8 @@ enum Win4_Media_bits { Media_LnkBeat = 0x0800, }; enum Window7 { /* Window 7: Bus Master control. */ - Wn7_MasterAddr = 0, Wn7_MasterLen = 6, Wn7_MasterStatus = 12, + Wn7_MasterAddr = 0, Wn7_VlanEtherType=4, Wn7_MasterLen = 6, + Wn7_MasterStatus = 12, }; /* Boomerang bus master control registers. */ enum MasterCtrl { @@ -806,7 +819,8 @@ struct vortex_private { pm_state_valid:1, /* power_state[] has sane contents */ open:1, medialock:1, - must_free_region:1; /* Flag: if zero, Cardbus owns the I/O region */ + must_free_region:1, /* Flag: if zero, Cardbus owns the I/O region */ + large_frames:1; /* accept large frames */ int drv_flags; u16 status_enable; u16 intr_enable; @@ -822,6 +836,12 @@ struct vortex_private { u32 power_state[16]; }; +#ifdef CONFIG_PCI +#define VORTEX_PCI(dev) ((dev)->pdev) +#else +#define VORTEX_PCI(dev) NULL +#endif + /* The action to take with a media selection timer tick. Note that we deviate from the 3Com order by checking 10base2 before AUI. */ @@ -853,7 +873,7 @@ static struct media_table { static int vortex_probe1(struct pci_dev *pdev, long ioaddr, int irq, int chip_idx, int card_idx); static void vortex_up(struct net_device *dev); -static void vortex_down(struct net_device *dev); +static void vortex_down(struct net_device *dev, int final); static int vortex_open(struct net_device *dev); static void mdio_sync(long ioaddr, int bits); static int mdio_read(struct net_device *dev, int phy_id, int location); @@ -864,17 +884,21 @@ static int vortex_start_xmit(struct sk_b static int boomerang_start_xmit(struct sk_buff *skb, struct net_device *dev); static int vortex_rx(struct net_device *dev); static int boomerang_rx(struct net_device *dev); -static void vortex_interrupt(int irq, void *dev_id, struct pt_regs *regs); -static void boomerang_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t vortex_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t boomerang_interrupt(int irq, void *dev_id, struct pt_regs *regs); static int vortex_close(struct net_device *dev); static void dump_tx_ring(struct net_device *dev); static void update_stats(long ioaddr, struct net_device *dev); static struct net_device_stats *vortex_get_stats(struct net_device *dev); static void set_rx_mode(struct net_device *dev); +#ifdef CONFIG_PCI static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); +#endif static void vortex_tx_timeout(struct net_device *dev); static void acpi_set_WOL(struct net_device *dev); static struct ethtool_ops vortex_ethtool_ops; +static void set_8021q_mode(struct net_device *dev, int enable); + /* This driver uses 'options' to pass the media type, full-duplex flag, etc. */ /* Option count limit only -- unlimited interfaces are supported. */ @@ -884,6 +908,9 @@ static int full_duplex[MAX_UNITS] = {-1, static int hw_checksums[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1}; static int flow_ctrl[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1}; static int enable_wol[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1}; +static int global_options = -1; +static int global_full_duplex = -1; +static int global_enable_wol = -1; /* #define dev_alloc_skb dev_alloc_skb_debug */ @@ -895,6 +922,18 @@ static int compaq_ioaddr, compaq_irq, co static int vortex_cards_found; +#ifdef CONFIG_NET_POLL_CONTROLLER +static void poll_vortex(struct net_device *dev) +{ + struct vortex_private *vp = (struct vortex_private *)dev->priv; + unsigned long flags; + local_save_flags(flags); + local_irq_disable(); + (vp->full_bus_master_rx ? boomerang_interrupt:vortex_interrupt)(dev->irq,dev,NULL); + local_irq_restore(flags); +} +#endif + #ifdef CONFIG_PM static int vortex_suspend (struct pci_dev *pdev, u32 state) @@ -904,7 +943,7 @@ static int vortex_suspend (struct pci_de if (dev && dev->priv) { if (netif_running(dev)) { netif_device_detach(dev); - vortex_down(dev); + vortex_down(dev, 1); } } return 0; @@ -1006,9 +1045,9 @@ static int __devinit vortex_probe1(struc int i, step; struct net_device *dev; static int printed_version; - int retval; + int retval, print_info; struct vortex_chip_info * const vci = &vortex_info_tbl[chip_idx]; - char *print_name; + char *print_name = "3c59x"; if (!printed_version) { printk (version); @@ -1024,7 +1063,10 @@ static int __devinit vortex_probe1(struc goto out; } SET_MODULE_OWNER(dev); - vp = dev->priv; + SET_NETDEV_DEV(dev, gendev); + vp = netdev_priv(dev); + + option = global_options; /* The lower four bits are the media type. */ if (dev->mem_start) { @@ -1034,10 +1076,10 @@ static int __devinit vortex_probe1(struc */ option = dev->mem_start; } - else if (card_idx < MAX_UNITS) - option = options[card_idx]; - else - option = -1; + else if (card_idx < MAX_UNITS) { + if (options[card_idx] >= 0) + option = options[card_idx]; + } if (option > 0) { if (option & 0x8000) @@ -1048,7 +1090,10 @@ static int __devinit vortex_probe1(struc vp->enable_wol = 1; } - printk (KERN_INFO "See Documentation/networking/vortex.txt\n"); + print_info = (vortex_debug > 1); + if (print_info) + printk (KERN_INFO "See Documentation/networking/vortex.txt\n"); + printk(KERN_INFO "%s: 3Com %s %s at 0x%lx. Vers " DRV_VERSION "\n", print_name, pdev ? "PCI" : "EISA", @@ -1058,6 +1103,7 @@ static int __devinit vortex_probe1(struc dev->base_addr = ioaddr; dev->irq = irq; dev->mtu = mtu; + vp->large_frames = mtu > 1500; vp->drv_flags = vci->drv_flags; vp->has_nway = (vci->drv_flags & HAS_NWAY) ? 1 : 0; vp->io_size = vci->io_size; @@ -1127,6 +1173,11 @@ static int __devinit vortex_probe1(struc vp->bus_master = (option & 16) ? 1 : 0; } + if (global_full_duplex > 0) + vp->full_duplex = 1; + if (global_enable_wol > 0) + vp->enable_wol = 1; + if (card_idx < MAX_UNITS) { if (full_duplex[card_idx] > 0) vp->full_duplex = 1; @@ -1174,16 +1225,20 @@ static int __devinit vortex_probe1(struc printk(" ***INVALID CHECKSUM %4.4x*** ", checksum); for (i = 0; i < 3; i++) ((u16 *)dev->dev_addr)[i] = htons(eeprom[i + 10]); - for (i = 0; i < 6; i++) - printk("%c%2.2x", i ? ':' : ' ', dev->dev_addr[i]); + if (print_info) { + for (i = 0; i < 6; i++) + printk("%c%2.2x", i ? ':' : ' ', dev->dev_addr[i]); + } EL3WINDOW(2); for (i = 0; i < 6; i++) outb(dev->dev_addr[i], ioaddr + i); #ifdef __sparc__ - printk(", IRQ %s\n", __irq_itoa(dev->irq)); + if (print_info) + printk(", IRQ %s\n", __irq_itoa(dev->irq)); #else - printk(", IRQ %d\n", dev->irq); + if (print_info) + printk(", IRQ %d\n", dev->irq); /* Tell them about an invalid IRQ. */ if (dev->irq <= 0 || dev->irq >= NR_IRQS) printk(KERN_WARNING " *** Warning: IRQ %d is unlikely to work! ***\n", @@ -1192,9 +1247,12 @@ static int __devinit vortex_probe1(struc EL3WINDOW(4); step = (inb(ioaddr + Wn4_NetDiag) & 0x1e) >> 1; - printk(KERN_INFO " product code %02x%02x rev %02x.%d date %02d-" - "%02d-%02d\n", eeprom[6]&0xff, eeprom[6]>>8, eeprom[0x14], - step, (eeprom[4]>>5) & 15, eeprom[4] & 31, eeprom[4]>>9); + if (print_info) { + printk(KERN_INFO " product code %02x%02x rev %02x.%d date %02d-" + "%02d-%02d\n", eeprom[6]&0xff, eeprom[6]>>8, eeprom[0x14], + step, (eeprom[4]>>5) & 15, eeprom[4] & 31, eeprom[4]>>9); + } + if (pdev && vci->drv_flags & HAS_CB_FNS) { unsigned long fn_st_addr; /* Cardbus function status space */ @@ -1207,8 +1265,10 @@ static int __devinit vortex_probe1(struc if (!vp->cb_fn_base) goto free_ring; } - printk(KERN_INFO "%s: CardBus functions mapped %8.8lx->%p\n", - print_name, fn_st_addr, vp->cb_fn_base); + if (print_info) { + printk(KERN_INFO "%s: CardBus functions mapped %8.8lx->%p\n", + print_name, fn_st_addr, vp->cb_fn_base); + } EL3WINDOW(2); n = inw(ioaddr + Wn2_ResetOptions) & ~0x4010; @@ -1230,7 +1290,8 @@ static int __devinit vortex_probe1(struc if (vp->info1 & 0x8000) { vp->full_duplex = 1; - printk(KERN_INFO "Full duplex capable\n"); + if (print_info) + printk(KERN_INFO "Full duplex capable\n"); } { @@ -1241,16 +1302,17 @@ static int __devinit vortex_probe1(struc if ((vp->available_media & 0xff) == 0) /* Broken 3c916 */ vp->available_media = 0x40; config = inl(ioaddr + Wn3_Config); - printk(KERN_DEBUG " Internal config register is %4.4x, " - "transceivers %#x.\n", config, - inw(ioaddr + Wn3_Options)); - printk(KERN_INFO " %dK %s-wide RAM %s Rx:Tx split, %s%s interface.\n", - 8 << RAM_SIZE(config), - RAM_WIDTH(config) ? "word" : "byte", - ram_split[RAM_SPLIT(config)], - AUTOSELECT(config) ? "autoselect/" : "", - XCVR(config) > XCVR_ExtMII ? "" : - media_tbl[XCVR(config)].name); + if (print_info) { + printk(KERN_DEBUG " Internal config register is %4.4x, " + "transceivers %#x.\n", config, inw(ioaddr + Wn3_Options)); + printk(KERN_INFO " %dK %s-wide RAM %s Rx:Tx split, %s%s interface.\n", + 8 << RAM_SIZE(config), + RAM_WIDTH(config) ? "word" : "byte", + ram_split[RAM_SPLIT(config)], + AUTOSELECT(config) ? "autoselect/" : "", + XCVR(config) > XCVR_ExtMII ? "" : + media_tbl[XCVR(config)].name); + } vp->default_media = XCVR(config); if (vp->default_media == XCVR_NWAY) vp->has_nway = 1; @@ -1265,11 +1327,14 @@ static int __devinit vortex_probe1(struc } else dev->if_port = vp->default_media; - if (dev->if_port == XCVR_MII || dev->if_port == XCVR_NWAY) { + if ((vp->available_media & 0x40) || (vci->drv_flags & HAS_NWAY) || + dev->if_port == XCVR_MII || dev->if_port == XCVR_NWAY) { int phy, phy_idx = 0; EL3WINDOW(4); mii_preamble_required++; - mii_preamble_required++; + if (vp->drv_flags & EXTRA_PREAMBLE) + mii_preamble_required++; + mdio_sync(ioaddr, 32); mdio_read(dev, 24, 1); for (phy = 0; phy < 32 && phy_idx < 1; phy++) { int mii_status, phyx; @@ -1287,9 +1352,10 @@ static int __devinit vortex_probe1(struc mii_status = mdio_read(dev, phyx, 1); if (mii_status && mii_status != 0xffff) { vp->phys[phy_idx++] = phyx; - printk(KERN_INFO " MII transceiver found at " - "address %d, status %4x.\n", - phyx, mii_status); + if (print_info) { + printk(KERN_INFO " MII transceiver found at address %d," + " status %4x.\n", phyx, mii_status); + } if ((mii_status & 0x0040) == 0) mii_preamble_required++; } @@ -1310,9 +1376,10 @@ static int __devinit vortex_probe1(struc if (vp->capabilities & CapBusMaster) { vp->full_bus_master_tx = 1; - printk(KERN_INFO " Enabling bus-master transmits and %s " - "receives.\n", + if (print_info) { + printk(KERN_INFO " Enabling bus-master transmits and %s receives.\n", (vp->info2 & 1) ? "early" : "whole-frame" ); + } vp->full_bus_master_rx = (vp->info2 & 1) ? 1 : 2; vp->bus_master = 0; /* AKPM: vortex only */ } @@ -1331,21 +1398,28 @@ static int __devinit vortex_probe1(struc dev->hard_start_xmit = vortex_start_xmit; } - printk(KERN_INFO "%s: scatter/gather %sabled. h/w checksums %sabled\n", - print_name, - (dev->features & NETIF_F_SG) ? "en":"dis", - (dev->features & NETIF_F_IP_CSUM) ? "en":"dis"); + if (print_info) { + printk(KERN_INFO "%s: scatter/gather %sabled. h/w checksums %sabled\n", + print_name, + (dev->features & NETIF_F_SG) ? "en":"dis", + (dev->features & NETIF_F_IP_CSUM) ? "en":"dis"); + } dev->stop = vortex_close; dev->get_stats = vortex_get_stats; +#ifdef CONFIG_PCI dev->do_ioctl = vortex_ioctl; +#endif dev->ethtool_ops = &vortex_ethtool_ops; dev->set_multicast_list = set_rx_mode; dev->tx_timeout = vortex_tx_timeout; dev->watchdog_timeo = (watchdog * HZ) / 1000; +#ifdef CONFIG_NET_POLL_CONTROLLER + dev->poll_controller = poll_vortex; +#endif if (pdev && vp->enable_wol) { vp->pm_state_valid = 1; - pci_save_state(vp->pdev, vp->power_state); + pci_save_state(VORTEX_PCI(vp), vp->power_state); acpi_set_WOL(dev); } retval = register_netdev(dev); @@ -1361,7 +1435,7 @@ free_ring: free_region: if (vp->must_free_region) release_region(ioaddr, vci->io_size); - kfree (dev); + free_netdev(dev); printk(KERN_ERR PFX "vortex_probe1 fails. Returns %d\n", retval); out: return retval; @@ -1396,13 +1470,13 @@ static void vortex_up(struct net_device *dev) { long ioaddr = dev->base_addr; - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); unsigned int config; int i; - if (vp->pdev && vp->enable_wol) { - pci_set_power_state(vp->pdev, 0); /* Go active */ - pci_restore_state(vp->pdev, vp->power_state); + if (VORTEX_PCI(vp) && vp->enable_wol) { + pci_set_power_state(VORTEX_PCI(vp), 0); /* Go active */ + pci_restore_state(VORTEX_PCI(vp), vp->power_state); } /* Before initializing select the active media port. */ @@ -1465,9 +1539,10 @@ vortex_up(struct net_device *dev) if (mii_reg5 == 0xffff || mii_reg5 == 0x0000) { netif_carrier_off(dev); /* No MII device or no link partner report */ } else { + mii_reg5 &= vp->advertising; if ((mii_reg5 & 0x0100) != 0 /* 100baseTx-FD */ || (mii_reg5 & 0x00C0) == 0x0040) /* 10T-FD, but not 100-HD */ - vp->full_duplex = 1; + vp->full_duplex = 1; netif_carrier_on(dev); } vp->partner_flow_ctrl = ((mii_reg5 & 0x0400) != 0); @@ -1482,7 +1557,7 @@ vortex_up(struct net_device *dev) /* Set the full-duplex bit. */ outw( ((vp->info1 & 0x8000) || vp->full_duplex ? 0x20 : 0) | - (dev->mtu > 1500 ? 0x40 : 0) | + (vp->large_frames ? 0x40 : 0) | ((vp->full_duplex && vp->flow_ctrl && vp->partner_flow_ctrl) ? 0x100 : 0), ioaddr + Wn3_MAC_Ctrl); @@ -1561,11 +1636,13 @@ vortex_up(struct net_device *dev) for (i = 0; i < RX_RING_SIZE; i++) /* AKPM: this is done in vortex_open, too */ vp->rx_ring[i].status = 0; for (i = 0; i < TX_RING_SIZE; i++) - vp->tx_skbuff[i] = 0; + vp->tx_skbuff[i] = NULL; outl(0, ioaddr + DownListPtr); } /* Set receiver mode: presumably accept b-case and phys addr only. */ set_rx_mode(dev); + /* enable 802.1q tagged frames */ + set_8021q_mode(dev, 1); outw(StatsEnable, ioaddr + EL3_CMD); /* Turn on statistics. */ // issue_and_wait(dev, SetTxStart|0x07ff); @@ -1593,7 +1670,7 @@ vortex_up(struct net_device *dev) static int vortex_open(struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); int i; int retval; @@ -1618,7 +1695,7 @@ vortex_open(struct net_device *dev) break; /* Bad news! */ skb->dev = dev; /* Mark as being used by this device. */ skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ - vp->rx_ring[i].addr = cpu_to_le32(pci_map_single(vp->pdev, skb->tail, PKT_BUF_SZ, PCI_DMA_FROMDEVICE)); + vp->rx_ring[i].addr = cpu_to_le32(pci_map_single(VORTEX_PCI(vp), skb->tail, PKT_BUF_SZ, PCI_DMA_FROMDEVICE)); } if (i != RX_RING_SIZE) { int j; @@ -1626,7 +1703,7 @@ vortex_open(struct net_device *dev) for (j = 0; j < i; j++) { if (vp->rx_skbuff[j]) { dev_kfree_skb(vp->rx_skbuff[j]); - vp->rx_skbuff[j] = 0; + vp->rx_skbuff[j] = NULL; } } retval = -ENOMEM; @@ -1651,7 +1728,7 @@ static void vortex_timer(unsigned long data) { struct net_device *dev = (struct net_device *)data; - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; int next_tick = 60*HZ; int ok = 0; @@ -1695,8 +1772,10 @@ vortex_timer(unsigned long data) if (mii_status & BMSR_LSTATUS) { int mii_reg5 = mdio_read(dev, vp->phys[0], 5); if (! vp->force_fd && mii_reg5 != 0xffff) { - int duplex = (mii_reg5&0x0100) || - (mii_reg5 & 0x01C0) == 0x0040; + int duplex; + + mii_reg5 &= vp->advertising; + duplex = (mii_reg5&0x0100) || (mii_reg5 & 0x01C0) == 0x0040; if (vp->full_duplex != duplex) { vp->full_duplex = duplex; printk(KERN_INFO "%s: Setting %s-duplex based on MII " @@ -1706,7 +1785,7 @@ vortex_timer(unsigned long data) /* Set the full-duplex bit. */ EL3WINDOW(3); outw( (vp->full_duplex ? 0x20 : 0) | - (dev->mtu > 1500 ? 0x40 : 0) | + (vp->large_frames ? 0x40 : 0) | ((vp->full_duplex && vp->flow_ctrl && vp->partner_flow_ctrl) ? 0x100 : 0), ioaddr + Wn3_MAC_Ctrl); if (vortex_debug > 1) @@ -1775,16 +1854,18 @@ leave_media_alone: static void vortex_tx_timeout(struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; printk(KERN_ERR "%s: transmit timed out, tx_status %2.2x status %4.4x.\n", dev->name, inb(ioaddr + TxStatus), inw(ioaddr + EL3_STATUS)); EL3WINDOW(4); - printk(KERN_ERR " diagnostics: net %04x media %04x dma %8.8x.\n", - inw(ioaddr + Wn4_NetDiag), inw(ioaddr + Wn4_Media), - inl(ioaddr + PktStatus)); + printk(KERN_ERR " diagnostics: net %04x media %04x dma %08x fifo %04x\n", + inw(ioaddr + Wn4_NetDiag), + inw(ioaddr + Wn4_Media), + inl(ioaddr + PktStatus), + inw(ioaddr + Wn4_FIFODiag)); /* Slight code bloat to be user friendly. */ if ((inb(ioaddr + TxStatus) & 0x88) == 0x88) printk(KERN_ERR "%s: Transmitter encountered 16 collisions --" @@ -1800,9 +1881,9 @@ static void vortex_tx_timeout(struct net unsigned long flags; local_irq_save(flags); if (vp->full_bus_master_tx) - boomerang_interrupt(dev->irq, dev, 0); + boomerang_interrupt(dev->irq, dev, NULL); else - vortex_interrupt(dev->irq, dev, 0); + vortex_interrupt(dev->irq, dev, NULL); local_irq_restore(flags); } } @@ -1843,7 +1924,7 @@ static void vortex_tx_timeout(struct net static void vortex_error(struct net_device *dev, int status) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; int do_tx_reset = 0, reset_mask = 0; unsigned char tx_status = 0; @@ -1919,7 +2000,8 @@ vortex_error(struct net_device *dev, int printk(KERN_ERR "%s: PCI bus error, bus status %8.8x\n", dev->name, bus_status); /* In this case, blow the card away */ - vortex_down(dev); + /* Must not enter D3 or we can't legally issue the reset! */ + vortex_down(dev, 0); issue_and_wait(dev, TotalReset | 0xff); vortex_up(dev); /* AKPM: bug. vortex_up() assumes that the rx ring is full. It may not be. */ } else if (fifo_diag & 0x0400) @@ -1929,6 +2011,8 @@ vortex_error(struct net_device *dev, int issue_and_wait(dev, RxReset|0x07); /* Set the Rx filter to the current state. */ set_rx_mode(dev); + /* enable 802.1q VLAN tagged frames */ + set_8021q_mode(dev, 1); outw(RxEnable, ioaddr + EL3_CMD); /* Re-enable the receiver. */ outw(AckIntr | HostError, ioaddr + EL3_CMD); } @@ -1945,7 +2029,7 @@ vortex_error(struct net_device *dev, int static int vortex_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; /* Put out the doubleword header... */ @@ -1953,7 +2037,7 @@ vortex_start_xmit(struct sk_buff *skb, s if (vp->bus_master) { /* Set the bus-master controller to transfer the packet. */ int len = (skb->len + 3) & ~3; - outl( vp->tx_skb_dma = pci_map_single(vp->pdev, skb->data, len, PCI_DMA_TODEVICE), + outl( vp->tx_skb_dma = pci_map_single(VORTEX_PCI(vp), skb->data, len, PCI_DMA_TODEVICE), ioaddr + Wn7_MasterAddr); outw(len, ioaddr + Wn7_MasterLen); vp->tx_skb = skb; @@ -2000,7 +2084,7 @@ vortex_start_xmit(struct sk_buff *skb, s static int boomerang_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; /* Calculate the next Tx descriptor entry. */ int entry = vp->cur_tx % TX_RING_SIZE; @@ -2029,16 +2113,16 @@ boomerang_start_xmit(struct sk_buff *skb if (skb->ip_summed != CHECKSUM_HW) vp->tx_ring[entry].status = cpu_to_le32(skb->len | TxIntrUploaded); else - vp->tx_ring[entry].status = cpu_to_le32(skb->len | TxIntrUploaded | AddTCPChksum); + vp->tx_ring[entry].status = cpu_to_le32(skb->len | TxIntrUploaded | AddTCPChksum | AddUDPChksum); if (!skb_shinfo(skb)->nr_frags) { - vp->tx_ring[entry].frag[0].addr = cpu_to_le32(pci_map_single(vp->pdev, skb->data, + vp->tx_ring[entry].frag[0].addr = cpu_to_le32(pci_map_single(VORTEX_PCI(vp), skb->data, skb->len, PCI_DMA_TODEVICE)); vp->tx_ring[entry].frag[0].length = cpu_to_le32(skb->len | LAST_FRAG); } else { int i; - vp->tx_ring[entry].frag[0].addr = cpu_to_le32(pci_map_single(vp->pdev, skb->data, + vp->tx_ring[entry].frag[0].addr = cpu_to_le32(pci_map_single(VORTEX_PCI(vp), skb->data, skb->len-skb->data_len, PCI_DMA_TODEVICE)); vp->tx_ring[entry].frag[0].length = cpu_to_le32(skb->len-skb->data_len); @@ -2046,7 +2130,7 @@ boomerang_start_xmit(struct sk_buff *skb skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; vp->tx_ring[entry].frag[i+1].addr = - cpu_to_le32(pci_map_single(vp->pdev, + cpu_to_le32(pci_map_single(VORTEX_PCI(vp), (void*)page_address(frag->page) + frag->page_offset, frag->size, PCI_DMA_TODEVICE)); @@ -2057,7 +2141,7 @@ boomerang_start_xmit(struct sk_buff *skb } } #else - vp->tx_ring[entry].addr = cpu_to_le32(pci_map_single(vp->pdev, skb->data, skb->len, PCI_DMA_TODEVICE)); + vp->tx_ring[entry].addr = cpu_to_le32(pci_map_single(VORTEX_PCI(vp), skb->data, skb->len, PCI_DMA_TODEVICE)); vp->tx_ring[entry].length = cpu_to_le32(skb->len | LAST_FRAG); vp->tx_ring[entry].status = cpu_to_le32(skb->len | TxIntrUploaded); #endif @@ -2096,14 +2180,16 @@ boomerang_start_xmit(struct sk_buff *skb * full_bus_master_tx == 0 && full_bus_master_rx == 0 */ -static void vortex_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t +vortex_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr; int status; int work_done = max_interrupt_work; - + int handled = 0; + ioaddr = dev->base_addr; spin_lock(&vp->lock); @@ -2114,6 +2200,7 @@ static void vortex_interrupt(int irq, vo if ((status & IntLatch) == 0) goto handler_exit; /* No interrupt: shared IRQs cause this */ + handled = 1; if (status & IntReq) { status |= vp->deferred; @@ -2145,7 +2232,7 @@ static void vortex_interrupt(int irq, vo if (status & DMADone) { if (inw(ioaddr + Wn7_MasterStatus) & 0x1000) { outw(0x1000, ioaddr + Wn7_MasterStatus); /* Ack the event. */ - pci_unmap_single(vp->pdev, vp->tx_skb_dma, (vp->tx_skb->len + 3) & ~3, PCI_DMA_TODEVICE); + pci_unmap_single(VORTEX_PCI(vp), vp->tx_skb_dma, (vp->tx_skb->len + 3) & ~3, PCI_DMA_TODEVICE); dev_kfree_skb_irq(vp->tx_skb); /* Release the transferred buffer */ if (inw(ioaddr + TxFree) > 1536) { /* @@ -2190,6 +2277,7 @@ static void vortex_interrupt(int irq, vo dev->name, status); handler_exit: spin_unlock(&vp->lock); + return IRQ_RETVAL(handled); } /* @@ -2197,10 +2285,11 @@ handler_exit: * full_bus_master_tx == 1 && full_bus_master_rx == 1 */ -static void boomerang_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t +boomerang_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr; int status; int work_done = max_interrupt_work; @@ -2266,16 +2355,16 @@ static void boomerang_interrupt(int irq, #if DO_ZEROCOPY int i; for (i=0; i<=skb_shinfo(skb)->nr_frags; i++) - pci_unmap_single(vp->pdev, + pci_unmap_single(VORTEX_PCI(vp), le32_to_cpu(vp->tx_ring[entry].frag[i].addr), le32_to_cpu(vp->tx_ring[entry].frag[i].length)&0xFFF, PCI_DMA_TODEVICE); #else - pci_unmap_single(vp->pdev, + pci_unmap_single(VORTEX_PCI(vp), le32_to_cpu(vp->tx_ring[entry].addr), skb->len, PCI_DMA_TODEVICE); #endif dev_kfree_skb_irq(skb); - vp->tx_skbuff[entry] = 0; + vp->tx_skbuff[entry] = NULL; } else { printk(KERN_DEBUG "boomerang_interrupt: no skb!\n"); } @@ -2320,11 +2409,12 @@ static void boomerang_interrupt(int irq, dev->name, status); handler_exit: spin_unlock(&vp->lock); + return IRQ_HANDLED; } static int vortex_rx(struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; int i; short rx_status; @@ -2358,14 +2448,14 @@ static int vortex_rx(struct net_device * /* 'skb_put()' points to the start of sk_buff data area. */ if (vp->bus_master && ! (inw(ioaddr + Wn7_MasterStatus) & 0x8000)) { - dma_addr_t dma = pci_map_single(vp->pdev, skb_put(skb, pkt_len), + dma_addr_t dma = pci_map_single(VORTEX_PCI(vp), skb_put(skb, pkt_len), pkt_len, PCI_DMA_FROMDEVICE); outl(dma, ioaddr + Wn7_MasterAddr); outw((skb->len + 3) & ~3, ioaddr + Wn7_MasterLen); outw(StartDMAUp, ioaddr + EL3_CMD); while (inw(ioaddr + Wn7_MasterStatus) & 0x8000) ; - pci_unmap_single(vp->pdev, dma, pkt_len, PCI_DMA_FROMDEVICE); + pci_unmap_single(VORTEX_PCI(vp), dma, pkt_len, PCI_DMA_FROMDEVICE); } else { insl(ioaddr + RX_FIFO, skb_put(skb, pkt_len), (pkt_len + 3) >> 2); @@ -2394,7 +2484,7 @@ static int vortex_rx(struct net_device * static int boomerang_rx(struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); int entry = vp->cur_rx % RX_RING_SIZE; long ioaddr = dev->base_addr; int rx_status; @@ -2431,18 +2521,19 @@ boomerang_rx(struct net_device *dev) if (pkt_len < rx_copybreak && (skb = dev_alloc_skb(pkt_len + 2)) != 0) { skb->dev = dev; skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ - pci_dma_sync_single(vp->pdev, dma, PKT_BUF_SZ, PCI_DMA_FROMDEVICE); + pci_dma_sync_single(VORTEX_PCI(vp), dma, PKT_BUF_SZ, PCI_DMA_FROMDEVICE); /* 'skb_put()' points to the start of sk_buff data area. */ memcpy(skb_put(skb, pkt_len), vp->rx_skbuff[entry]->tail, pkt_len); + pci_dma_sync_single(VORTEX_PCI(vp), dma, PKT_BUF_SZ, PCI_DMA_FROMDEVICE); vp->rx_copy++; } else { /* Pass up the skbuff already on the Rx ring. */ skb = vp->rx_skbuff[entry]; vp->rx_skbuff[entry] = NULL; skb_put(skb, pkt_len); - pci_unmap_single(vp->pdev, dma, PKT_BUF_SZ, PCI_DMA_FROMDEVICE); + pci_unmap_single(VORTEX_PCI(vp), dma, PKT_BUF_SZ, PCI_DMA_FROMDEVICE); vp->rx_nocopy++; } skb->protocol = eth_type_trans(skb, dev); @@ -2479,7 +2570,7 @@ boomerang_rx(struct net_device *dev) } skb->dev = dev; /* Mark as being used by this device. */ skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ - vp->rx_ring[entry].addr = cpu_to_le32(pci_map_single(vp->pdev, skb->tail, PKT_BUF_SZ, PCI_DMA_FROMDEVICE)); + vp->rx_ring[entry].addr = cpu_to_le32(pci_map_single(VORTEX_PCI(vp), skb->tail, PKT_BUF_SZ, PCI_DMA_FROMDEVICE)); vp->rx_skbuff[entry] = skb; } vp->rx_ring[entry].status = 0; /* Clear complete bit. */ @@ -2496,7 +2587,7 @@ static void rx_oom_timer(unsigned long arg) { struct net_device *dev = (struct net_device *)arg; - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); spin_lock_irq(&vp->lock); if ((vp->cur_rx - vp->dirty_rx) == RX_RING_SIZE) /* This test is redundant, but makes me feel good */ @@ -2509,9 +2600,9 @@ rx_oom_timer(unsigned long arg) } static void -vortex_down(struct net_device *dev) +vortex_down(struct net_device *dev, int final_down) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; netif_stop_queue (dev); @@ -2526,6 +2617,9 @@ vortex_down(struct net_device *dev) outw(RxDisable, ioaddr + EL3_CMD); outw(TxDisable, ioaddr + EL3_CMD); + /* Disable receiving 802.1q tagged frames */ + set_8021q_mode(dev, 0); + if (dev->if_port == XCVR_10base2) /* Turn off thinnet power. Green! */ outw(StopCoax, ioaddr + EL3_CMD); @@ -2538,8 +2632,8 @@ vortex_down(struct net_device *dev) if (vp->full_bus_master_tx) outl(0, ioaddr + DownListPtr); - if (vp->pdev && vp->enable_wol) { - pci_save_state(vp->pdev, vp->power_state); + if (final_down && VORTEX_PCI(vp) && vp->enable_wol) { + pci_save_state(VORTEX_PCI(vp), vp->power_state); acpi_set_WOL(dev); } } @@ -2547,12 +2641,12 @@ vortex_down(struct net_device *dev) static int vortex_close(struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; int i; if (netif_device_present(dev)) - vortex_down(dev); + vortex_down(dev, 1); if (vortex_debug > 1) { printk(KERN_DEBUG"%s: vortex_close() status %4.4x, Tx status %2.2x.\n", @@ -2567,7 +2661,6 @@ vortex_close(struct net_device *dev) ((vp->drv_flags & HAS_HWCKSM) == 0) && (hw_checksums[vp->card_idx] == -1)) { printk(KERN_WARNING "%s supports hardware checksums, and we're not using them!\n", dev->name); - printk(KERN_WARNING "Please see http://www.uow.edu.au/~andrewm/zerocopy.html\n"); } #endif @@ -2576,10 +2669,10 @@ vortex_close(struct net_device *dev) if (vp->full_bus_master_rx) { /* Free Boomerang bus master Rx buffers. */ for (i = 0; i < RX_RING_SIZE; i++) if (vp->rx_skbuff[i]) { - pci_unmap_single( vp->pdev, le32_to_cpu(vp->rx_ring[i].addr), + pci_unmap_single( VORTEX_PCI(vp), le32_to_cpu(vp->rx_ring[i].addr), PKT_BUF_SZ, PCI_DMA_FROMDEVICE); dev_kfree_skb(vp->rx_skbuff[i]); - vp->rx_skbuff[i] = 0; + vp->rx_skbuff[i] = NULL; } } if (vp->full_bus_master_tx) { /* Free Boomerang bus master Tx buffers. */ @@ -2590,15 +2683,15 @@ vortex_close(struct net_device *dev) int k; for (k=0; k<=skb_shinfo(skb)->nr_frags; k++) - pci_unmap_single(vp->pdev, + pci_unmap_single(VORTEX_PCI(vp), le32_to_cpu(vp->tx_ring[i].frag[k].addr), le32_to_cpu(vp->tx_ring[i].frag[k].length)&0xFFF, PCI_DMA_TODEVICE); #else - pci_unmap_single(vp->pdev, le32_to_cpu(vp->tx_ring[i].addr), skb->len, PCI_DMA_TODEVICE); + pci_unmap_single(VORTEX_PCI(vp), le32_to_cpu(vp->tx_ring[i].addr), skb->len, PCI_DMA_TODEVICE); #endif dev_kfree_skb(skb); - vp->tx_skbuff[i] = 0; + vp->tx_skbuff[i] = NULL; } } } @@ -2610,7 +2703,7 @@ static void dump_tx_ring(struct net_device *dev) { if (vortex_debug > 0) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; if (vp->full_bus_master_tx) { @@ -2643,7 +2736,7 @@ dump_tx_ring(struct net_device *dev) static struct net_device_stats *vortex_get_stats(struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); unsigned long flags; if (netif_device_present(dev)) { /* AKPM: Used to be netif_running */ @@ -2663,7 +2756,7 @@ static struct net_device_stats *vortex_g */ static void update_stats(long ioaddr, struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); int old_window = inw(ioaddr + EL3_CMD); if (old_window == 0xffff) /* Chip suspended or ejected. */ @@ -2700,46 +2793,46 @@ static void update_stats(long ioaddr, st return; } + static void vortex_get_drvinfo(struct net_device *dev, - struct ethtool_drvinfo *info) + struct ethtool_drvinfo *info) { - struct vortex_private *vp = dev->priv; + struct vortex_private *vp = netdev_priv(dev); strcpy(info->driver, DRV_NAME); strcpy(info->version, DRV_VERSION); - if (vp->pdev) - strcpy(info->bus_info, pci_name(vp->pdev)); - else + if (VORTEX_PCI(vp)) { + strcpy(info->bus_info, pci_name(VORTEX_PCI(vp))); + } else { sprintf(info->bus_info, "EISA 0x%lx %d", dev->base_addr, dev->irq); + } } static struct ethtool_ops vortex_ethtool_ops = { - .get_drvinfo = vortex_get_drvinfo, + .get_drvinfo = vortex_get_drvinfo, }; -static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) +#ifdef CONFIG_PCI +static int vortex_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; - struct mii_ioctl_data *data = (struct mii_ioctl_data *)&rq->ifr_data; + struct mii_ioctl_data *data = if_mii(rq); int phy = vp->phys[0] & 0x1f; int retval; switch(cmd) { case SIOCGMIIPHY: /* Get address of MII PHY in use. */ - case SIOCDEVPRIVATE: /* for binary compat, remove in 2.5 */ data->phy_id = phy; case SIOCGMIIREG: /* Read MII PHY register. */ - case SIOCDEVPRIVATE+1: /* for binary compat, remove in 2.5 */ EL3WINDOW(4); data->val_out = mdio_read(dev, data->phy_id & 0x1f, data->reg_num & 0x1f); retval = 0; break; case SIOCSMIIREG: /* Write MII PHY register. */ - case SIOCDEVPRIVATE+2: /* for binary compat, remove in 2.5 */ if (!capable(CAP_NET_ADMIN)) { retval = -EPERM; } else { @@ -2756,6 +2849,31 @@ static int vortex_ioctl(struct net_devic return retval; } +/* + * Must power the device up to do MDIO operations + */ +static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) +{ + int err; + struct vortex_private *vp = netdev_priv(dev); + int state = 0; + + if (vp && VORTEX_PCI(vp)) + state = VORTEX_PCI(vp)->current_state; + + /* The kernel core really should have pci_get_power_state() */ + + if(state != 0) + pci_set_power_state(VORTEX_PCI(vp), 0); + err = vortex_do_ioctl(dev, rq, cmd); + if(state != 0) + pci_set_power_state(VORTEX_PCI(vp), state); + + return err; +} +#endif + + /* Pre-Cyclone chips have no documented multicast filter, so the only multicast setting is to receive all multicast frames. At least the chip has a very clean way to set the mode, unlike many others. */ @@ -2776,6 +2894,61 @@ static void set_rx_mode(struct net_devic outw(new_mode, ioaddr + EL3_CMD); } +#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) +/* Setup the card so that it can receive frames with an 802.1q VLAN tag. + Note that this must be done after each RxReset due to some backwards + compatibility logic in the Cyclone and Tornado ASICs */ + +/* The Ethernet Type used for 802.1q tagged frames */ +#define VLAN_ETHER_TYPE 0x8100 + +static void set_8021q_mode(struct net_device *dev, int enable) +{ + struct vortex_private *vp = (struct vortex_private *)dev->priv; + long ioaddr = dev->base_addr; + int old_window = inw(ioaddr + EL3_CMD); + int mac_ctrl; + + if ((vp->drv_flags&IS_CYCLONE) || (vp->drv_flags&IS_TORNADO)) { + /* cyclone and tornado chipsets can recognize 802.1q + * tagged frames and treat them correctly */ + + int max_pkt_size = dev->mtu+14; /* MTU+Ethernet header */ + if (enable) + max_pkt_size += 4; /* 802.1Q VLAN tag */ + + EL3WINDOW(3); + outw(max_pkt_size, ioaddr+Wn3_MaxPktSize); + + /* set VlanEtherType to let the hardware checksumming + treat tagged frames correctly */ + EL3WINDOW(7); + outw(VLAN_ETHER_TYPE, ioaddr+Wn7_VlanEtherType); + } else { + /* on older cards we have to enable large frames */ + + vp->large_frames = dev->mtu > 1500 || enable; + + EL3WINDOW(3); + mac_ctrl = inw(ioaddr+Wn3_MAC_Ctrl); + if (vp->large_frames) + mac_ctrl |= 0x40; + else + mac_ctrl &= ~0x40; + outw(mac_ctrl, ioaddr+Wn3_MAC_Ctrl); + } + + EL3WINDOW(old_window); +} +#else + +static void set_8021q_mode(struct net_device *dev, int enable) +{ +} + + +#endif + /* MII transceiver control section. Read and write the MII registers using software-generated serial MDIO protocol. See the MII specifications or DP83840A data sheet @@ -2810,7 +2983,7 @@ static void mdio_sync(long ioaddr, int b static int mdio_read(struct net_device *dev, int phy_id, int location) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); int i; long ioaddr = dev->base_addr; int read_cmd = (0xf6 << 10) | (phy_id << 5) | location; @@ -2844,7 +3017,7 @@ static int mdio_read(struct net_device * static void mdio_write(struct net_device *dev, int phy_id, int location, int value) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; int write_cmd = 0x50020000 | (phy_id << 23) | (location << 18) | value; long mdio_addr = ioaddr + Wn4_PhysicalMgmt; @@ -2878,7 +3051,7 @@ static void mdio_write(struct net_device /* Set Wake-On-LAN mode and put the board into D3 (power-down) state. */ static void acpi_set_WOL(struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; /* Power up on: 1==Downloaded Filter, 2==Magic Packets, 4==Link Status. */ @@ -2889,8 +3062,8 @@ static void acpi_set_WOL(struct net_devi outw(RxEnable, ioaddr + EL3_CMD); /* Change the power state to D3; RxEnable doesn't take effect. */ - pci_enable_wake(vp->pdev, 0, 1); - pci_set_power_state(vp->pdev, 3); + pci_enable_wake(VORTEX_PCI(vp), 0, 1); + pci_set_power_state(VORTEX_PCI(vp), 3); } @@ -2904,21 +3077,21 @@ static void __devexit vortex_remove_one BUG(); } - vp = dev->priv; + vp = netdev_priv(dev); /* AKPM: FIXME: we should have * if (vp->cb_fn_base) iounmap(vp->cb_fn_base); * here */ unregister_netdev(dev); - /* Should really use issue_and_wait() here */ - outw(TotalReset|0x14, dev->base_addr + EL3_CMD); - if (vp->pdev && vp->enable_wol) { - pci_set_power_state(vp->pdev, 0); /* Go active */ + if (VORTEX_PCI(vp) && vp->enable_wol) { + pci_set_power_state(VORTEX_PCI(vp), 0); /* Go active */ if (vp->pm_state_valid) - pci_restore_state(vp->pdev, vp->power_state); + pci_restore_state(VORTEX_PCI(vp), vp->power_state); } + /* Should really use issue_and_wait() here */ + outw(TotalReset|0x14, dev->base_addr + EL3_CMD); pci_free_consistent(pdev, sizeof(struct boom_rx_desc) * RX_RING_SIZE @@ -2927,18 +3100,18 @@ static void __devexit vortex_remove_one vp->rx_ring_dma); if (vp->must_free_region) release_region(dev->base_addr, vp->io_size); - kfree(dev); + free_netdev(dev); } static struct pci_driver vortex_driver = { - name: "3c59x", - probe: vortex_init_one, - remove: __devexit_p(vortex_remove_one), - id_table: vortex_pci_tbl, + .name = "3c59x", + .probe = vortex_init_one, + .remove = __devexit_p(vortex_remove_one), + .id_table = vortex_pci_tbl, #ifdef CONFIG_PM - suspend: vortex_suspend, - resume: vortex_resume, + .suspend = vortex_suspend, + .resume = vortex_resume, #endif }; --- linux-2.4/include/linux/mii.h.orig +++ linux-2.4/include/linux/mii.h @@ -9,6 +9,7 @@ #define __LINUX_MII_H__ #include +#include /* Generic MII registers. */ @@ -144,6 +145,12 @@ struct mii_ioctl_data { }; +static inline struct mii_ioctl_data *if_mii(struct ifreq *rq) +{ + return (struct mii_ioctl_data *) &rq->ifr_ifru; +} + + /** * mii_nway_result * @negotiated: value of MII ANAR and'd with ANLPAR From linville@ra.tuxdriver.com Fri Oct 8 10:19:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 10:19:35 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98HJTRC015512 for ; Fri, 8 Oct 2004 10:19:29 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i98GGrb18363; Fri, 8 Oct 2004 12:16:53 -0400 Date: Fri, 8 Oct 2004 12:16:53 -0400 From: "John W. Linville" To: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, akpm@osdl.org, jgarzik@pobox.com, marcelo.tosatti@cyclades.com Subject: Re: [patch 2.4.28-pre3] 3c59x: resync with 2.6 Message-ID: <20041008121653.D14378@tuxdriver.com> Mail-Followup-To: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, akpm@osdl.org, jgarzik@pobox.com, marcelo.tosatti@cyclades.com References: <20041008121307.C14378@tuxdriver.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: <20041008121307.C14378@tuxdriver.com>; from linville@tuxdriver.com on Fri, Oct 08, 2004 at 12:13:07PM -0400 X-archive-position: 10053 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 308 Lines: 11 On Fri, Oct 08, 2004 at 12:13:07PM -0400, John W. Linville wrote: > Backport of current 3c59x driver (minus EISA/sysfs stuff) from 2.6 to > 2.4. This should ease further maintenance in 2.4. Forgot this: Signed-off-by: John W. Linville -- John W. Linville linville@tuxdriver.com From linville@ra.tuxdriver.com Fri Oct 8 10:42:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 10:42:40 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98HgYjV016265 for ; Fri, 8 Oct 2004 10:42:34 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i98Gdtt18743; Fri, 8 Oct 2004 12:39:55 -0400 Date: Fri, 8 Oct 2004 12:39:55 -0400 From: "John W. Linville" To: linux-kernel@vger.kernel.org Cc: netdev@oss.sgi.com, akpm@osdl.org, jgarzik@pobox.com, Donald Becker Subject: [patch 2.6.9-rc3] 3c59x: reload EEPROM values at rmmod for needy cards Message-ID: <20041008123955.E14378@tuxdriver.com> Mail-Followup-To: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, akpm@osdl.org, jgarzik@pobox.com, Donald Becker References: <20040928145455.C12480@tuxdriver.com> <20040930091407.A10417@tuxdriver.com> <20041007134601.B29517@tuxdriver.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: <20041007134601.B29517@tuxdriver.com>; from linville@tuxdriver.com on Thu, Oct 07, 2004 at 01:46:01PM -0400 X-archive-position: 10054 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 3146 Lines: 68 Enable reload of EEPROM values in reset at rmmod for cards that need it, similar to old EEPROM_NORESET flag but in reverse. Signed-of-by: John W. Linville --- (Most?) 3c905 and (some?) 3c905B cards need an additional bit unmasked in the reset at rmmod or else they don't get reinitialized properly when the driver is reloaded. drivers/net/3c59x.c | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) I didn't get any guidance on which way to go, so I decided to try the version which I thought would be least offensive and see if it gets shot-down... :-) --- linux-2.6/drivers/net/3c59x.c.orig +++ linux-2.6/drivers/net/3c59x.c @@ -416,7 +416,7 @@ enum { IS_VORTEX=1, IS_BOOMERANG=2, IS_C HAS_PWR_CTRL=0x20, HAS_MII=0x40, HAS_NWAY=0x80, HAS_CB_FNS=0x100, INVERT_MII_PWR=0x200, INVERT_LED_PWR=0x400, MAX_COLLISION_RESET=0x800, EEPROM_OFFSET=0x1000, HAS_HWCKSM=0x2000, WNO_XCVR_PWR=0x4000, - EXTRA_PREAMBLE=0x8000, }; + EXTRA_PREAMBLE=0x8000, EEPROM_RESET=0x10000, }; enum vortex_chips { CH_3C590 = 0, @@ -504,16 +504,16 @@ static struct vortex_chip_info { {"3c900B-FL Cyclone 10base-FL", PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, {"3c905 Boomerang 100baseTx", - PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII, 64, }, + PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_RESET, 64, }, {"3c905 Boomerang 100baseT4", - PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII, 64, }, + PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_RESET, 64, }, {"3c905B Cyclone 100baseTx", - PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE|EEPROM_RESET, 128, }, {"3c905B Cyclone 10/100/BNC", - PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EEPROM_RESET, 128, }, {"3c905B-FX Cyclone 100baseFx", - PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM|EEPROM_RESET, 128, }, {"3c905C Tornado", PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, {"3c920B-EMB-WNM (ATI Radeon 9100 IGP)", @@ -564,7 +564,7 @@ static struct vortex_chip_info { {"3c982 Hydra Dual Port B", PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_HWCKSM|HAS_NWAY, 128, }, {"3c905B-T4", - PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE|EEPROM_RESET, 128, }, {"3c920B-EMB-WNM Tornado", PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, }, @@ -3169,7 +3169,8 @@ static void __devexit vortex_remove_one pci_restore_state(VORTEX_PCI(vp), vp->power_state); } /* Should really use issue_and_wait() here */ - outw(TotalReset|0x14, dev->base_addr + EL3_CMD); + outw(TotalReset | ((vp->drv_flags & EEPROM_RESET) ? 0x04 : 0x14), + dev->base_addr + EL3_CMD); pci_free_consistent(pdev, sizeof(struct boom_rx_desc) * RX_RING_SIZE From linville@ra.tuxdriver.com Fri Oct 8 10:46:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 10:47:00 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98HkuGk016647 for ; Fri, 8 Oct 2004 10:46:56 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i98GiFx18783; Fri, 8 Oct 2004 12:44:15 -0400 Date: Fri, 8 Oct 2004 12:44:15 -0400 From: "John W. Linville" To: linux-kernel@vger.kernel.org Cc: netdev@oss.sgi.com, akpm@osdl.org, jgarzik@pobox.com, Donald Becker , marcelo.tosatti@cyclades.com Subject: [patch 2.4.28-pre3] 3c59x: reload EEPROM values at rmmod for needy cards Message-ID: <20041008124415.F14378@tuxdriver.com> Mail-Followup-To: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, akpm@osdl.org, jgarzik@pobox.com, Donald Becker , marcelo.tosatti@cyclades.com References: <20040928145455.C12480@tuxdriver.com> <20040930091407.A10417@tuxdriver.com> <20041007134601.B29517@tuxdriver.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: <20041007134601.B29517@tuxdriver.com>; from linville@tuxdriver.com on Thu, Oct 07, 2004 at 01:46:01PM -0400 X-archive-position: 10055 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 3089 Lines: 67 Enable reload of EEPROM values in reset at rmmod for cards that need it, similar to old EEPROM_NORESET flag but in reverse. Signed-of-by: John W. Linville --- (Most?) 3c905 and (some?) 3c905B cards need an additional bit unmasked in the reset at rmmod or else they don't get reinitialized properly when the driver is reloaded. drivers/net/3c59x.c | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) Please note that this depends on the "3c59x: resync with 2.6" patch which I posted earlier today. --- linux-2.4/drivers/net/3c59x.c.orig +++ linux-2.4/drivers/net/3c59x.c @@ -413,7 +413,7 @@ enum { IS_VORTEX=1, IS_BOOMERANG=2, IS_C HAS_PWR_CTRL=0x20, HAS_MII=0x40, HAS_NWAY=0x80, HAS_CB_FNS=0x100, INVERT_MII_PWR=0x200, INVERT_LED_PWR=0x400, MAX_COLLISION_RESET=0x800, EEPROM_OFFSET=0x1000, HAS_HWCKSM=0x2000, WNO_XCVR_PWR=0x4000, - EXTRA_PREAMBLE=0x8000, }; + EXTRA_PREAMBLE=0x8000, EEPROM_RESET=0x10000, }; enum vortex_chips { CH_3C590 = 0, @@ -502,16 +502,16 @@ static struct vortex_chip_info { {"3c900B-FL Cyclone 10base-FL", PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, {"3c905 Boomerang 100baseTx", - PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII, 64, }, + PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_RESET, 64, }, {"3c905 Boomerang 100baseT4", - PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII, 64, }, + PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_RESET, 64, }, {"3c905B Cyclone 100baseTx", - PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE|EEPROM_RESET, 128, }, {"3c905B Cyclone 10/100/BNC", - PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EEPROM_RESET, 128, }, {"3c905B-FX Cyclone 100baseFx", - PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM|EEPROM_RESET, 128, }, {"3c905C Tornado", PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, {"3c920B-EMB-WNM (ATI Radeon 9100 IGP)", @@ -562,7 +562,7 @@ static struct vortex_chip_info { {"3c982 Hydra Dual Port B", PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_HWCKSM|HAS_NWAY, 128, }, {"3c905B-T4", - PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE|EEPROM_RESET, 128, }, {"3c920B-EMB-WNM Tornado", PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, }, @@ -3091,7 +3091,8 @@ static void __devexit vortex_remove_one pci_restore_state(VORTEX_PCI(vp), vp->power_state); } /* Should really use issue_and_wait() here */ - outw(TotalReset|0x14, dev->base_addr + EL3_CMD); + outw(TotalReset | ((vp->drv_flags & EEPROM_RESET) ? 0x04 : 0x14), + dev->base_addr + EL3_CMD); pci_free_consistent(pdev, sizeof(struct boom_rx_desc) * RX_RING_SIZE From akpm@osdl.org Fri Oct 8 10:50:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 10:50:16 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98Ho8KW017021 for ; Fri, 8 Oct 2004 10:50:10 -0700 Received: from bix (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i98Hnkf29324; Fri, 8 Oct 2004 10:49:48 -0700 Date: Fri, 8 Oct 2004 10:48:01 -0700 From: Andrew Morton To: albie@alfarrabio.di.uminho.pt Cc: netdev@oss.sgi.com Subject: Fw: [Bugme-new] [Bug 3527] New: ssh does not work with 2.6.9rc3 Message-Id: <20041008104801.0dd96536.akpm@osdl.org> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10056 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 Content-Length: 1644 Lines: 50 hrm. Could you check to see if it starts working OK after the machine has been up for more than five minutes? Begin forwarded message: Date: Fri, 8 Oct 2004 09:26:51 -0700 From: bugme-daemon@osdl.org To: bugme-new@lists.osdl.org Subject: [Bugme-new] [Bug 3527] New: ssh does not work with 2.6.9rc3 http://bugme.osdl.org/show_bug.cgi?id=3527 Summary: ssh does not work with 2.6.9rc3 Kernel Version: 2.6.9 RC 3 Status: NEW Severity: normal Owner: other_other@kernel-bugs.osdl.org Submitter: albie@alfarrabio.di.uminho.pt Distribution: Slackware 10 Problem Description: Had kernel 2.6.7 working correctly. It had a bug with my sis ethernet card. Upgraded to 2.6.8.1, and had problems with sata (bug #3521). So, tried the 2.6.9 RC 3. With this kernel, the sis ethernet bug is fixed (well, at least I can do a ping -f without losing packets), SATA works but... wonder... ssh doesn't. If I have a public key on other machine without passphrase, it works. If not.... ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory Permission denied, please try again. ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory Permission denied, please try again. ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory Permission denied (publickey,password,keyboard-interactive). Now, that file really doesn't exist. But it isn't needed with the old kernel. So, what 2.6.9 rc 3 has that 2.6.7 don't? Thanks, Alberto ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. From tgr@reeler.org Fri Oct 8 11:10:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 11:11:01 -0700 (PDT) Received: from rei.rakuen (217-162-107-144.dclient.hispeed.ch [217.162.107.144]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98IAuAm017793 for ; Fri, 8 Oct 2004 11:10:57 -0700 Received: from tgr by rei.rakuen with local (Exim 4.34) id 1CFzCO-0005sO-Da; Fri, 08 Oct 2004 20:10:36 +0200 Date: Fri, 8 Oct 2004 20:10:36 +0200 From: Thomas Graf To: albie@alfarrabio.di.uminho.pt Cc: Andrew Morton , netdev@oss.sgi.com Subject: Re: Fw: [Bugme-new] [Bug 3527] New: ssh does not work with 2.6.9rc3 Message-ID: <20041008181036.GC19714@rei.reeler.org> References: <20041008104801.0dd96536.akpm@osdl.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041008104801.0dd96536.akpm@osdl.org> X-archive-position: 10057 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 661 Lines: 16 > With this kernel, the sis ethernet bug is fixed (well, at least I can do a ping > -f without losing packets), SATA works but... wonder... ssh doesn't. > > If I have a public key on other machine without passphrase, it works. > If not.... Could you provide your .config and a dump of the network traffic a few seconds before, during and after the ssh session? (tcpdump -s -w ...) > Now, that file really doesn't exist. But it isn't needed with the old kernel. > So, what 2.6.9 rc 3 has that 2.6.7 don't? I have the feeling that the bug is related to the calculation of some networking related threshold resultung in wrong values right after booting time. From rmk+netdev=oss.sgi.com@arm.linux.org.uk Fri Oct 8 11:13:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 11:13:57 -0700 (PDT) Received: from caramon.arm.linux.org.uk (caramon.arm.linux.org.uk [212.18.232.186]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98IDnkq018073 for ; Fri, 8 Oct 2004 11:13:50 -0700 Received: from flint.arm.linux.org.uk ([2002:d412:e8ba:1:201:2ff:fe14:8fad]) by caramon.arm.linux.org.uk with asmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.41) id 1CFzF7-00075E-Qq; Fri, 08 Oct 2004 19:13:26 +0100 Received: from rmk by flint.arm.linux.org.uk with local (Exim 4.41) id 1CFzF6-0001Aw-Lu; Fri, 08 Oct 2004 19:13:24 +0100 Date: Fri, 8 Oct 2004 19:13:24 +0100 From: Russell King To: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, akpm@osdl.org, jgarzik@pobox.com, marcelo.tosatti@cyclades.com Subject: Re: [patch 2.4.28-pre3] 3c59x: resync with 2.6 Message-ID: <20041008191324.J17999@flint.arm.linux.org.uk> Mail-Followup-To: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, akpm@osdl.org, jgarzik@pobox.com, marcelo.tosatti@cyclades.com References: <20041008121307.C14378@tuxdriver.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: <20041008121307.C14378@tuxdriver.com>; from linville@tuxdriver.com on Fri, Oct 08, 2004 at 12:13:07PM -0400 X-archive-position: 10058 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rmk+lkml@arm.linux.org.uk Precedence: bulk X-list: netdev Content-Length: 1725 Lines: 44 On Fri, Oct 08, 2004 at 12:13:07PM -0400, John W. Linville wrote: > Backport of current 3c59x driver (minus EISA/sysfs stuff) from 2.6 to > 2.4. This should ease further maintenance in 2.4. > --- > I've been chasing some 3c59x driver problems on both 2.4.x and 2.6.x > kernels. The 3c59x driver was pretty far out of sync between the two > trees, so I thought it made sense to sync them back up. Ah, if someone's looking at the 3c59x driver then please look into the NWAY autonegotiation code - even maybe update it to use mii.c. Currently 3c59x is rather buggy - it's a fairly simple bug. Consider this: # mii-tool -v eth0: negotiated 100baseTx-HD, link ok product info: TDK 78Q2120 rev 11 basic mode: autonegotiation enabled basic status: autonegotiation complete, link ok capabilities: 100baseTx-HD 10baseT-HD advertising: 100baseTx-HD 10baseT-HD link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control and then wonder why we end up like this: eth0: Setting full-duplex based on MII #0 link partner capability of 45e1. Obviously completely bogus. Luckily, there isn't that much traffic to this card _and_ it's connected to a switch so it doesn't interfere much with other network traffic. However, it is _dog_ slow when doing large transfers to/from it. FYI, it's: 04:00.0 Ethernet controller: 3Com Corporation 3c575 [Megahertz] 10/100 LAN CardBus (rev 01) aka 3CCFE575BT. The BT version only has a HD-capable MII transceiver, whereas the CT version has a FD-capable MII transceiver fitted. -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/ 2.6 Serial core From davem@davemloft.net Fri Oct 8 11:22:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 11:22:19 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98IMDUg018665 for ; Fri, 8 Oct 2004 11:22:14 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CFzM0-0003oG-00; Fri, 08 Oct 2004 11:20:32 -0700 Date: Fri, 8 Oct 2004 11:20:32 -0700 From: "David S. Miller" To: Maciej Soltysiak Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Update tcp_tso_win_divisor sysctl information in ip-sysctl.txt Message-Id: <20041008112032.769b632e.davem@davemloft.net> In-Reply-To: <1886784988.20041008141045@dns.toxicfilms.tv> References: <1886784988.20041008141045@dns.toxicfilms.tv> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10059 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 406 Lines: 11 On Fri, 8 Oct 2004 14:10:45 +0200 Maciej Soltysiak wrote: > I noticed that newly added tcp_tso_win_divisor did not go > with a description to ip-sysctl.txt > > This patch updates this information. The implementation isn't cast in stone yet, I still want to play with including tp->max_window in the clamps somehow and I'll add the docs after I'm doing experimenting with that. From linville@ra.tuxdriver.com Fri Oct 8 11:28:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 11:28:55 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98ISnQn019267 for ; Fri, 8 Oct 2004 11:28:49 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i98HQ3j19424; Fri, 8 Oct 2004 13:26:03 -0400 Date: Fri, 8 Oct 2004 13:26:03 -0400 From: "John W. Linville" To: Russell King Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, akpm@osdl.org, jgarzik@pobox.com, marcelo.tosatti@cyclades.com Subject: Re: [patch 2.4.28-pre3] 3c59x: resync with 2.6 Message-ID: <20041008132603.G14378@tuxdriver.com> Mail-Followup-To: Russell King , linux-kernel@vger.kernel.org, netdev@oss.sgi.com, akpm@osdl.org, jgarzik@pobox.com, marcelo.tosatti@cyclades.com References: <20041008121307.C14378@tuxdriver.com> <20041008191324.J17999@flint.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20041008191324.J17999@flint.arm.linux.org.uk>; from rmk+lkml@arm.linux.org.uk on Fri, Oct 08, 2004 at 07:13:24PM +0100 X-archive-position: 10060 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 871 Lines: 25 On Fri, Oct 08, 2004 at 07:13:24PM +0100, Russell King wrote: > On Fri, Oct 08, 2004 at 12:13:07PM -0400, John W. Linville wrote: > > Backport of current 3c59x driver (minus EISA/sysfs stuff) from 2.6 to > > 2.4. This should ease further maintenance in 2.4. > > --- > > I've been chasing some 3c59x driver problems on both 2.4.x and 2.6.x > > kernels. The 3c59x driver was pretty far out of sync between the two > > trees, so I thought it made sense to sync them back up. > > Ah, if someone's looking at the 3c59x driver then please look into the > NWAY autonegotiation code - even maybe update it to use mii.c. Russell, If you can help to get my patches applied, then I'll be happy to look at this for you... :-) BTW, does this sound like the same issue: http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=75813 John -- John W. Linville linville@tuxdriver.com From jgarzik@pobox.com Fri Oct 8 11:33:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 11:33:31 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98IXPeF019673 for ; Fri, 8 Oct 2004 11:33:26 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CFzYF-0001VL-Nv; Fri, 08 Oct 2004 19:33:11 +0100 Message-ID: <4166DD57.8060501@pobox.com> Date: Fri, 08 Oct 2004 14:32:55 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Russell King CC: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, akpm@osdl.org, marcelo.tosatti@cyclades.com, klassert@mathematik.tu-chemnitz.de Subject: Re: [patch 2.4.28-pre3] 3c59x: resync with 2.6 References: <20041008121307.C14378@tuxdriver.com> <20041008191324.J17999@flint.arm.linux.org.uk> In-Reply-To: <20041008191324.J17999@flint.arm.linux.org.uk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10061 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: 233 Lines: 10 Russell King wrote: > Ah, if someone's looking at the 3c59x driver then please look into the > NWAY autonegotiation code - even maybe update it to use mii.c. Steffen Klassert (cc'd) actually did a patch to do just that :) Jeff From jgarzik@pobox.com Fri Oct 8 12:06:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 12:06:11 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98J65Go020752 for ; Fri, 8 Oct 2004 12:06:06 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CG03s-0003gw-2O; Fri, 08 Oct 2004 20:05:52 +0100 Message-ID: <4166E501.4000708@pobox.com> Date: Fri, 08 Oct 2004 15:05:37 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "John W. Linville" CC: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, akpm@osdl.org, marcelo.tosatti@cyclades.com Subject: Re: [patch 2.4.28-pre3] 3c59x: resync with 2.6 References: <20041008121307.C14378@tuxdriver.com> In-Reply-To: <20041008121307.C14378@tuxdriver.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10062 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: 1559 Lines: 58 John W. Linville wrote: > static struct ethtool_ops vortex_ethtool_ops = { > - .get_drvinfo = vortex_get_drvinfo, > + .get_drvinfo = vortex_get_drvinfo, > }; reverting good style. > > -static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) > +#ifdef CONFIG_PCI > +static int vortex_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) > { > - struct vortex_private *vp = (struct vortex_private *)dev->priv; > + struct vortex_private *vp = netdev_priv(dev); > long ioaddr = dev->base_addr; > - struct mii_ioctl_data *data = (struct mii_ioctl_data *)&rq->ifr_data; > + struct mii_ioctl_data *data = if_mii(rq); > int phy = vp->phys[0] & 0x1f; > int retval; > > switch(cmd) { > case SIOCGMIIPHY: /* Get address of MII PHY in use. */ > - case SIOCDEVPRIVATE: /* for binary compat, remove in 2.5 */ > data->phy_id = phy; > > case SIOCGMIIREG: /* Read MII PHY register. */ > - case SIOCDEVPRIVATE+1: /* for binary compat, remove in 2.5 */ > EL3WINDOW(4); > data->val_out = mdio_read(dev, data->phy_id & 0x1f, data->reg_num & 0x1f); > retval = 0; > break; > > case SIOCSMIIREG: /* Write MII PHY register. */ > - case SIOCDEVPRIVATE+2: /* for binary compat, remove in 2.5 */ breaks ABI in the middle of a stable series > @@ -144,6 +145,12 @@ struct mii_ioctl_data { > }; > > > +static inline struct mii_ioctl_data *if_mii(struct ifreq *rq) > +{ > + return (struct mii_ioctl_data *) &rq->ifr_ifru; > +} > + > + This should be in include/linux/mii.h like it is in 2.6.x. Jeff From akpm@osdl.org Fri Oct 8 12:19:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 12:19:31 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98JJMrk024549 for ; Fri, 8 Oct 2004 12:19:22 -0700 Received: from bix (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i98JIwf15937; Fri, 8 Oct 2004 12:18:58 -0700 Date: Fri, 8 Oct 2004 12:17:13 -0700 From: Andrew Morton To: Alexander Gran Cc: netdev@oss.sgi.com Subject: Re: pppoe broken in 2.6.9-rc2-mm1, working in 2.6.7-mm1 and 2.6.7-rc3 Message-Id: <20041008121713.12f888c5.akpm@osdl.org> In-Reply-To: <200410081736.05976@zodiac.zodiac.dnsalias.org> References: <200410081736.05976@zodiac.zodiac.dnsalias.org> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10063 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 Content-Length: 2776 Lines: 65 Alexander Gran wrote: > > Hi, > > pppoe doesnot work for me on 2.6.9-rc2-mm1. It works with 2.6.7-mm1 and > 2.6.7-rc3. I think I saw one similar report. Networking was a bit wobbly around 2.6.9-rc3. Could you try 2.6.9-rc3-mm3? > The problem seems to be that one package is missing: > 2.6.7 does this: > 17:31:09.042999 PPPoE PADI > 17:31:09.358382 PPPoE PADO [AC-Name "AACX11-erx"] [Service-Name] [AC-Cookie > 0xC18B5C6E2ECF4E0C6CFBB17EE5777E82] > 17:31:09.358466 PPPoE PADR [Service-Name] [AC-Cookie > 0xC18B5C6E2ECF4E0C6CFBB17EE5777E82] > 17:31:09.651898 PPPoE PADS [ses 0x107d] [Service-Name] [AC-Name "AACX11-erx"] > [AC-Cookie 0xC18B5C6E2ECF4E0C6CFBB17EE5777E82] > 17:31:10.037167 PPPoE [ses 0x107d] LCP, Conf-Request (0x01), id 1, Magic-Num > 0x0024067c, PFC , length 12 > 0x0000: c021 0101 000c 0506 0024 067c 0702 > 17:31:10.145315 PPPoE [ses 0x107d] LCP, Conf-Request (0x01), id 96, MRU > 1492, Auth-Prot PAP, Magic-Num 0x718234ae, length 18 > 0x0000: c021 0160 0012 0104 05d4 0304 c023 0506 > 0x0010: 7182 34ae > 17:31:10.145766 PPPoE [ses 0x107d] LCP, Conf-Ack (0x02), id 96, MRU 1492, > Auth-Prot PAP, Magic-Num 0x718234ae, length 18 > 0x0000: c021 0260 0012 0104 05d4 0304 c023 0506 > 0x0010: 7182 34ae > 17:31:10.147435 PPPoE [ses 0x107d] LCP, Conf-Ack (0x02), id 1, Magic-Num > 0x0024067c, PFC , length 12 > 0x0000: c021 0201 000c 0506 0024 067c 0702 > 17:31:10.148875 PPPoE [ses 0x107d] LCP, Echo-Request (0x09), id 0, Magic-Num > 0x0024067c, length 8 > 0x0000: c021 0900 0008 0024 067c > 17:31:10.148878 PPPoE [ses 0x107d] Auth-Req(1), Peer > 0002567923935200490773370001@t-online.de, Name 09856472 > 17:31:10.260645 PPPoE [ses 0x107d] LCP, Echo-Reply (0x0a), id 0, Magic-Num > 0x718234ae, length 8 > 0x0000: c021 0a00 0008 7182 34ae > 17:31:10.535034 PPPoE [ses 0x107d] Auth-Ack(1), Msg > 17:31:10.535561 PPPoE [ses 0x107d] unknown, Conf-Request (0x01), id 1, > Deflate, MVRCA, BSD-Comp, length 15 > 0x0000: 80fd 0101 000f 1a04 7800 1804 7800 1503 > 0x0010: 2f > > 2.6.9 does not send > 17:31:10.037167 PPPoE [ses 0x107d] LCP, Conf-Request (0x01), id 1, Magic-Num > 0x0024067c, PFC , length 12 > 0x0000: c021 0101 000c 0506 0024 067c 0702 > and than the AC does not respond to the follwoing packages. > > regards > Alex > > -- > Encrypted Mails welcome. > PGP-Key at http://zodiac.dnsalias.org/misc/pgpkey.asc | Key-ID: 0x6D7DD291 > > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ From davem@davemloft.net Fri Oct 8 12:27:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 12:27:27 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98JRMLt025396 for ; Fri, 8 Oct 2004 12:27:23 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CG0NA-0003xO-00; Fri, 08 Oct 2004 12:25:48 -0700 Date: Fri, 8 Oct 2004 12:25:48 -0700 From: "David S. Miller" To: Andrew Morton Cc: netdev@oss.sgi.com Subject: Re: tcp heisenbug Message-Id: <20041008122548.544a3329.davem@davemloft.net> In-Reply-To: <20041008014151.26e17547.akpm@osdl.org> References: <20041008014151.26e17547.akpm@osdl.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10064 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 747 Lines: 20 On Fri, 8 Oct 2004 01:41:51 -0700 Andrew Morton wrote: > fetchmail broke. It's fetching mail from localhost (ssh port-forwarded to > remote servers) and then for some reason it wants to open an SMTP > connection to localhost. It was failing, some error message about that > SMTP connection. > > While I was poking at it, it started to work. `uptime' said 6 minutes. So > I'd be suspecting that there's a jiffy wrap bug in TCP-to-localhost > introduced since 2.6.9-rc3. That's possible. It could also be something that only happens the first time you try to talk to a remote system. You're using e1000 on x86 right? Maybe force TSO off via ethtool right after the interface is brought up and see if that makes it go away? From linville@ra.tuxdriver.com Fri Oct 8 12:32:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 12:32:45 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98JWcND026110 for ; Fri, 8 Oct 2004 12:32:39 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i98ITxm20492; Fri, 8 Oct 2004 14:29:59 -0400 Date: Fri, 8 Oct 2004 14:29:59 -0400 From: "John W. Linville" To: Jeff Garzik Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, akpm@osdl.org, marcelo.tosatti@cyclades.com Subject: Re: [patch 2.4.28-pre3] 3c59x: resync with 2.6 Message-ID: <20041008142959.H14378@tuxdriver.com> Mail-Followup-To: Jeff Garzik , linux-kernel@vger.kernel.org, netdev@oss.sgi.com, akpm@osdl.org, marcelo.tosatti@cyclades.com References: <20041008121307.C14378@tuxdriver.com> <4166E501.4000708@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: <4166E501.4000708@pobox.com>; from jgarzik@pobox.com on Fri, Oct 08, 2004 at 03:05:37PM -0400 X-archive-position: 10065 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 1078 Lines: 45 On Fri, Oct 08, 2004 at 03:05:37PM -0400, Jeff Garzik wrote: > John W. Linville wrote: > > > static struct ethtool_ops vortex_ethtool_ops = { > > - .get_drvinfo = vortex_get_drvinfo, > > + .get_drvinfo = vortex_get_drvinfo, > > }; > > reverting good style. Hey, I'm not the one who put it in 2.6... :-) I can fix it, then submit a 2.6 patch as well? > > case SIOCSMIIREG: /* Write MII PHY register. */ > > - case SIOCDEVPRIVATE+2: /* for binary compat, remove in 2.5 */ > > breaks ABI in the middle of a stable series Good point... > > +static inline struct mii_ioctl_data *if_mii(struct ifreq *rq) > > +{ > > + return (struct mii_ioctl_data *) &rq->ifr_ifru; > > +} > > + > > + > > This should be in include/linux/mii.h like it is in 2.6.x. I think you missed this part: > > --- linux-2.4/include/linux/mii.h.orig > > +++ linux-2.4/include/linux/mii.h > > @@ -9,6 +9,7 @@ > > #define __LINUX_MII_H__ The patch must have been too long... :-) I'll cook-up another version, plus the tiny 2.6 patch as well... John -- John W. Linville linville@tuxdriver.com From akpm@osdl.org Fri Oct 8 12:35:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 12:35:47 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98JZf8Z026627 for ; Fri, 8 Oct 2004 12:35:42 -0700 Received: from bix (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i98JZMf20003; Fri, 8 Oct 2004 12:35:23 -0700 Date: Fri, 8 Oct 2004 12:33:38 -0700 From: Andrew Morton To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: tcp heisenbug Message-Id: <20041008123338.04cb2fa0.akpm@osdl.org> In-Reply-To: <20041008122548.544a3329.davem@davemloft.net> References: <20041008014151.26e17547.akpm@osdl.org> <20041008122548.544a3329.davem@davemloft.net> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10066 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 Content-Length: 1276 Lines: 37 "David S. Miller" wrote: > > On Fri, 8 Oct 2004 01:41:51 -0700 > Andrew Morton wrote: > > > fetchmail broke. It's fetching mail from localhost (ssh port-forwarded to > > remote servers) and then for some reason it wants to open an SMTP > > connection to localhost. It was failing, some error message about that > > SMTP connection. > > > > While I was poking at it, it started to work. `uptime' said 6 minutes. So > > I'd be suspecting that there's a jiffy wrap bug in TCP-to-localhost > > introduced since 2.6.9-rc3. > > That's possible. > > It could also be something that only happens the first time you try > to talk to a remote system. It doesn't seem like that. I'd already established three ssh sessions to three remote servers (zip, digeo, osdl) and fetchmail was able to contact those three servers via connection to the three local ssh clients. It was only when fetchmail tried to talk to sendmail on localhost that things failed. > You're using e1000 on x86 right? Yup. At 100 mbps > Maybe force TSO off via ethtool > right after the interface is brought up and see if that makes it > go away? The problem went away on subsequent reboots :( But the failure was when communicating with sendmail on localhost. From albie@alfarrabio.di.uminho.pt Fri Oct 8 12:42:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 12:42:19 -0700 (PDT) Received: from alfarrabio.di.uminho.pt (alfarrabio.di.uminho.pt [193.136.19.130]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i98JgApC027417 for ; Fri, 8 Oct 2004 12:42:10 -0700 Received: (qmail 1396 invoked by uid 0); 8 Oct 2004 19:41:51 -0000 Received: from unknown (HELO ?127.0.0.1?) (192.168.3.210) by 0 with SMTP; 8 Oct 2004 19:41:51 -0000 Message-ID: <4166ED7D.5040704@alfarrabio.di.uminho.pt> Date: Fri, 08 Oct 2004 20:41:49 +0100 From: Alberto Manuel Brandao Simoes User-Agent: Mozilla Thunderbird 0.7 (X11/20040615) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andrew Morton CC: netdev@oss.sgi.com Subject: Re: Fw: [Bugme-new] [Bug 3527] New: ssh does not work with 2.6.9rc3 References: <20041008104801.0dd96536.akpm@osdl.org> In-Reply-To: <20041008104801.0dd96536.akpm@osdl.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-archive-position: 10067 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: albie@alfarrabio.di.uminho.pt Precedence: bulk X-list: netdev Content-Length: 2110 Lines: 65 Andrew Morton wrote: > hrm. Could you check to see if it starts working OK after the machine has been > up for more than five minutes? 3 hours up, still same problem kind regards, Alberto > > Begin forwarded message: > > Date: Fri, 8 Oct 2004 09:26:51 -0700 > From: bugme-daemon@osdl.org > To: bugme-new@lists.osdl.org > Subject: [Bugme-new] [Bug 3527] New: ssh does not work with 2.6.9rc3 > > > http://bugme.osdl.org/show_bug.cgi?id=3527 > > Summary: ssh does not work with 2.6.9rc3 > Kernel Version: 2.6.9 RC 3 > Status: NEW > Severity: normal > Owner: other_other@kernel-bugs.osdl.org > Submitter: albie@alfarrabio.di.uminho.pt > > > Distribution: Slackware 10 > > Problem Description: > Had kernel 2.6.7 working correctly. It had a bug with my sis ethernet card. > Upgraded to 2.6.8.1, and had problems with sata (bug #3521). So, tried the 2.6.9 > RC 3. > > With this kernel, the sis ethernet bug is fixed (well, at least I can do a ping > -f without losing packets), SATA works but... wonder... ssh doesn't. > > If I have a public key on other machine without passphrase, it works. > If not.... > > ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory > Permission denied, please try again. > ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory > Permission denied, please try again. > ssh_askpass: exec(/usr/libexec/ssh-askpass): No such file or directory > Permission denied (publickey,password,keyboard-interactive). > > Now, that file really doesn't exist. But it isn't needed with the old kernel. > So, what 2.6.9 rc 3 has that 2.6.7 don't? > > Thanks, > Alberto > > ------- You are receiving this mail because: ------- > You are on the CC list for the bug, or are watching someone who is. -- Alberto Simões Much as I hate to say it, the Computer Science view of language design has gotten too inbred in recent years. The Computer Scientists should pay more attention to the Linguists, who have a much better handle on how people prefer to communicate. --Larry Wall From albie@alfarrabio.di.uminho.pt Fri Oct 8 12:50:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 12:50:08 -0700 (PDT) Received: from alfarrabio.di.uminho.pt (alfarrabio.di.uminho.pt [193.136.19.130]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i98Jnxu5028264 for ; Fri, 8 Oct 2004 12:49:59 -0700 Received: (qmail 1668 invoked by uid 0); 8 Oct 2004 19:49:30 -0000 Received: from unknown (HELO ?127.0.0.1?) (192.168.3.210) by 0 with SMTP; 8 Oct 2004 19:49:30 -0000 Message-ID: <4166EF49.9060803@alfarrabio.di.uminho.pt> Date: Fri, 08 Oct 2004 20:49:29 +0100 From: Alberto Manuel Brandao Simoes User-Agent: Mozilla Thunderbird 0.7 (X11/20040615) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Thomas Graf CC: Andrew Morton , netdev@oss.sgi.com Subject: Re: Fw: [Bugme-new] [Bug 3527] New: ssh does not work with 2.6.9rc3 References: <20041008104801.0dd96536.akpm@osdl.org> <20041008181036.GC19714@rei.reeler.org> In-Reply-To: <20041008181036.GC19714@rei.reeler.org> Content-Type: multipart/mixed; boundary="------------020504090601080807040101" X-archive-position: 10068 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: albie@alfarrabio.di.uminho.pt Precedence: bulk X-list: netdev Content-Length: 141281 Lines: 2796 This is a multi-part message in MIME format. --------------020504090601080807040101 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit OK, here they go. I hope I did the tcpdump correctly. Also, I have the idea something more is not working with this kernel. Just preparing a new boot to the old kernel to see if I am correct. See you soon, Alberto Thomas Graf wrote: >> With this kernel, the sis ethernet bug is fixed (well, at least I can do a ping >>-f without losing packets), SATA works but... wonder... ssh doesn't. >> >>If I have a public key on other machine without passphrase, it works. >>If not.... > > > Could you provide your .config and a dump of the network > traffic a few seconds before, during and after the ssh session? > (tcpdump -s -w ...) > > >>Now, that file really doesn't exist. But it isn't needed with the old kernel. >>So, what 2.6.9 rc 3 has that 2.6.7 don't? > > > I have the feeling that the bug is related to the calculation of > some networking related threshold resultung in wrong values right > after booting time. -- Alberto Simões Much as I hate to say it, the Computer Science view of language design has gotten too inbred in recent years. The Computer Scientists should pay more attention to the Linguists, who have a much better handle on how people prefer to communicate. --Larry Wall --------------020504090601080807040101 Content-Type: application/octet-stream; name="DATA" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="DATA" 1MOyoQIABAAAAAAAAAAAAEQAAAABAAAAvO9mQfLdBABEAAAAwgAAAAAKipd0gAARLzA3iggA RRAAtAv+QABABmH8wYgTg1KapJQAFoAg+HdvR9RtwjmAGApoHSYAAAEBCAoAzgT1AAvUdehC vO9mQYjsBABEAAAATgAAAAARLzA3igAKipd0gAgARYAAQAYnQAAuBr54Pv1zkMGIE4ME3oNg f5tqoV9+LaGwEOfoIOoAAAEBCAoAc2oYAM4DbwEBvO9mQfFMBQBCAAAAQgAAAAARLzA3igAK ipd0gAgARYAANAYoQAAuBr6DPv1zkMGIE4ME3oNgf5tqoV9+T5GAEOJAe5oAA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QgKAM4HswBzal5XML3vZkHMWgAARAAAAE4AAAAAES8wN4oACoqX dIAIAEWAAECrs0AAaAbX182q6/bBiBODfKsAFJKFHK3tg1O+sBBAsMzoAAABAQgKAAOMtwDO AbcBAb3vZkGq0QAAQgAAAEIAAAAAES8wN4oACoqXdIAIAEWAADQlbEAAKwbBmVLBQHLBiBOD DSAAFDYrdDuZOWslgBD44IPlAAABAQgKACHNqADOBye972ZBttEAAEQAAADqBQAAAAqKl3SA ABEvMDeKCABFCAXc2WlAAEAG82vBiBODUsFAcgAUDSCZOYdtNit0O4AQBbRChQAAAQEICgDO B9QAIc2oENu972ZBvmQBAEQAAABOAAAAABEvMDeKAAqKl3SACABFgABAq85AAGgG17zNquv2 wYgTg3yrABSShRyt7YNTvrAQQLDHjwAAAQEICgADjLgAzgG3AQG972ZB3mQBAEQAAACaBQAA AAqKl3SAABEvMDeKCABFCAWMqVBAAEAG/WbBiBODzarr9gAUfKvtg3kmkoUcrYAQBbQMHAAA AQEICgDOB/oAA4y4FVi972ZBic8BAEIAAABCAAAAABEvMDeKAAqKl3SACABFgAA0BjZAAC4G vnU+/XOQwYgTgwTeg2B/m2qhX36ewYAQ+OAS8AAAAQEICgBzamgAzgbvve9mQZfPAQBEAAAA 6gUAAAAKipd0gAARLzA3iggARQgF3G58QABABj7/wYgTgz79c5CDYATeX367CX+baqGAEAWo LPwAAAEBCAoAzggVAHNqaER+ve9mQdggAgBEAAAATgAAAAARLzA3igAKipd0gAgARYAAQCVt QAArBsGMUsFAcsGIE4MNIAAUNit0O5k5ayWwEPjgKMAAAAEBCAoAIc2wAM4HJwEBve9mQeUg AgBEAAAA6gUAAAAKipd0gAARLzA3iggARQgF3NlqQABABvNqwYgTg1LBQHIAFA0gmTmNFTYr dDuAEAW0mIkAAAEBCAoAzggqACHNsIFrve9mQVosAgBEAAAATgAAAAARLzA3igAKipd0gAgA RYAAQCVuQAArBsGLUsFAcsGIE4MNIAAUNit0O5k5ayWwEPjgIxcAAAEBCAoAI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oYAQBagZTAAAAQEICgDOCMcAc2p43M6972ZB ZYcEAEQAAADqBQAAAAqKl3SAABEvMDeKCABFCAXcbn9AAEAGPvzBiBODPv1zkINgBN5ffswB f5tqoYAQBahvsAAAAQEICgDOCMcAc2p4wzm972ZBjEoFAEQAAABOAAAAABEvMDeKAAqKl3SA CABFgABABjlAAC4GvmY+/XOQwYgTgwTeg2B/m2qhX361YbAQ+OCKpgAAAQEICgBzan4Azgez AQG972ZBmkoFAEQAAADqBQAAAAqKl3SAABEvMDeKCABFCAXcboBAAEAGPvvBiBODPv1zkINg BN5fftGpf5tqoYAQBagT8gAAAQEICgDOCPkAc2p+lm2972ZBwEoFAEQAAADqBQAAAAqKl3SA ABEvMDeKCABFCAXcboFAAEAGPvrBiBODPv1zkINgBN5fftdRf5tqoYAQBajK3AAAAQEICgDO CPkAc2p+07S972ZBkAwGAEQAAABOAAAAABEvMDeKAAqKl3SACABFgABAJXRAACsGwYVSwUBy wYgTgw0gABQ2K3Q7mTmHbbAQ8zjYbwAAAQEICgAhzcoAzggtAQG972ZBogwGAEQAAADqBQAA AAqKl3SAABEvMDeKCABFCAXc2W9AAEAG82XBiBODUsFAcgAUDSCZOYdtNit0O4AQBbRBDAAA AQEICgDOCSsAIc3KENu972ZBmQwGAEQAAABOAAAAABEvMDeKAAqKl3SACABFgABAJXNAACsG wYZSwUBywYgTgw0gABQ2K3Q7mTmHbbAQ8zjeFwAAAQEICgAhzcoAzggtAQG972ZB/YsGAEQA AABOAAAAABEvMDeKAAqKl3SACABFgABAL+xAAC4GlLM+/XOQwYgTgwTUcEFuhyKwToF1q7AQ +ODjxwAAAQEICgBzaocAzgcpAQG972ZBCowGAEQAAADqBQAAAAqKl3SAABEvMDeKCABFCAXc r5ZAAEAG/eTBiBODPv1zkHBBBNROgXWrbocisIAQBahf1AAAAQEICgDOCUsAc2qHwNG972ZB pZYHAEQAAABWAAAAABEvMDeKAAqKl3SACABFgABIL+1AAC4GlKo+/XOQwYgTgwTUcEFuhy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zkMGIE4ME1HBBbocisE6B qJOAEPjggI8AAAEBCAoAc2rkAM4MLb7vZkGqkQUARAAAAOoFAAAACoqXdIAAES8wN4oIAEUI BdyvnkAAQAb93MGIE4M+/XOQcEEE1E6Bs+NuhyKwgBAFqL98AAABAQgKAM4M8wBzauT/T77v ZkFcwQUAQgAAAEIAAAAAES8wN4oACoqXdIAIAEWAADQv9EAALgaUtz79c5DBiBODBNRwQW6H IrBOga47gBD44HrlAAABAQgKAHNq5gDODC2+72ZBZ8EFAEQAAADqBQAAAAqKl3SAABEvMDeK CABFCAXcr59AAEAG/dvBiBODPv1zkHBBBNROgbmLbocisIAQBajDIgAAAQEICgDODQAAc2rm oN++72ZBjcEFAEQAAADqBQAAAAqKl3SAABEvMDeKCABFCAXcr6BAAEAG/drBiBODPv1zkHBB BNROgb8zbocisIAYBajhGAAAAQEICgDODQAAc2rmjN++72ZBChEGAEQAAABEAAAAAQBeAAAN AAWb8HThCABFwAA2phoAAAFnXdDBiBMh4AAADSMAQPMBAMGIE/4AAQDSAQAAIO////4AAQAA AQAHIMGICeq+72ZBI3sGAEIAAABCAAAAABEvMDeKAAqKl3SACABFgAA0L/VAAC4GlLY+/XOQ wYgTgwTUcEFuhyKwToGz44AQ+OB1KAAAAQEICgBzausAzgw9vu9mQTB7BgBEAAAA6gUAAAAK ipd0gAARLzA3iggARQgF3K+hQABABv3ZwYgTgz79c5BwQQTUToHE226HIrCAEAWou84AAAEB CAoAzg0vAHNq63Yhvu9mQRa9BgBCAAAAQgAAAAARLzA3igAKipd0gAgARYAANAZEQAAuBr5n Pv1zkMGIE4ME3oNgf5tqoV9++UGAEPjgso4AAAEBCAoAc2rsAM4MTL7vZkEivQYARAAAAOoF AAAACoqXdIAAES8wN4oIAEUIBdxujEAAQAY+78GIE4M+/XOQg2AE3l9/Cjl/m2qhgBAFqM2u AAABAQgKAM4NQABzauy7pL7vZkHd7wYARAAAAE4AAAAAES8wN4oACoqXdIAIAEWAAEAlhUAA KwbBdFLBQH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oAziYCAAv1hw== --------------020504090601080807040101 Content-Type: text/plain; name="CONFIG" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="CONFIG" # # Automatically generated make config: don't edit # Linux kernel version: 2.6.9-rc3 # Fri Oct 8 16:41:43 2004 # CONFIG_X86=y CONFIG_MMU=y CONFIG_UID16=y CONFIG_GENERIC_ISA_DMA=y CONFIG_GENERIC_IOMAP=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y # # General setup # CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y CONFIG_AUDIT=y CONFIG_AUDITSYSCALL=y CONFIG_LOG_BUF_SHIFT=15 CONFIG_HOTPLUG=y CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_SHMEM=y # CONFIG_TINY_SHMEM is not set # # Loadable module support # CONFIG_MODULES=y # CONFIG_MODULE_UNLOAD is not set CONFIG_OBSOLETE_MODPARM=y # CONFIG_MODVERSIONS is not set CONFIG_KMOD=y # # Processor type and features # CONFIG_X86_PC=y # CONFIG_X86_ELAN is not set # CONFIG_X86_VOYAGER is not set # CONFIG_X86_NUMAQ is not set # CONFIG_X86_SUMMIT is not set # CONFIG_X86_BIGSMP is not set # CONFIG_X86_VISWS is not set # CONFIG_X86_GENERICARCH is not set # CONFIG_X86_ES7000 is not set # CONFIG_M386 is not set # CONFIG_M486 is not set # CONFIG_M586 is not set # CONFIG_M586TSC is not set # CONFIG_M586MMX is not set # CONFIG_M686 is not set # CONFIG_MPENTIUMII is not set # CONFIG_MPENTIUMIII is not set # CONFIG_MPENTIUMM is not set CONFIG_MPENTIUM4=y # CONFIG_MK6 is not set # CONFIG_MK7 is not set # CONFIG_MK8 is not set # CONFIG_MCRUSOE is not set # CONFIG_MWINCHIPC6 is not set # CONFIG_MWINCHIP2 is not set # CONFIG_MWINCHIP3D is not set # CONFIG_MCYRIXIII is not set # CONFIG_MVIAC3_2 is not set # CONFIG_X86_GENERIC is not set CONFIG_X86_CMPXCHG=y CONFIG_X86_XADD=y CONFIG_X86_L1_CACHE_SHIFT=7 CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_X86_WP_WORKS_OK=y CONFIG_X86_INVLPG=y CONFIG_X86_BSWAP=y CONFIG_X86_POPAD_OK=y CONFIG_X86_GOOD_APIC=y CONFIG_X86_INTEL_USERCOPY=y CONFIG_X86_USE_PPRO_CHECKSUM=y # CONFIG_HPET_TIMER is not set CONFIG_SMP=y CONFIG_NR_CPUS=8 CONFIG_SCHED_SMT=y CONFIG_PREEMPT=y CONFIG_X86_LOCAL_APIC=y CONFIG_X86_IO_APIC=y CONFIG_X86_TSC=y CONFIG_X86_MCE=y CONFIG_X86_MCE_NONFATAL=y CONFIG_X86_MCE_P4THERMAL=y # CONFIG_TOSHIBA is not set # CONFIG_I8K is not set # CONFIG_MICROCODE is not set # CONFIG_X86_MSR is not set # CONFIG_X86_CPUID is not set # # Firmware Drivers # # CONFIG_EDD is not set CONFIG_NOHIGHMEM=y # CONFIG_HIGHMEM4G is not set # CONFIG_HIGHMEM64G is not set # CONFIG_MATH_EMULATION is not set CONFIG_MTRR=y # CONFIG_EFI is not set CONFIG_IRQBALANCE=y CONFIG_HAVE_DEC_LOCK=y # CONFIG_REGPARM is not set # # Power management options (ACPI, APM) # CONFIG_PM=y # CONFIG_PM_DEBUG is not set CONFIG_SOFTWARE_SUSPEND=y CONFIG_PM_STD_PARTITION="" # # ACPI (Advanced Configuration and Power Interface) Support # CONFIG_ACPI=y CONFIG_ACPI_BOOT=y CONFIG_ACPI_INTERPRETER=y CONFIG_ACPI_SLEEP=y CONFIG_ACPI_SLEEP_PROC_FS=y CONFIG_ACPI_AC=y CONFIG_ACPI_BATTERY=y CONFIG_ACPI_BUTTON=y CONFIG_ACPI_FAN=y CONFIG_ACPI_PROCESSOR=y CONFIG_ACPI_THERMAL=y # CONFIG_ACPI_ASUS is not set # CONFIG_ACPI_TOSHIBA is not set # CONFIG_ACPI_DEBUG is not set CONFIG_ACPI_BUS=y CONFIG_ACPI_EC=y CONFIG_ACPI_POWER=y CONFIG_ACPI_PCI=y CONFIG_ACPI_SYSTEM=y # CONFIG_X86_PM_TIMER is not set # # APM (Advanced Power Management) BIOS Support # # CONFIG_APM is not set # # CPU Frequency scaling # # CONFIG_CPU_FREQ is not set # # Bus options (PCI, PCMCIA, EISA, MCA, ISA) # CONFIG_PCI=y # CONFIG_PCI_GOBIOS is not set # CONFIG_PCI_GOMMCONFIG is not set # CONFIG_PCI_GODIRECT is not set CONFIG_PCI_GOANY=y CONFIG_PCI_BIOS=y CONFIG_PCI_DIRECT=y CONFIG_PCI_MMCONFIG=y # CONFIG_PCI_MSI is not set CONFIG_PCI_LEGACY_PROC=y CONFIG_PCI_NAMES=y # CONFIG_ISA is not set # CONFIG_MCA is not set # CONFIG_SCx200 is not set # # PCMCIA/CardBus support # # CONFIG_PCMCIA is not set # # PCI Hotplug Support # # CONFIG_HOTPLUG_PCI is not set # # Executable file formats # CONFIG_BINFMT_ELF=y CONFIG_BINFMT_AOUT=y CONFIG_BINFMT_MISC=m # # Device Drivers # # # Generic Driver Options # CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=m # # Memory Technology Devices (MTD) # # CONFIG_MTD is not set # # Parallel port support # CONFIG_PARPORT=y CONFIG_PARPORT_PC=y CONFIG_PARPORT_PC_CML1=y # CONFIG_PARPORT_SERIAL is not set # CONFIG_PARPORT_PC_FIFO is not set # CONFIG_PARPORT_PC_SUPERIO is not set # CONFIG_PARPORT_OTHER is not set # CONFIG_PARPORT_1284 is not set # # Plug and Play support # # # Block devices # CONFIG_BLK_DEV_FD=y # CONFIG_PARIDE is not set # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set CONFIG_BLK_DEV_LOOP=m # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set # CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_UB is not set CONFIG_BLK_DEV_RAM=m CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_LBD=y # # ATA/ATAPI/MFM/RLL support # CONFIG_IDE=y CONFIG_BLK_DEV_IDE=y # # Please see Documentation/ide.txt for help/info on IDE drives # # CONFIG_BLK_DEV_IDE_SATA is not set # CONFIG_BLK_DEV_HD_IDE is not set CONFIG_BLK_DEV_IDEDISK=y CONFIG_IDEDISK_MULTI_MODE=y CONFIG_BLK_DEV_IDECD=y # CONFIG_BLK_DEV_IDETAPE is not set # CONFIG_BLK_DEV_IDEFLOPPY is not set # CONFIG_BLK_DEV_IDESCSI is not set # CONFIG_IDE_TASK_IOCTL is not set CONFIG_IDE_TASKFILE_IO=y # # IDE chipset support/bugfixes # CONFIG_IDE_GENERIC=y # CONFIG_BLK_DEV_CMD640 is not set CONFIG_BLK_DEV_IDEPCI=y CONFIG_IDEPCI_SHARE_IRQ=y # CONFIG_BLK_DEV_OFFBOARD is not set CONFIG_BLK_DEV_GENERIC=y # CONFIG_BLK_DEV_OPTI621 is not set CONFIG_BLK_DEV_RZ1000=y CONFIG_BLK_DEV_IDEDMA_PCI=y # CONFIG_BLK_DEV_IDEDMA_FORCED is not set CONFIG_IDEDMA_PCI_AUTO=y # CONFIG_IDEDMA_ONLYDISK is not set # CONFIG_BLK_DEV_AEC62XX is not set # CONFIG_BLK_DEV_ALI15X3 is not set # CONFIG_BLK_DEV_AMD74XX is not set # CONFIG_BLK_DEV_ATIIXP is not set # CONFIG_BLK_DEV_CMD64X is not set # CONFIG_BLK_DEV_TRIFLEX is not set # CONFIG_BLK_DEV_CY82C693 is not set # CONFIG_BLK_DEV_CS5520 is not set # CONFIG_BLK_DEV_CS5530 is not set # CONFIG_BLK_DEV_HPT34X is not set # CONFIG_BLK_DEV_HPT366 is not set # CONFIG_BLK_DEV_SC1200 is not set # CONFIG_BLK_DEV_PIIX is not set # CONFIG_BLK_DEV_NS87415 is not set # CONFIG_BLK_DEV_PDC202XX_OLD is not set # CONFIG_BLK_DEV_PDC202XX_NEW is not set # CONFIG_BLK_DEV_SVWKS is not set # CONFIG_BLK_DEV_SIIMAGE is not set CONFIG_BLK_DEV_SIS5513=m # CONFIG_BLK_DEV_SLC90E66 is not set # CONFIG_BLK_DEV_TRM290 is not set # CONFIG_BLK_DEV_VIA82CXXX is not set # CONFIG_IDE_ARM is not set CONFIG_BLK_DEV_IDEDMA=y # CONFIG_IDEDMA_IVB is not set CONFIG_IDEDMA_AUTO=y # CONFIG_BLK_DEV_HD is not set # # SCSI device support # CONFIG_SCSI=y CONFIG_SCSI_PROC_FS=y # # SCSI support type (disk, tape, CD-ROM) # CONFIG_BLK_DEV_SD=y # CONFIG_CHR_DEV_ST is not set # CONFIG_CHR_DEV_OSST is not set # CONFIG_BLK_DEV_SR is not set CONFIG_CHR_DEV_SG=y # # Some SCSI devices (e.g. CD jukebox) support multiple LUNs # # CONFIG_SCSI_MULTI_LUN is not set # CONFIG_SCSI_CONSTANTS is not set # CONFIG_SCSI_LOGGING is not set # # SCSI Transport Attributes # # CONFIG_SCSI_SPI_ATTRS is not set # CONFIG_SCSI_FC_ATTRS is not set # # SCSI low-level drivers # # CONFIG_BLK_DEV_3W_XXXX_RAID is not set # CONFIG_SCSI_3W_9XXX is not set # CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AACRAID is not set # CONFIG_SCSI_AIC7XXX is not set # CONFIG_SCSI_AIC7XXX_OLD is not set # CONFIG_SCSI_AIC79XX is not set # CONFIG_SCSI_DPT_I2O is not set # CONFIG_MEGARAID_NEWGEN is not set # CONFIG_MEGARAID_LEGACY is not set CONFIG_SCSI_SATA=y # CONFIG_SCSI_SATA_SVW is not set # CONFIG_SCSI_ATA_PIIX is not set # CONFIG_SCSI_SATA_NV is not set # CONFIG_SCSI_SATA_PROMISE is not set # CONFIG_SCSI_SATA_SX4 is not set # CONFIG_SCSI_SATA_SIL is not set CONFIG_SCSI_SATA_SIS=y # CONFIG_SCSI_SATA_VIA is not set # CONFIG_SCSI_SATA_VITESSE is not set # CONFIG_SCSI_BUSLOGIC is not set # CONFIG_SCSI_DMX3191D is not set # CONFIG_SCSI_EATA is not set # CONFIG_SCSI_EATA_PIO is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_IPS is not set # CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_PPA is not set # CONFIG_SCSI_IMM is not set # CONFIG_SCSI_SYM53C8XX_2 is not set # CONFIG_SCSI_IPR is not set # CONFIG_SCSI_QLOGIC_ISP is not set # CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_1280 is not set CONFIG_SCSI_QLA2XXX=y # CONFIG_SCSI_QLA21XX is not set # CONFIG_SCSI_QLA22XX is not set # CONFIG_SCSI_QLA2300 is not set # CONFIG_SCSI_QLA2322 is not set # CONFIG_SCSI_QLA6312 is not set # CONFIG_SCSI_QLA6322 is not set # CONFIG_SCSI_DC395x is not set # CONFIG_SCSI_DC390T is not set # CONFIG_SCSI_NSP32 is not set # CONFIG_SCSI_DEBUG is not set # # Multi-device support (RAID and LVM) # # CONFIG_MD is not set # # Fusion MPT device support # # CONFIG_FUSION is not set # # IEEE 1394 (FireWire) support # # CONFIG_IEEE1394 is not set # # I2O device support # # CONFIG_I2O is not set # # Networking support # CONFIG_NET=y # # Networking options # CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set # CONFIG_NETLINK_DEV is not set CONFIG_UNIX=y # CONFIG_NET_KEY is not set CONFIG_INET=y CONFIG_IP_MULTICAST=y # CONFIG_IP_ADVANCED_ROUTER is not set # CONFIG_IP_PNP is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set # CONFIG_IP_MROUTE is not set # CONFIG_ARPD is not set # CONFIG_SYN_COOKIES is not set # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set # CONFIG_INET_TUNNEL is not set # # IP: Virtual Server Configuration # # CONFIG_IP_VS is not set # CONFIG_IPV6 is not set CONFIG_NETFILTER=y # CONFIG_NETFILTER_DEBUG is not set # # IP: Netfilter Configuration # CONFIG_IP_NF_CONNTRACK=y # CONFIG_IP_NF_CT_ACCT is not set # CONFIG_IP_NF_CT_PROTO_SCTP is not set # CONFIG_IP_NF_FTP is not set # CONFIG_IP_NF_IRC is not set # CONFIG_IP_NF_TFTP is not set # CONFIG_IP_NF_AMANDA is not set CONFIG_IP_NF_QUEUE=y CONFIG_IP_NF_IPTABLES=y CONFIG_IP_NF_MATCH_LIMIT=y CONFIG_IP_NF_MATCH_IPRANGE=y CONFIG_IP_NF_MATCH_MAC=y CONFIG_IP_NF_MATCH_PKTTYPE=y CONFIG_IP_NF_MATCH_MARK=y CONFIG_IP_NF_MATCH_MULTIPORT=y CONFIG_IP_NF_MATCH_TOS=y CONFIG_IP_NF_MATCH_RECENT=y CONFIG_IP_NF_MATCH_ECN=y CONFIG_IP_NF_MATCH_DSCP=y CONFIG_IP_NF_MATCH_AH_ESP=y CONFIG_IP_NF_MATCH_LENGTH=y CONFIG_IP_NF_MATCH_TTL=y CONFIG_IP_NF_MATCH_TCPMSS=y CONFIG_IP_NF_MATCH_HELPER=y CONFIG_IP_NF_MATCH_STATE=y CONFIG_IP_NF_MATCH_CONNTRACK=y CONFIG_IP_NF_MATCH_OWNER=y # CONFIG_IP_NF_MATCH_ADDRTYPE is not set # CONFIG_IP_NF_MATCH_REALM is not set # CONFIG_IP_NF_MATCH_SCTP is not set # CONFIG_IP_NF_MATCH_COMMENT is not set CONFIG_IP_NF_FILTER=y CONFIG_IP_NF_TARGET_REJECT=y CONFIG_IP_NF_TARGET_LOG=y CONFIG_IP_NF_TARGET_ULOG=y CONFIG_IP_NF_TARGET_TCPMSS=y CONFIG_IP_NF_NAT=y CONFIG_IP_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=y CONFIG_IP_NF_TARGET_REDIRECT=y CONFIG_IP_NF_TARGET_NETMAP=y CONFIG_IP_NF_TARGET_SAME=y # CONFIG_IP_NF_NAT_LOCAL is not set # CONFIG_IP_NF_NAT_SNMP_BASIC is not set CONFIG_IP_NF_MANGLE=y CONFIG_IP_NF_TARGET_TOS=y CONFIG_IP_NF_TARGET_ECN=y CONFIG_IP_NF_TARGET_DSCP=y CONFIG_IP_NF_TARGET_MARK=y CONFIG_IP_NF_TARGET_CLASSIFY=y CONFIG_IP_NF_RAW=m CONFIG_IP_NF_TARGET_NOTRACK=m CONFIG_IP_NF_ARPTABLES=y CONFIG_IP_NF_ARPFILTER=y CONFIG_IP_NF_ARP_MANGLE=y # # SCTP Configuration (EXPERIMENTAL) # # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set # CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set # CONFIG_DECNET is not set # CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set # CONFIG_NET_DIVERT is not set # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set # CONFIG_NET_HW_FLOWCONTROL is not set # # QoS and/or fair queueing # # CONFIG_NET_SCHED is not set # CONFIG_NET_CLS_ROUTE is not set # # Network testing # # CONFIG_NET_PKTGEN is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set # CONFIG_HAMRADIO is not set # CONFIG_IRDA is not set # CONFIG_BT is not set CONFIG_NETDEVICES=y CONFIG_DUMMY=m # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set # # ARCnet devices # # CONFIG_ARCNET is not set # # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y CONFIG_MII=y # CONFIG_HAPPYMEAL is not set # CONFIG_SUNGEM is not set # CONFIG_NET_VENDOR_3COM is not set # # Tulip family network device support # # CONFIG_NET_TULIP is not set # CONFIG_HP100 is not set CONFIG_NET_PCI=y # CONFIG_PCNET32 is not set # CONFIG_AMD8111_ETH is not set # CONFIG_ADAPTEC_STARFIRE is not set # CONFIG_B44 is not set # CONFIG_FORCEDETH is not set # CONFIG_DGRS is not set # CONFIG_EEPRO100 is not set # CONFIG_E100 is not set # CONFIG_FEALNX is not set # CONFIG_NATSEMI is not set # CONFIG_NE2K_PCI is not set # CONFIG_8139CP is not set CONFIG_8139TOO=y CONFIG_8139TOO_PIO=y # CONFIG_8139TOO_TUNE_TWISTER is not set # CONFIG_8139TOO_8129 is not set # CONFIG_8139_OLD_RX_RESET is not set CONFIG_SIS900=y # CONFIG_EPIC100 is not set # CONFIG_SUNDANCE is not set # CONFIG_TLAN is not set # CONFIG_VIA_RHINE is not set # CONFIG_VIA_VELOCITY is not set # # Ethernet (1000 Mbit) # # CONFIG_ACENIC is not set # CONFIG_DL2K is not set # CONFIG_E1000 is not set # CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set # CONFIG_SK98LIN is not set # CONFIG_TIGON3 is not set # # Ethernet (10000 Mbit) # # CONFIG_IXGB is not set # CONFIG_S2IO is not set # # Token Ring devices # # CONFIG_TR is not set # # Wireless LAN (non-hamradio) # # CONFIG_NET_RADIO is not set # # Wan interfaces # # CONFIG_WAN is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set # CONFIG_PLIP is not set # CONFIG_PPP is not set # CONFIG_SLIP is not set # CONFIG_NET_FC is not set # CONFIG_SHAPER is not set # CONFIG_NETCONSOLE is not set # # ISDN subsystem # # CONFIG_ISDN is not set # # Telephony Support # # CONFIG_PHONE is not set # # Input device support # CONFIG_INPUT=y # # Userland interfaces # CONFIG_INPUT_MOUSEDEV=y CONFIG_INPUT_MOUSEDEV_PSAUX=y CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 # CONFIG_INPUT_JOYDEV is not set # CONFIG_INPUT_TSDEV is not set # CONFIG_INPUT_EVDEV is not set # CONFIG_INPUT_EVBUG is not set # # Input I/O drivers # # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y CONFIG_SERIO=y CONFIG_SERIO_I8042=y # CONFIG_SERIO_SERPORT is not set # CONFIG_SERIO_CT82C710 is not set # CONFIG_SERIO_PARKBD is not set # CONFIG_SERIO_PCIPS2 is not set # CONFIG_SERIO_RAW is not set # # Input Device Drivers # CONFIG_INPUT_KEYBOARD=y CONFIG_KEYBOARD_ATKBD=y # CONFIG_KEYBOARD_SUNKBD is not set # CONFIG_KEYBOARD_LKKBD is not set # CONFIG_KEYBOARD_XTKBD is not set # CONFIG_KEYBOARD_NEWTON is not set CONFIG_INPUT_MOUSE=y CONFIG_MOUSE_PS2=y # CONFIG_MOUSE_SERIAL is not set # CONFIG_MOUSE_VSXXXAA is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TOUCHSCREEN is not set # CONFIG_INPUT_MISC is not set # # Character devices # CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y # CONFIG_SERIAL_NONSTANDARD is not set # # Serial drivers # CONFIG_SERIAL_8250=y # CONFIG_SERIAL_8250_CONSOLE is not set # CONFIG_SERIAL_8250_ACPI is not set CONFIG_SERIAL_8250_NR_UARTS=4 # CONFIG_SERIAL_8250_EXTENDED is not set # # Non-8250 serial port support # CONFIG_SERIAL_CORE=y CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 CONFIG_PRINTER=y # CONFIG_LP_CONSOLE is not set # CONFIG_PPDEV is not set # CONFIG_TIPAR is not set # # IPMI # # CONFIG_IPMI_HANDLER is not set # # Watchdog Cards # # CONFIG_WATCHDOG is not set # CONFIG_HW_RANDOM is not set # CONFIG_NVRAM is not set # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set # CONFIG_R3964 is not set # CONFIG_APPLICOM is not set # CONFIG_SONYPI is not set # # Ftape, the floppy tape device driver # # CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_MWAVE is not set # CONFIG_RAW_DRIVER is not set # CONFIG_HPET is not set # CONFIG_HANGCHECK_TIMER is not set # # I2C support # # CONFIG_I2C is not set # # Dallas's 1-wire bus # # CONFIG_W1 is not set # # Misc devices # # CONFIG_IBM_ASM is not set # # Multimedia devices # # CONFIG_VIDEO_DEV is not set # # Digital Video Broadcasting Devices # # CONFIG_DVB is not set # # Graphics support # # CONFIG_FB is not set # CONFIG_VIDEO_SELECT is not set # # Console display driver support # CONFIG_VGA_CONSOLE=y CONFIG_DUMMY_CONSOLE=y # # Sound # CONFIG_SOUND=y # # Advanced Linux Sound Architecture # CONFIG_SND=y CONFIG_SND_TIMER=y CONFIG_SND_PCM=y CONFIG_SND_RAWMIDI=y CONFIG_SND_SEQUENCER=y # CONFIG_SND_SEQ_DUMMY is not set CONFIG_SND_OSSEMUL=y CONFIG_SND_MIXER_OSS=y CONFIG_SND_PCM_OSS=y CONFIG_SND_SEQUENCER_OSS=y # CONFIG_SND_VERBOSE_PRINTK is not set # CONFIG_SND_DEBUG is not set # # Generic devices # CONFIG_SND_MPU401_UART=y # CONFIG_SND_DUMMY is not set # CONFIG_SND_VIRMIDI is not set # CONFIG_SND_MTPAV is not set # CONFIG_SND_SERIAL_U16550 is not set # CONFIG_SND_MPU401 is not set # # PCI devices # CONFIG_SND_AC97_CODEC=y # CONFIG_SND_ALI5451 is not set # CONFIG_SND_ATIIXP is not set # CONFIG_SND_ATIIXP_MODEM is not set # CONFIG_SND_AU8810 is not set # CONFIG_SND_AU8820 is not set # CONFIG_SND_AU8830 is not set # CONFIG_SND_AZT3328 is not set # CONFIG_SND_BT87X is not set # CONFIG_SND_CS46XX is not set # CONFIG_SND_CS4281 is not set # CONFIG_SND_EMU10K1 is not set # CONFIG_SND_KORG1212 is not set # CONFIG_SND_MIXART is not set # CONFIG_SND_NM256 is not set # CONFIG_SND_RME32 is not set # CONFIG_SND_RME96 is not set # CONFIG_SND_RME9652 is not set # CONFIG_SND_HDSP is not set # CONFIG_SND_TRIDENT is not set # CONFIG_SND_YMFPCI is not set # CONFIG_SND_ALS4000 is not set # CONFIG_SND_CMIPCI is not set # CONFIG_SND_ENS1370 is not set # CONFIG_SND_ENS1371 is not set # CONFIG_SND_ES1938 is not set # CONFIG_SND_ES1968 is not set # CONFIG_SND_MAESTRO3 is not set # CONFIG_SND_FM801 is not set # CONFIG_SND_ICE1712 is not set # CONFIG_SND_ICE1724 is not set CONFIG_SND_INTEL8X0=y # CONFIG_SND_INTEL8X0M is not set # CONFIG_SND_SONICVIBES is not set # CONFIG_SND_VIA82XX is not set # CONFIG_SND_VX222 is not set # # ALSA USB devices # # CONFIG_SND_USB_AUDIO is not set # CONFIG_SND_USB_USX2Y is not set # # Open Sound System # # CONFIG_SOUND_PRIME is not set # # USB support # CONFIG_USB=y # CONFIG_USB_DEBUG is not set # # Miscellaneous USB options # CONFIG_USB_DEVICEFS=y # CONFIG_USB_BANDWIDTH is not set # CONFIG_USB_DYNAMIC_MINORS is not set # CONFIG_USB_SUSPEND is not set # CONFIG_USB_OTG is not set # # USB Host Controller Drivers # CONFIG_USB_EHCI_HCD=y # CONFIG_USB_EHCI_SPLIT_ISO is not set # CONFIG_USB_EHCI_ROOT_HUB_TT is not set # CONFIG_USB_OHCI_HCD is not set CONFIG_USB_UHCI_HCD=y # # USB Device Class drivers # # CONFIG_USB_AUDIO is not set # CONFIG_USB_BLUETOOTH_TTY is not set # CONFIG_USB_MIDI is not set # CONFIG_USB_ACM is not set CONFIG_USB_PRINTER=y CONFIG_USB_STORAGE=y # CONFIG_USB_STORAGE_DEBUG is not set # CONFIG_USB_STORAGE_RW_DETECT is not set # CONFIG_USB_STORAGE_DATAFAB is not set # CONFIG_USB_STORAGE_FREECOM is not set # CONFIG_USB_STORAGE_ISD200 is not set # CONFIG_USB_STORAGE_DPCM is not set # CONFIG_USB_STORAGE_HP8200e is not set # CONFIG_USB_STORAGE_SDDR09 is not set # CONFIG_USB_STORAGE_SDDR55 is not set # CONFIG_USB_STORAGE_JUMPSHOT is not set # # USB Human Interface Devices (HID) # CONFIG_USB_HID=y CONFIG_USB_HIDINPUT=y # CONFIG_HID_FF is not set # CONFIG_USB_HIDDEV is not set # CONFIG_USB_AIPTEK is not set # CONFIG_USB_WACOM is not set # CONFIG_USB_KBTAB is not set # CONFIG_USB_POWERMATE is not set # CONFIG_USB_MTOUCH is not set CONFIG_USB_EGALAX=m # CONFIG_USB_XPAD is not set # CONFIG_USB_ATI_REMOTE is not set # # USB Imaging devices # # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set # CONFIG_USB_HPUSBSCSI is not set # # USB Multimedia devices # # CONFIG_USB_DABUSB is not set # # Video4Linux support is needed for USB Multimedia device support # # # USB Network adaptors # # CONFIG_USB_CATC is not set # CONFIG_USB_KAWETH is not set # CONFIG_USB_PEGASUS is not set # CONFIG_USB_RTL8150 is not set # CONFIG_USB_USBNET is not set # # USB port drivers # # CONFIG_USB_USS720 is not set # # USB Serial Converter support # # CONFIG_USB_SERIAL is not set # # USB Miscellaneous drivers # # CONFIG_USB_EMI62 is not set # CONFIG_USB_EMI26 is not set # CONFIG_USB_TIGL is not set # CONFIG_USB_AUERSWALD is not set # CONFIG_USB_RIO500 is not set # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set # CONFIG_USB_LED is not set CONFIG_USB_CYTHERM=m CONFIG_USB_PHIDGETSERVO=m # CONFIG_USB_TEST is not set # # USB Gadget Support # # CONFIG_USB_GADGET is not set # # File systems # CONFIG_EXT2_FS=y # CONFIG_EXT2_FS_XATTR is not set CONFIG_EXT3_FS=y CONFIG_EXT3_FS_XATTR=y # CONFIG_EXT3_FS_POSIX_ACL is not set # CONFIG_EXT3_FS_SECURITY is not set CONFIG_JBD=y # CONFIG_JBD_DEBUG is not set CONFIG_FS_MBCACHE=y CONFIG_REISERFS_FS=m # CONFIG_REISERFS_CHECK is not set # CONFIG_REISERFS_PROC_INFO is not set # CONFIG_REISERFS_FS_XATTR is not set # CONFIG_JFS_FS is not set # CONFIG_XFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set # CONFIG_QUOTA is not set # CONFIG_AUTOFS_FS is not set CONFIG_AUTOFS4_FS=y # # CD-ROM/DVD Filesystems # CONFIG_ISO9660_FS=y CONFIG_JOLIET=y # CONFIG_ZISOFS is not set CONFIG_UDF_FS=y CONFIG_UDF_NLS=y # # DOS/FAT/NT Filesystems # CONFIG_FAT_FS=m CONFIG_MSDOS_FS=m CONFIG_VFAT_FS=m CONFIG_FAT_DEFAULT_CODEPAGE=437 CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" CONFIG_NTFS_FS=m # CONFIG_NTFS_DEBUG is not set CONFIG_NTFS_RW=y # # Pseudo filesystems # CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y # CONFIG_HUGETLBFS is not set # CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y # # Miscellaneous filesystems # # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set # CONFIG_HFSPLUS_FS is not set # CONFIG_BEFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_EFS_FS is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set # CONFIG_QNX4FS_FS is not set # CONFIG_SYSV_FS is not set # CONFIG_UFS_FS is not set # # Network File Systems # CONFIG_NFS_FS=m # CONFIG_NFS_V3 is not set # CONFIG_NFS_V4 is not set # CONFIG_NFS_DIRECTIO is not set CONFIG_NFSD=m # CONFIG_NFSD_V3 is not set # CONFIG_NFSD_TCP is not set CONFIG_LOCKD=m CONFIG_EXPORTFS=m CONFIG_SUNRPC=m # CONFIG_RPCSEC_GSS_KRB5 is not set # CONFIG_RPCSEC_GSS_SPKM3 is not set CONFIG_SMB_FS=m # CONFIG_SMB_NLS_DEFAULT is not set # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set # CONFIG_AFS_FS is not set # # Partition Types # # CONFIG_PARTITION_ADVANCED is not set CONFIG_MSDOS_PARTITION=y # # Native Language Support # CONFIG_NLS=y CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_CODEPAGE_437=y # CONFIG_NLS_CODEPAGE_737 is not set # CONFIG_NLS_CODEPAGE_775 is not set # CONFIG_NLS_CODEPAGE_850 is not set # CONFIG_NLS_CODEPAGE_852 is not set # CONFIG_NLS_CODEPAGE_855 is not set # CONFIG_NLS_CODEPAGE_857 is not set # CONFIG_NLS_CODEPAGE_860 is not set # CONFIG_NLS_CODEPAGE_861 is not set # CONFIG_NLS_CODEPAGE_862 is not set # CONFIG_NLS_CODEPAGE_863 is not set # CONFIG_NLS_CODEPAGE_864 is not set # CONFIG_NLS_CODEPAGE_865 is not set # CONFIG_NLS_CODEPAGE_866 is not set # CONFIG_NLS_CODEPAGE_869 is not set # CONFIG_NLS_CODEPAGE_936 is not set # CONFIG_NLS_CODEPAGE_950 is not set # CONFIG_NLS_CODEPAGE_932 is not set # CONFIG_NLS_CODEPAGE_949 is not set # CONFIG_NLS_CODEPAGE_874 is not set # CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set # CONFIG_NLS_ASCII is not set CONFIG_NLS_ISO8859_1=y # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set # CONFIG_NLS_ISO8859_4 is not set # CONFIG_NLS_ISO8859_5 is not set # CONFIG_NLS_ISO8859_6 is not set # CONFIG_NLS_ISO8859_7 is not set # CONFIG_NLS_ISO8859_9 is not set # CONFIG_NLS_ISO8859_13 is not set # CONFIG_NLS_ISO8859_14 is not set # CONFIG_NLS_ISO8859_15 is not set # CONFIG_NLS_KOI8_R is not set # CONFIG_NLS_KOI8_U is not set # CONFIG_NLS_UTF8 is not set # # Profiling support # CONFIG_PROFILING=y CONFIG_OPROFILE=y # # Kernel hacking # # CONFIG_DEBUG_KERNEL is not set # CONFIG_FRAME_POINTER is not set CONFIG_EARLY_PRINTK=y CONFIG_4KSTACKS=y CONFIG_X86_FIND_SMP_CONFIG=y CONFIG_X86_MPPARSE=y # # Security options # # CONFIG_SECURITY is not set # # Cryptographic options # # CONFIG_CRYPTO is not set # # Library routines # # CONFIG_CRC_CCITT is not set CONFIG_CRC32=y CONFIG_LIBCRC32C=m CONFIG_X86_SMP=y CONFIG_X86_HT=y CONFIG_X86_BIOS_REBOOT=y CONFIG_X86_TRAMPOLINE=y CONFIG_PC=y --------------020504090601080807040101-- From linville@ra.tuxdriver.com Fri Oct 8 12:59:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 12:59:25 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98JxFV5029291 for ; Fri, 8 Oct 2004 12:59:16 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i98IuaH20901; Fri, 8 Oct 2004 14:56:36 -0400 Date: Fri, 8 Oct 2004 14:56:36 -0400 From: "John W. Linville" To: Jeff Garzik Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, akpm@osdl.org, marcelo.tosatti@cyclades.com Subject: [patch 2.4.28-pre3] 3c59x: resync with 2.6 Message-ID: <20041008145636.I14378@tuxdriver.com> Mail-Followup-To: Jeff Garzik , linux-kernel@vger.kernel.org, netdev@oss.sgi.com, akpm@osdl.org, marcelo.tosatti@cyclades.com References: <20041008121307.C14378@tuxdriver.com> <4166E501.4000708@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: <4166E501.4000708@pobox.com>; from jgarzik@pobox.com on Fri, Oct 08, 2004 at 03:05:37PM -0400 X-archive-position: 10069 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 49397 Lines: 1352 Backport of current 3c59x driver (minus EISA/sysfs stuff) from 2.6 to 2.4. This should ease further maintenance in 2.4. Signed-off-by: John W. Linville --- Round #2 -- changes after comments from Jeff Garzik... I've been chasing some 3c59x driver problems on both 2.4.x and 2.6.x kernels. The 3c59x driver was pretty far out of sync between the two trees, so I thought it made sense to sync them back up. drivers/net/3c59x.c | 500 +++++++++++++++++++++++++++++++++++----------------- include/linux/mii.h | 7 2 files changed, 345 insertions(+), 162 deletions(-) --- linux-2.4/drivers/net/3c59x.c.orig +++ linux-2.4/drivers/net/3c59x.c @@ -166,12 +166,19 @@ - Rename wait_for_completion() to issue_and_wait() to avoid completion.h clash. - LK1.1.18ac 01Jul02 akpm - - Fix for undocumented transceiver power-up bit on some 3c566B's - (Donald Becker, Rahul Karnik) - + LK1.1.17 18Dec01 akpm + - PCI ID 9805 is a Python-T, not a dual-port Cyclone. Apparently. + And it has NWAY. + - Mask our advertised modes (vp->advertising) with our capabilities + (MII reg5) when deciding which duplex mode to use. + - Add `global_options' as default for options[]. Ditto global_enable_wol, + global_full_duplex. + + LK1.1.18 01Jul02 akpm + - Fix for undocumented transceiver power-up bit on some 3c566B's + (Donald Becker, Rahul Karnik) - - See http://www.uow.edu.au/~andrewm/linux/#3c59x-2.3 for more details. + - See http://www.zip.com.au/~akpm/linux/#3c59x-2.3 for more details. - Also see Documentation/networking/vortex.txt */ @@ -186,7 +193,7 @@ #define DRV_NAME "3c59x" -#define DRV_VERSION "LK1.1.18-ac" +#define DRV_VERSION "LK1.1.18" #define DRV_RELDATE "1 July 2002" @@ -201,11 +208,11 @@ /* Set the copy breakpoint for the copy-only-tiny-frames scheme. Setting to > 1512 effectively disables this feature. */ #ifndef __arm__ -static const int rx_copybreak = 200; +static int rx_copybreak = 200; #else /* ARM systems perform better by disregarding the bus-master transfer capability of these cards. -- rmk */ -static const int rx_copybreak = 1513; +static int rx_copybreak = 1513; #endif /* Allow setting MTU to a larger size, bypassing the normal ethernet setup. */ static const int mtu = 1500; @@ -228,16 +235,9 @@ static int vortex_debug = VORTEX_DEBUG; static int vortex_debug = 1; #endif -#ifndef __OPTIMIZE__ -#error You must compile this file with the correct options! -#error See the last lines of the source file. -#error You must compile this driver with "-O". -#endif - #include #include #include -#include #include #include #include @@ -246,6 +246,7 @@ static int vortex_debug = 1; #include #include #include +#include #include #include #include @@ -275,10 +276,13 @@ MODULE_DESCRIPTION("3Com 3c59x/3c9xx eth MODULE_LICENSE("GPL"); MODULE_PARM(debug, "i"); +MODULE_PARM(global_options, "i"); MODULE_PARM(options, "1-" __MODULE_STRING(8) "i"); +MODULE_PARM(global_full_duplex, "i"); MODULE_PARM(full_duplex, "1-" __MODULE_STRING(8) "i"); MODULE_PARM(hw_checksums, "1-" __MODULE_STRING(8) "i"); MODULE_PARM(flow_ctrl, "1-" __MODULE_STRING(8) "i"); +MODULE_PARM(global_enable_wol, "i"); MODULE_PARM(enable_wol, "1-" __MODULE_STRING(8) "i"); MODULE_PARM(rx_copybreak, "i"); MODULE_PARM(max_interrupt_work, "i"); @@ -288,10 +292,13 @@ MODULE_PARM(compaq_device_id, "i"); MODULE_PARM(watchdog, "i"); MODULE_PARM_DESC(debug, "3c59x debug level (0-6)"); MODULE_PARM_DESC(options, "3c59x: Bits 0-3: media type, bit 4: bus mastering, bit 9: full duplex"); +MODULE_PARM_DESC(global_options, "3c59x: same as options, but applies to all NICs if options is unset"); MODULE_PARM_DESC(full_duplex, "3c59x full duplex setting(s) (1)"); +MODULE_PARM_DESC(global_full_duplex, "3c59x: same as full_duplex, but applies to all NICs if options is unset"); MODULE_PARM_DESC(hw_checksums, "3c59x Hardware checksum checking by adapter(s) (0-1)"); MODULE_PARM_DESC(flow_ctrl, "3c59x 802.3x flow control usage (PAUSE only) (0-1)"); MODULE_PARM_DESC(enable_wol, "3c59x: Turn on Wake-on-LAN for adapter(s) (0-1)"); +MODULE_PARM_DESC(global_enable_wol, "3c59x: same as enable_wol, but applies to all NICs if options is unset"); MODULE_PARM_DESC(rx_copybreak, "3c59x copy breakpoint for copy-only-tiny-frames"); MODULE_PARM_DESC(max_interrupt_work, "3c59x maximum events handled per interrupt"); MODULE_PARM_DESC(compaq_ioaddr, "3c59x PCI I/O base address (Compaq BIOS problem workaround)"); @@ -405,7 +412,8 @@ enum { IS_VORTEX=1, IS_BOOMERANG=2, IS_C EEPROM_8BIT=0x10, /* AKPM: Uses 0x230 as the base bitmaps for EEPROM reads */ HAS_PWR_CTRL=0x20, HAS_MII=0x40, HAS_NWAY=0x80, HAS_CB_FNS=0x100, INVERT_MII_PWR=0x200, INVERT_LED_PWR=0x400, MAX_COLLISION_RESET=0x800, - EEPROM_OFFSET=0x1000, HAS_HWCKSM=0x2000, WNO_XCVR_PWR=0x4000 }; + EEPROM_OFFSET=0x1000, HAS_HWCKSM=0x2000, WNO_XCVR_PWR=0x4000, + EXTRA_PREAMBLE=0x8000, }; enum vortex_chips { CH_3C590 = 0, @@ -429,6 +437,7 @@ enum vortex_chips { CH_3C905B_2, CH_3C905B_FX, CH_3C905C, + CH_3C9202, CH_3C980, CH_3C9805, @@ -484,7 +493,7 @@ static struct vortex_chip_info { {"3c900 Boomerang 10Mbps Combo", PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG, 64, }, {"3c900 Cyclone 10Mbps TPO", /* AKPM: from Don's 0.99M */ - PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, {"3c900 Cyclone 10Mbps Combo", PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, @@ -497,19 +506,21 @@ static struct vortex_chip_info { {"3c905 Boomerang 100baseT4", PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII, 64, }, {"3c905B Cyclone 100baseTx", - PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, {"3c905B Cyclone 10/100/BNC", PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, {"3c905B-FX Cyclone 100baseFx", PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, {"3c905C Tornado", - PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, + {"3c920B-EMB-WNM (ATI Radeon 9100 IGP)", + PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_MII|HAS_HWCKSM, 128, }, {"3c980 Cyclone", PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, + {"3c980C Python-T", PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, - {"3cSOHO100-TX Hurricane", PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, {"3c555 Laptop Hurricane", @@ -520,9 +531,9 @@ static struct vortex_chip_info { {"3c556B Laptop Hurricane", PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|EEPROM_OFFSET|HAS_CB_FNS|INVERT_MII_PWR| WNO_XCVR_PWR|HAS_HWCKSM, 128, }, + {"3c575 [Megahertz] 10/100 LAN CardBus", PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_8BIT, 128, }, - {"3c575 Boomerang CardBus", PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_8BIT, 128, }, {"3CCFE575BT Cyclone CardBus", @@ -534,10 +545,10 @@ static struct vortex_chip_info { {"3CCFE656 Cyclone CardBus", PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR| INVERT_LED_PWR|HAS_HWCKSM, 128, }, + {"3CCFEM656B Cyclone+Winmodem CardBus", PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR| INVERT_LED_PWR|HAS_HWCKSM, 128, }, - {"3CXFEM656C Tornado+Winmodem CardBus", /* From pcmcia-cs-3.1.5 */ PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_CB_FNS|EEPROM_8BIT|INVERT_MII_PWR| MAX_COLLISION_RESET|HAS_HWCKSM, 128, }, @@ -547,19 +558,19 @@ static struct vortex_chip_info { PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, }, {"3c982 Hydra Dual Port A", PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_HWCKSM|HAS_NWAY, 128, }, + {"3c982 Hydra Dual Port B", PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_HWCKSM|HAS_NWAY, 128, }, - {"3c905B-T4", - PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, {"3c920B-EMB-WNM Tornado", PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, }, - {0,}, /* 0 terminated list. */ + {NULL,}, /* NULL terminated list. */ }; -static struct pci_device_id vortex_pci_tbl[] __devinitdata = { +static struct pci_device_id vortex_pci_tbl[] = { { 0x10B7, 0x5900, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C590 }, { 0x10B7, 0x5920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C592 }, { 0x10B7, 0x5970, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C597 }, @@ -581,6 +592,7 @@ static struct pci_device_id vortex_pci_t { 0x10B7, 0x9058, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C905B_2 }, { 0x10B7, 0x905A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C905B_FX }, { 0x10B7, 0x9200, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C905C }, + { 0x10B7, 0x9202, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C9202 }, { 0x10B7, 0x9800, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C980 }, { 0x10B7, 0x9805, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C9805 }, @@ -681,7 +693,7 @@ enum Window2 { /* Window 2. */ Wn2_ResetOptions=12, }; enum Window3 { /* Window 3: MAC/config bits. */ - Wn3_Config=0, Wn3_MAC_Ctrl=6, Wn3_Options=8, + Wn3_Config=0, Wn3_MaxPktSize=4, Wn3_MAC_Ctrl=6, Wn3_Options=8, }; #define BFEXT(value, offset, bitcount) \ @@ -709,7 +721,8 @@ enum Win4_Media_bits { Media_LnkBeat = 0x0800, }; enum Window7 { /* Window 7: Bus Master control. */ - Wn7_MasterAddr = 0, Wn7_MasterLen = 6, Wn7_MasterStatus = 12, + Wn7_MasterAddr = 0, Wn7_VlanEtherType=4, Wn7_MasterLen = 6, + Wn7_MasterStatus = 12, }; /* Boomerang bus master control registers. */ enum MasterCtrl { @@ -806,7 +819,8 @@ struct vortex_private { pm_state_valid:1, /* power_state[] has sane contents */ open:1, medialock:1, - must_free_region:1; /* Flag: if zero, Cardbus owns the I/O region */ + must_free_region:1, /* Flag: if zero, Cardbus owns the I/O region */ + large_frames:1; /* accept large frames */ int drv_flags; u16 status_enable; u16 intr_enable; @@ -822,6 +836,12 @@ struct vortex_private { u32 power_state[16]; }; +#ifdef CONFIG_PCI +#define VORTEX_PCI(dev) ((dev)->pdev) +#else +#define VORTEX_PCI(dev) NULL +#endif + /* The action to take with a media selection timer tick. Note that we deviate from the 3Com order by checking 10base2 before AUI. */ @@ -853,7 +873,7 @@ static struct media_table { static int vortex_probe1(struct pci_dev *pdev, long ioaddr, int irq, int chip_idx, int card_idx); static void vortex_up(struct net_device *dev); -static void vortex_down(struct net_device *dev); +static void vortex_down(struct net_device *dev, int final); static int vortex_open(struct net_device *dev); static void mdio_sync(long ioaddr, int bits); static int mdio_read(struct net_device *dev, int phy_id, int location); @@ -864,17 +884,21 @@ static int vortex_start_xmit(struct sk_b static int boomerang_start_xmit(struct sk_buff *skb, struct net_device *dev); static int vortex_rx(struct net_device *dev); static int boomerang_rx(struct net_device *dev); -static void vortex_interrupt(int irq, void *dev_id, struct pt_regs *regs); -static void boomerang_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t vortex_interrupt(int irq, void *dev_id, struct pt_regs *regs); +static irqreturn_t boomerang_interrupt(int irq, void *dev_id, struct pt_regs *regs); static int vortex_close(struct net_device *dev); static void dump_tx_ring(struct net_device *dev); static void update_stats(long ioaddr, struct net_device *dev); static struct net_device_stats *vortex_get_stats(struct net_device *dev); static void set_rx_mode(struct net_device *dev); +#ifdef CONFIG_PCI static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); +#endif static void vortex_tx_timeout(struct net_device *dev); static void acpi_set_WOL(struct net_device *dev); static struct ethtool_ops vortex_ethtool_ops; +static void set_8021q_mode(struct net_device *dev, int enable); + /* This driver uses 'options' to pass the media type, full-duplex flag, etc. */ /* Option count limit only -- unlimited interfaces are supported. */ @@ -884,6 +908,9 @@ static int full_duplex[MAX_UNITS] = {-1, static int hw_checksums[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1}; static int flow_ctrl[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1}; static int enable_wol[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1}; +static int global_options = -1; +static int global_full_duplex = -1; +static int global_enable_wol = -1; /* #define dev_alloc_skb dev_alloc_skb_debug */ @@ -895,6 +922,18 @@ static int compaq_ioaddr, compaq_irq, co static int vortex_cards_found; +#ifdef CONFIG_NET_POLL_CONTROLLER +static void poll_vortex(struct net_device *dev) +{ + struct vortex_private *vp = (struct vortex_private *)dev->priv; + unsigned long flags; + local_save_flags(flags); + local_irq_disable(); + (vp->full_bus_master_rx ? boomerang_interrupt:vortex_interrupt)(dev->irq,dev,NULL); + local_irq_restore(flags); +} +#endif + #ifdef CONFIG_PM static int vortex_suspend (struct pci_dev *pdev, u32 state) @@ -904,7 +943,7 @@ static int vortex_suspend (struct pci_de if (dev && dev->priv) { if (netif_running(dev)) { netif_device_detach(dev); - vortex_down(dev); + vortex_down(dev, 1); } } return 0; @@ -1006,9 +1045,9 @@ static int __devinit vortex_probe1(struc int i, step; struct net_device *dev; static int printed_version; - int retval; + int retval, print_info; struct vortex_chip_info * const vci = &vortex_info_tbl[chip_idx]; - char *print_name; + char *print_name = "3c59x"; if (!printed_version) { printk (version); @@ -1024,7 +1063,10 @@ static int __devinit vortex_probe1(struc goto out; } SET_MODULE_OWNER(dev); - vp = dev->priv; + SET_NETDEV_DEV(dev, gendev); + vp = netdev_priv(dev); + + option = global_options; /* The lower four bits are the media type. */ if (dev->mem_start) { @@ -1034,10 +1076,10 @@ static int __devinit vortex_probe1(struc */ option = dev->mem_start; } - else if (card_idx < MAX_UNITS) - option = options[card_idx]; - else - option = -1; + else if (card_idx < MAX_UNITS) { + if (options[card_idx] >= 0) + option = options[card_idx]; + } if (option > 0) { if (option & 0x8000) @@ -1048,7 +1090,10 @@ static int __devinit vortex_probe1(struc vp->enable_wol = 1; } - printk (KERN_INFO "See Documentation/networking/vortex.txt\n"); + print_info = (vortex_debug > 1); + if (print_info) + printk (KERN_INFO "See Documentation/networking/vortex.txt\n"); + printk(KERN_INFO "%s: 3Com %s %s at 0x%lx. Vers " DRV_VERSION "\n", print_name, pdev ? "PCI" : "EISA", @@ -1058,6 +1103,7 @@ static int __devinit vortex_probe1(struc dev->base_addr = ioaddr; dev->irq = irq; dev->mtu = mtu; + vp->large_frames = mtu > 1500; vp->drv_flags = vci->drv_flags; vp->has_nway = (vci->drv_flags & HAS_NWAY) ? 1 : 0; vp->io_size = vci->io_size; @@ -1127,6 +1173,11 @@ static int __devinit vortex_probe1(struc vp->bus_master = (option & 16) ? 1 : 0; } + if (global_full_duplex > 0) + vp->full_duplex = 1; + if (global_enable_wol > 0) + vp->enable_wol = 1; + if (card_idx < MAX_UNITS) { if (full_duplex[card_idx] > 0) vp->full_duplex = 1; @@ -1174,16 +1225,20 @@ static int __devinit vortex_probe1(struc printk(" ***INVALID CHECKSUM %4.4x*** ", checksum); for (i = 0; i < 3; i++) ((u16 *)dev->dev_addr)[i] = htons(eeprom[i + 10]); - for (i = 0; i < 6; i++) - printk("%c%2.2x", i ? ':' : ' ', dev->dev_addr[i]); + if (print_info) { + for (i = 0; i < 6; i++) + printk("%c%2.2x", i ? ':' : ' ', dev->dev_addr[i]); + } EL3WINDOW(2); for (i = 0; i < 6; i++) outb(dev->dev_addr[i], ioaddr + i); #ifdef __sparc__ - printk(", IRQ %s\n", __irq_itoa(dev->irq)); + if (print_info) + printk(", IRQ %s\n", __irq_itoa(dev->irq)); #else - printk(", IRQ %d\n", dev->irq); + if (print_info) + printk(", IRQ %d\n", dev->irq); /* Tell them about an invalid IRQ. */ if (dev->irq <= 0 || dev->irq >= NR_IRQS) printk(KERN_WARNING " *** Warning: IRQ %d is unlikely to work! ***\n", @@ -1192,9 +1247,12 @@ static int __devinit vortex_probe1(struc EL3WINDOW(4); step = (inb(ioaddr + Wn4_NetDiag) & 0x1e) >> 1; - printk(KERN_INFO " product code %02x%02x rev %02x.%d date %02d-" - "%02d-%02d\n", eeprom[6]&0xff, eeprom[6]>>8, eeprom[0x14], - step, (eeprom[4]>>5) & 15, eeprom[4] & 31, eeprom[4]>>9); + if (print_info) { + printk(KERN_INFO " product code %02x%02x rev %02x.%d date %02d-" + "%02d-%02d\n", eeprom[6]&0xff, eeprom[6]>>8, eeprom[0x14], + step, (eeprom[4]>>5) & 15, eeprom[4] & 31, eeprom[4]>>9); + } + if (pdev && vci->drv_flags & HAS_CB_FNS) { unsigned long fn_st_addr; /* Cardbus function status space */ @@ -1207,8 +1265,10 @@ static int __devinit vortex_probe1(struc if (!vp->cb_fn_base) goto free_ring; } - printk(KERN_INFO "%s: CardBus functions mapped %8.8lx->%p\n", - print_name, fn_st_addr, vp->cb_fn_base); + if (print_info) { + printk(KERN_INFO "%s: CardBus functions mapped %8.8lx->%p\n", + print_name, fn_st_addr, vp->cb_fn_base); + } EL3WINDOW(2); n = inw(ioaddr + Wn2_ResetOptions) & ~0x4010; @@ -1230,7 +1290,8 @@ static int __devinit vortex_probe1(struc if (vp->info1 & 0x8000) { vp->full_duplex = 1; - printk(KERN_INFO "Full duplex capable\n"); + if (print_info) + printk(KERN_INFO "Full duplex capable\n"); } { @@ -1241,16 +1302,17 @@ static int __devinit vortex_probe1(struc if ((vp->available_media & 0xff) == 0) /* Broken 3c916 */ vp->available_media = 0x40; config = inl(ioaddr + Wn3_Config); - printk(KERN_DEBUG " Internal config register is %4.4x, " - "transceivers %#x.\n", config, - inw(ioaddr + Wn3_Options)); - printk(KERN_INFO " %dK %s-wide RAM %s Rx:Tx split, %s%s interface.\n", - 8 << RAM_SIZE(config), - RAM_WIDTH(config) ? "word" : "byte", - ram_split[RAM_SPLIT(config)], - AUTOSELECT(config) ? "autoselect/" : "", - XCVR(config) > XCVR_ExtMII ? "" : - media_tbl[XCVR(config)].name); + if (print_info) { + printk(KERN_DEBUG " Internal config register is %4.4x, " + "transceivers %#x.\n", config, inw(ioaddr + Wn3_Options)); + printk(KERN_INFO " %dK %s-wide RAM %s Rx:Tx split, %s%s interface.\n", + 8 << RAM_SIZE(config), + RAM_WIDTH(config) ? "word" : "byte", + ram_split[RAM_SPLIT(config)], + AUTOSELECT(config) ? "autoselect/" : "", + XCVR(config) > XCVR_ExtMII ? "" : + media_tbl[XCVR(config)].name); + } vp->default_media = XCVR(config); if (vp->default_media == XCVR_NWAY) vp->has_nway = 1; @@ -1265,11 +1327,14 @@ static int __devinit vortex_probe1(struc } else dev->if_port = vp->default_media; - if (dev->if_port == XCVR_MII || dev->if_port == XCVR_NWAY) { + if ((vp->available_media & 0x40) || (vci->drv_flags & HAS_NWAY) || + dev->if_port == XCVR_MII || dev->if_port == XCVR_NWAY) { int phy, phy_idx = 0; EL3WINDOW(4); mii_preamble_required++; - mii_preamble_required++; + if (vp->drv_flags & EXTRA_PREAMBLE) + mii_preamble_required++; + mdio_sync(ioaddr, 32); mdio_read(dev, 24, 1); for (phy = 0; phy < 32 && phy_idx < 1; phy++) { int mii_status, phyx; @@ -1287,9 +1352,10 @@ static int __devinit vortex_probe1(struc mii_status = mdio_read(dev, phyx, 1); if (mii_status && mii_status != 0xffff) { vp->phys[phy_idx++] = phyx; - printk(KERN_INFO " MII transceiver found at " - "address %d, status %4x.\n", - phyx, mii_status); + if (print_info) { + printk(KERN_INFO " MII transceiver found at address %d," + " status %4x.\n", phyx, mii_status); + } if ((mii_status & 0x0040) == 0) mii_preamble_required++; } @@ -1310,9 +1376,10 @@ static int __devinit vortex_probe1(struc if (vp->capabilities & CapBusMaster) { vp->full_bus_master_tx = 1; - printk(KERN_INFO " Enabling bus-master transmits and %s " - "receives.\n", + if (print_info) { + printk(KERN_INFO " Enabling bus-master transmits and %s receives.\n", (vp->info2 & 1) ? "early" : "whole-frame" ); + } vp->full_bus_master_rx = (vp->info2 & 1) ? 1 : 2; vp->bus_master = 0; /* AKPM: vortex only */ } @@ -1331,21 +1398,28 @@ static int __devinit vortex_probe1(struc dev->hard_start_xmit = vortex_start_xmit; } - printk(KERN_INFO "%s: scatter/gather %sabled. h/w checksums %sabled\n", - print_name, - (dev->features & NETIF_F_SG) ? "en":"dis", - (dev->features & NETIF_F_IP_CSUM) ? "en":"dis"); + if (print_info) { + printk(KERN_INFO "%s: scatter/gather %sabled. h/w checksums %sabled\n", + print_name, + (dev->features & NETIF_F_SG) ? "en":"dis", + (dev->features & NETIF_F_IP_CSUM) ? "en":"dis"); + } dev->stop = vortex_close; dev->get_stats = vortex_get_stats; +#ifdef CONFIG_PCI dev->do_ioctl = vortex_ioctl; +#endif dev->ethtool_ops = &vortex_ethtool_ops; dev->set_multicast_list = set_rx_mode; dev->tx_timeout = vortex_tx_timeout; dev->watchdog_timeo = (watchdog * HZ) / 1000; +#ifdef CONFIG_NET_POLL_CONTROLLER + dev->poll_controller = poll_vortex; +#endif if (pdev && vp->enable_wol) { vp->pm_state_valid = 1; - pci_save_state(vp->pdev, vp->power_state); + pci_save_state(VORTEX_PCI(vp), vp->power_state); acpi_set_WOL(dev); } retval = register_netdev(dev); @@ -1361,7 +1435,7 @@ free_ring: free_region: if (vp->must_free_region) release_region(ioaddr, vci->io_size); - kfree (dev); + free_netdev(dev); printk(KERN_ERR PFX "vortex_probe1 fails. Returns %d\n", retval); out: return retval; @@ -1396,13 +1470,13 @@ static void vortex_up(struct net_device *dev) { long ioaddr = dev->base_addr; - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); unsigned int config; int i; - if (vp->pdev && vp->enable_wol) { - pci_set_power_state(vp->pdev, 0); /* Go active */ - pci_restore_state(vp->pdev, vp->power_state); + if (VORTEX_PCI(vp) && vp->enable_wol) { + pci_set_power_state(VORTEX_PCI(vp), 0); /* Go active */ + pci_restore_state(VORTEX_PCI(vp), vp->power_state); } /* Before initializing select the active media port. */ @@ -1465,9 +1539,10 @@ vortex_up(struct net_device *dev) if (mii_reg5 == 0xffff || mii_reg5 == 0x0000) { netif_carrier_off(dev); /* No MII device or no link partner report */ } else { + mii_reg5 &= vp->advertising; if ((mii_reg5 & 0x0100) != 0 /* 100baseTx-FD */ || (mii_reg5 & 0x00C0) == 0x0040) /* 10T-FD, but not 100-HD */ - vp->full_duplex = 1; + vp->full_duplex = 1; netif_carrier_on(dev); } vp->partner_flow_ctrl = ((mii_reg5 & 0x0400) != 0); @@ -1482,7 +1557,7 @@ vortex_up(struct net_device *dev) /* Set the full-duplex bit. */ outw( ((vp->info1 & 0x8000) || vp->full_duplex ? 0x20 : 0) | - (dev->mtu > 1500 ? 0x40 : 0) | + (vp->large_frames ? 0x40 : 0) | ((vp->full_duplex && vp->flow_ctrl && vp->partner_flow_ctrl) ? 0x100 : 0), ioaddr + Wn3_MAC_Ctrl); @@ -1561,11 +1636,13 @@ vortex_up(struct net_device *dev) for (i = 0; i < RX_RING_SIZE; i++) /* AKPM: this is done in vortex_open, too */ vp->rx_ring[i].status = 0; for (i = 0; i < TX_RING_SIZE; i++) - vp->tx_skbuff[i] = 0; + vp->tx_skbuff[i] = NULL; outl(0, ioaddr + DownListPtr); } /* Set receiver mode: presumably accept b-case and phys addr only. */ set_rx_mode(dev); + /* enable 802.1q tagged frames */ + set_8021q_mode(dev, 1); outw(StatsEnable, ioaddr + EL3_CMD); /* Turn on statistics. */ // issue_and_wait(dev, SetTxStart|0x07ff); @@ -1593,7 +1670,7 @@ vortex_up(struct net_device *dev) static int vortex_open(struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); int i; int retval; @@ -1618,7 +1695,7 @@ vortex_open(struct net_device *dev) break; /* Bad news! */ skb->dev = dev; /* Mark as being used by this device. */ skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ - vp->rx_ring[i].addr = cpu_to_le32(pci_map_single(vp->pdev, skb->tail, PKT_BUF_SZ, PCI_DMA_FROMDEVICE)); + vp->rx_ring[i].addr = cpu_to_le32(pci_map_single(VORTEX_PCI(vp), skb->tail, PKT_BUF_SZ, PCI_DMA_FROMDEVICE)); } if (i != RX_RING_SIZE) { int j; @@ -1626,7 +1703,7 @@ vortex_open(struct net_device *dev) for (j = 0; j < i; j++) { if (vp->rx_skbuff[j]) { dev_kfree_skb(vp->rx_skbuff[j]); - vp->rx_skbuff[j] = 0; + vp->rx_skbuff[j] = NULL; } } retval = -ENOMEM; @@ -1651,7 +1728,7 @@ static void vortex_timer(unsigned long data) { struct net_device *dev = (struct net_device *)data; - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; int next_tick = 60*HZ; int ok = 0; @@ -1695,8 +1772,10 @@ vortex_timer(unsigned long data) if (mii_status & BMSR_LSTATUS) { int mii_reg5 = mdio_read(dev, vp->phys[0], 5); if (! vp->force_fd && mii_reg5 != 0xffff) { - int duplex = (mii_reg5&0x0100) || - (mii_reg5 & 0x01C0) == 0x0040; + int duplex; + + mii_reg5 &= vp->advertising; + duplex = (mii_reg5&0x0100) || (mii_reg5 & 0x01C0) == 0x0040; if (vp->full_duplex != duplex) { vp->full_duplex = duplex; printk(KERN_INFO "%s: Setting %s-duplex based on MII " @@ -1706,7 +1785,7 @@ vortex_timer(unsigned long data) /* Set the full-duplex bit. */ EL3WINDOW(3); outw( (vp->full_duplex ? 0x20 : 0) | - (dev->mtu > 1500 ? 0x40 : 0) | + (vp->large_frames ? 0x40 : 0) | ((vp->full_duplex && vp->flow_ctrl && vp->partner_flow_ctrl) ? 0x100 : 0), ioaddr + Wn3_MAC_Ctrl); if (vortex_debug > 1) @@ -1775,16 +1854,18 @@ leave_media_alone: static void vortex_tx_timeout(struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; printk(KERN_ERR "%s: transmit timed out, tx_status %2.2x status %4.4x.\n", dev->name, inb(ioaddr + TxStatus), inw(ioaddr + EL3_STATUS)); EL3WINDOW(4); - printk(KERN_ERR " diagnostics: net %04x media %04x dma %8.8x.\n", - inw(ioaddr + Wn4_NetDiag), inw(ioaddr + Wn4_Media), - inl(ioaddr + PktStatus)); + printk(KERN_ERR " diagnostics: net %04x media %04x dma %08x fifo %04x\n", + inw(ioaddr + Wn4_NetDiag), + inw(ioaddr + Wn4_Media), + inl(ioaddr + PktStatus), + inw(ioaddr + Wn4_FIFODiag)); /* Slight code bloat to be user friendly. */ if ((inb(ioaddr + TxStatus) & 0x88) == 0x88) printk(KERN_ERR "%s: Transmitter encountered 16 collisions --" @@ -1800,9 +1881,9 @@ static void vortex_tx_timeout(struct net unsigned long flags; local_irq_save(flags); if (vp->full_bus_master_tx) - boomerang_interrupt(dev->irq, dev, 0); + boomerang_interrupt(dev->irq, dev, NULL); else - vortex_interrupt(dev->irq, dev, 0); + vortex_interrupt(dev->irq, dev, NULL); local_irq_restore(flags); } } @@ -1843,7 +1924,7 @@ static void vortex_tx_timeout(struct net static void vortex_error(struct net_device *dev, int status) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; int do_tx_reset = 0, reset_mask = 0; unsigned char tx_status = 0; @@ -1919,7 +2000,8 @@ vortex_error(struct net_device *dev, int printk(KERN_ERR "%s: PCI bus error, bus status %8.8x\n", dev->name, bus_status); /* In this case, blow the card away */ - vortex_down(dev); + /* Must not enter D3 or we can't legally issue the reset! */ + vortex_down(dev, 0); issue_and_wait(dev, TotalReset | 0xff); vortex_up(dev); /* AKPM: bug. vortex_up() assumes that the rx ring is full. It may not be. */ } else if (fifo_diag & 0x0400) @@ -1929,6 +2011,8 @@ vortex_error(struct net_device *dev, int issue_and_wait(dev, RxReset|0x07); /* Set the Rx filter to the current state. */ set_rx_mode(dev); + /* enable 802.1q VLAN tagged frames */ + set_8021q_mode(dev, 1); outw(RxEnable, ioaddr + EL3_CMD); /* Re-enable the receiver. */ outw(AckIntr | HostError, ioaddr + EL3_CMD); } @@ -1945,7 +2029,7 @@ vortex_error(struct net_device *dev, int static int vortex_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; /* Put out the doubleword header... */ @@ -1953,7 +2037,7 @@ vortex_start_xmit(struct sk_buff *skb, s if (vp->bus_master) { /* Set the bus-master controller to transfer the packet. */ int len = (skb->len + 3) & ~3; - outl( vp->tx_skb_dma = pci_map_single(vp->pdev, skb->data, len, PCI_DMA_TODEVICE), + outl( vp->tx_skb_dma = pci_map_single(VORTEX_PCI(vp), skb->data, len, PCI_DMA_TODEVICE), ioaddr + Wn7_MasterAddr); outw(len, ioaddr + Wn7_MasterLen); vp->tx_skb = skb; @@ -2000,7 +2084,7 @@ vortex_start_xmit(struct sk_buff *skb, s static int boomerang_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; /* Calculate the next Tx descriptor entry. */ int entry = vp->cur_tx % TX_RING_SIZE; @@ -2029,16 +2113,16 @@ boomerang_start_xmit(struct sk_buff *skb if (skb->ip_summed != CHECKSUM_HW) vp->tx_ring[entry].status = cpu_to_le32(skb->len | TxIntrUploaded); else - vp->tx_ring[entry].status = cpu_to_le32(skb->len | TxIntrUploaded | AddTCPChksum); + vp->tx_ring[entry].status = cpu_to_le32(skb->len | TxIntrUploaded | AddTCPChksum | AddUDPChksum); if (!skb_shinfo(skb)->nr_frags) { - vp->tx_ring[entry].frag[0].addr = cpu_to_le32(pci_map_single(vp->pdev, skb->data, + vp->tx_ring[entry].frag[0].addr = cpu_to_le32(pci_map_single(VORTEX_PCI(vp), skb->data, skb->len, PCI_DMA_TODEVICE)); vp->tx_ring[entry].frag[0].length = cpu_to_le32(skb->len | LAST_FRAG); } else { int i; - vp->tx_ring[entry].frag[0].addr = cpu_to_le32(pci_map_single(vp->pdev, skb->data, + vp->tx_ring[entry].frag[0].addr = cpu_to_le32(pci_map_single(VORTEX_PCI(vp), skb->data, skb->len-skb->data_len, PCI_DMA_TODEVICE)); vp->tx_ring[entry].frag[0].length = cpu_to_le32(skb->len-skb->data_len); @@ -2046,7 +2130,7 @@ boomerang_start_xmit(struct sk_buff *skb skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; vp->tx_ring[entry].frag[i+1].addr = - cpu_to_le32(pci_map_single(vp->pdev, + cpu_to_le32(pci_map_single(VORTEX_PCI(vp), (void*)page_address(frag->page) + frag->page_offset, frag->size, PCI_DMA_TODEVICE)); @@ -2057,7 +2141,7 @@ boomerang_start_xmit(struct sk_buff *skb } } #else - vp->tx_ring[entry].addr = cpu_to_le32(pci_map_single(vp->pdev, skb->data, skb->len, PCI_DMA_TODEVICE)); + vp->tx_ring[entry].addr = cpu_to_le32(pci_map_single(VORTEX_PCI(vp), skb->data, skb->len, PCI_DMA_TODEVICE)); vp->tx_ring[entry].length = cpu_to_le32(skb->len | LAST_FRAG); vp->tx_ring[entry].status = cpu_to_le32(skb->len | TxIntrUploaded); #endif @@ -2096,14 +2180,16 @@ boomerang_start_xmit(struct sk_buff *skb * full_bus_master_tx == 0 && full_bus_master_rx == 0 */ -static void vortex_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t +vortex_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr; int status; int work_done = max_interrupt_work; - + int handled = 0; + ioaddr = dev->base_addr; spin_lock(&vp->lock); @@ -2114,6 +2200,7 @@ static void vortex_interrupt(int irq, vo if ((status & IntLatch) == 0) goto handler_exit; /* No interrupt: shared IRQs cause this */ + handled = 1; if (status & IntReq) { status |= vp->deferred; @@ -2145,7 +2232,7 @@ static void vortex_interrupt(int irq, vo if (status & DMADone) { if (inw(ioaddr + Wn7_MasterStatus) & 0x1000) { outw(0x1000, ioaddr + Wn7_MasterStatus); /* Ack the event. */ - pci_unmap_single(vp->pdev, vp->tx_skb_dma, (vp->tx_skb->len + 3) & ~3, PCI_DMA_TODEVICE); + pci_unmap_single(VORTEX_PCI(vp), vp->tx_skb_dma, (vp->tx_skb->len + 3) & ~3, PCI_DMA_TODEVICE); dev_kfree_skb_irq(vp->tx_skb); /* Release the transferred buffer */ if (inw(ioaddr + TxFree) > 1536) { /* @@ -2190,6 +2277,7 @@ static void vortex_interrupt(int irq, vo dev->name, status); handler_exit: spin_unlock(&vp->lock); + return IRQ_RETVAL(handled); } /* @@ -2197,10 +2285,11 @@ handler_exit: * full_bus_master_tx == 1 && full_bus_master_rx == 1 */ -static void boomerang_interrupt(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t +boomerang_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = dev_id; - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr; int status; int work_done = max_interrupt_work; @@ -2266,16 +2355,16 @@ static void boomerang_interrupt(int irq, #if DO_ZEROCOPY int i; for (i=0; i<=skb_shinfo(skb)->nr_frags; i++) - pci_unmap_single(vp->pdev, + pci_unmap_single(VORTEX_PCI(vp), le32_to_cpu(vp->tx_ring[entry].frag[i].addr), le32_to_cpu(vp->tx_ring[entry].frag[i].length)&0xFFF, PCI_DMA_TODEVICE); #else - pci_unmap_single(vp->pdev, + pci_unmap_single(VORTEX_PCI(vp), le32_to_cpu(vp->tx_ring[entry].addr), skb->len, PCI_DMA_TODEVICE); #endif dev_kfree_skb_irq(skb); - vp->tx_skbuff[entry] = 0; + vp->tx_skbuff[entry] = NULL; } else { printk(KERN_DEBUG "boomerang_interrupt: no skb!\n"); } @@ -2320,11 +2409,12 @@ static void boomerang_interrupt(int irq, dev->name, status); handler_exit: spin_unlock(&vp->lock); + return IRQ_HANDLED; } static int vortex_rx(struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; int i; short rx_status; @@ -2358,14 +2448,14 @@ static int vortex_rx(struct net_device * /* 'skb_put()' points to the start of sk_buff data area. */ if (vp->bus_master && ! (inw(ioaddr + Wn7_MasterStatus) & 0x8000)) { - dma_addr_t dma = pci_map_single(vp->pdev, skb_put(skb, pkt_len), + dma_addr_t dma = pci_map_single(VORTEX_PCI(vp), skb_put(skb, pkt_len), pkt_len, PCI_DMA_FROMDEVICE); outl(dma, ioaddr + Wn7_MasterAddr); outw((skb->len + 3) & ~3, ioaddr + Wn7_MasterLen); outw(StartDMAUp, ioaddr + EL3_CMD); while (inw(ioaddr + Wn7_MasterStatus) & 0x8000) ; - pci_unmap_single(vp->pdev, dma, pkt_len, PCI_DMA_FROMDEVICE); + pci_unmap_single(VORTEX_PCI(vp), dma, pkt_len, PCI_DMA_FROMDEVICE); } else { insl(ioaddr + RX_FIFO, skb_put(skb, pkt_len), (pkt_len + 3) >> 2); @@ -2394,7 +2484,7 @@ static int vortex_rx(struct net_device * static int boomerang_rx(struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); int entry = vp->cur_rx % RX_RING_SIZE; long ioaddr = dev->base_addr; int rx_status; @@ -2431,18 +2521,19 @@ boomerang_rx(struct net_device *dev) if (pkt_len < rx_copybreak && (skb = dev_alloc_skb(pkt_len + 2)) != 0) { skb->dev = dev; skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ - pci_dma_sync_single(vp->pdev, dma, PKT_BUF_SZ, PCI_DMA_FROMDEVICE); + pci_dma_sync_single(VORTEX_PCI(vp), dma, PKT_BUF_SZ, PCI_DMA_FROMDEVICE); /* 'skb_put()' points to the start of sk_buff data area. */ memcpy(skb_put(skb, pkt_len), vp->rx_skbuff[entry]->tail, pkt_len); + pci_dma_sync_single(VORTEX_PCI(vp), dma, PKT_BUF_SZ, PCI_DMA_FROMDEVICE); vp->rx_copy++; } else { /* Pass up the skbuff already on the Rx ring. */ skb = vp->rx_skbuff[entry]; vp->rx_skbuff[entry] = NULL; skb_put(skb, pkt_len); - pci_unmap_single(vp->pdev, dma, PKT_BUF_SZ, PCI_DMA_FROMDEVICE); + pci_unmap_single(VORTEX_PCI(vp), dma, PKT_BUF_SZ, PCI_DMA_FROMDEVICE); vp->rx_nocopy++; } skb->protocol = eth_type_trans(skb, dev); @@ -2479,7 +2570,7 @@ boomerang_rx(struct net_device *dev) } skb->dev = dev; /* Mark as being used by this device. */ skb_reserve(skb, 2); /* Align IP on 16 byte boundaries */ - vp->rx_ring[entry].addr = cpu_to_le32(pci_map_single(vp->pdev, skb->tail, PKT_BUF_SZ, PCI_DMA_FROMDEVICE)); + vp->rx_ring[entry].addr = cpu_to_le32(pci_map_single(VORTEX_PCI(vp), skb->tail, PKT_BUF_SZ, PCI_DMA_FROMDEVICE)); vp->rx_skbuff[entry] = skb; } vp->rx_ring[entry].status = 0; /* Clear complete bit. */ @@ -2496,7 +2587,7 @@ static void rx_oom_timer(unsigned long arg) { struct net_device *dev = (struct net_device *)arg; - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); spin_lock_irq(&vp->lock); if ((vp->cur_rx - vp->dirty_rx) == RX_RING_SIZE) /* This test is redundant, but makes me feel good */ @@ -2509,9 +2600,9 @@ rx_oom_timer(unsigned long arg) } static void -vortex_down(struct net_device *dev) +vortex_down(struct net_device *dev, int final_down) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; netif_stop_queue (dev); @@ -2526,6 +2617,9 @@ vortex_down(struct net_device *dev) outw(RxDisable, ioaddr + EL3_CMD); outw(TxDisable, ioaddr + EL3_CMD); + /* Disable receiving 802.1q tagged frames */ + set_8021q_mode(dev, 0); + if (dev->if_port == XCVR_10base2) /* Turn off thinnet power. Green! */ outw(StopCoax, ioaddr + EL3_CMD); @@ -2538,8 +2632,8 @@ vortex_down(struct net_device *dev) if (vp->full_bus_master_tx) outl(0, ioaddr + DownListPtr); - if (vp->pdev && vp->enable_wol) { - pci_save_state(vp->pdev, vp->power_state); + if (final_down && VORTEX_PCI(vp) && vp->enable_wol) { + pci_save_state(VORTEX_PCI(vp), vp->power_state); acpi_set_WOL(dev); } } @@ -2547,12 +2641,12 @@ vortex_down(struct net_device *dev) static int vortex_close(struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; int i; if (netif_device_present(dev)) - vortex_down(dev); + vortex_down(dev, 1); if (vortex_debug > 1) { printk(KERN_DEBUG"%s: vortex_close() status %4.4x, Tx status %2.2x.\n", @@ -2567,7 +2661,6 @@ vortex_close(struct net_device *dev) ((vp->drv_flags & HAS_HWCKSM) == 0) && (hw_checksums[vp->card_idx] == -1)) { printk(KERN_WARNING "%s supports hardware checksums, and we're not using them!\n", dev->name); - printk(KERN_WARNING "Please see http://www.uow.edu.au/~andrewm/zerocopy.html\n"); } #endif @@ -2576,10 +2669,10 @@ vortex_close(struct net_device *dev) if (vp->full_bus_master_rx) { /* Free Boomerang bus master Rx buffers. */ for (i = 0; i < RX_RING_SIZE; i++) if (vp->rx_skbuff[i]) { - pci_unmap_single( vp->pdev, le32_to_cpu(vp->rx_ring[i].addr), + pci_unmap_single( VORTEX_PCI(vp), le32_to_cpu(vp->rx_ring[i].addr), PKT_BUF_SZ, PCI_DMA_FROMDEVICE); dev_kfree_skb(vp->rx_skbuff[i]); - vp->rx_skbuff[i] = 0; + vp->rx_skbuff[i] = NULL; } } if (vp->full_bus_master_tx) { /* Free Boomerang bus master Tx buffers. */ @@ -2590,15 +2683,15 @@ vortex_close(struct net_device *dev) int k; for (k=0; k<=skb_shinfo(skb)->nr_frags; k++) - pci_unmap_single(vp->pdev, + pci_unmap_single(VORTEX_PCI(vp), le32_to_cpu(vp->tx_ring[i].frag[k].addr), le32_to_cpu(vp->tx_ring[i].frag[k].length)&0xFFF, PCI_DMA_TODEVICE); #else - pci_unmap_single(vp->pdev, le32_to_cpu(vp->tx_ring[i].addr), skb->len, PCI_DMA_TODEVICE); + pci_unmap_single(VORTEX_PCI(vp), le32_to_cpu(vp->tx_ring[i].addr), skb->len, PCI_DMA_TODEVICE); #endif dev_kfree_skb(skb); - vp->tx_skbuff[i] = 0; + vp->tx_skbuff[i] = NULL; } } } @@ -2610,7 +2703,7 @@ static void dump_tx_ring(struct net_device *dev) { if (vortex_debug > 0) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; if (vp->full_bus_master_tx) { @@ -2643,7 +2736,7 @@ dump_tx_ring(struct net_device *dev) static struct net_device_stats *vortex_get_stats(struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); unsigned long flags; if (netif_device_present(dev)) { /* AKPM: Used to be netif_running */ @@ -2663,7 +2756,7 @@ static struct net_device_stats *vortex_g */ static void update_stats(long ioaddr, struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); int old_window = inw(ioaddr + EL3_CMD); if (old_window == 0xffff) /* Chip suspended or ejected. */ @@ -2700,29 +2793,32 @@ static void update_stats(long ioaddr, st return; } + static void vortex_get_drvinfo(struct net_device *dev, - struct ethtool_drvinfo *info) + struct ethtool_drvinfo *info) { - struct vortex_private *vp = dev->priv; + struct vortex_private *vp = netdev_priv(dev); strcpy(info->driver, DRV_NAME); strcpy(info->version, DRV_VERSION); - if (vp->pdev) - strcpy(info->bus_info, pci_name(vp->pdev)); - else + if (VORTEX_PCI(vp)) { + strcpy(info->bus_info, pci_name(VORTEX_PCI(vp))); + } else { sprintf(info->bus_info, "EISA 0x%lx %d", dev->base_addr, dev->irq); + } } static struct ethtool_ops vortex_ethtool_ops = { .get_drvinfo = vortex_get_drvinfo, }; -static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) +#ifdef CONFIG_PCI +static int vortex_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; - struct mii_ioctl_data *data = (struct mii_ioctl_data *)&rq->ifr_data; + struct mii_ioctl_data *data = if_mii(rq); int phy = vp->phys[0] & 0x1f; int retval; @@ -2756,6 +2852,31 @@ static int vortex_ioctl(struct net_devic return retval; } +/* + * Must power the device up to do MDIO operations + */ +static int vortex_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) +{ + int err; + struct vortex_private *vp = netdev_priv(dev); + int state = 0; + + if (vp && VORTEX_PCI(vp)) + state = VORTEX_PCI(vp)->current_state; + + /* The kernel core really should have pci_get_power_state() */ + + if(state != 0) + pci_set_power_state(VORTEX_PCI(vp), 0); + err = vortex_do_ioctl(dev, rq, cmd); + if(state != 0) + pci_set_power_state(VORTEX_PCI(vp), state); + + return err; +} +#endif + + /* Pre-Cyclone chips have no documented multicast filter, so the only multicast setting is to receive all multicast frames. At least the chip has a very clean way to set the mode, unlike many others. */ @@ -2776,6 +2897,61 @@ static void set_rx_mode(struct net_devic outw(new_mode, ioaddr + EL3_CMD); } +#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) +/* Setup the card so that it can receive frames with an 802.1q VLAN tag. + Note that this must be done after each RxReset due to some backwards + compatibility logic in the Cyclone and Tornado ASICs */ + +/* The Ethernet Type used for 802.1q tagged frames */ +#define VLAN_ETHER_TYPE 0x8100 + +static void set_8021q_mode(struct net_device *dev, int enable) +{ + struct vortex_private *vp = (struct vortex_private *)dev->priv; + long ioaddr = dev->base_addr; + int old_window = inw(ioaddr + EL3_CMD); + int mac_ctrl; + + if ((vp->drv_flags&IS_CYCLONE) || (vp->drv_flags&IS_TORNADO)) { + /* cyclone and tornado chipsets can recognize 802.1q + * tagged frames and treat them correctly */ + + int max_pkt_size = dev->mtu+14; /* MTU+Ethernet header */ + if (enable) + max_pkt_size += 4; /* 802.1Q VLAN tag */ + + EL3WINDOW(3); + outw(max_pkt_size, ioaddr+Wn3_MaxPktSize); + + /* set VlanEtherType to let the hardware checksumming + treat tagged frames correctly */ + EL3WINDOW(7); + outw(VLAN_ETHER_TYPE, ioaddr+Wn7_VlanEtherType); + } else { + /* on older cards we have to enable large frames */ + + vp->large_frames = dev->mtu > 1500 || enable; + + EL3WINDOW(3); + mac_ctrl = inw(ioaddr+Wn3_MAC_Ctrl); + if (vp->large_frames) + mac_ctrl |= 0x40; + else + mac_ctrl &= ~0x40; + outw(mac_ctrl, ioaddr+Wn3_MAC_Ctrl); + } + + EL3WINDOW(old_window); +} +#else + +static void set_8021q_mode(struct net_device *dev, int enable) +{ +} + + +#endif + /* MII transceiver control section. Read and write the MII registers using software-generated serial MDIO protocol. See the MII specifications or DP83840A data sheet @@ -2810,7 +2986,7 @@ static void mdio_sync(long ioaddr, int b static int mdio_read(struct net_device *dev, int phy_id, int location) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); int i; long ioaddr = dev->base_addr; int read_cmd = (0xf6 << 10) | (phy_id << 5) | location; @@ -2844,7 +3020,7 @@ static int mdio_read(struct net_device * static void mdio_write(struct net_device *dev, int phy_id, int location, int value) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; int write_cmd = 0x50020000 | (phy_id << 23) | (location << 18) | value; long mdio_addr = ioaddr + Wn4_PhysicalMgmt; @@ -2878,7 +3054,7 @@ static void mdio_write(struct net_device /* Set Wake-On-LAN mode and put the board into D3 (power-down) state. */ static void acpi_set_WOL(struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; /* Power up on: 1==Downloaded Filter, 2==Magic Packets, 4==Link Status. */ @@ -2889,8 +3065,8 @@ static void acpi_set_WOL(struct net_devi outw(RxEnable, ioaddr + EL3_CMD); /* Change the power state to D3; RxEnable doesn't take effect. */ - pci_enable_wake(vp->pdev, 0, 1); - pci_set_power_state(vp->pdev, 3); + pci_enable_wake(VORTEX_PCI(vp), 0, 1); + pci_set_power_state(VORTEX_PCI(vp), 3); } @@ -2904,21 +3080,21 @@ static void __devexit vortex_remove_one BUG(); } - vp = dev->priv; + vp = netdev_priv(dev); /* AKPM: FIXME: we should have * if (vp->cb_fn_base) iounmap(vp->cb_fn_base); * here */ unregister_netdev(dev); - /* Should really use issue_and_wait() here */ - outw(TotalReset|0x14, dev->base_addr + EL3_CMD); - if (vp->pdev && vp->enable_wol) { - pci_set_power_state(vp->pdev, 0); /* Go active */ + if (VORTEX_PCI(vp) && vp->enable_wol) { + pci_set_power_state(VORTEX_PCI(vp), 0); /* Go active */ if (vp->pm_state_valid) - pci_restore_state(vp->pdev, vp->power_state); + pci_restore_state(VORTEX_PCI(vp), vp->power_state); } + /* Should really use issue_and_wait() here */ + outw(TotalReset|0x14, dev->base_addr + EL3_CMD); pci_free_consistent(pdev, sizeof(struct boom_rx_desc) * RX_RING_SIZE @@ -2927,18 +3103,18 @@ static void __devexit vortex_remove_one vp->rx_ring_dma); if (vp->must_free_region) release_region(dev->base_addr, vp->io_size); - kfree(dev); + free_netdev(dev); } static struct pci_driver vortex_driver = { - name: "3c59x", - probe: vortex_init_one, - remove: __devexit_p(vortex_remove_one), - id_table: vortex_pci_tbl, + .name = "3c59x", + .probe = vortex_init_one, + .remove = __devexit_p(vortex_remove_one), + .id_table = vortex_pci_tbl, #ifdef CONFIG_PM - suspend: vortex_suspend, - resume: vortex_resume, + .suspend = vortex_suspend, + .resume = vortex_resume, #endif }; --- linux-2.4/include/linux/mii.h.orig +++ linux-2.4/include/linux/mii.h @@ -9,6 +9,7 @@ #define __LINUX_MII_H__ #include +#include /* Generic MII registers. */ @@ -144,6 +145,12 @@ struct mii_ioctl_data { }; +static inline struct mii_ioctl_data *if_mii(struct ifreq *rq) +{ + return (struct mii_ioctl_data *) &rq->ifr_ifru; +} + + /** * mii_nway_result * @negotiated: value of MII ANAR and'd with ANLPAR From albie@alfarrabio.di.uminho.pt Fri Oct 8 13:02:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 13:02:06 -0700 (PDT) Received: from alfarrabio.di.uminho.pt (alfarrabio.di.uminho.pt [193.136.19.130]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i98K1xki029932 for ; Fri, 8 Oct 2004 13:02:00 -0700 Received: (qmail 2014 invoked by uid 0); 8 Oct 2004 20:01:41 -0000 Received: from unknown (HELO ?127.0.0.1?) (192.168.3.210) by 0 with SMTP; 8 Oct 2004 20:01:41 -0000 Message-ID: <4166F224.4020801@alfarrabio.di.uminho.pt> Date: Fri, 08 Oct 2004 21:01:40 +0100 From: Alberto Manuel Brandao Simoes User-Agent: Mozilla Thunderbird 0.7 (X11/20040615) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Thomas Graf CC: Andrew Morton , netdev@oss.sgi.com Subject: Re: Fw: [Bugme-new] [Bug 3527] New: ssh does not work with 2.6.9rc3 References: <20041008104801.0dd96536.akpm@osdl.org> <20041008181036.GC19714@rei.reeler.org> In-Reply-To: <20041008181036.GC19714@rei.reeler.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-archive-position: 10070 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: albie@alfarrabio.di.uminho.pt Precedence: bulk X-list: netdev Content-Length: 1503 Lines: 45 Confirmed: there are more commands not working with this kernel (and some which does not use network at all). [ambs@eremita ambs]$ man man Error executing formatting or display command. System command (cd /usr/man && (echo ".pl 1100i"; /bin/gunzip -c '/usr/man/man1/man.1.gz'; echo ".\\\""; echo ".pl \n(nlu+10") | /usr/bin/gtbl | /usr/bin/nroff -S -mandoc | /usr/bin/less -is) exited with status 256. No manual entry for man [ambs@eremita ambs]$ And, yes, this works with 2.6.7 :) Cheers Alberto Thomas Graf wrote: >> With this kernel, the sis ethernet bug is fixed (well, at least I can do a ping >>-f without losing packets), SATA works but... wonder... ssh doesn't. >> >>If I have a public key on other machine without passphrase, it works. >>If not.... > > > Could you provide your .config and a dump of the network > traffic a few seconds before, during and after the ssh session? > (tcpdump -s -w ...) > > >>Now, that file really doesn't exist. But it isn't needed with the old kernel. >>So, what 2.6.9 rc 3 has that 2.6.7 don't? > > > I have the feeling that the bug is related to the calculation of > some networking related threshold resultung in wrong values right > after booting time. -- Alberto Simões Much as I hate to say it, the Computer Science view of language design has gotten too inbred in recent years. The Computer Scientists should pay more attention to the Linguists, who have a much better handle on how people prefer to communicate. --Larry Wall From linville@ra.tuxdriver.com Fri Oct 8 13:13:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 13:13:52 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98KDlhv030789 for ; Fri, 8 Oct 2004 13:13:48 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i98JB9Z21126; Fri, 8 Oct 2004 15:11:09 -0400 Date: Fri, 8 Oct 2004 15:11:09 -0400 From: "John W. Linville" To: Jeff Garzik Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, akpm@osdl.org Subject: [patch 2.6.9-rc3] 3c59x: style change in vortex_ethtool_ops declaration Message-ID: <20041008151109.J14378@tuxdriver.com> Mail-Followup-To: Jeff Garzik , linux-kernel@vger.kernel.org, netdev@oss.sgi.com, akpm@osdl.org References: <20041008121307.C14378@tuxdriver.com> <4166E501.4000708@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: <4166E501.4000708@pobox.com>; from jgarzik@pobox.com on Fri, Oct 08, 2004 at 03:05:37PM -0400 X-archive-position: 10071 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 590 Lines: 21 Style change suggested during patch review. Signed-off-by: John W. Linville --- Jeff Garzik suggested this style change while reviewing my patch to backport the 3c59x driver from 2.6 to 2.4. drivers/net/3c59x.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) --- linux-2.6/drivers/net/3c59x.c.orig +++ linux-2.6/drivers/net/3c59x.c @@ -2888,7 +2888,7 @@ static void vortex_get_drvinfo(struct ne } static struct ethtool_ops vortex_ethtool_ops = { - .get_drvinfo = vortex_get_drvinfo, + .get_drvinfo = vortex_get_drvinfo, }; #ifdef CONFIG_PCI From akpm@osdl.org Fri Oct 8 13:17:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 13:18:04 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98KHtA8031155 for ; Fri, 8 Oct 2004 13:17:56 -0700 Received: from akpm.pao.digeo.com (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i98KHVf28454; Fri, 8 Oct 2004 13:17:32 -0700 Date: Fri, 8 Oct 2004 13:21:28 -0700 From: Andrew Morton To: Alberto Manuel Brandao Simoes Cc: tgraf@suug.ch, netdev@oss.sgi.com Subject: Re: Fw: [Bugme-new] [Bug 3527] New: ssh does not work with 2.6.9rc3 Message-Id: <20041008132128.4d5a5a4a.akpm@osdl.org> In-Reply-To: <4166F224.4020801@alfarrabio.di.uminho.pt> References: <20041008104801.0dd96536.akpm@osdl.org> <20041008181036.GC19714@rei.reeler.org> <4166F224.4020801@alfarrabio.di.uminho.pt> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i586-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10072 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 Content-Length: 243 Lines: 6 Alberto Manuel Brandao Simoes wrote: > > Confirmed: there are more commands not working with this kernel (and > some which does not use network at all). Please provide the traffic dump which Thomas asked for. From albie@alfarrabio.di.uminho.pt Fri Oct 8 13:19:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 13:19:41 -0700 (PDT) Received: from alfarrabio.di.uminho.pt (alfarrabio.di.uminho.pt [193.136.19.130]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i98KJXKo031430 for ; Fri, 8 Oct 2004 13:19:34 -0700 Received: (qmail 2533 invoked by uid 0); 8 Oct 2004 20:19:06 -0000 Received: from unknown (HELO ?127.0.0.1?) (192.168.3.210) by 0 with SMTP; 8 Oct 2004 20:19:06 -0000 Message-ID: <4166F638.80502@alfarrabio.di.uminho.pt> Date: Fri, 08 Oct 2004 21:19:04 +0100 From: Alberto Manuel Brandao Simoes User-Agent: Mozilla Thunderbird 0.7 (X11/20040615) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andrew Morton CC: tgraf@suug.ch, netdev@oss.sgi.com Subject: Re: Fw: [Bugme-new] [Bug 3527] New: ssh does not work with 2.6.9rc3 References: <20041008104801.0dd96536.akpm@osdl.org> <20041008181036.GC19714@rei.reeler.org> <4166F224.4020801@alfarrabio.di.uminho.pt> <20041008132128.4d5a5a4a.akpm@osdl.org> In-Reply-To: <20041008132128.4d5a5a4a.akpm@osdl.org> Content-Type: multipart/mixed; boundary="------------080101090909030409020402" X-archive-position: 10073 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: albie@alfarrabio.di.uminho.pt Precedence: bulk X-list: netdev Content-Length: 115638 Lines: 1605 This is a multi-part message in MIME format. --------------080101090909030409020402 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit I've sent it. Here it is again. Andrew Morton wrote: > Alberto Manuel Brandao Simoes wrote: > >>Confirmed: there are more commands not working with this kernel (and >>some which does not use network at all). > > > Please provide the traffic dump which Thomas asked for. -- Alberto Simões Much as I hate to say it, the Computer Science view of language design has gotten too inbred in recent years. The Computer Scientists should pay more attention to the Linguists, who have a much better handle on how people prefer to communicate. --Larry Wall --------------080101090909030409020402 Content-Type: application/octet-stream; name="DATA" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="DATA" 1MOyoQIABAAAAAAAAAAAAEQAAAABAAAAvO9mQfLdBABEAAAAwgAAAAAKipd0gAARLzA3iggA RRAAtAv+QABABmH8wYgTg1KapJQAFoAg+HdvR9RtwjmAGApoHSYAAAEBCAoAzgT1AAvUdehC vO9mQYjsBABEAAAATgAAAAARLzA3igAKipd0gAgARYAAQAYnQAAuBr54Pv1zkMGIE4ME3oNg f5tqoV9+LaGwEOfoIOoAAAEBCAoAc2oYAM4DbwEBvO9mQfFMBQBCAAAAQgAAAAARLzA3igAK ipd0gAgARYAANAYoQAAuBr6DPv1zkMGIE4ME3oNgf5tqoV9+T5GAEOJAe5oAAAEBCAoAc2oa AM4EY7zvZkEITQUARAAAAOoFAAAACoqXdIAAES8wN4oIAEUIBdxuakAAQAY/EcGIE4M+/XOQ g2AE3l9+VTl/m2qhgBgFqOtyAAABAQgKAM4FEQBzahqjd7zvZkH4TAUAQgAAAEIAAAAAES8w N4oACoqXdIAIAEUAADRWfUAAMgYmDVKapJTBiBODgCAAFtRtwjn4d29HgBC3DJpzAAABAQgK AAvUngDOBO6872ZBRVUFAEQAAADqBQAAAAqKl3SAABEvMDeKCABFCAXc2VJAAEAG84LBiBOD UsFAcgAUDSCZOO61Nit0O4AYBbTEaAAAAQEICgDOBRQAIc1A5VW872ZBs2kFAEIAAABCAAAA ABEvMDeKAAqKl3SACABFgAA0L+JAAC4GlMk+/XOQwYgTgwTUcEFuhyKwToFIa4AQ8zju4QAA AQEICgBzahsAzgR0vO9mQcJpBQBEAAAA6gUAAAAKipd0gAARLzA3iggARQgF3K+JQABABv3x wYgTgz79c5BwQQTUToFIa26HIrCAGAWovekAAAEBCAoAzgUZAHNqG3tkvO9mQRSCBQBCAAAA QgAAAAARLzA3igAKipd0gAgARQAANFZ+QAAyBiYMUpqklMGIE4OAIAAW1G3COfh3b8eAELcM meEAAAEBCAoAC9SpAM4E9bzvZkHsCwYAQgAAAEIAAAAAES8wN4oACoqXdIAIAEWAADQGKUAA Lga+gj79c5DBiBODBN6DYH+baqFfflU5gBD44F7tAAABAQgKAHNqHwDOBMO872ZB+QsGAEQA AADqBQAAAAqKl3SAABEvMDeKCABFCAXcbmtAAEAGPxDBiBODPv1zkINgBN5fflrhf5tqoYAQ BajsAAAAAQEICgDOBUIAc2ofzg6872ZBHgwGAEQAAADqBQAAAAqKl3SAABEvMDeKCABFCAXc bmxAAEAGPw/BiBODPv1zkINgBN5ffmCJf5tqoYAQBaiyowAAAQEICgDOBUIAc2ofxOK872ZB d/MGADwAAAA8AAAAAYDCAAAAAAnonk3pACZCQgMAAAAAABATAAqKl3SAAAAXeMATAAnonk3A gCkCABQAAgAPAAAAAAAAAAAAvO9mQW72BgBEAAAATgAAAAARLzA3igAKipd0gAgARYAAQKoe QABoBtlszarr9sGIE4N8qwAUkoUcre2DU76wEECw4k0AAAEBCAoAA4yyAM4BtwEBvO9mQX32 BgBEAAAAm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AQgAAAEIAAAAAES8wN4oACoqXdIAIAEWAADQlbEAAKwbBmVLBQHLBiBOD DSAAFDYrdDuZOWslgBD44IPlAAABAQgKACHNqADOBye972ZBttEAAEQAAADqBQAAAAqKl3SA ABEvMDeKCABFCAXc2WlAAEAG82vBiBODUsFAcgAUDSCZOYdtNit0O4AQBbRChQAAAQEICgDO B9QAIc2oENu972ZBvmQBAEQAAABOAAAAABEvMDeKAAqKl3SACABFgABAq85AAGgG17zNquv2 wYgTg3yrABSShRyt7YNTvrAQQLDHjwAAAQEICgADjLgAzgG3AQG972ZB3mQBAEQAAACaBQAA AAqKl3SAABEvMDeKCABFCAWMqVBAAEAG/WbBiBODzarr9gAUfKvtg3kmkoUcrYAQBbQMHAAA AQEICgDOB/oAA4y4FVi972ZBic8BAEIAAABCAAAAABEvMDeKAAqKl3SACABFgAA0BjZAAC4G vnU+/XOQwYgTgwTeg2B/m2qhX36ewYAQ+OAS8AAAAQEICgBzamgAzgbvve9mQZfPAQBEAAAA 6gUAAAAKipd0gAARLzA3iggARQgF3G58QABABj7/wYgTgz79c5CDYATeX367CX+baqGAEAWo LPwAAAEBCAoAzggVAHNqaER+ve9mQdggAgBEAAAATgAAAAARLzA3igAKipd0gAgARYAAQCVt QAArBsGMUsFAcsGIE4MNIAAUNit0O5k5ayWwEPjgKMAAAAEBCAoAIc2wAM4HJwEBve9mQeUg AgBEAAAA6gUAAAAKipd0gAARLzA3iggARQgF3NlqQABABvNqwYgTg1LBQHIAFA0gmTmNFTYr dDuAEAW0mIkAAAEBCAoAzggqACHNsIFrve9mQVosAgBEAAAATgAAAAARLzA3igAKipd0gAgA RYAAQCVuQAArBsGLUsFAcsGIE4MNIAAUNit0O5k5ayWwEPjgIxcAAAEBCAoAIc2xAM4HJwEB ve9mQWcsAgBEAAAA6gUAAAAKipd0gAARLzA3iggARQgF3NlrQABABvNpwYgTg1LBQHIAFA0g mTlrJTYrdDuAEAW0WkgAAAEBCAoAzggtACHNsZ0lve9mQbAsAgBE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gBAFqL98AAABAQgKAM4M8wBzauT/T77v ZkFcwQUAQgAAAEIAAAAAES8wN4oACoqXdIAIAEWAADQv9EAALgaUtz79c5DBiBODBNRwQW6H IrBOga47gBD44HrlAAABAQgKAHNq5gDODC2+72ZBZ8EFAEQAAADqBQAAAAqKl3SAABEvMDeK CABFCAXcr59AAEAG/dvBiBODPv1zkHBBBNROgbmLbocisIAQBajDIgAAAQEICgDODQAAc2rm oN++72ZBjcEFAEQAAADqBQAAAAqKl3SAABEvMDeKCABFCAXcr6BAAEAG/drBiBODPv1zkHBB BNROgb8zbocisIAYBajhGAAAAQEICgDODQAAc2rmjN++72ZBChEGAEQAAABEAAAAAQBeAAAN AAWb8HThCABFwAA2phoAAAFnXdDBiBMh4AAADSMAQPMBAMGIE/4AAQDSAQAAIO////4AAQAA AQAHIMGICeq+72ZBI3sGAEIAAABCAAAAABEvMDeKAAqKl3SACABFgAA0L/VAAC4GlLY+/XOQ wYgTgwTUcEFuhyKwToGz44AQ+OB1KAAAAQEICgBzausAzgw9vu9mQTB7BgBEAAAA6gUAAAAK ipd0gAARLzA3iggARQgF3K+hQABABv3ZwYgTgz79c5BwQQTUToHE226HIrCAEAWou84AAAEB CAoAzg0vAHNq63Yhvu9mQRa9BgBCAAAAQgAAAAARLzA3igAKipd0gAgARYAANAZEQAAuBr5n Pv1zkMGIE4ME3oNgf5tqoV9++UGAEPjgso4AAAEBCAoAc2rsAM4MTL7vZkEivQYARAAAAOoF AAAACoqXdIAAES8wN4oIAEUIBdxujEAAQAY+78GIE4M+/XOQg2AE3l9/Cjl/m2qhgBAFqM2u AAABAQgKAM4NQABzauy7pL7vZkHd7wYARAAAAE4AAAAAES8wN4oACoqXdIAIAEWAAEAlhUAA KwbBdFLBQHLBiBODDSAAFDYrdDuZOeeVsBD44JexAAABAQgKACHONADOC8ABAb7vZkHv7wYA RAAAAOoFAAAACoqXdIAAES8wN4oIAEUIBdzZhEAAQAbzUMGIE4NSwUByABQNIJk57T02K3Q7 gBAF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AAAARLzA3igAK ipd0gAgARYAANDBPQAAuBpRcPv1zkMGIE4ME1HBBbocisE6DzTuAEPjgQOAAAAEBCAoAc21c AM4kusTvZkErZwoARAAAAOoFAAAACoqXdIAAES8wN4oIAEUIBdywBkAAQAb9dMGIE4M+/XOQ cEEE1E6D49tuhyKwgBAFqKbNAAABAQgKAM4loQBzbVzhN8TvZkH4rQoAQgAAAEIAAAAAES8w N4oACoqXdIAIAEWAADQGk0AALga+GD79c5DBiBODBN6DYH+baqFfgM65gBD44MIhAAABAQgK AHNtXgDOJM3E72ZBA64KAEQAAADqBQAAAAqKl3SAABEvMDeKCABFCAXcbuVAAEAGPpbBiBOD Pv1zkINgBN5fgN+xf5tqoYAQBah0EQAAAQEICgDOJbMAc21etYnE72ZBKa4KAEQAAADqBQAA AAqKl3SAABEvMDeKCABFCAXcbuZAAEAGPpXBiBODPv1zkINgBN5fgOVZf5tqoYAQBaj7BQAA AQEICgDOJbMAc21eF77E72ZBOmILAEIAAABCAAAAABEvMDeKAAqKl3SACABFgAA0BpRAAC4G vhc+/XOQwYgTgwTeg2B/m2qhX4DUYYAQ+OC8YwAAAQEICgBzbWIAziTfxO9mQUZiCwBEAAAA 6gUAAAAKipd0gAARLzA3iggARQgF3G7nQABABj6UwYgTgz79c5CDYATeX4DrAX+baqGAEAWo SCIAAAEBCAoAziXhAHNtYp2wxO9mQT7iCwBEAAAAcgAAAAARLzA3igAKipd0gAgARQAAZFaA QAAyBiXaUpqklMGIE4OAIAAW1G3Cafh3b8eAGLcMN2kAAAEBCAoAC/WHAM4kaArExO9mQU3i CwBCAAAAQgAAAAAKipd0gAARLzA3iggARRAANAwAQABABmJ6wYgTg1KapJQAFoAg+Hdvx9Rt wpmAEApoBDsAAAEBCAoAziYCAAv1hw== --------------080101090909030409020402-- From tgraf@suug.ch Fri Oct 8 13:31:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 13:31:15 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98KV9I6032192 for ; Fri, 8 Oct 2004 13:31:09 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 820C881; Fri, 8 Oct 2004 22:30:32 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 389851C0E9; Fri, 8 Oct 2004 22:31:14 +0200 (CEST) Date: Fri, 8 Oct 2004 22:31:14 +0200 From: Thomas Graf To: Alberto Manuel Brandao Simoes Cc: Andrew Morton , netdev@oss.sgi.com Subject: Re: Fw: [Bugme-new] [Bug 3527] New: ssh does not work with 2.6.9rc3 Message-ID: <20041008203114.GD19628@postel.suug.ch> References: <20041008104801.0dd96536.akpm@osdl.org> <20041008181036.GC19714@rei.reeler.org> <4166F224.4020801@alfarrabio.di.uminho.pt> <20041008132128.4d5a5a4a.akpm@osdl.org> <4166F638.80502@alfarrabio.di.uminho.pt> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4166F638.80502@alfarrabio.di.uminho.pt> X-archive-position: 10074 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 407 Lines: 9 * Alberto Manuel Brandao Simoes <4166F638.80502@alfarrabio.di.uminho.pt> 2004-10-08 21:19 > I've sent it. > Here it is again. Nothing suspicious in that dump, SACK, slow start and termination look all ok. No networking fault involved here, so I guess this is not related to Andrew's issue. Judging from your other mail regarding the failure of man I'd say it's related to a filesystem or hardware problem. From albie@alfarrabio.di.uminho.pt Fri Oct 8 13:34:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 13:34:26 -0700 (PDT) Received: from alfarrabio.di.uminho.pt (alfarrabio.di.uminho.pt [193.136.19.130]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i98KYIP6032566 for ; Fri, 8 Oct 2004 13:34:19 -0700 Received: (qmail 2948 invoked by uid 0); 8 Oct 2004 20:34:01 -0000 Received: from unknown (HELO ?127.0.0.1?) (192.168.3.210) by 0 with SMTP; 8 Oct 2004 20:34:01 -0000 Message-ID: <4166F9B7.7060006@alfarrabio.di.uminho.pt> Date: Fri, 08 Oct 2004 21:33:59 +0100 From: Alberto Manuel Brandao Simoes User-Agent: Mozilla Thunderbird 0.7 (X11/20040615) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Thomas Graf CC: Andrew Morton , netdev@oss.sgi.com Subject: Re: Fw: [Bugme-new] [Bug 3527] New: ssh does not work with 2.6.9rc3 References: <20041008104801.0dd96536.akpm@osdl.org> <20041008181036.GC19714@rei.reeler.org> <4166F224.4020801@alfarrabio.di.uminho.pt> <20041008132128.4d5a5a4a.akpm@osdl.org> <4166F638.80502@alfarrabio.di.uminho.pt> <20041008203114.GD19628@postel.suug.ch> In-Reply-To: <20041008203114.GD19628@postel.suug.ch> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-archive-position: 10075 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: albie@alfarrabio.di.uminho.pt Precedence: bulk X-list: netdev Content-Length: 859 Lines: 26 Thomas Graf wrote: > * Alberto Manuel Brandao Simoes <4166F638.80502@alfarrabio.di.uminho.pt> 2004-10-08 21:19 > >>I've sent it. >>Here it is again. > > > Nothing suspicious in that dump, SACK, slow start and termination look > all ok. No networking fault involved here, so I guess this is not > related to Andrew's issue. Judging from your other mail regarding > the failure of man I'd say it's related to a filesystem or hardware > problem. Yeah. That's weird. I really need to solve this issue. Thanks for the help checking if was networking problem. Alberto -- Alberto Simões Much as I hate to say it, the Computer Science view of language design has gotten too inbred in recent years. The Computer Scientists should pay more attention to the Linguists, who have a much better handle on how people prefer to communicate. --Larry Wall From oxymoron@waste.org Fri Oct 8 14:53:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 14:53:46 -0700 (PDT) Received: from waste.org (waste.org [209.173.204.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98Lrfo8006267 for ; Fri, 8 Oct 2004 14:53:41 -0700 Received: from waste.org (localhost [127.0.0.1]) by waste.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id i98Lr6Wk019843; Fri, 8 Oct 2004 16:53:06 -0500 Received: (from oxymoron@localhost) by waste.org (8.12.3/8.12.3/Debian-7.1) id i98Lr4ZQ019831; Fri, 8 Oct 2004 16:53:04 -0500 Date: Fri, 8 Oct 2004 16:53:03 -0500 From: Matt Mackall To: Colin Leroy Cc: Andi Kleen , "David S. Miller" , akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041008215303.GD31237@waste.org> References: <20041006234912.66bfbdcc.davem@davemloft.net> <20041007160532.60c3f26b@pirandello> <20041007112846.5c85b2d9.davem@davemloft.net> <20041007224422.1c1bea95@jack.colino.net> <20041007214505.GB31558@wotan.suse.de> <20041007215025.GT31237@waste.org> <20041007150756.2373719f.davem@davemloft.net> <20041007234322.GW31237@waste.org> <20041007235022.GB19864@wotan.suse.de> <20041008084640.58976145@pirandello> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041008084640.58976145@pirandello> User-Agent: Mutt/1.3.28i X-Virus-Scanned: by amavisd-new X-archive-position: 10076 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mpm@selenic.com Precedence: bulk X-list: netdev Content-Length: 923 Lines: 27 On Fri, Oct 08, 2004 at 08:46:40AM +0200, Colin Leroy wrote: > On 08 Oct 2004 at 01h10, Andi Kleen wrote: > > Hi, > > > > Deadlocks from recursion, presumably? We could probably throw in a > > > max retry count, as ugly as that is.. > > > > There should not be any recursion, no. > > If printk() is synchronous, there could be, if there's a printk() in the > codepath taken by dev->hard_start_xmit()... But I don't if it is... Have you looked at the code path that does carrier detect for possibly recursing printks? > > For most network drivers this shouldn't occur though because > > the net driver private lock is usually always taken with interrupts > > off. > > Second newbie question: how are the interrupts disabled, is it via > local_irq_save()/local_irq_restore()? or is it something else ? Often by virtue of being in an interrupt context already. -- Mathematics is the supreme nostalgia of our time. From oxymoron@waste.org Fri Oct 8 15:00:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 15:00:59 -0700 (PDT) Received: from waste.org (waste.org [209.173.204.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98M0nsl006959 for ; Fri, 8 Oct 2004 15:00:49 -0700 Received: from waste.org (localhost [127.0.0.1]) by waste.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id i98M07Wk021218; Fri, 8 Oct 2004 17:00:07 -0500 Received: (from oxymoron@localhost) by waste.org (8.12.3/8.12.3/Debian-7.1) id i98M02An021194; Fri, 8 Oct 2004 17:00:02 -0500 Date: Fri, 8 Oct 2004 17:00:01 -0500 From: Matt Mackall To: Colin Leroy Cc: Andi Kleen , "David S. Miller" , akpm@osdl.org, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041008220001.GE31237@waste.org> References: <20041006232544.53615761@jack.colino.net> <20041006214322.GG31237@waste.org> <20041007075319.6b31430d@jack.colino.net> <20041006234912.66bfbdcc.davem@davemloft.net> <20041007160532.60c3f26b@pirandello> <20041007112846.5c85b2d9.davem@davemloft.net> <20041007224422.1c1bea95@jack.colino.net> <20041007214505.GB31558@wotan.suse.de> <20041008090610.70d7e183@pirandello> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041008090610.70d7e183@pirandello> User-Agent: Mutt/1.3.28i X-Virus-Scanned: by amavisd-new X-archive-position: 10077 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mpm@selenic.com Precedence: bulk X-list: netdev Content-Length: 1330 Lines: 33 On Fri, Oct 08, 2004 at 09:06:10AM +0200, Colin Leroy wrote: > On 07 Oct 2004 at 23h10, Andi Kleen wrote: > > Hi, > > > > This patch should do that. It works OK for me, but I'd like it > > > checked before sent upstream... > > > > > > However, it doesn't fix the hang. it looks like this hang is really > > > coming from sungem. > > > > IMHO it's not needed. Taking xmit_lock is harmless even when > > the NETIF_F_LLTX flag is set. > > Should that be completely dropped, or is it still ok ? (I think > differenciating action based on hard_start_xmit status, that is, don't > goto repeat undefinitely when NETDEV_TX_BUSY, could be a good idea). > I mean, should I rework that patch, forget about it or leave it as-is? Well the purpose of the LLTX flag is to reduce serializing on the xmit_lock. If we take the lock anyway, that should be harmless as Andi says. So I'm afraid it looks to be a performance fix at best (which is a low priority here). Let's back burner it for now. > Concerning the hang, I see that Andrew has put my first patch, the one > checking for netif_carrier_ok(), in his tree. Is it an OK solution from > your (net dev hackers) point of view? It seems to be papering over a driver bug of some sort, which is not the way we like to fix things. -- Mathematics is the supreme nostalgia of our time. From jt@bougret.hpl.hp.com Fri Oct 8 15:08:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 15:08:20 -0700 (PDT) Received: from palrel12.hp.com (palrel12.hp.com [156.153.255.237]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98M8F36007424 for ; Fri, 8 Oct 2004 15:08:15 -0700 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel12.hp.com (Postfix) with ESMTP id E338F41426D; Fri, 8 Oct 2004 15:08:01 -0700 (PDT) Received: from bougret.hpl.hp.com (bougret.hpl.hp.com [15.4.92.227]) by tomil.hpl.hp.com (8.9.3 (PHNE_29774)/8.9.3 HPLabs Timeshare Server) with ESMTP id PAA07101; Fri, 8 Oct 2004 15:11:53 -0700 (PDT) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1CG2u9-0000Zy-00; Fri, 08 Oct 2004 15:08:01 -0700 Date: Fri, 8 Oct 2004 15:08:01 -0700 To: Linus Torvalds , "David S. Miller" , Jeff Garzik , netdev@oss.sgi.com Subject: Re: Raylink/WebGear testing - ray_cs.c iomem bug? Message-ID: <20041008220801.GA2219@bougret.hpl.hp.com> Reply-To: jt@hpl.hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i Organisation: HP Labs Palo Alto Address: HP Labs, 1U-17, 1501 Page Mill road, Palo Alto, CA 94304, USA. E-mail: jt@hpl.hp.com From: Jean Tourrilhes X-archive-position: 10078 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jt@bougret.hpl.hp.com Precedence: bulk X-list: netdev Content-Length: 641 Lines: 18 Linus Torvalds wrote : > > Still, I'd love to have somebody verify that the cleaned-up version > (without any changes) still works. It should be 100% equivalent to the old > one, but it's good to make sure. > > Linus I have a couple of Netgear cards, and my laptops are more or less configured properly to test them. It's actually been a while I got those cards out of their box, and I'm not even sure the driver works properly in 2.6.X. In any case, would you mind sending the patch directly to me, I don't feel like trying to recover it from the mailing list archive (space vs. tab, wrapping and all that junk). Thanks... Jean From akpm@osdl.org Fri Oct 8 15:15:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 15:15:21 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98MFFoX007887 for ; Fri, 8 Oct 2004 15:15:16 -0700 Received: from akpm.pao.digeo.com (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i98MEef18826; Fri, 8 Oct 2004 15:14:40 -0700 Date: Fri, 8 Oct 2004 15:18:39 -0700 From: Andrew Morton To: Matt Mackall Cc: colin@colino.net, ak@suse.de, davem@davemloft.net, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-Id: <20041008151839.01823e0c.akpm@osdl.org> In-Reply-To: <20041008220001.GE31237@waste.org> References: <20041006232544.53615761@jack.colino.net> <20041006214322.GG31237@waste.org> <20041007075319.6b31430d@jack.colino.net> <20041006234912.66bfbdcc.davem@davemloft.net> <20041007160532.60c3f26b@pirandello> <20041007112846.5c85b2d9.davem@davemloft.net> <20041007224422.1c1bea95@jack.colino.net> <20041007214505.GB31558@wotan.suse.de> <20041008090610.70d7e183@pirandello> <20041008220001.GE31237@waste.org> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i586-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10079 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 Content-Length: 230 Lines: 6 Matt Mackall wrote: > > > Concerning the hang, I see that Andrew has put my first patch, the one > > checking for netif_carrier_ok(), in his tree. I dropped it again, waiting for the dust to settle on this one. From romieu@fr.zoreil.com Fri Oct 8 15:37:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 15:37:39 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98MbXEn008623 for ; Fri, 8 Oct 2004 15:37:34 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i98MaBvr007426; Sat, 9 Oct 2004 00:36:11 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i98MaB3R007425; Sat, 9 Oct 2004 00:36:11 +0200 Date: Sat, 9 Oct 2004 00:36:11 +0200 From: Francois Romieu To: Arnaldo Carvalho de Melo Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: PATCH 1/1: [SKBUFF] move common code to hdlc_type_trans Message-ID: <20041008223611.GA7097@electric-eye.fr.zoreil.com> References: <4165F5B2.5040807@conectiva.com.br> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4165F5B2.5040807@conectiva.com.br> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 10080 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 Content-Length: 290 Lines: 9 Arnaldo Carvalho de Melo : [dscc4.c sets skb->mac.raw after hdlc_type_trans] > Francois, is this really what is intended? I left it as In the pre-eth_type_trans area, yes :o/ I did not test dscc4 in a bridged setup. Please fix the driver in your patch. -- Ueimor From scott_z_huang@yahoo.com Fri Oct 8 16:17:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 16:17:36 -0700 (PDT) Received: from web80401.mail.yahoo.com (web80401.mail.yahoo.com [66.218.79.56]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i98NHVtK010253 for ; Fri, 8 Oct 2004 16:17:31 -0700 Message-ID: <20041008231713.1126.qmail@web80401.mail.yahoo.com> Received: from [65.192.41.225] by web80401.mail.yahoo.com via HTTP; Fri, 08 Oct 2004 16:17:13 PDT Date: Fri, 8 Oct 2004 16:17:13 -0700 (PDT) From: Scott Huang Subject: e1000 kick To: netdev@oss.sgi.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 10081 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: scott_z_huang@yahoo.com Precedence: bulk X-list: netdev Content-Length: 130 Lines: 10 Hi folks, Is there a way to force tx dma to start on e1000 after the I fill up the tx ring to a certain level? thanks -Scott From ravinandan.arakali@s2io.com Fri Oct 8 16:23:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 16:23:26 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98NNJCL013960 for ; Fri, 8 Oct 2004 16:23:20 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i98NMoje018753; Fri, 8 Oct 2004 19:22:50 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i98NMk39029426; Fri, 8 Oct 2004 19:22:47 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , Subject: [PATCH 2.6.9-rc2 4/8] S2io: hardware fixes Date: Fri, 8 Oct 2004 16:30:23 -0700 Message-ID: <003601c4ad8e$c8ee7ad0$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0037_01C4AD54.1C8FA2D0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10082 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Content-Length: 11416 Lines: 355 This is a multi-part message in MIME format. ------=_NextPart_000_0037_01C4AD54.1C8FA2D0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Hi, Following are the code changes addressing the hardware errata in user guide. 1. Xena3's with a set of subsystem IDs had Link LED problems, fixed that specifically for them. 2. To write into the Keyed Mac_Cfg register to enable broadcast, writing two 32 bit writes into it along with a write to the key register rather than a single write to key and a 64 bit write to mac_cfg. This is necessary on 32 bit systems where a writeq(64 bit write) is actually two writel (32 bit writes). 3. Writes to some special registers mentioned in UG is being done by a special macro which defines which 32 bits of the 64 bit register is to be written first. Again this applies only on 32 bit systems. 4. Configured pause frame related water marks and a shared_split value which describes the Max TXDMA related split transaction that can be used without giving room for the Rx transactions. 5. The mac_rmac_err_reg R1 register will be cleared in the interrupt handler itself rather than in the scheduled task as was being done previously. 6. Even on PCC_FB_ECC error the card will be reset by disabling adapter enable bit. Thanks, Ravi ------=_NextPart_000_0037_01C4AD54.1C8FA2D0 Content-Type: application/octet-stream; name="s2io_hwfixes.patch4" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="s2io_hwfixes.patch4" diff -urN vanilla-linux/drivers/net/s2io.c = linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-07 11:44:04.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-07 11:45:41.000000000 -0700 @@ -71,6 +71,15 @@ static char s2io_driver_name[] =3D "s2io"; static char s2io_driver_version[] =3D "Version 1.7.5.1"; =20 +/*=20 + * Cards with following subsystem_id have a link state indication + * problem, 600B, 600C, 600D, 640B, 640C and 640D. + * macro below identifies these cards given the subsystem_id. + */ +#define CARDS_WITH_FAULTY_LINK_INDICATORS(subid) \ + (((subid >=3D 0x600B) && (subid <=3D 0x600D)) || \ + ((subid >=3D 0x640B) && (subid <=3D 0x640D))) ? 1 : 0 + #define LINK_IS_UP(val64) (!(val64 & (ADAPTER_STATUS_RMAC_REMOTE_FAULT = | \ ADAPTER_STATUS_RMAC_LOCAL_FAULT))) #define TASKLET_IN_USE test_and_set_bit(0, \ @@ -563,10 +572,13 @@ schedule_timeout(HZ / 2); =20 /* Enable Receiving broadcasts */ + add =3D (void *) &bar0->mac_cfg; val64 =3D readq(&bar0->mac_cfg); val64 |=3D MAC_RMAC_BCAST_ENABLE; writeq(RMAC_CFG_KEY(0x4C0D), &bar0->rmac_cfg_key); - writeq(val64, &bar0->mac_cfg); + writel((u32) val64, add); + writeq(RMAC_CFG_KEY(0x4C0D), &bar0->rmac_cfg_key); + writel((u32) (val64 >> 32), (add + 4)); =20 /* Read registers in all blocks */ val64 =3D readq(&bar0->mac_int_mask); @@ -598,8 +610,8 @@ dtx_cnt++; goto mdio_cfg; } - writeq(default_dtx_cfg[dtx_cnt], - &bar0->dtx_control); + SPECIAL_REG_WRITE(default_dtx_cfg[dtx_cnt], + &bar0->dtx_control, UF); val64 =3D readq(&bar0->dtx_control); dtx_cnt++; } @@ -609,8 +621,8 @@ mdio_cnt++; goto dtx_cfg; } - writeq(default_mdio_cfg[mdio_cnt], - &bar0->mdio_control); + SPECIAL_REG_WRITE(default_mdio_cfg[mdio_cnt], + &bar0->mdio_control, UF); val64 =3D readq(&bar0->mdio_control); mdio_cnt++; } @@ -873,6 +885,47 @@ writel((u32) (val64 >> 32), (add + 4)); val64 =3D readq(&bar0->mac_cfg); =20 + /*=20 + * Set the time value to be inserted in the pause frame=20 + * generated by xena. + */ + val64 =3D readq(&bar0->rmac_pause_cfg); + val64 &=3D ~(RMAC_PAUSE_HG_PTIME(0xffff)); + val64 |=3D RMAC_PAUSE_HG_PTIME(nic->mac_control.rmac_pause_time); + writeq(val64, &bar0->rmac_pause_cfg); + + /*=20 + * Set the Threshold Limit for Generating the pause frame + * If the amount of data in any Queue exceeds ratio of + * (mac_control.mc_pause_threshold_q0q3 or q4q7)/256 + * pause frame is generated + */ + val64 =3D 0; + for (i =3D 0; i < 4; i++) { + val64 |=3D + (((u64) 0xFF00 | nic->mac_control. + mc_pause_threshold_q0q3) + << (i * 2 * 8)); + } + writeq(val64, &bar0->mc_pause_thresh_q0q3); + + val64 =3D 0; + for (i =3D 0; i < 4; i++) { + val64 |=3D + (((u64) 0xFF00 | nic->mac_control. + mc_pause_threshold_q4q7) + << (i * 2 * 8)); + } + writeq(val64, &bar0->mc_pause_thresh_q4q7); + + /*=20 + * TxDMA will stop Read request if the number of read split has=20 + * exceeded the limit pointed by shared_splits + */ + val64 =3D readq(&bar0->pic_control); + val64 |=3D PIC_CNTL_SHARED_SPLITS(0); + writeq(val64, &bar0->pic_control); + return SUCCESS; } =20 @@ -1227,7 +1280,7 @@ */ val64 =3D readq(&bar0->mc_rldram_mrs); val64 |=3D MC_RLDRAM_QUEUE_SIZE_ENABLE | MC_RLDRAM_MRS_ENABLE; - writeq(val64, &bar0->mc_rldram_mrs); + SPECIAL_REG_WRITE(val64, &bar0->mc_rldram_mrs, UF); val64 =3D readq(&bar0->mc_rldram_mrs); =20 set_current_state(TASK_UNINTERRUPTIBLE); @@ -1291,13 +1344,13 @@ * force link down. Since link is already up, we will get * link state change interrupt after this reset */ - writeq(0x80010515001E0000ULL, &bar0->dtx_control); + SPECIAL_REG_WRITE(0x80010515001E0000ULL, &bar0->dtx_control, UF); val64 =3D readq(&bar0->dtx_control); udelay(50); - writeq(0x80010515001E00E0ULL, &bar0->dtx_control); + SPECIAL_REG_WRITE(0x80010515001E00E0ULL, &bar0->dtx_control, UF); val64 =3D readq(&bar0->dtx_control); udelay(50); - writeq(0x80070515001F00E4ULL, &bar0->dtx_control); + SPECIAL_REG_WRITE(0x80070515001F00E4ULL, &bar0->dtx_control, UF); val64 =3D readq(&bar0->dtx_control); udelay(50); =20 @@ -1884,6 +1937,7 @@ =20 /* Handling link status change error Intr */ err_reg =3D readq(&bar0->mac_rmac_err_reg); + writeq(err_reg, &bar0->mac_rmac_err_reg); if (err_reg & RMAC_LINK_STATE_CHANGE_INT) { schedule_work(&nic->set_link_task); } @@ -1896,6 +1950,22 @@ schedule_work(&nic->rst_timer_task); } =20 + /* + * Also as mentioned in the latest Errata sheets if the PCC_FB_ECC + * Error occurs, the adapter will be recycled by disabling the + * adapter enable bit and enabling it again after the device=20 + * becomes Quiescent. + */ + val64 =3D readq(&bar0->pcc_err_reg); + writeq(val64, &bar0->pcc_err_reg); + if (val64 & PCC_FB_ECC_DB_ERR) { + u64 ac =3D readq(&bar0->adapter_control); + ac &=3D ~(ADAPTER_CNTL_EN); + writeq(ac, &bar0->adapter_control); + ac =3D readq(&bar0->adapter_control); + schedule_work(&nic->set_link_task); + } + /* Other type of interrupts are not being handled now, TODO */ } =20 @@ -2870,12 +2940,13 @@ =20 static int s2io_ethtool_idnic(struct net_device *dev, u32 data) { - u64 val64 =3D 0; + u64 val64 =3D 0, last_gpio_ctrl_val; nic_t *sp =3D dev->priv; XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; u16 subid; =20 subid =3D sp->pdev->subsystem_device; + last_gpio_ctrl_val =3D readq(&bar0->gpio_control); if ((subid & 0xFF) < 0x07) { val64 =3D readq(&bar0->adapter_control); if (!(val64 & ADAPTER_CNTL_EN)) { @@ -2897,6 +2968,11 @@ schedule_timeout(MAX_SCHEDULE_TIMEOUT); del_timer_sync(&sp->id_timer); =20 + if (CARDS_WITH_FAULTY_LINK_INDICATORS(subid)) { + writeq(last_gpio_ctrl_val, &bar0->gpio_control); + last_gpio_ctrl_val =3D readq(&bar0->gpio_control); + } + return 0; } =20 @@ -2983,7 +3059,7 @@ val64 =3D I2C_CONTROL_DEV_ID(S2IO_DEV_ID) | I2C_CONTROL_ADDR(off) | I2C_CONTROL_BYTE_CNT(0x3) | I2C_CONTROL_READ | I2C_CONTROL_CNTL_START; - writeq(val64, &bar0->i2c_control); + SPECIAL_REG_WRITE(val64, &bar0->i2c_control, LF); =20 while (exit_cnt < 5) { val64 =3D readq(&bar0->i2c_control); @@ -3024,7 +3100,7 @@ val64 =3D I2C_CONTROL_DEV_ID(S2IO_DEV_ID) | I2C_CONTROL_ADDR(off) | I2C_CONTROL_BYTE_CNT(cnt) | I2C_CONTROL_SET_DATA(data) | I2C_CONTROL_CNTL_START; - writeq(val64, &bar0->i2c_control); + SPECIAL_REG_WRITE(val64, &bar0->i2c_control, LF); =20 while (exit_cnt < 5) { val64 =3D readq(&bar0->i2c_control); @@ -3352,10 +3428,10 @@ =20 val64 =3D readq(&bar0->mc_rldram_mrs); val64 |=3D MC_RLDRAM_QUEUE_SIZE_ENABLE; - writeq(val64, &bar0->mc_rldram_mrs); + SPECIAL_REG_WRITE(val64, &bar0->mc_rldram_mrs, UF); =20 val64 |=3D MC_RLDRAM_MRS_ENABLE; - writeq(val64, &bar0->mc_rldram_mrs); + SPECIAL_REG_WRITE(val64, &bar0->mc_rldram_mrs, UF); =20 while (iteration < 2) { val64 =3D 0x55555555aaaa0000ULL; @@ -3757,8 +3833,10 @@ nic_t *nic =3D (nic_t *) data; struct net_device *dev =3D nic->dev; XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; - register u64 val64, err_reg; + register u64 val64; + u16 subid; =20 + subid =3D nic->pdev->subsystem_device; /*=20 * Allow a small delay for the NICs self initiated=20 * cleanup to complete. @@ -3768,16 +3846,19 @@ =20 val64 =3D readq(&bar0->adapter_status); if (verify_xena_quiescence(val64, nic->device_enabled_once)) { - /* Acknowledge Intr and clear R1 register. */ - err_reg =3D readq(&bar0->mac_rmac_err_reg); - writeq(err_reg, &bar0->mac_rmac_err_reg); - if (LINK_IS_UP(val64)) { val64 =3D readq(&bar0->adapter_control); val64 |=3D ADAPTER_CNTL_EN; writeq(val64, &bar0->adapter_control); - val64 |=3D ADAPTER_LED_ON; - writeq(val64, &bar0->adapter_control); + if (CARDS_WITH_FAULTY_LINK_INDICATORS(subid)) { + val64 =3D readq(&bar0->gpio_control); + val64 |=3D GPIO_CTRL_GPIO_0; + writeq(val64, &bar0->gpio_control); + val64 =3D readq(&bar0->gpio_control); + } else { + val64 |=3D ADAPTER_LED_ON; + writeq(val64, &bar0->adapter_control); + } val64 =3D readq(&bar0->adapter_status); if (!LINK_IS_UP(val64)) { DBG_PRINT(ERR_DBG, "%s:", dev->name); @@ -3791,6 +3872,12 @@ } s2io_link(nic, LINK_UP); } else { + if (CARDS_WITH_FAULTY_LINK_INDICATORS(subid)) { + val64 =3D readq(&bar0->gpio_control); + val64 &=3D ~GPIO_CTRL_GPIO_0; + writeq(val64, &bar0->gpio_control); + val64 =3D readq(&bar0->gpio_control); + } s2io_link(nic, LINK_DOWN); } } else { /* NIC is not Quiescent. */ @@ -3917,6 +4004,7 @@ return SUCCESS; } =20 + /** * s2io_link - stops/starts the Tx queue. * @sp : private member of the device structure, which is a pointer to = the diff -urN vanilla-linux/drivers/net/s2io.h = linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-07 11:44:04.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-08 15:20:09.316690064 -0700 @@ -693,6 +693,27 @@ writel((u32) (val), addr); writel((u32) (val >> 32), (addr + 4)); } + +/* In 32 bit modes, some registers have to be written in a=20 + * particular order to expect correct hardware operation. The + * macro SPECIAL_REG_WRITE is used to perform such ordered=20 + * writes. Defines UF (Upper First) and LF (Lower First) will=20 + * be used to specify the required write order. + */ +#define UF 1 +#define LF 2 +static inline void SPECIAL_REG_WRITE(u64 val, void *addr, int order) +{ + if (order =3D=3D LF) { + writel((u32) (val), addr); + writel((u32) (val >> 32), (addr + 4)); + } else { + writel((u32) (val >> 32), (addr + 4)); + writel((u32) (val), addr); + } +} +#else +#define SPECIAL_REG_WRITE(val, addr, dummy) writeq(val, addr) #endif =20 /* Interrupt related values of Xena */ ------=_NextPart_000_0037_01C4AD54.1C8FA2D0-- From acme@conectiva.com.br Fri Oct 8 16:37:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 16:37:12 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i98Nb2jv015140 for ; Fri, 8 Oct 2004 16:37:06 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 784184730E; Fri, 8 Oct 2004 20:04:55 -0300 (BRT) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id 2775B4736B for ; Fri, 8 Oct 2004 20:04:55 -0300 (BRT) Received: (qmail 7700 invoked by uid 0); 9 Oct 2004 00:02:00 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 9 Oct 2004 00:02:00 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id 71CBF14639; Fri, 8 Oct 2004 20:08:00 -0300 (BRT) Message-ID: <41671D9E.5030701@conectiva.com.br> Date: Fri, 08 Oct 2004 20:07:10 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Francois Romieu Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: PATCH 1/1: [SKBUFF] move common code to hdlc_type_trans References: <4165F5B2.5040807@conectiva.com.br> <20041008223611.GA7097@electric-eye.fr.zoreil.com> In-Reply-To: <20041008223611.GA7097@electric-eye.fr.zoreil.com> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Bogosity: No, tests=bogofilter, spamicity=0.031925, version=0.16.3 X-archive-position: 10083 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 Content-Length: 852 Lines: 24 Francois Romieu wrote: > Arnaldo Carvalho de Melo : > [dscc4.c sets skb->mac.raw after hdlc_type_trans] > >> Francois, is this really what is intended? I left it as > > > In the pre-eth_type_trans area, yes :o/ I did not test dscc4 in > a bridged setup. Please fix the driver in your patch. OK, I'll do that later today, i.e. just remove the skb->mac.raw = skb->data after the call to hdlc_type_trans as it already, like eth_type_trans, sets skb->mac.raw to skb->data prior to calling any hdlc layer type_trans pointer. For those paying attention to this lowly stuff, what do you think of renaming all those foo_type_trans to foo_setup_rx_skb (suggestions for a better name than foo_type_trans are welcome) and make it set skb->protocol, making it return just void? I think it makes the whole thing clearer... - Arnaldo From jgarzik@pobox.com Fri Oct 8 17:11:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 17:11:38 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i990BVF9019159 for ; Fri, 8 Oct 2004 17:11:32 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CG4pQ-0000Cv-OH; Sat, 09 Oct 2004 01:11:16 +0100 Message-ID: <41672C96.5050501@pobox.com> Date: Fri, 08 Oct 2004 20:11:02 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ravinandan.arakali@s2io.com CC: "'Francois Romieu'" , netdev@oss.sgi.com, leonid.grossman@s2io.com, raghavendra.koushik@s2io.com, rapuru.sriram@s2io.com Subject: Re: [PATCH 2.6.9-rc2 4/8] S2io: hardware fixes References: <003601c4ad8e$c8ee7ad0$9810100a@S2IOtech.com> In-Reply-To: <003601c4ad8e$c8ee7ad0$9810100a@S2IOtech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10084 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: 463 Lines: 17 48 hours passed between patch #3 and patch #4. Is there a problem with your email system? Also, your patches do not include the "signed-off-by" line described in the two documents I referenced. The "signed-off-by" line makes the lawyers happy. Since you missed that major legal item, please _read_ the following documents: http://linux.yyz.us/patch-format.html (see #5, "Sign your work") http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt Jeff From ravinandan.arakali@s2io.com Fri Oct 8 17:27:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 17:27:28 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i990RMZh021190 for ; Fri, 8 Oct 2004 17:27:23 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i990Quje019116; Fri, 8 Oct 2004 20:26:56 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i990Qs39009999; Fri, 8 Oct 2004 20:26:54 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" Cc: "'Francois Romieu'" , , , , Subject: RE: [PATCH 2.6.9-rc2 4/8] S2io: hardware fixes Date: Fri, 8 Oct 2004 17:34:31 -0700 Message-ID: <004301c4ad97$be6a7010$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <41672C96.5050501@pobox.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10085 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Content-Length: 1092 Lines: 36 Jeff, Sorry about that. We'll add the signed-off-by line. We are sending the patches as and when they are completed. In the next couple of days, the remaining patches should be done. Do you want us to send them after all are complete or is it okay to send each patch as and when completed ? Thanks, Ravi -----Original Message----- From: Jeff Garzik [mailto:jgarzik@pobox.com] Sent: Friday, October 08, 2004 5:11 PM To: ravinandan.arakali@s2io.com Cc: 'Francois Romieu'; netdev@oss.sgi.com; leonid.grossman@s2io.com; raghavendra.koushik@s2io.com; rapuru.sriram@s2io.com Subject: Re: [PATCH 2.6.9-rc2 4/8] S2io: hardware fixes 48 hours passed between patch #3 and patch #4. Is there a problem with your email system? Also, your patches do not include the "signed-off-by" line described in the two documents I referenced. The "signed-off-by" line makes the lawyers happy. Since you missed that major legal item, please _read_ the following documents: http://linux.yyz.us/patch-format.html (see #5, "Sign your work") http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt Jeff From jgarzik@pobox.com Fri Oct 8 17:32:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 17:32:16 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i990WAr1021594 for ; Fri, 8 Oct 2004 17:32:11 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CG59R-0000uW-9V; Sat, 09 Oct 2004 01:31:57 +0100 Message-ID: <41673170.6020402@pobox.com> Date: Fri, 08 Oct 2004 20:31:44 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ravinandan.arakali@s2io.com CC: "'Francois Romieu'" , netdev@oss.sgi.com, leonid.grossman@s2io.com, raghavendra.koushik@s2io.com, rapuru.sriram@s2io.com Subject: Re: [PATCH 2.6.9-rc2 4/8] S2io: hardware fixes References: <004301c4ad97$be6a7010$9810100a@S2IOtech.com> In-Reply-To: <004301c4ad97$be6a7010$9810100a@S2IOtech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10086 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: 454 Lines: 15 Ravinandan Arakali wrote: > Jeff, > Sorry about that. We'll add the signed-off-by line. > We are sending the patches as and when they are completed. > In the next couple of days, the remaining patches should > be done. Do you want us to send them after all are complete > or is it okay to send each patch as and when completed ? I apply a patch series all at the same time. So, right now I'm waiting for patches 5-8 before I will apply 1-8. Jeff From rddunlap@osdl.org Fri Oct 8 20:33:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 20:33:51 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i993XkHc029794 for ; Fri, 8 Oct 2004 20:33:46 -0700 Received: from midway.verizon.net (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i993XRL04902; Fri, 8 Oct 2004 20:33:27 -0700 Date: Fri, 8 Oct 2004 20:30:27 -0700 From: "Randy.Dunlap" To: netdev@oss.sgi.com Cc: davem@davemloft.net Subject: [PATCH] pktgen: sprintf arg type warning Message-Id: <20041008203027.643a2a97.rddunlap@osdl.org> Organization: OSDL X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i386-vine-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10087 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rddunlap@osdl.org Precedence: bulk X-list: netdev Content-Length: 935 Lines: 30 Fix sprintf arg type error (gcc 3.3.3), although it looks more like a gcc problem than a kernel source code problem to me. Doesn't matter on x86-32. Fixes a warning on x86-64. net/core/pktgen.c:607: warning: long long unsigned int format, long unsigned int arg (arg 4) Signed-off-by: Randy Dunlap diffstat:= net/core/pktgen.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -Naurp ./net/core/pktgen.c~pktgen_type ./net/core/pktgen.c --- ./net/core/pktgen.c~pktgen_type 2004-10-06 15:04:06.260548504 -0700 +++ ./net/core/pktgen.c 2004-10-08 20:16:57.191340296 -0700 @@ -603,7 +603,7 @@ static void show_results(struct pktgen_i do_div(idle, cpu_speed); p += sprintf(p, "OK: %llu(c%llu+d%lu) usec, %llu (%dbyte,%dfrags)\n", - total, total - idle, idle, + total, total - (__u64)idle, idle, info->sofar, size, nr_frags); pps = info->sofar * USEC_PER_SEC; -- ~Randy From davem@davemloft.net Fri Oct 8 22:21:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 22:21:27 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i995LL1F032519 for ; Fri, 8 Oct 2004 22:21:21 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CG9dm-0004bz-00; Fri, 08 Oct 2004 22:19:34 -0700 Date: Fri, 8 Oct 2004 22:19:34 -0700 From: "David S. Miller" To: "Randy.Dunlap" Cc: netdev@oss.sgi.com Subject: Re: [PATCH] pktgen: sprintf arg type warning Message-Id: <20041008221934.42a6bc7a.davem@davemloft.net> In-Reply-To: <20041008203027.643a2a97.rddunlap@osdl.org> References: <20041008203027.643a2a97.rddunlap@osdl.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10088 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 499 Lines: 12 On Fri, 8 Oct 2004 20:30:27 -0700 "Randy.Dunlap" wrote: > > Fix sprintf arg type error (gcc 3.3.3), although it looks more like > a gcc problem than a kernel source code problem to me. > Doesn't matter on x86-32. Fixes a warning on x86-64. > > net/core/pktgen.c:607: warning: long long unsigned int format, long unsigned int arg (arg 4) This won't fix the problem on sparc64 where u64 is an "unsigned long" So, just cast the thing to the type gcc wants "unsigned long long" From herbert@gondor.apana.org.au Fri Oct 8 23:53:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 08 Oct 2004 23:53:55 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i996rjFm002584 for ; Fri, 8 Oct 2004 23:53:46 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CGB6a-0004c1-00; Sat, 09 Oct 2004 16:53:24 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CGB6X-0007hP-00; Sat, 09 Oct 2004 16:53:21 +1000 Date: Sat, 9 Oct 2004 16:53:21 +1000 To: James Morris Cc: netdev@oss.sgi.com Subject: Re: TCP crashes when cycling loopback interface. Message-ID: <20041009065320.GA28738@gondor.apana.org.au> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="BOKacYhQ+x31HxR3" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10090 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 1508 Lines: 46 --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Oct 07, 2004 at 12:46:25PM -0400, James Morris wrote: > > Two runs with the following crashes: > > KERNEL: assertion (!skb_queue_empty(&sk->sk_write_queue)) failed at net/ipv4/tcp_timer.c (322) Right so it didn't trigger the paths I was looking at. Unfortunately I can't reproduce this crash at all by doing the ifdown/ifup loop. However I'm testing Linus's tree as opposed to mm. Can you please try that to see if it's something in mm? If you can get it with Linus's tree, please apply this patch so that we know a bit more about what we're looking for. Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=q ===== net/ipv4/tcp_timer.c 1.24 vs edited ===== --- 1.24/net/ipv4/tcp_timer.c 2004-09-08 02:18:04 +10:00 +++ edited/net/ipv4/tcp_timer.c 2004-10-09 16:51:20 +10:00 @@ -319,6 +319,9 @@ if (!tcp_get_pcount(&tp->packets_out)) goto out; + if (skb_queue_empty(&sk->sk_write_queue)) + printk(KERN_DEBUG "TCP: empty write queue packets_out = %d", + tcp_get_pcount(&tp->packets_out)); BUG_TRAP(!skb_queue_empty(&sk->sk_write_queue)); if (!tp->snd_wnd && !sock_flag(sk, SOCK_DEAD) && --BOKacYhQ+x31HxR3-- From margitsw@t-online.de Sat Oct 9 06:44:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 09 Oct 2004 06:44:34 -0700 (PDT) Received: from mailout06.sul.t-online.com (mailout06.sul.t-online.com [194.25.134.19]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i99DiLJv020466 for ; Sat, 9 Oct 2004 06:44:21 -0700 Received: from fwd09.aul.t-online.de by mailout06.sul.t-online.com with smtp id 1CGHW0-0007vP-01; Sat, 09 Oct 2004 15:44:04 +0200 Received: from roglap.local (G0EtO0ZAoe8JwpMdqXK0WtmrxaAcNDZXzc3BUZg0WqHZqW2i4ROVw+@[217.226.123.208]) by fwd09.sul.t-online.com with esmtp id 1CGHVr-0x2q6S0; Sat, 9 Oct 2004 15:43:55 +0200 From: margitsw@t-online.de (Margit Schubert-While) To: jgarzik@pobox.com Subject: [PATCH 1/1 linux-2.4.28-pre3] prism54 status to 2.6 Date: Sat, 9 Oct 2004 15:17:58 +0200 User-Agent: KMail/1.5.4 Cc: netdev@oss.sgi.com, prism54-devel@prism54.org MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_GU+ZBATpW1uVEv/" Message-Id: <200410091517.58362.margitsw@t-online.de> X-ID: G0EtO0ZAoe8JwpMdqXK0WtmrxaAcNDZXzc3BUZg0WqHZqW2i4ROVw+ X-TOI-MSGID: 55a8946f-ceb0-4ae9-ac6c-0ef2e087b717 X-archive-position: 10091 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: margitsw@t-online.de Precedence: bulk X-list: netdev Content-Length: 6757 Lines: 201 --Boundary-00=_GU+ZBATpW1uVEv/ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline 2004-10-09 Margit Schubert-While * 01_26compat.patch * Bring prism54 into line with 2.6 after Linus's * sparse patches. Thereafter patches will again be * common to 2.4/2.6 Jeff, do you want that I directly copy Marcelo on patches ? Margit --Boundary-00=_GU+ZBATpW1uVEv/ Content-Type: text/x-diff; charset="us-ascii"; name="01_26compat.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="01_26compat.patch" diff -Naur linux-2.4.28-pre3/drivers/net/wireless/prism54/isl_38xx.c linux-2.4.28-pre3msw/drivers/net/wireless/prism54/isl_38xx.c --- linux-2.4.28-pre3/drivers/net/wireless/prism54/isl_38xx.c 2004-10-09 14:07:05.000000000 +0200 +++ linux-2.4.28-pre3msw/drivers/net/wireless/prism54/isl_38xx.c 2004-10-09 14:11:59.000000000 +0200 @@ -44,7 +44,7 @@ * register located at offset %ISL38XX_INT_IDENT_REG. */ void -isl38xx_disable_interrupts(void *device) +isl38xx_disable_interrupts(void __iomem *device) { isl38xx_w32_flush(device, 0x00000000, ISL38XX_INT_EN_REG); udelay(ISL38XX_WRITEIO_DELAY); @@ -52,7 +52,7 @@ void isl38xx_handle_sleep_request(isl38xx_control_block *control_block, - int *powerstate, void *device_base) + int *powerstate, void __iomem *device_base) { /* device requests to go into sleep mode * check whether the transmit queues for data and management are empty */ @@ -88,7 +88,7 @@ void isl38xx_handle_wakeup(isl38xx_control_block *control_block, - int *powerstate, void *device_base) + int *powerstate, void __iomem *device_base) { /* device is in active state, update the powerstate flag */ *powerstate = ISL38XX_PSM_ACTIVE_STATE; @@ -110,7 +110,7 @@ } void -isl38xx_trigger_device(int asleep, void *device_base) +isl38xx_trigger_device(int asleep, void __iomem *device_base) { struct timeval current_time; u32 reg, counter = 0; @@ -190,7 +190,7 @@ } void -isl38xx_interface_reset(void *device_base, dma_addr_t host_address) +isl38xx_interface_reset(void __iomem *device_base, dma_addr_t host_address) { #if VERBOSE > SHOW_ERROR_MESSAGES DEBUG(SHOW_FUNCTION_CALLS, "isl38xx_interface_reset\n"); @@ -214,7 +214,7 @@ } void -isl38xx_enable_common_interrupts(void *device_base) { +isl38xx_enable_common_interrupts(void __iomem *device_base) { u32 reg; reg = ( ISL38XX_INT_IDENT_UPDATE | ISL38XX_INT_IDENT_SLEEP | ISL38XX_INT_IDENT_WAKEUP); diff -Naur linux-2.4.28-pre3/drivers/net/wireless/prism54/isl_38xx.h linux-2.4.28-pre3msw/drivers/net/wireless/prism54/isl_38xx.h --- linux-2.4.28-pre3/drivers/net/wireless/prism54/isl_38xx.h 2004-10-09 14:07:05.000000000 +0200 +++ linux-2.4.28-pre3msw/drivers/net/wireless/prism54/isl_38xx.h 2004-10-09 14:11:59.000000000 +0200 @@ -75,7 +75,7 @@ * from the %ISL38XX_PCI_POSTING_FLUSH offset. */ static inline void -isl38xx_w32_flush(void *base, u32 val, unsigned long offset) +isl38xx_w32_flush(void __iomem *base, u32 val, unsigned long offset) { writel(val, base + offset); (void) readl(base + ISL38XX_PCI_POSTING_FLUSH); @@ -161,13 +161,13 @@ /* determine number of entries currently in queue */ int isl38xx_in_queue(isl38xx_control_block *cb, int queue); -void isl38xx_disable_interrupts(void *); -void isl38xx_enable_common_interrupts(void *); +void isl38xx_disable_interrupts(void __iomem *); +void isl38xx_enable_common_interrupts(void __iomem *); void isl38xx_handle_sleep_request(isl38xx_control_block *, int *, - void *); -void isl38xx_handle_wakeup(isl38xx_control_block *, int *, void *); -void isl38xx_trigger_device(int, void *); -void isl38xx_interface_reset(void *, dma_addr_t); + void __iomem *); +void isl38xx_handle_wakeup(isl38xx_control_block *, int *, void __iomem *); +void isl38xx_trigger_device(int, void __iomem *); +void isl38xx_interface_reset(void __iomem *, dma_addr_t); #endif /* _ISL_38XX_H */ diff -Naur linux-2.4.28-pre3/drivers/net/wireless/prism54/islpci_dev.c linux-2.4.28-pre3msw/drivers/net/wireless/prism54/islpci_dev.c --- linux-2.4.28-pre3/drivers/net/wireless/prism54/islpci_dev.c 2004-10-09 14:07:05.000000000 +0200 +++ linux-2.4.28-pre3msw/drivers/net/wireless/prism54/islpci_dev.c 2004-10-09 14:11:59.000000000 +0200 @@ -58,7 +58,7 @@ isl_upload_firmware(islpci_private *priv) { u32 reg, rc; - void *device_base = priv->device_base; + void __iomem *device_base = priv->device_base; /* clear the RAMBoot and the Reset bit */ reg = readl(device_base + ISL38XX_CTRL_STAT_REG); @@ -113,7 +113,7 @@ (fw_len > ISL38XX_MEMORY_WINDOW_SIZE) ? ISL38XX_MEMORY_WINDOW_SIZE : fw_len; - u32 *dev_fw_ptr = device_base + ISL38XX_DIRECT_MEM_WIN; + u32 __iomem *dev_fw_ptr = device_base + ISL38XX_DIRECT_MEM_WIN; /* set the cards base address for writting the data */ isl38xx_w32_flush(device_base, reg, @@ -187,7 +187,7 @@ u32 reg; islpci_private *priv = config; struct net_device *ndev = priv->ndev; - void *device = priv->device_base; + void __iomem *device = priv->device_base; int powerstate = ISL38XX_PSM_POWERSAVE_STATE; /* lock the interrupt handler */ @@ -407,7 +407,7 @@ static int prism54_bring_down(islpci_private *priv) { - void *device_base = priv->device_base; + void __iomem *device_base = priv->device_base; u32 reg; /* we are going to shutdown the device */ islpci_set_state(priv, PRV_STATE_PREBOOT); diff -Naur linux-2.4.28-pre3/drivers/net/wireless/prism54/islpci_dev.h linux-2.4.28-pre3msw/drivers/net/wireless/prism54/islpci_dev.h --- linux-2.4.28-pre3/drivers/net/wireless/prism54/islpci_dev.h 2004-10-09 14:07:05.000000000 +0200 +++ linux-2.4.28-pre3msw/drivers/net/wireless/prism54/islpci_dev.h 2004-10-09 14:11:59.000000000 +0200 @@ -113,7 +113,7 @@ u32 pci_state[16]; /* used for suspend/resume */ char firmware[33]; - void *device_base; /* ioremapped device base address */ + void __iomem *device_base; /* ioremapped device base address */ /* consistent DMA region */ void *driver_mem_address; /* base DMA address */ diff -Naur linux-2.4.28-pre3/drivers/net/wireless/prism54/prismcompat24.h linux-2.4.28-pre3msw/drivers/net/wireless/prism54/prismcompat24.h --- linux-2.4.28-pre3/drivers/net/wireless/prism54/prismcompat24.h 2004-10-09 14:07:05.000000000 +0200 +++ linux-2.4.28-pre3msw/drivers/net/wireless/prism54/prismcompat24.h 2004-10-09 14:11:59.000000000 +0200 @@ -51,6 +51,10 @@ #define INIT_WORK INIT_TQUEUE #define schedule_work schedule_task +#ifndef __iomem +#define __iomem +#endif + #if !defined(HAVE_NETDEV_PRIV) #define netdev_priv(x) (x)->priv #endif --Boundary-00=_GU+ZBATpW1uVEv/-- From margitsw@t-online.de Sat Oct 9 07:01:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 09 Oct 2004 07:01:35 -0700 (PDT) Received: from mailout08.sul.t-online.com (mailout08.sul.t-online.com [194.25.134.20]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i99E1T4r021301 for ; Sat, 9 Oct 2004 07:01:30 -0700 Received: from fwd09.aul.t-online.de by mailout08.sul.t-online.com with smtp id 1CGHmb-0005ej-02; Sat, 09 Oct 2004 16:01:13 +0200 Received: from margit.t-online.de (JlTM2gZSweggQ0fVs5PFGPqW5TWuHvZ6QXX8dQTjDbc-3+lsmQWfkf@[217.255.112.42]) by fwd09.sul.t-online.com with esmtp id 1CGHmS-0M2f4K0; Sat, 9 Oct 2004 16:01:04 +0200 Message-Id: <5.1.0.14.2.20041009155130.02572408@pop.t-online.de> X-Sender: margitsw@pop.t-online.de X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Sat, 09 Oct 2004 16:01:33 +0200 To: jgarzik@pobox.com From: margitsw@t-online.de (Margit Schubert-While) Subject: wireless.h and sparse warnings Cc: netdev@oss.sgi.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-ID: JlTM2gZSweggQ0fVs5PFGPqW5TWuHvZ6QXX8dQTjDbc-3+lsmQWfkf X-TOI-MSGID: f835e20f-d70a-4dec-8352-2b8cd1794e99 X-archive-position: 10092 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: margitsw@t-online.de Precedence: bulk X-list: netdev Content-Length: 402 Lines: 15 Problem getting rid of sparse warnings. Using wireless_send_event for a custom event (eg, in prism54 driver), we need to use the union "iwreq_data" (from wireless.h), specifically the "data.pointer" member initialized to a kmalloc'd area. Therein lies the problem as "data.pointer" has attribute "__user"; so a "iwrqun.data.pointer = memptr;" throws sparse warnings. Anybody got any ideas ? Margit From hadi@cyberus.ca Sat Oct 9 08:48:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 09 Oct 2004 08:49:08 -0700 (PDT) Received: from mx03.cybersurf.com (mx03.cybersurf.com [209.197.145.106]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i99Fmuvi027498 for ; Sat, 9 Oct 2004 08:48:57 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.30) id 1CGJSX-0006w5-SH for netdev@oss.sgi.com; Sat, 09 Oct 2004 11:48:37 -0400 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CGJSU-0006Je-M1; Sat, 09 Oct 2004 11:48:34 -0400 Subject: Re: [PATCH 5/5] PKT_SCHED: Qdisc are not supposed to dump TCA_STATS themselves From: jamal Reply-To: hadi@cyberus.ca To: Thomas Graf Cc: "David S. Miller" , netdev@oss.sgi.com In-Reply-To: <20041007010819.GF18621@postel.suug.ch> References: <20041007010146.GA18621@postel.suug.ch> <20041007010819.GF18621@postel.suug.ch> Content-Type: text/plain Organization: jamalopolous Message-Id: <1097336911.1051.149.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 09 Oct 2004 11:48:31 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 10093 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev Content-Length: 1680 Lines: 52 1-4 look good. Caveat to note Dave: both old TC_STAT as well as new TC_STAT2 will be generated. Newer software can ignore TC_STAT and older s/ware can ignore TC_STAT2. patch 5 is a fix thats independent to 1-4 and should be applied regardless of the status of 1-4 cheers, jamal, semi-alive On Wed, 2004-10-06 at 21:08, Thomas Graf wrote: > hfsc and htb qdisc are not supposed to copy TCA_STATS > on their own and queue length statistic is already > updated in generic code part. > > Signed-off-by: Thomas Graf > > diff -Nru linux-2.6.9-rc3-bk6.orig/net/sched/sch_hfsc.c linux-2.6.9-rc3-bk6/net/sched/sch_hfsc.c > --- linux-2.6.9-rc3-bk6.orig/net/sched/sch_hfsc.c 2004-10-07 00:32:25.000000000 +0200 > +++ linux-2.6.9-rc3-bk6/net/sched/sch_hfsc.c 2004-10-07 00:55:35.000000000 +0200 > @@ -1653,11 +1653,6 @@ > > qopt.defcls = q->defcls; > RTA_PUT(skb, TCA_OPTIONS, sizeof(qopt), &qopt); > - > - sch->stats.qlen = sch->q.qlen; > - if (qdisc_copy_stats(skb, &sch->stats, sch->stats_lock) < 0) > - goto rtattr_failure; > - > return skb->len; > > rtattr_failure: > diff -Nru linux-2.6.9-rc3-bk6.orig/net/sched/sch_htb.c linux-2.6.9-rc3-bk6/net/sched/sch_htb.c > --- linux-2.6.9-rc3-bk6.orig/net/sched/sch_htb.c 2004-10-07 00:32:25.000000000 +0200 > +++ linux-2.6.9-rc3-bk6/net/sched/sch_htb.c 2004-10-07 00:55:22.000000000 +0200 > @@ -1332,8 +1332,6 @@ > RTA_PUT(skb, TCA_OPTIONS, 0, NULL); > RTA_PUT(skb, TCA_HTB_INIT, sizeof(gopt), &gopt); > rta->rta_len = skb->tail - b; > - sch->stats.qlen = sch->q.qlen; > - RTA_PUT(skb, TCA_STATS, sizeof(sch->stats), &sch->stats); > HTB_QUNLOCK(sch); > return skb->len; > rtattr_failure: > > From tgraf@suug.ch Sat Oct 9 09:25:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 09 Oct 2004 09:26:02 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i99GPu3U028694 for ; Sat, 9 Oct 2004 09:25:57 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 685D681; Sat, 9 Oct 2004 18:25:19 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 655AB1C0E9; Sat, 9 Oct 2004 18:26:02 +0200 (CEST) Date: Sat, 9 Oct 2004 18:26:02 +0200 From: Thomas Graf To: jamal Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 5/5] PKT_SCHED: Qdisc are not supposed to dump TCA_STATS themselves Message-ID: <20041009162602.GA21977@postel.suug.ch> References: <20041007010146.GA18621@postel.suug.ch> <20041007010819.GF18621@postel.suug.ch> <1097336911.1051.149.camel@jzny.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1097336911.1051.149.camel@jzny.localdomain> X-archive-position: 10094 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 988 Lines: 22 > 1-4 look good. > > Caveat to note Dave: both old TC_STAT as well as new TC_STAT2 will be > generated. Newer software can ignore TC_STAT and older s/ware can ignore > TC_STAT2. Correct, I tested all these cases and it works perfectly fine. I also completed porting TCA_XSTATS to the new gnet_stats by introducing dump_stats to Qdisc_ops. I ported your requeues patch and added a missing update in SFQ qdisc. I will send those changes once these have been approved. I will do the same for classes and classifiers, although we will have to talk about it a little as soon as you feel better again. I guess the classifier part will involve changing the action code. > patch 5 is a fix thats independent to 1-4 and should be applied > regardless of the status of 1-4 Right, same for the cbq fix I sent a bit later which I have no clue how it is possible that such a major bug can live for so long, I've been triggering this bug for over 3 years and didn't notice anything until now :-> From hadi@cyberus.ca Sat Oct 9 09:42:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 09 Oct 2004 09:42:13 -0700 (PDT) Received: from mx02.cybersurf.com (mx02.cybersurf.com [209.197.145.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i99Gg8g5029254 for ; Sat, 9 Oct 2004 09:42:08 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1CGKI5-000829-DR for netdev@oss.sgi.com; Sat, 09 Oct 2004 12:41:53 -0400 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CGKI2-0002gn-Hf; Sat, 09 Oct 2004 12:41:50 -0400 Subject: Re: [PATCH 5/5] PKT_SCHED: Qdisc are not supposed to dump TCA_STATS themselves From: jamal Reply-To: hadi@cyberus.ca To: Thomas Graf Cc: "David S. Miller" , netdev@oss.sgi.com In-Reply-To: <20041009162602.GA21977@postel.suug.ch> References: <20041007010146.GA18621@postel.suug.ch> <20041007010819.GF18621@postel.suug.ch> <1097336911.1051.149.camel@jzny.localdomain> <20041009162602.GA21977@postel.suug.ch> Content-Type: text/plain Organization: jamalopolous Message-Id: <1097340107.1051.178.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 09 Oct 2004 12:41:47 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 10095 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev Content-Length: 1643 Lines: 44 On Sat, 2004-10-09 at 12:26, Thomas Graf wrote: > > 1-4 look good. > > > > Caveat to note Dave: both old TC_STAT as well as new TC_STAT2 will be > > generated. Newer software can ignore TC_STAT and older s/ware can ignore > > TC_STAT2. > > Correct, I tested all these cases and it works perfectly fine. > > I also completed porting TCA_XSTATS to the new gnet_stats by > introducing dump_stats to Qdisc_ops. I ported your requeues patch > and added a missing update in SFQ qdisc. I will send those changes > once these have been approved. Much appreciated. > I will do the same for classes > and classifiers, although we will have to talk about it a little > as soon as you feel better again. I guess the classifier part will > involve changing the action code. The action code change is trivial since the dump_stats exists. Located in cls_api.c in call to copy_stats. My recomendation is to to not even bother using old API since this is new code. Go ahead and rip it out and just send TC_STAT2 _only_ Sorry, dont have the energy to do it right now. > > > patch 5 is a fix thats independent to 1-4 and should be applied > > regardless of the status of 1-4 > > Right, same for the cbq fix I sent a bit later which I have no clue how it is > possible that such a major bug can live for so long, I've been triggering > this bug for over 3 years and didn't notice anything until now :-> Youve heard of the TheLinuxWAY(tm) I hope ;-> Otherwise know as cutnpaste. One has bug others follow ;-> BTW, you would be submitting the iproute2 patches as well, correct ? i.e you are not just using your tool to do the testing? cheers, jamal From tgraf@suug.ch Sat Oct 9 09:56:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 09 Oct 2004 09:56:25 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i99GuJ02029953 for ; Sat, 9 Oct 2004 09:56:19 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 6B0A081; Sat, 9 Oct 2004 18:55:43 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id E54B01C0E9; Sat, 9 Oct 2004 18:56:25 +0200 (CEST) Date: Sat, 9 Oct 2004 18:56:25 +0200 From: Thomas Graf To: jamal Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 5/5] PKT_SCHED: Qdisc are not supposed to dump TCA_STATS themselves Message-ID: <20041009165625.GB21977@postel.suug.ch> References: <20041007010146.GA18621@postel.suug.ch> <20041007010819.GF18621@postel.suug.ch> <1097336911.1051.149.camel@jzny.localdomain> <20041009162602.GA21977@postel.suug.ch> <1097340107.1051.178.camel@jzny.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1097340107.1051.178.camel@jzny.localdomain> X-archive-position: 10096 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 946 Lines: 21 > The action code change is trivial since the dump_stats exists. Located > in cls_api.c in call to copy_stats. > My recomendation is to to not even bother using old API since this is > new code. Go ahead and rip it out and just send TC_STAT2 _only_ > Sorry, dont have the energy to do it right now. OK, will do, doesn't take too long I guess. > Youve heard of the TheLinuxWAY(tm) I hope ;-> Otherwise know as > cutnpaste. One has bug others follow ;-> I know, I was more amazed by how long a slab corruption can exist without anyone noticing ;) > BTW, you would be submitting the iproute2 patches as well, correct ? > i.e you are not just using your tool to do the testing? Sure, once the kernel part is done. I use iproute2 to check if the backward compatibility is working and my tool in debug mode printing out the hierarchy of the TLVs to see if the new stuff is all right. Adding support to iproute will not take longer than 1-2 hours. From sam@errno.com Sat Oct 9 10:30:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 09 Oct 2004 10:30:12 -0700 (PDT) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i99HU6TY030973 for ; Sat, 9 Oct 2004 10:30:07 -0700 Received: from [66.127.85.93] ([66.127.85.93]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id i99HTnWi083610 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 9 Oct 2004 10:29:49 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <41682021.3080400@errno.com> Date: Sat, 09 Oct 2004 10:30:09 -0700 From: Sam Leffler Organization: Errrno Consulting User-Agent: Mozilla Thunderbird 0.8 (Macintosh/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" CC: "Randy.Dunlap" , netdev@oss.sgi.com Subject: Re: [PATCH] pktgen: sprintf arg type warning References: <20041008203027.643a2a97.rddunlap@osdl.org> <20041008221934.42a6bc7a.davem@davemloft.net> In-Reply-To: <20041008221934.42a6bc7a.davem@davemloft.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10097 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sam@errno.com Precedence: bulk X-list: netdev Content-Length: 634 Lines: 20 David S. Miller wrote: > On Fri, 8 Oct 2004 20:30:27 -0700 > "Randy.Dunlap" wrote: > > >>Fix sprintf arg type error (gcc 3.3.3), although it looks more like >>a gcc problem than a kernel source code problem to me. >>Doesn't matter on x86-32. Fixes a warning on x86-64. >> >>net/core/pktgen.c:607: warning: long long unsigned int format, long unsigned int arg (arg 4) > > > This won't fix the problem on sparc64 where u64 is an "unsigned long" > So, just cast the thing to the type gcc wants "unsigned long long" > Other systems have addressed this problem by extending printf with portable %formats. Sam From ak@suse.de Sat Oct 9 10:37:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 09 Oct 2004 10:37:09 -0700 (PDT) Received: from Cantor.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i99Hb3Q2031449 for ; Sat, 9 Oct 2004 10:37:05 -0700 Received: from hermes.suse.de (hermes-ext.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 DD858D15F1E; Sat, 9 Oct 2004 19:36:44 +0200 (CEST) Date: Sat, 9 Oct 2004 19:36:44 +0200 From: Andi Kleen To: Sam Leffler Cc: "David S. Miller" , "Randy.Dunlap" , netdev@oss.sgi.com Subject: Re: [PATCH] pktgen: sprintf arg type warning Message-ID: <20041009173644.GC30713@wotan.suse.de> References: <20041008203027.643a2a97.rddunlap@osdl.org> <20041008221934.42a6bc7a.davem@davemloft.net> <41682021.3080400@errno.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41682021.3080400@errno.com> X-archive-position: 10098 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 Content-Length: 255 Lines: 9 > Other systems have addressed this problem by extending printf with > portable %formats. Problem is that gcc -Wformat doesn't know the new format codes, and in Linux we still have to support old gcc versions. Standard trick is to cast to long. -Andi From sfeldma@pobox.com Sat Oct 9 10:39:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 09 Oct 2004 10:39:08 -0700 (PDT) Received: from sasl.smtp.pobox.com (puzzle.sasl.smtp.pobox.com [207.8.226.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i99Hd2dL031829 for ; Sat, 9 Oct 2004 10:39:02 -0700 Received: from localhost.localdomain (localhost [127.0.0.1]) by puzzle.pobox.com (Postfix) with ESMTP id A8090138F34; Sat, 9 Oct 2004 13:38:12 -0400 (EDT) Received: from [192.168.0.3] (wbar2.sea1-4-5-062-153.sea1.dsl-verizon.net [4.5.62.153]) by puzzle.pobox.com (Postfix) with ESMTP id 9F6C1138EF9; Sat, 9 Oct 2004 13:38:11 -0400 (EDT) Subject: Re: e1000 kick From: Scott Feldman Reply-To: sfeldma@pobox.com To: Scott Huang Cc: netdev@oss.sgi.com In-Reply-To: <20041008231713.1126.qmail@web80401.mail.yahoo.com> References: <20041008231713.1126.qmail@web80401.mail.yahoo.com> Content-Type: text/plain Message-Id: <1097343522.3903.25.camel@sfeldma-mobl2.dsl-verizon.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Sat, 09 Oct 2004 10:38:43 -0700 Content-Transfer-Encoding: 7bit X-archive-position: 10099 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sfeldma@pobox.com Precedence: bulk X-list: netdev Content-Length: 429 Lines: 14 On Fri, 2004-10-08 at 16:17, Scott Huang wrote: > Is there a way to force tx dma to start on e1000 after > the I fill up the tx ring to a certain level? Just delay the write of the Tx tail index (TDT). Writing to the Tx tail index signals hardware to start the DMA from Tx head index (TDH) to TDT. See code for E1000_WRITE_REG(&adapter->hw, TDT, i); But don't delay too long...you'll trigger the tx_timeout reset. -scott From sam@errno.com Sat Oct 9 10:50:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 09 Oct 2004 10:50:05 -0700 (PDT) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i99HnxeX032350 for ; Sat, 9 Oct 2004 10:49:59 -0700 Received: from [66.127.85.93] ([66.127.85.93]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id i99HnZWi083704 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 9 Oct 2004 10:49:35 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <416824C3.9040903@errno.com> Date: Sat, 09 Oct 2004 10:49:55 -0700 From: Sam Leffler Organization: Errrno Consulting User-Agent: Mozilla Thunderbird 0.8 (Macintosh/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andi Kleen CC: "David S. Miller" , "Randy.Dunlap" , netdev@oss.sgi.com Subject: Re: [PATCH] pktgen: sprintf arg type warning References: <20041008203027.643a2a97.rddunlap@osdl.org> <20041008221934.42a6bc7a.davem@davemloft.net> <41682021.3080400@errno.com> <20041009173644.GC30713@wotan.suse.de> In-Reply-To: <20041009173644.GC30713@wotan.suse.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10100 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sam@errno.com Precedence: bulk X-list: netdev Content-Length: 436 Lines: 18 Andi Kleen wrote: >>Other systems have addressed this problem by extending printf with >>portable %formats. > > > Problem is that gcc -Wformat doesn't know the new format codes, > and in Linux we still have to support old gcc versions. Yes, gcc has been modified to understand the new %formats. That's the advantage to distributing a full system and not just a kernel :) > > Standard trick is to cast to long. > > -Andi > > From rddunlap@osdl.org Sat Oct 9 15:10:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 09 Oct 2004 15:10:32 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i99MARsJ008978 for ; Sat, 9 Oct 2004 15:10:27 -0700 Received: from [127.0.0.1] (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i99MA8L11355; Sat, 9 Oct 2004 15:10:08 -0700 Message-ID: <41686107.7030508@osdl.org> Date: Sat, 09 Oct 2004 15:07:03 -0700 From: "Randy.Dunlap" User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" CC: netdev@oss.sgi.com Subject: [PATCH] pktgen: sprintf arg type warning References: <20041008203027.643a2a97.rddunlap@osdl.org> <20041008221934.42a6bc7a.davem@davemloft.net> In-Reply-To: <20041008221934.42a6bc7a.davem@davemloft.net> Content-Type: multipart/mixed; boundary="------------090406030500080203010406" X-archive-position: 10101 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rddunlap@osdl.org Precedence: bulk X-list: netdev Content-Length: 1463 Lines: 46 This is a multi-part message in MIME format. --------------090406030500080203010406 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > This won't fix the problem on sparc64 where u64 is an "unsigned long" > So, just cast the thing to the type gcc wants "unsigned long long" Yep, I should have known that. New patch attached. (Note: testing new mail client; hopefully it's not munged.) -- ~Randy --------------090406030500080203010406 Content-Type: text/x-patch; name="pktgen_type.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="pktgen_type.patch" Fix printk arg format warning: net/core/pktgen.c:607: warning: long long unsigned int format, long unsigned int arg (arg 4) Signed-off-by: Randy Dunlap diffstat:= net/core/pktgen.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -Naurp ./net/core/pktgen.c~pktgen_type ./net/core/pktgen.c --- ./net/core/pktgen.c~pktgen_type 2004-10-06 15:04:06.260548504 -0700 +++ ./net/core/pktgen.c 2004-10-09 15:04:10.907452600 -0700 @@ -603,7 +603,7 @@ static void show_results(struct pktgen_i do_div(idle, cpu_speed); p += sprintf(p, "OK: %llu(c%llu+d%lu) usec, %llu (%dbyte,%dfrags)\n", - total, total - idle, idle, + total, (unsigned long long)(total - idle), idle, info->sofar, size, nr_frags); pps = info->sofar * USEC_PER_SEC; --------------090406030500080203010406-- From ctindel@falcon.csc.calpoly.edu Sat Oct 9 18:39:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 09 Oct 2004 18:39:22 -0700 (PDT) Received: from falcon.csc.calpoly.edu (falcon.csc.calpoly.edu [129.65.242.5]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9A1dG4K017947 for ; Sat, 9 Oct 2004 18:39:17 -0700 Received: from falcon.csc.calpoly.edu (localhost [127.0.0.1]) by falcon.csc.calpoly.edu (8.12.10+Sun/8.12.2) with ESMTP id i9A1cwku014994; Sat, 9 Oct 2004 18:38:58 -0700 (PDT) Received: from localhost (ctindel@localhost) by falcon.csc.calpoly.edu (8.12.10+Sun/8.12.2/Submit) with ESMTP id i9A1cwAv014991; Sat, 9 Oct 2004 18:38:58 -0700 (PDT) Date: Sat, 9 Oct 2004 18:38:58 -0700 (PDT) From: "Chad N. Tindel" To: netdev@oss.sgi.com cc: linux-net@vger.kernel.org Subject: udp_recvmsg: possible bug causing infinite hang? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 10102 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ctindel@falcon.csc.calpoly.edu Precedence: bulk X-list: netdev Content-Length: 1649 Lines: 37 I've encountered a hang condition during testing that only appeared when we upgraded from Redhat EL 3 Update 2 to Redhat EL 3 Update 3. After looking at the differences, it appears to be caused by a change to udp_recvmsg that also appears to have filtered back into the main kernel tree, so it is possible that more people would be affected by this than just redhat users. Anyway, here is the scenario: User space code sends a datagram on a blocking socket, and then calls select() or poll() to wait for the reply. When that pops with a non-error condition (so we _know_ there is data to be read), recvfrom() is called. Now, assume that somewhere along the way (it doesn't really matter where) the UDP packet is corrupted. Also, assume that no further inbound datagrams are destined for this socket. The new udp_recvmsg() will get down to the bottom, and then will go to the try_again label, where it will block forever in skb_recv_datagram() waiting for a datagram that will never come. The old code used to not have this try_again case, and so would always just return immediately. While this is a general problem for any program that uses UDP and relies on the fact that select popped to insure that recvfrom won't hang, the place where we always see it is in the DNS lookup portion of glibc. The send_dg() function is what actually hangs. My questions are: 1. Why was the code changed in this way? 2. Is this a bug? It seems so to me, because select (or poll) specifically says there is data to read, and then it hangs when we try to read it. But, without the context of #1, it is hard to make this determination. Thanks, Chad From davem@davemloft.net Sat Oct 9 18:50:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 09 Oct 2004 18:50:16 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9A1oBTr018622 for ; Sat, 9 Oct 2004 18:50:12 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CGSlj-0005rT-00; Sat, 09 Oct 2004 18:45:03 -0700 Date: Sat, 9 Oct 2004 18:45:03 -0700 From: "David S. Miller" To: "Chad N. Tindel" Cc: netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Re: udp_recvmsg: possible bug causing infinite hang? Message-Id: <20041009184503.7fc5c105.davem@davemloft.net> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10103 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 899 Lines: 23 On Sat, 9 Oct 2004 18:38:58 -0700 (PDT) "Chad N. Tindel" wrote: > User space code sends a datagram on a blocking socket, and then calls > select() or poll() to wait for the reply. If you wish the socket not to block, mark the file descriptor as non-blocking or pass in the appropriate MSG_* flag into recvmsg(). Select() returning that a filedescriptor is readable does not guarentee that a blocking socket will not block in the ead call. This behavior has been in the Linux kernel for an enourmous amount of them, the change you are noticing going from EL 3 update 2 to update 3 is that previously we were returning -EAGAIN to blocking sockets, instead we are properly blocking to wait for another packet. There is an enormous and long thread about this topic on the linux-kernel list, please read there before we duplicate such a long and tiring thread here. From ctindel@calma.pair.com Sat Oct 9 18:54:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 09 Oct 2004 18:54:52 -0700 (PDT) Received: from calma.pair.com (calma.pair.com [209.68.1.95]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9A1skdd019175 for ; Sat, 9 Oct 2004 18:54:46 -0700 Received: (qmail 38796 invoked by uid 3059); 10 Oct 2004 01:54:32 -0000 Date: Sat, 9 Oct 2004 21:54:32 -0400 From: "Chad N. Tindel" To: "David S. Miller" Cc: netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Re: udp_recvmsg: possible bug causing infinite hang? Message-ID: <20041010015432.GA38395@calma.pair.com> References: <20041009184503.7fc5c105.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041009184503.7fc5c105.davem@davemloft.net> User-Agent: Mutt/1.4.2.1i X-archive-position: 10104 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chad@tindel.net Precedence: bulk X-list: netdev Content-Length: 1154 Lines: 31 On Sat, Oct 09, 2004 at 06:45:03PM -0700, David S. Miller wrote: > On Sat, 9 Oct 2004 18:38:58 -0700 (PDT) > "Chad N. Tindel" wrote: > > > User space code sends a datagram on a blocking socket, and then calls > > select() or poll() to wait for the reply. > > If you wish the socket not to block, mark the file descriptor > as non-blocking or pass in the appropriate MSG_* flag into > recvmsg(). > > Select() returning that a filedescriptor is readable does not > guarentee that a blocking socket will not block in the ead > call. > > This behavior has been in the Linux kernel for an enourmous > amount of them, the change you are noticing going from EL 3 update > 2 to update 3 is that previously we were returning -EAGAIN to > blocking sockets, instead we are properly blocking to wait for > another packet. > > There is an enormous and long thread about this topic on the > linux-kernel list, please read there before we duplicate such > a long and tiring thread here. OK, so what you're saying is that the C-library has a bug because it isn't using a non-blocking socket when doing DNS lookups? Thanks, Chad From rddunlap@osdl.org Sat Oct 9 20:28:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 09 Oct 2004 20:28:25 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9A3SGqx024483 for ; Sat, 9 Oct 2004 20:28:16 -0700 Received: from [127.0.0.1] (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9A3RiL18192; Sat, 9 Oct 2004 20:27:44 -0700 Message-ID: <4168AB78.50704@osdl.org> Date: Sat, 09 Oct 2004 20:24:40 -0700 From: "Randy.Dunlap" User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: ravinandan.arakali@s2io.com CC: "'Jeff Garzik'" , "'Francois Romieu'" , netdev@oss.sgi.com, leonid.grossman@s2io.com, raghavendra.koushik@s2io.com, rapuru.sriram@s2io.com Subject: Re: [PATCH 2.6.9-rc2 4/8] S2io: hardware fixes References: <004301c4ad97$be6a7010$9810100a@S2IOtech.com> In-Reply-To: <004301c4ad97$be6a7010$9810100a@S2IOtech.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10105 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rddunlap@osdl.org Precedence: bulk X-list: netdev Content-Length: 1929 Lines: 62 Ravinandan Arakali wrote: > Jeff, > Sorry about that. We'll add the signed-off-by line. > We are sending the patches as and when they are completed. > In the next couple of days, the remaining patches should > be done. Do you want us to send them after all are complete > or is it okay to send each patch as and when completed ? > > Thanks, > Ravi > > -----Original Message----- > From: Jeff Garzik [mailto:jgarzik@pobox.com] > Sent: Friday, October 08, 2004 5:11 PM > To: ravinandan.arakali@s2io.com > Cc: 'Francois Romieu'; netdev@oss.sgi.com; leonid.grossman@s2io.com; > raghavendra.koushik@s2io.com; rapuru.sriram@s2io.com > Subject: Re: [PATCH 2.6.9-rc2 4/8] S2io: hardware fixes > > > 48 hours passed between patch #3 and patch #4. Is there a problem with > your email system? > > Also, your patches do not include the "signed-off-by" line described in > the two documents I referenced. The "signed-off-by" line makes the > lawyers happy. > > Since you missed that major legal item, please _read_ the following > documents: > > http://linux.yyz.us/patch-format.html (see #5, "Sign your work") > http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt Hi, Maybe you already have this planned or patched, but it wasn't in the "cosmetic" patch file. In s2io.c, please convert this struct to C99 syntax: static struct pci_driver s2io_driver = { name:"S2IO", id_table:s2io_tbl, probe:s2io_init_nic, remove:__devexit_p(s2io_rem_nic), }; so that sparse won't complain like so: drivers/net/s2io.c:238:7: warning: obsolete struct initializer, use C99 syntax drivers/net/s2io.c:239:7: warning: obsolete struct initializer, use C99 syntax drivers/net/s2io.c:240:7: warning: obsolete struct initializer, use C99 syntax drivers/net/s2io.c:241:7: warning: obsolete struct initializer, use C99 syntax and if you haven't tried sparse on the driver, that would be a good idea. -- ~Randy From hadi@cyberus.ca Sun Oct 10 14:43:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 10 Oct 2004 14:43:37 -0700 (PDT) Received: from mx03.cybersurf.com (mx03.cybersurf.com [209.197.145.106]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9ALhXFF022740 for ; Sun, 10 Oct 2004 14:43:33 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.30) id 1CGlTK-0008H4-Vs for netdev@oss.sgi.com; Sun, 10 Oct 2004 17:43:18 -0400 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CGlTI-0003HT-5R; Sun, 10 Oct 2004 17:43:16 -0400 Subject: Re: e1000 kick From: jamal Reply-To: hadi@cyberus.ca To: Scott Huang Cc: netdev@oss.sgi.com In-Reply-To: <20041008231713.1126.qmail@web80401.mail.yahoo.com> References: <20041008231713.1126.qmail@web80401.mail.yahoo.com> Content-Type: text/plain Organization: jamalopolous Message-Id: <1097444592.1049.228.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 10 Oct 2004 17:43:12 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 10106 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev Content-Length: 354 Lines: 20 What are you trying to do? I have some patches i wouldnt mind passing on for test purposes but it would depend on what the end goal is, cheers, jamal On Fri, 2004-10-08 at 19:17, Scott Huang wrote: > Hi folks, > > Is there a way to force tx dma to start on e1000 after > the I fill up the tx ring to a certain level? > > thanks > > -Scott > > > From rddunlap@osdl.org Sun Oct 10 15:48:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 10 Oct 2004 15:48:28 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9AMmNCg024322 for ; Sun, 10 Oct 2004 15:48:23 -0700 Received: from [127.0.0.1] (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9AMm4L32490; Sun, 10 Oct 2004 15:48:04 -0700 Message-ID: <4169BB68.7030206@osdl.org> Date: Sun, 10 Oct 2004 15:44:56 -0700 From: "Randy.Dunlap" User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev , jgarzik , mlindner@syskonnect.de Subject: [PATCH] skfp: remove assignment expression in conditional (sparse) Content-Type: multipart/mixed; boundary="------------010508060201010001000302" X-archive-position: 10108 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rddunlap@osdl.org Precedence: bulk X-list: netdev Content-Length: 1257 Lines: 45 This is a multi-part message in MIME format. --------------010508060201010001000302 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Fix sparse warning: drivers/net/skfp/hwmtm.c:1904:20: warning: assignment expression in conditional -- ~Randy --------------010508060201010001000302 Content-Type: text/x-patch; name="skfp_expr.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="skfp_expr.patch" Fix sparse warning: drivers/net/skfp/hwmtm.c:1904:20: warning: assignment expression in conditional Signed-off-by: Randy Dunlap diffstat:= drivers/net/skfp/hwmtm.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -Naurp ./drivers/net/skfp/hwmtm.c~skfp_expr ./drivers/net/skfp/hwmtm.c --- ./drivers/net/skfp/hwmtm.c~skfp_expr 2004-08-13 22:36:59.000000000 -0700 +++ ./drivers/net/skfp/hwmtm.c 2004-10-10 15:15:21.090772760 -0700 @@ -1901,7 +1901,7 @@ void smt_send_mbuf(struct s_smc *smc, SM } if (!smc->hw.mac_ring_is_up || frag_count > queue->tx_free) { - if (frame_status &= ~LAN_TX) { + if ((frame_status &= ~LAN_TX) != 0) { DB_TX("Ring is down: terminate LAN_TX",0,0,2) ; } else { --------------010508060201010001000302-- From rddunlap@osdl.org Sun Oct 10 15:48:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 10 Oct 2004 15:48:25 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9AMmE8E024316 for ; Sun, 10 Oct 2004 15:48:14 -0700 Received: from [127.0.0.1] (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9AMlsL32465; Sun, 10 Oct 2004 15:47:54 -0700 Message-ID: <4169BB5E.1070409@osdl.org> Date: Sun, 10 Oct 2004 15:44:46 -0700 From: "Randy.Dunlap" User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev , jgarzik , tsbogend@alpha.franken.de, brazilnut@us.ibm.com Subject: [PATCH] pcnet32: use unsigned 1-bit fields Content-Type: multipart/mixed; boundary="------------000100080406080802080101" X-archive-position: 10107 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rddunlap@osdl.org Precedence: bulk X-list: netdev Content-Length: 1494 Lines: 48 This is a multi-part message in MIME format. --------------000100080406080802080101 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 1-bit fields should be unsigned. Keeps sparse happy, keeps gcc straight. ~Randy --------------000100080406080802080101 Content-Type: text/x-patch; name="pcnet32_bits.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="pcnet32_bits.patch" Fix sparse warning and tell gcc that 1-bit fields are unsigned. drivers/net/pcnet32.c:362:21: warning: dubious one-bit signed bitfield Signed-off-by: Randy Dunlap diffstat:= drivers/net/pcnet32.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff -Naurp ./drivers/net/pcnet32.c~pcnet_bits ./drivers/net/pcnet32.c --- ./drivers/net/pcnet32.c~pcnet_bits 2004-08-13 22:36:33.000000000 -0700 +++ ./drivers/net/pcnet32.c 2004-10-10 15:23:07.964797120 -0700 @@ -359,9 +359,9 @@ struct pcnet32_private { struct net_device_stats stats; char tx_full; int options; - int shared_irq:1, /* shared irq possible */ - dxsuflo:1, /* disable transmit stop on uflo */ - mii:1; /* mii port available */ + unsigned int shared_irq:1, /* shared irq possible */ + dxsuflo:1, /* disable transmit stop on uflo */ + mii:1; /* mii port available */ struct net_device *next; struct mii_if_info mii_if; struct timer_list watchdog_timer; --------------000100080406080802080101-- From davem@davemloft.net Sun Oct 10 21:02:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 10 Oct 2004 21:02:17 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9B42CRm008432 for ; Sun, 10 Oct 2004 21:02:12 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CGrLM-0007Fz-00; Sun, 10 Oct 2004 20:59:28 -0700 Date: Sun, 10 Oct 2004 20:59:28 -0700 From: "David S. Miller" To: Andrew Morton Cc: mpm@selenic.com, colin@colino.net, ak@suse.de, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-Id: <20041010205928.6e54df7e.davem@davemloft.net> In-Reply-To: <20041008151839.01823e0c.akpm@osdl.org> References: <20041006232544.53615761@jack.colino.net> <20041006214322.GG31237@waste.org> <20041007075319.6b31430d@jack.colino.net> <20041006234912.66bfbdcc.davem@davemloft.net> <20041007160532.60c3f26b@pirandello> <20041007112846.5c85b2d9.davem@davemloft.net> <20041007224422.1c1bea95@jack.colino.net> <20041007214505.GB31558@wotan.suse.de> <20041008090610.70d7e183@pirandello> <20041008220001.GE31237@waste.org> <20041008151839.01823e0c.akpm@osdl.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10110 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 323 Lines: 11 Wait, I think I see the problem. Sungem processes link status in it's ->poll() NAPI handler. This occurs via calls to gem_pcs_interrupt(), for example. Non-pcs sungem variants use a timer to poll link status. When the link changes state, this link state processing does printk()'s. So perhaps that is why it deadlocks. From davem@davemloft.net Sun Oct 10 21:10:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 10 Oct 2004 21:10:16 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9B4AAWg009146 for ; Sun, 10 Oct 2004 21:10:10 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CGrTO-0007Gu-00; Sun, 10 Oct 2004 21:07:46 -0700 Date: Sun, 10 Oct 2004 21:07:46 -0700 From: "David S. Miller" To: Ben Greear Cc: Robert.Olsson@data.slu.se, netdev@oss.sgi.com Subject: Re: 2.6.7 tulip performance (with NAPI) Message-Id: <20041010210746.5e9438af.davem@davemloft.net> In-Reply-To: <4165864A.2010805@candelatech.com> References: <41633174.7070805@candelatech.com> <16740.17875.574967.11417@robur.slu.se> <41646587.7070401@candelatech.com> <41649425.1010102@candelatech.com> <20041006180826.4a092c71.davem@davemloft.net> <4165864A.2010805@candelatech.com> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10111 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 567 Lines: 13 On Thu, 07 Oct 2004 11:09:14 -0700 Ben Greear wrote: > How does the existing (non pktgen) architecture work for VLAN devices > and stopping/starting the queues in the underlying devices? VLAN devices are simply virtual devices. There is a real netdev structure backing them, and thus you can point queueing disciplines et al. to them just like any other device. So that's the idea, somehow tie pktgen to use the existing netdev_wake_queue() callback mechanism. All I am really saying is that qdiscs may be a method by which to do this. From cp@absolutedigital.net Mon Oct 11 04:34:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 04:34:28 -0700 (PDT) Received: from linaeum.absolutedigital.net (linaeum.absolutedigital.net [63.87.232.45]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BBYL1x029686 for ; Mon, 11 Oct 2004 04:34:22 -0700 Received: from localhost (localhost [127.0.0.1]) by linaeum.absolutedigital.net (8.13.1/8.13.1) with ESMTP id i9BBY0xP008148; Mon, 11 Oct 2004 07:34:00 -0400 Date: Mon, 11 Oct 2004 07:34:00 -0400 (EDT) From: Cal Peake To: Kernel Mailing List cc: NetDev Mailing List , proski@gnu.org, hermes@gibson.dropbear.id.au Subject: [PATCH] Fix readw/writew warnings in drivers/net/wireless/hermes.h Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 10112 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: cp@absolutedigital.net Precedence: bulk X-list: netdev Content-Length: 2366 Lines: 65 Hi, This patch fixes several dozen warnings spit out when compiling the hermes wireless driver. In file included from drivers/net/wireless/orinoco.c:448: drivers/net/wireless/hermes.h: In function `hermes_present': drivers/net/wireless/hermes.h:398: warning: passing arg 1 of `readw' makes pointer from integer without a cast drivers/net/wireless/hermes.h: In function `hermes_set_irqmask': drivers/net/wireless/hermes.h:404: warning: passing arg 2 of `writew' makes pointer from integer without a cast ... thanks, -- Cal Signed-off-by: Cal Peake diff -Nru linux-2.6.9-rc4/drivers/net/wireless/hermes.h linux-2.6.9-rc4-1/drivers/net/wireless/hermes.h --- linux-2.6.9-rc4/drivers/net/wireless/hermes.h 2004-10-11 02:38:38.000000000 -0400 +++ linux-2.6.9-rc4-1/drivers/net/wireless/hermes.h 2004-10-11 06:56:01.000000000 -0400 @@ -364,12 +364,12 @@ /* Register access convenience macros */ #define hermes_read_reg(hw, off) ((hw)->io_space ? \ inw((hw)->iobase + ( (off) << (hw)->reg_spacing )) : \ - readw((hw)->iobase + ( (off) << (hw)->reg_spacing ))) + readw((void __iomem *)(hw)->iobase + ( (off) << (hw)->reg_spacing ))) #define hermes_write_reg(hw, off, val) do { \ if ((hw)->io_space) \ outw_p((val), (hw)->iobase + ((off) << (hw)->reg_spacing)); \ else \ - writew((val), (hw)->iobase + ((off) << (hw)->reg_spacing)); \ + writew((val), (void __iomem *)(hw)->iobase + ((off) << (hw)->reg_spacing)); \ } while (0) #define hermes_read_regn(hw, name) hermes_read_reg((hw), HERMES_##name) #define hermes_write_regn(hw, name, val) hermes_write_reg((hw), HERMES_##name, (val)) @@ -442,7 +442,7 @@ * gcc is smart enough to fold away the two swaps on * big-endian platforms. */ for (i = 0, p = buf; i < count; i++) { - *p++ = cpu_to_le16(readw(hw->iobase + off)); + *p++ = cpu_to_le16(readw((void __iomem *)hw->iobase + off)); } } } @@ -462,7 +462,7 @@ * hope gcc is smart enough to fold away the two swaps * on big-endian platforms. */ for (i = 0, p = buf; i < count; i++) { - writew(le16_to_cpu(*p++), hw->iobase + off); + writew(le16_to_cpu(*p++), (void __iomem *)hw->iobase + off); } } } @@ -478,7 +478,7 @@ outw(0, hw->iobase + off); } else { for (i = 0; i < count; i++) - writew(0, hw->iobase + off); + writew(0, (void __iomem *)hw->iobase + off); } } From j.dittmer@portrix.net Mon Oct 11 04:55:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 04:55:40 -0700 (PDT) Received: from zoidberg.portrix.net (port-212-202-157-208.static.qsc.de [212.202.157.208]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BBtXHB030350 for ; Mon, 11 Oct 2004 04:55:34 -0700 Received: from [192.168.42.209] (port-212-202-157-193.static.qsc.de [212.202.157.193]) (authenticated bits=0) by zoidberg.portrix.net (8.12.3/8.12.3/Debian-6.6) with ESMTP id i9BBsibj014301; Mon, 11 Oct 2004 13:54:44 +0200 Message-ID: <416A7484.1030703@portrix.net> Date: Mon, 11 Oct 2004 13:54:44 +0200 From: Jan Dittmer User-Agent: Mozilla Thunderbird 0.8 (X11/20040918) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Cal Peake CC: Kernel Mailing List , NetDev Mailing List , proski@gnu.org, hermes@gibson.dropbear.id.au Subject: Re: [PATCH] Fix readw/writew warnings in drivers/net/wireless/hermes.h References: In-Reply-To: X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10113 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: j.dittmer@portrix.net Precedence: bulk X-list: netdev Content-Length: 868 Lines: 23 Cal Peake wrote: > Hi, > > This patch fixes several dozen warnings spit out when compiling the hermes > wireless driver. > > In file included from drivers/net/wireless/orinoco.c:448: > drivers/net/wireless/hermes.h: In function `hermes_present': > drivers/net/wireless/hermes.h:398: warning: passing arg 1 of `readw' makes pointer from integer without a cast > drivers/net/wireless/hermes.h: In function `hermes_set_irqmask': > drivers/net/wireless/hermes.h:404: warning: passing arg 2 of `writew' makes pointer from integer without a cast > ... > inw((hw)->iobase + ( (off) << (hw)->reg_spacing )) : \ > - readw((hw)->iobase + ( (off) << (hw)->reg_spacing ))) > + readw((void __iomem *)(hw)->iobase + ( (off) << (hw)->reg_spacing ))) > #define hermes_write_reg(hw, off, val) do { \ Isn't the correct fix to declare iobase as (void __iomem *) ? Thanks, Jank From ricky.lloyd@gmail.com Mon Oct 11 05:04:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 05:04:44 -0700 (PDT) Received: from mproxy.gmail.com (wproxy.gmail.com [64.233.184.205]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BC4dWS031101 for ; Mon, 11 Oct 2004 05:04:40 -0700 Received: by mproxy.gmail.com with SMTP id 64so9029wri for ; Mon, 11 Oct 2004 05:04:21 -0700 (PDT) Received: by 10.54.35.47 with SMTP id i47mr3245wri; Mon, 11 Oct 2004 05:04:21 -0700 (PDT) Received: by 10.54.24.4 with HTTP; Mon, 11 Oct 2004 05:04:20 -0700 (PDT) Message-ID: <1a50bd3704101105046e66538c@mail.gmail.com> Date: Mon, 11 Oct 2004 17:34:20 +0530 From: Ricky lloyd Reply-To: Ricky lloyd To: Jan Dittmer Subject: Re: [PATCH] Fix readw/writew warnings in drivers/net/wireless/hermes.h Cc: Cal Peake , Kernel Mailing List , NetDev Mailing List , proski@gnu.org, hermes@gibson.dropbear.id.au In-Reply-To: <416A7484.1030703@portrix.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <416A7484.1030703@portrix.net> X-archive-position: 10114 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ricky.lloyd@gmail.com Precedence: bulk X-list: netdev Content-Length: 276 Lines: 11 > Isn't the correct fix to declare iobase as (void __iomem *) ? > Earlier today i had posted a patch which mainly fixes this same problem with lotsa scsi drivers and tulip drivers. I wondered the same "shouldnt all the addrs be declared as void __iomem* ??". -- -> Ricky From cp@absolutedigital.net Mon Oct 11 05:23:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 05:23:56 -0700 (PDT) Received: from linaeum.absolutedigital.net (linaeum.absolutedigital.net [63.87.232.45]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BCNpuU031782 for ; Mon, 11 Oct 2004 05:23:51 -0700 Received: from localhost (localhost [127.0.0.1]) by linaeum.absolutedigital.net (8.13.1/8.13.1) with ESMTP id i9BCNZkh008538; Mon, 11 Oct 2004 08:23:35 -0400 Date: Mon, 11 Oct 2004 08:23:35 -0400 (EDT) From: Cal Peake To: Jan Dittmer cc: Kernel Mailing List , NetDev Mailing List , proski@gnu.org, hermes@gibson.dropbear.id.au Subject: Re: [PATCH] Fix readw/writew warnings in drivers/net/wireless/hermes.h In-Reply-To: <416A7484.1030703@portrix.net> Message-ID: References: <416A7484.1030703@portrix.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 10115 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: cp@absolutedigital.net Precedence: bulk X-list: netdev Content-Length: 581 Lines: 17 On Mon, 11 Oct 2004, Jan Dittmer wrote: > Cal Peake wrote: > > > inw((hw)->iobase + ( (off) << (hw)->reg_spacing )) : \ > > - readw((hw)->iobase + ( (off) << (hw)->reg_spacing ))) > > + readw((void __iomem *)(hw)->iobase + ( (off) << (hw)->reg_spacing ))) > > #define hermes_write_reg(hw, off, val) do { \ > > Isn't the correct fix to declare iobase as (void __iomem *) ? iobase is an unsigned long, declaring it as a void pointer is prolly not what we want to do here. The typecast seems proper. A lot of other drivers do this as well thus it must be proper ;-) -- Cal From j.dittmer@portrix.net Mon Oct 11 05:30:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 05:30:17 -0700 (PDT) Received: from zoidberg.portrix.net (port-212-202-157-208.static.qsc.de [212.202.157.208]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BCUBtP032476 for ; Mon, 11 Oct 2004 05:30:12 -0700 Received: from [192.168.42.209] (port-212-202-157-193.static.qsc.de [212.202.157.193]) (authenticated bits=0) by zoidberg.portrix.net (8.12.3/8.12.3/Debian-6.6) with ESMTP id i9BCTdbj016431; Mon, 11 Oct 2004 14:29:39 +0200 Message-ID: <416A7CB3.9000003@portrix.net> Date: Mon, 11 Oct 2004 14:29:39 +0200 From: Jan Dittmer User-Agent: Mozilla Thunderbird 0.8 (X11/20040918) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Cal Peake CC: Kernel Mailing List , NetDev Mailing List , proski@gnu.org, hermes@gibson.dropbear.id.au Subject: Re: [PATCH] Fix readw/writew warnings in drivers/net/wireless/hermes.h References: <416A7484.1030703@portrix.net> In-Reply-To: X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10116 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: j.dittmer@portrix.net Precedence: bulk X-list: netdev Content-Length: 707 Lines: 25 Cal Peake wrote: > On Mon, 11 Oct 2004, Jan Dittmer wrote: > > >>Cal Peake wrote: >> >> >>> inw((hw)->iobase + ( (off) << (hw)->reg_spacing )) : \ >>>- readw((hw)->iobase + ( (off) << (hw)->reg_spacing ))) >>>+ readw((void __iomem *)(hw)->iobase + ( (off) << (hw)->reg_spacing ))) >>> #define hermes_write_reg(hw, off, val) do { \ >> >>Isn't the correct fix to declare iobase as (void __iomem *) ? > > > iobase is an unsigned long, declaring it as a void pointer is prolly not > what we want to do here. The typecast seems proper. A lot of other drivers > do this as well thus it must be proper ;-) Why is iobase a unsigned long in the first place? Isn't this broken for 64bit archs? Thanks, Jan From dgibson@ozlabs.org Mon Oct 11 05:33:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 05:33:30 -0700 (PDT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BCXOjm000373 for ; Mon, 11 Oct 2004 05:33:24 -0700 Received: by ozlabs.org (Postfix, from userid 1007) id 7E7D02BD6A; Mon, 11 Oct 2004 22:33:04 +1000 (EST) Date: Mon, 11 Oct 2004 22:31:37 +1000 From: David Gibson To: Ricky lloyd Cc: Jan Dittmer , Cal Peake , Kernel Mailing List , NetDev Mailing List , proski@gnu.org Subject: Re: [PATCH] Fix readw/writew warnings in drivers/net/wireless/hermes.h Message-ID: <20041011123137.GB28100@zax> Mail-Followup-To: David Gibson , Ricky lloyd , Jan Dittmer , Cal Peake , Kernel Mailing List , NetDev Mailing List , proski@gnu.org References: <416A7484.1030703@portrix.net> <1a50bd3704101105046e66538c@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1a50bd3704101105046e66538c@mail.gmail.com> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10117 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hermes@gibson.dropbear.id.au Precedence: bulk X-list: netdev Content-Length: 817 Lines: 22 On Mon, Oct 11, 2004 at 05:34:20PM +0530, Ricky lloyd wrote: > > Isn't the correct fix to declare iobase as (void __iomem *) ? > > > > Earlier today i had posted a patch which mainly fixes this same > problem with lotsa scsi > drivers and tulip drivers. I wondered the same "shouldnt all the addrs > be declared as > void __iomem* ??". The trouble with that is that for some versions of the orinoco card, the iobase refers to a legacy ISA IO address, not a memory-mapped IO address (that's the inw()/outw() path in the macro). That needs an integer, rather than a pointer. It's not clear to me which way around the cast is less ugly. -- David Gibson | For every complex problem there is a david AT gibson.dropbear.id.au | solution which is simple, neat and | wrong. http://www.ozlabs.org/people/dgibson From dgibson@ozlabs.org Mon Oct 11 05:33:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 05:33:37 -0700 (PDT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BCXOIG000372 for ; Mon, 11 Oct 2004 05:33:24 -0700 Received: by ozlabs.org (Postfix, from userid 1007) id 8BE822BDB0; Mon, 11 Oct 2004 22:33:04 +1000 (EST) Date: Mon, 11 Oct 2004 22:32:17 +1000 From: David Gibson To: Jan Dittmer Cc: Cal Peake , Kernel Mailing List , NetDev Mailing List , proski@gnu.org Subject: Re: [PATCH] Fix readw/writew warnings in drivers/net/wireless/hermes.h Message-ID: <20041011123217.GC28100@zax> Mail-Followup-To: David Gibson , Jan Dittmer , Cal Peake , Kernel Mailing List , NetDev Mailing List , proski@gnu.org References: <416A7484.1030703@portrix.net> <416A7CB3.9000003@portrix.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <416A7CB3.9000003@portrix.net> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10118 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hermes@gibson.dropbear.id.au Precedence: bulk X-list: netdev Content-Length: 972 Lines: 30 On Mon, Oct 11, 2004 at 02:29:39PM +0200, Jan Dittmer wrote: > Cal Peake wrote: > >On Mon, 11 Oct 2004, Jan Dittmer wrote: > > > > > >>Cal Peake wrote: > >> > >> > >>> inw((hw)->iobase + ( (off) << (hw)->reg_spacing )) : \ > >>>- readw((hw)->iobase + ( (off) << (hw)->reg_spacing ))) > >>>+ readw((void __iomem *)(hw)->iobase + ( (off) << (hw)->reg_spacing ))) > >>>#define hermes_write_reg(hw, off, val) do { \ > >> > >>Isn't the correct fix to declare iobase as (void __iomem *) ? > > > > > >iobase is an unsigned long, declaring it as a void pointer is prolly not > >what we want to do here. The typecast seems proper. A lot of other drivers > >do this as well thus it must be proper ;-) > > Why is iobase a unsigned long in the first place? Isn't this broken for > 64bit archs? Um, no. -- David Gibson | For every complex problem there is a david AT gibson.dropbear.id.au | solution which is simple, neat and | wrong. http://www.ozlabs.org/people/dgibson From j.dittmer@portrix.net Mon Oct 11 05:39:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 05:39:37 -0700 (PDT) Received: from zoidberg.portrix.net (port-212-202-157-208.static.qsc.de [212.202.157.208]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BCdWSY001181 for ; Mon, 11 Oct 2004 05:39:33 -0700 Received: from [192.168.42.209] (port-212-202-157-193.static.qsc.de [212.202.157.193]) (authenticated bits=0) by zoidberg.portrix.net (8.12.3/8.12.3/Debian-6.6) with ESMTP id i9BCd0bj016957; Mon, 11 Oct 2004 14:39:00 +0200 Message-ID: <416A7EE4.6060500@portrix.net> Date: Mon, 11 Oct 2004 14:39:00 +0200 From: Jan Dittmer User-Agent: Mozilla Thunderbird 0.8 (X11/20040918) X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Gibson CC: Cal Peake , Kernel Mailing List , NetDev Mailing List , proski@gnu.org Subject: Re: [PATCH] Fix readw/writew warnings in drivers/net/wireless/hermes.h References: <416A7484.1030703@portrix.net> <416A7CB3.9000003@portrix.net> <20041011123217.GC28100@zax> In-Reply-To: <20041011123217.GC28100@zax> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10119 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: j.dittmer@portrix.net Precedence: bulk X-list: netdev Content-Length: 982 Lines: 36 David Gibson wrote: > On Mon, Oct 11, 2004 at 02:29:39PM +0200, Jan Dittmer wrote: > >>Cal Peake wrote: >> >>>On Mon, 11 Oct 2004, Jan Dittmer wrote: >>> >>> >>> >>>>Cal Peake wrote: >>>> >>>> >>>> >>>>> inw((hw)->iobase + ( (off) << (hw)->reg_spacing )) : \ >>>>>- readw((hw)->iobase + ( (off) << (hw)->reg_spacing ))) >>>>>+ readw((void __iomem *)(hw)->iobase + ( (off) << (hw)->reg_spacing ))) >>>>>#define hermes_write_reg(hw, off, val) do { \ >>>> >>>>Isn't the correct fix to declare iobase as (void __iomem *) ? >>> >>> >>>iobase is an unsigned long, declaring it as a void pointer is prolly not >>>what we want to do here. The typecast seems proper. A lot of other drivers >>>do this as well thus it must be proper ;-) >> >>Why is iobase a unsigned long in the first place? Isn't this broken for >>64bit archs? > > > Um, no. > Yeah, just rememberd when sending the mail ;-). Still, most drivers seem to use (void __iomem *) in the declaration of their iobase. Jan From cp@absolutedigital.net Mon Oct 11 05:43:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 05:43:12 -0700 (PDT) Received: from linaeum.absolutedigital.net (linaeum.absolutedigital.net [63.87.232.45]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BCh7LH001571 for ; Mon, 11 Oct 2004 05:43:07 -0700 Received: from localhost (localhost [127.0.0.1]) by linaeum.absolutedigital.net (8.13.1/8.13.1) with ESMTP id i9BCgqqo008704; Mon, 11 Oct 2004 08:42:52 -0400 Date: Mon, 11 Oct 2004 08:42:52 -0400 (EDT) From: Cal Peake To: David Gibson cc: Ricky lloyd , Jan Dittmer , Kernel Mailing List , NetDev Mailing List , proski@gnu.org Subject: Re: [PATCH] Fix readw/writew warnings in drivers/net/wireless/hermes.h In-Reply-To: <20041011123137.GB28100@zax> Message-ID: References: <416A7484.1030703@portrix.net> <1a50bd3704101105046e66538c@mail.gmail.com> <20041011123137.GB28100@zax> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 10120 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: cp@absolutedigital.net Precedence: bulk X-list: netdev Content-Length: 823 Lines: 24 On Mon, 11 Oct 2004, David Gibson wrote: > On Mon, Oct 11, 2004 at 05:34:20PM +0530, Ricky lloyd wrote: > > > Isn't the correct fix to declare iobase as (void __iomem *) ? > > > > > > > Earlier today i had posted a patch which mainly fixes this same > > problem with lotsa scsi > > drivers and tulip drivers. I wondered the same "shouldnt all the addrs > > be declared as > > void __iomem* ??". > > The trouble with that is that for some versions of the orinoco card, > the iobase refers to a legacy ISA IO address, not a memory-mapped IO > address (that's the inw()/outw() path in the macro). That needs an > integer, rather than a pointer. > > It's not clear to me which way around the cast is less ugly. I guess the cast is kludgy. I just wanted to shut the warnings up, it prints 68 of 'em I believe. -- Cal From hadi@cyberus.ca Mon Oct 11 05:49:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 05:49:58 -0700 (PDT) Received: from mx01.cybersurf.com (mx01.cybersurf.com [209.197.145.104]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BCnrHJ002032 for ; Mon, 11 Oct 2004 05:49:53 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx01.cybersurf.com with esmtp (Exim 4.20) id 1CGzcO-0002pP-8m for netdev@oss.sgi.com; Mon, 11 Oct 2004 08:49:36 -0400 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CGzcN-0000SU-0k; Mon, 11 Oct 2004 08:49:35 -0400 Subject: patch: Mirred action From: jamal Reply-To: hadi@cyberus.ca To: "David S. Miller" Cc: netdev@oss.sgi.com Content-Type: multipart/mixed; boundary="=-cIzlnaPz+z+AzlOKJHvT" Organization: jamalopolous Message-Id: <1097498972.15075.7.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 11 Oct 2004 08:49:32 -0400 X-archive-position: 10121 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev Content-Length: 10160 Lines: 414 --=-cIzlnaPz+z+AzlOKJHvT Content-Type: text/plain Content-Transfer-Encoding: 7bit Dave, I am gonna start trickling these actions/driver patches to you. signed off by me cheers, jamal --=-cIzlnaPz+z+AzlOKJHvT Content-Disposition: attachment; filename=269-rc3-mirred_kp Content-Type: text/plain; name=269-rc3-mirred_kp; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit --- /dev/null 1998-05-05 16:32:27.000000000 -0400 +++ b/include/net/tc_act/tc_mirred.h 2004-10-01 09:18:32.000000000 -0400 @@ -0,0 +1,15 @@ +#ifndef __NET_TC_MIR_H +#define __NET_TC_MIR_H + +#include + +struct tcf_mirred +{ + tca_gen(mirred); + int eaction; + int ifindex; + int ok_push; + struct net_device *dev; +}; + +#endif --- /dev/null 1998-05-05 16:32:27.000000000 -0400 +++ b/include/linux/tc_act/tc_mirred.h 2004-10-01 09:18:32.000000000 -0400 @@ -0,0 +1,28 @@ +#ifndef __LINUX_TC_MIR_H +#define __LINUX_TC_MIR_H + +#include + +#define TCA_ACT_MIRRED 8 +#define TCA_EGRESS_REDIR 1 /* packet redirect to EGRESS*/ +#define TCA_EGRESS_MIRROR 2 /* mirror packet to EGRESS */ +#define TCA_INGRESS_REDIR 3 /* packet redirect to INGRESS*/ +#define TCA_INGRESS_MIRROR 4 /* mirror packet to INGRESS */ + +struct tc_mirred +{ + tc_gen; + int eaction; /* one of IN/EGRESS_MIRROR/REDIR */ + __u32 ifindex; /* ifindex of egress port */ +}; + +enum +{ + TCA_MIRRED_UNSPEC, + TCA_MIRRED_TM, + TCA_MIRRED_PARMS, + __TCA_MIRRED_MAX +}; +#define TCA_MIRRED_MAX (__TCA_MIRRED_MAX - 1) + +#endif --- a/net/sched/Makefile 2004/10/01 13:16:40 1.1 +++ b/net/sched/Makefile 2004/10/01 13:17:34 @@ -11,6 +11,7 @@ obj-$(CONFIG_NET_ACT_POLICE) += police.o obj-$(CONFIG_NET_CLS_POLICE) += police.o obj-$(CONFIG_NET_ACT_GACT) += gact.o +obj-$(CONFIG_NET_ACT_MIRRED) += mirred.o obj-$(CONFIG_NET_SCH_CBQ) += sch_cbq.o obj-$(CONFIG_NET_SCH_HTB) += sch_htb.o obj-$(CONFIG_NET_SCH_HPFQ) += sch_hpfq.o --- a/net/sched/Kconfig 2004/10/01 13:13:33 1.1 +++ b/net/sched/Kconfig 2004/10/01 13:16:34 @@ -399,3 +399,10 @@ depends on NET_ACT_GACT ---help--- Allows generic actions to be randomly or deterministically used + +config NET_ACT_MIRRED + tristate "Packet In/Egress redirecton/mirror Actions" + depends on NET_CLS_ACT + ---help--- + requires new iproute2 + This allows packets to be mirrored or redirected to netdevices --- /dev/null 1998-05-05 16:32:27.000000000 -0400 +++ b/net/sched/mirred.c 2004-10-11 08:34:34.000000000 -0400 @@ -0,0 +1,318 @@ +/* + * net/sched/mirred.c packet mirroring and redirect actions + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * Authors: Jamal Hadi Salim (2002-4) + * + * TODO: Add ingress support (and socket redirect support) + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + + +/* use generic hash table */ +#define MY_TAB_SIZE 8 +#define MY_TAB_MASK (MY_TAB_SIZE - 1) +static u32 idx_gen; +static struct tcf_mirred *tcf_mirred_ht[MY_TAB_SIZE]; +static rwlock_t mirred_lock = RW_LOCK_UNLOCKED; + +/* ovewrride the defaults */ +#define tcf_st tcf_mirred +#define tc_st tc_mirred +#define tcf_t_lock mirred_lock +#define tcf_ht tcf_mirred_ht + +#define CONFIG_NET_ACT_INIT 1 +#include + +static inline int +tcf_mirred_release(struct tcf_mirred *p, int bind) +{ + if (p) { + if (bind) { + p->bindcnt--; + } + + p->refcnt--; + if(!p->bindcnt && p->refcnt <= 0) { + dev_put(p->dev); + tcf_hash_destroy(p); + return 1; + } + } + + return 0; +} + +int +tcf_mirred_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a,int ovr, int bind) +{ + struct rtattr *tb[TCA_MIRRED_MAX]; + struct tc_mirred *parm; + struct tcf_mirred *p; + struct net_device *dev = NULL; + int size = sizeof (*p), new = 0; + + + if (rtattr_parse(tb, TCA_MIRRED_MAX, RTA_DATA(rta), RTA_PAYLOAD(rta)) < 0) { + DPRINTK("tcf_mirred_init BUG in user space couldnt parse properly\n"); + return -1; + } + + if (NULL == a || NULL == tb[TCA_MIRRED_PARMS - 1]) { + DPRINTK("BUG: tcf_mirred_init called with NULL params\n"); + return -1; + } + + parm = RTA_DATA(tb[TCA_MIRRED_PARMS - 1]); + + p = tcf_hash_check(parm, a, ovr, bind); + if (NULL == p) { /* new */ + p = tcf_hash_create(parm,est,a,size,ovr,bind); + new = 1; + if (NULL == p) + return -1; + } + + if (parm->ifindex) { + dev = dev_get_by_index(parm->ifindex); + if (NULL == dev) { + printk("BUG: tcf_mirred_init called with bad device\n"); + return -1; + } + switch (dev->type) { + case ARPHRD_TUNNEL: + case ARPHRD_TUNNEL6: + case ARPHRD_SIT: + case ARPHRD_IPGRE: + case ARPHRD_VOID: + case ARPHRD_NONE: + p->ok_push = 0; + break; + default: + p->ok_push = 1; + break; + } + } else { + if (new) { + kfree(p); + return -1; + } + } + + if (new || ovr) { + spin_lock(&p->lock); + p->action = parm->action; + p->eaction = parm->eaction; + if (parm->ifindex) { + p->ifindex = parm->ifindex; + p->dev = dev; + dev_hold(p->dev); + } + spin_unlock(&p->lock); + } + + + DPRINTK(" tcf_mirred_init index %d action %d eaction %d device %s ifndex %d\n",parm->index,parm->action,parm->eaction,dev->name,parm->ifindex); + return new; + +} + +int +tcf_mirred_cleanup(struct tc_action *a, int bind) +{ + struct tcf_mirred *p; + p = PRIV(a,mirred); + if (NULL != p) + return tcf_mirred_release(p, bind); + return 0; +} + +int +tcf_mirred(struct sk_buff **pskb, struct tc_action *a) +{ + struct tcf_mirred *p; + struct net_device *dev; + struct sk_buff *skb2 = NULL; + struct sk_buff *skb = *pskb; + __u32 at = G_TC_AT(skb->tc_verd); + + if (NULL == a) { + if (net_ratelimit()) + printk("BUG: tcf_mirred called with NULL action!\n"); + return -1; + } + + p = PRIV(a,mirred); + + if (NULL == p) { + if (net_ratelimit()) + printk("BUG: tcf_mirred called with NULL params\n"); + return -1; + } + + spin_lock(&p->lock); + + dev = p->dev; + p->tm.lastuse = jiffies; + + if (NULL == dev || !(dev->flags&IFF_UP) ) { + if (net_ratelimit()) + printk("mirred to Houston: device %s is gone!\n", + dev?dev->name:""); +bad_mirred: + if (NULL != skb2) + kfree_skb(skb2); + p->stats.overlimits++; + p->stats.bytes += skb->len; + p->stats.packets++; + spin_unlock(&p->lock); + /* should we be asking for packet to be dropped? + * may make sense for redirect case only + */ + return TC_ACT_SHOT; + } + + skb2 = skb_clone(skb, GFP_ATOMIC); + if (skb2 == NULL) { + goto bad_mirred; + } + if (TCA_EGRESS_MIRROR != p->eaction && + TCA_EGRESS_REDIR != p->eaction) { + if (net_ratelimit()) + printk("tcf_mirred unknown action %d\n",p->eaction); + goto bad_mirred; + } + + p->stats.bytes += skb2->len; + p->stats.packets++; + if ( !(at & AT_EGRESS)) { + if (p->ok_push) { + skb_push(skb2, skb2->dev->hard_header_len); + } + } + + /* mirror is always swallowed */ + if (TCA_EGRESS_MIRROR != p->eaction) + skb2->tc_verd = SET_TC_FROM(skb2->tc_verd,at); + + skb2->dev = dev; + skb2->input_dev = skb->dev; + dev_queue_xmit(skb2); + spin_unlock(&p->lock); + return p->action; +} + +int +tcf_mirred_dump(struct sk_buff *skb, struct tc_action *a,int bind, int ref) +{ + unsigned char *b = skb->tail; + struct tc_mirred opt; + struct tcf_mirred *p; + struct tcf_t t; + + p = PRIV(a,mirred); + if (NULL == p) { + printk("BUG: tcf_mirred_dump called with NULL params\n"); + goto rtattr_failure; + } + + opt.index = p->index; + opt.action = p->action; + opt.refcnt = p->refcnt - ref; + opt.bindcnt = p->bindcnt - bind; + opt.eaction = p->eaction; + opt.ifindex = p->ifindex; + DPRINTK(" tcf_mirred_dump index %d action %d eaction %d ifndex %d\n",p->index,p->action,p->eaction,p->ifindex); + RTA_PUT(skb, TCA_MIRRED_PARMS, sizeof (opt), &opt); + t.install = jiffies - p->tm.install; + t.lastuse = jiffies - p->tm.lastuse; + t.expires = p->tm.expires; + RTA_PUT(skb, TCA_MIRRED_TM, sizeof (t), &t); + return skb->len; + + rtattr_failure: + skb_trim(skb, b - skb->data); + return -1; +} + +int +tcf_mirred_stats(struct sk_buff *skb, struct tc_action *a) +{ + struct tcf_mirred *p; + p = PRIV(a,mirred); + + if (NULL != p) + return qdisc_copy_stats(skb, &p->stats, p->stats_lock); + + return 1; +} + +static struct tc_action_ops act_mirred_ops = { + .next = NULL, + .kind = "mirred", + .type = TCA_ACT_MIRRED, + .capab = TCA_CAP_NONE, + .owner = THIS_MODULE, + .act = tcf_mirred, + .get_stats = tcf_mirred_stats, + .dump = tcf_mirred_dump, + .cleanup = tcf_mirred_cleanup, + .lookup = tcf_hash_search, + .init = tcf_mirred_init, + .walk = tcf_generic_walker +}; + +MODULE_AUTHOR("Jamal Hadi Salim(2002)"); +MODULE_DESCRIPTION("Device Mirror/redirect actions"); +MODULE_LICENSE("GPL"); + + +static int __init +mirred_init_module(void) +{ + printk("Mirror/redirect action on\n"); + return tcf_register_action(&act_mirred_ops); +} + +static void __exit +mirred_cleanup_module(void) +{ + tcf_unregister_action(&act_mirred_ops); +} + +module_init(mirred_init_module); +module_exit(mirred_cleanup_module); + --=-cIzlnaPz+z+AzlOKJHvT-- From ben@fluff.org Mon Oct 11 05:50:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 05:50:29 -0700 (PDT) Received: from aeryn.fluff.org.uk (host-212-158-219-180.bulldogdsl.com [212.158.219.180]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BCoNZq002167 for ; Mon, 11 Oct 2004 05:50:23 -0700 Received: from ben by aeryn.fluff.org.uk with local (Exim 3.36 #1 (Debian)) id 1CGzcZ-0003tp-00; Mon, 11 Oct 2004 13:49:47 +0100 Date: Mon, 11 Oct 2004 13:49:47 +0100 From: Ben Dooks To: Jan Dittmer Cc: David Gibson , Cal Peake , Kernel Mailing List , NetDev Mailing List , proski@gnu.org Subject: Re: [PATCH] Fix readw/writew warnings in drivers/net/wireless/hermes.h Message-ID: <20041011124947.GB17653@home.fluff.org> References: <416A7484.1030703@portrix.net> <416A7CB3.9000003@portrix.net> <20041011123217.GC28100@zax> <416A7EE4.6060500@portrix.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <416A7EE4.6060500@portrix.net> X-Disclaimer: I speak for me, myself, and the other one of me. User-Agent: Mutt/1.5.6+20040722i X-archive-position: 10122 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ben@fluff.org.uk Precedence: bulk X-list: netdev Content-Length: 1259 Lines: 43 On Mon, Oct 11, 2004 at 02:39:00PM +0200, Jan Dittmer wrote: > David Gibson wrote: > >On Mon, Oct 11, 2004 at 02:29:39PM +0200, Jan Dittmer wrote: > > > >>Cal Peake wrote: > >> > >>>On Mon, 11 Oct 2004, Jan Dittmer wrote: > >>> > >>> > >>> > >>>>Cal Peake wrote: > >>>> > >>>> > >>>> > >>>>> inw((hw)->iobase + ( (off) << (hw)->reg_spacing )) : \ > >>>>>- readw((hw)->iobase + ( (off) << (hw)->reg_spacing ))) > >>>>>+ readw((void __iomem *)(hw)->iobase + ( (off) << (hw)->reg_spacing ))) > >>>>>#define hermes_write_reg(hw, off, val) do { \ > >>>> > >>>>Isn't the correct fix to declare iobase as (void __iomem *) ? > >>> > >>> > >>>iobase is an unsigned long, declaring it as a void pointer is prolly not > >>>what we want to do here. The typecast seems proper. A lot of other > >>>drivers do this as well thus it must be proper ;-) > >> > >>Why is iobase a unsigned long in the first place? Isn't this broken for > >>64bit archs? > > > > > >Um, no. > > > > Yeah, just rememberd when sending the mail ;-). Still, most drivers seem > to use (void __iomem *) in the declaration of their iobase. IIRC, ioremap() and friends all return (void __iomem *) or at least (void *) -- Ben (ben@fluff.org, http://www.fluff.org/) 'a smiley only costs 4 bytes' From viro@www.linux.org.uk Mon Oct 11 06:16:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 06:16:23 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BDGIBA003624 for ; Mon, 11 Oct 2004 06:16:19 -0700 Received: from viro by www.linux.org.uk with local (Exim 4.33) id 1CH01z-0002Pi-7R; Mon, 11 Oct 2004 14:16:03 +0100 Date: Mon, 11 Oct 2004 14:16:03 +0100 From: viro@parcelfarce.linux.theplanet.co.uk To: Cal Peake Cc: Jan Dittmer , Kernel Mailing List , NetDev Mailing List , proski@gnu.org, hermes@gibson.dropbear.id.au Subject: Re: [PATCH] Fix readw/writew warnings in drivers/net/wireless/hermes.h Message-ID: <20041011131603.GU23987@parcelfarce.linux.theplanet.co.uk> References: <416A7484.1030703@portrix.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-archive-position: 10123 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: viro@parcelfarce.linux.theplanet.co.uk Precedence: bulk X-list: netdev Content-Length: 852 Lines: 20 On Mon, Oct 11, 2004 at 08:23:35AM -0400, Cal Peake wrote: > On Mon, 11 Oct 2004, Jan Dittmer wrote: > > > Cal Peake wrote: > > > > > inw((hw)->iobase + ( (off) << (hw)->reg_spacing )) : \ > > > - readw((hw)->iobase + ( (off) << (hw)->reg_spacing ))) > > > + readw((void __iomem *)(hw)->iobase + ( (off) << (hw)->reg_spacing ))) > > > #define hermes_write_reg(hw, off, val) do { \ > > > > Isn't the correct fix to declare iobase as (void __iomem *) ? > > iobase is an unsigned long, declaring it as a void pointer is prolly not > what we want to do here. The typecast seems proper. A lot of other drivers > do this as well thus it must be proper ;-) Typecast is not a proper solution here. Folks, there are cleanups underway for all that mess, but it's not _that_ simple. And adding casts to shut the warnings up is wrong in 99% of cases. From anddan@linux-user.net Mon Oct 11 06:29:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 06:29:48 -0700 (PDT) Received: from mail.broadpark.no (mail.broadpark.no [217.13.4.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BDTgBT004204 for ; Mon, 11 Oct 2004 06:29:43 -0700 Received: from [10.0.0.13] (13.80-203-45.nextgentel.com [80.203.45.13]) by mail.broadpark.no (Postfix) with ESMTP id 3F24F37B6; Mon, 11 Oct 2004 15:30:08 +0200 (MEST) Message-ID: <416A8B6C.30206@linux-user.net> Date: Mon, 11 Oct 2004 15:32:28 +0200 From: Daniel Andersen User-Agent: Mozilla Thunderbird 0.6 (X11/20040519) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Francois Romieu Cc: Kernel Mailing List , Tejun Heo , netdev@oss.sgi.com Subject: Re: via-velocity heads up (was (Re: Linux 2.6.9-rc4 - pls test (and no more patches)) References: <20041011072307.GA18577@electric-eye.fr.zoreil.com> In-Reply-To: <20041011072307.GA18577@electric-eye.fr.zoreil.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10124 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: anddan@linux-user.net Precedence: bulk X-list: netdev Content-Length: 1183 Lines: 36 Francois Romieu wrote: > Linus Torvalds : > [...] > >>Summary of changes from v2.6.9-rc3 to v2.6.9-rc4 >>============================================ > > [...] > >>Fran?ois Romieu: >> o via-velocity: properly manage the count of adapters >> o via-velocity: removal of unused velocity_info.xmit_lock >> o via-velocity: velocity_give_rx_desc() removal >> o via-velocity: received ring wrong index and missing barriers >> o via-velocity: early invocation of init_cam_filter() >> o via-velocity: removal of incomplete endianness handling >> o via-velocity: wrong buffer offset in velocity_init_td_ring() >> o via-velocity: comment fixes > > > The attribution is a bit misleading as Tejun Heo > did the real work (he appears in the logs though). > > People should really, really, test this code if they have been > experiencing issues with the driver lately. > > Test reports welcome here or on netdev@oss.sgi.com. > I'm finally able to successfully use my On board VT6122 10/100/1000 Mb PCI Ethernet Controller on my Abit KV8-Pro. I have not found any problems with the via-velocity driver yet. Great work! :) Daniel Andersen -- From viro@www.linux.org.uk Mon Oct 11 06:33:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 06:33:21 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BDXG7O004595 for ; Mon, 11 Oct 2004 06:33:17 -0700 Received: from viro by www.linux.org.uk with local (Exim 4.33) id 1CH0IQ-00034P-GU; Mon, 11 Oct 2004 14:33:02 +0100 Date: Mon, 11 Oct 2004 14:33:02 +0100 From: viro@parcelfarce.linux.theplanet.co.uk To: Borislav Petkov Cc: David Gibson , Ricky lloyd , Jan Dittmer , Cal Peake , Kernel Mailing List , NetDev Mailing List , proski@gnu.org Subject: Re: [PATCH] Fix readw/writew warnings in drivers/net/wireless/hermes.h Message-ID: <20041011133302.GV23987@parcelfarce.linux.theplanet.co.uk> References: <1a50bd3704101105046e66538c@mail.gmail.com> <20041011123137.GB28100@zax> <200410111518.39001.petkov@uni-muenster.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410111518.39001.petkov@uni-muenster.de> User-Agent: Mutt/1.4.1i X-archive-position: 10125 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: viro@parcelfarce.linux.theplanet.co.uk Precedence: bulk X-list: netdev Content-Length: 866 Lines: 20 On Mon, Oct 11, 2004 at 03:18:38PM +0200, Borislav Petkov wrote: > that in a great detail. As a result, the right thing to do here is, I think, to declare all addrs void __iomem*. > Which leaves a question: while compiling the following code fragment: > > > static inline u8 snd_ymfpci_readb(ymfpci_t *chip, u32 offset) > { > return readb(chip->reg_area_virt + offset); > } > > gcc complains as so: > > sound/pci/ymfpci/ymfpci_main.c: In function `snd_ymfpci_readb': > sound/pci/ymfpci/ymfpci_main.c:57: warning: passing arg 1 of `readb' makes pointer from integer without a cast > > Do we have to cast here or use the new interface? Make ->reg_area_virt void __iomem *. *However*, ALSA folks said that they have already done iomem annotations in their tree, so that's an area best left alone until they merge. From uucp@ganesha.gnumonks.org Mon Oct 11 06:40:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 06:40:27 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BDeLEd005030 for ; Mon, 11 Oct 2004 06:40:22 -0700 Received: from uucp by ganesha.gnumonks.org with local-bsmtp (Exim 4.30) id 1CH0PH-0000Fu-FC for netdev@oss.sgi.com; Mon, 11 Oct 2004 15:40:07 +0200 Received: from laforge by obroa-skai.gnumonks.org with local (Exim 3.36 #1) id 1C6FsQ-0000D1-00; Sat, 11 Sep 2004 23:57:46 +0200 Date: Sat, 11 Sep 2004 23:57:46 +0200 From: Harald Welte To: Julian Anastasov Cc: Netfilter Development Mailinglist , netdev@oss.sgi.com, Rusty Russell Subject: Re: [PATCH 2.6] ip_nat_ftp - manip at the right place Message-ID: <20040911215746.GF19871@obroa-skai.de.gnumonks.org> Mail-Followup-To: Harald Welte , Julian Anastasov , Netfilter Development Mailinglist , netdev@oss.sgi.com, Rusty Russell References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="MZf7D3rAEoQgPanC" Content-Disposition: inline In-Reply-To: X-Operating-System: Linux obroa-skai.de.gnumonks.org 2.6.8-rc2-nfp0722-tcpwin X-Date: Today is Prickle-Prickle, the 35th day of Bureaucracy in the YOLD 3170 User-Agent: Mutt/1.5.6+20040722i X-archive-position: 10126 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@netfilter.org Precedence: bulk X-list: netdev Content-Length: 1641 Lines: 49 --MZf7D3rAEoQgPanC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 11, 2004 at 10:53:53AM +0300, Julian Anastasov wrote: > Hello, >=20 > This is a resend/resync for v2.6.9-rc1-bk17: change the > way the ip_nat_ftp helper manipulates the packets: >=20 > - no manips =3D> no fixup >=20 > - check the direction, do manip once and at the same time when the > headers are changed I agree with this change, but shouldn't we make it consistently over all NAT helpers? In case you didn't check yet, and assuming that this is applicable to other helpers as well: Please include patches for other protocol helpers as well. Thanks! > Signed-off-by: Julian Anastasov --=20 - Harald Welte http://www.netfilter.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie --MZf7D3rAEoQgPanC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBQ3TaXaXGVTD0i/8RAmTxAJ9ktGTt1eOru0wIrLid2gEjMRFJBwCgpNx0 pnQyfK2GmkS3WA73Nvpu/SE= =CJnS -----END PGP SIGNATURE----- --MZf7D3rAEoQgPanC-- From proski@gnu.org Mon Oct 11 06:48:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 06:48:17 -0700 (PDT) Received: from cmail.srv.hcvlny.cv.net (cmail.srv.hcvlny.cv.net [167.206.112.40]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BDmC9l005454 for ; Mon, 11 Oct 2004 06:48:12 -0700 Received: from portland.hansa.lan (ool-4573bdfa.dyn.optonline.net [69.115.189.250]) by cmail.srv.hcvlny.cv.net (iPlanet Messaging Server 5.2 HotFix 1.25 (built Mar 3 2004)) with ESMTP id <0I5F00JVG7FQ6Y@cmail.srv.hcvlny.cv.net> for netdev@oss.sgi.com; Mon, 11 Oct 2004 08:45:26 -0400 (EDT) Date: Mon, 11 Oct 2004 08:45:26 -0400 (EDT) From: Pavel Roskin Subject: [PATCH] Add mailing lists for Orinoco driver X-X-Sender: proski@portland.hansa.lan To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Cc: David Gibson Message-id: MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII; format=flowed Content-transfer-encoding: 7BIT X-archive-position: 10127 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: proski@gnu.org Precedence: bulk X-list: netdev Content-Length: 606 Lines: 26 Hello! This patch adds mailing lists for Orinoco driver and updates the homepage address. Please apply. Signed-off-by: Pavel Roskin =============================================== --- MAINTAINERS +++ MAINTAINERS @@ -1646,7 +1646,9 @@ M: proski@gnu.org P: David Gibson M: hermes@gibson.dropbear.id.au -W: http://www.ozlabs.org/people/dgibson/dldwd +L: orinoco-devel@lists.sourceforge.net +L: orinoco-users@lists.sourceforge.net +W: http://www.nongnu.org/orinoco/ S: Maintained PARALLEL PORT SUPPORT =============================================== -- Regards, Pavel Roskin From proski@gnu.org Mon Oct 11 06:48:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 06:48:18 -0700 (PDT) Received: from cmail.srv.hcvlny.cv.net (cmail.srv.hcvlny.cv.net [167.206.112.40]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BDmC9n005454 for ; Mon, 11 Oct 2004 06:48:12 -0700 Received: from portland.hansa.lan (ool-4573bdfa.dyn.optonline.net [69.115.189.250]) by cmail.srv.hcvlny.cv.net (iPlanet Messaging Server 5.2 HotFix 1.25 (built Mar 3 2004)) with ESMTP id <0I5F00JG68O36Y@cmail.srv.hcvlny.cv.net> for netdev@oss.sgi.com; Mon, 11 Oct 2004 09:12:03 -0400 (EDT) Date: Mon, 11 Oct 2004 09:12:03 -0400 (EDT) From: Pavel Roskin Subject: Re: [PATCH] Fix readw/writew warnings in drivers/net/wireless/hermes.h In-reply-to: X-X-Sender: proski@portland.hansa.lan To: Cal Peake Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, David Gibson Message-id: MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII; format=flowed Content-transfer-encoding: 7BIT References: X-archive-position: 10128 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: proski@gnu.org Precedence: bulk X-list: netdev Content-Length: 1352 Lines: 40 On Mon, 11 Oct 2004, Cal Peake wrote: > This patch fixes several dozen warnings spit out when compiling the hermes > wireless driver. I noticed them too. By the way, it would be nice to move the discussion to the mailing list of the driver, orinoco-devel@lists.sourceforge.net. Sorry that it wasn't mentioned in the MAINTAINERS file. I've just submitted a patch to add the mailing lists to that file. > @@ -364,12 +364,12 @@ > /* Register access convenience macros */ > #define hermes_read_reg(hw, off) ((hw)->io_space ? \ > inw((hw)->iobase + ( (off) << (hw)->reg_spacing )) : \ > - readw((hw)->iobase + ( (off) << (hw)->reg_spacing ))) > + readw((void __iomem *)(hw)->iobase + ( (off) << (hw)->reg_spacing ))) The HEAD version of the driver aims to support Linux starting with version 2.4.10, so you need to add some magic in kcompat.h to define __iomem. HostAP driver uses cast to (void *), which compiles without warnings. I believe it's sufficient because the call to readw() would cast the argument to whatever readw() needs. Another, more sophisticated solution would be to use union for iobase: typedef struct hermes { union { unsigned long io; void *mem; } base; int io_space; /* 1 if we IO-mapped IO, 0 for memory-mapped IO? */ ... } -- Regards, Pavel Roskin From viro@www.linux.org.uk Mon Oct 11 07:05:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 07:05:13 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BE588Y006546 for ; Mon, 11 Oct 2004 07:05:08 -0700 Received: from viro by www.linux.org.uk with local (Exim 4.33) id 1CH0nG-0003y5-HJ; Mon, 11 Oct 2004 15:04:54 +0100 Date: Mon, 11 Oct 2004 15:04:54 +0100 From: viro@parcelfarce.linux.theplanet.co.uk To: Pavel Roskin Cc: Cal Peake , linux-kernel@vger.kernel.org, netdev@oss.sgi.com, David Gibson Subject: Re: [PATCH] Fix readw/writew warnings in drivers/net/wireless/hermes.h Message-ID: <20041011140454.GW23987@parcelfarce.linux.theplanet.co.uk> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-archive-position: 10129 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: viro@parcelfarce.linux.theplanet.co.uk Precedence: bulk X-list: netdev Content-Length: 495 Lines: 15 On Mon, Oct 11, 2004 at 09:12:03AM -0400, Pavel Roskin wrote: > Another, more sophisticated solution would be to use union for iobase: > > typedef struct hermes { > union { > unsigned long io; > void *mem; > } base; > int io_space; /* 1 if we IO-mapped IO, 0 for memory-mapped IO? */ > ... > } Not needed. Use ioread*/iowrite* family; it does what you need. Al, putting together a patchset and documention on that sort of cleanups... From cp@absolutedigital.net Mon Oct 11 07:16:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 07:16:45 -0700 (PDT) Received: from linaeum.absolutedigital.net (linaeum.absolutedigital.net [63.87.232.45]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BEGeaw007081 for ; Mon, 11 Oct 2004 07:16:40 -0700 Received: from localhost (localhost [127.0.0.1]) by linaeum.absolutedigital.net (8.13.1/8.13.1) with ESMTP id i9BEGPl6009561; Mon, 11 Oct 2004 10:16:25 -0400 Date: Mon, 11 Oct 2004 10:16:25 -0400 (EDT) From: Cal Peake To: viro@parcelfarce.linux.theplanet.co.uk cc: Jan Dittmer , Kernel Mailing List , NetDev Mailing List , proski@gnu.org, hermes@gibson.dropbear.id.au Subject: Re: [PATCH] Fix readw/writew warnings in drivers/net/wireless/hermes.h In-Reply-To: <20041011131603.GU23987@parcelfarce.linux.theplanet.co.uk> Message-ID: References: <416A7484.1030703@portrix.net> <20041011131603.GU23987@parcelfarce.linux.theplanet.co.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 10130 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: cp@absolutedigital.net Precedence: bulk X-list: netdev Content-Length: 1034 Lines: 27 On Mon, 11 Oct 2004 viro@parcelfarce.linux.theplanet.co.uk wrote: > On Mon, Oct 11, 2004 at 08:23:35AM -0400, Cal Peake wrote: > > On Mon, 11 Oct 2004, Jan Dittmer wrote: > > > > > Cal Peake wrote: > > > > > > > inw((hw)->iobase + ( (off) << (hw)->reg_spacing )) : \ > > > > - readw((hw)->iobase + ( (off) << (hw)->reg_spacing ))) > > > > + readw((void __iomem *)(hw)->iobase + ( (off) << (hw)->reg_spacing ))) > > > > #define hermes_write_reg(hw, off, val) do { \ > > > > > > Isn't the correct fix to declare iobase as (void __iomem *) ? > > > > iobase is an unsigned long, declaring it as a void pointer is prolly not > > what we want to do here. The typecast seems proper. A lot of other drivers > > do this as well thus it must be proper ;-) > > Typecast is not a proper solution here. Folks, there are cleanups underway > for all that mess, but it's not _that_ simple. > > And adding casts to shut the warnings up is wrong in 99% of cases. ok, I'm retarded. I'll shut up for the moment and get a clue :^) -- Cal From ak@suse.de Mon Oct 11 08:40:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 08:40:54 -0700 (PDT) Received: from Cantor.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BFen4p012251 for ; Mon, 11 Oct 2004 08:40:50 -0700 Received: from hermes.suse.de (hermes-ext.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 7FD82D2B306; Mon, 11 Oct 2004 17:40:01 +0200 (CEST) Date: Mon, 11 Oct 2004 17:40:00 +0200 From: Andi Kleen To: "David S. Miller" Cc: Andrew Morton , mpm@selenic.com, colin@colino.net, ak@suse.de, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041011154000.GB26350@wotan.suse.de> References: <20041007075319.6b31430d@jack.colino.net> <20041006234912.66bfbdcc.davem@davemloft.net> <20041007160532.60c3f26b@pirandello> <20041007112846.5c85b2d9.davem@davemloft.net> <20041007224422.1c1bea95@jack.colino.net> <20041007214505.GB31558@wotan.suse.de> <20041008090610.70d7e183@pirandello> <20041008220001.GE31237@waste.org> <20041008151839.01823e0c.akpm@osdl.org> <20041010205928.6e54df7e.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041010205928.6e54df7e.davem@davemloft.net> X-archive-position: 10131 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 Content-Length: 507 Lines: 17 On Sun, Oct 10, 2004 at 08:59:28PM -0700, David S. Miller wrote: > > Wait, I think I see the problem. > > Sungem processes link status in it's ->poll() NAPI handler. > This occurs via calls to gem_pcs_interrupt(), for example. > Non-pcs sungem variants use a timer to poll link status. > > When the link changes state, this link state processing > does printk()'s. > > So perhaps that is why it deadlocks. printk handles recursion with the down_trylock on console_sem. So it shouldn't deadlock. -Andi From oxymoron@waste.org Mon Oct 11 09:23:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 09:23:08 -0700 (PDT) Received: from waste.org (waste.org [209.173.204.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BGN317013775 for ; Mon, 11 Oct 2004 09:23:03 -0700 Received: from waste.org (localhost [127.0.0.1]) by waste.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id i9BGMPWk028864; Mon, 11 Oct 2004 11:22:25 -0500 Received: (from oxymoron@localhost) by waste.org (8.12.3/8.12.3/Debian-7.1) id i9BGMO1k028862; Mon, 11 Oct 2004 11:22:24 -0500 Date: Mon, 11 Oct 2004 11:22:24 -0500 From: Matt Mackall To: Andi Kleen Cc: "David S. Miller" , Andrew Morton , colin@colino.net, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041011162224.GL31237@waste.org> References: <20041006234912.66bfbdcc.davem@davemloft.net> <20041007160532.60c3f26b@pirandello> <20041007112846.5c85b2d9.davem@davemloft.net> <20041007224422.1c1bea95@jack.colino.net> <20041007214505.GB31558@wotan.suse.de> <20041008090610.70d7e183@pirandello> <20041008220001.GE31237@waste.org> <20041008151839.01823e0c.akpm@osdl.org> <20041010205928.6e54df7e.davem@davemloft.net> <20041011154000.GB26350@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041011154000.GB26350@wotan.suse.de> User-Agent: Mutt/1.3.28i X-Virus-Scanned: by amavisd-new X-archive-position: 10132 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mpm@selenic.com Precedence: bulk X-list: netdev Content-Length: 983 Lines: 27 On Mon, Oct 11, 2004 at 05:40:00PM +0200, Andi Kleen wrote: > On Sun, Oct 10, 2004 at 08:59:28PM -0700, David S. Miller wrote: > > > > Wait, I think I see the problem. > > > > Sungem processes link status in it's ->poll() NAPI handler. > > This occurs via calls to gem_pcs_interrupt(), for example. > > Non-pcs sungem variants use a timer to poll link status. > > > > When the link changes state, this link state processing > > does printk()'s. > > > > So perhaps that is why it deadlocks. > > printk handles recursion with the down_trylock on console_sem. > So it shouldn't deadlock. If we're in the ->poll() handler for non-netpoll reasons, and the link state changes, causing a printk, we'll potentially reenter ->poll() via netconsole. This also explains the original fix quite nicely. Colin, can you try commenting out all the printks in gem_pcs_interrupt and if that works, we'll start thinking about a proper fix. -- Mathematics is the supreme nostalgia of our time. From scott_z_huang@yahoo.com Mon Oct 11 09:25:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 09:25:07 -0700 (PDT) Received: from web80402.mail.yahoo.com (web80402.mail.yahoo.com [66.218.79.57]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9BGP2Xo014173 for ; Mon, 11 Oct 2004 09:25:02 -0700 Message-ID: <20041011162444.20953.qmail@web80402.mail.yahoo.com> Received: from [64.160.44.144] by web80402.mail.yahoo.com via HTTP; Mon, 11 Oct 2004 09:24:44 PDT Date: Mon, 11 Oct 2004 09:24:44 -0700 (PDT) From: Scott Huang Subject: Re: e1000 kick To: hadi@cyberus.ca Cc: netdev@oss.sgi.com In-Reply-To: <1097444592.1049.228.camel@jzny.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 10133 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: scott_z_huang@yahoo.com Precedence: bulk X-list: netdev Content-Length: 704 Lines: 40 Hi Jamal, I would like to DMA packets to/from pre-allocated fixed-sized buffer pools for a user space TCP/IP stack to transmit/receive packets. The Rx path is working well. I wanted to control when the card should DMA packets from the Tx pool. thanks -Scott --- jamal wrote: > What are you trying to do? > I have some patches i wouldnt mind passing on for > test purposes > but it would depend on what the end goal is, > > cheers, > jamal > > On Fri, 2004-10-08 at 19:17, Scott Huang wrote: > > Hi folks, > > > > Is there a way to force tx dma to start on e1000 > after > > the I fill up the tx ring to a certain level? > > > > thanks > > > > -Scott > > > > > > > > From ak@suse.de Mon Oct 11 09:32:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 09:32:50 -0700 (PDT) Received: from Cantor.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BGWjwm014657 for ; Mon, 11 Oct 2004 09:32:46 -0700 Received: from hermes.suse.de (hermes-ext.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 2C95DD2BCEE; Mon, 11 Oct 2004 18:32:27 +0200 (CEST) Date: Mon, 11 Oct 2004 18:32:26 +0200 From: Andi Kleen To: Matt Mackall Cc: Andi Kleen , "David S. Miller" , Andrew Morton , colin@colino.net, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041011163226.GG26350@wotan.suse.de> References: <20041007160532.60c3f26b@pirandello> <20041007112846.5c85b2d9.davem@davemloft.net> <20041007224422.1c1bea95@jack.colino.net> <20041007214505.GB31558@wotan.suse.de> <20041008090610.70d7e183@pirandello> <20041008220001.GE31237@waste.org> <20041008151839.01823e0c.akpm@osdl.org> <20041010205928.6e54df7e.davem@davemloft.net> <20041011154000.GB26350@wotan.suse.de> <20041011162224.GL31237@waste.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041011162224.GL31237@waste.org> X-archive-position: 10134 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 Content-Length: 898 Lines: 25 On Mon, Oct 11, 2004 at 11:22:24AM -0500, Matt Mackall wrote: > On Mon, Oct 11, 2004 at 05:40:00PM +0200, Andi Kleen wrote: > > On Sun, Oct 10, 2004 at 08:59:28PM -0700, David S. Miller wrote: > > > > > > Wait, I think I see the problem. > > > > > > Sungem processes link status in it's ->poll() NAPI handler. > > > This occurs via calls to gem_pcs_interrupt(), for example. > > > Non-pcs sungem variants use a timer to poll link status. > > > > > > When the link changes state, this link state processing > > > does printk()'s. > > > > > > So perhaps that is why it deadlocks. > > > > printk handles recursion with the down_trylock on console_sem. > > So it shouldn't deadlock. > > If we're in the ->poll() handler for non-netpoll reasons, and the link > state changes, causing a printk, we'll potentially reenter ->poll() via > netconsole. It won't because printk catches the case. -Andi From oxymoron@waste.org Mon Oct 11 09:36:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 09:36:44 -0700 (PDT) Received: from waste.org (waste.org [209.173.204.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BGacsP015069 for ; Mon, 11 Oct 2004 09:36:39 -0700 Received: from waste.org (localhost [127.0.0.1]) by waste.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id i9BGa1Wk031804; Mon, 11 Oct 2004 11:36:01 -0500 Received: (from oxymoron@localhost) by waste.org (8.12.3/8.12.3/Debian-7.1) id i9BGa1N4031802; Mon, 11 Oct 2004 11:36:01 -0500 Date: Mon, 11 Oct 2004 11:36:01 -0500 From: Matt Mackall To: Andi Kleen Cc: "David S. Miller" , Andrew Morton , colin@colino.net, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041011163601.GM31237@waste.org> References: <20041007112846.5c85b2d9.davem@davemloft.net> <20041007224422.1c1bea95@jack.colino.net> <20041007214505.GB31558@wotan.suse.de> <20041008090610.70d7e183@pirandello> <20041008220001.GE31237@waste.org> <20041008151839.01823e0c.akpm@osdl.org> <20041010205928.6e54df7e.davem@davemloft.net> <20041011154000.GB26350@wotan.suse.de> <20041011162224.GL31237@waste.org> <20041011163226.GG26350@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041011163226.GG26350@wotan.suse.de> User-Agent: Mutt/1.3.28i X-Virus-Scanned: by amavisd-new X-archive-position: 10135 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mpm@selenic.com Precedence: bulk X-list: netdev Content-Length: 1182 Lines: 30 On Mon, Oct 11, 2004 at 06:32:26PM +0200, Andi Kleen wrote: > On Mon, Oct 11, 2004 at 11:22:24AM -0500, Matt Mackall wrote: > > On Mon, Oct 11, 2004 at 05:40:00PM +0200, Andi Kleen wrote: > > > On Sun, Oct 10, 2004 at 08:59:28PM -0700, David S. Miller wrote: > > > > > > > > Wait, I think I see the problem. > > > > > > > > Sungem processes link status in it's ->poll() NAPI handler. > > > > This occurs via calls to gem_pcs_interrupt(), for example. > > > > Non-pcs sungem variants use a timer to poll link status. > > > > > > > > When the link changes state, this link state processing > > > > does printk()'s. > > > > > > > > So perhaps that is why it deadlocks. > > > > > > printk handles recursion with the down_trylock on console_sem. > > > So it shouldn't deadlock. > > > > If we're in the ->poll() handler for non-netpoll reasons, and the link > > state changes, causing a printk, we'll potentially reenter ->poll() via > > netconsole. > > It won't because printk catches the case. It's not recursion on printk that's a problem, it's recursion on ->poll() and attempting to take whatever internal driver locks. -- Mathematics is the supreme nostalgia of our time. From ak@suse.de Mon Oct 11 09:49:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 09:49:55 -0700 (PDT) Received: from Cantor.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BGnQ0s015651 for ; Mon, 11 Oct 2004 09:49:48 -0700 Received: from hermes.suse.de (hermes-ext.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 8A93BD2C312; Mon, 11 Oct 2004 18:43:16 +0200 (CEST) Date: Mon, 11 Oct 2004 18:43:15 +0200 From: Andi Kleen To: Matt Mackall Cc: Andi Kleen , "David S. Miller" , Andrew Morton , colin@colino.net, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041011164315.GH26350@wotan.suse.de> References: <20041007224422.1c1bea95@jack.colino.net> <20041007214505.GB31558@wotan.suse.de> <20041008090610.70d7e183@pirandello> <20041008220001.GE31237@waste.org> <20041008151839.01823e0c.akpm@osdl.org> <20041010205928.6e54df7e.davem@davemloft.net> <20041011154000.GB26350@wotan.suse.de> <20041011162224.GL31237@waste.org> <20041011163226.GG26350@wotan.suse.de> <20041011163601.GM31237@waste.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041011163601.GM31237@waste.org> X-archive-position: 10136 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 Content-Length: 343 Lines: 10 > It's not recursion on printk that's a problem, it's recursion on > ->poll() and attempting to take whatever internal driver locks. There is no recursion on poll because printk will never call into the low level console driver when the console sem is already taken. -Andi P.S.: I made the same mistake long ago, but akpm set me straight. From jerone@gmail.com Mon Oct 11 09:53:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 09:53:53 -0700 (PDT) Received: from mproxy.gmail.com (mproxy.gmail.com [216.239.56.240]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BGrPcr016043 for ; Mon, 11 Oct 2004 09:53:45 -0700 Received: by mproxy.gmail.com with SMTP id x71so85104cwb for ; Mon, 11 Oct 2004 09:53:09 -0700 (PDT) Received: by 10.11.98.59 with SMTP id v59mr107612cwb; Mon, 11 Oct 2004 09:53:09 -0700 (PDT) Received: by 10.11.100.65 with HTTP; Mon, 11 Oct 2004 09:53:09 -0700 (PDT) Message-ID: <9f50a7a0041011095324253e7f@mail.gmail.com> Date: Mon, 11 Oct 2004 11:53:09 -0500 From: Jerone Young Reply-To: Jerone Young To: Francois Romieu Subject: Re: via-velocity heads up (was (Re: Linux 2.6.9-rc4 - pls test (and no more patches)) Cc: Kernel Mailing List , netdev@oss.sgi.com In-Reply-To: <20041011072307.GA18577@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <20041011072307.GA18577@electric-eye.fr.zoreil.com> X-archive-position: 10137 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jerone@gmail.com Precedence: bulk X-list: netdev Content-Length: 1562 Lines: 39 Yes, I also am able to finally use the via-velocity card without it taking down my router! The patches resolve issues with the card. I have been heavily using it now without a problem on X86_64 Linux. I have an Abit A8V with integrated Via Velocity card On Mon, 11 Oct 2004 09:23:07 +0200, Francois Romieu wrote: > Linus Torvalds : > [...] > > Summary of changes from v2.6.9-rc3 to v2.6.9-rc4 > > ============================================ > [...] > > Fran?ois Romieu: > > o via-velocity: properly manage the count of adapters > > o via-velocity: removal of unused velocity_info.xmit_lock > > o via-velocity: velocity_give_rx_desc() removal > > o via-velocity: received ring wrong index and missing barriers > > o via-velocity: early invocation of init_cam_filter() > > o via-velocity: removal of incomplete endianness handling > > o via-velocity: wrong buffer offset in velocity_init_td_ring() > > o via-velocity: comment fixes > > The attribution is a bit misleading as Tejun Heo > did the real work (he appears in the logs though). > > People should really, really, test this code if they have been > experiencing issues with the driver lately. > > Test reports welcome here or on netdev@oss.sgi.com. > > -- > Ueimor > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > From oxymoron@waste.org Mon Oct 11 09:59:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 09:59:30 -0700 (PDT) Received: from waste.org (waste.org [209.173.204.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BGxPaO016658 for ; Mon, 11 Oct 2004 09:59:25 -0700 Received: from waste.org (localhost [127.0.0.1]) by waste.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id i9BGwqWk004567; Mon, 11 Oct 2004 11:58:52 -0500 Received: (from oxymoron@localhost) by waste.org (8.12.3/8.12.3/Debian-7.1) id i9BGwqXY004560; Mon, 11 Oct 2004 11:58:52 -0500 Date: Mon, 11 Oct 2004 11:58:52 -0500 From: Matt Mackall To: Andi Kleen Cc: "David S. Miller" , Andrew Morton , colin@colino.net, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041011165851.GN31237@waste.org> References: <20041007214505.GB31558@wotan.suse.de> <20041008090610.70d7e183@pirandello> <20041008220001.GE31237@waste.org> <20041008151839.01823e0c.akpm@osdl.org> <20041010205928.6e54df7e.davem@davemloft.net> <20041011154000.GB26350@wotan.suse.de> <20041011162224.GL31237@waste.org> <20041011163226.GG26350@wotan.suse.de> <20041011163601.GM31237@waste.org> <20041011164315.GH26350@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041011164315.GH26350@wotan.suse.de> User-Agent: Mutt/1.3.28i X-Virus-Scanned: by amavisd-new X-archive-position: 10138 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mpm@selenic.com Precedence: bulk X-list: netdev Content-Length: 884 Lines: 20 On Mon, Oct 11, 2004 at 06:43:15PM +0200, Andi Kleen wrote: > > It's not recursion on printk that's a problem, it's recursion on > > ->poll() and attempting to take whatever internal driver locks. > > There is no recursion on poll because printk will never call into > the low level console driver when the console sem is already taken. Ergh, you deleted the context. Again, imagine we're originally in ->poll() for _a non-netpoll-related reason_. In other words, the console sem is not taken, because we're just doing routine network I/O. While in poll(), we take a private driver lock. Then for whatever reason, we printk -> netconsole -> netpoll -> poll() again where we attempt to retake the private driver lock. > P.S.: I made the same mistake long ago, but akpm set me straight. I'm pretty sure this case is different. -- Mathematics is the supreme nostalgia of our time. From ak@suse.de Mon Oct 11 10:41:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 10:41:37 -0700 (PDT) Received: from Cantor.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BHfVBg018477 for ; Mon, 11 Oct 2004 10:41:32 -0700 Received: from hermes.suse.de (hermes-ext.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 3E3A9D2D886; Mon, 11 Oct 2004 19:41:13 +0200 (CEST) Date: Mon, 11 Oct 2004 19:41:12 +0200 From: Andi Kleen To: Matt Mackall Cc: Andi Kleen , "David S. Miller" , Andrew Morton , colin@colino.net, netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041011174112.GJ26350@wotan.suse.de> References: <20041008090610.70d7e183@pirandello> <20041008220001.GE31237@waste.org> <20041008151839.01823e0c.akpm@osdl.org> <20041010205928.6e54df7e.davem@davemloft.net> <20041011154000.GB26350@wotan.suse.de> <20041011162224.GL31237@waste.org> <20041011163226.GG26350@wotan.suse.de> <20041011163601.GM31237@waste.org> <20041011164315.GH26350@wotan.suse.de> <20041011165851.GN31237@waste.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041011165851.GN31237@waste.org> X-archive-position: 10139 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 Content-Length: 869 Lines: 18 On Mon, Oct 11, 2004 at 11:58:52AM -0500, Matt Mackall wrote: > On Mon, Oct 11, 2004 at 06:43:15PM +0200, Andi Kleen wrote: > > > It's not recursion on printk that's a problem, it's recursion on > > > ->poll() and attempting to take whatever internal driver locks. > > > > There is no recursion on poll because printk will never call into > > the low level console driver when the console sem is already taken. > > Ergh, you deleted the context. Again, imagine we're originally in > ->poll() for _a non-netpoll-related reason_. In other words, the > console sem is not taken, because we're just doing routine network > I/O. While in poll(), we take a private driver lock. Then for whatever > reason, we printk -> netconsole -> netpoll -> poll() again where we > attempt to retake the private driver lock. You're right, in that case you could get a deadlock. -Andi From colin@colino.net Mon Oct 11 13:46:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 13:46:33 -0700 (PDT) Received: from paperstreet.colino.net (colino.net [213.41.131.56]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9BKkR7I027757 for ; Mon, 11 Oct 2004 13:46:27 -0700 Received: by paperstreet.colino.net (Postfix, from userid 1015) id 38DF173EF; Mon, 11 Oct 2004 22:46:03 +0200 (CEST) Received: from jack.colino.net (jack.colino.net [192.168.0.11]) by paperstreet.colino.net (Postfix) with ESMTP id D7BCE73EC; Mon, 11 Oct 2004 22:45:37 +0200 (CEST) Date: Mon, 11 Oct 2004 22:45:42 +0200 From: Colin Leroy To: Matt Mackall Cc: Andi Kleen , "David S. Miller" , Andrew Morton , netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041011224542.5bdc93aa@jack.colino.net> In-Reply-To: <20041011165851.GN31237@waste.org> References: <20041007214505.GB31558@wotan.suse.de> <20041008090610.70d7e183@pirandello> <20041008220001.GE31237@waste.org> <20041008151839.01823e0c.akpm@osdl.org> <20041010205928.6e54df7e.davem@davemloft.net> <20041011154000.GB26350@wotan.suse.de> <20041011162224.GL31237@waste.org> <20041011163226.GG26350@wotan.suse.de> <20041011163601.GM31237@waste.org> <20041011164315.GH26350@wotan.suse.de> <20041011165851.GN31237@waste.org> X-Mailer: Sylpheed-Claws 0.9.12cvs119.3 (GTK+ 2.4.9; powerpc-unknown-linux-gnu) X-Face: Fy:*XpRna1/tz}cJ@O'0^:qYs:8b[Rg`*8,+o^[fI?<%5LeB,Xz8ZJK[r7V0hBs8G)*&C+XA0qHoR=LoTohe@7X5K$A-@cN6n~~J/]+{[)E4h'lK$13WQf$.R+Pi;E09tk&{t|;~dakRD%CLHrk6m!?gA,5|Sb=fJ=>[9#n1Bu8?VngkVM4{'^'V_qgdA.8yn3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10140 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: colin@colino.net Precedence: bulk X-list: netdev Content-Length: 803 Lines: 22 On 11 Oct 2004 at 11h10, Matt Mackall wrote: Hi, > Ergh, you deleted the context. Again, imagine we're originally in > ->poll() for _a non-netpoll-related reason_. In other words, the > console sem is not taken, because we're just doing routine network > I/O. While in poll(), we take a private driver lock. Then for whatever > reason, we printk -> netconsole -> netpoll -> poll() again where we > attempt to retake the private driver lock. > > > P.S.: I made the same mistake long ago, but akpm set me straight. > > I'm pretty sure this case is different. I tried replacing spin_lock by spin_trylock in poll() and a few other functions (and returning accordingly), but it didn't help. I'm beginning to think I won't be able to debug this one! ;) -- Colin "When in doubt, do the right thing." From shemminger@osdl.org Mon Oct 11 17:14:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 17:14:10 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9C0E4bc006001 for ; Mon, 11 Oct 2004 17:14:04 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9C0DiWL030996 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 11 Oct 2004 17:13:45 -0700 Date: Mon, 11 Oct 2004 17:14:22 -0700 From: Stephen Hemminger To: davem@redhat.com Cc: netdev@oss.sgi.com Subject: [RFC] tcp ephemeral port selection Message-Id: <20041011171422.65f88472@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.92 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10141 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 Content-Length: 7888 Lines: 254 Here is a test patch which changes how TCP ephemeral ports are selected from a simple roving pointer to: * net_random() as starting point when doing pure local searchs. * use md hash (like isn) when doing connection based assignments with a rover This is *not* for 2.6.9 but wanted to get it out for comment for future versions. diff -Nru a/drivers/char/random.c b/drivers/char/random.c --- a/drivers/char/random.c 2004-10-11 17:08:33 -07:00 +++ b/drivers/char/random.c 2004-10-11 17:08:33 -07:00 @@ -2354,6 +2354,23 @@ return halfMD4Transform(hash, keyptr->secret); } +/* Generate secure starting point for ephemeral TCP port search */ +__u32 secure_tcp_port_ephemeral(__u32 saddr, __u32 daddr, __u16 dport) +{ + __u32 hash[4]; + struct keydata *keyptr = get_keyptr(); + /* + * Pick a unique starting offset for each ephemeral port search + * (saddr, daddr, dport). + */ + hash[0] = saddr; + hash[1] = daddr; + hash[2] = dport << 16 | smp_processor_id(); + hash[3] = keyptr->secret[11]; + + return halfMD4Transform(hash, keyptr->secret); +} + #ifdef CONFIG_SYN_COOKIES /* * Secure SYN cookie computation. This is the algorithm worked out by diff -Nru a/include/linux/random.h b/include/linux/random.h --- a/include/linux/random.h 2004-10-11 17:08:33 -07:00 +++ b/include/linux/random.h 2004-10-11 17:08:33 -07:00 @@ -54,6 +54,7 @@ void generate_random_uuid(unsigned char uuid_out[16]); extern __u32 secure_ip_id(__u32 daddr); +extern __u32 secure_tcp_port_ephemeral(__u32 saddr, __u32 daddr, __u16 dport); extern __u32 secure_tcp_sequence_number(__u32 saddr, __u32 daddr, __u16 sport, __u16 dport); extern __u32 secure_tcp_syn_cookie(__u32 saddr, __u32 daddr, diff -Nru a/include/net/tcp.h b/include/net/tcp.h --- a/include/net/tcp.h 2004-10-11 17:08:33 -07:00 +++ b/include/net/tcp.h 2004-10-11 17:08:33 -07:00 @@ -140,7 +140,6 @@ rwlock_t __tcp_lhash_lock ____cacheline_aligned; atomic_t __tcp_lhash_users; wait_queue_head_t __tcp_lhash_wait; - spinlock_t __tcp_portalloc_lock; } tcp_hashinfo; #define tcp_ehash (tcp_hashinfo.__tcp_ehash) @@ -151,14 +150,12 @@ #define tcp_lhash_lock (tcp_hashinfo.__tcp_lhash_lock) #define tcp_lhash_users (tcp_hashinfo.__tcp_lhash_users) #define tcp_lhash_wait (tcp_hashinfo.__tcp_lhash_wait) -#define tcp_portalloc_lock (tcp_hashinfo.__tcp_portalloc_lock) extern kmem_cache_t *tcp_bucket_cachep; extern struct tcp_bind_bucket *tcp_bucket_create(struct tcp_bind_hashbucket *head, unsigned short snum); extern void tcp_bucket_destroy(struct tcp_bind_bucket *tb); extern void tcp_bucket_unlock(struct sock *sk); -extern int tcp_port_rover; extern struct sock *tcp_v4_lookup_listener(u32 addr, unsigned short hnum, int dif); /* These are AF independent. */ diff -Nru a/net/ipv4/tcp.c b/net/ipv4/tcp.c --- a/net/ipv4/tcp.c 2004-10-11 17:08:33 -07:00 +++ b/net/ipv4/tcp.c 2004-10-11 17:08:33 -07:00 @@ -2285,7 +2285,6 @@ sysctl_tcp_max_orphans >>= (3 - order); sysctl_max_syn_backlog = 128; } - tcp_port_rover = sysctl_local_port_range[0] - 1; sysctl_tcp_mem[0] = 768 << order; sysctl_tcp_mem[1] = 1024 << order; diff -Nru a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c --- a/net/ipv4/tcp_ipv4.c 2004-10-11 17:08:33 -07:00 +++ b/net/ipv4/tcp_ipv4.c 2004-10-11 17:08:33 -07:00 @@ -93,7 +93,6 @@ .__tcp_lhash_users = ATOMIC_INIT(0), .__tcp_lhash_wait = __WAIT_QUEUE_HEAD_INITIALIZER(tcp_hashinfo.__tcp_lhash_wait), - .__tcp_portalloc_lock = SPIN_LOCK_UNLOCKED }; /* @@ -102,7 +101,6 @@ * 32768-61000 */ int sysctl_local_port_range[2] = { 1024, 4999 }; -int tcp_port_rover = 1024 - 1; static __inline__ int tcp_hashfn(__u32 laddr, __u16 lport, __u32 faddr, __u16 fport) @@ -219,14 +217,10 @@ int low = sysctl_local_port_range[0]; int high = sysctl_local_port_range[1]; int remaining = (high - low) + 1; - int rover; + __u16 rover; - spin_lock(&tcp_portalloc_lock); - rover = tcp_port_rover; + rover = low + net_random() % (high - low); do { - rover++; - if (rover < low || rover > high) - rover = low; head = &tcp_bhash[tcp_bhashfn(rover)]; spin_lock(&head->lock); tb_for_each(tb, node, &head->chain) @@ -234,10 +228,10 @@ goto next; break; next: + if (++rover >= high) + rover = low; spin_unlock(&head->lock); } while (--remaining > 0); - tcp_port_rover = rover; - spin_unlock(&tcp_portalloc_lock); /* Exhausted local port range during search? */ ret = 1; @@ -634,18 +628,26 @@ return -EADDRNOTAVAIL; } +static inline __u32 ephemeral_port_offset(const struct sock *sk) +{ + const struct inet_opt *inet = inet_sk(sk); + return secure_tcp_port_ephemeral(inet->rcv_saddr, inet->daddr, + inet->dport); +} + /* * Bind a port for a connect operation and hash it. */ static int tcp_v4_hash_connect(struct sock *sk) { - unsigned short snum = inet_sk(sk)->num; + __u16 snum = inet_sk(sk)->num; struct tcp_bind_hashbucket *head; struct tcp_bind_bucket *tb; int ret; + static int next_rover = 1024; if (!snum) { - int rover; + __u16 rover; int low = sysctl_local_port_range[0]; int high = sysctl_local_port_range[1]; int remaining = (high - low) + 1; @@ -654,26 +656,10 @@ local_bh_disable(); - /* TODO. Actually it is not so bad idea to remove - * tcp_portalloc_lock before next submission to Linus. - * As soon as we touch this place at all it is time to think. - * - * Now it protects single _advisory_ variable tcp_port_rover, - * hence it is mostly useless. - * Code will work nicely if we just delete it, but - * I am afraid in contented case it will work not better or - * even worse: another cpu just will hit the same bucket - * and spin there. - * So some cpu salt could remove both contention and - * memory pingpong. Any ideas how to do this in a nice way? - */ - spin_lock(&tcp_portalloc_lock); - rover = tcp_port_rover; - + /* next_rover is only advisory, don't bother with lock. */ + rover = low + (next_rover - low + + ephemeral_port_offset(sk)) % (high - low); do { - rover++; - if ((rover < low) || (rover > high)) - rover = low; head = &tcp_bhash[tcp_bhashfn(rover)]; spin_lock(&head->lock); @@ -703,19 +689,17 @@ goto ok; next_port: + if (++rover == high) + rover = low; spin_unlock(&head->lock); } while (--remaining > 0); - tcp_port_rover = rover; - spin_unlock(&tcp_portalloc_lock); - local_bh_enable(); return -EADDRNOTAVAIL; ok: /* All locks still held and bhs disabled */ - tcp_port_rover = rover; - spin_unlock(&tcp_portalloc_lock); + next_rover = rover; tcp_bind_hash(sk, tb, rover); if (sk_unhashed(sk)) { @@ -2646,7 +2630,6 @@ EXPORT_SYMBOL(tcp_hashinfo); EXPORT_SYMBOL(tcp_inherit_port); EXPORT_SYMBOL(tcp_listen_wlock); -EXPORT_SYMBOL(tcp_port_rover); EXPORT_SYMBOL(tcp_prot); EXPORT_SYMBOL(tcp_put_port); EXPORT_SYMBOL(tcp_unhash); diff -Nru a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c --- a/net/ipv6/tcp_ipv6.c 2004-10-11 17:08:33 -07:00 +++ b/net/ipv6/tcp_ipv6.c 2004-10-11 17:08:33 -07:00 @@ -136,13 +136,10 @@ int low = sysctl_local_port_range[0]; int high = sysctl_local_port_range[1]; int remaining = (high - low) + 1; - int rover; + __u16 rover; - spin_lock(&tcp_portalloc_lock); - rover = tcp_port_rover; - do { rover++; - if ((rover < low) || (rover > high)) - rover = low; + rover = low + net_random() % (high - low); + do { head = &tcp_bhash[tcp_bhashfn(rover)]; spin_lock(&head->lock); tb_for_each(tb, node, &head->chain) @@ -150,10 +147,10 @@ goto next; break; next: + if (++rover >= high) + rover = low; spin_unlock(&head->lock); } while (--remaining > 0); - tcp_port_rover = rover; - spin_unlock(&tcp_portalloc_lock); /* Exhausted local port range during search? */ ret = 1; From nagendra_tomar@adaptec.com Mon Oct 11 22:22:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 22:22:46 -0700 (PDT) Received: from magic.adaptec.com (magic.adaptec.com [216.52.22.17]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9C5MeKt024908 for ; Mon, 11 Oct 2004 22:22:40 -0700 Received: from redfish.adaptec.com (redfish.adaptec.com [162.62.50.11]) by magic.adaptec.com (8.11.6/8.11.6) with ESMTP id i9C5LcW29354; Mon, 11 Oct 2004 22:21:38 -0700 Received: from hyde2k01.adaptec.com (hyde2k01.adaptec.com [10.159.2.28]) by redfish.adaptec.com (8.11.6/8.11.6) with ESMTP id i9C5Lax28238; Mon, 11 Oct 2004 22:21:36 -0700 Received: from cheetah.adaptec.com ([10.159.5.52]) by hyde2k01.adaptec.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 12 Oct 2004 10:51:34 +0530 Date: Tue, 12 Oct 2004 11:02:51 +0530 (IST) From: Nagendra Singh Tomar X-X-Sender: tomar@localhost.localdomain Reply-To: "Tomar, Nagendra" To: "David S. Miller" cc: "Chad N. Tindel" , , Subject: Re: udp_recvmsg: possible bug causing infinite hang? In-Reply-To: <20041009184503.7fc5c105.davem@davemloft.net> Message-ID: Organization: Adaptec MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-OriginalArrivalTime: 12 Oct 2004 05:21:34.0387 (UTC) FILETIME=[57069030:01C4B01B] X-archive-position: 10142 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: nagendra_tomar@adaptec.com Precedence: bulk X-list: netdev Content-Length: 888 Lines: 23 On Sat, 9 Oct 2004, David S. Miller wrote: > Select() returning that a filedescriptor is readable does not > guarentee that a blocking socket will not block in the ead > call. > Does the POSIX standard _not_ give this implicit guarantee ? Whats the point in having a select call that says that the fd is readable, and when I go to read it the blocking read call blocks. Then either select returned a wrong positive or the read is buggy. The kernel should mark the socket readable (and hence select returns "readable") only after it has added the incoming data to the socket receive queue or it has changed the state of the socket (in case of TCP connections getting closed), in case of peer closing the connection. After that has been done, is the guarantee not there ? Thanx, tomar -- You have moved the mouse. Windows must be restarted for the changes to take effect. From ctindel@calma.pair.com Mon Oct 11 22:23:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 22:23:42 -0700 (PDT) Received: from calma.pair.com (calma.pair.com [209.68.1.95]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9C5NbJF025210 for ; Mon, 11 Oct 2004 22:23:37 -0700 Received: (qmail 67472 invoked by uid 3059); 12 Oct 2004 05:23:23 -0000 Date: Tue, 12 Oct 2004 01:23:23 -0400 From: "Chad N. Tindel" To: netdev@oss.sgi.com Cc: linux-net@vger.kernel.org Subject: Problems reading from /proc/net/tcp Message-ID: <20041012052323.GA62811@calma.pair.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-archive-position: 10143 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chad@tindel.net Precedence: bulk X-list: netdev Content-Length: 1680 Lines: 48 I'm seeing really bizarre behavior when reading from /proc/net/tcp. On a completely unloaded system (4 CPUs, no application processes running), it can take multiple seconds just to cat this file. The /proc/net/tcp file only has 21 lines in it, so it isn't like there are just tons of socket connections. Here's an example: [root@hpq11 root]# time cat /proc/net/tcp > /dev/null real 0m3.253s user 0m0.000s sys 0m0.000s However, if the system is really loaded (I'm running make -j 8 bzImage), it speeds up: [root@hpq11 root]# time cat /proc/net/tcp > /dev/null real 0m0.487s user 0m0.000s sys 0m0.000s I searched around on google and could only find the following discussion: http://www.ussg.iu.edu/hypermail/linux/kernel/0110.2/0475.html However, it is from 2001 so I'm not really sure how relevant it is. The machine in question has 2 GB of RAM. dmesg displays the following output: [root@hpq11 etc]# dmesg | grep Hash TCP: Hash tables configured (established 524288 bind 65536) The above mentioned thread seems to say that the TCP Connection Hash Table Size is too big, and that is why /proc/net/tcp takes so long. However, it offers no information on how to correct the problem, and I can't seem to find any documentation that tells me what tunable I need to modify to make this problem go away (is there a way to reduce the hash table size?). An identical machine with the same memory size and same kernel (and same dmesg output) does not have this problem. Both machines are running Redhat 3 Update 3. If this problem has already been discussed ad nauseum, any help or quick pointer would be very much appreciated. Regards, Chad From ctindel@calma.pair.com Mon Oct 11 22:32:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 22:32:52 -0700 (PDT) Received: from calma.pair.com (calma.pair.com [209.68.1.95]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9C5Wkon027059 for ; Mon, 11 Oct 2004 22:32:47 -0700 Received: (qmail 68396 invoked by uid 3059); 12 Oct 2004 05:32:33 -0000 Date: Tue, 12 Oct 2004 01:32:33 -0400 From: "Chad N. Tindel" To: Nagendra Singh Tomar Cc: netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Re: udp_recvmsg: possible bug causing infinite hang? Message-ID: <20041012053233.GB62811@calma.pair.com> References: <20041009184503.7fc5c105.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-archive-position: 10144 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chad@tindel.net Precedence: bulk X-list: netdev Content-Length: 993 Lines: 17 > Does the POSIX standard _not_ give this implicit guarantee ? Whats the > point in having a select call that says that the fd is readable, and when > I go to read it the blocking read call blocks. Then either select returned > a wrong positive or the read is buggy. > The kernel should mark the socket readable (and hence select returns > "readable") only after it has added the incoming data to the socket receive > queue or it has changed the state of the socket (in case of TCP connections > getting closed), in case of peer closing the connection. > After that has been done, is the guarantee not there ? What you're saying is correct. However, if the UDP handler pulls the data off of the receive queue and then finds that the datagram is corrupted, it will go back into the read function to wait for another datagram. Personally I think that it should return some other kind of error (not EAGAIN) to indicate somehow that we discarded a datagram due to a bad checksum. Chad From nagendra_tomar@adaptec.com Mon Oct 11 22:57:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 11 Oct 2004 22:57:46 -0700 (PDT) Received: from magic.adaptec.com (magic.adaptec.com [216.52.22.17]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9C5veXZ029327 for ; Mon, 11 Oct 2004 22:57:40 -0700 Received: from redfish.adaptec.com (redfish.adaptec.com [162.62.50.11]) by magic.adaptec.com (8.11.6/8.11.6) with ESMTP id i9C5vLW09461; Mon, 11 Oct 2004 22:57:21 -0700 Received: from hyde2k01.adaptec.com (hyde2k01.adaptec.com [10.159.2.28]) by redfish.adaptec.com (8.11.6/8.11.6) with ESMTP id i9C5vKx01579; Mon, 11 Oct 2004 22:57:20 -0700 Received: from cheetah.adaptec.com ([10.159.5.52]) by hyde2k01.adaptec.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 12 Oct 2004 11:27:17 +0530 Date: Tue, 12 Oct 2004 11:38:34 +0530 (IST) From: Nagendra Singh Tomar X-X-Sender: tomar@localhost.localdomain Reply-To: "Tomar, Nagendra" To: "Chad N. Tindel" cc: Nagendra Singh Tomar , , Subject: Re: udp_recvmsg: possible bug causing infinite hang? In-Reply-To: <20041012053233.GB62811@calma.pair.com> Message-ID: Organization: Adaptec MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-OriginalArrivalTime: 12 Oct 2004 05:57:17.0522 (UTC) FILETIME=[546F0320:01C4B020] X-archive-position: 10145 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: nagendra_tomar@adaptec.com Precedence: bulk X-list: netdev Content-Length: 1735 Lines: 41 On Tue, 12 Oct 2004, Chad N. Tindel wrote: > > Does the POSIX standard _not_ give this implicit guarantee ? Whats the > > point in having a select call that says that the fd is readable, and when > > I go to read it the blocking read call blocks. Then either select returned > > a wrong positive or the read is buggy. > > The kernel should mark the socket readable (and hence select returns > > "readable") only after it has added the incoming data to the socket receive > > queue or it has changed the state of the socket (in case of TCP connections > > getting closed), in case of peer closing the connection. > > After that has been done, is the guarantee not there ? > > What you're saying is correct. However, if the UDP handler pulls the data > off of the receive queue and then finds that the datagram is corrupted, it > will go back into the read function to wait for another datagram. Personally > I think that it should return some other kind of error (not EAGAIN) to indicate > somehow that we discarded a datagram due to a bad checksum. Now I wonder whether the skb should be added to the UDP socket receive queue, only after checksum verification (as is done for TCP). I understand that, doing it that way we lose the advantage of folding copy-to-user and checksumming. If the standard does not explicitly write anything about the guarantee of read/write passing after successful return from select, then its fine; but somehow that does not sound very rational. If anyone can point to the specific section in the POSIX standard that dictates this, it will be of great help. Thanx, tomar > > Chad > -- -- You have moved the mouse. Windows must be restarted for the changes to take effect. From dada1@cosmosbay.com Tue Oct 12 01:16:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 12 Oct 2004 01:16:28 -0700 (PDT) Received: from gw1.cosmosbay.com (gw1.cosmosbay.com [62.23.185.226]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9C8GMBQ008430 for ; Tue, 12 Oct 2004 01:16:23 -0700 Received: from [172.16.0.131] (edumazet-port [172.16.0.131]) (authenticated bits=0) by gw1.cosmosbay.com (8.12.9/8.12.9) with ESMTP id i9C8Fvju003067; Tue, 12 Oct 2004 10:15:59 +0200 Message-ID: <416B92BC.1010504@cosmosbay.com> Date: Tue, 12 Oct 2004 10:15:56 +0200 From: Eric Dumazet User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: fr, en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com CC: Henrik Nordstrom Subject: Re: Three way TCP handshake : can we avoid the third packet ? References: <41504117.9010108@cosmosbay.com> <415136D1.7030600@cosmosbay.com> In-Reply-To: <415136D1.7030600@cosmosbay.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10146 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dada1@cosmosbay.com Precedence: bulk X-list: netdev Content-Length: 2578 Lines: 80 Following this discussion on netdev, sorry to bother you again :) Currently, linux cannot easily avoids the third packet (ACK only) of TCP handshake, for connections initiated from linux side. The send(socket, data) is denied (EAGAIN) if the socket is in NODELAY mode and socket not yet connected (connect() done , but not in ESTABLISHED state). So basically, a daemon willing to avoid the third packet must use one thread for each outgoing pending connection, seting the socket in blocking mode and blocking in send()/write() syscall. In my case, I would need about 1000 threads :( Could we just delay (say up to 200ms) the ACK packet the tcp stack sends ? If the application uses send() or write() a short time after the established state is notified, then the ACK could be suppressed. This way, every application could benefit from this. Thank you Eric Dumazet Eric Dumazet wrote: > Henrik Nordstrom wrote: > >> On Tue, 21 Sep 2004, Eric Dumazet wrote: >> >>> I discovered today that some TCP stacks were able to initiate TCP >>> sockets with 2 packets "only". >>> >>> The third packet (ACK packet) is just delayed and integrated into the >>> data packet. >> >> >> >> The TCP standard even allows you to have data in the SYN packet if you >> like. There however needs to be an exchange of three packets before >> the connection is considered established. The SYN flag is just like >> "octet 0" in the data stream of from sending direction. SYN + data is >> just that. As having data in the SYN or SYN+ACK packets is very >> uncommon not all TCP stacks are prepared to handle this and is >> therefore not recommended. >> >> All should handle a data payload in the ACK packet I think however, >> but there may obviously be some odd ones which does not. >> >>> Is it possible to achieve the same thing with linux 2.4/2.6, for >>> connections initiated by us ? >> >> >> >> Looking at the kernel source... seems to be the case if you simply >> initiate a non-blocking connect and then queue some data to be sent on >> the connection while the connect is taking place. Testing.. yes this >> does work. >> >> set non-blocking >> connect >> set blocking > > > Thank you for the hint. But the "set blocking" makes me nervous, since I > need to be sure not to block at write()/send() time... > >> write >> >> Regards >> Henrik > > > - > To unsubscribe from this list: send the line "unsubscribe linux-net" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > From dada1@cosmosbay.com Tue Oct 12 01:38:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 12 Oct 2004 01:38:32 -0700 (PDT) Received: from gw1.cosmosbay.com (gw1.cosmosbay.com [62.23.185.226]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9C8cQZ0009106 for ; Tue, 12 Oct 2004 01:38:27 -0700 Received: from [172.16.0.131] (edumazet-port [172.16.0.131]) (authenticated bits=0) by gw1.cosmosbay.com (8.12.9/8.12.9) with ESMTP id i9C8c5ju003544; Tue, 12 Oct 2004 10:38:05 +0200 Message-ID: <416B97ED.1090002@cosmosbay.com> Date: Tue, 12 Oct 2004 10:38:05 +0200 From: Eric Dumazet User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: fr, en-us, en MIME-Version: 1.0 To: Eric Dumazet CC: netdev@oss.sgi.com, Henrik Nordstrom Subject: Re: Three way TCP handshake : can we avoid the third packet ? References: <41504117.9010108@cosmosbay.com> <415136D1.7030600@cosmosbay.com> <416B92BC.1010504@cosmosbay.com> In-Reply-To: <416B92BC.1010504@cosmosbay.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10147 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dada1@cosmosbay.com Precedence: bulk X-list: netdev Content-Length: 3083 Lines: 105 Well... I discovered I can use this trick, with a NODELAY socket : int defaccept = 1 ; setsockopt(sockfd, SOL_TCP, TCP_DEFER_ACCEPT, &defaccept, sizeof(int)) ; connect(sockfd, ...) ; ... select()/poll()/epoll(); ... send(sockfd); This way, the third packet (pure ACK) is not sent. But I suspect this trick could be illegal in next kernel versions ... :( Eric Eric Dumazet wrote: > Following this discussion on netdev, sorry to bother you again :) > > Currently, linux cannot easily avoids the third packet (ACK only) of TCP > handshake, for connections initiated from linux side. > > The send(socket, data) is denied (EAGAIN) if the socket is in NODELAY > mode and socket not yet connected (connect() done , but not in > ESTABLISHED state). > > So basically, a daemon willing to avoid the third packet must use one > thread for each outgoing pending connection, seting the socket in > blocking mode and blocking in send()/write() syscall. In my case, I > would need about 1000 threads :( > > Could we just delay (say up to 200ms) the ACK packet the tcp stack sends ? > > If the application uses send() or write() a short time after the > established state is notified, then the ACK could be suppressed. > > This way, every application could benefit from this. > > > Thank you > Eric Dumazet > > Eric Dumazet wrote: > >> Henrik Nordstrom wrote: >> >>> On Tue, 21 Sep 2004, Eric Dumazet wrote: >>> >>>> I discovered today that some TCP stacks were able to initiate TCP >>>> sockets with 2 packets "only". >>>> >>>> The third packet (ACK packet) is just delayed and integrated into the >>>> data packet. >>> >>> >>> >>> >>> The TCP standard even allows you to have data in the SYN packet if >>> you like. There however needs to be an exchange of three packets >>> before the connection is considered established. The SYN flag is just >>> like "octet 0" in the data stream of from sending direction. SYN + >>> data is just that. As having data in the SYN or SYN+ACK packets is >>> very uncommon not all TCP stacks are prepared to handle this and is >>> therefore not recommended. >>> >>> All should handle a data payload in the ACK packet I think however, >>> but there may obviously be some odd ones which does not. >>> >>>> Is it possible to achieve the same thing with linux 2.4/2.6, for >>>> connections initiated by us ? >>> >>> >>> >>> >>> Looking at the kernel source... seems to be the case if you simply >>> initiate a non-blocking connect and then queue some data to be sent >>> on the connection while the connect is taking place. Testing.. yes >>> this does work. >>> >>> set non-blocking >>> connect >>> set blocking >> >> >> >> Thank you for the hint. But the "set blocking" makes me nervous, since >> I need to be sure not to block at write()/send() time... >> >>> write >>> >>> Regards >>> Henrik >> >> >> >> - >> To unsubscribe from this list: send the line "unsubscribe linux-net" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> >> > > From hno@marasystems.com Tue Oct 12 01:42:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 12 Oct 2004 01:42:05 -0700 (PDT) Received: from filer.marasystems.com (marasystems.com [83.241.133.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9C8fx9n009466 for ; Tue, 12 Oct 2004 01:42:00 -0700 Received: from localhost (henrik@localhost) by filer.marasystems.com (8.11.6/8.11.6) with ESMTP id i9C8fhs22984; Tue, 12 Oct 2004 10:41:43 +0200 Date: Tue, 12 Oct 2004 10:41:43 +0200 (CEST) From: Henrik Nordstrom To: Eric Dumazet cc: netdev@oss.sgi.com Subject: Re: Three way TCP handshake : can we avoid the third packet ? In-Reply-To: <416B92BC.1010504@cosmosbay.com> Message-ID: References: <41504117.9010108@cosmosbay.com> <415136D1.7030600@cosmosbay.com> <416B92BC.1010504@cosmosbay.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-archive-position: 10148 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hno@marasystems.com Precedence: bulk X-list: netdev Content-Length: 969 Lines: 27 On Tue, 12 Oct 2004, Eric Dumazet wrote: > Following this discussion on netdev, sorry to bother you again :) > > Currently, linux cannot easily avoids the third packet (ACK only) of TCP > handshake, for connections initiated from linux side. > > The send(socket, data) is denied (EAGAIN) if the socket is in NODELAY mode > and socket not yet connected (connect() done , but not in ESTABLISHED > state). This is my observations as well. > So basically, a daemon willing to avoid the third packet must use one thread > for each outgoing pending connection, seting the socket in blocking mode and > blocking in send()/write() syscall. In my case, I would need about 1000 > threads :( > > Could we just delay (say up to 200ms) the ACK packet the tcp stack sends ? What would this do to the initial RTT measurements? From what I can see the RFCs only allow for delayed ACKs in response to a data segment. Not sure if this includes SYN (or FIN). Regards Henrik From hno@marasystems.com Tue Oct 12 01:56:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 12 Oct 2004 01:56:51 -0700 (PDT) Received: from filer.marasystems.com (marasystems.com [83.241.133.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9C8ujbU010213 for ; Tue, 12 Oct 2004 01:56:46 -0700 Received: from localhost (henrik@localhost) by filer.marasystems.com (8.11.6/8.11.6) with ESMTP id i9C8uQC23105; Tue, 12 Oct 2004 10:56:26 +0200 Date: Tue, 12 Oct 2004 10:56:26 +0200 (CEST) From: Henrik Nordstrom To: Nagendra Singh Tomar cc: "Chad N. Tindel" , netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Re: udp_recvmsg: possible bug causing infinite hang? In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-archive-position: 10149 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hno@marasystems.com Precedence: bulk X-list: netdev Content-Length: 1143 Lines: 30 On Tue, 12 Oct 2004, Nagendra Singh Tomar wrote: > checksumming. If the standard does not explicitly write anything about the > guarantee of read/write passing after successful return from select, then > its fine; but somehow that does not sound very rational. > If anyone can point to the specific section in the POSIX standard that > dictates this, it will be of great help. From SUSv3 on select(): A descriptor shall be considered ready for reading when a call to an input function with O_NONBLOCK clear would not block, whether or not the function would transfer data successfully. (The function might return data, an end-of-file indication, or an error other than one indicating that it is blocked, and in each of these cases the descriptor shall be considered ready for reading.) A descriptor shall be considered ready for writing when a call to an output function with O_NONBLOCK clear would not block, whether or not the function would transfer data successfully. so it seems to me the current Linux implementation is wrong in this regard. Regards Henrik From kernel@kolivas.org Tue Oct 12 04:39:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 12 Oct 2004 04:39:57 -0700 (PDT) Received: from mail13.syd.optusnet.com.au (mail13.syd.optusnet.com.au [211.29.132.194]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9CBdmkd019067 for ; Tue, 12 Oct 2004 04:39:48 -0700 Received: from mail.kolivas.org (c210-49-199-147.lowrp1.vic.optusnet.com.au [210.49.199.147]) by mail13.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id i9CBdQTM028370; Tue, 12 Oct 2004 21:39:28 +1000 Received: from [192.168.1.251] (pc [192.168.1.251]) by mail.kolivas.org (Postfix) with ESMTP id 85B1E3ED75; Tue, 12 Oct 2004 21:39:26 +1000 (EST) Message-ID: <416BC26B.6090603@kolivas.org> Date: Tue, 12 Oct 2004 21:39:23 +1000 From: Con Kolivas User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com Cc: linux kernel mailing list , davem@redhat.com Subject: [PATCH] netconsole support for b44 X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigF1B4BCC7BECD9961E09478F3" X-archive-position: 10150 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kernel@kolivas.org Precedence: bulk X-list: netdev Content-Length: 3104 Lines: 96 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF1B4BCC7BECD9961E09478F3 Content-Type: multipart/mixed; boundary="------------000801080201010709070804" This is a multi-part message in MIME format. --------------000801080201010709070804 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit This patch adds poll support to the b44 driver to allow netconsole support. Style lifted straight from 8139too.c here is the dmesg output with it in place: netconsole: device eth0 not up yet, forcing it netconsole: carrier detect appears flaky, waiting 10 seconds b44: eth0: Link is down. b44: eth0: Link is up at 100 Mbps, full duplex. b44: eth0: Flow control is on for TX and on for RX. netconsole: network logging started output confirmed by netcat on other system. Signed-off-by: Con Kolivas --------------000801080201010709070804 Content-Type: text/x-patch; name="b44poll.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="b44poll.diff" Index: linux-2.6.9-rc4-ck1/drivers/net/b44.c =================================================================== --- linux-2.6.9-rc4-ck1.orig/drivers/net/b44.c 2004-10-11 16:15:59.000000000 +1000 +++ linux-2.6.9-rc4-ck1/drivers/net/b44.c 2004-10-12 21:18:39.492813689 +1000 @@ -97,6 +97,10 @@ MODULE_DEVICE_TABLE(pci, b44_pci_tbl); static void b44_halt(struct b44 *); static void b44_init_rings(struct b44 *); static void b44_init_hw(struct b44 *); +static int b44_poll(struct net_device *dev, int *budget); +#ifdef CONFIG_NET_POLL_CONTROLLER +static void b44_poll_controller(struct net_device *dev); +#endif static inline unsigned long br32(const struct b44 *bp, unsigned long reg) { @@ -1297,6 +1301,19 @@ err_out_free: } #endif +#ifdef CONFIG_NET_POLL_CONTROLLER +/* + * Polling receive - used by netconsole and other diagnostic tools + * to allow network i/o with interrupts disabled. + */ +static void b44_poll_controller(struct net_device *dev) +{ + disable_irq(dev->irq); + b44_interrupt (dev->irq, dev, NULL); + enable_irq(dev->irq); +} +#endif + static int b44_close(struct net_device *dev) { struct b44 *bp = netdev_priv(dev); @@ -1793,6 +1810,9 @@ static int __devinit b44_init_one(struct dev->poll = b44_poll; dev->weight = 64; dev->watchdog_timeo = B44_TX_TIMEOUT; +#ifdef CONFIG_NET_POLL_CONTROLLER + dev->poll_controller = b44_poll_controller; +#endif dev->change_mtu = b44_change_mtu; dev->irq = pdev->irq; SET_ETHTOOL_OPS(dev, &b44_ethtool_ops); --------------000801080201010709070804-- --------------enigF1B4BCC7BECD9961E09478F3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBa8JuZUg7+tp6mRURAluDAJ9ETtCgIW2cVujxoZJmSD3hxzYHTgCgkgxl J8kFfVLNaPiAkmKJb745Q04= =PnF3 -----END PGP SIGNATURE----- --------------enigF1B4BCC7BECD9961E09478F3-- From Alexander.Povolotsky@marconi.com Tue Oct 12 06:18:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 12 Oct 2004 06:18:55 -0700 (PDT) Received: from mailgate.pit.comms.marconi.com (mailgate.pit.comms.marconi.com [169.144.68.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9CDImjG023504 for ; Tue, 12 Oct 2004 06:18:49 -0700 Received: from mailman.pit.comms.marconi.com (mailman.pit.comms.marconi.com [169.144.2.12]) by mailgate.pit.comms.marconi.com (8.12.10+Sun/8.12.10) with ESMTP id i9CDITr2010048 for ; Tue, 12 Oct 2004 09:18:29 -0400 (EDT) Received: from uspitsmsgrtr01.pit.comms.marconi.com (uspitsmsgrtr01.pit.comms.marconi.com [169.144.2.221]) by mailman.pit.comms.marconi.com (8.9.3/8.9.3) with ESMTP id JAA26585 for ; Tue, 12 Oct 2004 09:18:28 -0400 (EDT) Received: by uspitsmsgrtr01.pit.comms.marconi.com with Internet Mail Service (5.5.2657.72) id ; Tue, 12 Oct 2004 09:18:28 -0400 Message-ID: <313680C9A886D511A06000204840E1CF0A647263@whq-msgusr-02.pit.comms.marconi.com> From: "Povolotsky, Alexander" To: "'netdev@oss.sgi.com'" Subject: FW: I have two Linux ( 2.6.8 ?) problems Date: Tue, 12 Oct 2004 09:18:22 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain; charset="iso-8859-1" X-archive-position: 10151 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Alexander.Povolotsky@marconi.com Precedence: bulk X-list: netdev Content-Length: 11746 Lines: 312 > Hi ! > > I have two problems disclosed here. > Are both problems (or at least #1) BusyBox related ? > Any idea how to fix ? > > Problem # 1 "pivot_root" failure issue > > Please note that PQ2FADS-VR is an embedded diskless board, > booted with (old) ramdisk (from W. Denk) with BusyBox v0.60.1and > then manually mounting onto NFS file system, provided on the Linux "file > server" PC, which is running Linux Red Hat 9 Shrike. > During the "manual"mount with specifying NFS version 2, several warnings > are thrown ...(-o nolock fixes those) > but after a while the mount gets complete ...but ... > I am not able to "pivot_root" on my board onto that mounted file system > (though on the board the portmap is not running ...I think .. and > loopback is configured) > - getting error: "pivot_root: Device or resource busy" (see below). > I have limited tools on that board at that time to figure out what keeps > old root busy > (outdated libc.so library, provided with ramdisk, which I can not replace > on the fly, > prevents adding/running rpcinfo and lsof). > > A) > ************************ > tftpboot 200000 uimage > ... > bootm 200000 FF800000 > ... > RAMDISK: Compressed image found at block 0 > VFS: Mounted root (ext2 filesystem). > Freeing unused kernel memory: 272k init > serial console detected. Disabling virtual terminals. > ### Application running ... > BusyBox v0.60.1 (2002.10.24-02:29+0000) Built-in shell (msh) > Enter 'help' for a list of built-in commands. > #mkdir /fadsroot > # ls -l / > drwxr-xr-x 2 0 0 2048 Jan 1 01:29 bin > drwxr-xr-x 2 0 0 3072 Jan 1 00:00 dev > drwxr-xr-x 5 0 0 1024 Jan 1 00:00 etc > drwxrwxrwx 38 0 0 4096 Oct 7 2004 fadsroot > drwxr-xr-x 2 0 0 1024 Jan 1 00:00 ftp > drwxr-xr-x 2 0 0 1024 Jan 1 00:00 home > drwxr-xr-x 3 0 0 1024 Jan 1 01:29 lib > dr-xr-xr-x 25 0 0 0 Jan 1 00:00 proc > drwxr-xr-x 2 0 0 1024 Jan 1 00:00 sbin > drwxr-xr-x 2 0 0 1024 Jan 1 00:00 tmp > drwxr-xr-x 4 0 0 1024 Jan 1 00:00 usr > drwxr-xr-x 4 0 0 1024 Jan 1 00:00 var > # portmap > portmap: not found > # ifconfig > eth0 Link encap:Ethernet HWaddr 08:00:17:40:00:03 > inet addr:192.168.0.5 Bcast:192.168.0.255 Mask:255.255.255.0 > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:19 errors:0 dropped:0 overruns:0 frame:0 > TX packets:15 errors:0 dropped:0 overruns:0 carrier:15 > collisions:0 txqueuelen:1000 > RX bytes:2056 (2.0 kb) TX bytes:1488 (1.4 kb) > Base address:0x8500 > > lo Link encap:Local Loopback > inet addr:127.0.0.1 Mask:255.0.0.0 > UP LOOPBACK RUNNING MTU:16436 Metric:1 > RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) > # mount > rootfs on / type rootfs (rw) > /dev/ram0 on / type ext2 (rw) > /proc on /proc type proc (rw,nodiratime) > #mount -o mountvers=2 192.168.0.3:/fadsroot /fadsroot > fs warning: mount version older than kernel > portmap: server localhost not responding, timed out > RPC: failed to contact portmap (errno -5). > portmap: server localhost not responding, timed out > RPC: failed to contact portmap (errno -5). > lockd_up: makesock failed, error=-5 > portmap: server localhost not responding, timed out > RPC: failed to contact portmap (errno -5). > # > # mount > rootfs on / type rootfs (rw) > /dev/ram0 on / type ext2 (rw) > /proc on /proc type proc (rw,nodiratime) > 192.168.0.3:/fadsroot on /fadsroot type nfs > (rw,v2,rsize=8192,wsize=8192,hard,ud > p,lock,addr=192.168.0.3) > # ps > PID Uid Stat Command > 1 root S init > 2 root R [ksoftirqd/0] > 3 root S [events/0] > 4 root S [khelper] > 5 root S [kblockd/0] > 6 root S [pdflush] > 7 root S [pdflush] > 8 root S [kswapd0] > 9 root S [aio/0] > 15 root S /usr/sbin/xinetd -stayalive -reuse -pidfile > /tmp/xinetd.pid > 138 root S [rpciod] > 253 root S -sh > 254 root S /bin/sh /bin/application > 256 root S sleep 300 > 258 root R ps > > # ifconfig > eth0 Link encap:Ethernet HWaddr 08:00:17:40:00:03 > inet addr:192.168.0.5 Bcast:192.168.0.255 Mask:255.255.255.0 > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:122 errors:0 dropped:0 overruns:0 frame:0 > TX packets:114 errors:0 dropped:0 overruns:0 carrier:114 > collisions:0 txqueuelen:1000 > RX bytes:20747 (20.2 kb) TX bytes:14320 (13.9 kb) > Base address:0x8500 > > lo Link encap:Local Loopback > inet addr:127.0.0.1 Mask:255.0.0.0 > UP LOOPBACK RUNNING MTU:16436 Metric:1 > RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) > > # cd /fadsroot > #sbin/pivot_root /fadsroot /tmp > pivot_root: pivot_root: Device or resource busy > > As I've mentioned already, using additionally -o noolock option, while > doung mount allows to get rid of warnings during mounting but this does > NOT fix > the pivot_root failure. > > ************************************************************* > I am not an expert on Red Hat 9 Linux either(though I "manage" that > machine ;-)), > but on that machine portmap is running there and /fadsroot is exported for > NFS mounting also: > > B) > ************************************************** > [root@localhost root]# uname -a > Linux localhost.localdomain 2.4.20-28.9 #1 Thu Dec 18 13:45:22 EST 2003 > i686 i686 i386 GNU/Linux > > [root@localhost root]# rpm -qa | grep portmap > portmap-4.0-54 > > [root@localhost root]# rpm -qa | grep nfs > nfs-utils-1.0.1-3.9 > redhat-config-nfs-1.0.4-5 > > [root@localhost root]# rpcinfo -p localhost > program vers proto port > 100000 2 tcp 111 portmapper > 100000 2 udp 111 portmapper > 100024 1 udp 1024 status > 100024 1 tcp 1024 status > 391002 2 tcp 1025 sgi_fam > 100011 1 udp 999 rquotad > 100011 2 udp 999 rquotad > 100011 1 tcp 1002 rquotad > 100011 2 tcp 1002 rquotad > 100003 2 udp 2049 nfs > 100003 3 udp 2049 nfs > 100021 1 udp 1026 nlockmgr > 100021 3 udp 1026 nlockmgr > 100021 4 udp 1026 nlockmgr > 100005 1 udp 1027 mountd > 100005 1 tcp 1026 mountd > 100005 2 udp 1027 mountd > 100005 2 tcp 1026 mountd > 100005 3 udp 1027 mountd > 100005 3 tcp 1026 mountd > > [root@localhost root]# cat /etc/exports > /fadsroot *(rw,no_root_squash,async) > > [root@localhost root]# showmount -e > Export list for localhost.localdomain: > /fadsroot * > > *********************************************** > > Problem #2 > I am also not able to boot "straight" (i.e., without ramdisk) - with NFS > mounting the root file system > onto the same (as described above) Linux "file server" PC running Linux > Red Hat 9 Shrike > (with the same settings as it is described above) - > this does not work - I am getting kernel panic "Attempted to kill init!"- > see below C) > (That is why I am booting with ramdisk instead). > This kernel panic is puzzling (given that with ramdisk I could boot now ). > > So perhaps the problem is again in the NFS version incompatibility ??? > But this time it is not BusyBox from ramdisk ... but perhaps an attempt to > run BusyBox from /fadsroot > (it is there too, but more "current version" ) during the boot is failing > in this case ? > ... and the kernel on my board during booting does not "know", that it > needs to use NFS version 2 > during mounting ? > > Should the kernel be configured to > allow to NFS mount root file system onto the NFS server with version > 2 ? > > I do not see the kernel option to configure NFS version 2 ... > Here is what I have: > > CONFIG_NFS_FS=y > # CONFIG_NFS_V3 is not set > # CONFIG_NFS_V4 is not set > # CONFIG_NFS_DIRECTIO is not set > # CONFIG_NFSD is not set > CONFIG_ROOT_NFS=y > CONFIG_LOCKD=y > > C) > *************************************************************** > => printenv > bootdelay=5 > bootcmd=bootm 200000 > ethaddr=08:00:17:00:00:03 > serverip=192.168.0.3 > ipaddr=192.168.0.5 > baudrate=9600 > bootargs=root=/dev/nfs rw nfsroot=192.168.0.4:/fadsroot > stdin=serial > stdout=serial > stderr=serial > > Environment size: 210/262140 bytes > => tftpboot 200000 uimage > Using FCC2 ETHERNET device > TFTP from server 192.168.0.3; our IP address is 192.168.0.5 > Filename 'uimage'. > Load address: 0x200000 > Loading: > ################################################################# > > ################################################################# > ####################################### > done > Bytes transferred = 864364 (d306c hex) > => bootm 200000 > ## Booting image at 00200000 ... > Image Name: Linux-2.6.8-rc4 > Image Type: PowerPC Linux Kernel Image (gzip compressed) > Data Size: 864300 Bytes = 844 kB > Load Address: 00000000 > Entry Point: 00000000 > Verifying Checksum ... OK > Uncompressing Kernel Image ... OK > Linux version 2.6.8-rc4 (apovolot@USPITLAD104868) (gcc version > 3.3.2) #5 Mon Aug > 16 08:49:38 EDT 2004 > PQ2 ADS Port > Built 1 zonelists > Kernel command line: root=/dev/nfs rw nfsroot=192.168.0.4:/fadsroot > nobats ip=19 > 2.168.0.5 > PID hash table entries: 256 (order 8: 2048 bytes) > Warning: real time clock seems stuck! > Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) > Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) > Memory: 30432k available (1348k kernel code, 324k data, 272k init, > 0k highmem) > Calibrating delay loop... 131.07 BogoMIPS > Mount-cache hash table entries: 512 (order: 0, 4096 bytes) > NET: Registered protocol family 16 > PCI: Probing PCI hardware > Generic RTC Driver v1.07 > Serial: CPM driver $Revision: 0.01 $ > ttyCPM0 at MMIO 0xf0011a00 (irq = 40) is a CPM UART > RAMDISK driver initialized: 16 RAM disks of 32768K size 1024 > blocksize > loop: loaded (max 8 devices) > eth0: FCC ENET Version 0.3, 08:00:17:40:00:03 > NET: Registered protocol family 2 > IP: routing cache hash table of 512 buckets, 4Kbytes > TCP: Hash tables configured (established 2048 bind 4096) > NET: Registered protocol family 1 > NET: Registered protocol family 17 > IP-Config: Guessing netmask 255.255.255.0 > IP-Config: Complete: > device=eth0, addr=192.168.0.5, mask=255.255.255.0, > gw=255.255.255.255, > host=192.168.0.5, domain=, nis-domain=(none), > bootserver=255.255.255.255, rootserver=192.168.0.4, rootpath= > Looking up port of RPC 100003/2 on 192.168.0.4 > Looking up port of RPC 100005/1 on 192.168.0.4 > VFS: Mounted root (nfs filesystem). > Freeing unused kernel memory: 272k init > Kernel panic: Attempted to kill init! > <0>Rebooting in 180 seconds.. > > Any comment/opinion/solution/ ? > > Thanks, > Best Regards, > Your input/comments/advise is APPRECIATED in advance !, > Alex > > > From ak@suse.de Tue Oct 12 09:41:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 12 Oct 2004 09:42:00 -0700 (PDT) Received: from Cantor.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9CGfqWb031229 for ; Tue, 12 Oct 2004 09:41:54 -0700 Received: from hermes.suse.de (hermes-ext.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 6467ED4094A; Tue, 12 Oct 2004 18:38:06 +0200 (CEST) Date: Tue, 12 Oct 2004 18:38:06 +0200 From: Andi Kleen To: netdev@oss.sgi.com, davem@davemloft.net Subject: [PATCH] Remove bogus #ifdef CONFIG_SYSCTL in TCP Message-ID: <20041012163806.GA4223@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 10152 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 Content-Length: 587 Lines: 20 Modular IPv6 needs these variables always exported, even when CONFIG_SYSCTL is not enabled. Signed-off-by: Andi Kleen diff -u linux/net/ipv4/tcp_ipv4.c-o linux/net/ipv4/tcp_ipv4.c --- linux/net/ipv4/tcp_ipv4.c-o 2004-09-30 10:35:53.000000000 +0200 +++ linux/net/ipv4/tcp_ipv4.c 2004-10-12 18:35:56.000000000 +0200 @@ -2656,8 +2656,7 @@ EXPORT_SYMBOL(tcp_proc_register); EXPORT_SYMBOL(tcp_proc_unregister); #endif -#ifdef CONFIG_SYSCTL EXPORT_SYMBOL(sysctl_local_port_range); EXPORT_SYMBOL(sysctl_max_syn_backlog); EXPORT_SYMBOL(sysctl_tcp_low_latency); -#endif + From oxymoron@waste.org Tue Oct 12 11:10:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 12 Oct 2004 11:10:20 -0700 (PDT) Received: from waste.org (waste.org [209.173.204.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9CIABqj000739 for ; Tue, 12 Oct 2004 11:10:12 -0700 Received: from waste.org (localhost [127.0.0.1]) by waste.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id i9CI9nWk032192; Tue, 12 Oct 2004 13:09:49 -0500 Received: (from oxymoron@localhost) by waste.org (8.12.3/8.12.3/Debian-7.1) id i9CI9nI2032187; Tue, 12 Oct 2004 13:09:49 -0500 Date: Tue, 12 Oct 2004 13:09:49 -0500 From: Matt Mackall To: Con Kolivas Cc: netdev@oss.sgi.com, linux kernel mailing list , davem@redhat.com Subject: Re: [PATCH] netconsole support for b44 Message-ID: <20041012180949.GW5414@waste.org> References: <416BC26B.6090603@kolivas.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <416BC26B.6090603@kolivas.org> User-Agent: Mutt/1.3.28i X-Virus-Scanned: by amavisd-new X-archive-position: 10153 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mpm@selenic.com Precedence: bulk X-list: netdev Content-Length: 860 Lines: 26 On Tue, Oct 12, 2004 at 09:39:23PM +1000, Con Kolivas wrote: > This patch adds poll support to the b44 driver to allow netconsole > support. Style lifted straight from 8139too.c > > here is the dmesg output with it in place: > > netconsole: device eth0 not up yet, forcing it > netconsole: carrier detect appears flaky, waiting 10 seconds > b44: eth0: Link is down. > b44: eth0: Link is up at 100 Mbps, full duplex. > b44: eth0: Flow control is on for TX and on for RX. > netconsole: network logging started > > output confirmed by netcat on other system. > > Signed-off-by: Con Kolivas + disable_irq(dev->irq); + b44_interrupt (dev->irq, dev, NULL); + enable_irq(dev->irq); Aside from this bizarre whitespace convention and neglecting to cc: me, looks good. -- Mathematics is the supreme nostalgia of our time. From kernel@kolivas.org Tue Oct 12 14:48:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 12 Oct 2004 14:48:51 -0700 (PDT) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9CLmiwk009314 for ; Tue, 12 Oct 2004 14:48:44 -0700 Received: from mail.kolivas.org (c210-49-199-147.lowrp1.vic.optusnet.com.au [210.49.199.147]) by mail05.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id i9CLmLlm029171; Wed, 13 Oct 2004 07:48:23 +1000 Received: from [192.168.1.251] (pc [192.168.1.251]) by mail.kolivas.org (Postfix) with ESMTP id 177133E6E3; Wed, 13 Oct 2004 07:48:21 +1000 (EST) Message-ID: <416C5122.9040001@kolivas.org> Date: Wed, 13 Oct 2004 07:48:18 +1000 From: Con Kolivas User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Matt Mackall Cc: netdev@oss.sgi.com, linux kernel mailing list , davem@redhat.com Subject: Re: [PATCH] netconsole support for b44 References: <416BC26B.6090603@kolivas.org> <20041012180949.GW5414@waste.org> In-Reply-To: <20041012180949.GW5414@waste.org> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigBF3A108614D7BD67726F038C" X-archive-position: 10154 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kernel@kolivas.org Precedence: bulk X-list: netdev Content-Length: 1785 Lines: 58 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigBF3A108614D7BD67726F038C Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Matt Mackall wrote: > On Tue, Oct 12, 2004 at 09:39:23PM +1000, Con Kolivas wrote: > >>This patch adds poll support to the b44 driver to allow netconsole >>support. Style lifted straight from 8139too.c >> >>here is the dmesg output with it in place: >> >>netconsole: device eth0 not up yet, forcing it >>netconsole: carrier detect appears flaky, waiting 10 seconds >>b44: eth0: Link is down. >>b44: eth0: Link is up at 100 Mbps, full duplex. >>b44: eth0: Flow control is on for TX and on for RX. >>netconsole: network logging started >> >>output confirmed by netcat on other system. >> >>Signed-off-by: Con Kolivas > > > + disable_irq(dev->irq); > + b44_interrupt (dev->irq, dev, NULL); > + enable_irq(dev->irq); > > Aside from this bizarre whitespace convention and neglecting to cc: > me, looks good. > sorry,sorry,thanks. Can you explain where I went wrong in the whitespace so I don't make the same mistake again? It looked pretty standard to me. Should I nudge akpm with this or will it go via another route? Cheers, Con --------------enigBF3A108614D7BD67726F038C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBbFEkZUg7+tp6mRURAlWCAJ4oaRD1BZfn4t1aFQdzT5GHZA14mwCfZ08d c/pMvPFNLqseH5ekm/xyvZY= =wXV5 -----END PGP SIGNATURE----- --------------enigBF3A108614D7BD67726F038C-- From oxymoron@waste.org Tue Oct 12 14:57:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 12 Oct 2004 14:57:59 -0700 (PDT) Received: from waste.org (waste.org [209.173.204.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9CLvspI009932 for ; Tue, 12 Oct 2004 14:57:54 -0700 Received: from waste.org (localhost [127.0.0.1]) by waste.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id i9CLvXWk009958; Tue, 12 Oct 2004 16:57:33 -0500 Received: (from oxymoron@localhost) by waste.org (8.12.3/8.12.3/Debian-7.1) id i9CLvXfr009953; Tue, 12 Oct 2004 16:57:33 -0500 Date: Tue, 12 Oct 2004 16:57:32 -0500 From: Matt Mackall To: Con Kolivas Cc: netdev@oss.sgi.com, linux kernel mailing list , davem@redhat.com, Jeff Garzik Subject: Re: [PATCH] netconsole support for b44 Message-ID: <20041012215732.GV31237@waste.org> References: <416BC26B.6090603@kolivas.org> <20041012180949.GW5414@waste.org> <416C5122.9040001@kolivas.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <416C5122.9040001@kolivas.org> User-Agent: Mutt/1.3.28i X-Virus-Scanned: by amavisd-new X-archive-position: 10155 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mpm@selenic.com Precedence: bulk X-list: netdev Content-Length: 1353 Lines: 42 On Wed, Oct 13, 2004 at 07:48:18AM +1000, Con Kolivas wrote: > Matt Mackall wrote: > >On Tue, Oct 12, 2004 at 09:39:23PM +1000, Con Kolivas wrote: > > > >>This patch adds poll support to the b44 driver to allow netconsole > >>support. Style lifted straight from 8139too.c > >> > >>here is the dmesg output with it in place: > >> > >>netconsole: device eth0 not up yet, forcing it > >>netconsole: carrier detect appears flaky, waiting 10 seconds > >>b44: eth0: Link is down. > >>b44: eth0: Link is up at 100 Mbps, full duplex. > >>b44: eth0: Flow control is on for TX and on for RX. > >>netconsole: network logging started > >> > >>output confirmed by netcat on other system. > >> > >>Signed-off-by: Con Kolivas > > > > > >+ disable_irq(dev->irq); > >+ b44_interrupt (dev->irq, dev, NULL); > >+ enable_irq(dev->irq); > > > >Aside from this bizarre whitespace convention and neglecting to cc: > >me, looks good. > > > > sorry,sorry,thanks. > > Can you explain where I went wrong in the whitespace so I don't make the > same mistake again? It looked pretty standard to me. Stray space between b44_interrupt and args. > Should I nudge akpm with this or will it go via another route? Jeff Garzik usually picks up net driver stuff, I think he got this one. -- Mathematics is the supreme nostalgia of our time. From kernel@kolivas.org Tue Oct 12 16:27:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 12 Oct 2004 16:27:15 -0700 (PDT) Received: from mail07.syd.optusnet.com.au (mail07.syd.optusnet.com.au [211.29.132.188]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9CNR9FH015127 for ; Tue, 12 Oct 2004 16:27:10 -0700 Received: from mail.kolivas.org (c210-49-199-147.lowrp1.vic.optusnet.com.au [210.49.199.147]) by mail07.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id i9CNQkKY015129; Wed, 13 Oct 2004 09:26:48 +1000 Received: from pc.kolivas.org (pc [192.168.1.251]) by mail.kolivas.org (Postfix) with ESMTP id 3D9173E4B3; Wed, 13 Oct 2004 09:26:46 +1000 (EST) References: <416BC26B.6090603@kolivas.org> <20041012180949.GW5414@waste.org> <416C5122.9040001@kolivas.org> <20041012215732.GV31237@waste.org> Message-ID: X-Mailer: http://www.courier-mta.org/cone/ From: Con Kolivas To: Matt Mackall Cc: Con Kolivas , netdev@oss.sgi.com, linux kernel mailing list , davem@redhat.com, Jeff Garzik Subject: [PATCH]b44poll - whitespace Date: Wed, 13 Oct 2004 09:26:46 +1000 Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=_pc.kolivas.org-1097623606-0000" X-archive-position: 10156 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kernel@kolivas.org Precedence: bulk X-list: netdev Content-Length: 1293 Lines: 41 This is a MIME-formatted message. If you see this text it means that your E-mail software does not support MIME-formatted messages. --=_pc.kolivas.org-1097623606-0000 Content-Type: text/plain; format=flowed; charset="US-ASCII" Content-Disposition: inline Content-Transfer-Encoding: 7bit >> >+ disable_irq(dev->irq); >> >+ b44_interrupt (dev->irq, dev, NULL); >> >+ enable_irq(dev->irq); >> > > Stray space between b44_interrupt and args. Must have had my eyes closed. Trivial cleanup patch attached, thanks. Con --=_pc.kolivas.org-1097623606-0000 Content-Description: b44poll-ws.diff Content-Disposition: inline; FILENAME="b44poll-ws.diff" Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Index: linux-2.6.9-rc4-ck1/drivers/net/b44.c =================================================================== --- linux-2.6.9-rc4-ck1.orig/drivers/net/b44.c 2004-10-12 21:28:12.000000000 +1000 +++ linux-2.6.9-rc4-ck1/drivers/net/b44.c 2004-10-13 09:24:46.064825491 +1000 @@ -1309,7 +1309,7 @@ err_out_free: static void b44_poll_controller(struct net_device *dev) { disable_irq(dev->irq); - b44_interrupt (dev->irq, dev, NULL); + b44_interrupt(dev->irq, dev, NULL); enable_irq(dev->irq); } #endif --=_pc.kolivas.org-1097623606-0000-- From akepner@sgi.com Tue Oct 12 16:49:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 12 Oct 2004 16:49:13 -0700 (PDT) Received: from omx2.sgi.com (omx2-ext.sgi.com [192.48.171.19]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9CNn9Xf016059 for ; Tue, 12 Oct 2004 16:49:09 -0700 Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by omx2.sgi.com (8.12.11/8.12.9/linux-outbound_gateway-1.1) with ESMTP id i9D11EPt015901 for ; Tue, 12 Oct 2004 18:01:14 -0700 Received: from [192.168.2.3] (mtv-vpn-sw-corp-0-176.corp.sgi.com [134.15.0.176]) by cthulhu.engr.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id i9CNmsLH3349802; Tue, 12 Oct 2004 16:48:55 -0700 (PDT) Date: Tue, 12 Oct 2004 16:34:30 -0700 (PDT) From: X-X-Sender: To: cc: Subject: [PATCH 1/2] net/tg3.c: use mmiowb in tg3_rx, tg3_start_xmit Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 10157 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: akepner@sgi.com Precedence: bulk X-list: netdev Content-Length: 598 Lines: 27 Using mmiowb() prevents an occasional oops in tg3_tx() resulting from a NULL skb pointer in the tx_ring_info structure. Signed-off-by: Greg Banks --- --- linux.1/drivers/net/tg3.c 2004-10-12 13:50:39.000000000 -0700 +++ linux/drivers/net/tg3.c 2004-10-12 13:55:37.000000000 -0700 @@ -2729,6 +2729,7 @@ tw32_rx_mbox(MAILBOX_RCV_JUMBO_PROD_IDX + TG3_64BIT_REG_LOW, sw_idx); } + mmiowb(); return received; } @@ -3176,6 +3177,7 @@ netif_stop_queue(dev); out_unlock: + mmiowb(); spin_unlock_irqrestore(&tp->tx_lock, flags); dev->trans_start = jiffies; From akepner@sgi.com Tue Oct 12 16:56:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 12 Oct 2004 16:56:16 -0700 (PDT) Received: from omx2.sgi.com (omx2-ext.sgi.com [192.48.171.19]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9CNuBSM016862 for ; Tue, 12 Oct 2004 16:56:11 -0700 Received: from nodin.corp.sgi.com (nodin.corp.sgi.com [192.26.51.193]) by omx2.sgi.com (8.12.11/8.12.9/linux-outbound_gateway-1.1) with ESMTP id i9D18Hsi017946 for ; Tue, 12 Oct 2004 18:08:17 -0700 Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by nodin.corp.sgi.com (8.12.9/8.12.10/SGI_generic_relay-1.2) with ESMTP id i9CNsvl235420176 for ; Tue, 12 Oct 2004 16:54:57 -0700 (PDT) From: akepner@sgi.com Received: from [192.168.2.3] (mtv-vpn-sw-corp-0-176.corp.sgi.com [134.15.0.176]) by cthulhu.engr.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id i9CNruLH3351619 for ; Tue, 12 Oct 2004 16:53:57 -0700 (PDT) Date: Tue, 12 Oct 2004 16:39:32 -0700 (PDT) X-X-Sender: To: Subject: [PATCH 2/2] net/tg3.c: use mmiowb in tg3_poll Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 10158 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: akepner@sgi.com Precedence: bulk X-list: netdev Content-Length: 1140 Lines: 44 Returning from tg3_poll() without flushing the PIO write which reenables interrupts can result in lower cpu utilization and higher throughput. So use a memory barrier, mmiowb(), instead of flushing the write with a PIO read. Signed-off-by: Arthur Kepner --- --- linux.2/drivers/net/tg3.c 2004-10-12 14:00:40.000000000 -0700 +++ linux/drivers/net/tg3.c 2004-10-12 14:13:02.000000000 -0700 @@ -417,6 +417,20 @@ tg3_cond_int(tp); } +/* tg3_restart_ints + * similar to tg3_enable_ints, but it can return without flushing the + * PIO write which reenables interrupts + */ +static void tg3_restart_ints(struct tg3 *tp) +{ + tw32(TG3PCI_MISC_HOST_CTRL, + (tp->misc_host_ctrl & ~MISC_HOST_CTRL_MASK_PCI_INT)); + tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x00000000); + mmiowb(); + + tg3_cond_int(tp); +} + static inline void tg3_netif_stop(struct tg3 *tp) { netif_poll_disable(tp->dev); @@ -2788,7 +2802,7 @@ if (done) { spin_lock_irqsave(&tp->lock, flags); __netif_rx_complete(netdev); - tg3_enable_ints(tp); + tg3_restart_ints(tp); spin_unlock_irqrestore(&tp->lock, flags); } From greearb@candelatech.com Tue Oct 12 17:02:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 12 Oct 2004 17:02:06 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9D020EI017461 for ; Tue, 12 Oct 2004 17:02:01 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i9D07TLH023625 for ; Tue, 12 Oct 2004 17:07:29 -0700 Message-ID: <416C706B.5030300@candelatech.com> Date: Tue, 12 Oct 2004 17:01:47 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "'netdev@oss.sgi.com'" Subject: probable bug in pktgen Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10159 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Content-Length: 558 Lines: 15 While testing my own pktgen code I noticed that I can cause spectacular crashes by setting the 'multiskb' to > 1 and using VLAN interfaces. I believe this is because the virtual device changes the skb->dev pointer when it xmits, and then pktgen tries to send exactly this pkt again, even though the skb->dev is now hosed up. Unfortunately, my patch will not do the kernel pktgen much good, but next time someone is hacking there, maybe they can fix it :) Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From takata@linux-m32r.org Tue Oct 12 18:53:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 12 Oct 2004 18:53:23 -0700 (PDT) Received: from mail01.idc.renesas.com (mail.renesas.com [202.234.163.13]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9D1rDQX020426 for ; Tue, 12 Oct 2004 18:53:14 -0700 Received: (from root@localhost) by guardian02.idc.renesas.com with id i9D1qmsA019118; Wed, 13 Oct 2004 10:52:48 +0900 (JST) Received: from unknown [172.20.8.69] by guardian02.idc.renesas.com with SMTP id LAA19117 ; Wed, 13 Oct 2004 10:52:48 +0900 Received: from mrkaisv.hoku.renesas.com ([10.145.105.245]) by rnsmtp01.hoku_r.renesas.com (8.9.3/3.7W) with ESMTP id KAA10241; Wed, 13 Oct 2004 10:52:48 +0900 (JST) Received: from localhost (pcepx10 [10.145.105.241]) by mrkaisv.hoku.renesas.com (Postfix) with ESMTP id EBAC97981B7; Wed, 13 Oct 2004 10:52:47 +0900 (JST) Date: Wed, 13 Oct 2004 10:52:43 +0900 (JST) Message-Id: <20041013.105243.511706221.takata.hirokazu@renesas.com> To: jgarzik@pobox.com Cc: akpm@osdl.org, linux-kernel@vger.kernel.org, Paul Mundt , Nicolas Pitre , netdev@oss.sgi.com, takata@linux-m32r.org Subject: Re: [PATCH 2.6.9-rc4-mm1] [m32r] Fix smc91x driver for m32r From: Hirokazu Takata In-Reply-To: <416BFD79.1010306@pobox.com> References: <20041012.195043.137811384.takata.hirokazu@renesas.com> <416BFD79.1010306@pobox.com> X-Mailer: Mew version 3.3 on XEmacs 21.4.15 (Security Through Obscurity) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 10160 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: takata@linux-m32r.org Precedence: bulk X-list: netdev Content-Length: 1263 Lines: 43 Hello, Sorry, I've changed my mind, according to the thread of "[PATCH] net: fix smc91x build for sh/ppc" (Oct 12, 2004). I prefer that set_irq_type() is snipped by CONFIG_ARM, too. Please throw away this patch and retrieve the previous m32r-trivial-fix-of-smc91xh.patch again, if the above patch "[PATCH] net: fix smc91x build for sh/ppc" is applied. Thank you. From: Jeff Garzik Subject: Re: [PATCH 2.6.9-rc4-mm1] [m32r] Fix smc91x driver for m32r Date: Tue, 12 Oct 2004 11:51:21 -0400 > Hirokazu Takata wrote: > > Just fix compile error of drivers/net/smc91x.c for m32r. > > > > It seems the previous patch (m32r-trivial-fix-of-smc91xh.patch) is too old. > > So I will send a new patch. > > > > Please drop the previous patch > > ( $ patch -R1 -p1 > and apply the new one. > > > > * drivers/net/smc91x.h: > > - Add set_irq_type() macro to ignore it for m32r. > > - Fix RPC_LSA_DEFAULT and RPC_LSB_DEFAULT for an M3T-M32700UT board. > > > > Thanks. > > > > Signed-off-by: Hirokazu Takata > > Seems OK to me, I'll put it into my netdev queue. > > For net driver patches, please always CC > * netdev@oss.sgi.com, and > * jgarzik@pobox.com > > Jeff -- Takata From jgarzik@pobox.com Tue Oct 12 19:08:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 12 Oct 2004 19:08:47 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9D28fuP021483 for ; Tue, 12 Oct 2004 19:08:42 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CHYZ0-0003Gj-6O; Wed, 13 Oct 2004 03:08:26 +0100 Message-ID: <416C8E0B.4030409@pobox.com> Date: Tue, 12 Oct 2004 22:08:11 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Hirokazu Takata CC: akpm@osdl.org, linux-kernel@vger.kernel.org, Paul Mundt , Nicolas Pitre , netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc4-mm1] [m32r] Fix smc91x driver for m32r References: <20041012.195043.137811384.takata.hirokazu@renesas.com> <416BFD79.1010306@pobox.com> <20041013.105243.511706221.takata.hirokazu@renesas.com> In-Reply-To: <20041013.105243.511706221.takata.hirokazu@renesas.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10161 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: 260 Lines: 11 Hirokazu Takata wrote: > Please throw away this patch and retrieve the previous > m32r-trivial-fix-of-smc91xh.patch again, > if the above patch "[PATCH] net: fix smc91x build for sh/ppc" is applied. Would you be kind enough to send me this patch? Jeff From takata.hirokazu@renesas.com Tue Oct 12 20:16:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 12 Oct 2004 20:16:26 -0700 (PDT) Received: from mail02.idc.renesas.com (mail.renesas.com [202.234.163.13]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9D3GJvT023328 for ; Tue, 12 Oct 2004 20:16:20 -0700 Received: (from root@localhost) by guardian03.idc.renesas.com with id i9D3Fqrx011366; Wed, 13 Oct 2004 12:15:52 +0900 (JST) Received: from unknown [172.20.8.68] by guardian03.idc.renesas.com with SMTP id NAA11365 ; Wed, 13 Oct 2004 12:15:52 +0900 Received: from mrkaisv.hoku.renesas.com ([10.145.105.245]) by rnsmtp01.hoku_r.renesas.com (8.9.3/3.7W) with ESMTP id MAA24195; Wed, 13 Oct 2004 12:15:52 +0900 (JST) Received: from localhost (pcepx10 [10.145.105.241]) by mrkaisv.hoku.renesas.com (Postfix) with ESMTP id 73F7D7981B7; Wed, 13 Oct 2004 12:15:52 +0900 (JST) Date: Wed, 13 Oct 2004 12:15:47 +0900 (JST) Message-Id: <20041013.121547.863739114.takata.hirokazu@renesas.com> To: jgarzik@pobox.com Cc: takata@linux-m32r.org, akpm@osdl.org, linux-kernel@vger.kernel.org, paul.mundt@nokia.com, nico@cam.org, netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc4-mm1] [m32r] Fix smc91x driver for m32r From: Hirokazu Takata In-Reply-To: <416C8E0B.4030409@pobox.com> References: <416BFD79.1010306@pobox.com> <20041013.105243.511706221.takata.hirokazu@renesas.com> <416C8E0B.4030409@pobox.com> X-Mailer: Mew version 3.3 on XEmacs 21.4.15 (Security Through Obscurity) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 10162 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: takata.hirokazu@renesas.com Precedence: bulk X-list: netdev Content-Length: 1815 Lines: 61 From: Jeff Garzik Subject: Re: [PATCH 2.6.9-rc4-mm1] [m32r] Fix smc91x driver for m32r Date: Tue, 12 Oct 2004 22:08:11 -0400 > Hirokazu Takata wrote: > > Please throw away this patch and retrieve the previous > > m32r-trivial-fix-of-smc91xh.patch again, > > if the above patch "[PATCH] net: fix smc91x build for sh/ppc" is applied. > > > Would you be kind enough to send me this patch? > > Jeff OK. I will send you again, Jeff. This patch has been already applied to 2.6.9-rc4-mm1 kernel and you can also find it as ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.9-rc4/2.6.9-rc4-mm1/broken-out/m32r-trivial-fix-of-smc91xh.patch Thanks. To: Andrew Morton Cc: linux-kernel@vger.kernel.org, takata@linux-m32r.org Subject: [PATCH 2.6.9-rc2-mm2] [m32r] Trivial fix of smc91x.h ---- Hello, Here is a patch to fix smc91x.h for m32r. Please apply. Thanks. * drivers/net/smc91x.h: Fix LED control. Signed-off-by: Hayato Fujiwara Signed-off-by: Hirokazu Takata --- smc91x.h | 3 +++ 1 files changed, 3 insertions(+) diff -ruNp a/drivers/net/smc91x.h b/drivers/net/smc91x.h --- a/drivers/net/smc91x.h 2004-09-23 10:11:08.000000000 +0900 +++ b/drivers/net/smc91x.h 2004-09-23 13:16:42.000000000 +0900 @@ -216,6 +216,9 @@ static inline void SMC_outsw (unsigned l #define SMC_insw(a, r, p, l) insw((a) + (r) - 0xa0000000, p, l) #define SMC_outsw(a, r, p, l) outsw((a) + (r) - 0xa0000000, p, l) +#define RPC_LSA_DEFAULT RPC_LED_TX_RX +#define RPC_LSB_DEFAULT RPC_LED_100_10 + #elif defined(CONFIG_MACH_LPD7A400) || defined(CONFIG_MACH_LPD7A404) #include /* IOBARRIER_VIRT */ -- Hirokazu Takata Linux/M32R Project: http://www.linux-m32r.org/ From akpm@osdl.org Tue Oct 12 22:35:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 12 Oct 2004 22:35:10 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9D5Z5cj005411 for ; Tue, 12 Oct 2004 22:35:06 -0700 Received: from bix (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i9D5YD926076; Tue, 12 Oct 2004 22:34:13 -0700 Date: Tue, 12 Oct 2004 22:32:27 -0700 From: Andrew Morton To: Hirokazu Takata Cc: jgarzik@pobox.com, takata@linux-m32r.org, linux-kernel@vger.kernel.org, paul.mundt@nokia.com, nico@cam.org, netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc4-mm1] [m32r] Fix smc91x driver for m32r Message-Id: <20041012223227.45a62301.akpm@osdl.org> In-Reply-To: <20041013.121547.863739114.takata.hirokazu@renesas.com> References: <416BFD79.1010306@pobox.com> <20041013.105243.511706221.takata.hirokazu@renesas.com> <416C8E0B.4030409@pobox.com> <20041013.121547.863739114.takata.hirokazu@renesas.com> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10163 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 Content-Length: 1132 Lines: 27 Hirokazu Takata wrote: > > This patch has been already applied to 2.6.9-rc4-mm1 kernel and > you can also find it as > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.9-rc4/2.6.9-rc4-mm1/broken-out/m32r-trivial-fix-of-smc91xh.patch Well actually: smc91x-revert-11923358-m32r-modify-drivers-net-smc91xc.patch smc91x-assorted-minor-cleanups.patch smc91x-set-the-mac-addr-from-the-smc_enable-function.patch smc91x-fold-smc_setmulticast-into-smc_set_multicast_list.patch smc91x-simplify-register-bank-usage.patch smc91x-move-tx-processing-out-of-irq-context-entirely.patch smc91x-use-a-work-queue-to-reconfigure-the-phy-from.patch smc91x-fix-possible-leak-of-the-skb-waiting-for-mem.patch smc91x-display-pertinent-register-values-from-the.patch smc91x-straighten-smp-locking.patch smc91x-cosmetics.patch m32r-trivial-fix-of-smc91xh.patch smc91x-fix-smp-lock-usage.patch smc91x-more-smp-locking-fixes.patch smc91x-fix-compilation-with-dma-on-pxa2xx.patch smc91x-receives-two-bytes-too-many.patch smc91x-release-on-chip-rx-packet-memory-asap.patch I'll unload all those onto Jeff... From uucp@ganesha.gnumonks.org Wed Oct 13 02:52:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 02:53:03 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9D9qvck005582 for ; Wed, 13 Oct 2004 02:52:58 -0700 Received: from uucp by ganesha.gnumonks.org with local-bsmtp (Exim 4.30) id 1CHfoH-0005qa-O4 for netdev@oss.sgi.com; Wed, 13 Oct 2004 11:52:41 +0200 Received: from laforge by obroa-skai.gnumonks.org with local (Exim 3.36 #1) id 1CHeA5-00019P-00 for netdev@oss.sgi.com; Wed, 13 Oct 2004 10:07:05 +0200 Date: Wed, 13 Oct 2004 10:07:05 +0200 From: Harald Welte To: netdev@oss.sgi.com Subject: xfrm_user.c doesn't use NLMSG_F_MULTI Message-ID: <20041013080705.GB3387@obroa-skai.de.gnumonks.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="i0/AhcQY5QxfSsSZ" Content-Disposition: inline X-Operating-System: Linux obroa-skai.de.gnumonks.org 2.6.9-rc3-bk9gm1 X-Date: Today is Sweetmorn, the 67th day of Bureaucracy in the YOLD 3170 User-Agent: Mutt/1.5.6+20040722i X-archive-position: 10165 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@gnumonks.org Precedence: bulk X-list: netdev Content-Length: 1174 Lines: 41 --i0/AhcQY5QxfSsSZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! If I send a GETSA with NLM_F_DUMP message from userspace, I receive a batch of SA messages, but they apparently don't have the F_MULTI flag set.=20 Aren't they (all but the last msg) supposed to have the usual F_MULTI ? Is this by intention or a mistake? Cheers, Harald --=20 - Harald Welte http://www.gnumonks.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D Programming is like sex: One mistake and you have to support it your lifeti= me --i0/AhcQY5QxfSsSZ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBbOIpXaXGVTD0i/8RAts9AKCL5A0lvctx+lRkf6odyzpyGxdycQCfYDeO w3W1JDC8LXCVZNQo2uWvWCI= =z4Hi -----END PGP SIGNATURE----- --i0/AhcQY5QxfSsSZ-- From dannydaemonic@gmail.com Wed Oct 13 09:05:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 09:05:49 -0700 (PDT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.192]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9DG5ggA026822 for ; Wed, 13 Oct 2004 09:05:42 -0700 Received: by mproxy.gmail.com with SMTP id 76so429297rnl for ; Wed, 13 Oct 2004 09:05:28 -0700 (PDT) Received: by 10.38.74.32 with SMTP id w32mr2959169rna; Wed, 13 Oct 2004 09:05:28 -0700 (PDT) Received: by 10.38.150.66 with HTTP; Wed, 13 Oct 2004 09:05:28 -0700 (PDT) Message-ID: <9625752b04101309054eccbf@mail.gmail.com> Date: Wed, 13 Oct 2004 09:05:28 -0700 From: Danny Reply-To: Danny To: Francois Romieu , linux-kernel@vger.kernel.org Subject: Re: mm kernel oops with r8169 & named, PREEMPT Cc: netdev@oss.sgi.com In-Reply-To: <20041013072814.GA24066@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <9625752b041012230068619e68@mail.gmail.com> <20041013072814.GA24066@electric-eye.fr.zoreil.com> X-archive-position: 10166 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dannydaemonic@gmail.com Precedence: bulk X-list: netdev Content-Length: 1355 Lines: 30 On Wed, 13 Oct 2004 09:28:14 +0200, Francois Romieu wrote: > Try the patch below (courtesy of Jon Mason, whitespaces may be wrong) and > see 1) if things perform better 2) if "timeout" messages appear in the > kernel log. The patch doesn't fix or prevent the oops. Performance might have been better but I did no formal tests. There were no "timeout" messages in the kernel log, however I only ran it with this change for 35-45 minutes. I should mention that in the kernel log, with linux-2.6.8.1-mm4, it complains "process `named' is using obsolete setsockopt SO_BSDCOMPAT". However, with the most recent, 2.6.9-rc4-mm1, it doesn't get that far. A "Unable to handle kernel paging request at virtual address 00017f8c" happens instead. I'm guessing the oops is just killing named before it gets that far. I enabled some more debug options in the kernel and I'm getting a 2nd oops following the first. I wasn't sure if I should paste the huge oops here, and since the raw dmesg also shows spin lock errors, I thought I'd just post both on the web: http://members.cox.net/valenzdu/oops-raw http://members.cox.net/valenzdu/oops-processed I ran it through ksymoops but I don't have a /proc/ksyms and when I tried using /proc/kallsyms it gave me a format error. I hope this is helpful, let me know if there is anything else I can do. (CC me please.) From dannydaemonic@gmail.com Wed Oct 13 09:18:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 09:18:53 -0700 (PDT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.194]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9DGImw0027464 for ; Wed, 13 Oct 2004 09:18:48 -0700 Received: by mproxy.gmail.com with SMTP id 77so471562rnk for ; Wed, 13 Oct 2004 09:18:29 -0700 (PDT) Received: by 10.38.126.4 with SMTP id y4mr2968009rnc; Wed, 13 Oct 2004 09:18:29 -0700 (PDT) Received: by 10.38.150.66 with HTTP; Wed, 13 Oct 2004 09:18:29 -0700 (PDT) Message-ID: <9625752b04101309182a96fbd2@mail.gmail.com> Date: Wed, 13 Oct 2004 09:18:29 -0700 From: Danny Reply-To: Danny To: netdev@oss.sgi.com Subject: Re: mm kernel oops with r8169 & named, PREEMPT In-Reply-To: <9625752b041013091772e26739@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <9625752b041012230068619e68@mail.gmail.com> <20041013072814.GA24066@electric-eye.fr.zoreil.com> <9625752b04101309054eccbf@mail.gmail.com> <9625752b041013091772e26739@mail.gmail.com> X-archive-position: 10167 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dannydaemonic@gmail.com Precedence: bulk X-list: netdev Content-Length: 268 Lines: 4 I should mention that the oops (there was actually 3 of them not just 2) was without the patch suggested by Francois Romieu. I assumed that would be more useful as I still get the oops with it. Let me know if it would help and I'll repatch it and send another oops. From jdmason@us.ibm.com Wed Oct 13 09:29:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 09:29:45 -0700 (PDT) Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.131]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9DGTWti027995 for ; Wed, 13 Oct 2004 09:29:39 -0700 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e33.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id i9DGTD6A602738 for ; Wed, 13 Oct 2004 12:29:13 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i9DGTCfr385124 for ; Wed, 13 Oct 2004 10:29:12 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id i9DGTCFn014339 for ; Wed, 13 Oct 2004 10:29:12 -0600 Received: from dreadnought.austin.ibm.com (dreadnought.austin.ibm.com [9.41.94.123]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id i9DGTB4N014309; Wed, 13 Oct 2004 10:29:11 -0600 From: Jon Mason Organization: IBM To: Danny Subject: Re: mm kernel oops with r8169 & named, PREEMPT Date: Wed, 13 Oct 2004 11:29:05 -0500 User-Agent: KMail/1.6.2 Cc: netdev@oss.sgi.com References: <9625752b041012230068619e68@mail.gmail.com> <9625752b041013091772e26739@mail.gmail.com> <9625752b04101309182a96fbd2@mail.gmail.com> In-Reply-To: <9625752b04101309182a96fbd2@mail.gmail.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200410131129.05657.jdmason@us.ltcfwd.linux.ibm.com> X-archive-position: 10168 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jdmason@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 334 Lines: 8 Can you confirm that you are running r8169 driver with NAPI and TSO turned on, along with Preemptable Kernel? Also, I didn't see anything in the Oops specific to the r8169 driver, do you have another adapter available to run the same test on? Finally, what is your setup (arch, # of cpus, etc)? -- Jon Mason jdmason@us.ibm.com From romieu@fr.zoreil.com Wed Oct 13 11:21:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 11:22:04 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9DILmET003514 for ; Wed, 13 Oct 2004 11:21:49 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i9DIIfvr032243; Wed, 13 Oct 2004 20:18:41 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i9DIIeJ3032242; Wed, 13 Oct 2004 20:18:40 +0200 Date: Wed, 13 Oct 2004 20:18:40 +0200 From: Francois Romieu To: Jon Mason Cc: Danny , netdev@oss.sgi.com, jgarzik@pobox.com Subject: Re: mm kernel oops with r8169 & named, PREEMPT Message-ID: <20041013181840.GA30852@electric-eye.fr.zoreil.com> References: <9625752b041012230068619e68@mail.gmail.com> <9625752b041013091772e26739@mail.gmail.com> <9625752b04101309182a96fbd2@mail.gmail.com> <200410131129.05657.jdmason@us.ltcfwd.linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410131129.05657.jdmason@us.ltcfwd.linux.ibm.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 10169 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 Content-Length: 670 Lines: 16 Jon Mason : > Can you confirm that you are running r8169 driver with NAPI and TSO turned on, > along with Preemptable Kernel? Also, I didn't see anything in the Oops > specific to the r8169 driver, do you have another adapter available to run > the same test on? Finally, what is your setup (arch, # of cpus, etc)? Yep, it does not look closely related to the network driver (there are both eth1 and unknown eth0 btw). Danny, can your drop the r8169 driver from 2.6.9-rc4-mm1 into vanilla 2.6.9-rc4 and confirm that it works (preempt should not matter) ? If it does not, disable ACPI, preempt, profiling and publish the new oops. -- Ueimor From greearb@candelatech.com Wed Oct 13 11:34:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 11:34:35 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9DIYRSJ005045 for ; Wed, 13 Oct 2004 11:34:28 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i9DIe2LH004890 for ; Wed, 13 Oct 2004 11:40:02 -0700 Message-ID: <416D7526.8050206@candelatech.com> Date: Wed, 13 Oct 2004 11:34:14 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "'netdev@oss.sgi.com'" Subject: return values for hard_start_xmit and dev_queue_xmit Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10170 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Content-Length: 770 Lines: 21 While trying to get pktgen to effectively use VLANs to send traffic, I noticed that the vlan code always returns 0 from it's hard_start_xmit method. Since it calls dev_queue_xmit inside that method, I tried returning the value that dev_queue_xmit returns. It seems that the return values have different meanings because this causes crashes due to freeing skbs when I shouldn't be... The dev_queue_xmit method is fairly well documented in dev.c, but there are zero comments in the netdevice.h file to explain what the acceptable return values for hard_start_xmit are. Does anyone know if there is a definative guide to the return values for hard_start_xmit? Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From greearb@candelatech.com Wed Oct 13 11:53:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 11:53:57 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9DIrpE5009404 for ; Wed, 13 Oct 2004 11:53:51 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i9DIxPLH005128 for ; Wed, 13 Oct 2004 11:59:25 -0700 Message-ID: <416D79B1.1090707@candelatech.com> Date: Wed, 13 Oct 2004 11:53:37 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "'netdev@oss.sgi.com'" Subject: Re: return values for hard_start_xmit and dev_queue_xmit References: <416D7526.8050206@candelatech.com> In-Reply-To: <416D7526.8050206@candelatech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10171 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Content-Length: 566 Lines: 19 Ben Greear wrote: > The dev_queue_xmit method is fairly well documented in dev.c, but > there are zero comments in the netdevice.h file to explain what the > acceptable return values for hard_start_xmit are. Actually, looks like I'm wrong here. The comments in dev.c say that error codes are < 0, but in fact, this can easily return NET_XMIT_DROP which is a positive value (1). Maybe the truth is that any non-zero return value from dev_queue_xmit is an error? Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From dannydaemonic@gmail.com Wed Oct 13 13:29:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 13:29:19 -0700 (PDT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.196]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9DKTDkx017909 for ; Wed, 13 Oct 2004 13:29:13 -0700 Received: by mproxy.gmail.com with SMTP id 77so18205rnk for ; Wed, 13 Oct 2004 13:28:56 -0700 (PDT) Received: by 10.38.73.61 with SMTP id v61mr3054013rna; Wed, 13 Oct 2004 13:28:56 -0700 (PDT) Received: by 10.38.150.66 with HTTP; Wed, 13 Oct 2004 13:28:55 -0700 (PDT) Message-ID: <9625752b04101313283f035423@mail.gmail.com> Date: Wed, 13 Oct 2004 13:28:55 -0700 From: Danny Reply-To: Danny To: linux-kernel@vger.kernel.org Subject: Re: mm kernel oops with r8169 & named, PREEMPT Cc: netdev@oss.sgi.com In-Reply-To: <200410131129.05657.jdmason@us.ltcfwd.linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <9625752b041012230068619e68@mail.gmail.com> <9625752b041013091772e26739@mail.gmail.com> <9625752b04101309182a96fbd2@mail.gmail.com> <200410131129.05657.jdmason@us.ltcfwd.linux.ibm.com> X-archive-position: 10172 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dannydaemonic@gmail.com Precedence: bulk X-list: netdev Content-Length: 1366 Lines: 28 On Wed, 13 Oct 2004 11:29:05 -0500, Jon Mason wrote: > Can you confirm that you are running r8169 driver with NAPI and TSO turned on, > along with Preemptable Kernel? Also, I didn't see anything in the Oops > specific to the r8169 driver, do you have another adapter available to run > the same test on? Finally, what is your setup (arch, # of cpus, etc)? I am using the r8169 driver with NAPI and preemptable kernel. I don't remember or see any option for offloading but it sounds like something I'd turn on. Let me know what I should look for in my config, or check here: http://members.cox.net/valenzdu/.config I no longer have a 2nd nic adapter, but I did first notice the problem when I installed this one. However, if I don't load that module I'm not able to duplicate the problem by running named on the other interface. Running named triggers it 100% of the time on the r8169 based nic. The arch is x86 (athlon) with just 1 cpu. Since I'm not sure what's wrong here I'm not sure what's relevant. Here is more info about my setup: http://members.cox.net/valenzdu/proc-cpuinfo http://members.cox.net/valenzdu/proc-iomem http://members.cox.net/valenzdu/proc-ioports http://members.cox.net/valenzdu/proc-modules http://members.cox.net/valenzdu/proc-version http://members.cox.net/valenzdu/stdout-lspci http://members.cox.net/valenzdu/stdout-ver_linux From dannydaemonic@gmail.com Wed Oct 13 13:44:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 13:44:23 -0700 (PDT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.192]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9DKiGp5018457 for ; Wed, 13 Oct 2004 13:44:17 -0700 Received: by mproxy.gmail.com with SMTP id 77so20206rnk for ; Wed, 13 Oct 2004 13:44:02 -0700 (PDT) Received: by 10.38.163.78 with SMTP id l78mr3081992rne; Wed, 13 Oct 2004 13:44:02 -0700 (PDT) Received: by 10.38.150.66 with HTTP; Wed, 13 Oct 2004 13:44:02 -0700 (PDT) Message-ID: <9625752b04101313445a67923@mail.gmail.com> Date: Wed, 13 Oct 2004 13:44:02 -0700 From: Danny Reply-To: Danny To: linux-kernel@vger.kernel.org Subject: Re: mm kernel oops with r8169 & named, PREEMPT Cc: netdev@oss.sgi.com In-Reply-To: <20041013181840.GA30852@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <9625752b041012230068619e68@mail.gmail.com> <9625752b041013091772e26739@mail.gmail.com> <9625752b04101309182a96fbd2@mail.gmail.com> <200410131129.05657.jdmason@us.ltcfwd.linux.ibm.com> <20041013181840.GA30852@electric-eye.fr.zoreil.com> X-archive-position: 10173 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dannydaemonic@gmail.com Precedence: bulk X-list: netdev Content-Length: 721 Lines: 14 On Wed, 13 Oct 2004 20:18:40 +0200, Francois Romieu wrote: > Danny, can your drop the r8169 driver from 2.6.9-rc4-mm1 into vanilla > 2.6.9-rc4 and confirm that it works (preempt should not matter) ? I see how the timing on the installation of the r8169 could have just been bad. Since preempt shouldn't matter, I'm going to test that and acpi etc first (because it's easier to test heh). See, well, I'm going to need reiser4 for the vanilla. I found patches here: ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.9-rc4/2.6.9-rc4-mm1/broken-out/ But can someone point out which patches I will need? Do I only need reiser4-only.patch or is it safer for my fs if I have all the other reiser4 patches? From jgarzik@pobox.com Wed Oct 13 13:57:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 13:58:00 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9DKvt5I018956 for ; Wed, 13 Oct 2004 13:57:56 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CHqBo-0002qj-Vb; Wed, 13 Oct 2004 21:57:41 +0100 Message-ID: <416D96B8.5090204@pobox.com> Date: Wed, 13 Oct 2004 16:57:28 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jesse Barnes CC: netdev@oss.sgi.com, "David S. Miller" Subject: Re: [PATCH] work around 5701 misalignment References: <200410131554.19845.jbarnes@sgi.com> In-Reply-To: <200410131554.19845.jbarnes@sgi.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10174 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: 671 Lines: 23 Jesse Barnes wrote: > --- a/linux/drivers/net/tg3.c 2004-10-13 15:25:03.000000000 -0500 > +++ b/linux/drivers/net/tg3.c 2004-10-13 15:14:45.000000000 -0500 > @@ -2352,7 +2352,12 @@ > > len = ((desc->idx_len & RXD_LEN_MASK) >> RXD_LEN_SHIFT) - 4; /* omit crc */ > > - if (len > RX_COPY_THRESHOLD) { > + if (len > RX_COPY_THRESHOLD > +#if defined(CONFIG_UNALIGNED_EXPENSIVE) > + && tp->rx_offset == 2 > +#endif hmmm, the normal solution is to give RX_COPY_THRESHOLD a per-arch value. Grep for 'rx_copybreak' in bunches of net drivers. DaveM might squirm a bit but IMHO RX_COPY_THRESHOLD really is platform-dependent. Jeff From jbarnes@sgi.com Wed Oct 13 13:58:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 13:58:14 -0700 (PDT) Received: from omx2.sgi.com (omx2-ext.sgi.com [192.48.171.19]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9DKw8XR019013 for ; Wed, 13 Oct 2004 13:58:09 -0700 Received: from nodin.corp.sgi.com (nodin.corp.sgi.com [192.26.51.193]) by omx2.sgi.com (8.12.11/8.12.9/linux-outbound_gateway-1.1) with ESMTP id i9DMALwu005442 for ; Wed, 13 Oct 2004 15:10:22 -0700 Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by nodin.corp.sgi.com (8.12.9/8.12.10/SGI_generic_relay-1.2) with ESMTP id i9DKtdl238108541 for ; Wed, 13 Oct 2004 13:55:39 -0700 (PDT) Received: from localhost.localdomain (jbarnes@spamtin.engr.sgi.com [163.154.6.130]) by cthulhu.engr.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id i9DKscLG3577125; Wed, 13 Oct 2004 13:54:39 -0700 (PDT) From: Jesse Barnes To: jgarzik@pobox.com, netdev@oss.sgi.com Subject: [PATCH] work around 5701 misalignment Date: Wed, 13 Oct 2004 15:54:19 -0500 User-Agent: KMail/1.7 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_7XZbBpmB1NXJpF6" Message-Id: <200410131554.19845.jbarnes@sgi.com> X-archive-position: 10175 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jbarnes@sgi.com Precedence: bulk X-list: netdev Content-Length: 2096 Lines: 71 --Boundary-00=_7XZbBpmB1NXJpF6 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline This patch helps deal with 5701s running in PCI-X mode on platforms (like ia64) where unaligned accesses are very expensive. It was made a config option at davem's request, afaik, and only affects 5701s when enabled. Patch originally by John Partridge. Signed-off-by: Jesse Barnes Signed-off-by: John Partridge Thanks, Jesse --Boundary-00=_7XZbBpmB1NXJpF6 Content-Type: text/x-diff; charset="us-ascii"; name="tg3-unaligned-expensive.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="tg3-unaligned-expensive.patch" =========================================================================== linux/drivers/net/Kconfig =========================================================================== --- a/linux/drivers/net/Kconfig 2004-10-13 15:25:03.000000000 -0500 +++ b/linux/drivers/net/Kconfig 2004-10-13 15:22:39.000000000 -0500 @@ -2062,6 +2062,15 @@ endmenu +config UNALIGNED_EXPENSIVE + depends on TIGON3 + bool "Do aligned kernel buffers for PCI-X 5701 Cards" + help + This aligns kernel buffers for PCI-X 5701 + other cards do not have this problem. + This will help performance on 5701 cards + and not adversly affect any other cards. + # # 10 Gigabit Ethernet # =========================================================================== linux/drivers/net/tg3.c =========================================================================== --- a/linux/drivers/net/tg3.c 2004-10-13 15:25:03.000000000 -0500 +++ b/linux/drivers/net/tg3.c 2004-10-13 15:14:45.000000000 -0500 @@ -2352,7 +2352,12 @@ len = ((desc->idx_len & RXD_LEN_MASK) >> RXD_LEN_SHIFT) - 4; /* omit crc */ - if (len > RX_COPY_THRESHOLD) { + if (len > RX_COPY_THRESHOLD +#if defined(CONFIG_UNALIGNED_EXPENSIVE) + && tp->rx_offset == 2 +#endif +) +{ int skb_size; skb_size = tg3_alloc_rx_skb(tp, opaque_key, --Boundary-00=_7XZbBpmB1NXJpF6-- From dannydaemonic@gmail.com Wed Oct 13 14:59:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 14:59:30 -0700 (PDT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.196]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9DLxPt4021174 for ; Wed, 13 Oct 2004 14:59:26 -0700 Received: by mproxy.gmail.com with SMTP id 77so29200rnk for ; Wed, 13 Oct 2004 14:59:06 -0700 (PDT) Received: by 10.38.209.30 with SMTP id h30mr1020515rng; Wed, 13 Oct 2004 14:59:06 -0700 (PDT) Received: by 10.38.150.66 with HTTP; Wed, 13 Oct 2004 14:59:06 -0700 (PDT) Message-ID: <9625752b04101314595f72f84a@mail.gmail.com> Date: Wed, 13 Oct 2004 14:59:06 -0700 From: Danny Reply-To: Danny To: linux-kernel@vger.kernel.org Subject: Re: mm kernel oops with r8169 & named, PREEMPT Cc: netdev@oss.sgi.com, Francois Romieu In-Reply-To: <20041013205433.GC30761@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <9625752b041012230068619e68@mail.gmail.com> <9625752b041013091772e26739@mail.gmail.com> <9625752b04101309182a96fbd2@mail.gmail.com> <200410131129.05657.jdmason@us.ltcfwd.linux.ibm.com> <20041013181840.GA30852@electric-eye.fr.zoreil.com> <9625752b04101313417be4cf90@mail.gmail.com> <20041013205433.GC30761@electric-eye.fr.zoreil.com> X-archive-position: 10176 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dannydaemonic@gmail.com Precedence: bulk X-list: netdev Content-Length: 541 Lines: 16 On Wed, 13 Oct 2004 22:54:33 +0200, Francois Romieu wrote: > [snip] > Possible :o) > > OTOH, I do not want to miss an error report. Well the options I tried disabling (ACPI, PREEMPT) didn't stop the oops. > [snip] > I am not a reiserfs addict but you can imho go for the complete serie > of reiserfs patches once you have sucked the first one (3Mo, yuck). > > If you have issues with the ordering of the patches, just grep the > patches in the 'series' file. Ok thanks, I have work to do right now so I'll have to try this out tonight. From hannal@us.ibm.com Wed Oct 13 15:37:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 15:37:17 -0700 (PDT) Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.132]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9DMb9pa022167 for ; Wed, 13 Oct 2004 15:37:10 -0700 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e34.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id i9DMaosB470286 for ; Wed, 13 Oct 2004 18:36:50 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i9DMaofr389478 for ; Wed, 13 Oct 2004 16:36:50 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id i9DMaoa1005008 for ; Wed, 13 Oct 2004 16:36:50 -0600 Received: from gateway.beaverton.ibm.com (gateway.beaverton.ibm.com [9.47.56.32]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id i9DManaI004997 for ; Wed, 13 Oct 2004 16:36:49 -0600 Received: from w-hlinder.beaverton.ibm.com (w-hlinder.beaverton.ibm.com [9.47.17.19]) by gateway.beaverton.ibm.com (8.11.6/8.11.6) with ESMTP id i9DLTdc04068 for ; Wed, 13 Oct 2004 14:29:39 -0700 Date: Wed, 13 Oct 2004 15:37:19 -0700 From: Hanna Linder To: netdev@oss.sgi.com Subject: [PATCH 2.6] firestream.c replace pci_find_device with pci_get_device (fwd) Message-ID: <200410000.1097707039@w-hlinder.beaverton.ibm.com> X-Mailer: Mulberry/2.2.1 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline X-archive-position: 10178 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hannal@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 1622 Lines: 47 ---------- Forwarded Message ---------- Date: Wednesday, October 13, 2004 03:17:23 PM -0700 From: Hanna Linder To: lkml , kernel-janitors Cc: Hanna Linder , greg@kroah.com, chas@cmf.nrl.navy.mil Subject: [PATCH 2.6] firestream.c replace pci_find_device with pci_get_device As pci_find_device is going away soon I have converted this file to use pci_get_device instead. I have compile tested it. If anyone has this ATM card and could test it that would be great. Hanna Linder IBM Linux Technology Center Signed-off-by: Hanna Linder --- diff -Nrup linux-2.6.9-rc4-mm1cln/drivers/atm/firestream.c linux-2.6.9-rc4-mm1patch2/drivers/atm/firestream.c --- linux-2.6.9-rc4-mm1cln/drivers/atm/firestream.c 2004-10-12 14:15:10.000000000 -0700 +++ linux-2.6.9-rc4-mm1patch2/drivers/atm/firestream.c 2004-10-13 13:51:35.570994152 -0700 @@ -2021,7 +2021,7 @@ int __init fs_detect(void) func_enter (); pci_dev = NULL; - while ((pci_dev = pci_find_device(PCI_VENDOR_ID_FUJITSU_ME, + while ((pci_dev = pci_get_device(PCI_VENDOR_ID_FUJITSU_ME, PCI_DEVICE_ID_FUJITSU_FS50, pci_dev))) { if (fs_register_and_init (pci_dev, &fs_pci_tbl[0])) @@ -2029,7 +2029,7 @@ int __init fs_detect(void) devs++; } - while ((pci_dev = pci_find_device(PCI_VENDOR_ID_FUJITSU_ME, + while ((pci_dev = pci_get_device(PCI_VENDOR_ID_FUJITSU_ME, PCI_DEVICE_ID_FUJITSU_FS155, pci_dev))) { if (fs_register_and_init (pci_dev, FS_IS155)) ---------- End Forwarded Message ---------- From hannal@us.ibm.com Wed Oct 13 15:37:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 15:37:09 -0700 (PDT) Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.130]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9DMashn022160 for ; Wed, 13 Oct 2004 15:37:01 -0700 Received: from westrelay04.boulder.ibm.com (westrelay04.boulder.ibm.com [9.17.193.32]) by e32.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id i9DMaZqY599986 for ; Wed, 13 Oct 2004 18:36:35 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i9DMaYN6131676 for ; Wed, 13 Oct 2004 16:36:34 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id i9DMaYUX004745 for ; Wed, 13 Oct 2004 16:36:34 -0600 Received: from gateway.beaverton.ibm.com (gateway.beaverton.ibm.com [9.47.56.32]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id i9DMaXTX004715 for ; Wed, 13 Oct 2004 16:36:34 -0600 Received: from w-hlinder.beaverton.ibm.com (w-hlinder.beaverton.ibm.com [9.47.17.19]) by gateway.beaverton.ibm.com (8.11.6/8.11.6) with ESMTP id i9DLTNc04061 for ; Wed, 13 Oct 2004 14:29:23 -0700 Date: Wed, 13 Oct 2004 15:37:03 -0700 From: Hanna Linder To: netdev@oss.sgi.com Subject: [PATCH 2.6] ambassador.c replace pci_find_device with pci_get_device (fwd) Message-ID: <200150000.1097707023@w-hlinder.beaverton.ibm.com> X-Mailer: Mulberry/2.2.1 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline X-archive-position: 10177 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hannal@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 1587 Lines: 48 ---------- Forwarded Message ---------- Date: Wednesday, October 13, 2004 03:15:59 PM -0700 From: Hanna Linder To: lkml , kernel-janitors Cc: greg@kroah.com, hannal@us.ibm.com, chas@cmf.nrl.navy.mil Subject: [PATCH 2.6] ambassador.c replace pci_find_device with pci_get_device As pci_find_device is going away soon I have converted this file to use pci_get_device instead. I have compile tested it. If anyone has this ATM card and could test it that would be great. Hanna Linder IBM Linux Technology Center Signed-off-by: Hanna Linder --- diff -Nrup linux-2.6.9-rc4-mm1cln/drivers/atm/ambassador.c linux-2.6.9-rc4-mm1patch/drivers/atm/ambassador.c --- linux-2.6.9-rc4-mm1cln/drivers/atm/ambassador.c 2004-10-12 14:15:10.000000000 -0700 +++ linux-2.6.9-rc4-mm1patch/drivers/atm/ambassador.c 2004-10-13 13:50:30.070951672 -0700 @@ -2378,7 +2378,7 @@ static int __init amb_probe (void) { devs = 0; pci_dev = NULL; - while ((pci_dev = pci_find_device + while ((pci_dev = pci_get_device (PCI_VENDOR_ID_MADGE, PCI_DEVICE_ID_MADGE_AMBASSADOR, pci_dev) )) { if (do_pci_device(pci_dev) == 0) @@ -2387,7 +2387,7 @@ static int __init amb_probe (void) { pci_dev = NULL; - while ((pci_dev = pci_find_device + while ((pci_dev = pci_get_device (PCI_VENDOR_ID_MADGE, PCI_DEVICE_ID_MADGE_AMBASSADOR_BAD, pci_dev) )) PRINTK (KERN_ERR, "skipped broken (PLX rev 2) card"); ---------- End Forwarded Message ---------- From hannal@us.ibm.com Wed Oct 13 15:37:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 15:37:26 -0700 (PDT) Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.131]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9DMbJml022194 for ; Wed, 13 Oct 2004 15:37:20 -0700 Received: from westrelay04.boulder.ibm.com (westrelay04.boulder.ibm.com [9.17.193.32]) by e33.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id i9DMb06A290686 for ; Wed, 13 Oct 2004 18:37:00 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i9DMaxN6139364 for ; Wed, 13 Oct 2004 16:36:59 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id i9DMaxOH005245 for ; Wed, 13 Oct 2004 16:36:59 -0600 Received: from gateway.beaverton.ibm.com (gateway.beaverton.ibm.com [9.47.56.32]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id i9DMawuu005235 for ; Wed, 13 Oct 2004 16:36:59 -0600 Received: from w-hlinder.beaverton.ibm.com (w-hlinder.beaverton.ibm.com [9.47.17.19]) by gateway.beaverton.ibm.com (8.11.6/8.11.6) with ESMTP id i9DLTmc04072 for ; Wed, 13 Oct 2004 14:29:48 -0700 Date: Wed, 13 Oct 2004 15:37:28 -0700 From: Hanna Linder To: netdev@oss.sgi.com Subject: [PATCH 2.6] fore200e.c replace pci_find_device with pci_get_device (fwd) Message-ID: <200680000.1097707048@w-hlinder.beaverton.ibm.com> X-Mailer: Mulberry/2.2.1 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline X-archive-position: 10179 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hannal@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 1344 Lines: 39 ---------- Forwarded Message ---------- Date: Wednesday, October 13, 2004 03:18:30 PM -0700 From: Hanna Linder To: lkml , kernel-janitors Cc: Hanna Linder , greg@kroah.com, chas@cmf.nrl.navy.mil Subject: [PATCH 2.6] fore200e.c replace pci_find_device with pci_get_device As pci_find_device is going away soon I have converted this file to use pci_get_device instead. I have compile tested it. If anyone has this ATM card and could test it that would be great. Hanna Linder IBM Linux Technology Center Signed-off-by: Hanna Linder --- diff -Nrup linux-2.6.9-rc4-mm1cln/drivers/atm/fore200e.c linux-2.6.9-rc4-mm1patch3/drivers/atm/fore200e.c --- linux-2.6.9-rc4-mm1cln/drivers/atm/fore200e.c 2004-10-12 14:15:10.000000000 -0700 +++ linux-2.6.9-rc4-mm1patch3/drivers/atm/fore200e.c 2004-10-13 13:57:12.000000000 -0700 @@ -644,7 +644,7 @@ fore200e_pca_detect(const struct fore200 int count = index; do { - pci_dev = pci_find_device(PCI_VENDOR_ID_FORE, PCI_DEVICE_ID_FORE_PCA200E, pci_dev); + pci_dev = pci_get_device(PCI_VENDOR_ID_FORE, PCI_DEVICE_ID_FORE_PCA200E, pci_dev); if (pci_dev == NULL) return NULL; } while (count--); ---------- End Forwarded Message ---------- From hannal@us.ibm.com Wed Oct 13 15:37:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 15:37:38 -0700 (PDT) Received: from e3.ny.us.ibm.com (e3.ny.us.ibm.com [32.97.182.103]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9DMbUYJ022276 for ; Wed, 13 Oct 2004 15:37:30 -0700 Received: from northrelay04.pok.ibm.com (northrelay04.pok.ibm.com [9.56.224.206]) by e3.ny.us.ibm.com (8.12.10/8.12.9) with ESMTP id i9DMbAZI160232 for ; Wed, 13 Oct 2004 18:37:11 -0400 Received: from gateway.beaverton.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by northrelay04.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i9DMcPxd100442 for ; Wed, 13 Oct 2004 18:38:25 -0400 Received: from w-hlinder.beaverton.ibm.com (w-hlinder.beaverton.ibm.com [9.47.17.19]) by gateway.beaverton.ibm.com (8.11.6/8.11.6) with ESMTP id i9DLTxc04076 for ; Wed, 13 Oct 2004 14:29:59 -0700 Date: Wed, 13 Oct 2004 15:37:39 -0700 From: Hanna Linder To: netdev@oss.sgi.com Subject: [PATCH 2.6] horizon.c: replace pci_find_device with pci_get_device (fwd) Message-ID: <200910000.1097707059@w-hlinder.beaverton.ibm.com> X-Mailer: Mulberry/2.2.1 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline X-archive-position: 10180 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hannal@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 1249 Lines: 40 ---------- Forwarded Message ---------- Date: Wednesday, October 13, 2004 03:19:30 PM -0700 From: Hanna Linder To: lkml , kernel-janitors Cc: Hanna Linder , greg@kroah.com, chas@cmf.nrl.navy.mil Subject: [PATCH 2.6] horizon.c: replace pci_find_device with pci_get_device As pci_find_device is going away soon I have converted this file to use pci_get_device instead. I have compile tested it. If anyone has this ATM card and could test it that would be great. Hanna Linder IBM Linux Technology Center Signed-off-by: Hanna Linder --- diff -Nrup linux-2.6.9-rc4-mm1cln/drivers/atm/horizon.c linux-2.6.9-rc4-mm1patch/drivers/atm/horizon.c --- linux-2.6.9-rc4-mm1cln/drivers/atm/horizon.c 2004-10-12 14:15:10.000000000 -0700 +++ linux-2.6.9-rc4-mm1patch/drivers/atm/horizon.c 2004-10-13 14:52:43.218426992 -0700 @@ -2727,7 +2727,7 @@ static int __init hrz_probe (void) { devs = 0; pci_dev = NULL; - while ((pci_dev = pci_find_device + while ((pci_dev = pci_get_device (PCI_VENDOR_ID_MADGE, PCI_DEVICE_ID_MADGE_HORIZON, pci_dev) )) { hrz_dev * dev; ---------- End Forwarded Message ---------- From hannal@us.ibm.com Wed Oct 13 15:37:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 15:37:48 -0700 (PDT) Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.131]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9DMbfsb022475 for ; Wed, 13 Oct 2004 15:37:41 -0700 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e33.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id i9DMbL6A583222 for ; Wed, 13 Oct 2004 18:37:22 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i9DMbLfr400532 for ; Wed, 13 Oct 2004 16:37:21 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id i9DMbKh7006186 for ; Wed, 13 Oct 2004 16:37:21 -0600 Received: from gateway.beaverton.ibm.com (gateway.beaverton.ibm.com [9.47.56.32]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id i9DMbKxF006174 for ; Wed, 13 Oct 2004 16:37:20 -0600 Received: from w-hlinder.beaverton.ibm.com (w-hlinder.beaverton.ibm.com [9.47.17.19]) by gateway.beaverton.ibm.com (8.11.6/8.11.6) with ESMTP id i9DLU9c04084 for ; Wed, 13 Oct 2004 14:30:09 -0700 Date: Wed, 13 Oct 2004 15:37:50 -0700 From: Hanna Linder To: netdev@oss.sgi.com Subject: [PATCH 2.6] zatm.c: replace pci_find_device with pci_get_device (fwd) Message-ID: <201160000.1097707070@w-hlinder.beaverton.ibm.com> X-Mailer: Mulberry/2.2.1 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline X-archive-position: 10181 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hannal@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 1344 Lines: 39 ---------- Forwarded Message ---------- Date: Wednesday, October 13, 2004 03:20:24 PM -0700 From: Hanna Linder To: lkml , kernel-janitors Cc: Hanna Linder , greg@kroah.com, chas@cmf.nrl.navy.mil Subject: [PATCH 2.6] zatm.c: replace pci_find_device with pci_get_device As pci_find_device is going away soon I have converted this file to use pci_get_device instead. I have compile tested it. If anyone has this ATM card and could test it that would be great. Hanna Linder IBM Linux Technology Center Signed-off-by: Hanna Linder --- diff -Nrup linux-2.6.9-rc4-mm1cln/drivers/atm/zatm.c linux-2.6.9-rc4-mm1patch2/drivers/atm/zatm.c --- linux-2.6.9-rc4-mm1cln/drivers/atm/zatm.c 2004-10-12 14:15:10.000000000 -0700 +++ linux-2.6.9-rc4-mm1patch2/drivers/atm/zatm.c 2004-10-13 14:53:39.875813760 -0700 @@ -1591,7 +1591,7 @@ static int __init zatm_module_init(void) struct pci_dev *pci_dev; pci_dev = NULL; - while ((pci_dev = pci_find_device(PCI_VENDOR_ID_ZEITNET,type ? + while ((pci_dev = pci_get_device(PCI_VENDOR_ID_ZEITNET,type ? PCI_DEVICE_ID_ZEITNET_1225 : PCI_DEVICE_ID_ZEITNET_1221, pci_dev))) { if (pci_enable_device(pci_dev)) break; ---------- End Forwarded Message ---------- From safari-b-netdev=oss.sgi.com-1097709007-7isjf6hbrtwg3jxx@b.safari.iki.fi Wed Oct 13 16:10:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 16:10:30 -0700 (PDT) Received: from fep19.inet.fi (fep19.inet.fi [194.251.242.244]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9DNAMsn024384 for ; Wed, 13 Oct 2004 16:10:24 -0700 Received: from safari.iki.fi ([80.223.105.208]) by fep19.inet.fi with ESMTP id <20041013231007.TLJC10556.fep19.inet.fi@safari.iki.fi> for ; Thu, 14 Oct 2004 02:10:07 +0300 Received: (qmail 15793 invoked by uid 500); 13 Oct 2004 23:10:07 -0000 Date: Thu, 14 Oct 2004 02:10:07 +0300 From: Sami Farin <7atbggg02@sneakemail.com> To: linux-kernel Mailing List , Linux Networking Mailing List Subject: 2.6.9-rc4 tcp_transmit_skb: BUG_ON(!tcp_skb_pcount(skb)) Message-ID: <20041013231006.GA14742@m.safari.iki.fi> Mail-Followup-To: linux-kernel Mailing List , Linux Networking Mailing List Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i X-archive-position: 10182 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: 7atbggg02@sneakemail.com Precedence: bulk X-list: netdev Content-Length: 3168 Lines: 79 First I'd like to know is it safe to call get_random_bytes from net/ipv4/tcp_ipv4.c:tcp_v4_get_port() when I am using that fortuna [1] patch, which uses CryptoAPI... fortuna is calling the crypto funcs from softirq AFAICS. I tried 2.6.9-rc2-bk7 without fortuna and it did not seem to crash but there has also been some changes into network code... I ran command nmap -vvv -O -p1-65535 -T Insane -sT 127.0.0.1 and there are four services listening on that port range. nmap -sS does not seem to cause BUG. pencil-and-paper-in-180-seconds follows tcp_output.c:277 Invalid operand 0 tcp_transmit_skb tcp_send_synack tcp_rcv_synsent_state_process tcp_rcv_state_process tcp_v4_do_rcv __release_sock inet_stream_connect sys_connect ohh, and I also have linux-2.6.7-voluntary-preemption.patch from Redhat Fedora's kernel-2.6.8-1.603. writing to disk causes max 25ms latency, however 8-| [1] http://jlcooke.ca/random/ [2] http://safari.iki.fi/config-2.6.9-rc4-20041014-1.txt NOTE: scripts/ver_linux is buggy, it uses gcc found on PATH instead of CC from Makefile. I used gcc-2.95.3 to compile the kernel. Linux safari.finland.fbi 2.6.9-rc4 #13 Wed Oct 13 23:27:26 EEST 2004 i686 i686 i386 GNU/Linux Gnu C 3.4.2 Gnu make 3.80 binutils 2.15.92.0.2 util-linux 2.12 mount 2.12 module-init-tools 3.1-pre5 e2fsprogs 1.35 jfsutils 1.0.24 reiserfsprogs 3.6.18 reiser4progs line xfsprogs 2.3.9 pcmcia-cs 3.2.7 quota-tools 3.12. PPP 2.4.2 nfs-utils 1.0.6 Linux C Library 2.3.3 Dynamic linker (ldd) 2.3.3 Procps 3.2.3 Net-tools 1.60 Kbd 1.12 Sh-utils 5.2.1 Modules Loaded ip6t_LOG ip6table_filter sch_hfsc cls_fw cls_route sch_ingress sch_red sch_tbf sch_teql sch_prio sch_gred cls_rsvp cls_rsvp6 cls_tcindex sch_cbq sch_dsmark ipt_ttl ipt_tos ipt_tcpmss ipt_sctp ipt_recent ipt_pkttype ipt_physdev ipt_nth ipt_mark ipt_mac ipt_iprange ipt_helper ipt_esp ipt_ecn ipt_dscp ipt_conntrack ipt_ah ipt_addrtype ipt_ULOG ipt_TTL ipt_TOS ipt_TCPMSS ipt_SAME ipt_REDIRECT ipt_NOTRACK ipt_NETMAP ipt_MASQUERADE ipt_MARK ipt_IPMARK ipt_DSCP ipt_CLASSIFY ip_queue ip_nat_tftp ip_nat_snmp_basic ip_nat_irc ip_nat_ftp ip_nat_amanda ip_conntrack_tftp ip_conntrack_proto_sctp ip_conntrack_irc ip_conntrack_ftp ip_conntrack_amanda arptable_filter arpt_mangle arp_tables xfs ipv6 snd_seq_midi snd_seq_oss snd_seq_midi_event snd_seq lp parport_pc parport w83781d i2c_sensor i2c_piix4 tuner tvaudio msp3400 bttv video_buf i2c_algo_bit v4l2_common btcx_risc i2c_core videodev ohci_hcd loop ipt_length ipt_connlimit dm_mod ipt_TARPIT ipt_ECN ipt_state ipt_multiport ipt_owner cls_u32 sch_sfq sch_htb uhci_hcd ipt_REJECT ipt_LOG ipt_limit iptable_raw iptable_mangle iptable_nat snd_ens1371 snd_rawmidi ip_conntrack ip6_tables snd_seq_device snd_pcm_oss iptable_filter ip_tables snd_mixer_oss snd_pcm snd_timer snd_page_alloc snd_ac97_codec snd soundcore gameport irlan irda crc_ccitt 8139too mii floppy -- From carlo.altarelli@virgilio.it Wed Oct 13 16:29:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 16:29:48 -0700 (PDT) Received: from vsmtp1.tin.it (vsmtp1.tin.it [212.216.176.141]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9DNTfEW028200 for ; Wed, 13 Oct 2004 16:29:42 -0700 Received: from ims6b.cp.tin.it (192.168.70.108) by vsmtp1.tin.it (7.0.027) id 416CFB4F00050EEC for netdev@oss.sgi.com; Thu, 14 Oct 2004 01:29:23 +0200 Received: from [192.168.70.229] by ims6b.cp.tin.it with HTTP; Thu, 14 Oct 2004 01:29:21 +0200 Date: Thu, 14 Oct 2004 01:29:21 +0200 Message-ID: <41538C5B0002BF06@ims6b.cp.tin.it> From: carlo.altarelli@virgilio.it Subject: Unknown qdisc "netem" To: netdev@oss.sgi.com MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i9DNTfEW028200 X-archive-position: 10183 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: carlo.altarelli@virgilio.it Precedence: bulk X-list: netdev Content-Length: 1004 Lines: 43 i'm tring to use netem under a 2.6.8.1 kernel, the error report is : "Unknown qdisc netem", I've just rebuild the kernel with these options about QoS: # QoS and/or fair queueing # CONFIG_NET_SCHED=y CONFIG_NET_SCH_CLK_JIFFIES=y # CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set # CONFIG_NET_SCH_CLK_CPU is not set CONFIG_NET_SCH_CBQ=y CONFIG_NET_SCH_HTB=y CONFIG_NET_SCH_HFSC=y CONFIG_NET_SCH_PRIO=y CONFIG_NET_SCH_RED=y CONFIG_NET_SCH_SFQ=y CONFIG_NET_SCH_TEQL=y CONFIG_NET_SCH_TBF=y CONFIG_NET_SCH_GRED=y CONFIG_NET_SCH_DSMARK=y CONFIG_NET_SCH_NETEM=y CONFIG_NET_SCH_INGRESS=y CONFIG_NET_QOS=y CONFIG_NET_ESTIMATOR=y CONFIG_NET_CLS=y CONFIG_NET_CLS_TCINDEX=y CONFIG_NET_CLS_ROUTE4=y CONFIG_NET_CLS_ROUTE=y CONFIG_NET_CLS_FW=m CONFIG_NET_CLS_U32=m # CONFIG_CLS_U32_PERF is not set # CONFIG_NET_CLS_IND is not set CONFIG_NET_CLS_RSVP=m CONFIG_NET_CLS_RSVP6=m # CONFIG_NET_CLS_ACT is not set CONFIG_NET_CLS_POLICE=y it's seems that the sch_netem is not present in the file system! Tanks, Carlo Altarelli From ravinandan.arakali@s2io.com Wed Oct 13 18:06:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 18:06:34 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9E16RYX032337 for ; Wed, 13 Oct 2004 18:06:28 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9E161je021561; Wed, 13 Oct 2004 21:06:01 -0400 (EDT) Received: from rarakali ([10.16.16.108]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9E15x39001002; Wed, 13 Oct 2004 21:06:00 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , Subject: [PATCH 2.6.9-rc2 2/8] S2io: sw bug fixes Date: Wed, 13 Oct 2004 18:13:57 -0700 Message-ID: <004201c4b18b$14b2f720$6c10100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0043_01C4B150.68541F20" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10185 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Content-Length: 6463 Lines: 237 This is a multi-part message in MIME format. ------=_NextPart_000_0043_01C4B150.68541F20 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, Attached is the second patch in this submission. It contains the following software bug fixes. 1. In free_rx_buffers clearing out RxDs not owned by Xena. 2. In alarm_intr_handler, when a serr error occurs, schedule a task to reset the card rather than stopping Tx queue. 3. In s2io_close freeing IRQ before calling s2io_reset also added a new call to flush queued tasks. This is not done if the s2io_close itself is called from a queued task like s2io_restart_nic. 4. read_eeprom function has been changed such that data to be returned is sent as an input argument and the return value represents a pass/fail. The previous implementation as Randy had pointed out was error prone as on failure it returned -1 which can be interpreted as all ff's, so any data area which contained ff's in the eeprom was likely to be treated as an error. 5. Added a flag "task_flag" to track if the call to s2io_close is coming from the s2io_restart_nic function or from the ifconfig down called by user. 6. Moved register_netdev call from just after setting entry points to the end of the s2io_init_nic function. 7. In s2io.h field added a new member into the s2io_nic structure called "task_flag". Signed-off-by: Raghavendra Koushik ------=_NextPart_000_0043_01C4B150.68541F20 Content-Type: application/octet-stream; name="s2io_bugfixes.patch2" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="s2io_bugfixes.patch2" diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-06 15:18:10.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-06 16:19:52.821420504 -0700 @@ -1525,6 +1525,11 @@ blk++; } + if (!(rxdp->Control_1 & RXD_OWN_XENA)) { + memset(rxdp, 0, sizeof(RxD_t)); + continue; + } + skb = (struct sk_buff *) ((unsigned long) rxdp-> Host_Control); @@ -1887,7 +1892,7 @@ if (val64 & SERR_SOURCE_ANY) { DBG_PRINT(ERR_DBG, "%s: Device indicates ", dev->name); DBG_PRINT(ERR_DBG, "serious error!!\n"); - netif_stop_queue(dev); + schedule_work(&nic->rst_timer_task); } /* Other type of interrupts are not being handled now, TODO */ @@ -2205,6 +2210,17 @@ } tasklet_kill(&sp->task); + /* Free the Registered IRQ */ + free_irq(dev->irq, dev); + + /* Flush all scheduled tasks */ + if (sp->task_flag == 1) { + DBG_PRINT(INFO_DBG, "%s: Calling close from a task\n", + dev->name); + } else { + flush_scheduled_work(); + } + /* Check if the device is Quiescent and then Reset the NIC */ do { val64 = readq(&bar0->adapter_status); @@ -2225,9 +2241,6 @@ } while (1); s2io_reset(sp); - /* Free the Registered IRQ */ - free_irq(dev->irq, dev); - /* Free all Tx Buffers waiting for transmission */ free_tx_buffers(sp); @@ -2982,9 +2995,10 @@ */ #define S2IO_DEV_ID 5 -static u32 read_eeprom(nic_t * sp, int off) +static int read_eeprom(nic_t * sp, int off, u32 * data) { - u32 data = -1, exit_cnt = 0; + int ret = -1; + u32 exit_cnt = 0; u64 val64; XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; @@ -2996,7 +3010,8 @@ while (exit_cnt < 5) { val64 = readq(&bar0->i2c_control); if (I2C_CONTROL_CNTL_END(val64)) { - data = I2C_CONTROL_GET_DATA(val64); + *data = I2C_CONTROL_GET_DATA(val64); + ret = 0; break; } set_current_state(TASK_UNINTERRUPTIBLE); @@ -3004,7 +3019,7 @@ exit_cnt++; } - return data; + return ret; } /** @@ -3073,8 +3088,7 @@ eeprom->len = XENA_EEPROM_SPACE - eeprom->offset; for (i = 0; i < eeprom->len; i += 4) { - data = read_eeprom(sp, eeprom->offset + i); - if (data < 0) { + if (read_eeprom(sp, (eeprom->offset + i), &data)) { DBG_PRINT(ERR_DBG, "Read of EEPROM failed\n"); return -EFAULT; } @@ -3213,7 +3227,8 @@ static int s2io_eeprom_test(nic_t * sp, uint64_t * data) { - int fail = 0, ret_data; + int fail = 0; + u32 ret_data; /* Test Write Error at offset 0 */ if (!write_eeprom(sp, 0, 0, 3)) @@ -3222,7 +3237,7 @@ /* Test Write at offset 4f0 */ if (write_eeprom(sp, 0x4F0, 0x01234567, 3)) fail = 1; - if ((ret_data = read_eeprom(sp, 0x4F0)) < 0) + if (read_eeprom(sp, 0x4F0, &ret_data)) fail = 1; if (ret_data != 0x01234567) @@ -3238,7 +3253,7 @@ /* Test Write Request at offset 0x7fc */ if (write_eeprom(sp, 0x7FC, 0x01234567, 3)) fail = 1; - if ((ret_data = read_eeprom(sp, 0x7FC)) < 0) + if (read_eeprom(sp, 0x7FC, &ret_data)) fail = 1; if (ret_data != 0x01234567) @@ -3811,7 +3826,9 @@ struct net_device *dev = (struct net_device *) data; nic_t *sp = dev->priv; + sp->task_flag = 1; s2io_close(dev); + sp->task_flag = 0; sp->device_close_flag = TRUE; s2io_open(dev); DBG_PRINT(ERR_DBG, @@ -4275,18 +4292,13 @@ INIT_WORK(&sp->set_link_task, (void (*)(void *)) s2io_set_link, sp); - if (register_netdev(dev)) { - DBG_PRINT(ERR_DBG, "Device registration failed\n"); - goto register_failed; - } - pci_save_state(sp->pdev, sp->config_space); /* Setting swapper control on the NIC, for proper reset operation */ if (s2io_set_swapper(sp)) { DBG_PRINT(ERR_DBG, "%s:swapper settings are wrong\n", dev->name); - goto register_failed; + goto set_swap_failed; } /* Fix for all "FFs" MAC address problems observed on Alpha platforms */ @@ -4363,6 +4375,11 @@ sp->rx_csum = 1; /* Rx chksum verify enabled by default */ + if (register_netdev(dev)) { + DBG_PRINT(ERR_DBG, "Device registration failed\n"); + goto register_failed; + } + /* * Make Link state as off at this point, when the Link change * interrupt comes the state will be automatically changed to @@ -4373,9 +4390,8 @@ return 0; - set_swap_failed: - unregister_netdev(dev); register_failed: + set_swap_failed: iounmap(sp->bar1); bar1_remap_failed: iounmap(sp->bar0); diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-06 15:15:03.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-06 16:19:52.829419288 -0700 @@ -668,6 +668,8 @@ u16 last_link_state; #define LINK_DOWN 1 #define LINK_UP 2 + + int task_flag; } nic_t; #define RESET_ERROR 1; ------=_NextPart_000_0043_01C4B150.68541F20-- From ravinandan.arakali@s2io.com Wed Oct 13 18:07:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 18:07:31 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9E17PSV032585 for ; Wed, 13 Oct 2004 18:07:25 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9E16xje021571; Wed, 13 Oct 2004 21:06:59 -0400 (EDT) Received: from rarakali ([10.16.16.108]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9E16u39001104; Wed, 13 Oct 2004 21:06:57 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , Subject: [PATCH 2.6.9-rc2 4/8] S2io: hardware fixes Date: Wed, 13 Oct 2004 18:14:54 -0700 Message-ID: <004a01c4b18b$36c1d660$6c10100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_004B_01C4B150.8A62FE60" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10187 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Content-Length: 11506 Lines: 362 This is a multi-part message in MIME format. ------=_NextPart_000_004B_01C4B150.8A62FE60 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, Following are the code changes addressing the hardware errata mentioned in user guide. 1. Xena3's with a set of subsystem IDs had Link LED problems, fixed that specifically for them. 2. To write into the Keyed Mac_Cfg register to enable broadcast, writing two 32 bit writes into it along with a write to the key register rather than a single write to key and a 64 bit write to mac_cfg. This is necessary on 32 bit systems where a writeq(64 bit write) is actually two writel (32 bit writes). 3. Writes to some special registers mentioned in UG is being done by a special macro which defines which 32 bits of the 64 bit register is to be written first. Again this applies only on 32 bit systems. 4. Configured pause frame related water marks and a shared_split value which describes the Max TXDMA related split transaction that can be used without giving room for the Rx transactions. 5. The mac_rmac_err_reg R1 register will be cleared in the interrupt handler itself rather than in the scheduled task as was being done previously. 6. Even on PCC_FB_ECC error the card will be reset by disabling adapter enable bit. Signed-off-by: Raghavendra Koushik ------=_NextPart_000_004B_01C4B150.8A62FE60 Content-Type: application/octet-stream; name="s2io_hwfixes.patch4" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="s2io_hwfixes.patch4" diff -urN vanilla-linux/drivers/net/s2io.c = linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-07 11:44:04.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-07 11:45:41.000000000 -0700 @@ -71,6 +71,15 @@ static char s2io_driver_name[] =3D "s2io"; static char s2io_driver_version[] =3D "Version 1.7.5.1"; =20 +/*=20 + * Cards with following subsystem_id have a link state indication + * problem, 600B, 600C, 600D, 640B, 640C and 640D. + * macro below identifies these cards given the subsystem_id. + */ +#define CARDS_WITH_FAULTY_LINK_INDICATORS(subid) \ + (((subid >=3D 0x600B) && (subid <=3D 0x600D)) || \ + ((subid >=3D 0x640B) && (subid <=3D 0x640D))) ? 1 : 0 + #define LINK_IS_UP(val64) (!(val64 & (ADAPTER_STATUS_RMAC_REMOTE_FAULT = | \ ADAPTER_STATUS_RMAC_LOCAL_FAULT))) #define TASKLET_IN_USE test_and_set_bit(0, \ @@ -563,10 +572,13 @@ schedule_timeout(HZ / 2); =20 /* Enable Receiving broadcasts */ + add =3D (void *) &bar0->mac_cfg; val64 =3D readq(&bar0->mac_cfg); val64 |=3D MAC_RMAC_BCAST_ENABLE; writeq(RMAC_CFG_KEY(0x4C0D), &bar0->rmac_cfg_key); - writeq(val64, &bar0->mac_cfg); + writel((u32) val64, add); + writeq(RMAC_CFG_KEY(0x4C0D), &bar0->rmac_cfg_key); + writel((u32) (val64 >> 32), (add + 4)); =20 /* Read registers in all blocks */ val64 =3D readq(&bar0->mac_int_mask); @@ -598,8 +610,8 @@ dtx_cnt++; goto mdio_cfg; } - writeq(default_dtx_cfg[dtx_cnt], - &bar0->dtx_control); + SPECIAL_REG_WRITE(default_dtx_cfg[dtx_cnt], + &bar0->dtx_control, UF); val64 =3D readq(&bar0->dtx_control); dtx_cnt++; } @@ -609,8 +621,8 @@ mdio_cnt++; goto dtx_cfg; } - writeq(default_mdio_cfg[mdio_cnt], - &bar0->mdio_control); + SPECIAL_REG_WRITE(default_mdio_cfg[mdio_cnt], + &bar0->mdio_control, UF); val64 =3D readq(&bar0->mdio_control); mdio_cnt++; } @@ -873,6 +885,47 @@ writel((u32) (val64 >> 32), (add + 4)); val64 =3D readq(&bar0->mac_cfg); =20 + /*=20 + * Set the time value to be inserted in the pause frame=20 + * generated by xena. + */ + val64 =3D readq(&bar0->rmac_pause_cfg); + val64 &=3D ~(RMAC_PAUSE_HG_PTIME(0xffff)); + val64 |=3D RMAC_PAUSE_HG_PTIME(nic->mac_control.rmac_pause_time); + writeq(val64, &bar0->rmac_pause_cfg); + + /*=20 + * Set the Threshold Limit for Generating the pause frame + * If the amount of data in any Queue exceeds ratio of + * (mac_control.mc_pause_threshold_q0q3 or q4q7)/256 + * pause frame is generated + */ + val64 =3D 0; + for (i =3D 0; i < 4; i++) { + val64 |=3D + (((u64) 0xFF00 | nic->mac_control. + mc_pause_threshold_q0q3) + << (i * 2 * 8)); + } + writeq(val64, &bar0->mc_pause_thresh_q0q3); + + val64 =3D 0; + for (i =3D 0; i < 4; i++) { + val64 |=3D + (((u64) 0xFF00 | nic->mac_control. + mc_pause_threshold_q4q7) + << (i * 2 * 8)); + } + writeq(val64, &bar0->mc_pause_thresh_q4q7); + + /*=20 + * TxDMA will stop Read request if the number of read split has=20 + * exceeded the limit pointed by shared_splits + */ + val64 =3D readq(&bar0->pic_control); + val64 |=3D PIC_CNTL_SHARED_SPLITS(0); + writeq(val64, &bar0->pic_control); + return SUCCESS; } =20 @@ -1227,7 +1280,7 @@ */ val64 =3D readq(&bar0->mc_rldram_mrs); val64 |=3D MC_RLDRAM_QUEUE_SIZE_ENABLE | MC_RLDRAM_MRS_ENABLE; - writeq(val64, &bar0->mc_rldram_mrs); + SPECIAL_REG_WRITE(val64, &bar0->mc_rldram_mrs, UF); val64 =3D readq(&bar0->mc_rldram_mrs); =20 set_current_state(TASK_UNINTERRUPTIBLE); @@ -1291,13 +1344,13 @@ * force link down. Since link is already up, we will get * link state change interrupt after this reset */ - writeq(0x80010515001E0000ULL, &bar0->dtx_control); + SPECIAL_REG_WRITE(0x80010515001E0000ULL, &bar0->dtx_control, UF); val64 =3D readq(&bar0->dtx_control); udelay(50); - writeq(0x80010515001E00E0ULL, &bar0->dtx_control); + SPECIAL_REG_WRITE(0x80010515001E00E0ULL, &bar0->dtx_control, UF); val64 =3D readq(&bar0->dtx_control); udelay(50); - writeq(0x80070515001F00E4ULL, &bar0->dtx_control); + SPECIAL_REG_WRITE(0x80070515001F00E4ULL, &bar0->dtx_control, UF); val64 =3D readq(&bar0->dtx_control); udelay(50); =20 @@ -1884,6 +1937,7 @@ =20 /* Handling link status change error Intr */ err_reg =3D readq(&bar0->mac_rmac_err_reg); + writeq(err_reg, &bar0->mac_rmac_err_reg); if (err_reg & RMAC_LINK_STATE_CHANGE_INT) { schedule_work(&nic->set_link_task); } @@ -1896,6 +1950,22 @@ schedule_work(&nic->rst_timer_task); } =20 + /* + * Also as mentioned in the latest Errata sheets if the PCC_FB_ECC + * Error occurs, the adapter will be recycled by disabling the + * adapter enable bit and enabling it again after the device=20 + * becomes Quiescent. + */ + val64 =3D readq(&bar0->pcc_err_reg); + writeq(val64, &bar0->pcc_err_reg); + if (val64 & PCC_FB_ECC_DB_ERR) { + u64 ac =3D readq(&bar0->adapter_control); + ac &=3D ~(ADAPTER_CNTL_EN); + writeq(ac, &bar0->adapter_control); + ac =3D readq(&bar0->adapter_control); + schedule_work(&nic->set_link_task); + } + /* Other type of interrupts are not being handled now, TODO */ } =20 @@ -2870,12 +2940,13 @@ =20 static int s2io_ethtool_idnic(struct net_device *dev, u32 data) { - u64 val64 =3D 0; + u64 val64 =3D 0, last_gpio_ctrl_val; nic_t *sp =3D dev->priv; XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; u16 subid; =20 subid =3D sp->pdev->subsystem_device; + last_gpio_ctrl_val =3D readq(&bar0->gpio_control); if ((subid & 0xFF) < 0x07) { val64 =3D readq(&bar0->adapter_control); if (!(val64 & ADAPTER_CNTL_EN)) { @@ -2897,6 +2968,11 @@ schedule_timeout(MAX_SCHEDULE_TIMEOUT); del_timer_sync(&sp->id_timer); =20 + if (CARDS_WITH_FAULTY_LINK_INDICATORS(subid)) { + writeq(last_gpio_ctrl_val, &bar0->gpio_control); + last_gpio_ctrl_val =3D readq(&bar0->gpio_control); + } + return 0; } =20 @@ -2983,7 +3059,7 @@ val64 =3D I2C_CONTROL_DEV_ID(S2IO_DEV_ID) | I2C_CONTROL_ADDR(off) | I2C_CONTROL_BYTE_CNT(0x3) | I2C_CONTROL_READ | I2C_CONTROL_CNTL_START; - writeq(val64, &bar0->i2c_control); + SPECIAL_REG_WRITE(val64, &bar0->i2c_control, LF); =20 while (exit_cnt < 5) { val64 =3D readq(&bar0->i2c_control); @@ -3024,7 +3100,7 @@ val64 =3D I2C_CONTROL_DEV_ID(S2IO_DEV_ID) | I2C_CONTROL_ADDR(off) | I2C_CONTROL_BYTE_CNT(cnt) | I2C_CONTROL_SET_DATA(data) | I2C_CONTROL_CNTL_START; - writeq(val64, &bar0->i2c_control); + SPECIAL_REG_WRITE(val64, &bar0->i2c_control, LF); =20 while (exit_cnt < 5) { val64 =3D readq(&bar0->i2c_control); @@ -3352,10 +3428,10 @@ =20 val64 =3D readq(&bar0->mc_rldram_mrs); val64 |=3D MC_RLDRAM_QUEUE_SIZE_ENABLE; - writeq(val64, &bar0->mc_rldram_mrs); + SPECIAL_REG_WRITE(val64, &bar0->mc_rldram_mrs, UF); =20 val64 |=3D MC_RLDRAM_MRS_ENABLE; - writeq(val64, &bar0->mc_rldram_mrs); + SPECIAL_REG_WRITE(val64, &bar0->mc_rldram_mrs, UF); =20 while (iteration < 2) { val64 =3D 0x55555555aaaa0000ULL; @@ -3757,8 +3833,10 @@ nic_t *nic =3D (nic_t *) data; struct net_device *dev =3D nic->dev; XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; - register u64 val64, err_reg; + register u64 val64; + u16 subid; =20 + subid =3D nic->pdev->subsystem_device; /*=20 * Allow a small delay for the NICs self initiated=20 * cleanup to complete. @@ -3768,16 +3846,19 @@ =20 val64 =3D readq(&bar0->adapter_status); if (verify_xena_quiescence(val64, nic->device_enabled_once)) { - /* Acknowledge Intr and clear R1 register. */ - err_reg =3D readq(&bar0->mac_rmac_err_reg); - writeq(err_reg, &bar0->mac_rmac_err_reg); - if (LINK_IS_UP(val64)) { val64 =3D readq(&bar0->adapter_control); val64 |=3D ADAPTER_CNTL_EN; writeq(val64, &bar0->adapter_control); - val64 |=3D ADAPTER_LED_ON; - writeq(val64, &bar0->adapter_control); + if (CARDS_WITH_FAULTY_LINK_INDICATORS(subid)) { + val64 =3D readq(&bar0->gpio_control); + val64 |=3D GPIO_CTRL_GPIO_0; + writeq(val64, &bar0->gpio_control); + val64 =3D readq(&bar0->gpio_control); + } else { + val64 |=3D ADAPTER_LED_ON; + writeq(val64, &bar0->adapter_control); + } val64 =3D readq(&bar0->adapter_status); if (!LINK_IS_UP(val64)) { DBG_PRINT(ERR_DBG, "%s:", dev->name); @@ -3791,6 +3872,12 @@ } s2io_link(nic, LINK_UP); } else { + if (CARDS_WITH_FAULTY_LINK_INDICATORS(subid)) { + val64 =3D readq(&bar0->gpio_control); + val64 &=3D ~GPIO_CTRL_GPIO_0; + writeq(val64, &bar0->gpio_control); + val64 =3D readq(&bar0->gpio_control); + } s2io_link(nic, LINK_DOWN); } } else { /* NIC is not Quiescent. */ @@ -3917,6 +4004,7 @@ return SUCCESS; } =20 + /** * s2io_link - stops/starts the Tx queue. * @sp : private member of the device structure, which is a pointer to = the diff -urN vanilla-linux/drivers/net/s2io.h = linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-07 11:44:04.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-08 15:20:09.316690064 -0700 @@ -693,6 +693,27 @@ writel((u32) (val), addr); writel((u32) (val >> 32), (addr + 4)); } + +/* In 32 bit modes, some registers have to be written in a=20 + * particular order to expect correct hardware operation. The + * macro SPECIAL_REG_WRITE is used to perform such ordered=20 + * writes. Defines UF (Upper First) and LF (Lower First) will=20 + * be used to specify the required write order. + */ +#define UF 1 +#define LF 2 +static inline void SPECIAL_REG_WRITE(u64 val, void *addr, int order) +{ + if (order =3D=3D LF) { + writel((u32) (val), addr); + writel((u32) (val >> 32), (addr + 4)); + } else { + writel((u32) (val >> 32), (addr + 4)); + writel((u32) (val), addr); + } +} +#else +#define SPECIAL_REG_WRITE(val, addr, dummy) writeq(val, addr) #endif =20 /* Interrupt related values of Xena */ ------=_NextPart_000_004B_01C4B150.8A62FE60-- From ravinandan.arakali@s2io.com Wed Oct 13 18:07:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 18:07:19 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9E17CpI032570 for ; Wed, 13 Oct 2004 18:07:13 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9E16kje021568; Wed, 13 Oct 2004 21:06:46 -0400 (EDT) Received: from rarakali ([10.16.16.108]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9E16h39001060; Wed, 13 Oct 2004 21:06:44 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , Subject: [PATCH 2.6.9-rc2 3/8] S2io: optimizations Date: Wed, 13 Oct 2004 18:14:40 -0700 Message-ID: <004601c4b18b$2ee81a30$6c10100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0047_01C4B150.82894230" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10186 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Content-Length: 7226 Lines: 257 This is a multi-part message in MIME format. ------=_NextPart_000_0047_01C4B150.82894230 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, Following are the optimization-related changes made in this patch. 1. Definitions of LOW and PANIC levels of the Rx buffers have changed. 2. In wait_for_cmd_complete there is no longer a writeq but just a read and wait for strobe bit to reset. 3. In s2io_isr, the isr_lock has been done away with also the NICs interrupt are no longer disabled explicitly on entering the interrupt handler and re-enabled again before leaving it. 4. Also clearing the semaphore "tasklet_status" when exiting erroneously from s2io_isr after failing fill_rx_buffer call. 5. The set/reset Tx Csum function through ethtool was added to the ethtool_ops structure. 6. Added a Rx side error code in the rx_osm_handler function. 7. No longer stopping and waking Tx queue when link state changes in s2io_link function. 8. removed the isr_lock spinlock from the s2io_nic structure. Signed-off-by: Raghavendra Koushik ------=_NextPart_000_0047_01C4B150.82894230 Content-Type: application/octet-stream; name="s2io_optimizations.patch3" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="s2io_optimizations.patch3" diff -urN vanilla-linux/drivers/net/s2io.c = linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-06 17:24:02.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-06 17:37:32.751003528 -0700 @@ -80,10 +80,11 @@ static inline int rx_buffer_level(nic_t * sp, int rxb_size, int ring) { int level =3D 0; - if ((sp->pkt_cnt[ring] - rxb_size) > 128) { + if ((sp->pkt_cnt[ring] - rxb_size) > 16) { level =3D LOW; - if (rxb_size < sp->pkt_cnt[ring] / 8) + if ((sp->pkt_cnt[ring] - rxb_size) < MAX_RXDS_PER_BLOCK) { level =3D PANIC; + } } =20 return level; @@ -1916,12 +1917,8 @@ u64 val64; =20 while (TRUE) { - val64 =3D - RMAC_ADDR_CMD_MEM_RD | RMAC_ADDR_CMD_MEM_STROBE_NEW_CMD - | RMAC_ADDR_CMD_MEM_OFFSET(0); - writeq(val64, &bar0->rmac_addr_cmd_mem); val64 =3D readq(&bar0->rmac_addr_cmd_mem); - if (!val64) { + if (!(val64 & RMAC_ADDR_CMD_MEM_STROBE_CMD_EXECUTING)) { ret =3D SUCCESS; break; } @@ -2192,14 +2189,11 @@ register u64 val64 =3D 0; u16 cnt =3D 0; =20 - spin_lock(&sp->isr_lock); netif_stop_queue(dev); =20 /* disable Tx and Rx traffic on the NIC */ stop_nic(sp); =20 - spin_unlock(&sp->isr_lock); - /*=20 * If the device tasklet is running, wait till its done=20 * before killing it=20 @@ -2398,15 +2392,13 @@ struct net_device *dev =3D (struct net_device *) dev_id; nic_t *sp =3D dev->priv; XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; - u64 reason =3D 0, general_mask =3D 0; + u64 reason =3D 0; mac_info_t *mac_control; struct config_param *config; =20 mac_control =3D &sp->mac_control; config =3D &sp->config; =20 - spin_lock(&sp->isr_lock); - /*=20 * Identify the cause for interrupt and call the appropriate * interrupt handler. Causes for the interrupt could be; @@ -2419,14 +2411,9 @@ =20 if (!reason) { /* The interrupt was not raised by Xena. */ - spin_unlock(&sp->isr_lock); return IRQ_NONE; } =20 - /* Mask the Interrupts on the NIC. */ - general_mask =3D readq(&bar0->general_int_mask); - writeq(0xFFFFFFFFFFFFFFFFULL, &bar0->general_int_mask); - /* If Intr is because of Tx Traffic */ if (reason & GEN_INTR_TXTRAFFIC) { tx_intr_handler(sp); @@ -2441,11 +2428,6 @@ if (netif_rx_schedule_prep(dev)) { en_dis_able_nic_intrs(sp, RX_TRAFFIC_INTR, DISABLE_INTRS); - /*=20 - * Here we take a snap shot of the general=20 - * Intr Register. - */ - general_mask =3D readq(&bar0->general_int_mask); __netif_rx_schedule(dev); } } @@ -2481,9 +2463,9 @@ "%s:Out of memory", dev->name); DBG_PRINT(ERR_DBG, " in ISR!!\n"); - writeq(general_mask, - &bar0->general_int_mask); - spin_unlock(&sp->isr_lock); + clear_bit(0, + (unsigned long *) (&sp-> + tasklet_status)); return IRQ_HANDLED; } clear_bit(0, @@ -2501,10 +2483,6 @@ tasklet_schedule(&sp->task); #endif =20 - /* Unmask all previously enabled interrupts on the NIC. */ - writeq(general_mask, &bar0->general_int_mask); - - spin_unlock(&sp->isr_lock); return IRQ_HANDLED; } =20 @@ -3626,6 +3604,17 @@ return (S2IO_STAT_LEN); } =20 +int s2io_ethtool_op_set_tx_csum(struct net_device *dev, u32 data) +{ + if (data) + dev->features |=3D NETIF_F_IP_CSUM; + else + dev->features &=3D ~NETIF_F_IP_CSUM; + + return 0; +} + + static struct ethtool_ops netdev_ethtool_ops =3D { .get_settings =3D s2io_ethtool_gset, .set_settings =3D s2io_ethtool_sset, @@ -3641,7 +3630,7 @@ .get_rx_csum =3D s2io_ethtool_get_rx_csum, .set_rx_csum =3D s2io_ethtool_set_rx_csum, .get_tx_csum =3D ethtool_op_get_tx_csum, - .set_tx_csum =3D ethtool_op_set_tx_csum, + .set_tx_csum =3D s2io_ethtool_op_set_tx_csum, .get_sg =3D ethtool_op_get_sg, .set_sg =3D ethtool_op_set_sg, #ifdef NETIF_F_TSO @@ -3902,6 +3891,12 @@ skb->ip_summed =3D CHECKSUM_NONE; } =20 + if (rxdp->Control_1 & RXD_T_CODE) { + unsigned long long err =3D rxdp->Control_1 & RXD_T_CODE; + DBG_PRINT(ERR_DBG, "%s: Rx error Value: 0x%llx\n", + dev->name, err); + } + skb->dev =3D dev; skb_put(skb, len); skb->protocol =3D eth_type_trans(skb, dev); @@ -3922,25 +3917,6 @@ return SUCCESS; } =20 -int check_for_tx_space(nic_t * sp) -{ - u32 put_off, get_off, queue_len; - int ret =3D TRUE, i; - - for (i =3D 0; i < sp->config.tx_fifo_num; i++) { - queue_len =3D sp->mac_control.tx_curr_put_info[i].fifo_len - + 1; - put_off =3D sp->mac_control.tx_curr_put_info[i].offset; - get_off =3D sp->mac_control.tx_curr_get_info[i].offset; - if (((put_off + 1) % queue_len) =3D=3D get_off) { - ret =3D FALSE; - break; - } - } - - return ret; -} - /** * s2io_link - stops/starts the Tx queue. * @sp : private member of the device structure, which is a pointer to = the @@ -3962,17 +3938,9 @@ if (link =3D=3D LINK_DOWN) { DBG_PRINT(ERR_DBG, "%s: Link down\n", dev->name); netif_carrier_off(dev); - netif_stop_queue(dev); } else { DBG_PRINT(ERR_DBG, "%s: Link Up\n", dev->name); netif_carrier_on(dev); - if (check_for_tx_space(sp) =3D=3D TRUE) { - /* - * Dont wake the queue if we know there - * are no free TxDs available. - */ - netif_wake_queue(dev); - } } } sp->last_link_state =3D link; @@ -4357,7 +4325,6 @@ =20 /* Initialize spinlocks */ spin_lock_init(&sp->tx_lock); - spin_lock_init(&sp->isr_lock); =20 /*=20 * SXE-002: Configure link and activity LED to init state=20 diff -urN vanilla-linux/drivers/net/s2io.h = linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-06 17:24:05.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-06 17:37:47.532756360 -0700 @@ -612,7 +612,6 @@ atomic_t rx_bufs_left[MAX_RX_RINGS]; =20 spinlock_t tx_lock; - spinlock_t isr_lock; =20 #define PROMISC 1 #define ALL_MULTI 2 ------=_NextPart_000_0047_01C4B150.82894230-- From ravinandan.arakali@s2io.com Wed Oct 13 18:06:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 18:06:24 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9E16Icu032330 for ; Wed, 13 Oct 2004 18:06:18 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9E15gje021558; Wed, 13 Oct 2004 21:05:42 -0400 (EDT) Received: from rarakali ([10.16.16.108]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9E15Y39000913; Wed, 13 Oct 2004 21:05:35 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , Subject: [PATCH 2.6.9-rc2 1/8] S2io: cosmetic changes Date: Wed, 13 Oct 2004 18:13:31 -0700 Message-ID: <003e01c4b18b$0578cd70$6c10100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_003F_01C4B150.5919F570" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10184 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Content-Length: 131484 Lines: 4272 This is a multi-part message in MIME format. ------=_NextPart_000_003F_01C4B150.5919F570 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi All, This is the first patch in the 8 part series. I'll be sending the remaining immediately following this patch. This first patch contains cosmetic changes such as indentation, change in comment styles, variable name changes etc. Randy, we'll implement your comment about C99 syntax along with all the other comments received, in the next submission. Signed-off-by: Raghavendra Koushik ------=_NextPart_000_003F_01C4B150.5919F570 Content-Type: application/octet-stream; name="s2io_cosmetic.patch1" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="s2io_cosmetic.patch1" diff -urN vanilla-linux/drivers/net/s2io.c = linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-06 11:31:09.552305224 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-06 13:03:08.087360376 -0700 @@ -69,7 +69,7 @@ =20 /* S2io Driver name & version. */ static char s2io_driver_name[] =3D "s2io"; -static char s2io_driver_version[] =3D "Version 1.0"; +static char s2io_driver_version[] =3D "Version 1.7.5.1"; =20 #define LINK_IS_UP(val64) (!(val64 & (ADAPTER_STATUS_RMAC_REMOTE_FAULT = | \ ADAPTER_STATUS_RMAC_LOCAL_FAULT))) @@ -99,45 +99,45 @@ }; =20 static char ethtool_stats_keys[][ETH_GSTRING_LEN] =3D { - "tmac_frms", - "tmac_data_octets", - "tmac_drop_frms", - "tmac_mcst_frms", - "tmac_bcst_frms", - "tmac_pause_ctrl_frms", - "tmac_any_err_frms", - "tmac_vld_ip_octets", - "tmac_vld_ip", - "tmac_drop_ip", - "tmac_icmp", - "tmac_rst_tcp", - "tmac_tcp", - "tmac_udp", - "rmac_vld_frms", - "rmac_data_octets", - "rmac_fcs_err_frms", - "rmac_drop_frms", - "rmac_vld_mcst_frms", - "rmac_vld_bcst_frms", - "rmac_in_rng_len_err_frms", - "rmac_long_frms", - "rmac_pause_ctrl_frms", - "rmac_discarded_frms", - "rmac_usized_frms", - "rmac_osized_frms", - "rmac_frag_frms", - "rmac_jabber_frms", - "rmac_ip", - "rmac_ip_octets", - "rmac_hdr_err_ip", - "rmac_drop_ip", - "rmac_icmp", - "rmac_tcp", - "rmac_udp", - "rmac_err_drp_udp", - "rmac_pause_cnt", - "rmac_accepted_ip", - "rmac_err_tcp", + {"tmac_frms"}, + {"tmac_data_octets"}, + {"tmac_drop_frms"}, + {"tmac_mcst_frms"}, + {"tmac_bcst_frms"}, + {"tmac_pause_ctrl_frms"}, + {"tmac_any_err_frms"}, + {"tmac_vld_ip_octets"}, + {"tmac_vld_ip"}, + {"tmac_drop_ip"}, + {"tmac_icmp"}, + {"tmac_rst_tcp"}, + {"tmac_tcp"}, + {"tmac_udp"}, + {"rmac_vld_frms"}, + {"rmac_data_octets"}, + {"rmac_fcs_err_frms"}, + {"rmac_drop_frms"}, + {"rmac_vld_mcst_frms"}, + {"rmac_vld_bcst_frms"}, + {"rmac_in_rng_len_err_frms"}, + {"rmac_long_frms"}, + {"rmac_pause_ctrl_frms"}, + {"rmac_discarded_frms"}, + {"rmac_usized_frms"}, + {"rmac_osized_frms"}, + {"rmac_frag_frms"}, + {"rmac_jabber_frms"}, + {"rmac_ip"}, + {"rmac_ip_octets"}, + {"rmac_hdr_err_ip"}, + {"rmac_drop_ip"}, + {"rmac_icmp"}, + {"rmac_tcp"}, + {"rmac_udp"}, + {"rmac_err_drp_udp"}, + {"rmac_pause_cnt"}, + {"rmac_accepted_ip"}, + {"rmac_err_tcp"}, }; =20 #define S2IO_STAT_LEN sizeof(ethtool_stats_keys)/ ETH_GSTRING_LEN @@ -147,7 +147,8 @@ #define S2IO_STRINGS_LEN S2IO_TEST_LEN * ETH_GSTRING_LEN =20 =20 -/* Constants to be programmed into the Xena's registers to configure +/*=20 + * Constants to be programmed into the Xena's registers, to configure * the XAUI. */ =20 @@ -188,7 +189,9 @@ END_SIGN }; =20 -/* Constants for Fixing the MacAddress problem seen mostly on + +/*=20 + * Constants for Fixing the MacAddress problem seen mostly on * Alpha machines. */ static u64 fix_mac[] =3D { @@ -209,7 +212,6 @@ END_SIGN }; =20 - /* Module Loadable parameters. */ static u32 ring_num; static u32 frame_len[MAX_RX_RINGS]; @@ -218,7 +220,7 @@ static u32 fifo_len[MAX_TX_FIFOS]; static u32 rx_prio; static u32 tx_prio; -static u8 latency_timer =3D 0; +static u8 latency_timer; =20 /*=20 * S2IO device table. @@ -241,17 +243,15 @@ remove:__devexit_p(s2io_rem_nic), }; =20 -/* =20 - * Input Arguments:=20 - * Device private variable. - * Return Value:=20 - * SUCCESS on success and an appropriate -ve value on failure. - * Description:=20 - * The function allocates the all memory areas shared=20 - * between the NIC and the driver. This includes Tx descriptors,=20 - * Rx descriptors and the statistics block. +/** + * init_shared_mem - Allocation and Initialization of Memory + * @nic: Device private variable. + * Description: The function allocates all the memory areas shared=20 + * between the NIC and the driver. This includes Tx descriptors,=20 + * Rx descriptors and the statistics block. */ -static int initSharedMem(struct s2io_nic *nic) + +static int init_shared_mem(struct s2io_nic *nic) { u32 size; void *tmp_v_addr, *tmp_v_addr_next; @@ -269,8 +269,8 @@ =20 /* Allocation and initialization of TXDLs in FIOFs */ size =3D 0; - for (i =3D 0; i < config->TxFIFONum; i++) { - size +=3D config->TxCfg[i].FifoLen; + for (i =3D 0; i < config->tx_fifo_num; i++) { + size +=3D config->tx_cfg[i].fifo_len; } if (size > MAX_AVAILABLE_TXDS) { DBG_PRINT(ERR_DBG, "%s: Total number of Tx FIFOs ", @@ -279,7 +279,7 @@ DBG_PRINT(ERR_DBG, "that can be used\n"); return FAILURE; } - size *=3D (sizeof(TxD_t) * config->MaxTxDs); + size *=3D (sizeof(TxD_t) * config->max_txds); =20 mac_control->txd_list_mem =3D pci_alloc_consistent (nic->pdev, size, &mac_control->txd_list_mem_phy); @@ -295,61 +295,60 @@ DBG_PRINT(INIT_DBG, "%s:List Mem PHY: 0x%llx\n", dev->name, (unsigned long long) tmp_p_addr); =20 - for (i =3D 0; i < config->TxFIFONum; i++) { + for (i =3D 0; i < config->tx_fifo_num; i++) { mac_control->txdl_start_phy[i] =3D tmp_p_addr; mac_control->txdl_start[i] =3D (TxD_t *) tmp_v_addr; mac_control->tx_curr_put_info[i].offset =3D 0; mac_control->tx_curr_put_info[i].fifo_len =3D - config->TxCfg[i].FifoLen - 1; + config->tx_cfg[i].fifo_len - 1; mac_control->tx_curr_get_info[i].offset =3D 0; mac_control->tx_curr_get_info[i].fifo_len =3D - config->TxCfg[i].FifoLen - 1; + config->tx_cfg[i].fifo_len - 1; =20 tmp_p_addr +=3D - (config->TxCfg[i].FifoLen * (sizeof(TxD_t)) * - config->MaxTxDs); + (config->tx_cfg[i].fifo_len * (sizeof(TxD_t)) * + config->max_txds); tmp_v_addr +=3D - (config->TxCfg[i].FifoLen * (sizeof(TxD_t)) * - config->MaxTxDs); + (config->tx_cfg[i].fifo_len * (sizeof(TxD_t)) * + config->max_txds); } =20 /* Allocation and initialization of RXDs in Rings */ size =3D 0; - for (i =3D 0; i < config->RxRingNum; i++) { - if (config->RxCfg[i].NumRxd % (MAX_RXDS_PER_BLOCK + 1)) { + for (i =3D 0; i < config->rx_ring_num; i++) { + if (config->rx_cfg[i].num_rxd % (MAX_RXDS_PER_BLOCK + 1)) { DBG_PRINT(ERR_DBG, "%s: RxD count of ", dev->name); DBG_PRINT(ERR_DBG, "Ring%d is not a multiple of ", i); DBG_PRINT(ERR_DBG, "RxDs per Block"); return FAILURE; } - size +=3D config->RxCfg[i].NumRxd; + size +=3D config->rx_cfg[i].num_rxd; nic->block_count[i] =3D - config->RxCfg[i].NumRxd / (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1); nic->pkt_cnt[i] =3D - config->RxCfg[i].NumRxd - nic->block_count[i]; + config->rx_cfg[i].num_rxd - nic->block_count[i]; } - size =3D (size * (sizeof(RxD_t))); - mac_control->rxd_ring_mem_sz =3D size; =20 - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { mac_control->rx_curr_get_info[i].block_index =3D 0; mac_control->rx_curr_get_info[i].offset =3D 0; mac_control->rx_curr_get_info[i].ring_len =3D - config->RxCfg[i].NumRxd - 1; + config->rx_cfg[i].num_rxd - 1; mac_control->rx_curr_put_info[i].block_index =3D 0; mac_control->rx_curr_put_info[i].offset =3D 0; mac_control->rx_curr_put_info[i].ring_len =3D - config->RxCfg[i].NumRxd - 1; + config->rx_cfg[i].num_rxd - 1; blk_cnt =3D - config->RxCfg[i].NumRxd / (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1); /* Allocating all the Rx blocks */ for (j =3D 0; j < blk_cnt; j++) { size =3D (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t)); tmp_v_addr =3D pci_alloc_consistent(nic->pdev, size, &tmp_p_addr); if (tmp_v_addr =3D=3D NULL) { - /* In case of failure, freeSharedMem()=20 + /* + * In case of failure, free_shared_mem()=20 * is called, which should free any=20 * memory that was alloced till the=20 * failure happened. @@ -390,7 +389,8 @@ (nic->pdev, size, &mac_control->stats_mem_phy); =20 if (!mac_control->stats_mem) { - /* In case of failure, freeSharedMem() is called, which=20 + /*=20 + * In case of failure, free_shared_mem() is called, which=20 * should free any memory that was alloced till the=20 * failure happened. */ @@ -399,7 +399,7 @@ mac_control->stats_mem_sz =3D size; =20 tmp_v_addr =3D mac_control->stats_mem; - mac_control->StatsInfo =3D (StatInfo_t *) tmp_v_addr; + mac_control->stats_info =3D (StatInfo_t *) tmp_v_addr; memset(tmp_v_addr, 0, size); =20 DBG_PRINT(INIT_DBG, "%s:Ring Mem PHY: 0x%llx\n", dev->name, @@ -408,16 +408,14 @@ return SUCCESS; } =20 -/* =20 - * Input Arguments:=20 - * Device peivate variable. - * Return Value:=20 - * NONE - * Description:=20 - * This function is to free all memory locations allocated by - * the initSharedMem() function and return it to the kernel. +/** =20 + * free_shared_mem - Free the allocated Memory=20 + * @nic: Device private variable. + * Description: This function is to free all memory locations allocated = by + * the init_shared_mem() function and return it to the kernel. */ -static void freeSharedMem(struct s2io_nic *nic) + +static void free_shared_mem(struct s2io_nic *nic) { int i, j, blk_cnt, size; void *tmp_v_addr; @@ -440,7 +438,7 @@ } =20 size =3D (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t)); - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { blk_cnt =3D nic->block_count[i]; for (j =3D 0; j < blk_cnt; j++) { tmp_v_addr =3D nic->rx_blocks[i][j].block_virt_addr; @@ -452,6 +450,7 @@ } } =20 + if (mac_control->stats_mem) { pci_free_consistent(nic->pdev, mac_control->stats_mem_sz, @@ -460,16 +459,16 @@ } } =20 -/* =20 - * Input Arguments:=20 - * device peivate variable - * Return Value:=20 - * SUCCESS on success and '-1' on failure (endian settings incorrect). - * Description:=20 - * The function sequentially configures every block=20 +/** =20 + * init_nic - Initialization of hardware=20 + * @nic: device peivate variable + * Description: The function sequentially configures every block=20 * of the H/W from their reset values.=20 + * Return Value: SUCCESS on success and=20 + * '-1' on failure (endian settings incorrect). */ -static int initNic(struct s2io_nic *nic) + +static int init_nic(struct s2io_nic *nic) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; struct net_device *dev =3D nic->dev; @@ -485,11 +484,13 @@ mac_control =3D &nic->mac_control; config =3D &nic->config; =20 - /* Set proper endian settings and verify the same by=20 - * reading the PIF Feed-back register. + /*=20 + * Set proper endian settings and verify the same by=20 + * reading the PIF Feed-back register. */ #ifdef __BIG_ENDIAN - /* The device by default set to a big endian format, so=20 + /* + * The device by default set to a big endian format, so=20 * a big endian driver need not set anything. */ writeq(0xffffffffffffffffULL, &bar0->swapper_ctrl); @@ -510,7 +511,8 @@ SWAPPER_CTRL_STATS_FE | SWAPPER_CTRL_STATS_SE); writeq(val64, &bar0->swapper_ctrl); #else - /* Initially we enable all bits to make it accessible by=20 + /*=20 + * Initially we enable all bits to make it accessible by=20 * the driver, then we selectively enable only those bits=20 * that we want to set. */ @@ -537,8 +539,9 @@ writeq(val64, &bar0->swapper_ctrl); #endif =20 - /* Verifying if endian settings are accurate by reading=20 - * a feedback register. + /*=20 + * Verifying if endian settings are accurate by=20 + * reading a feedback register. */ val64 =3D readq(&bar0->pif_rd_swapper_fb); if (val64 !=3D 0x0123456789ABCDEFULL) { @@ -573,8 +576,9 @@ val64 =3D dev->mtu; writeq(vBIT(val64, 2, 14), &bar0->rmac_max_pyld_len); =20 - /* Configuring the XAUI Interface of Xena.=20 - ***************************************** + /*=20 + * Configuring the XAUI Interface of Xena.=20 + * *************************************** * To Configure the Xena's XAUI, one has to write a series=20 * of 64 bit values into two registers in a particular=20 * sequence. Hence a macro 'SWITCH_SIGN' has been defined=20 @@ -625,13 +629,13 @@ writeq(val64, &bar0->tx_fifo_partition_3); =20 =20 - for (i =3D 0, j =3D 0; i < config->TxFIFONum; i++) { + for (i =3D 0, j =3D 0; i < config->tx_fifo_num; i++) { val64 |=3D - vBIT(config->TxCfg[i].FifoLen - 1, ((i * 32) + 19), - 13) | vBIT(config->TxCfg[i].FifoPriority, + vBIT(config->tx_cfg[i].fifo_len - 1, ((i * 32) + 19), + 13) | vBIT(config->tx_cfg[i].fifo_priority, ((i * 32) + 5), 3); =20 - if (i =3D=3D (config->TxFIFONum - 1)) { + if (i =3D=3D (config->tx_fifo_num - 1)) { if (i % 2 =3D=3D 0) i++; } @@ -675,56 +679,59 @@ =20 /* Rx DMA intialization. */ val64 =3D 0; - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { val64 |=3D - vBIT(config->RxCfg[i].RingPriority, (5 + (i * 8)), 3); + vBIT(config->rx_cfg[i].ring_priority, (5 + (i * 8)), + 3); } writeq(val64, &bar0->rx_queue_priority); =20 - /* Allocating equal share of memory to all the configured=20 - * Rings. + /*=20 + * Allocating equal share of memory to all the=20 + * configured Rings. */ val64 =3D 0; - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { switch (i) { case 0: - mem_share =3D (64 / config->RxRingNum + - 64 % config->RxRingNum); + mem_share =3D (64 / config->rx_ring_num + + 64 % config->rx_ring_num); val64 |=3D RX_QUEUE_CFG_Q0_SZ(mem_share); continue; case 1: - mem_share =3D (64 / config->RxRingNum); + mem_share =3D (64 / config->rx_ring_num); val64 |=3D RX_QUEUE_CFG_Q1_SZ(mem_share); continue; case 2: - mem_share =3D (64 / config->RxRingNum); + mem_share =3D (64 / config->rx_ring_num); val64 |=3D RX_QUEUE_CFG_Q2_SZ(mem_share); continue; case 3: - mem_share =3D (64 / config->RxRingNum); + mem_share =3D (64 / config->rx_ring_num); val64 |=3D RX_QUEUE_CFG_Q3_SZ(mem_share); continue; case 4: - mem_share =3D (64 / config->RxRingNum); + mem_share =3D (64 / config->rx_ring_num); val64 |=3D RX_QUEUE_CFG_Q4_SZ(mem_share); continue; case 5: - mem_share =3D (64 / config->RxRingNum); + mem_share =3D (64 / config->rx_ring_num); val64 |=3D RX_QUEUE_CFG_Q5_SZ(mem_share); continue; case 6: - mem_share =3D (64 / config->RxRingNum); + mem_share =3D (64 / config->rx_ring_num); val64 |=3D RX_QUEUE_CFG_Q6_SZ(mem_share); continue; case 7: - mem_share =3D (64 / config->RxRingNum); + mem_share =3D (64 / config->rx_ring_num); val64 |=3D RX_QUEUE_CFG_Q7_SZ(mem_share); continue; } } writeq(val64, &bar0->rx_queue_cfg); =20 - /* Initializing the Tx round robin registers to 0. + /*=20 + * Initializing the Tx round robin registers to 0. * Filling Tx and Rx round robin registers as per the=20 * number of FIFOs and Rings is still TODO. */ @@ -734,13 +741,15 @@ writeq(0, &bar0->tx_w_round_robin_3); writeq(0, &bar0->tx_w_round_robin_4); =20 - /* Disable Rx steering. Hard coding all packets be steered to + /*=20 + * TODO + * Disable Rx steering. Hard coding all packets be steered to * Queue 0 for now.=20 - * TODO*/ + */ if (rx_prio) { u64 def =3D 0x8000000000000000ULL, tmp; for (i =3D 0; i < MAX_RX_RINGS; i++) { - tmp =3D (u64) (def >> (i % config->RxRingNum)); + tmp =3D (u64) (def >> (i % config->rx_ring_num)); val64 |=3D (u64) (tmp >> (i * 8)); } writeq(val64, &bar0->rts_qos_steering); @@ -763,14 +772,16 @@ val64 =3D SET_UPDT_PERIOD(8) | STAT_CFG_STAT_RO | STAT_CFG_STAT_EN; writeq(val64, &bar0->stat_cfg); =20 - /* Initializing the sampling rate for the device to calculate the + /*=20 + * Initializing the sampling rate for the device to calculate the * bandwidth utilization. */ val64 =3D MAC_TX_LINK_UTIL_VAL(0x5) | MAC_RX_LINK_UTIL_VAL(0x5); writeq(val64, &bar0->mac_link_util); =20 =20 - /* Initializing the Transmit and Receive Traffic Interrupt=20 + /*=20 + * Initializing the Transmit and Receive Traffic Interrupt=20 * Scheme. */ /* TTI Initialization */ @@ -787,7 +798,8 @@ val64 =3D TTI_CMD_MEM_WE | TTI_CMD_MEM_STROBE_NEW_CMD; writeq(val64, &bar0->tti_command_mem); =20 - /* Once the operation completes, the Strobe bit of the command + /*=20 + * Once the operation completes, the Strobe bit of the command * register will be reset. We poll for this particular condition * We wait for a maximum of 500ms for the operation to complete, * if it's not complete by then we return error. @@ -821,7 +833,8 @@ val64 =3D RTI_CMD_MEM_WE | RTI_CMD_MEM_STROBE_NEW_CMD; writeq(val64, &bar0->rti_command_mem); =20 - /* Once the operation completes, the Strobe bit of the command + /*=20 + * Once the operation completes, the Strobe bit of the command * register will be reset. We poll for this particular condition * We wait for a maximum of 500ms for the operation to complete, * if it's not complete by then we return error. @@ -842,7 +855,8 @@ schedule_timeout(HZ / 20); } =20 - /* Initializing proper values as Pause threshold into all=20 + /*=20 + * Initializing proper values as Pause threshold into all=20 * the 8 Queues on Rx side. */ writeq(0xffbbffbbffbbffbbULL, &bar0->mc_pause_thresh_q0q3); @@ -861,19 +875,18 @@ return SUCCESS; } =20 -/* =20 - * Input Arguments:=20 - * device private variable, - * A mask indicating which Intr block must be modified and, - * A flag indicating whether to enable or disable the Intrs. - * Return Value:=20 - * NONE. - * Description:=20 - * This function will either disable or enable the interrupts=20 +/** =20 + * en_dis_able_nic_intrs - Enable or Disable the interrupts=20 + * @nic: device private variable, + * @mask: A mask indicating which Intr block must be modified and, + * @flag: A flag indicating whether to enable or disable the Intrs. + * Description: This function will either disable or enable the = interrupts * depending on the flag argument. The mask argument can be used to=20 * enable/disable any Intr block.=20 + * Return Value: NONE. */ -static void en_dis_able_NicIntrs(struct s2io_nic *nic, u16 mask, int = flag) + +static void en_dis_able_nic_intrs(struct s2io_nic *nic, u16 mask, int = flag) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; register u64 val64 =3D 0, temp64 =3D 0; @@ -887,15 +900,20 @@ temp64 =3D readq(&bar0->general_int_mask); temp64 &=3D ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* Disabled all PCIX, Flash, MDIO, IIC and GPIO - * interrupts for now.=20 - * TODO */ + /* =20 + * Disabled all PCIX, Flash, MDIO, IIC and GPIO + * interrupts for now.=20 + * TODO=20 + */ writeq(DISABLE_ALL_INTRS, &bar0->pic_int_mask); - /* No MSI Support is available presently, so TTI and + /*=20 + * No MSI Support is available presently, so TTI and * RTI interrupts are also disabled. */ } else if (flag =3D=3D DISABLE_INTRS) { - /* Disable PIC Intrs in the general intr mask register=20 + /* =20 + * Disable PIC Intrs in the general=20 + * intr mask register=20 */ writeq(DISABLE_ALL_INTRS, &bar0->pic_int_mask); temp64 =3D readq(&bar0->general_int_mask); @@ -907,24 +925,34 @@ /* DMA Interrupts */ /* Enabling/Disabling Tx DMA interrupts */ if (mask & TX_DMA_INTR) { - /* Enable TxDMA Intrs in the general intr mask register */ + /* Enable TxDMA Intrs in the general intr mask register */ val64 =3D TXDMA_INT_M; if (flag =3D=3D ENABLE_INTRS) { temp64 =3D readq(&bar0->general_int_mask); temp64 &=3D ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* Disable all interrupts other than PFC interrupt in=20 - * DMA level. + /*=20 + * Keep all interrupts other than PFC interrupt=20 + * and PCC interrupt disabled in DMA level. */ - val64 =3D DISABLE_ALL_INTRS & (~TXDMA_PFC_INT_M); + val64 =3D DISABLE_ALL_INTRS & ~(TXDMA_PFC_INT_M | + TXDMA_PCC_INT_M); writeq(val64, &bar0->txdma_int_mask); - /* Enable only the MISC error 1 interrupt in PFC block=20 + /*=20 + * Enable only the MISC error 1 interrupt in PFC block=20 */ val64 =3D DISABLE_ALL_INTRS & (~PFC_MISC_ERR_1); writeq(val64, &bar0->pfc_err_mask); + /*=20 + * Enable only the FB_ECC error interrupt in PCC block=20 + */ + val64 =3D DISABLE_ALL_INTRS & (~PCC_FB_ECC_ERR); + writeq(val64, &bar0->pcc_err_mask); } else if (flag =3D=3D DISABLE_INTRS) { - /* Disable TxDMA Intrs in the general intr mask=20 - * register */ + /*=20 + * Disable TxDMA Intrs in the general intr mask=20 + * register=20 + */ writeq(DISABLE_ALL_INTRS, &bar0->txdma_int_mask); writeq(DISABLE_ALL_INTRS, &bar0->pfc_err_mask); temp64 =3D readq(&bar0->general_int_mask); @@ -941,12 +969,16 @@ temp64 =3D readq(&bar0->general_int_mask); temp64 &=3D ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* All RxDMA block interrupts are disabled for now=20 - * TODO */ + /*=20 + * All RxDMA block interrupts are disabled for now=20 + * TODO=20 + */ writeq(DISABLE_ALL_INTRS, &bar0->rxdma_int_mask); } else if (flag =3D=3D DISABLE_INTRS) { - /* Disable RxDMA Intrs in the general intr mask=20 - * register */ + /* =20 + * Disable RxDMA Intrs in the general intr mask=20 + * register=20 + */ writeq(DISABLE_ALL_INTRS, &bar0->rxdma_int_mask); temp64 =3D readq(&bar0->general_int_mask); val64 |=3D temp64; @@ -962,9 +994,11 @@ temp64 =3D readq(&bar0->general_int_mask); temp64 &=3D ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* All MAC block error interrupts are disabled for now=20 + /*=20 + * All MAC block error interrupts are disabled for now=20 * except the link status change interrupt. - * TODO*/ + * TODO + */ val64 =3D MAC_INT_STATUS_RMAC_INT; temp64 =3D readq(&bar0->mac_int_mask); temp64 &=3D ~((u64) val64); @@ -974,7 +1008,8 @@ val64 &=3D ~((u64) RMAC_LINK_STATE_CHANGE_INT); writeq(val64, &bar0->mac_rmac_err_mask); } else if (flag =3D=3D DISABLE_INTRS) { - /* Disable MAC Intrs in the general intr mask register=20 + /* =20 + * Disable MAC Intrs in the general intr mask register=20 */ writeq(DISABLE_ALL_INTRS, &bar0->mac_int_mask); writeq(DISABLE_ALL_INTRS, @@ -993,11 +1028,14 @@ temp64 =3D readq(&bar0->general_int_mask); temp64 &=3D ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* All XGXS block error interrupts are disabled for now - * TODO */ + /*=20 + * All XGXS block error interrupts are disabled for now + * TODO=20 + */ writeq(DISABLE_ALL_INTRS, &bar0->xgxs_int_mask); } else if (flag =3D=3D DISABLE_INTRS) { - /* Disable MC Intrs in the general intr mask register=20 + /* =20 + * Disable MC Intrs in the general intr mask register=20 */ writeq(DISABLE_ALL_INTRS, &bar0->xgxs_int_mask); temp64 =3D readq(&bar0->general_int_mask); @@ -1013,11 +1051,14 @@ temp64 =3D readq(&bar0->general_int_mask); temp64 &=3D ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* All MC block error interrupts are disabled for now - * TODO */ + /*=20 + * All MC block error interrupts are disabled for now + * TODO=20 + */ writeq(DISABLE_ALL_INTRS, &bar0->mc_int_mask); } else if (flag =3D=3D DISABLE_INTRS) { - /* Disable MC Intrs in the general intr mask register + /* + * Disable MC Intrs in the general intr mask register */ writeq(DISABLE_ALL_INTRS, &bar0->mc_int_mask); temp64 =3D readq(&bar0->general_int_mask); @@ -1034,15 +1075,15 @@ temp64 =3D readq(&bar0->general_int_mask); temp64 &=3D ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* Enable all the Tx side interrupts */ - writeq(0x0, &bar0->tx_traffic_mask); /* '0' Enables=20 - * all 64 TX=20 - * interrupt=20 - * levels. - */ + /*=20 + * Enable all the Tx side interrupts + * writing 0 Enables all 64 TX interrupt levels=20 + */ + writeq(0x0, &bar0->tx_traffic_mask); } else if (flag =3D=3D DISABLE_INTRS) { - /* Disable Tx Traffic Intrs in the general intr mask=20 - * register. + /*=20 + * Disable Tx Traffic Intrs in the general intr mask=20 + * register. */ writeq(DISABLE_ALL_INTRS, &bar0->tx_traffic_mask); temp64 =3D readq(&bar0->general_int_mask); @@ -1058,14 +1099,12 @@ temp64 =3D readq(&bar0->general_int_mask); temp64 &=3D ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - writeq(0x0, &bar0->rx_traffic_mask); /* '0' Enables=20 - * all 8 RX=20 - * interrupt=20 - * levels. - */ + /* writing 0 Enables all 8 RX interrupt levels */ + writeq(0x0, &bar0->rx_traffic_mask); } else if (flag =3D=3D DISABLE_INTRS) { - /* Disable Rx Traffic Intrs in the general intr mask=20 - * register. + /* =20 + * Disable Rx Traffic Intrs in the general intr mask=20 + * register. */ writeq(DISABLE_ALL_INTRS, &bar0->rx_traffic_mask); temp64 =3D readq(&bar0->general_int_mask); @@ -1075,17 +1114,19 @@ } } =20 -/* =20 - * Input Arguments:=20 - * val64 - Value read from adapter status register. - * flag - indicates if the adapter enable bit was ever written once = before. - * Return Value:=20 - * void. - * Description:=20 - * Returns whether the H/W is ready to go or not. Depending on = whether=20 - * adapter enable bit was written or not the comparison differs and = the=20 - * calling function passes the input argument flag to indicate this. +/** =20 + * verify_xena_quiescence - Checks whether the H/W is ready=20 + * @val64 : Value read from adapter status register. + * @flag : indicates if the adapter enable bit was ever written once + * before. + * Description: Returns whether the H/W is ready to go or not. = Depending + * on whether adapter enable bit was written or not the comparison=20 + * differs and the calling function passes the input argument flag to + * indicate this. + * Return: 1 If xena is quiescence=20 + * 0 If Xena is not quiescence */ + static int verify_xena_quiescence(u64 val64, int flag) { int ret =3D 0; @@ -1122,11 +1163,15 @@ return ret; } =20 -/*=20 +/** + * fix_mac_address - Fix for Mac addr problem on Alpha platforms + * @sp: Pointer to device specifc structure + * Description :=20 * New procedure to clear mac address reading problems on Alpha = platforms * */ -void FixMacAddress(nic_t * sp) + +void fix_mac_address(nic_t * sp) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; u64 val64; @@ -1138,19 +1183,20 @@ } } =20 -/* =20 - * Input Arguments:=20 - * device private variable. - * Return Value:=20 - * SUCCESS on success and -1 on failure. +/** + * start_nic - Turns the device on =20 + * @nic : device private variable. * Description:=20 - * This function actually turns the device on. Before this=20 - * function is called, all Registers are configured from their reset = states=20 + * This function actually turns the device on. Before this function = is=20 + * called,all Registers are configured from their reset states=20 * and shared memory is allocated but the NIC is still quiescent. On=20 * calling this function, the device interrupts are cleared and the = NIC is * literally switched on by writing into the adapter control register. + * Return Value:=20 + * SUCCESS on success and -1 on failure. */ -static int startNic(struct s2io_nic *nic) + +static int start_nic(struct s2io_nic *nic) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; struct net_device *dev =3D nic->dev; @@ -1164,7 +1210,7 @@ config =3D &nic->config; =20 /* PRC Initialization and configuration */ - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { writeq((u64) nic->rx_blocks[i][0].block_dma_addr, &bar0->prc_rxd0_n[i]); =20 @@ -1173,7 +1219,8 @@ writeq(val64, &bar0->prc_ctrl_n[i]); } =20 - /* Enabling MC-RLDRAM. After enabling the device, we timeout + /*=20 + * Enabling MC-RLDRAM. After enabling the device, we timeout * for around 100ms, which is approximately the time required * for the device to be ready for operation. */ @@ -1190,14 +1237,16 @@ val64 &=3D ~ADAPTER_ECC_EN; writeq(val64, &bar0->adapter_control); =20 - /* Clearing any possible Link state change interrupts that=20 + /*=20 + * Clearing any possible Link state change interrupts that=20 * could have popped up just before Enabling the card. */ val64 =3D readq(&bar0->mac_rmac_err_reg); if (val64) writeq(val64, &bar0->mac_rmac_err_reg); =20 - /* Verify if the device is ready to be enabled, if so enable=20 + /*=20 + * Verify if the device is ready to be enabled, if so enable=20 * it. */ val64 =3D readq(&bar0->adapter_status); @@ -1211,9 +1260,10 @@ /* Enable select interrupts */ interruptible =3D TX_TRAFFIC_INTR | RX_TRAFFIC_INTR | TX_MAC_INTR | RX_MAC_INTR; - en_dis_able_NicIntrs(nic, interruptible, ENABLE_INTRS); + en_dis_able_nic_intrs(nic, interruptible, ENABLE_INTRS); =20 - /* With some switches, link might be already up at this point. + /*=20 + * With some switches, link might be already up at this point. * Because of this weird behavior, when we enable laser,=20 * we may not get link. We need to handle this. We cannot=20 * figure out which switch is misbehaving. So we are forced to=20 @@ -1240,82 +1290,72 @@ * force link down. Since link is already up, we will get * link state change interrupt after this reset */ - writeq(0x8007051500000000ULL, &bar0->dtx_control); + writeq(0x80010515001E0000ULL, &bar0->dtx_control); val64 =3D readq(&bar0->dtx_control); - writeq(0x80070515000000E0ULL, &bar0->dtx_control); + udelay(50); + writeq(0x80010515001E00E0ULL, &bar0->dtx_control); val64 =3D readq(&bar0->dtx_control); + udelay(50); writeq(0x80070515001F00E4ULL, &bar0->dtx_control); val64 =3D readq(&bar0->dtx_control); + udelay(50); =20 return SUCCESS; } =20 -/* =20 - * Input Arguments:=20 - * nic - device private variable. - * Return Value:=20 - * void. +/**=20 + * free_tx_buffers - Free all queued Tx buffers=20 + * @nic : device private variable. * Description:=20 - * Free all queued Tx buffers. - */ -void freeTxBuffers(struct s2io_nic *nic) + * Free all queued Tx buffers. + * Return Value: void=20 +*/ + +void free_tx_buffers(struct s2io_nic *nic) { struct net_device *dev =3D nic->dev; struct sk_buff *skb; TxD_t *txdp; int i, j; -#if DEBUG_ON - int cnt =3D 0; -#endif mac_info_t *mac_control; struct config_param *config; + int cnt =3D 0; =20 mac_control =3D &nic->mac_control; config =3D &nic->config; =20 - for (i =3D 0; i < config->TxFIFONum; i++) { - for (j =3D 0; j < config->TxCfg[i].FifoLen - 1; j++) { + for (i =3D 0; i < config->tx_fifo_num; i++) { + for (j =3D 0; j < config->tx_cfg[i].fifo_len - 1; j++) { txdp =3D mac_control->txdl_start[i] + - (config->MaxTxDs * j); - - if (!(txdp->Control_1 & TXD_LIST_OWN_XENA)) { - /* If owned by host, ignore */ - continue; - } + (config->max_txds * j); skb =3D (struct sk_buff *) ((unsigned long) txdp-> Host_Control); if (skb =3D=3D NULL) { - DBG_PRINT(ERR_DBG, "%s: NULL skb ", - dev->name); - DBG_PRINT(ERR_DBG, "in Tx Int\n"); - return; + memset(txdp, 0, sizeof(TxD_t)); + continue; } -#if DEBUG_ON - cnt++; -#endif dev_kfree_skb(skb); memset(txdp, 0, sizeof(TxD_t)); + cnt++; } -#if DEBUG_ON DBG_PRINT(INTR_DBG, "%s:forcibly freeing %d skbs on FIFO%d\n", dev->name, cnt, i); -#endif } } =20 -/* =20 - * Input Arguments:=20 - * nic - device private variable. - * Return Value:=20 +/** =20 + * stop_nic - To stop the nic =20 + * @nic ; device private variable. + * Description:=20 + * This function does exactly the opposite of what the start_nic()=20 + * function does. This function is called to stop the device. + * Return Value: * void. - * Description:=20 - * This function does exactly the opposite of what the startNic()=20 - * function does. This function is called to stop=20 - * the device. */ -static void stopNic(struct s2io_nic *nic) + +static void stop_nic(struct s2io_nic *nic) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; register u64 val64 =3D 0; @@ -1326,24 +1366,23 @@ mac_control =3D &nic->mac_control; config =3D &nic->config; =20 -/* Disable all interrupts */ + /* Disable all interrupts */ interruptible =3D TX_TRAFFIC_INTR | RX_TRAFFIC_INTR | TX_MAC_INTR | RX_MAC_INTR; - en_dis_able_NicIntrs(nic, interruptible, DISABLE_INTRS); + en_dis_able_nic_intrs(nic, interruptible, DISABLE_INTRS); =20 -/* Disable PRCs */ - for (i =3D 0; i < config->RxRingNum; i++) { + /* Disable PRCs */ + for (i =3D 0; i < config->rx_ring_num; i++) { val64 =3D readq(&bar0->prc_ctrl_n[i]); val64 &=3D ~((u64) PRC_CTRL_RC_ENABLED); writeq(val64, &bar0->prc_ctrl_n[i]); } } =20 -/* =20 - * Input Arguments:=20 - * device private variable - * Return Value:=20 - * SUCCESS on success or an appropriate -ve value on failure. +/** =20 + * fill_rx_buffers - Allocates the Rx side skbs=20 + * @nic: device private variable + * @ring_no: ring number=20 * Description:=20 * The function allocates Rx side skbs and puts the physical * address of these buffers into the RxD buffer pointers, so that the = NIC @@ -1354,9 +1393,13 @@ * 3. Five buffer modes. * Each mode defines how many fragments the received frame will be = split=20 * up into by the NIC. The frame is split into L3 header, L4 Header,=20 - * L4 payload in three buffer mode and in 5 buffer mode, L4 payload = itself=20 - * is split into 3 fragments. As of now only single buffer mode is = supported. + * L4 payload in three buffer mode and in 5 buffer mode, L4 payload = itself + * is split into 3 fragments. As of now only single buffer mode is + * supported. + * Return Value: + * SUCCESS on success or an appropriate -ve value on failure. */ + int fill_rx_buffers(struct s2io_nic *nic, int ring_no) { struct net_device *dev =3D nic->dev; @@ -1392,7 +1435,8 @@ off1 =3D mac_control->rx_curr_get_info[ring_no].offset; offset =3D block_no * (MAX_RXDS_PER_BLOCK + 1) + off; offset1 =3D block_no1 * (MAX_RXDS_PER_BLOCK + 1) + off1; - + offset =3D block_no * (MAX_RXDS_PER_BLOCK) + off; + offset1 =3D block_no1 * (MAX_RXDS_PER_BLOCK) + off1; rxdp =3D nic->rx_blocks[ring_no][block_no]. block_virt_addr + off; if ((offset =3D=3D offset1) && (rxdp->Host_Control)) { @@ -1400,7 +1444,6 @@ DBG_PRINT(INTR_DBG, " info equated\n"); goto end; } - if (rxdp->Control_1 =3D=3D END_OF_BLOCK) { mac_control->rx_curr_put_info[ring_no]. block_index++; @@ -1412,8 +1455,6 @@ off %=3D (MAX_RXDS_PER_BLOCK + 1); mac_control->rx_curr_put_info[ring_no].offset =3D off; - /*rxdp =3D nic->rx_blocks[ring_no][block_no]. - block_virt_addr + off; */ rxdp =3D (RxD_t *) ((unsigned long) rxdp->Control_2); DBG_PRINT(INTR_DBG, "%s: Next block at: %p\n", dev->name, rxdp); @@ -1450,15 +1491,16 @@ return SUCCESS; } =20 -/* =20 - * Input Arguments:=20 - * device private variable. - * Return Value:=20 - * NONE. +/** + * free_rx_buffers - Frees all Rx buffers =20 + * @sp: device private variable. * Description:=20 * This function will free all Rx buffers allocated by host. + * Return Value: + * NONE. */ -static void freeRxBuffers(struct s2io_nic *sp) + +static void free_rx_buffers(struct s2io_nic *sp) { struct net_device *dev =3D sp->dev; int i, j, blk =3D 0, off, buf_cnt =3D 0; @@ -1470,8 +1512,8 @@ mac_control =3D &sp->mac_control; config =3D &sp->config; =20 - for (i =3D 0; i < config->RxRingNum; i++) { - for (j =3D 0, blk =3D 0; j < config->RxCfg[i].NumRxd; j++) { + for (i =3D 0; i < config->rx_ring_num; i++) { + for (j =3D 0, blk =3D 0; j < config->rx_cfg[i].num_rxd; j++) { off =3D j % (MAX_RXDS_PER_BLOCK + 1); rxdp =3D sp->rx_blocks[i][blk].block_virt_addr + off; =20 @@ -1510,18 +1552,19 @@ } } =20 -/* - * Input Argument:=20 - * dev - pointer to the device structure. - * budget - The number of packets that were budgeted to be processed = during - * one pass through the 'Poll" function. - * Return value: - * 0 on success and 1 if there are No Rx packets to be processed. - * Description: - * Comes into picture only if NAPI support has been incorporated. It = does - * the same thing that rxIntrHandler does, but not in a interrupt = context - * also It will process only a given number of packets. +/** + * s2io_poll - Rx interrupt handler for NAPI support + * @dev : pointer to the device structure. + * @budget : The number of packets that were budgeted to be processed=20 + * during one pass through the 'Poll" function. + * Description: + * Comes into picture only if NAPI support has been incorporated. It = does + * the same thing that rx_intr_handler does, but not in a interrupt = context + * also It will process only a given number of packets. + * Return value: + * 0 on success and 1 if there are No Rx packets to be processed. */ + #ifdef CONFIG_S2IO_NAPI static int s2io_poll(struct net_device *dev, int *budget) { @@ -1546,7 +1589,7 @@ val64 =3D readq(&bar0->rx_traffic_int); writeq(val64, &bar0->rx_traffic_int); =20 - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { if (--pkts_to_process < 0) { goto no_rx; } @@ -1589,7 +1632,7 @@ HEADER_802_2_SIZE + HEADER_SNAP_SIZE, PCI_DMA_FROMDEVICE); - rxOsmHandler(nic, val16, rxdp, i); + rx_osm_handler(nic, val16, rxdp, i); pkt_cnt++; offset_info.offset++; offset_info.offset %=3D (MAX_RXDS_PER_BLOCK + 1); @@ -1603,38 +1646,39 @@ if (!pkt_cnt) pkt_cnt =3D 1; =20 - for (i =3D 0; i < config->RxRingNum; i++) + for (i =3D 0; i < config->rx_ring_num; i++) fill_rx_buffers(nic, i); =20 dev->quota -=3D pkt_cnt; *budget -=3D pkt_cnt; netif_rx_complete(dev); =20 -/* Re enable the Rx interrupts. */ - en_dis_able_NicIntrs(nic, RX_TRAFFIC_INTR, ENABLE_INTRS); + /* Re enable the Rx interrupts. */ + en_dis_able_nic_intrs(nic, RX_TRAFFIC_INTR, ENABLE_INTRS); return 0; =20 no_rx: - for (i =3D 0; i < config->RxRingNum; i++) + for (i =3D 0; i < config->rx_ring_num; i++) fill_rx_buffers(nic, i); dev->quota -=3D pkt_cnt; *budget -=3D pkt_cnt; return 1; } #else -/* =20 - * Input Arguments:=20 - * device private variable. - * Return Value:=20 - * NONE. +/** =20 + * rx_intr_handler - Rx interrupt handler + * @nic: device private variable. * Description:=20 - * If the interrupt is because of a received frame or if the=20 - * receive ring contains fresh as yet un-processed frames, this = function is + * If the interrupt is because of a received frame or if the=20 + * receive ring contains fresh as yet un-processed frames,this = function is * called. It picks out the RxD at which place the last Rx processing = had=20 * stopped and sends the skb to the OSM's Rx handler and then = increments=20 * the offset. + * Return Value: + * NONE. */ -static void rxIntrHandler(struct s2io_nic *nic) + +static void rx_intr_handler(struct s2io_nic *nic) { struct net_device *dev =3D (struct net_device *) nic->dev; XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; @@ -1643,24 +1687,21 @@ struct sk_buff *skb; u16 val16, cksum; register u64 val64 =3D 0; - int i, block_no; + int i, block_no, pkt_cnt =3D 0; mac_info_t *mac_control; struct config_param *config; =20 mac_control =3D &nic->mac_control; config =3D &nic->config; =20 -#if DEBUG_ON - nic->rxint_cnt++; -#endif - -/* rx_traffic_int reg is an R1 register, hence we read and write back=20 - * the samevalue in the register to clear it. - */ + /*=20 + * rx_traffic_int reg is an R1 register, hence we read and write back=20 + * the samevalue in the register to clear it. + */ val64 =3D readq(&bar0->rx_traffic_int); writeq(val64, &bar0->rx_traffic_int); =20 - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { offset_info =3D mac_control->rx_curr_get_info[i]; block_no =3D offset_info.block_index; rxdp =3D nic->rx_blocks[i][block_no].block_virt_addr + @@ -1698,7 +1739,7 @@ HEADER_802_2_SIZE + HEADER_SNAP_SIZE, PCI_DMA_FROMDEVICE); - rxOsmHandler(nic, val16, rxdp, i); + rx_osm_handler(nic, val16, rxdp, i); offset_info.offset++; offset_info.offset %=3D (MAX_RXDS_PER_BLOCK + 1); rxdp =3D @@ -1706,23 +1747,24 @@ offset_info.offset; mac_control->rx_curr_get_info[i].offset =3D offset_info.offset; + pkt_cnt++; } } } #endif - -/* =20 - * Input Arguments:=20 - * device private variable - * Return Value:=20 - * NONE +/** =20 + * tx_intr_handler - Transmit interrupt handler + * @nic : device private variable * Description:=20 * If an interrupt was raised to indicate DMA complete of the=20 - * Tx packet, this function is called. It identifies the last TxD = whose buffer - * was freed and frees all skbs whose data have already DMA'ed into = the NICs - * internal memory. + * Tx packet, this function is called. It identifies the last TxD=20 + * whose buffer was freed and frees all skbs whose data have already=20 + * DMA'ed into the NICs internal memory. + * Return Value: + * NONE */ -static void txIntrHandler(struct s2io_nic *nic) + +static void tx_intr_handler(struct s2io_nic *nic) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; struct net_device *dev =3D (struct net_device *) nic->dev; @@ -1734,25 +1776,22 @@ u16 j, frg_cnt; mac_info_t *mac_control; struct config_param *config; -#if DEBUG_ON - int cnt =3D 0; - nic->txint_cnt++; -#endif =20 mac_control =3D &nic->mac_control; config =3D &nic->config; =20 - /* tx_traffic_int reg is an R1 register, hence we read and write=20 + /*=20 + * tx_traffic_int reg is an R1 register, hence we read and write=20 * back the samevalue in the register to clear it. */ val64 =3D readq(&bar0->tx_traffic_int); writeq(val64, &bar0->tx_traffic_int); =20 - for (i =3D 0; i < config->TxFIFONum; i++) { + for (i =3D 0; i < config->tx_fifo_num; i++) { offset_info =3D mac_control->tx_curr_get_info[i]; offset_info1 =3D mac_control->tx_curr_put_info[i]; txdlp =3D mac_control->txdl_start[i] + - (config->MaxTxDs * offset_info.offset); + (config->max_txds * offset_info.offset); while ((!(txdlp->Control_1 & TXD_LIST_OWN_XENA)) && (offset_info.offset !=3D offset_info1.offset) && (txdlp->Host_Control)) { @@ -1797,28 +1836,20 @@ txdlp =3D temp; } memset(txdlp, 0, - (sizeof(TxD_t) * config->MaxTxDs)); + (sizeof(TxD_t) * config->max_txds)); =20 /* Updating the statistics block */ nic->stats.tx_packets++; nic->stats.tx_bytes +=3D skb->len; -#if DEBUG_ON - nic->txpkt_bytes +=3D skb->len; - cnt++; -#endif dev_kfree_skb_irq(skb); =20 offset_info.offset++; offset_info.offset %=3D offset_info.fifo_len + 1; txdlp =3D mac_control->txdl_start[i] + - (config->MaxTxDs * offset_info.offset); + (config->max_txds * offset_info.offset); mac_control->tx_curr_get_info[i].offset =3D offset_info.offset; } -#if DEBUG_ON - DBG_PRINT(INTR_DBG, "%s: freed %d Tx Pkts\n", dev->name, - cnt); -#endif } =20 spin_lock(&nic->tx_lock); @@ -1827,55 +1858,53 @@ spin_unlock(&nic->tx_lock); } =20 -/* =20 - * Input Arguments:=20 - * device private variable - * Return Value:=20 +/** =20 + * alarm_intr_handler - Alarm Interrrupt handler + * @nic: device private variable + * Description: If the interrupt was neither because of Rx packet or = Tx=20 + * complete, this function is called. If the interrupt was to indicate + * a loss of link, the OSM link status handler is invoked for any = other=20 + * alarm interrupt the block that raised the interrupt is displayed=20 + * and a H/W reset is issued. + * Return Value: * NONE - * Description:=20 - * If the interrupt was neither because of Rx packet or Tx=20 - * complete, this function is called. If the interrupt was to indicate = a loss - * of link, the OSM link status handler is invoked for any other alarm = - * interrupt the block that raised the interrupt is displayed and a = H/W reset=20 - * is issued. - */ -static void alarmIntrHandler(struct s2io_nic *nic) +*/ + +static void alarm_intr_handler(struct s2io_nic *nic) { struct net_device *dev =3D (struct net_device *) nic->dev; XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; register u64 val64 =3D 0, err_reg =3D 0; =20 - /* Handling link status change error Intr */ err_reg =3D readq(&bar0->mac_rmac_err_reg); if (err_reg & RMAC_LINK_STATE_CHANGE_INT) { schedule_work(&nic->set_link_task); } =20 - /* Handling SERR errors by stopping device Xmit queue and forcing=20 - * a H/W reset. - */ + /* In case of a serious error, the device will be Reset. */ val64 =3D readq(&bar0->serr_source); if (val64 & SERR_SOURCE_ANY) { DBG_PRINT(ERR_DBG, "%s: Device indicates ", dev->name); DBG_PRINT(ERR_DBG, "serious error!!\n"); netif_stop_queue(dev); } -/* Other type of interrupts are not being handled now, TODO*/ + + /* Other type of interrupts are not being handled now, TODO */ } =20 -/* - * Input Argument:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. +/**=20 + * wait_for_cmd_complete - waits for a command to complete. + * @sp : private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * Description: Function that waits for a command to Write into RMAC=20 + * ADDR DATA registers to be completed and returns either success or=20 + * error depending on whether the command was complete or not.=20 * Return value: * SUCCESS on success and FAILURE on failure. - * Description: - * Function that waits for a command to Write into RMAC ADDR DATA = registers=20 - * to be completed and returns either success or error depending on = whether=20 - * the command was complete or not.=20 */ -int waitForCmdComplete(nic_t * sp) + +int wait_for_cmd_complete(nic_t * sp) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; int ret =3D FAILURE, cnt =3D 0; @@ -1900,17 +1929,16 @@ return ret; } =20 -/* - * Input Argument:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. +/**=20 + * s2io_reset - Resets the card.=20 + * @sp : private member of the device structure. + * Description: Function to Reset the card. This function then also + * restores the previously saved PCI configuration space registers as=20 + * the card reset also resets the configuration space. * Return value: - * void. - * Description: - * Function to Reset the card. This function then also restores the = previously - * saved PCI configuration space registers as the card reset also = resets the - * Configration space. + * void. */ + void s2io_reset(nic_t * sp) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; @@ -1920,7 +1948,8 @@ val64 =3D SW_RESET_ALL; writeq(val64, &bar0->sw_reset); =20 - /* At this stage, if the PCI write is indeed completed, the=20 + /*=20 + * At this stage, if the PCI write is indeed completed, the=20 * card is reset and so is the PCI Config space of the device.=20 * So a read cannot be issued at this stage on any of the=20 * registers to ensure the write into "sw_reset" register @@ -1954,29 +1983,31 @@ sp->device_enabled_once =3D FALSE; } =20 -/* - * Input Argument:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. +/** + * s2io_set_swapper - to set the swapper controle on the card=20 + * @sp : private member of the device structure,=20 + * pointer to the s2io_nic structure. + * Description: Function to set the swapper control on the card=20 + * correctly depending on the 'endianness' of the system. * Return value: * SUCCESS on success and FAILURE on failure. - * Description: - * Function to set the swapper control on the card correctly depending = on the - * 'endianness' of the system. */ + int s2io_set_swapper(nic_t * sp) { struct net_device *dev =3D sp->dev; XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; u64 val64; =20 -/* Set proper endian settings and verify the same by reading the PIF=20 - * Feed-back register. - */ + /*=20 + * Set proper endian settings and verify the same by reading + * the PIF Feed-back register. + */ #ifdef __BIG_ENDIAN -/* The device by default set to a big endian format, so a big endian=20 - * driver need not set anything. - */ + /*=20 + * The device by default set to a big endian format, so a=20 + * big endian driver need not set anything. + */ writeq(0xffffffffffffffffULL, &bar0->swapper_ctrl); val64 =3D (SWAPPER_CTRL_PIF_R_FE | SWAPPER_CTRL_PIF_R_SE | @@ -1995,9 +2026,11 @@ SWAPPER_CTRL_STATS_FE | SWAPPER_CTRL_STATS_SE); writeq(val64, &bar0->swapper_ctrl); #else -/* Initially we enable all bits to make it accessible by the driver, - * then we selectively enable only those bits that we want to set. - */ + /*=20 + * Initially we enable all bits to make it accessible by the + * driver, then we selectively enable only those bits that=20 + * we want to set. + */ writeq(0xffffffffffffffffULL, &bar0->swapper_ctrl); val64 =3D (SWAPPER_CTRL_PIF_R_FE | SWAPPER_CTRL_PIF_R_SE | @@ -2021,9 +2054,10 @@ writeq(val64, &bar0->swapper_ctrl); #endif =20 -/* Verifying if endian settings are accurate by reading a feedback - * register. - */ + /*=20 + * Verifying if endian settings are accurate by reading a=20 + * feedback register. + */ val64 =3D readq(&bar0->pif_rd_swapper_fb); if (val64 !=3D 0x0123456789ABCDEFULL) { /* Endian settings are incorrect, calls for another dekko. */ @@ -2041,17 +2075,18 @@ * Functions defined below concern the OS part of the driver * * ********************************************************* */ =20 -/* - * Input Argument:=20 - * dev - pointer to the device structure. - * Return value: - * '0' on success and an appropriate (-)ve integer as defined in = errno.h - * file on failure. +/** =20 + * s2io-open - open entry point of the driver + * @dev : pointer to the device structure. * Description: * This function is the open entry point of the driver. It mainly = calls a * function to allocate Rx buffers and inserts them into the buffer * descriptors and then enables the Rx part of the NIC.=20 + * Return value: + * 0 on success and an appropriate (-)ve integer as defined in errno.h + * file on failure. */ + int s2io_open(struct net_device *dev) { nic_t *sp =3D dev->priv; @@ -2060,18 +2095,21 @@ struct config_param *config; =20 =20 -/* Make sure you have link off by default every time Nic is = initialized*/ + /*=20 + * Make sure you have link off by default every time=20 + * Nic is initialized + */ netif_carrier_off(dev); sp->last_link_state =3D LINK_DOWN; =20 -/* Initialize the H/W I/O registers */ - if (initNic(sp) !=3D 0) { + /* Initialize the H/W I/O registers */ + if (init_nic(sp) !=3D 0) { DBG_PRINT(ERR_DBG, "%s: H/W initialization failed\n", dev->name); return -ENODEV; } =20 -/* After proper initialization of H/W, register ISR */ + /* After proper initialization of H/W, register ISR */ err =3D request_irq((int) sp->irq, s2io_isr, SA_SHIRQ, sp->name, dev); if (err) { @@ -2087,38 +2125,39 @@ } =20 =20 -/* Setting its receive mode */ + /* Setting its receive mode */ s2io_set_multicast(dev); =20 -/* Initializing the Rx buffers. For now we are considering only 1 Rx = ring - * and initializing buffers into 1016 RxDs or 8 Rx blocks - */ + /*=20 + * Initializing the Rx buffers. For now we are considering only 1=20 + * Rx ring and initializing buffers into 1016 RxDs or 8 Rx blocks + */ mac_control =3D &sp->mac_control; config =3D &sp->config; =20 - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { if ((ret =3D fill_rx_buffers(sp, i))) { DBG_PRINT(ERR_DBG, "%s: Out of memory in Open\n", dev->name); s2io_reset(sp); free_irq(dev->irq, dev); - freeRxBuffers(sp); + free_rx_buffers(sp); return -ENOMEM; } DBG_PRINT(INFO_DBG, "Buf in ring:%d is %d:\n", i, atomic_read(&sp->rx_bufs_left[i])); } =20 -/* Enable tasklet for the device */ + /* Enable tasklet for the device */ tasklet_init(&sp->task, s2io_tasklet, (unsigned long) dev); =20 -/* Enable Rx Traffic and interrupts on the NIC */ - if (startNic(sp)) { + /* Enable Rx Traffic and interrupts on the NIC */ + if (start_nic(sp)) { DBG_PRINT(ERR_DBG, "%s: Starting NIC failed\n", dev->name); tasklet_kill(&sp->task); s2io_reset(sp); free_irq(dev->irq, dev); - freeRxBuffers(sp); + free_rx_buffers(sp); return -ENODEV; } =20 @@ -2128,18 +2167,19 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * dev - device pointer. - * Return value: - * '0' on success and an appropriate (-)ve integer as defined in = errno.h - * file on failure. +/** + * s2io_close -close entry point of the driver + * @dev : device pointer. * Description: * This is the stop entry point of the driver. It needs to undo = exactly - * whatever was done by the open entry point, thus it's usually = referred to - * as the close function. Among other things this function mainly = stops the + * whatever was done by the open entry point,thus it's usually = referred to + * as the close function.Among other things this function mainly stops = the * Rx side of the NIC and frees all the Rx buffers in the Rx rings. + * Return value: + * 0 on success and an appropriate (-)ve integer as defined in errno.h + * file on failure. */ + int s2io_close(struct net_device *dev) { nic_t *sp =3D dev->priv; @@ -2150,19 +2190,22 @@ spin_lock(&sp->isr_lock); netif_stop_queue(dev); =20 -/* disable Tx and Rx traffic on the NIC */ - stopNic(sp); + /* disable Tx and Rx traffic on the NIC */ + stop_nic(sp); =20 spin_unlock(&sp->isr_lock); =20 -/* If the device tasklet is running, wait till its done before killing = it */ + /*=20 + * If the device tasklet is running, wait till its done=20 + * before killing it=20 + */ while (atomic_read(&(sp->tasklet_status))) { set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(HZ / 10); } tasklet_kill(&sp->task); =20 -/* Check if the device is Quiescent and then Reset the NIC */ + /* Check if the device is Quiescent and then Reset the NIC */ do { val64 =3D readq(&bar0->adapter_status); if (verify_xena_quiescence(val64, sp->device_enabled_once)) { @@ -2182,32 +2225,33 @@ } while (1); s2io_reset(sp); =20 -/* Free the Registered IRQ */ + /* Free the Registered IRQ */ free_irq(dev->irq, dev); =20 -/* Free all Tx Buffers waiting for transmission */ - freeTxBuffers(sp); + /* Free all Tx Buffers waiting for transmission */ + free_tx_buffers(sp); =20 -/* Free all Rx buffers allocated by host */ - freeRxBuffers(sp); + /* Free all Rx buffers allocated by host */ + free_rx_buffers(sp); =20 sp->device_close_flag =3D TRUE; /* Device is shut down. */ =20 return 0; } =20 -/* - * Input Argument/s:=20 - * skb - the socket buffer containing the Tx data. - * dev - device pointer. - * Return value: - * '0' on success & 1 on failure.=20 - * NOTE: when device cant queue the pkt, just the trans_start variable = will - * not be upadted. - * Description: +/** + * s2io_xmit - Tx entry point of te driver + * @skb : the socket buffer containing the Tx data. + * @dev : device pointer. + * Description : * This function is the Tx entry point of the driver. S2IO NIC = supports * certain protocol assist features on Tx side, namely CSO, S/G, LSO. + * NOTE: when device cant queue the pkt,just the trans_start variable = will + * not be upadted. + * Return value: + * 0 on success & 1 on failure. */ + int s2io_xmit(struct sk_buff *skb, struct net_device *dev) { nic_t *sp =3D dev->priv; @@ -2221,6 +2265,7 @@ #endif mac_info_t *mac_control; struct config_param *config; + XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; =20 mac_control =3D &sp->mac_control; config =3D &sp->config; @@ -2232,14 +2277,14 @@ /* Multi FIFO Tx is disabled for now. */ if (!queue && tx_prio) { u8 x =3D (skb->data)[5]; - queue =3D x % config->TxFIFONum; + queue =3D x % config->tx_fifo_num; } =20 =20 off =3D (u16) mac_control->tx_curr_put_info[queue].offset; off1 =3D (u16) mac_control->tx_curr_get_info[queue].offset; - txd_len =3D mac_control->txdl_len; - txdp =3D mac_control->txdl_start[queue] + (config->MaxTxDs * off); + txd_len =3D config->max_txds; + txdp =3D mac_control->txdl_start[queue] + (config->max_txds * off); =20 queue_len =3D mac_control->tx_curr_put_info[queue].fifo_len + 1; /* Avoid "put" pointer going beyond "get" pointer */ @@ -2250,7 +2295,6 @@ spin_unlock_irqrestore(&sp->tx_lock, flags); return 0; } - #ifdef NETIF_F_TSO mss =3D skb_shinfo(skb)->tso_size; if (mss) { @@ -2271,7 +2315,7 @@ TXD_TX_CKO_UDP_EN); } =20 - txdp->Control_2 |=3D config->TxIntrType; + txdp->Control_2 |=3D config->tx_intr_type; =20 txdp->Control_1 |=3D (TXD_BUFFER0_SIZE(frg_len) | TXD_GATHER_CODE_FIRST); @@ -2301,15 +2345,18 @@ #endif writeq(val64, &tx_fifo->List_Control); =20 + /* Perform a PCI read to flush previous writes */ + val64 =3D readq(&bar0->general_int_status); + off++; off %=3D mac_control->tx_curr_put_info[queue].fifo_len + 1; mac_control->tx_curr_put_info[queue].offset =3D off; =20 /* Avoid "put" pointer going beyond "get" pointer */ if (((off + 1) % queue_len) =3D=3D off1) { - DBG_PRINT(TX_DBG,=20 - "No free TxDs for xmit, Put: 0x%x Get:0x%x\n", - off, off1); + DBG_PRINT(TX_DBG, + "No free TxDs for xmit, Put: 0x%x Get:0x%x\n", + off, off1); netif_stop_queue(dev); } =20 @@ -2319,21 +2366,20 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * irq: the irq of the device. - * dev_id: a void pointer to the dev structure of the NIC. - * ptregs: pointer to the registers pushed on the stack. +/** + * s2io_isr - ISR handler of the device . + * @irq: the irq of the device. + * @dev_id: a void pointer to the dev structure of the NIC. + * @pt_regs: pointer to the registers pushed on the stack. + * Description: This function is the ISR handler of the device. It=20 + * identifies the reason for the interrupt and calls the relevant=20 + * service routines. As a contongency measure, this ISR allocates the=20 + * recv buffers, if their numbers are below the panic value which is + * presently set to 25% of the original number of rcv buffers = allocated. * Return value: - * void. - * Description: - * This function is the ISR handler of the device. It identifies the = reason=20 - * for the interrupt and calls the relevant service routines. - * As a contongency measure, this ISR allocates the recv buffers, if = their=20 - * numbers are below the panic value which is presently set to 25% of = the - * original number of rcv buffers allocated. + * IRQ_HANDLED: will be returned if IRQ was handled by this routine=20 + * IRQ_NONE: will be returned if interrupt is not from our device */ - static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs = *regs) { struct net_device *dev =3D (struct net_device *) dev_id; @@ -2348,7 +2394,8 @@ =20 spin_lock(&sp->isr_lock); =20 - /* Identify the cause for interrupt and call the appropriate + /*=20 + * Identify the cause for interrupt and call the appropriate * interrupt handler. Causes for the interrupt could be; * 1. Rx of packet. * 2. Tx complete. @@ -2362,30 +2409,28 @@ spin_unlock(&sp->isr_lock); return IRQ_NONE; } - /* Mask the interrupts on the NIC */ + + /* Mask the Interrupts on the NIC. */ general_mask =3D readq(&bar0->general_int_mask); writeq(0xFFFFFFFFFFFFFFFFULL, &bar0->general_int_mask); =20 -#if DEBUG_ON - sp->int_cnt++; -#endif - /* If Intr is because of Tx Traffic */ if (reason & GEN_INTR_TXTRAFFIC) { - txIntrHandler(sp); + tx_intr_handler(sp); } =20 /* If Intr is because of an error */ if (reason & (GEN_ERROR_INTR)) - alarmIntrHandler(sp); + alarm_intr_handler(sp); =20 #ifdef CONFIG_S2IO_NAPI if (reason & GEN_INTR_RXTRAFFIC) { if (netif_rx_schedule_prep(dev)) { - en_dis_able_NicIntrs(sp, RX_TRAFFIC_INTR, - DISABLE_INTRS); - /* We retake the snap shot of the general interrupt=20 - * register. + en_dis_able_nic_intrs(sp, RX_TRAFFIC_INTR, + DISABLE_INTRS); + /*=20 + * Here we take a snap shot of the general=20 + * Intr Register. */ general_mask =3D readq(&bar0->general_int_mask); __netif_rx_schedule(dev); @@ -2394,66 +2439,72 @@ #else /* If Intr is because of Rx Traffic */ if (reason & GEN_INTR_RXTRAFFIC) { - rxIntrHandler(sp); + rx_intr_handler(sp); } #endif =20 -/* If the Rx buffer count is below the panic threshold then reallocate = the - * buffers from the interrupt handler itself, else schedule a tasklet = to=20 - * reallocate the buffers. - */ + /*=20 + * If the Rx buffer count is below the panic threshold then=20 + * reallocate the buffers from the interrupt handler itself,=20 + * else schedule a tasklet to reallocate the buffers. + */ #if 1 { - int i; + int i; + + for (i =3D 0; i < config->rx_ring_num; i++) { + int rxb_size =3D atomic_read(&sp->rx_bufs_left[i]); + int level =3D rx_buffer_level(sp, rxb_size, i); + + if ((level =3D=3D PANIC) && (!TASKLET_IN_USE)) { + int ret; =20 - for (i =3D 0; i < config->RxRingNum; i++) { - int rxb_size =3D atomic_read(&sp->rx_bufs_left[i]); - int level =3D rx_buffer_level(sp, rxb_size, i); - - if ((level =3D=3D PANIC) && (!TASKLET_IN_USE)) { - int ret; - - DBG_PRINT(ERR_DBG, "%s: Rx BD hit ", dev->name); - DBG_PRINT(ERR_DBG, "PANIC levels\n"); - if ((ret =3D fill_rx_buffers(sp, i)) =3D=3D -ENOMEM) { - DBG_PRINT(ERR_DBG, "%s:Out of memory", + DBG_PRINT(INTR_DBG, "%s: Rx BD hit ", dev->name); - DBG_PRINT(ERR_DBG, " in ISR!!\n"); - writeq(general_mask, - &bar0->general_int_mask); - spin_unlock(&sp->isr_lock); - return IRQ_HANDLED; + DBG_PRINT(INTR_DBG, "PANIC levels\n"); + if ((ret =3D + fill_rx_buffers(sp, i)) =3D=3D -ENOMEM) { + DBG_PRINT(ERR_DBG, + "%s:Out of memory", + dev->name); + DBG_PRINT(ERR_DBG, " in ISR!!\n"); + writeq(general_mask, + &bar0->general_int_mask); + spin_unlock(&sp->isr_lock); + return IRQ_HANDLED; + } + clear_bit(0, + (unsigned long *) (&sp-> + tasklet_status)); + } else if ((level =3D=3D LOW) + && (!atomic_read(&sp->tasklet_status))) { + tasklet_schedule(&sp->task); } - clear_bit(0, - (unsigned long *) (&sp->tasklet_status)); - } else if ((level =3D=3D LOW) - && (!atomic_read(&sp->tasklet_status))) { - tasklet_schedule(&sp->task); - } =20 - } + } =20 } #else tasklet_schedule(&sp->task); #endif =20 - /* Unmask all the previously enabled interrupts on the NIC */ + /* Unmask all previously enabled interrupts on the NIC. */ writeq(general_mask, &bar0->general_int_mask); =20 spin_unlock(&sp->isr_lock); return IRQ_HANDLED; } =20 -/* - * Input Argument/s:=20 - * dev - pointer to the device structure. - * Return value: - * pointer to the updated net_device_stats structure. +/** + * s2io_get_stats - Updates the device statistics structure.=20 + * @dev : pointer to the device structure. * Description: * This function updates the device statistics structure in the = s2io_nic=20 * structure and returns a pointer to the same. + * Return value: + * pointer to the updated net_device_stats structure. */ + struct net_device_stats *s2io_get_stats(struct net_device *dev) { nic_t *sp =3D dev->priv; @@ -2463,27 +2514,28 @@ mac_control =3D &sp->mac_control; config =3D &sp->config; =20 - sp->stats.tx_errors =3D mac_control->StatsInfo->tmac_any_err_frms; - sp->stats.rx_errors =3D mac_control->StatsInfo->rmac_drop_frms; - sp->stats.multicast =3D mac_control->StatsInfo->rmac_vld_mcst_frms; + sp->stats.tx_errors =3D mac_control->stats_info->tmac_any_err_frms; + sp->stats.rx_errors =3D mac_control->stats_info->rmac_drop_frms; + sp->stats.multicast =3D mac_control->stats_info->rmac_vld_mcst_frms; sp->stats.rx_length_errors =3D - mac_control->StatsInfo->rmac_long_frms; + mac_control->stats_info->rmac_long_frms; =20 return (&sp->stats); } =20 -/* - * Input Argument/s:=20 - * dev - pointer to the device structure - * Return value: - * void. +/** + * s2io_set_multicast - entry point for multicast address = enable/disable. + * @dev : pointer to the device structure * Description: * This function is a driver entry point which gets called by the = kernel=20 * whenever multicast addresses must be enabled/disabled. This also = gets=20 * called to set/reset promiscuous mode. Depending on the deivce flag, = we * determine, if multicast address must be enabled or if promiscuous = mode * is to be disabled etc. + * Return value: + * void. */ + static void s2io_set_multicast(struct net_device *dev) { int i, j, prev_cnt; @@ -2506,7 +2558,7 @@ RMAC_ADDR_CMD_MEM_OFFSET(MAC_MC_ALL_MC_ADDR_OFFSET); writeq(val64, &bar0->rmac_addr_cmd_mem); /* Wait till command completes */ - waitForCmdComplete(sp); + wait_for_cmd_complete(sp); =20 sp->m_cast_flg =3D 1; sp->all_multi_pos =3D MAC_MC_ALL_MC_ADDR_OFFSET; @@ -2519,7 +2571,7 @@ RMAC_ADDR_CMD_MEM_OFFSET(sp->all_multi_pos); writeq(val64, &bar0->rmac_addr_cmd_mem); /* Wait till command completes */ - waitForCmdComplete(sp); + wait_for_cmd_complete(sp); =20 sp->m_cast_flg =3D 0; sp->all_multi_pos =3D 0; @@ -2582,7 +2634,7 @@ writeq(val64, &bar0->rmac_addr_cmd_mem); =20 /* Wait for command completes */ - if (waitForCmdComplete(sp)) { + if (wait_for_cmd_complete(sp)) { DBG_PRINT(ERR_DBG, "%s: Adding ", dev->name); DBG_PRINT(ERR_DBG, "Multicasts failed\n"); @@ -2609,7 +2661,7 @@ writeq(val64, &bar0->rmac_addr_cmd_mem); =20 /* Wait for command completes */ - if (waitForCmdComplete(sp)) { + if (wait_for_cmd_complete(sp)) { DBG_PRINT(ERR_DBG, "%s: Adding ", dev->name); DBG_PRINT(ERR_DBG, "Multicasts failed\n"); @@ -2619,17 +2671,16 @@ } } =20 -/* - * Input Argument/s:=20 - * dev - pointer to the device structure. - * new_mac - a uchar pointer to the new mac address which is to be = set. - * Return value: - * SUCCESS on success and an appropriate (-)ve integer as defined in = errno.h - * file on failure. - * Description: - * This procedure will program the Xframe to receive frames with new - * Mac Address +/** + * s2io_set_mac_addr - Programs the Xframe mac address=20 + * @dev : pointer to the device structure. + * @addr: a uchar pointer to the new mac address which is to be set. + * Description : This procedure will program the Xframe to receive=20 + * frames with new Mac Address + * Return value: SUCCESS on success and an appropriate (-)ve integer=20 + * as defined in errno.h file on failure. */ + int s2io_set_mac_addr(struct net_device *dev, u8 * addr) { nic_t *sp =3D dev->priv; @@ -2655,7 +2706,7 @@ RMAC_ADDR_CMD_MEM_OFFSET(0); writeq(val64, &bar0->rmac_addr_cmd_mem); /* Wait till command completes */ - if (waitForCmdComplete(sp)) { + if (wait_for_cmd_complete(sp)) { DBG_PRINT(ERR_DBG, "%s: set_mac_addr failed\n", dev->name); return FAILURE; } @@ -2663,18 +2714,18 @@ return SUCCESS; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * info - pointer to the structure with parameters given by ethtool to = set - * link information. - * Return value: - * 0 on success. +/** + * s2io_ethtool_sset - Sets different link parameters.=20 + * @sp : private member of the device structure, which is a pointer to = the * s2io_nic structure. + * @info: pointer to the structure with parameters given by ethtool to = set + * link information. * Description: - * The function sets different link parameters provided by the user = onto=20 - * the NIC. - */ + * The function sets different link parameters provided by the user = onto=20 + * the NIC. + * Return value: + * 0 on success. +*/ + static int s2io_ethtool_sset(struct net_device *dev, struct ethtool_cmd *info) { @@ -2690,17 +2741,18 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * info - pointer to the structure with parameters given by ethtool to = return - * link information. - * Return value: - * void +/** + * s2io_ethtol_gset - Return link specific information.=20 + * @sp : private member of the device structure, pointer to the + * s2io_nic structure. + * @info : pointer to the structure with parameters given by ethtool + * to return link information. * Description: - * Returns link specefic information like speed, duplex etc.. to = ethtool. + * Returns link specific information like speed, duplex etc.. to = ethtool. + * Return value : + * return 0 on success. */ + int s2io_ethtool_gset(struct net_device *dev, struct ethtool_cmd *info) { nic_t *sp =3D dev->priv; @@ -2721,17 +2773,18 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * info - pointer to the structure with parameters given by ethtool to = return - * driver information. +/** + * s2io_ethtool_gdrvinfo - Returns driver specific information.=20 + * @sp : private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * @info : pointer to the structure with parameters given by ethtool to + * return driver information. + * Description: + * Returns driver specefic information like name, version etc.. to = ethtool. * Return value: * void - * Description: - * Returns driver specefic information like name, version etc.. to = ethtool. */ + static void s2io_ethtool_gdrvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { @@ -2748,19 +2801,20 @@ info->n_stats =3D S2IO_STAT_LEN; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * regs - pointer to the structure with parameters given by ethtool = for=20 +/** + * s2io_ethtool_gregs - dumps the entire space of Xfame into the = buffer. + * @sp: private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * @regs : pointer to the structure with parameters given by ethtool = for=20 * dumping the registers. - * reg_space - The input argumnet into which all the registers are = dumped. - * Return value: - * void - * Description: - * Dumps the entire register space of xFrame NIC into the user given = buffer=20 - * area. - */ + * @reg_space: The input argumnet into which all the registers are = dumped. + * Description: + * Dumps the entire register space of xFrame NIC into the user given + * buffer area. + * Return value : + * void . +*/ + static void s2io_ethtool_gregs(struct net_device *dev, struct ethtool_regs *regs, void *space) { @@ -2778,17 +2832,15 @@ } } =20 -/* - * Input Argument/s:=20 - * data - address of the private member of the device structure, which = +/** + * s2io_phy_id - timer function that alternates adapter LED. + * @data : address of the private member of the device structure, = which=20 * is a pointer to the s2io_nic structure, provided as an u32. - * Return value: - * void - * Description: - * This is actually the timer function that alternates the adapter LED = bit - * of the adapter control bit to set/reset every time on invocation. - * The timer is set for 1/2 a second, hence tha NIC blinks once every = second. - */ + * Description: This is actually the timer function that alternates the = + * adapter LED bit of the adapter control bit to set/reset every time = on=20 + * invocation. The timer is set for 1/2 a second, hence tha NIC blinks=20 + * once every second. +*/ static void s2io_phy_id(unsigned long data) { nic_t *sp =3D (nic_t *) data; @@ -2810,20 +2862,21 @@ mod_timer(&sp->id_timer, jiffies + HZ / 2); } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * id - pointer to the structure with identification parameters given = by=20 - * ethtool. +/** + * s2io_ethtool_idnic - To physically identify the nic on the system. + * @sp : private member of the device structure, which is a pointer to = the + * s2io_nic structure. + * @id : pointer to the structure with identification parameters given = by=20 + * ethtool. + * Description: Used to physically identify the NIC on the system. + * The Link LED will blink for a time specified by the user for=20 + * identification. + * NOTE: The Link has to be Up to be able to blink the LED. Hence=20 + * identification is possible only if it's link is up. * Return value: - * int , returns '0' on success - * Description: - * Used to physically identify the NIC on the system. The Link LED = will blink - * for a time specified by the user for identification. - * NOTE: The Link has to be Up to be able to blink the LED. Hence=20 - * identification is possible only if it's link is up. + * int , returns 0 on success */ + static int s2io_ethtool_idnic(struct net_device *dev, u32 data) { u64 val64 =3D 0; @@ -2856,15 +2909,14 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * ep - pointer to the structure with pause parameters given by = ethtool. +/** + * s2io_ethtool_getpause_data -Pause frame frame generation and = reception. + * @sp : private member of the device structure, which is a pointer to = the * s2io_nic structure. + * @ep : pointer to the structure with pause parameters given by = ethtool. + * Description: + * Returns the Pause frame generation and reception capability of the = NIC. * Return value: * void - * Description: - * Returns the Pause frame generation and reception capability of the = NIC. */ static void s2io_ethtool_getpause_data(struct net_device *dev, struct ethtool_pauseparam *ep) @@ -2881,17 +2933,18 @@ ep->autoneg =3D FALSE; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * ep - pointer to the structure with pause parameters given by = ethtool. - * Return value: - * int, returns '0' on Success +/** + * s2io_ethtool-setpause_data - set/reset pause frame generation. + * @sp : private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * @ep : pointer to the structure with pause parameters given by = ethtool. * Description: - * It can be used to set or reset Pause frame generation or reception = support=20 - * of the NIC. + * It can be used to set or reset Pause frame generation or reception + * support of the NIC. + * Return value: + * int, returns 0 on Success */ + int s2io_ethtool_setpause_data(struct net_device *dev, struct ethtool_pauseparam *ep) { @@ -2912,21 +2965,24 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * off - offset at which the data must be written - * Return value: - * -1 on failure and the value read from the Eeprom if successful. +/** + * read_eeprom - reads 4 bytes of data from user given offset. + * @sp : private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * @off : offset at which the data must be written + * @data : Its an output parameter where the data read at the given + * offset is stored. * Description: - * Will read 4 bytes of data from the user given offset and return the = - * read data. + * Will read 4 bytes of data from the user given offset and return the=20 + * read data. * NOTE: Will allow to read only part of the EEPROM visible through the - * I2C bus. + * I2C bus. + * Return value: + * -1 on failure and 0 on success. */ + #define S2IO_DEV_ID 5 -static u32 readEeprom(nic_t * sp, int off) +static u32 read_eeprom(nic_t * sp, int off) { u32 data =3D -1, exit_cnt =3D 0; u64 val64; @@ -2951,21 +3007,22 @@ return data; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * off - offset at which the data must be written - * data - The data that is to be written - * cnt - Number of bytes of the data that are actually to be written = into=20 +/** + * write_eeprom - actually writes the relevant part of the data value. + * @sp : private member of the device structure, which is a pointer to = the + * s2io_nic structure. + * @off : offset at which the data must be written + * @data : The data that is to be written + * @cnt : Number of bytes of the data that are actually to be written = into=20 * the Eeprom. (max of 3) - * Return value: - * '0' on success, -1 on failure. * Description: * Actually writes the relevant part of the data value into the Eeprom * through the I2C bus. + * Return value: + * 0 on success, -1 on failure. */ -static int writeEeprom(nic_t * sp, int off, u32 data, int cnt) + +static int write_eeprom(nic_t * sp, int off, u32 data, int cnt) { int exit_cnt =3D 0, ret =3D -1; u64 val64; @@ -2991,39 +3048,19 @@ return ret; } =20 -/*=20 - * A helper function used to invert the 4 byte u32 data field - * byte by byte. This will be used by the Read Eeprom function - * for display purposes. - */ -u32 inv(u32 data) -{ - static u32 ret =3D 0; - - if (data) { - u8 c =3D data; - ret =3D ((ret << 8) + c); - data >>=3D 8; - inv(data); - } - - return ret; -} - -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * eeprom - pointer to the user level structure provided by ethtool,=20 - * containing all relevant information. - * data_buf - user defined value to be written into Eeprom. - * Return value: - * int '0' on success - * Description: - * Reads the values stored in the Eeprom at given offset for a given = length. - * Stores these values int the input argument data buffer 'data_buf' = and - * returns these to the caller (ethtool.) +/** + * s2io_ethtool_geeprom - reads the value stored in the Eeprom. + * @sp : private member of the device structure, which is a pointer to = the * s2io_nic structure. + * @eeprom : pointer to the user level structure provided by ethtool,=20 + * containing all relevant information. + * @data_buf : user defined value to be written into Eeprom. + * Description: Reads the values stored in the Eeprom at given offset + * for a given length. Stores these values int the input argument data + * buffer 'data_buf' and returns these to the caller (ethtool.) + * Return value: + * int 0 on success */ + int s2io_ethtool_geeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, u8 * data_buf) { @@ -3036,30 +3073,31 @@ eeprom->len =3D XENA_EEPROM_SPACE - eeprom->offset; =20 for (i =3D 0; i < eeprom->len; i +=3D 4) { - data =3D readEeprom(sp, eeprom->offset + i); + data =3D read_eeprom(sp, eeprom->offset + i); if (data < 0) { DBG_PRINT(ERR_DBG, "Read of EEPROM failed\n"); return -EFAULT; } - valid =3D inv(data); + valid =3D INV(data); memcpy((data_buf + i), &valid, 4); } return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * eeprom - pointer to the user level structure provided by ethtool,=20 - * containing all relevant information. - * data_buf - user defined value to be written into Eeprom. - * Return value: - * '0' on success, -EFAULT on failure. - * Description: +/** + * s2io_ethtool_seeprom - tries to write the user provided value in = Eeprom + * @sp : private member of the device structure, which is a pointer to = the + * s2io_nic structure. + * @eeprom : pointer to the user level structure provided by ethtool,=20 + * containing all relevant information. + * @data_buf ; user defined value to be written into Eeprom. + * Description: * Tries to write the user provided value in the Eeprom, at the offset * given by the user. + * Return value: + * 0 on success, -EFAULT on failure. */ + static int s2io_ethtool_seeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, u8 * data_buf) @@ -3083,7 +3121,7 @@ } else valid =3D data; =20 - if (writeEeprom(sp, (eeprom->offset + cnt), valid, 0)) { + if (write_eeprom(sp, (eeprom->offset + cnt), valid, 0)) { DBG_PRINT(ERR_DBG, "ETHTOOL_WRITE_EEPROM Err: Cannot "); DBG_PRINT(ERR_DBG, @@ -3097,19 +3135,20 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * data - variable that returns the result of each of the test = conducted by=20 - * the driver. - * Return value: - * '0' on success. +/** + * s2io_register_test - reads and writes into all clock domains.=20 + * @sp : private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * @data : variable that returns the result of each of the test = conducted b + * by the driver. * Description: - * Read and write into all clock domains. The NIC has 3 clock domains, - * see that registers in all the three regions are accessible. + * Read and write into all clock domains. The NIC has 3 clock domains, + * see that registers in all the three regions are accessible. + * Return value: + * 0 on success. */ -static int s2io_registerTest(nic_t * sp, uint64_t * data) + +static int s2io_register_test(nic_t * sp, uint64_t * data) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; u64 val64 =3D 0; @@ -3159,88 +3198,90 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * data - variable that returns the result of each of the test = conducted by=20 - * the driver. - * Return value: - * '0' on success. +/** + * s2io_eeprom_test - to verify that EEprom in the xena can be = programmed.=20 + * @sp : private member of the device structure, which is a pointer to = the + * s2io_nic structure. + * @data:variable that returns the result of each of the test conducted = by + * the driver. * Description: - * Verify that EEPROM in the xena can be programmed using I2C_CONTROL=20 - * register. + * Verify that EEPROM in the xena can be programmed using I2C_CONTROL=20 + * register. + * Return value: + * 0 on success. */ -static int s2io_eepromTest(nic_t * sp, uint64_t * data) + +static int s2io_eeprom_test(nic_t * sp, uint64_t * data) { int fail =3D 0, ret_data; =20 /* Test Write Error at offset 0 */ - if (!writeEeprom(sp, 0, 0, 3)) + if (!write_eeprom(sp, 0, 0, 3)) fail =3D 1; =20 /* Test Write at offset 4f0 */ - if (writeEeprom(sp, 0x4F0, 0x01234567, 3)) + if (write_eeprom(sp, 0x4F0, 0x01234567, 3)) fail =3D 1; - if ((ret_data =3D readEeprom(sp, 0x4f0)) < 0) + if ((ret_data =3D read_eeprom(sp, 0x4F0)) < 0) fail =3D 1; =20 if (ret_data !=3D 0x01234567) fail =3D 1; =20 /* Reset the EEPROM data go FFFF */ - writeEeprom(sp, 0x4F0, 0xFFFFFFFF, 3); + write_eeprom(sp, 0x4F0, 0xFFFFFFFF, 3); =20 /* Test Write Request Error at offset 0x7c */ - if (!writeEeprom(sp, 0x07C, 0, 3)) + if (!write_eeprom(sp, 0x07C, 0, 3)) fail =3D 1; =20 /* Test Write Request at offset 0x7fc */ - if (writeEeprom(sp, 0x7FC, 0x01234567, 3)) + if (write_eeprom(sp, 0x7FC, 0x01234567, 3)) fail =3D 1; - if ((ret_data =3D readEeprom(sp, 0x7FC)) < 0) + if ((ret_data =3D read_eeprom(sp, 0x7FC)) < 0) fail =3D 1; =20 if (ret_data !=3D 0x01234567) fail =3D 1; =20 /* Reset the EEPROM data go FFFF */ - writeEeprom(sp, 0x7FC, 0xFFFFFFFF, 3); + write_eeprom(sp, 0x7FC, 0xFFFFFFFF, 3); =20 /* Test Write Error at offset 0x80 */ - if (!writeEeprom(sp, 0x080, 0, 3)) + if (!write_eeprom(sp, 0x080, 0, 3)) fail =3D 1; =20 /* Test Write Error at offset 0xfc */ - if (!writeEeprom(sp, 0x0FC, 0, 3)) + if (!write_eeprom(sp, 0x0FC, 0, 3)) fail =3D 1; =20 /* Test Write Error at offset 0x100 */ - if (!writeEeprom(sp, 0x100, 0, 3)) + if (!write_eeprom(sp, 0x100, 0, 3)) fail =3D 1; =20 /* Test Write Error at offset 4ec */ - if (!writeEeprom(sp, 0x4EC, 0, 3)) + if (!write_eeprom(sp, 0x4EC, 0, 3)) fail =3D 1; =20 *data =3D fail; return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * data - variable that returns the result of each of the test = conducted by=20 - * the driver. - * Return value: - * '0' on success and -1 on failure. +/** + * s2io_bist_test - invokes the MemBist test of the card . + * @sp : private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * @data:variable that returns the result of each of the test conducted = by=20 + * the driver. * Description: - * This invokes the MemBist test of the card. We give around - * 2 secs time for the Test to complete. If it's still not complete - * within this peiod, we consider that the test failed.=20 + * This invokes the MemBist test of the card. We give around + * 2 secs time for the Test to complete. If it's still not complete + * within this peiod, we consider that the test failed.=20 + * Return value: + * 0 on success and -1 on failure. */ -static int s2io_bistTest(nic_t * sp, uint64_t * data) + +static int s2io_bist_test(nic_t * sp, uint64_t * data) { u8 bist =3D 0; int cnt =3D 0, ret =3D -1; @@ -3264,19 +3305,20 @@ return ret; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * data - variable that returns the result of each of the test = conducted by=20 - * the driver. - * Return value: - * '0' on success. +/** + * s2io-link_test - verifies the link state of the nic =20 + * @sp ; private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * @data: variable that returns the result of each of the test = conducted by + * the driver. * Description: - * The function verifies the link state of the NIC and updates the = input=20 - * argument 'data' appropriately. + * The function verifies the link state of the NIC and updates the = input=20 + * argument 'data' appropriately. + * Return value: + * 0 on success. */ -static int s2io_linkTest(nic_t * sp, uint64_t * data) + +static int s2io_link_test(nic_t * sp, uint64_t * data) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; u64 val64; @@ -3288,19 +3330,20 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * data - variable that returns the result of each of the test = conducted by=20 - * the driver. - * Return value: - * '0' on success. +/** + * s2io_rldram_test - offline test for access to the RldRam chip on the = NIC=20 + * @sp - private member of the device structure, which is a pointer to = the =20 + * s2io_nic structure. + * @data - variable that returns the result of each of the test=20 + * conducted by the driver. * Description: * This is one of the offline test that tests the read and write=20 * access to the RldRam chip on the NIC. + * Return value: + * 0 on success. */ -static int s2io_rldramTest(nic_t * sp, uint64_t * data) + +static int s2io_rldram_test(nic_t * sp, uint64_t * data) { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; u64 val64; @@ -3395,20 +3438,21 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * ethtest - pointer to a ethtool command specific structure that will = be - * returned to the user. - * data - variable that returns the result of each of the test = conducted by=20 - * the driver. - * Return value: - * SUCCESS on success and an appropriate -1 on failure. +/** + * s2io_ethtool_test - conducts 6 tsets to determine the health of = card. + * @sp : private member of the device structure, which is a pointer to = the + * s2io_nic structure. + * @ethtest : pointer to a ethtool command specific structure that = will be + * returned to the user. + * @data : variable that returns the result of each of the test=20 + * conducted by the driver. * Description: * This function conducts 6 tests ( 4 offline and 2 online) to = determine - * the health of the card. + * the health of the card. + * Return value: + * void */ + static void s2io_ethtool_test(struct net_device *dev, struct ethtool_test *ethtest, uint64_t * data) @@ -3424,22 +3468,22 @@ } else s2io_set_swapper(sp); =20 - if (s2io_registerTest(sp, &data[0])) + if (s2io_register_test(sp, &data[0])) ethtest->flags |=3D ETH_TEST_FL_FAILED; =20 s2io_reset(sp); s2io_set_swapper(sp); =20 - if (s2io_rldramTest(sp, &data[3])) + if (s2io_rldram_test(sp, &data[3])) ethtest->flags |=3D ETH_TEST_FL_FAILED; =20 s2io_reset(sp); s2io_set_swapper(sp); =20 - if (s2io_eepromTest(sp, &data[1])) + if (s2io_eeprom_test(sp, &data[1])) ethtest->flags |=3D ETH_TEST_FL_FAILED; =20 - if (s2io_bistTest(sp, &data[4])) + if (s2io_bist_test(sp, &data[4])) ethtest->flags |=3D ETH_TEST_FL_FAILED; =20 if (orig_state) @@ -3459,7 +3503,7 @@ data[4] =3D -1; } =20 - if (s2io_linkTest(sp, &data[2])) + if (s2io_link_test(sp, &data[2])) ethtest->flags |=3D ETH_TEST_FL_FAILED; =20 data[0] =3D 0; @@ -3475,7 +3519,7 @@ { int i =3D 0; nic_t *sp =3D dev->priv; - StatInfo_t *stat_info =3D sp->mac_control.StatsInfo; + StatInfo_t *stat_info =3D sp->mac_control.stats_info; =20 tmp_stats[i++] =3D stat_info->tmac_frms; tmp_stats[i++] =3D stat_info->tmac_data_octets; @@ -3597,36 +3641,37 @@ .get_ethtool_stats =3D s2io_get_ethtool_stats }; =20 -/* - * Input Argument/s:=20 - * dev - Device pointer. - * ifr - An IOCTL specefic structure, that can contain a pointer to - * a proprietary structure used to pass information to the driver. - * cmd - This is used to distinguish between the different commands = that - * can be passed to the IOCTL functions. - * Return value: - * '0' on success and an appropriate (-)ve integer as defined in = errno.h - * file on failure. +/** + * s2io_ioctl - Entry point for the Ioctl=20 + * @dev : Device pointer. + * @ifr : An IOCTL specefic structure, that can contain a pointer to + * a proprietary structure used to pass information to the driver. + * @cmd : This is used to distinguish between the different commands = that + * can be passed to the IOCTL functions. * Description: * This function has support for ethtool, adding multiple MAC = addresses on=20 * the NIC and some DBG commands for the util tool. + * Return value: + * Currently the IOCTL supports no operations, hence by default this + * function returns OP NOT SUPPORTED value. */ + int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { return -EOPNOTSUPP; } =20 -/* - * Input Argument/s:=20 - * dev - device pointer. - * new_mtu - the new MTU size for the device. +/** + * s2io_change_mtu - entry point to change MTU size for the device. + * @dev : device pointer. + * @new_mtu : the new MTU size for the device. + * Description: A driver entry point to change MTU size for the = device. + * Before changing the MTU the device must be stopped. * Return value: - * '0' on success and an appropriate (-)ve integer as defined in = errno.h + * 0 on success and an appropriate (-)ve integer as defined in = errno.h * file on failure. - * Description: - * A driver entry point to change MTU size for the device. Before = changing - * the MTU the device must be stopped. */ + int s2io_change_mtu(struct net_device *dev, int new_mtu) { nic_t *sp =3D dev->priv; @@ -3645,7 +3690,7 @@ return -EPERM; } =20 -/* Set the new MTU into the PYLD register of the NIC */ + /* Set the new MTU into the PYLD register of the NIC */ val64 =3D new_mtu; writeq(vBIT(val64, 2, 14), &bar0->rmac_max_pyld_len); =20 @@ -3654,18 +3699,19 @@ return 0; } =20 -/* - * Input Argument/s:=20 - * dev_adr - address of the device structure in dma_addr_t format. - * Return value: - * void. +/** + * s2io_tasklet - Bottom half of the ISR. + * @dev_adr : address of the device structure in dma_addr_t format. * Description: * This is the tasklet or the bottom half of the ISR. This is * an extension of the ISR which is scheduled by the scheduler to be = run=20 * when the load on the CPU is low. All low priority tasks of the ISR = can * be pushed into the tasklet. For now the tasklet is used only to=20 * replenish the Rx buffers in the Rx buffer descriptors. + * Return value: + * void. */ + static void s2io_tasklet(unsigned long dev_addr) { struct net_device *dev =3D (struct net_device *) dev_addr; @@ -3678,29 +3724,30 @@ config =3D &sp->config; =20 if (!TASKLET_IN_USE) { - for (i =3D 0; i < config->RxRingNum; i++) { + for (i =3D 0; i < config->rx_ring_num; i++) { ret =3D fill_rx_buffers(sp, i); if (ret =3D=3D -ENOMEM) { DBG_PRINT(ERR_DBG, "%s: Out of ", dev->name); DBG_PRINT(ERR_DBG, "memory in tasklet\n"); - return; + break; } else if (ret =3D=3D -EFILL) { DBG_PRINT(ERR_DBG, "%s: Rx Ring %d is full\n", dev->name, i); - return; + break; } } clear_bit(0, (unsigned long *) (&sp->tasklet_status)); } } =20 - -/* - * Description: - *=20 +/** + * s2io_set_link - Set the LInk status + * @data: long pointer to device private structue + * Description: Sets the link status for the adapter */ + static void s2io_set_link(unsigned long data) { nic_t *nic =3D (nic_t *) data; @@ -3708,7 +3755,8 @@ XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; register u64 val64, err_reg; =20 - /* Allow a small delay for the NICs self initiated=20 + /*=20 + * Allow a small delay for the NICs self initiated=20 * cleanup to complete. */ set_current_state(TASK_UNINTERRUPTIBLE); @@ -3716,7 +3764,7 @@ =20 val64 =3D readq(&bar0->adapter_status); if (verify_xena_quiescence(val64, nic->device_enabled_once)) { - /* Acknowledge interrupt and clear the R1 register */ + /* Acknowledge Intr and clear R1 register. */ err_reg =3D readq(&bar0->mac_rmac_err_reg); writeq(err_reg, &bar0->mac_rmac_err_reg); =20 @@ -3748,13 +3796,16 @@ } } =20 -/* +/**=20 + * s2io_restart_nic - Resets the NIC. + * @data : long pointer to the device private structure * Description: * This function is scheduled to be run by the s2io_tx_watchdog * function after 0.5 secs to reset the NIC. The idea is to reduce=20 * the run time of the watch dog routine which is run holding a * spin lock. */ + static void s2io_restart_nic(unsigned long data) { struct net_device *dev =3D (struct net_device *) data; @@ -3767,18 +3818,19 @@ "%s: was reset by Tx watchdog timer.\n", dev->name); } =20 -/* - * Input Argument/s:=20 - * dev - device pointer. - * Return value: - * void +/**=20 + * s2io_tx_watchdog - Watchdog for transmit side.=20 + * @dev : Pointer to net device structure * Description: * This function is triggered if the Tx Queue is stopped * for a pre-defined amount of time when the Interface is still up. * If the Interface is jammed in such a situation, the hardware is * reset (by s2io_close) and restarted again (by s2io_open) to * overcome any problem that might have been caused in the hardware. + * Return value: + * void */ + static void s2io_tx_watchdog(struct net_device *dev) { nic_t *sp =3D dev->priv; @@ -3788,25 +3840,24 @@ } } =20 -/* - * Input Argument/s:=20 - * sp - private member of the device structure, which is a pointer to = the=20 - * s2io_nic structure. - * skb - the socket buffer pointer. - * len - length of the packet - * cksum - FCS checksum of the frame. - * ring_no - the ring from which this RxD was extracted. - * Return value: - * SUCCESS on success and -1 on failure. - * Description:=20 - * This function is called by the Tx interrupt serivce routine to = perform=20 +/** + * rx_osm_handler - To perform some OS related operations on SKB. + * @sp: private member of the device structure,pointer to s2io_nic = structure. + * @skb : the socket buffer pointer. + * @len : length of the packet + * @cksum : FCS checksum of the frame. + * @ring_no : the ring from which this RxD was extracted. + * Description:=20 + * This function is called by the Tx interrupt serivce routine to = perform * some OS related operations on the SKB before passing it to the = upper * layers. It mainly checks if the checksum is OK, if so adds it to = the * SKBs cksum variable, increments the Rx packet count and passes the = SKB * to the upper layer. If the checksum is wrong, it increments the Rx * packet error count, frees the SKB and returns error. + * Return value: + * SUCCESS on success and -1 on failure. */ -static int rxOsmHandler(nic_t * sp, u16 len, RxD_t * rxdp, int ring_no) +static int rx_osm_handler(nic_t * sp, u16 len, RxD_t * rxdp, int = ring_no) { struct net_device *dev =3D (struct net_device *) sp->dev; struct sk_buff *skb =3D @@ -3817,7 +3868,8 @@ if ((rxdp->Control_1 & TCP_OR_UDP_FRAME) && (sp->rx_csum)) { l4_csum =3D RXD_GET_L4_CKSUM(rxdp->Control_1); if ((l3_csum =3D=3D L3_CKSUM_OK) && (l4_csum =3D=3D L4_CKSUM_OK)) { - /* NIC verifies if the Checksum of the received + /*=20 + * NIC verifies if the Checksum of the received * frame is Ok or not and accordingly returns * a flag in the RxD. */ @@ -3844,25 +3896,21 @@ #endif =20 dev->last_rx =3D jiffies; -#if DEBUG_ON - sp->rxpkt_cnt++; -#endif sp->rx_pkt_count++; sp->stats.rx_packets++; sp->stats.rx_bytes +=3D len; - sp->rxpkt_bytes +=3D len; =20 atomic_dec(&sp->rx_bufs_left[ring_no]); rxdp->Host_Control =3D 0; return SUCCESS; } =20 -int check_for_txSpace(nic_t * sp) +int check_for_tx_space(nic_t * sp) { u32 put_off, get_off, queue_len; int ret =3D TRUE, i; =20 - for (i =3D 0; i < sp->config.TxFIFONum; i++) { + for (i =3D 0; i < sp->config.tx_fifo_num; i++) { queue_len =3D sp->mac_control.tx_curr_put_info[i].fifo_len + 1; put_off =3D sp->mac_control.tx_curr_put_info[i].offset; @@ -3876,18 +3924,19 @@ return ret; } =20 -/* -* Input Argument/s:=20 -* sp - private member of the device structure, which is a pointer to = the=20 -* s2io_nic structure. -* link - inidicates whether link is UP/DOWN. -* Return value: -* void. -* Description: -* This function stops/starts the Tx queue depending on whether the = link -* status of the NIC is is down or up. This is called by the Alarm = interrupt=20 -* handler whenever a link change interrupt comes up.=20 -*/ +/** + * s2io_link - stops/starts the Tx queue. + * @sp : private member of the device structure, which is a pointer to = the + * s2io_nic structure. + * @link : inidicates whether link is UP/DOWN. + * Description: + * This function stops/starts the Tx queue depending on whether the = link + * status of the NIC is is down or up. This is called by the Alarm=20 + * interrupt handler whenever a link change interrupt comes up.=20 + * Return value: + * void. + */ + void s2io_link(nic_t * sp, int link) { struct net_device *dev =3D (struct net_device *) sp->dev; @@ -3900,8 +3949,9 @@ } else { DBG_PRINT(ERR_DBG, "%s: Link Up\n", dev->name); netif_carrier_on(dev); - if (check_for_txSpace(sp) =3D=3D TRUE) { - /* Don't wake the queue, if we know there + if (check_for_tx_space(sp) =3D=3D TRUE) { + /* + * Dont wake the queue if we know there * are no free TxDs available. */ netif_wake_queue(dev); @@ -3911,14 +3961,15 @@ sp->last_link_state =3D link; } =20 -/* -* Input Argument/s:=20 -* pdev - structure containing the PCI related information of the = device. -* Return value: -* returns the revision ID of the device. -* Description: -* Function to identify the Revision ID of xena. -*/ +/** + * get_xena_rev_id - to identify revision ID of xena.=20 + * @pdev : PCI Dev structure + * Description: + * Function to identify the Revision ID of xena. + * Return value: + * returns the revision ID of the device. + */ + int get_xena_rev_id(struct pci_dev *pdev) { u8 id =3D 0; @@ -3927,21 +3978,22 @@ return id; } =20 -/* -* Input Argument/s:=20 -* sp - private member of the device structure, which is a pointer to = the=20 -* s2io_nic structure. -* Return value: -* void -* Description: -* This function initializes a few of the PCI and PCI-X configuration = registers -* with recommended values. -*/ +/** + * s2io_init_pci -Initialization of PCI and PCI-X configuration = registers .=20 + * @sp : private member of the device structure, which is a pointer to = the=20 + * s2io_nic structure. + * Description: + * This function initializes a few of the PCI and PCI-X configuration = registers + * with recommended values. + * Return value: + * void + */ + static void s2io_init_pci(nic_t * sp) { u16 pci_cmd =3D 0; =20 -/* Enable Data Parity Error Recovery in PCI-X command register. */ + /* Enable Data Parity Error Recovery in PCI-X command register. */ pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, @@ -3949,13 +4001,13 @@ pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); =20 -/* Set the PErr Response bit in PCI command register. */ + /* Set the PErr Response bit in PCI command register. */ pci_read_config_word(sp->pdev, PCI_COMMAND, &pci_cmd); pci_write_config_word(sp->pdev, PCI_COMMAND, (pci_cmd | PCI_COMMAND_PARITY)); pci_read_config_word(sp->pdev, PCI_COMMAND, &pci_cmd); =20 -/* Set user specified value in Latency Timer */ + /* Set user specified value in Latency Timer */ if (latency_timer) { pci_write_config_byte(sp->pdev, PCI_LATENCY_TIMER, latency_timer); @@ -3963,14 +4015,14 @@ &latency_timer); } =20 -/* Set MMRB count to 4096 in PCI-X Command register. */ + /* Set MMRB count to 4096 in PCI-X Command register. */ pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, (sp->pcix_cmd | 0x0C)); pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); =20 -/* Setting Maximum outstanding splits to two for now. */ - sp->pcix_cmd &=3D 0xFF1F; + /* Setting Maximum outstanding splits based on system type. */ + sp->pcix_cmd &=3D 0xFF8F; =20 sp->pcix_cmd |=3D XENA_MAX_OUTSTANDING_SPLITS(XENA_TWO_SPLIT_TRANSACTION); @@ -3978,7 +4030,6 @@ sp->pcix_cmd); pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); - } =20 MODULE_AUTHOR("Raghavendra Koushik "); @@ -3991,21 +4042,20 @@ MODULE_PARM(rx_prio, "1-" __MODULE_STRING(1) "i"); MODULE_PARM(tx_prio, "1-" __MODULE_STRING(1) "i"); MODULE_PARM(latency_timer, "1-" __MODULE_STRING(1) "i"); +/** + * s2io_init_nic - Initialization of the adapter .=20 + * @pdev : structure containing the PCI related information of the = device. + * @pre: List of PCI devices supported by the driver listed in = s2io_tbl. + * Description: + * The function initializes an adapter identified by the pci_dec = structure. + * All OS related initialization including memory and device structure = and=20 + * initlaization of the device private variable is done. Also the = swapper=20 + * control register is initialized to enable read and write into the = I/O=20 + * registers of the device. + * Return value: + * returns 0 on success and negative on failure. + */ =20 -/* -* Input Argument/s:=20 -* pdev - structure containing the PCI related information of the = device. -* pre - the List of PCI devices supported by the driver listed in = s2io_tbl. -* Return value: -* returns '0' on success and negative on failure. -* Description: -* The function initializes an adapter identified by the pci_dec = structure. -* All OS related initialization including memory and device structure = and=20 -* initlaization of the device private variable is done. Also the = swapper=20 -* control register is initialized to enable read and write into the = I/O=20 -* registers of the device. -* =20 -*/ static int __devinit s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) { @@ -4031,6 +4081,7 @@ if (!pci_set_dma_mask(pdev, 0xffffffffffffffffULL)) { DBG_PRINT(INIT_DBG, "s2io_init_nic: Using 64bit DMA\n"); dma_flag =3D TRUE; + if (pci_set_consistent_dma_mask (pdev, 0xffffffffffffffffULL)) { DBG_PRINT(ERR_DBG, @@ -4080,7 +4131,8 @@ /* Initialize some PCI/PCI-X fields of the NIC. */ s2io_init_pci(sp); =20 - /* Setting the device configuration parameters. + /*=20 + * Setting the device configuration parameters. * Most of these parameters can be specified by the user during=20 * module insertion as they are module loadable parameters. If=20 * these parameters are not not specified during load time, they=20 @@ -4090,7 +4142,7 @@ config =3D &sp->config; =20 /* Tx side parameters. */ - config->TxFIFONum =3D fifo_num ? fifo_num : 1; + config->tx_fifo_num =3D fifo_num ? fifo_num : 1; =20 if (!fifo_len[0] && (fifo_num > 1)) { printk(KERN_ERR "Fifo Lens not specified for all FIFOs\n"); @@ -4109,67 +4161,56 @@ goto init_failed; } } - for (cnt =3D 0; cnt < config->TxFIFONum; cnt++) { - config->TxCfg[cnt].FifoLen =3D fifo_len[cnt]; - config->TxCfg[cnt].FifoPriority =3D cnt; + for (cnt =3D 0; cnt < config->tx_fifo_num; cnt++) { + config->tx_cfg[cnt].fifo_len =3D fifo_len[cnt]; + config->tx_cfg[cnt].fifo_priority =3D cnt; } } else { - config->TxCfg[0].FifoLen =3D DEFAULT_FIFO_LEN; - config->TxCfg[0].FifoPriority =3D 0; + config->tx_cfg[0].fifo_len =3D DEFAULT_FIFO_LEN; + config->tx_cfg[0].fifo_priority =3D 0; } =20 - config->TxIntrType =3D TXD_INT_TYPE_UTILZ; - for (i =3D 0; i < config->TxFIFONum; i++) { - if (config->TxCfg[i].FifoLen < 65) { - config->TxIntrType =3D TXD_INT_TYPE_PER_LIST; + config->tx_intr_type =3D TXD_INT_TYPE_UTILZ; + for (i =3D 0; i < config->tx_fifo_num; i++) { + config->tx_cfg[i].f_no_snoop =3D + (NO_SNOOP_TXD | NO_SNOOP_TXD_BUFFER); + if (config->tx_cfg[i].fifo_len < 65) { + config->tx_intr_type =3D TXD_INT_TYPE_PER_LIST; break; } } - - config->TxCfg[0].fNoSnoop =3D (NO_SNOOP_TXD | NO_SNOOP_TXD_BUFFER); - config->MaxTxDs =3D MAX_SKB_FRAGS; - config->TxFlow =3D TRUE; + config->max_txds =3D MAX_SKB_FRAGS; =20 /* Rx side parameters. */ - config->RxRingNum =3D ring_num ? ring_num : 1; + config->rx_ring_num =3D ring_num ? ring_num : 1; =20 if (ring_len[0]) { int cnt; - for (cnt =3D 0; cnt < config->RxRingNum; cnt++) { - config->RxCfg[cnt].NumRxd =3D ring_len[cnt]; - config->RxCfg[cnt].RingPriority =3D cnt; + for (cnt =3D 0; cnt < config->rx_ring_num; cnt++) { + config->rx_cfg[cnt].num_rxd =3D ring_len[cnt]; + config->rx_cfg[cnt].ring_priority =3D cnt; } } else { - int id; - if ((id =3D get_xena_rev_id(pdev)) =3D=3D 1) { - config->RxCfg[0].NumRxd =3D LARGE_RXD_CNT; + config->rx_cfg[0].num_rxd =3D SMALL_RXD_CNT; + config->rx_cfg[0].ring_priority =3D 0; + } =20 - } else { - config->RxCfg[0].NumRxd =3D SMALL_RXD_CNT; - } - config->RxCfg[0].RingPriority =3D 0; + for (i =3D 0; i < config->rx_ring_num; i++) { + config->rx_cfg[i].ring_org =3D RING_ORG_BUFF1; + config->rx_cfg[i].f_no_snoop =3D + (NO_SNOOP_RXD | NO_SNOOP_RXD_BUFFER); } - config->RxCfg[0].RingOrg =3D RING_ORG_BUFF1; - config->RxCfg[0].RxdThresh =3D DEFAULT_RXD_THRESHOLD; - config->RxCfg[0].fNoSnoop =3D (NO_SNOOP_RXD | NO_SNOOP_RXD_BUFFER); - config->RxCfg[0].RxD_BackOff_Interval =3D TBD; - config->RxFlow =3D TRUE; - - /* Miscellaneous parameters. */ - config->RxVLANEnable =3D TRUE; - config->MTU =3D MAX_MTU_VLAN; - config->JumboEnable =3D FALSE; =20 /* Setting Mac Control parameters */ - mac_control->txdl_len =3D MAX_SKB_FRAGS; mac_control->rmac_pause_time =3D 0; =20 + /* Initialize Ring buffer parameters. */ - for (i =3D 0; i < config->RxRingNum; i++) + for (i =3D 0; i < config->rx_ring_num; i++) atomic_set(&sp->rx_bufs_left[i], 0); =20 /* initialize the shared memory used by the NIC and the host */ - if (initSharedMem(sp)) { + if (init_shared_mem(sp)) { DBG_PRINT(ERR_DBG, "%s: Memory allocation failed\n", dev->name); goto mem_alloc_failed; @@ -4208,15 +4249,16 @@ dev->set_multicast_list =3D &s2io_set_multicast; dev->do_ioctl =3D &s2io_ioctl; dev->change_mtu =3D &s2io_change_mtu; +#ifdef SET_ETHTOOL_OPS SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); - +#endif /* * will use eth_mac_addr() for dev->set_mac_address * mac address will be set every time dev->open() is called */ #ifdef CONFIG_S2IO_NAPI dev->poll =3D s2io_poll; - dev->weight =3D 128; /* For now. */ + dev->weight =3D 90; /* For now. */ #endif =20 dev->features |=3D NETIF_F_SG | NETIF_F_IP_CSUM; @@ -4244,14 +4286,15 @@ if (s2io_set_swapper(sp)) { DBG_PRINT(ERR_DBG, "%s:swapper settings are wrong\n", dev->name); - goto set_swap_failed; + goto register_failed; } =20 /* Fix for all "FFs" MAC address problems observed on Alpha platforms = */ - FixMacAddress(sp); + fix_mac_address(sp); s2io_reset(sp); =20 - /* Setting swapper control on the NIC, so the MAC address can be read. + /* + * Setting swapper control on the NIC, so the MAC address can be read. */ if (s2io_set_swapper(sp)) { DBG_PRINT(ERR_DBG, @@ -4260,50 +4303,52 @@ goto set_swap_failed; } =20 - /* MAC address initialization. - * For now only one mac address will be read and used. + /* =20 + * MAC address initialization. + * For now only one mac address will be read and used. */ bar0 =3D (XENA_dev_config_t *) sp->bar0; val64 =3D RMAC_ADDR_CMD_MEM_RD | RMAC_ADDR_CMD_MEM_STROBE_NEW_CMD | RMAC_ADDR_CMD_MEM_OFFSET(0 + MAC_MAC_ADDR_START_OFFSET); writeq(val64, &bar0->rmac_addr_cmd_mem); - waitForCmdComplete(sp); + wait_for_cmd_complete(sp); =20 tmp64 =3D readq(&bar0->rmac_addr_data0_mem); mac_down =3D (u32) tmp64; mac_up =3D (u32) (tmp64 >> 32); =20 - memset(sp->defMacAddr[0].mac_addr, 0, sizeof(ETH_ALEN)); + memset(sp->def_mac_addr[0].mac_addr, 0, sizeof(ETH_ALEN)); =20 - sp->defMacAddr[0].mac_addr[3] =3D (u8) (mac_up); - sp->defMacAddr[0].mac_addr[2] =3D (u8) (mac_up >> 8); - sp->defMacAddr[0].mac_addr[1] =3D (u8) (mac_up >> 16); - sp->defMacAddr[0].mac_addr[0] =3D (u8) (mac_up >> 24); - sp->defMacAddr[0].mac_addr[5] =3D (u8) (mac_down >> 16); - sp->defMacAddr[0].mac_addr[4] =3D (u8) (mac_down >> 24); + sp->def_mac_addr[0].mac_addr[3] =3D (u8) (mac_up); + sp->def_mac_addr[0].mac_addr[2] =3D (u8) (mac_up >> 8); + sp->def_mac_addr[0].mac_addr[1] =3D (u8) (mac_up >> 16); + sp->def_mac_addr[0].mac_addr[0] =3D (u8) (mac_up >> 24); + sp->def_mac_addr[0].mac_addr[5] =3D (u8) (mac_down >> 16); + sp->def_mac_addr[0].mac_addr[4] =3D (u8) (mac_down >> 24); =20 DBG_PRINT(INIT_DBG, "DEFAULT MAC ADDR:0x%02x-%02x-%02x-%02x-%02x-%02x\n", - sp->defMacAddr[0].mac_addr[0], - sp->defMacAddr[0].mac_addr[1], - sp->defMacAddr[0].mac_addr[2], - sp->defMacAddr[0].mac_addr[3], - sp->defMacAddr[0].mac_addr[4], - sp->defMacAddr[0].mac_addr[5]); + sp->def_mac_addr[0].mac_addr[0], + sp->def_mac_addr[0].mac_addr[1], + sp->def_mac_addr[0].mac_addr[2], + sp->def_mac_addr[0].mac_addr[3], + sp->def_mac_addr[0].mac_addr[4], + sp->def_mac_addr[0].mac_addr[5]); =20 /* Set the factory defined MAC address initially */ dev->addr_len =3D ETH_ALEN; - memcpy(dev->dev_addr, sp->defMacAddr, ETH_ALEN); + memcpy(dev->dev_addr, sp->def_mac_addr, ETH_ALEN); =20 /* Initialize the tasklet status flag */ atomic_set(&(sp->tasklet_status), 0); =20 =20 /* Initialize spinlocks */ - spin_lock_init(&sp->isr_lock); spin_lock_init(&sp->tx_lock); + spin_lock_init(&sp->isr_lock); =20 - /* SXE-002: Configure link and activity LED to init state=20 + /*=20 + * SXE-002: Configure link and activity LED to init state=20 * on driver load.=20 */ subid =3D sp->pdev->subsystem_device; @@ -4316,15 +4361,16 @@ val64 =3D readq(&bar0->gpio_control); } =20 - /* Make Link state as off at this point, when the Link change=20 + sp->rx_csum =3D 1; /* Rx chksum verify enabled by default */ + + /*=20 + * Make Link state as off at this point, when the Link change=20 * interrupt comes the state will be automatically changed to=20 * the right state. */ netif_carrier_off(dev); sp->last_link_state =3D LINK_DOWN; =20 - sp->rx_csum =3D 1; /* Rx chksum verify enabled by default */ - return 0; =20 set_swap_failed: @@ -4335,7 +4381,7 @@ iounmap(sp->bar0); bar0_remap_failed: mem_alloc_failed: - freeSharedMem(sp); + free_shared_mem(sp); init_failed: pci_disable_device(pdev); pci_release_regions(pdev); @@ -4345,16 +4391,15 @@ return -ENODEV; } =20 -/* -* Input Argument/s:=20 -* pdev - structure containing the PCI related information of the = device. -* Return value: -* void -* Description: -* This function is called by the Pci subsystem to release a PCI device = -* and free up all resource held up by the device. This could be in = response=20 -* to a Hot plug event or when the driver is to be removed from memory. -*/ +/** + * s2io_rem_nic - Free the PCI device=20 + * @pdev: structure containing the PCI related information of the = device. + * Description: This function is called by the Pci subsystem to release = a=20 + * PCI device and free up all resource held up by the device. This = could + * be in response to a Hot plug event or when the driver is to be = removed=20 + * from memory. + */ + static void __devexit s2io_rem_nic(struct pci_dev *pdev) { struct net_device *dev =3D @@ -4365,24 +4410,36 @@ DBG_PRINT(ERR_DBG, "Driver Data is NULL!!\n"); return; } + sp =3D dev->priv; - freeSharedMem(sp); + unregister_netdev(dev); + + free_shared_mem(sp); iounmap(sp->bar0); iounmap(sp->bar1); pci_disable_device(pdev); pci_release_regions(pdev); pci_set_drvdata(pdev, NULL); =20 - unregister_netdev(dev); - free_netdev(dev); } =20 +/** + * s2io_starter - Entry point for the driver + * Description: This function is the entry point for the driver. It = verifies + * the module loadable parameters and initializes PCI configuration = space. + */ + int __init s2io_starter(void) { return pci_module_init(&s2io_driver); } =20 +/** + * s2io_closer - Cleanup routine for the driver=20 + * Description: This function is the cleanup routine for the driver. It = unregist * ers the driver. + */ + void s2io_closer(void) { pci_unregister_driver(&s2io_driver); diff -urN vanilla-linux/drivers/net/s2io.h = linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-06 11:31:09.532308264 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-06 13:03:08.087360376 -0700 @@ -16,6 +16,7 @@ #define TBD 0 #define BIT(loc) (0x8000000000000000ULL >> (loc)) #define vBIT(val, loc, sz) (((u64)val) << (64-loc-sz)) +#define INV(d) ((d&0xff)<<24) | (((d>>8)&0xff)<<16) | = (((d>>16)&0xff)<<8)| ((d>>24)&0xff) =20 #ifndef BOOL #define BOOL int @@ -49,11 +50,13 @@ #define ALIGN_SIZE 127 #define PCIX_COMMAND_REGISTER 0x62 =20 +#ifndef SET_ETHTOOL_OPS +#define SUPPORTED_10000baseT_Full (1 << 12) +#endif + /* * Debug related variables. */ -#define DEBUG_ON TRUE - /* different debug levels. */ #define ERR_DBG 0 #define INIT_DBG 1 @@ -312,7 +315,7 @@ /* Maintains Per FIFO related information. */ typedef struct tx_fifo_config { #define MAX_AVAILABLE_TXDS 8192 - u32 FifoLen; /* specifies len of FIFO upto 8192, ie no of TxDLs */ + u32 fifo_len; /* specifies len of FIFO upto 8192, ie no of TxDLs */ /* Priority definition */ #define TX_FIFO_PRI_0 0 /*Highest */ #define TX_FIFO_PRI_1 1 @@ -322,9 +325,9 @@ #define TX_FIFO_PRI_5 5 #define TX_FIFO_PRI_6 6 #define TX_FIFO_PRI_7 7 /*lowest */ - u8 FifoPriority; /* specifies pointer level for FIFO */ + u8 fifo_priority; /* specifies pointer level for FIFO */ /* user should not set twos fifos with same pri */ - u8 fNoSnoop; + u8 f_no_snoop; #define NO_SNOOP_TXD 0x01 #define NO_SNOOP_TXD_BUFFER 0x02 } tx_fifo_config_t; @@ -332,7 +335,7 @@ =20 /* Maintains per Ring related information */ typedef struct rx_ring_config { - u32 NumRxd; /*No of RxDs per Rx Ring */ + u32 num_rxd; /*No of RxDs per Rx Ring */ #define RX_RING_PRI_0 0 /* highest */ #define RX_RING_PRI_1 1 #define RX_RING_PRI_2 2 @@ -342,70 +345,37 @@ #define RX_RING_PRI_6 6 #define RX_RING_PRI_7 7 /* lowest */ =20 - u8 RingPriority; /*Specifies service priority of ring */ + u8 ring_priority; /*Specifies service priority of ring */ /* OSM should not set any two rings with same priority */ - u8 RingOrg; /*Organization of ring */ + u8 ring_org; /*Organization of ring */ #define RING_ORG_BUFF1 0x01 #define RX_RING_ORG_BUFF3 0x03 #define RX_RING_ORG_BUFF5 0x05 =20 -/* In case of 3 buffer recv. mode, size of three buffers is expected = as.. */ -#define BUFF_SZ_1 22 /* ethernet header */ -#define BUFF_SZ_2 (64+64) /* max. IP+TCP header size = */ -#define BUFF_SZ_3 (1500-20-20) /* TCP payload */ -#define BUFF_SZ_3_JUMBO (9600-20-20) /* Jumbo TCP payload = */ - - u32 RxdThresh; /*No of used Rxds NIC can store before transfer to = host */ -#define DEFAULT_RXD_THRESHOLD 0x1 /* TODO */ - u8 fNoSnoop; + u8 f_no_snoop; #define NO_SNOOP_RXD 0x01 #define NO_SNOOP_RXD_BUFFER 0x02 - u32 RxD_BackOff_Interval; -#define RXD_BACKOFF_INTERVAL_DEF 0x0 -#define RXD_BACKOFF_INTERVAL_MIN 0x0 -#define RXD_BACKOFF_INTERVAL_MAX 0x0 } rx_ring_config_t; =20 /* This structure provides contains values of the tunable parameters=20 * of the H/W=20 */ struct config_param { - /* Tx Side */ - u32 TxFIFONum; /*Number of Tx FIFOs */ + u32 tx_fifo_num; /*Number of Tx FIFOs */ #define MAX_TX_FIFOS 8 =20 - tx_fifo_config_t TxCfg[MAX_TX_FIFOS]; /*Per-Tx FIFO config */ - u32 MaxTxDs; /*Max no. of Tx buffer descriptor per TxDL */ - BOOL TxVLANEnable; /*TRUE: Insert VLAN ID, FALSE: Don't insert */ -#define TX_REQ_TIMEOUT_DEFAULT 0x0 -#define TX_REQ_TIMEOUT_MIN 0x0 -#define TX_REQ_TIMEOUT_MAX 0x0 - u32 TxReqTimeOut; - BOOL TxFlow; /*Tx flow control enable */ - BOOL RxFlow; - BOOL OverrideTxServiceState; /* TRUE: Overide, FALSE: Do not override=20 - Use the new priority information - of service state. It is not recommended - to change but OSM can opt to do so */ -#define MAX_SERVICE_STATES 36 - u8 TxServiceState[MAX_SERVICE_STATES]; - /* Array element represent 'priority'=20 - * and array index represents - * 'Service state' e.g.=20 - * TxServiceState[3]=3D7; it means=20 - * Service state 3 is associated=20 - * with priority 7 of a Tx FIFO */ - u64 TxIntrType; /* Specifies if Tx Intr is UTILZ or PER_LIST type. */ + tx_fifo_config_t tx_cfg[MAX_TX_FIFOS]; /*Per-Tx FIFO config */ + u32 max_txds; /*Max no. of Tx buffer descriptor per TxDL */ + u64 tx_intr_type; + /* Specifies if Tx Intr is UTILZ or PER_LIST type. */ =20 /* Rx Side */ - u32 RxRingNum; /*Number of receive rings */ + u32 rx_ring_num; /*Number of receive rings */ #define MAX_RX_RINGS 8 #define MAX_RX_BLOCKS_PER_RING 150 =20 - rx_ring_config_t RxCfg[MAX_RX_RINGS]; /*Per-Rx Ring config */ - BOOL RxVLANEnable; /*TRUE: Strip off VLAN tag from the frame, - FALSE: Don't strip off VLAN tag */ + rx_ring_config_t rx_cfg[MAX_RX_RINGS]; /*Per-Rx Ring config */ =20 #define HEADER_ETHERNET_II_802_3_SIZE 14 #define HEADER_802_2_SIZE 3 @@ -419,23 +389,6 @@ #define MAX_PYLD_JUMBO 9600 #define MAX_MTU_JUMBO (MAX_PYLD_JUMBO+18) #define MAX_MTU_JUMBO_VLAN (MAX_PYLD_JUMBO+22) - u32 MTU; /*Maximum Payload */ - BOOL JumboEnable; /*Enable Jumbo frames recv/send */ - BOOL OverrideRxServiceState; /* TRUE: Overide, FALSE: Do not override=20 - Use the new priority information - of service state. It is not recommended - to change but OSM can opt to do so */ -#define MAX_SERVICE_STATES 36 - u8 RxServiceState[MAX_SERVICE_STATES]; - /* Array element represent 'priority'=20 - * and array index represents=20 - * 'Service state'e.g.=20 - * RxServiceState[3]=3D7; it means=20 - * Service state 3 is associated=20 - * with priority 7 of a Rx FIFO */ - BOOL StatAutoRefresh; /* When true, StatRefreshTime have valid value = */ - u32 StatRefreshTime; /*Time for refreshing statistics */ -#define STAT_TRSF_PER_1_SECOND 0x208D5 }; =20 /* Structure representing MAC Addrs */ @@ -514,14 +467,9 @@ #define SET_NUM_TAG(val) vBIT(val,16,32) =20 #define RXD_GET_BUFFER0_SIZE(Control_2) (u64)((Control_2 & = vBIT(0xFFFF,0,16))) -/* =20 -#define TXD_GET_BUFFER1_SIZE(Control_2) (u16)((Control_2 & = MASK_BUFFER1_SIZE) >> (63-31)) =20 -#define TXD_GET_BUFFER2_SIZE(Control_2) (u16)((Control_2 & = MASK_BUFFER2_SIZE) >> (63-47)) =20 -*/ u64 Buffer0_ptr; } RxD_t; =20 - /* Structure that represents the Rx descriptor block which contains=20 * 128 Rx descriptors. */ @@ -531,11 +479,12 @@ =20 u64 reserved_0; #define END_OF_BLOCK 0xFEFFFFFFFFFFFFFFULL - u64 reserved_1; /* 0xFEFFFFFFFFFFFFFF to mark last Rxd in this blk */ - u64 reserved_2_pNext_RxD_block; /*@ Logical ptr to next */ - u64 pNext_RxD_Blk_physical; /* Buff0_ptr. - In a 32 bit arch the upper 32 bits=20 - should be 0 */ + u64 reserved_1; /* 0xFEFFFFFFFFFFFFFF to mark last=20 + * Rxd in this blk */ + u64 reserved_2_pNext_RxD_block; /* Logical ptr to next */ + u64 pNext_RxD_Blk_physical; /* Buff0_ptr.In a 32 bit arch + * the upper 32 bits should=20 + * be 0 */ } RxD_block_t; =20 /* Structure which stores all the MAC control parameters */ @@ -568,10 +517,6 @@ */ typedef struct mac_info { /* rx side stuff */ - u32 rxd_ring_mem_sz; - RxD_t *RxRing[MAX_RX_RINGS]; /* Logical Rx ring pointers */ - dma_addr_t RxRing_Phy[MAX_RX_RINGS]; - /* Put pointer info which indictes which RxD has to be replenished=20 * with a new buffer. */ @@ -583,41 +528,29 @@ rx_curr_get_info_t rx_curr_get_info[MAX_RX_RINGS]; =20 u16 rmac_pause_time; - - /* this will be used in receive function, this decides which ring = would - be processed first. eg: ring with priority value 0 (highest) should - be processed first.=20 - first 3 LSB bits represent ring number which should be processed=20 - first, similarly next 3 bits represent next ring to be processed. - eg: value of _rx_ring_pri_map =3D 0x0000 003A means=20 - ring #2 would be processed first and #7 would be processed next - */ - u32 _rx_ring_pri_map; + u16 mc_pause_threshold_q0q3; + u16 mc_pause_threshold_q4q7; =20 /* tx side stuff */ - void *txd_list_mem; /* orignal pointer to allocated mem */ + void *txd_list_mem; /* original pointer to allocated mem */ dma_addr_t txd_list_mem_phy; u32 txd_list_mem_sz; =20 /* logical pointer of start of each Tx FIFO */ TxFIFO_element_t *tx_FIFO_start[MAX_TX_FIFOS]; =20 - /* logical pointer of start of TxDL which corresponds to each Tx FIFO = */ + /* The Phy and virtual mem loactions of the Tx descriptors. */ TxD_t *txdl_start[MAX_TX_FIFOS]; - - /* Same as txdl_start but phy addr */ dma_addr_t txdl_start_phy[MAX_TX_FIFOS]; =20 /* Current offset within tx_FIFO_start, where driver would write new Tx = frame*/ tx_curr_put_info_t tx_curr_put_info[MAX_TX_FIFOS]; tx_curr_get_info_t tx_curr_get_info[MAX_TX_FIFOS]; =20 - u16 txdl_len; /* length of a TxDL, same for all */ - void *stats_mem; /* orignal pointer to allocated mem */ dma_addr_t stats_mem_phy; /* Physical address of the stat block */ u32 stats_mem_sz; - StatInfo_t *StatsInfo; /* Logical address of the stat block */ + StatInfo_t *stats_info; /* Logical address of the stat block */ } mac_info_t; =20 /* structure representing the user defined MAC addresses */ @@ -632,13 +565,20 @@ dma_addr_t block_dma_addr; } rx_block_info_t; =20 +/* Default Tunable parameters of the NIC. */ +#define DEFAULT_FIFO_LEN 4096 +#define SMALL_RXD_CNT 30 * (MAX_RXDS_PER_BLOCK+1) +#define LARGE_RXD_CNT 100 * (MAX_RXDS_PER_BLOCK+1) +#define SMALL_BLK_CNT 30 +#define LARGE_BLK_CNT 100 + /* Structure representing one instance of the NIC */ typedef struct s2io_nic { #define MAX_MAC_SUPPORTED 16 #define MAX_SUPPORTED_MULTICASTS MAX_MAC_SUPPORTED =20 - macaddr_t defMacAddr[MAX_MAC_SUPPORTED]; - macaddr_t preMacAddr[MAX_MAC_SUPPORTED]; + macaddr_t def_mac_addr[MAX_MAC_SUPPORTED]; + macaddr_t pre_mac_addr[MAX_MAC_SUPPORTED]; =20 struct net_device_stats stats; caddr_t bar0; @@ -671,8 +611,8 @@ u32 irq; atomic_t rx_bufs_left[MAX_RX_RINGS]; =20 - spinlock_t isr_lock; spinlock_t tx_lock; + spinlock_t isr_lock; =20 #define PROMISC 1 #define ALL_MULTI 2 @@ -691,20 +631,11 @@ u16 tx_err_count; u16 rx_err_count; =20 -#if DEBUG_ON - u64 rxpkt_bytes; - u64 txpkt_bytes; - int int_cnt; - int rxint_cnt; - int txint_cnt; - u64 rxpkt_cnt; -#endif - - /* Place holders for the virtual and physical addresses of=20 + /* + * Place holders for the virtual and physical addresses of=20 * all the Rx Blocks */ - struct rx_block_info - rx_blocks[MAX_RX_RINGS][MAX_RX_BLOCKS_PER_RING]; + rx_block_info_t rx_blocks[MAX_RX_RINGS][MAX_RX_BLOCKS_PER_RING]; int block_count[MAX_RX_RINGS]; int pkt_cnt[MAX_RX_RINGS]; =20 @@ -742,19 +673,14 @@ #define RESET_ERROR 1; #define CMD_ERROR 2; =20 -/* Default Tunable parameters of the NIC. */ -#define DEFAULT_FIFO_LEN 4096 -#define SMALL_RXD_CNT 40 * (MAX_RXDS_PER_BLOCK+1) -#define LARGE_RXD_CNT 100 * (MAX_RXDS_PER_BLOCK+1) - /* OS related system calls */ #ifndef readq static inline u64 readq(void *addr) { u64 ret =3D 0; ret =3D readl(addr + 4); - ret <<=3D 32; - ret |=3D readl(addr); + (u64) ret <<=3D 32; + (u64) ret |=3D readl(addr); =20 return ret; } @@ -816,30 +742,36 @@ =20 /* DMA level Inressupts */ #define TXDMA_PFC_INT_M BIT(0) - /* PFC block interrupts */ +#define TXDMA_PCC_INT_M BIT(2) + +/* PFC block interrupts */ #define PFC_MISC_ERR_1 BIT(0) /* Interrupt to indicate FIFO full = */ =20 +/* PCC block interrupts. */ +#define PCC_FB_ECC_ERR vBIT(0xff, 16, 8) /* Interrupt to indicate + PCC_FB_ECC Error. */ + /* * Prototype declaration. */ static int __devinit s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre); static void __devexit s2io_rem_nic(struct pci_dev *pdev); -static int initSharedMem(struct s2io_nic *sp); -static void freeSharedMem(struct s2io_nic *sp); -static int initNic(struct s2io_nic *nic); +static int init_shared_mem(struct s2io_nic *sp); +static void free_shared_mem(struct s2io_nic *sp); +static int init_nic(struct s2io_nic *nic); #ifndef CONFIG_S2IO_NAPI -static void rxIntrHandler(struct s2io_nic *sp); +static void rx_intr_handler(struct s2io_nic *sp); #endif -static void txIntrHandler(struct s2io_nic *sp); -static void alarmIntrHandler(struct s2io_nic *sp); +static void tx_intr_handler(struct s2io_nic *sp); +static void alarm_intr_handler(struct s2io_nic *sp); =20 static int s2io_starter(void); void s2io_closer(void); static void s2io_tx_watchdog(struct net_device *dev); static void s2io_tasklet(unsigned long dev_addr); static void s2io_set_multicast(struct net_device *dev); -static int rxOsmHandler(nic_t * sp, u16 len, RxD_t * rxdp, int = ring_no); +static int rx_osm_handler(nic_t * sp, u16 len, RxD_t * rxdp, int = ring_no); void s2io_link(nic_t * sp, int link); void s2io_reset(nic_t * sp); #ifdef CONFIG_S2IO_NAPI @@ -849,6 +781,10 @@ int s2io_set_mac_addr(struct net_device *dev, u8 * addr); static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs = *regs); static int verify_xena_quiescence(u64 val64, int flag); +int verify_load_parm(void); +#ifdef SET_ETHTOOL_OPS static struct ethtool_ops netdev_ethtool_ops; +#endif +static void s2io_set_link(unsigned long data); =20 #endif /* _S2IO_H */ diff -urN vanilla-linux/drivers/net/s2io-regs.h = linux-2.6.8.1/drivers/net/s2io-regs.h --- vanilla-linux/drivers/net/s2io-regs.h 2004-10-06 11:31:09.539307200 = -0700 +++ linux-2.6.8.1/drivers/net/s2io-regs.h 2004-10-06 13:03:08.087360376 = -0700 @@ -289,6 +289,8 @@ u64 tda_err_alarm; =20 u64 pcc_err_reg; +#define PCC_FB_ECC_DB_ERR vBIT(0xFF, 16, 8) + u64 pcc_err_mask; u64 pcc_err_alarm; =20 @@ -512,6 +514,7 @@ #define RX_PA_CFG_IGNORE_FRM_ERR BIT(1) #define RX_PA_CFG_IGNORE_SNAP_OUI BIT(2) #define RX_PA_CFG_IGNORE_LLC_CTRL BIT(3) +#define RX_PA_CFG_IGNORE_L2_ERR BIT(6) =20 u8 unused12[0x700 - 0x1D8]; =20 ------=_NextPart_000_003F_01C4B150.5919F570-- From ravinandan.arakali@s2io.com Wed Oct 13 18:08:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 18:08:13 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9E187tj000363 for ; Wed, 13 Oct 2004 18:08:07 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9E17fje021575; Wed, 13 Oct 2004 21:07:41 -0400 (EDT) Received: from rarakali ([10.16.16.108]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9E17U39001147; Wed, 13 Oct 2004 21:07:31 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , Subject: [PATCH 2.6.9-rc2 5/8] S2io: module loadable parameters Date: Wed, 13 Oct 2004 18:15:27 -0700 Message-ID: <004e01c4b18b$4af2c090$6c10100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_004F_01C4B150.9E93E890" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10188 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Content-Length: 22273 Lines: 697 This is a multi-part message in MIME format. ------=_NextPart_000_004F_01C4B150.9E93E890 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, This patch adds/modifies the following module loadable parameters. 1. Max Txds per List. 2. statistics refresh time 3. pause frame control parameters including gap between two successive frames, threshold watermarks 4. RTI and TTI configuration parameters including ranges, packet counts and timeout periods. For further information please read the section 3.5 of XFrame H/W spec. 5. PCI/PCI-X configuration variables latency_timer, MMRBC and OST. 6. OS offload features TSO (If support available) and checksum offload. 7. If NAPI is not in use, a variable indicate_max_pkts can be used to limit number of Rx side packets processed for one call to Rx Intr handler. Signed-off-by: Raghavendra Koushik ------=_NextPart_000_004F_01C4B150.9E93E890 Content-Type: application/octet-stream; name="s2io_modload.patch5" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="s2io_modload.patch5" diff -urN vanilla-linux/drivers/net/s2io.c = linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-11 15:33:35.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-11 15:34:23.000000000 -0700 @@ -223,14 +223,66 @@ }; =20 /* Module Loadable parameters. */ -static u32 ring_num; static u32 frame_len[MAX_RX_RINGS]; -static u32 ring_len[MAX_RX_RINGS]; -static u32 fifo_num; -static u32 fifo_len[MAX_TX_FIFOS]; static u32 rx_prio; static u32 tx_prio; -static u8 latency_timer; + +static unsigned int lso_enable =3D 1; +#ifndef CONFIG_S2IO_NAPI +static unsigned int indicate_max_pkts; +#endif +static unsigned int cksum_offload_enable =3D 1; +static unsigned int tx_fifo_num =3D 1; +static unsigned int tx_fifo_len_0 =3D DEFAULT_FIFO_LEN; +static unsigned int tx_fifo_len_1; +static unsigned int tx_fifo_len_2; +static unsigned int tx_fifo_len_3; +static unsigned int tx_fifo_len_4; +static unsigned int tx_fifo_len_5; +static unsigned int tx_fifo_len_6; +static unsigned int tx_fifo_len_7; +static unsigned int max_txds =3D MAX_SKB_FRAGS; +static unsigned int rx_ring_num =3D 1; +static unsigned int rx_ring_sz_0 =3D SMALL_BLK_CNT; +static unsigned int rx_ring_sz_1; +static unsigned int rx_ring_sz_2; +static unsigned int rx_ring_sz_3; +static unsigned int rx_ring_sz_4; +static unsigned int rx_ring_sz_5; +static unsigned int rx_ring_sz_6; +static unsigned int rx_ring_sz_7; +static unsigned int Stats_refresh_time =3D 4; +static unsigned int rmac_pause_time =3D 65535; +static unsigned int mc_pause_threshold_q0q3 =3D 187; +static unsigned int mc_pause_threshold_q4q7 =3D 187; +static unsigned int shared_splits; +#if defined(__ia64__) +static unsigned int max_splits_trans =3D XENA_THREE_SPLIT_TRANSACTION; +#else +static unsigned int max_splits_trans =3D XENA_TWO_SPLIT_TRANSACTION; +#endif +static unsigned int tmac_util_period =3D 5; +static unsigned int rmac_util_period =3D 5; +static unsigned int tx_timer_val =3D 0xFFF; +static unsigned int tx_utilz_periodic =3D 1; +static unsigned int rx_timer_val =3D 0xFFF; +static unsigned int rx_utilz_periodic =3D 1; +static unsigned int tx_urange_a =3D 0xA; +static unsigned int tx_ufc_a =3D 0x10; +static unsigned int tx_urange_b =3D 0x10; +static unsigned int tx_ufc_b =3D 0x20; +static unsigned int tx_urange_c =3D 0x30; +static unsigned int tx_ufc_c =3D 0x40; +static unsigned int tx_ufc_d =3D 0x80; +static unsigned int rx_urange_a =3D 0xA; +static unsigned int rx_ufc_a =3D 0x1; +static unsigned int rx_urange_b =3D 0x10; +static unsigned int rx_ufc_b =3D 0x2; +static unsigned int rx_urange_c =3D 0x30; +static unsigned int rx_ufc_c =3D 0x40; +static unsigned int rx_ufc_d =3D 0x80; +static u8 latency_timer =3D 0xf8; +static u8 max_read_byte_cnt =3D 2; =20 /*=20 * S2IO device table. @@ -782,14 +834,16 @@ =20 /* Enable statistics */ writeq(mac_control->stats_mem_phy, &bar0->stat_addr); - val64 =3D SET_UPDT_PERIOD(8) | STAT_CFG_STAT_RO | STAT_CFG_STAT_EN; + val64 =3D SET_UPDT_PERIOD(Stats_refresh_time) | + STAT_CFG_STAT_RO | STAT_CFG_STAT_EN; writeq(val64, &bar0->stat_cfg); =20 /*=20 * Initializing the sampling rate for the device to calculate the * bandwidth utilization. */ - val64 =3D MAC_TX_LINK_UTIL_VAL(0x5) | MAC_RX_LINK_UTIL_VAL(0x5); + val64 =3D MAC_TX_LINK_UTIL_VAL(tmac_util_period) | + MAC_RX_LINK_UTIL_VAL(rmac_util_period); writeq(val64, &bar0->mac_link_util); =20 =20 @@ -798,14 +852,18 @@ * Scheme. */ /* TTI Initialization */ - val64 =3D TTI_DATA1_MEM_TX_TIMER_VAL(0xFFF) | - TTI_DATA1_MEM_TX_URNG_A(0xA) | TTI_DATA1_MEM_TX_URNG_B(0x10) | - TTI_DATA1_MEM_TX_URNG_C(0x30) | TTI_DATA1_MEM_TX_TIMER_AC_EN; + val64 =3D TTI_DATA1_MEM_TX_TIMER_VAL(tx_timer_val) | + TTI_DATA1_MEM_TX_URNG_A(tx_urange_a) | + TTI_DATA1_MEM_TX_URNG_B(tx_urange_b) | + TTI_DATA1_MEM_TX_URNG_C(tx_urange_c); + if (tx_utilz_periodic) + val64 |=3D TTI_DATA1_MEM_TX_TIMER_AC_EN; writeq(val64, &bar0->tti_data1_mem); =20 - val64 =3D - TTI_DATA2_MEM_TX_UFC_A(0x10) | TTI_DATA2_MEM_TX_UFC_B(0x20) | - TTI_DATA2_MEM_TX_UFC_C(0x40) | TTI_DATA2_MEM_TX_UFC_D(0x80); + val64 =3D TTI_DATA2_MEM_TX_UFC_A(tx_ufc_a) | + TTI_DATA2_MEM_TX_UFC_B(tx_ufc_b) | + TTI_DATA2_MEM_TX_UFC_C(tx_ufc_c) | + TTI_DATA2_MEM_TX_UFC_D(tx_ufc_d); writeq(val64, &bar0->tti_data2_mem); =20 val64 =3D TTI_CMD_MEM_WE | TTI_CMD_MEM_STROBE_NEW_CMD; @@ -834,13 +892,19 @@ } =20 /* RTI Initialization */ - val64 =3D RTI_DATA1_MEM_RX_TIMER_VAL(0xFFF) | - RTI_DATA1_MEM_RX_URNG_A(0xA) | RTI_DATA1_MEM_RX_URNG_B(0x10) | - RTI_DATA1_MEM_RX_URNG_C(0x30) | RTI_DATA1_MEM_RX_TIMER_AC_EN; + val64 =3D RTI_DATA1_MEM_RX_TIMER_VAL(rx_timer_val) | + RTI_DATA1_MEM_RX_URNG_A(rx_urange_a) | + RTI_DATA1_MEM_RX_URNG_B(rx_urange_b) | + RTI_DATA1_MEM_RX_URNG_C(rx_urange_c); + if (rx_utilz_periodic) + val64 |=3D RTI_DATA1_MEM_RX_TIMER_AC_EN; + writeq(val64, &bar0->rti_data1_mem); =20 - val64 =3D RTI_DATA2_MEM_RX_UFC_A(0x1) | RTI_DATA2_MEM_RX_UFC_B(0x2) | - RTI_DATA2_MEM_RX_UFC_C(0x40) | RTI_DATA2_MEM_RX_UFC_D(0x80); + val64 =3D RTI_DATA2_MEM_RX_UFC_A(rx_ufc_a) | + RTI_DATA2_MEM_RX_UFC_B(rx_ufc_b) | + RTI_DATA2_MEM_RX_UFC_C(rx_ufc_c) | + RTI_DATA2_MEM_RX_UFC_D(rx_ufc_d); writeq(val64, &bar0->rti_data2_mem); =20 val64 =3D RTI_CMD_MEM_WE | RTI_CMD_MEM_STROBE_NEW_CMD; @@ -923,7 +987,7 @@ * exceeded the limit pointed by shared_splits */ val64 =3D readq(&bar0->pic_control); - val64 |=3D PIC_CNTL_SHARED_SPLITS(0); + val64 |=3D PIC_CNTL_SHARED_SPLITS(shared_splits); writeq(val64, &bar0->pic_control); =20 return SUCCESS; @@ -1381,7 +1445,7 @@ for (i =3D 0; i < config->tx_fifo_num; i++) { for (j =3D 0; j < config->tx_cfg[i].fifo_len - 1; j++) { txdp =3D mac_control->txdl_start[i] + - (config->max_txds * j); + (config->max_txds * j); skb =3D (struct sk_buff *) ((unsigned long) txdp-> Host_Control); @@ -1807,7 +1871,12 @@ mac_control->rx_curr_get_info[i].offset =3D offset_info.offset; pkt_cnt++; + if ((indicate_max_pkts) + && (pkt_cnt > indicate_max_pkts)) + break; } + if ((indicate_max_pkts) && (pkt_cnt > indicate_max_pkts)) + break; } } #endif @@ -4004,7 +4073,6 @@ return SUCCESS; } =20 - /** * s2io_link - stops/starts the Tx queue. * @sp : private member of the device structure, which is a pointer to = the @@ -4088,17 +4156,23 @@ &latency_timer); } =20 - /* Set MMRB count to 4096 in PCI-X Command register. */ + /* Set MMRB count to 2048 in PCI-X Command register. */ + sp->pcix_cmd &=3D 0xFFF3; pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, - (sp->pcix_cmd | 0x0C)); + (sp->pcix_cmd | (max_read_byte_cnt << 2))); pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); =20 /* Setting Maximum outstanding splits based on system type. */ sp->pcix_cmd &=3D 0xFF8F; =20 - sp->pcix_cmd |=3D - XENA_MAX_OUTSTANDING_SPLITS(XENA_TWO_SPLIT_TRANSACTION); + sp->pcix_cmd |=3D XENA_MAX_OUTSTANDING_SPLITS(max_splits_trans); + pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, + sp->pcix_cmd); + pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, + &(sp->pcix_cmd)); + /* Forcibly disabling relaxed ordering capability of the card. */ + sp->pcix_cmd &=3D 0xfffd; pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, sp->pcix_cmd); pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, @@ -4107,14 +4181,58 @@ =20 MODULE_AUTHOR("Raghavendra Koushik "); MODULE_LICENSE("GPL"); -MODULE_PARM(ring_num, "1-" __MODULE_STRING(1) "i"); -MODULE_PARM(frame_len, "1-" __MODULE_STRING(8) "i"); -MODULE_PARM(ring_len, "1-" __MODULE_STRING(8) "i"); -MODULE_PARM(fifo_num, "1-" __MODULE_STRING(1) "i"); -MODULE_PARM(fifo_len, "1-" __MODULE_STRING(8) "i"); -MODULE_PARM(rx_prio, "1-" __MODULE_STRING(1) "i"); -MODULE_PARM(tx_prio, "1-" __MODULE_STRING(1) "i"); -MODULE_PARM(latency_timer, "1-" __MODULE_STRING(1) "i"); +MODULE_PARM(lso_enable, "i"); +#ifndef CONFIG_S2IO_NAPI +MODULE_PARM(indicate_max_pkts, "i"); +#endif +MODULE_PARM(cksum_offload_enable, "i"); +MODULE_PARM(tx_fifo_num, "i"); +MODULE_PARM(tx_fifo_len_0, "i"); +MODULE_PARM(tx_fifo_len_1, "i"); +MODULE_PARM(tx_fifo_len_2, "i"); +MODULE_PARM(tx_fifo_len_3, "i"); +MODULE_PARM(tx_fifo_len_4, "i"); +MODULE_PARM(tx_fifo_len_5, "i"); +MODULE_PARM(tx_fifo_len_6, "i"); +MODULE_PARM(tx_fifo_len_7, "i"); +MODULE_PARM(max_txds, "i"); +MODULE_PARM(rx_ring_num, "i"); +MODULE_PARM(rx_ring_sz_0, "i"); +MODULE_PARM(rx_ring_sz_1, "i"); +MODULE_PARM(rx_ring_sz_2, "i"); +MODULE_PARM(rx_ring_sz_3, "i"); +MODULE_PARM(rx_ring_sz_4, "i"); +MODULE_PARM(rx_ring_sz_5, "i"); +MODULE_PARM(rx_ring_sz_6, "i"); +MODULE_PARM(rx_ring_sz_7, "i"); +MODULE_PARM(Stats_refresh_time, "i"); +MODULE_PARM(rmac_pause_time, "i"); +MODULE_PARM(mc_pause_threshold_q0q3, "i"); +MODULE_PARM(mc_pause_threshold_q4q7, "i"); +MODULE_PARM(shared_splits, "i"); +MODULE_PARM(max_splits_trans, "i"); +MODULE_PARM(tmac_util_period, "i"); +MODULE_PARM(rmac_util_period, "i"); +MODULE_PARM(tx_timer_val, "i"); +MODULE_PARM(tx_utilz_periodic, "i"); +MODULE_PARM(rx_timer_val, "i"); +MODULE_PARM(rx_utilz_periodic, "i"); +MODULE_PARM(tx_urange_a, "i"); +MODULE_PARM(tx_ufc_a, "i"); +MODULE_PARM(tx_urange_b, "i"); +MODULE_PARM(tx_ufc_b, "i"); +MODULE_PARM(tx_urange_c, "i"); +MODULE_PARM(tx_ufc_c, "i"); +MODULE_PARM(tx_ufc_d, "i"); +MODULE_PARM(rx_urange_a, "i"); +MODULE_PARM(rx_ufc_a, "i"); +MODULE_PARM(rx_urange_b, "i"); +MODULE_PARM(rx_ufc_b, "i"); +MODULE_PARM(rx_urange_c, "i"); +MODULE_PARM(rx_ufc_c, "i"); +MODULE_PARM(rx_ufc_d, "i"); +MODULE_PARM(latency_timer, "i"); +MODULE_PARM(max_read_byte_cnt, "i"); /** * s2io_init_nic - Initialization of the adapter .=20 * @pdev : structure containing the PCI related information of the = device. @@ -4215,33 +4333,23 @@ config =3D &sp->config; =20 /* Tx side parameters. */ - config->tx_fifo_num =3D fifo_num ? fifo_num : 1; - - if (!fifo_len[0] && (fifo_num > 1)) { - printk(KERN_ERR "Fifo Lens not specified for all FIFOs\n"); - goto init_failed; - } - - if (fifo_len[0]) { - int cnt; - - for (cnt =3D 0; fifo_len[cnt]; cnt++); - if (fifo_num) { - if (cnt < fifo_num) { - printk(KERN_ERR - "Fifo Lens not specified for "); - printk(KERN_ERR "all FIFOs\n"); - goto init_failed; - } - } - for (cnt =3D 0; cnt < config->tx_fifo_num; cnt++) { - config->tx_cfg[cnt].fifo_len =3D fifo_len[cnt]; - config->tx_cfg[cnt].fifo_priority =3D cnt; - } - } else { - config->tx_cfg[0].fifo_len =3D DEFAULT_FIFO_LEN; - config->tx_cfg[0].fifo_priority =3D 0; - } + config->tx_fifo_num =3D tx_fifo_num; + config->tx_cfg[0].fifo_len =3D tx_fifo_len_0; + config->tx_cfg[0].fifo_priority =3D 0; + config->tx_cfg[1].fifo_len =3D tx_fifo_len_1; + config->tx_cfg[1].fifo_priority =3D 1; + config->tx_cfg[2].fifo_len =3D tx_fifo_len_2; + config->tx_cfg[2].fifo_priority =3D 2; + config->tx_cfg[3].fifo_len =3D tx_fifo_len_3; + config->tx_cfg[3].fifo_priority =3D 3; + config->tx_cfg[4].fifo_len =3D tx_fifo_len_4; + config->tx_cfg[4].fifo_priority =3D 4; + config->tx_cfg[5].fifo_len =3D tx_fifo_len_5; + config->tx_cfg[5].fifo_priority =3D 5; + config->tx_cfg[6].fifo_len =3D tx_fifo_len_6; + config->tx_cfg[6].fifo_priority =3D 6; + config->tx_cfg[7].fifo_len =3D tx_fifo_len_7; + config->tx_cfg[7].fifo_priority =3D 7; =20 config->tx_intr_type =3D TXD_INT_TYPE_UTILZ; for (i =3D 0; i < config->tx_fifo_num; i++) { @@ -4255,27 +4363,34 @@ config->max_txds =3D MAX_SKB_FRAGS; =20 /* Rx side parameters. */ - config->rx_ring_num =3D ring_num ? ring_num : 1; + config->rx_ring_num =3D rx_ring_num; + config->rx_cfg[0].num_rxd =3D rx_ring_sz_0 * (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[0].ring_priority =3D 0; + config->rx_cfg[1].num_rxd =3D rx_ring_sz_1 * (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[1].ring_priority =3D 1; + config->rx_cfg[2].num_rxd =3D rx_ring_sz_2 * (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[2].ring_priority =3D 2; + config->rx_cfg[3].num_rxd =3D rx_ring_sz_3 * (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[3].ring_priority =3D 3; + config->rx_cfg[4].num_rxd =3D rx_ring_sz_4 * (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[4].ring_priority =3D 4; + config->rx_cfg[5].num_rxd =3D rx_ring_sz_5 * (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[5].ring_priority =3D 5; + config->rx_cfg[6].num_rxd =3D rx_ring_sz_6 * (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[6].ring_priority =3D 6; + config->rx_cfg[7].num_rxd =3D rx_ring_sz_7 * (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[7].ring_priority =3D 7; =20 - if (ring_len[0]) { - int cnt; - for (cnt =3D 0; cnt < config->rx_ring_num; cnt++) { - config->rx_cfg[cnt].num_rxd =3D ring_len[cnt]; - config->rx_cfg[cnt].ring_priority =3D cnt; - } - } else { - config->rx_cfg[0].num_rxd =3D SMALL_RXD_CNT; - config->rx_cfg[0].ring_priority =3D 0; - } - - for (i =3D 0; i < config->rx_ring_num; i++) { + for (i =3D 0; i < rx_ring_num; i++) { config->rx_cfg[i].ring_org =3D RING_ORG_BUFF1; config->rx_cfg[i].f_no_snoop =3D (NO_SNOOP_RXD | NO_SNOOP_RXD_BUFFER); } =20 /* Setting Mac Control parameters */ - mac_control->rmac_pause_time =3D 0; + mac_control->rmac_pause_time =3D rmac_pause_time; + mac_control->mc_pause_threshold_q0q3 =3D mc_pause_threshold_q0q3; + mac_control->mc_pause_threshold_q4q7 =3D mc_pause_threshold_q4q7; =20 =20 /* Initialize Ring buffer parameters. */ @@ -4334,11 +4449,14 @@ dev->weight =3D 90; /* For now. */ #endif =20 - dev->features |=3D NETIF_F_SG | NETIF_F_IP_CSUM; + dev->features |=3D NETIF_F_SG; + if (cksum_offload_enable) + dev->features |=3D NETIF_F_IP_CSUM; if (sp->high_dma_flag =3D=3D TRUE) dev->features |=3D NETIF_F_HIGHDMA; #ifdef NETIF_F_TSO - dev->features |=3D NETIF_F_TSO; + if (lso_enable) + dev->features |=3D NETIF_F_TSO; #endif =20 dev->tx_timeout =3D &s2io_tx_watchdog; @@ -4453,7 +4571,6 @@ bar0_remap_failed: mem_alloc_failed: free_shared_mem(sp); - init_failed: pci_disable_device(pdev); pci_release_regions(pdev); pci_set_drvdata(pdev, NULL); @@ -4503,6 +4620,8 @@ =20 int __init s2io_starter(void) { + if (verify_load_parm()) + return -ENODEV; return pci_module_init(&s2io_driver); } =20 @@ -4519,3 +4638,223 @@ =20 module_init(s2io_starter); module_exit(s2io_closer); +/** + * verify_load_parm - verifies the module loadable parameters + * Descriptions: Verifies the module loadable parameters and = initializes the + * Tx Fifo, Rx Ring and other paramters. + */ + +int verify_load_parm() +{ + int fail =3D 0; + if (!((lso_enable =3D=3D 0) || (lso_enable =3D=3D 1))) { + printk("lso_enable can be either '1' or '0'\n"); + fail =3D 1; + } +#ifndef CONFIG_S2IO_NAPI + if ((indicate_max_pkts > (0xFFFFFFFF))) { + printk + ("indicate_max_pkts can take value greater than zero but less = than 2power(32)\n"); + fail =3D 1; + } +#endif + if (!((cksum_offload_enable =3D=3D 0) || (cksum_offload_enable =3D=3D = 1))) { + printk("cksum_offload_enable can be only '0' or '1' \n"); + fail =3D 1; + } + if ((tx_fifo_num =3D=3D 0) || (tx_fifo_num > 8)) { + printk("tx_fifo_num can take value from 1 to 8\n"); + fail =3D 1; + } + switch (tx_fifo_num) { + case 8: + if ((tx_fifo_len_7 =3D=3D 0) || tx_fifo_len_7 > 8192) { + printk + ("tx_fifo_len_7 can take value from 1 to 8192\n"); + fail =3D 1; + } + case 7: + if ((tx_fifo_len_6 =3D=3D 0) || tx_fifo_len_6 > 8192) { + printk + ("tx_fifo_len_6 can take value from 1 to 8192\n"); + fail =3D 1; + } + case 6: + if ((tx_fifo_len_5 =3D=3D 0) || tx_fifo_len_5 > 8192) { + printk + ("tx_fifo_len_5 can take value from 1 to 8192\n"); + fail =3D 1; + } + case 5: + if ((tx_fifo_len_4 =3D=3D 0) || tx_fifo_len_4 > 8192) { + printk + ("tx_fifo_len_4 can take value from 1 to 8192\n"); + fail =3D 1; + } + case 4: + if ((tx_fifo_len_3 =3D=3D 0) || tx_fifo_len_3 > 8192) { + printk + ("tx_fifo_len_3 can take value from 1 to 8192\n"); + fail =3D 1; + } + case 3: + if ((tx_fifo_len_2 =3D=3D 0) || tx_fifo_len_2 > 8192) { + printk + ("tx_fifo_len_2 can take value from 1 to 8192\n"); + fail =3D 1; + } + case 2: + if ((tx_fifo_len_1 =3D=3D 0) || tx_fifo_len_1 > 8192) { + printk + ("tx_fifo_len_1 can take value from 1 to 8192\n"); + fail =3D 1; + } + case 1: + if ((tx_fifo_len_0 =3D=3D 0) || tx_fifo_len_0 > 8192) { + printk + ("tx_fifo_len_0 can take value from 1 to 8192\n"); + fail =3D 1; + } + } + if ((max_txds > 32) || (max_txds < 1)) { + printk("max_txds can take value from 1 to 32\n"); + fail =3D 1; + } + if ((rx_ring_num > 8) || (rx_ring_num < 1)) { + printk("rx_ring_num can take value from 1 to 8\n"); + fail =3D 1; + } + switch (rx_ring_num) { + case 8: + if (rx_ring_sz_7 < 1) { + printk + ("rx_ring_sz_7 can take value greater than 0\n"); + fail =3D 1; + } + case 7: + if (rx_ring_sz_6 < 1) { + printk + ("rx_ring_sz_6 can take value greater than 0\n"); + fail =3D 1; + } + case 6: + if (rx_ring_sz_5 < 1) { + printk + ("rx_ring_sz_5 can take value greater than 0\n"); + fail =3D 1; + } + case 5: + if (rx_ring_sz_4 < 1) { + printk + ("rx_ring_sz_4 can take value greater than 0\n"); + fail =3D 1; + } + case 4: + if (rx_ring_sz_3 < 1) { + printk + ("rx_ring_sz_3 can take value greater than 0\n"); + fail =3D 1; + } + case 3: + if (rx_ring_sz_2 < 1) { + printk + ("rx_ring_sz_2 can take value greater than 0\n"); + fail =3D 1; + } + case 2: + if (rx_ring_sz_1 < 1) { + printk + ("rx_ring_sz_1 can take value greater than 0\n"); + fail =3D 1; + } + case 1: + if (rx_ring_sz_0 < 1) { + printk + ("rx_ring_sz_0 can take value greater than 0\n"); + fail =3D 1; + } + } + if ((Stats_refresh_time < 1)) { + printk + ("Stats_refresh_time cannot be less than 1 second \n"); + fail =3D 1; + } + if (((rmac_pause_time < 0x10) && (rmac_pause_time !=3D 0)) || + (rmac_pause_time > 0xFFFF)) { + printk + ("rmac_pause_time can take value from 16 to 65535\n"); + fail =3D 1; + } + if (max_splits_trans > 7) { + printk("max_splits_trans can take value from 0 to 7\n"); + fail =3D 1; + } + if ((mc_pause_threshold_q0q3 > 0xFE)) { + printk("mc_pause_threshold_q0q3 cannot exceed 254\n"); + fail =3D 1; + } + if ((mc_pause_threshold_q4q7 > 0xFE)) { + printk("mc_pause_threshold_q4q7 cannot exceed 254\n"); + fail =3D 1; + } + if ((latency_timer) + && ((latency_timer < 8) || (latency_timer > 255))) { + printk("latency_timer can take value from 8 to 255\n"); + fail =3D 1; + } + if (max_read_byte_cnt > 3) { + printk("max_read_byte_cnt can take value from 0 to 3\n"); + fail =3D 1; + } + if (shared_splits > 31) { + printk("shared_splits cannot exceed 31\n"); + fail =3D 1; + } + if (rmac_util_period > 0xF) { + printk("rmac_util_period cannot exceed 15\n"); + fail =3D 1; + } + if (tmac_util_period > 0xF) { + printk("tmac_util_period cannot exceed 15\n"); + fail =3D 1; + } + if ((tx_utilz_periodic > 1) || (rx_utilz_periodic > 1)) { + printk + ("tx_utilz_periodic & rx_utilz_periodic can be either " + "'0' or '1'\n"); + fail =3D 1; + } + if (((tx_urange_a > 100) || (tx_urange_b > 100) || + (tx_urange_c > 100)) || (tx_urange_a > tx_urange_b) + || (tx_urange_b > tx_urange_c)) { + printk + ("tx_urange_a, tx_urange_b & tx_urange_c can take value " + "from 0 to 100 and range_a can't exceed range_b " + "neither can range_b exceed range_c\n");=09 + fail =3D 1; + } + if (((rx_urange_a > 100) || (rx_urange_b > 100) || + (rx_urange_c > 100)) || (rx_urange_a > rx_urange_b) + || (rx_urange_b > rx_urange_c)) { + printk + ("rx_urange_a, rx_urange_b & rx_urange_c can take value " + "from 0 to 100 and range_a can't exceed range_b " + "neither can range_b exceed range_c\n");=09 + fail =3D 1; + } + if ((tx_ufc_a > 0xffff) || (tx_ufc_b > 0xffff) || + (tx_ufc_c > 0xffff) || (tx_ufc_d > 0xffff)) { + printk + (" tx_ufc_a, tx_ufc_b, tx_ufc_c, tx_ufc_d can take value" + "from 0 to 65535(0xFFFF)\n"); + fail =3D 1; + } + if ((rx_ufc_a > 0xffff) || (rx_ufc_b > 0xffff) || + (rx_ufc_c > 0xffff) || (rx_ufc_d > 0xffff)) { + printk + (" rx_ufc_a, rx_ufc_b, rx_ufc_c, rx_ufc_d can take value" + "from 0 to 65535(0xFFFF)\n"); + fail =3D 1; + } + return fail; +} diff -urN vanilla-linux/drivers/net/s2io.h = linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-11 15:33:35.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-11 15:34:23.000000000 -0700 @@ -348,9 +348,9 @@ u8 ring_priority; /*Specifies service priority of ring */ /* OSM should not set any two rings with same priority */ u8 ring_org; /*Organization of ring */ -#define RING_ORG_BUFF1 0x01 -#define RX_RING_ORG_BUFF3 0x03 -#define RX_RING_ORG_BUFF5 0x05 +#define RING_ORG_BUFF1 0x01 +#define RX_RING_ORG_BUFF3 0x03 +#define RX_RING_ORG_BUFF5 0x05 =20 u8 f_no_snoop; #define NO_SNOOP_RXD 0x01 ------=_NextPart_000_004F_01C4B150.9E93E890-- From ravinandan.arakali@s2io.com Wed Oct 13 18:08:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 18:08:21 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9E18FuS000384 for ; Wed, 13 Oct 2004 18:08:16 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9E17nje021578; Wed, 13 Oct 2004 21:07:49 -0400 (EDT) Received: from rarakali ([10.16.16.108]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9E17j39001168; Wed, 13 Oct 2004 21:07:45 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , Subject: [PATCH 2.6.9-rc2 6/8] S2io: new txd allocation Date: Wed, 13 Oct 2004 18:15:42 -0700 Message-ID: <005201c4b18b$538b5ff0$6c10100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0053_01C4B150.A72C87F0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10189 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Content-Length: 12532 Lines: 384 This is a multi-part message in MIME format. ------=_NextPart_000_0053_01C4B150.A72C87F0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, The attached patch contains a modified scheme for allocating Tx descriptor blocks. More description follows. In the old scheme, the entire Tx descriptor space was allocated in one go. This could cause driver load to fail on systems with low(or scattered) memory. The Tx descriptor blocks are now allocated on per-page basis. A new structure (list_info) has been introduced in nic_t structure to keep track of the physical and virtual addresses of every TxD allocated this way. Signed-off-by: Raghavendra Koushik ------=_NextPart_000_0053_01C4B150.A72C87F0 Content-Type: application/octet-stream; name="s2io_newtxalloc.patch6" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="s2io_newtxalloc.patch6" diff -urN vanilla-linux/drivers/net/s2io.c = linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-11 16:49:34.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-11 17:20:24.000000000 -0700 @@ -305,6 +305,9 @@ remove:__devexit_p(s2io_rem_nic), }; =20 +/* A simplifier macro used both by init and free shared_mem Fns(). */ +#define TXD_MEM_PAGE_CNT(len, per_each) ((len+per_each - 1) / per_each) + /** * init_shared_mem - Allocation and Initialization of Memory * @nic: Device private variable. @@ -320,6 +323,7 @@ dma_addr_t tmp_p_addr, tmp_p_addr_next; RxD_block_t *pre_rxd_blk =3D NULL; int i, j, blk_cnt; + int lst_size, lst_per_page; struct net_device *dev =3D nic->dev; =20 mac_info_t *mac_control; @@ -341,39 +345,55 @@ DBG_PRINT(ERR_DBG, "that can be used\n"); return FAILURE; } - size *=3D (sizeof(TxD_t) * config->max_txds); =20 - mac_control->txd_list_mem =3D pci_alloc_consistent - (nic->pdev, size, &mac_control->txd_list_mem_phy); - if (!mac_control->txd_list_mem) { - return -ENOMEM; - } - mac_control->txd_list_mem_sz =3D size; - - tmp_v_addr =3D mac_control->txd_list_mem; - tmp_p_addr =3D mac_control->txd_list_mem_phy; - memset(tmp_v_addr, 0, size); - - DBG_PRINT(INIT_DBG, "%s:List Mem PHY: 0x%llx\n", dev->name, - (unsigned long long) tmp_p_addr); + lst_size =3D (sizeof(TxD_t) * config->max_txds); + lst_per_page =3D PAGE_SIZE / lst_size; =20 for (i =3D 0; i < config->tx_fifo_num; i++) { - mac_control->txdl_start_phy[i] =3D tmp_p_addr; - mac_control->txdl_start[i] =3D (TxD_t *) tmp_v_addr; + int fifo_len =3D config->tx_cfg[i].fifo_len; + int list_holder_size =3D fifo_len * sizeof(list_info_hold_t); + nic->list_info[i] =3D kmalloc(list_holder_size, GFP_KERNEL); + if (!nic->list_info[i]) { + DBG_PRINT(ERR_DBG, + "Malloc failed for list_info\n"); + return -ENOMEM; + } + memset(nic->list_info[i], 0, list_holder_size); + } + for (i =3D 0; i < config->tx_fifo_num; i++) { + int page_num =3D TXD_MEM_PAGE_CNT(config->tx_cfg[i].fifo_len, + lst_per_page); mac_control->tx_curr_put_info[i].offset =3D 0; mac_control->tx_curr_put_info[i].fifo_len =3D config->tx_cfg[i].fifo_len - 1; mac_control->tx_curr_get_info[i].offset =3D 0; mac_control->tx_curr_get_info[i].fifo_len =3D config->tx_cfg[i].fifo_len - 1; - - tmp_p_addr +=3D - (config->tx_cfg[i].fifo_len * (sizeof(TxD_t)) * - config->max_txds); - tmp_v_addr +=3D - (config->tx_cfg[i].fifo_len * (sizeof(TxD_t)) * - config->max_txds); + for (j =3D 0; j < page_num; j++) { + int k =3D 0; + dma_addr_t tmp_p; + void *tmp_v; + tmp_v =3D pci_alloc_consistent(nic->pdev, + PAGE_SIZE, &tmp_p); + if (!tmp_v) { + DBG_PRINT(ERR_DBG, + "pci_alloc_consistent "); + DBG_PRINT(ERR_DBG, "failed for TxDL\n"); + return -ENOMEM; + } + while (k < lst_per_page) { + int l =3D (j * lst_per_page) + k; + if (l =3D=3D config->tx_cfg[i].fifo_len) + goto end_txd_alloc; + nic->list_info[i][l].list_virt_addr =3D + tmp_v + (k * lst_size); + nic->list_info[i][l].list_phy_addr =3D + tmp_p + (k * lst_size); + k++; + } + } } + end_txd_alloc: =20 /* Allocation and initialization of RXDs in Rings */ size =3D 0; @@ -484,6 +504,7 @@ dma_addr_t tmp_p_addr; mac_info_t *mac_control; struct config_param *config; + int lst_size, lst_per_page; =20 =20 if (!nic) @@ -492,11 +513,23 @@ mac_control =3D &nic->mac_control; config =3D &nic->config; =20 - if (mac_control->txd_list_mem) { - pci_free_consistent(nic->pdev, - mac_control->txd_list_mem_sz, - mac_control->txd_list_mem, - mac_control->txd_list_mem_phy); + lst_size =3D (sizeof(TxD_t) * config->max_txds); + lst_per_page =3D PAGE_SIZE / lst_size; + + for (i =3D 0; i < config->tx_fifo_num; i++) { + int page_num =3D TXD_MEM_PAGE_CNT(config->tx_cfg[i].fifo_len, + lst_per_page); + for (j =3D 0; j < page_num; j++) { + int mem_blks =3D (j * lst_per_page); + if (!nic->list_info[i][mem_blks].list_virt_addr) + break; + pci_free_consistent(nic->pdev, PAGE_SIZE, + nic->list_info[i][mem_blks]. + list_virt_addr, + nic->list_info[i][mem_blks]. + list_phy_addr); + } + kfree(nic->list_info[i]); } =20 size =3D (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t)); @@ -1444,8 +1477,8 @@ =20 for (i =3D 0; i < config->tx_fifo_num; i++) { for (j =3D 0; j < config->tx_cfg[i].fifo_len - 1; j++) { - txdp =3D mac_control->txdl_start[i] + - (config->max_txds * j); + txdp =3D (TxD_t *) nic->list_info[i][j]. + list_virt_addr; skb =3D (struct sk_buff *) ((unsigned long) txdp-> Host_Control); @@ -1460,6 +1493,8 @@ DBG_PRINT(INTR_DBG, "%s:forcibly freeing %d skbs on FIFO%d\n", dev->name, cnt, i); + mac_control->tx_curr_get_info[i].offset =3D 0; + mac_control->tx_curr_put_info[i].offset =3D 0; } } =20 @@ -1896,7 +1931,7 @@ { XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) nic->bar0; struct net_device *dev =3D (struct net_device *) nic->dev; - tx_curr_get_info_t offset_info, offset_info1; + tx_curr_get_info_t get_info, put_info; struct sk_buff *skb; TxD_t *txdlp; register u64 val64 =3D 0; @@ -1916,12 +1951,12 @@ writeq(val64, &bar0->tx_traffic_int); =20 for (i =3D 0; i < config->tx_fifo_num; i++) { - offset_info =3D mac_control->tx_curr_get_info[i]; - offset_info1 =3D mac_control->tx_curr_put_info[i]; - txdlp =3D mac_control->txdl_start[i] + - (config->max_txds * offset_info.offset); + get_info =3D mac_control->tx_curr_get_info[i]; + put_info =3D mac_control->tx_curr_put_info[i]; + txdlp =3D (TxD_t *) nic->list_info[i][get_info.offset]. + list_virt_addr; while ((!(txdlp->Control_1 & TXD_LIST_OWN_XENA)) && - (offset_info.offset !=3D offset_info1.offset) && + (get_info.offset !=3D put_info.offset) && (txdlp->Host_Control)) { /* Check for TxD errors */ if (txdlp->Control_1 & TXD_T_CODE) { @@ -1971,12 +2006,12 @@ nic->stats.tx_bytes +=3D skb->len; dev_kfree_skb_irq(skb); =20 - offset_info.offset++; - offset_info.offset %=3D offset_info.fifo_len + 1; - txdlp =3D mac_control->txdl_start[i] + - (config->max_txds * offset_info.offset); + get_info.offset++; + get_info.offset %=3D get_info.fifo_len + 1; + txdlp =3D (TxD_t *) nic->list_info[i] + [get_info.offset].list_virt_addr; mac_control->tx_curr_get_info[i].offset =3D - offset_info.offset; + get_info.offset; } } =20 @@ -2327,7 +2362,9 @@ XENA_dev_config_t *bar0 =3D (XENA_dev_config_t *) sp->bar0; register u64 val64 =3D 0; u16 cnt =3D 0; + unsigned long flags; =20 + spin_lock_irqsave(&sp->tx_lock, flags); netif_stop_queue(dev); =20 /* disable Tx and Rx traffic on the NIC */ @@ -2381,6 +2418,7 @@ free_rx_buffers(sp); =20 sp->device_close_flag =3D TRUE; /* Device is shut down. */ + spin_unlock_irqrestore(&sp->tx_lock, flags); =20 return 0; } @@ -2401,7 +2439,7 @@ int s2io_xmit(struct sk_buff *skb, struct net_device *dev) { nic_t *sp =3D dev->priv; - u16 off, txd_len, frg_cnt, frg_len, i, queue, off1, queue_len; + u16 frg_cnt, frg_len, i, queue, queue_len, put_off, get_off; register u64 val64; TxD_t *txdp; TxFIFO_element_t *tx_fifo; @@ -2419,6 +2457,14 @@ DBG_PRINT(TX_DBG, "%s: In S2IO Tx routine\n", dev->name); =20 spin_lock_irqsave(&sp->tx_lock, flags); + if ((netif_queue_stopped(dev)) || (!netif_carrier_ok(dev))) { + DBG_PRINT(TX_DBG, "%s:s2io_xmit: Tx Queue stopped\n", + dev->name); + dev_kfree_skb(skb); + spin_unlock_irqrestore(&sp->tx_lock, flags); + return 0; + } + queue =3D 0; /* Multi FIFO Tx is disabled for now. */ if (!queue && tx_prio) { @@ -2427,14 +2473,13 @@ } =20 =20 - off =3D (u16) mac_control->tx_curr_put_info[queue].offset; - off1 =3D (u16) mac_control->tx_curr_get_info[queue].offset; - txd_len =3D config->max_txds; - txdp =3D mac_control->txdl_start[queue] + (config->max_txds * off); + put_off =3D (u16) mac_control->tx_curr_put_info[queue].offset; + get_off =3D (u16) mac_control->tx_curr_get_info[queue].offset; + txdp =3D (TxD_t *) sp->list_info[queue][put_off].list_virt_addr; =20 queue_len =3D mac_control->tx_curr_put_info[queue].fifo_len + 1; /* Avoid "put" pointer going beyond "get" pointer */ - if (txdp->Host_Control || (((off + 1) % queue_len) =3D=3D off1)) { + if (txdp->Host_Control || (((put_off + 1) % queue_len) =3D=3D = get_off)) { DBG_PRINT(ERR_DBG, "Error in xmit, No free TXDs.\n"); netif_stop_queue(dev); dev_kfree_skb(skb); @@ -2479,8 +2524,7 @@ txdp->Control_1 |=3D TXD_GATHER_CODE_LAST; =20 tx_fifo =3D mac_control->tx_FIFO_start[queue]; - val64 =3D (mac_control->txdl_start_phy[queue] + - (sizeof(TxD_t) * txd_len * off)); + val64 =3D sp->list_info[queue][put_off].list_phy_addr; writeq(val64, &tx_fifo->TxDL_Pointer); =20 val64 =3D (TX_FIFO_LAST_TXD_NUM(frg_cnt) | TX_FIFO_FIRST_LIST | @@ -2494,15 +2538,15 @@ /* Perform a PCI read to flush previous writes */ val64 =3D readq(&bar0->general_int_status); =20 - off++; - off %=3D mac_control->tx_curr_put_info[queue].fifo_len + 1; - mac_control->tx_curr_put_info[queue].offset =3D off; + put_off++; + put_off %=3D mac_control->tx_curr_put_info[queue].fifo_len + 1; + mac_control->tx_curr_put_info[queue].offset =3D put_off; =20 /* Avoid "put" pointer going beyond "get" pointer */ - if (((off + 1) % queue_len) =3D=3D off1) { + if (((put_off + 1) % queue_len) =3D=3D get_off) { DBG_PRINT(TX_DBG, "No free TxDs for xmit, Put: 0x%x Get:0x%x\n", - off, off1); + put_off, get_off); netif_stop_queue(dev); } =20 @@ -3070,7 +3114,7 @@ } =20 /** - * s2io_ethtool-setpause_data - set/reset pause frame generation. + * s2io_ethtool_setpause_data - set/reset pause frame generation. * @sp : private member of the device structure, which is a pointer to = the=20 * s2io_nic structure. * @ep : pointer to the structure with pause parameters given by = ethtool. diff -urN vanilla-linux/drivers/net/s2io.h = linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-11 16:49:34.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-11 17:20:24.000000000 -0700 @@ -444,6 +444,12 @@ u64 Host_Control; /* reserved for host */ } TxD_t; =20 +/* Structure to hold the phy and virt addr of every TxDL. */ +typedef struct list_info_hold { + dma_addr_t list_phy_addr; + void *list_virt_addr; +} list_info_hold_t; + /* Rx descriptor structure */ typedef struct _RxD_t { u64 Host_Control; /* reserved for host */ @@ -532,17 +538,9 @@ u16 mc_pause_threshold_q4q7; =20 /* tx side stuff */ - void *txd_list_mem; /* original pointer to allocated mem */ - dma_addr_t txd_list_mem_phy; - u32 txd_list_mem_sz; - /* logical pointer of start of each Tx FIFO */ TxFIFO_element_t *tx_FIFO_start[MAX_TX_FIFOS]; =20 - /* The Phy and virtual mem loactions of the Tx descriptors. */ - TxD_t *txdl_start[MAX_TX_FIFOS]; - dma_addr_t txdl_start_phy[MAX_TX_FIFOS]; - /* Current offset within tx_FIFO_start, where driver would write new Tx = frame*/ tx_curr_put_info_t tx_curr_put_info[MAX_TX_FIFOS]; tx_curr_get_info_t tx_curr_get_info[MAX_TX_FIFOS]; @@ -638,6 +636,9 @@ int block_count[MAX_RX_RINGS]; int pkt_cnt[MAX_RX_RINGS]; =20 + /* Place holder of all the TX List's Phy and Virt addresses. */ + list_info_hold_t *list_info[MAX_TX_FIFOS]; + /* Id timer, used to blink NIC to physically identify NIC. */ struct timer_list id_timer; =20 ------=_NextPart_000_0053_01C4B150.A72C87F0-- From ravinandan.arakali@s2io.com Wed Oct 13 18:08:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 18:08:56 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9E18nZJ000685 for ; Wed, 13 Oct 2004 18:08:51 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9E18Nje021585; Wed, 13 Oct 2004 21:08:23 -0400 (EDT) Received: from rarakali ([10.16.16.108]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9E18L39001233; Wed, 13 Oct 2004 21:08:21 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , Subject: [PATCH 2.6.9-rc2 7/8] S2io: NAPI fix Date: Wed, 13 Oct 2004 18:16:18 -0700 Message-ID: <005601c4b18b$691ac8b0$6c10100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0057_01C4B150.BCBBF0B0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10190 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Content-Length: 11559 Lines: 387 This is a multi-part message in MIME format. ------=_NextPart_000_0057_01C4B150.BCBBF0B0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, This patch contains the following NAPI related fixes. 1. When processing Rx packets, making sure that get offset of ring does not cross the put offset. 2. when NAPI is not in use a new spinlock(put_lock) is used to make sure accessing put offset of ring is atomic. 3. Also introduced a new vaiable put_pos in nic_t to keep track of absolute position of the put pointer of Rx ring. 4. When NAPI is used, fill_rx_buffer is not called from the interrupt handler(s2io_isr) . 5. In s2io_poll, decrementing packets processed is done inside the while loop unlike out side it as was being done last time. Signed-off-by: Raghavendra Koushik ------=_NextPart_000_0057_01C4B150.BCBBF0B0 Content-Type: application/octet-stream; name="s2io_napifix.patch7" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="s2io_napifix.patch7" diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-11 21:19:25.051771008 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-11 21:19:44.674787856 -0700 @@ -1565,6 +1565,9 @@ atomic_read(&nic->rx_bufs_left[ring_no]); mac_info_t *mac_control; struct config_param *config; +#ifndef CONFIG_S2IO_NAPI + unsigned long flags; +#endif mac_control = &nic->mac_control; config = &nic->config; @@ -1612,6 +1615,12 @@ DBG_PRINT(INTR_DBG, "%s: Next block at: %p\n", dev->name, rxdp); } +#ifndef CONFIG_S2IO_NAPI + spin_lock_irqsave(&nic->put_lock, flags); + nic->put_pos[ring_no] = (block_no * + (MAX_RXDS_PER_BLOCK + 1)) + off; + spin_unlock_irqrestore(&nic->put_lock, flags); +#endif if (rxdp->Control_1 & RXD_OWN_XENA) { mac_control->rx_curr_put_info[ring_no]. @@ -1730,8 +1739,8 @@ XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; int pkts_to_process = *budget, pkt_cnt = 0; register u64 val64 = 0; - rx_curr_get_info_t offset_info; - int i, block_no; + rx_curr_get_info_t get_info, put_info; + int i, get_block, put_block, get_offset, put_offset, ring_bufs; u16 val16, cksum; struct sk_buff *skb; RxD_t *rxdp; @@ -1748,29 +1757,40 @@ writeq(val64, &bar0->rx_traffic_int); for (i = 0; i < config->rx_ring_num; i++) { - if (--pkts_to_process < 0) { - goto no_rx; - } - offset_info = mac_control->rx_curr_get_info[i]; - block_no = offset_info.block_index; - rxdp = nic->rx_blocks[i][block_no].block_virt_addr + - offset_info.offset; - while (!(rxdp->Control_1 & RXD_OWN_XENA)) { + get_info = mac_control->rx_curr_get_info[i]; + get_block = get_info.block_index; + put_info = mac_control->rx_curr_put_info[i]; + put_block = put_info.block_index; + ring_bufs = config->rx_cfg[i].num_rxd; + rxdp = nic->rx_blocks[i][get_block].block_virt_addr + + get_info.offset; + get_offset = (get_block * (MAX_RXDS_PER_BLOCK + 1)) + + get_info.offset; + put_offset = (put_block * (MAX_RXDS_PER_BLOCK + 1)) + + put_info.offset; + while ((!(rxdp->Control_1 & RXD_OWN_XENA)) && + (((get_offset + 1) % ring_bufs) != put_offset)) { + if (--pkts_to_process < 0) { + goto no_rx; + } if (rxdp->Control_1 == END_OF_BLOCK) { rxdp = (RxD_t *) ((unsigned long) rxdp-> Control_2); - offset_info.offset++; - offset_info.offset %= + get_info.offset++; + get_info.offset %= (MAX_RXDS_PER_BLOCK + 1); - block_no++; - block_no %= nic->block_count[i]; + get_block++; + get_block %= nic->block_count[i]; mac_control->rx_curr_get_info[i]. - offset = offset_info.offset; + offset = get_info.offset; mac_control->rx_curr_get_info[i]. - block_index = block_no; + block_index = get_block; continue; } + get_offset = + (get_block * (MAX_RXDS_PER_BLOCK + 1)) + + get_info.offset; skb = (struct sk_buff *) ((unsigned long) rxdp-> Host_Control); @@ -1778,7 +1798,7 @@ DBG_PRINT(ERR_DBG, "%s: The skb is ", dev->name); DBG_PRINT(ERR_DBG, "Null in Rx Intr\n"); - return 0; + goto no_rx; } val64 = RXD_GET_BUFFER0_SIZE(rxdp->Control_2); val16 = (u16) (val64 >> 48); @@ -1792,34 +1812,44 @@ PCI_DMA_FROMDEVICE); rx_osm_handler(nic, val16, rxdp, i); pkt_cnt++; - offset_info.offset++; - offset_info.offset %= (MAX_RXDS_PER_BLOCK + 1); + get_info.offset++; + get_info.offset %= (MAX_RXDS_PER_BLOCK + 1); rxdp = - nic->rx_blocks[i][block_no].block_virt_addr + - offset_info.offset; + nic->rx_blocks[i][get_block].block_virt_addr + + get_info.offset; mac_control->rx_curr_get_info[i].offset = - offset_info.offset; + get_info.offset; } } if (!pkt_cnt) pkt_cnt = 1; - for (i = 0; i < config->rx_ring_num; i++) - fill_rx_buffers(nic, i); - dev->quota -= pkt_cnt; *budget -= pkt_cnt; netif_rx_complete(dev); + for (i = 0; i < config->rx_ring_num; i++) { + if (fill_rx_buffers(nic, i) == -ENOMEM) { + DBG_PRINT(ERR_DBG, "%s:Out of memory", dev->name); + DBG_PRINT(ERR_DBG, " in Rx Poll!!\n"); + break; + } + } /* Re enable the Rx interrupts. */ en_dis_able_nic_intrs(nic, RX_TRAFFIC_INTR, ENABLE_INTRS); return 0; no_rx: - for (i = 0; i < config->rx_ring_num; i++) - fill_rx_buffers(nic, i); dev->quota -= pkt_cnt; *budget -= pkt_cnt; + + for (i = 0; i < config->rx_ring_num; i++) { + if (fill_rx_buffers(nic, i) == -ENOMEM) { + DBG_PRINT(ERR_DBG, "%s:Out of memory", dev->name); + DBG_PRINT(ERR_DBG, " in Rx Poll!!\n"); + break; + } + } return 1; } #else @@ -1840,12 +1870,13 @@ { struct net_device *dev = (struct net_device *) nic->dev; XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; - rx_curr_get_info_t offset_info; + rx_curr_get_info_t get_info, put_info; RxD_t *rxdp; struct sk_buff *skb; u16 val16, cksum; register u64 val64 = 0; - int i, block_no, pkt_cnt = 0; + int get_block, get_offset, put_block, put_offset, ring_bufs; + int i, pkt_cnt = 0; mac_info_t *mac_control; struct config_param *config; @@ -1860,25 +1891,37 @@ writeq(val64, &bar0->rx_traffic_int); for (i = 0; i < config->rx_ring_num; i++) { - offset_info = mac_control->rx_curr_get_info[i]; - block_no = offset_info.block_index; - rxdp = nic->rx_blocks[i][block_no].block_virt_addr + - offset_info.offset; - while (!(rxdp->Control_1 & RXD_OWN_XENA)) { + get_info = mac_control->rx_curr_get_info[i]; + get_block = get_info.block_index; + put_info = mac_control->rx_curr_put_info[i]; + put_block = put_info.block_index; + ring_bufs = config->rx_cfg[i].num_rxd; + rxdp = nic->rx_blocks[i][get_block].block_virt_addr + + get_info.offset; + get_offset = (get_block * (MAX_RXDS_PER_BLOCK + 1)) + + get_info.offset; + spin_lock(&nic->put_lock); + put_offset = nic->put_pos[i]; + spin_unlock(&nic->put_lock); + while ((!(rxdp->Control_1 & RXD_OWN_XENA)) && + (((get_offset + 1) % ring_bufs) != put_offset)) { if (rxdp->Control_1 == END_OF_BLOCK) { rxdp = (RxD_t *) ((unsigned long) rxdp->Control_2); - offset_info.offset++; - offset_info.offset %= + get_info.offset++; + get_info.offset %= (MAX_RXDS_PER_BLOCK + 1); - block_no++; - block_no %= nic->block_count[i]; + get_block++; + get_block %= nic->block_count[i]; mac_control->rx_curr_get_info[i]. - offset = offset_info.offset; + offset = get_info.offset; mac_control->rx_curr_get_info[i]. - block_index = block_no; + block_index = get_block; continue; } + get_offset = + (get_block * (MAX_RXDS_PER_BLOCK + 1)) + + get_info.offset; skb = (struct sk_buff *) ((unsigned long) rxdp->Host_Control); if (skb == NULL) { @@ -1898,13 +1941,13 @@ HEADER_SNAP_SIZE, PCI_DMA_FROMDEVICE); rx_osm_handler(nic, val16, rxdp, i); - offset_info.offset++; - offset_info.offset %= (MAX_RXDS_PER_BLOCK + 1); + get_info.offset++; + get_info.offset %= (MAX_RXDS_PER_BLOCK + 1); rxdp = - nic->rx_blocks[i][block_no].block_virt_addr + - offset_info.offset; + nic->rx_blocks[i][get_block].block_virt_addr + + get_info.offset; mac_control->rx_curr_get_info[i].offset = - offset_info.offset; + get_info.offset; pkt_cnt++; if ((indicate_max_pkts) && (pkt_cnt > indicate_max_pkts)) @@ -2575,6 +2618,9 @@ struct net_device *dev = (struct net_device *) dev_id; nic_t *sp = dev->priv; XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; +#ifndef CONFIG_S2IO_NAPI + int i, ret; +#endif u64 reason = 0; mac_info_t *mac_control; struct config_param *config; @@ -2626,44 +2672,31 @@ * reallocate the buffers from the interrupt handler itself, * else schedule a tasklet to reallocate the buffers. */ -#if 1 - { - int i; - - for (i = 0; i < config->rx_ring_num; i++) { - int rxb_size = atomic_read(&sp->rx_bufs_left[i]); - int level = rx_buffer_level(sp, rxb_size, i); - - if ((level == PANIC) && (!TASKLET_IN_USE)) { - int ret; +#ifndef CONFIG_S2IO_NAPI + for (i = 0; i < config->rx_ring_num; i++) { + int rxb_size = atomic_read(&sp->rx_bufs_left[i]); + int level = rx_buffer_level(sp, rxb_size, i); - DBG_PRINT(INTR_DBG, "%s: Rx BD hit ", + if ((level == PANIC) && (!TASKLET_IN_USE)) { + DBG_PRINT(INTR_DBG, "%s: Rx BD hit ", dev->name); + DBG_PRINT(INTR_DBG, "PANIC levels\n"); + if ((ret = fill_rx_buffers(sp, i)) == -ENOMEM) { + DBG_PRINT(ERR_DBG, "%s:Out of memory", dev->name); - DBG_PRINT(INTR_DBG, "PANIC levels\n"); - if ((ret = - fill_rx_buffers(sp, i)) == -ENOMEM) { - DBG_PRINT(ERR_DBG, - "%s:Out of memory", - dev->name); - DBG_PRINT(ERR_DBG, " in ISR!!\n"); - clear_bit(0, - (unsigned long *) (&sp-> - tasklet_status)); - return IRQ_HANDLED; - } + DBG_PRINT(ERR_DBG, " in ISR!!\n"); clear_bit(0, (unsigned long *) (&sp-> tasklet_status)); - } else if ((level == LOW) - && (!atomic_read(&sp->tasklet_status))) { - tasklet_schedule(&sp->task); + return IRQ_HANDLED; } - + clear_bit(0, + (unsigned long *) (&sp->tasklet_status)); + } else if ((level == LOW) + && (!atomic_read(&sp->tasklet_status))) { + tasklet_schedule(&sp->task); } } -#else - tasklet_schedule(&sp->task); #endif return IRQ_HANDLED; @@ -4583,6 +4616,9 @@ /* Initialize spinlocks */ spin_lock_init(&sp->tx_lock); +#ifndef CONFIG_S2IO_NAPI + spin_lock_init(&sp->put_lock); +#endif /* * SXE-002: Configure link and activity LED to init state diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-11 21:19:25.051771008 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-11 21:19:44.674787856 -0700 @@ -610,6 +610,9 @@ atomic_t rx_bufs_left[MAX_RX_RINGS]; spinlock_t tx_lock; +#ifndef CONFIG_S2IO_NAPI + spinlock_t put_lock; +#endif #define PROMISC 1 #define ALL_MULTI 2 @@ -628,6 +631,11 @@ u16 tx_err_count; u16 rx_err_count; +#ifndef CONFIG_S2IO_NAPI + /* Index to the absolute position of the put pointer of Rx ring. */ + int put_pos[MAX_RX_RINGS]; +#endif + /* * Place holders for the virtual and physical addresses of * all the Rx Blocks ------=_NextPart_000_0057_01C4B150.BCBBF0B0-- From ravinandan.arakali@s2io.com Wed Oct 13 18:11:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 18:11:26 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9E1BKRY001948 for ; Wed, 13 Oct 2004 18:11:21 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9E1Arje021596; Wed, 13 Oct 2004 21:10:53 -0400 (EDT) Received: from rarakali ([10.16.16.108]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9E1Ao39002079; Wed, 13 Oct 2004 21:10:50 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , Subject: [PATCH 2.6.9-rc2 8/8] S2io: two buffer mode Date: Wed, 13 Oct 2004 18:18:47 -0700 Message-ID: <005a01c4b18b$c1fd7400$6c10100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_005B_01C4B151.159E9C00" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10191 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Content-Length: 23407 Lines: 800 This is a multi-part message in MIME format. ------=_NextPart_000_005B_01C4B151.159E9C00 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, Attached is the patch for implementing 2-buffer mode on Rx path. More description of this mode of operation follows. On certain systems when a DMA has to happen on an un-aligned memory location performance will take a significant hit. It's standard practice to offset the Rx buffer address by 2 (as Mac header is 14 bytes) so the IP header starts from an aligned location. Obviously using a single Rx buffer both cannot be achieved. Thus XFrame supports something called 2 buffer Rx mode, where in the Rx'ed frame is split into 2 parts, one is the Ethernet header and the other is the Ethernet payload. So now we can allocate proper aligned memory for both buffers, hence the DMA is not slowed down. Also, the Ethernet payload(starting from L3 header) is on an aligned location so OS need not have to do un-aligned accesses to process IP header. To achieve this, the kernel function eth_type_trans functionality has to be partially implemented in the driver itself. Signed-off-by: Raghavendra Koushik ------=_NextPart_000_005B_01C4B151.159E9C00 Content-Type: application/octet-stream; name="s2io_2buff.patch8" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="s2io_2buff.patch8" diff -urN vanilla-linux/drivers/net/Kconfig = linux-2.6.8.1/drivers/net/Kconfig --- vanilla-linux/drivers/net/Kconfig 2004-10-06 15:15:04.000000000 = -0700 +++ linux-2.6.8.1/drivers/net/Kconfig 2004-10-11 20:06:36.000000000 = -0700 @@ -2267,6 +2267,17 @@ =20 If in doubt, say N. =20 +config 2BUFF_MODE + bool "Use 2 Buffer Mode on Rx side." + depends on S2IO + ---help--- + On enabling the 2 buffer mode, the received frame will be + split into 2 parts before being DMA'ed to the hosts memory. + The parts are the ethernet header and ethernet payload.=20 + This is useful on systems where DMA'ing to to unaligned=20 + physical memory loactions comes with a heavy price. + If not sure please say N. + endmenu =20 source "drivers/net/tokenring/Kconfig" diff -urN vanilla-linux/drivers/net/s2io.c = linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-11 21:21:49.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-12 16:49:27.796331624 -0700 @@ -325,6 +325,10 @@ int i, j, blk_cnt; int lst_size, lst_per_page; struct net_device *dev =3D nic->dev; +#ifdef CONFIG_2BUFF_MODE + u64 tmp; + buffAdd_t *ba; +#endif =20 mac_info_t *mac_control; struct config_param *config; @@ -425,7 +429,11 @@ config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1); /* Allocating all the Rx blocks */ for (j =3D 0; j < blk_cnt; j++) { +#ifndef CONFIG_2BUFF_MODE size =3D (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t)); +#else + size =3D SIZE_OF_BLOCK; +#endif tmp_v_addr =3D pci_alloc_consistent(nic->pdev, size, &tmp_p_addr); if (tmp_v_addr =3D=3D NULL) { @@ -458,13 +466,60 @@ pre_rxd_blk->reserved_1 =3D END_OF_BLOCK; /* last RxD=20 * marker. */ +#ifndef CONFIG_2BUFF_MODE pre_rxd_blk->reserved_2_pNext_RxD_block =3D (unsigned long) tmp_v_addr_next; +#endif pre_rxd_blk->pNext_RxD_Blk_physical =3D (u64) tmp_p_addr_next; } } =20 +#ifdef CONFIG_2BUFF_MODE + /*=20 + * Allocation of Storages for buffer addresses in 2BUFF mode + * and the buffers as well. + */ + for (i =3D 0; i < config->rx_ring_num; i++) { + blk_cnt =3D + config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1); + nic->ba[i] =3D kmalloc((sizeof(buffAdd_t *) * blk_cnt), + GFP_KERNEL); + if (!nic->ba[i]) + return -ENOMEM; + for (j =3D 0; j < blk_cnt; j++) { + int k =3D 0; + nic->ba[i][j] =3D kmalloc((sizeof(buffAdd_t) * + (MAX_RXDS_PER_BLOCK + 1)), + GFP_KERNEL); + if (!nic->ba[i][j]) + return -ENOMEM; + while (k !=3D MAX_RXDS_PER_BLOCK) { + ba =3D &nic->ba[i][j][k]; + + ba->ba_0_org =3D (void *) kmalloc + (BUF0_LEN + ALIGN_SIZE, GFP_ATOMIC); + if (!ba->ba_0_org) + return -ENOMEM; + tmp =3D (u64) ba->ba_0_org; + tmp +=3D ALIGN_SIZE; + tmp &=3D ~((u64) ALIGN_SIZE); + ba->ba_0 =3D (void *) tmp; + + ba->ba_1_org =3D (void *) kmalloc + (BUF1_LEN + ALIGN_SIZE, GFP_ATOMIC); + if (!ba->ba_1_org) + return -ENOMEM; + tmp =3D (u64) ba->ba_1_org; + tmp +=3D ALIGN_SIZE; + tmp &=3D ~((u64) ALIGN_SIZE); + ba->ba_1 =3D (void *) tmp; + k++; + } + } + } +#endif + /* Allocation and initialization of Statistics block */ size =3D sizeof(StatInfo_t); mac_control->stats_mem =3D pci_alloc_consistent @@ -532,7 +587,11 @@ kfree(nic->list_info[i]); } =20 +#ifndef CONFIG_2BUFF_MODE size =3D (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t)); +#else + size =3D SIZE_OF_BLOCK; +#endif for (i =3D 0; i < config->rx_ring_num; i++) { blk_cnt =3D nic->block_count[i]; for (j =3D 0; j < blk_cnt; j++) { @@ -545,6 +604,27 @@ } } =20 +#ifdef CONFIG_2BUFF_MODE + /* Freeing buffer storage addresses in 2BUFF mode. */ + for (i =3D 0; i < config->rx_ring_num; i++) { + blk_cnt =3D + config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1); + for (j =3D 0; j < blk_cnt; j++) { + int k =3D 0; + if (!nic->ba[i][j]) + continue; + while (k !=3D MAX_RXDS_PER_BLOCK) { + buffAdd_t *ba =3D &nic->ba[i][j][k]; + kfree(ba->ba_0_org); + kfree(ba->ba_1_org); + k++; + } + kfree(nic->ba[i][j]); + } + if (nic->ba[i]) + kfree(nic->ba[i]); + } +#endif =20 if (mac_control->stats_mem) { pci_free_consistent(nic->pdev, @@ -1366,10 +1446,21 @@ &bar0->prc_rxd0_n[i]); =20 val64 =3D readq(&bar0->prc_ctrl_n[i]); +#ifndef CONFIG_2BUFF_MODE val64 |=3D PRC_CTRL_RC_ENABLED; +#else + val64 |=3D PRC_CTRL_RC_ENABLED | PRC_CTRL_RING_MODE_3; +#endif writeq(val64, &bar0->prc_ctrl_n[i]); } =20 +#ifdef CONFIG_2BUFF_MODE + /* Enabling 2 buffer mode by writing into Rx_pa_cfg reg. */ + val64 =3D readq(&bar0->rx_pa_cfg); + val64 |=3D RX_PA_CFG_IGNORE_L2_ERR; + writeq(val64, &bar0->rx_pa_cfg); +#endif + /*=20 * Enabling MC-RLDRAM. After enabling the device, we timeout * for around 100ms, which is approximately the time required @@ -1437,6 +1528,12 @@ } =20 /*=20 + * Don't see link state interrupts on certain switches, so=20 + * directly scheduling a link state task from here. + */ + schedule_work(&nic->set_link_task); + + /*=20 * Here we are performing soft reset on XGXS to=20 * force link down. Since link is already up, we will get * link state change interrupt after this reset @@ -1565,6 +1662,13 @@ atomic_read(&nic->rx_bufs_left[ring_no]); mac_info_t *mac_control; struct config_param *config; +#ifdef CONFIG_2BUFF_MODE + RxD_t *rxdpnext; + int nextblk; + u64 tmp; + buffAdd_t *ba; + dma_addr_t rxdpphys; +#endif #ifndef CONFIG_S2IO_NAPI unsigned long flags; #endif @@ -1589,10 +1693,14 @@ block_index; off =3D mac_control->rx_curr_put_info[ring_no].offset; off1 =3D mac_control->rx_curr_get_info[ring_no].offset; +#ifndef CONFIG_2BUFF_MODE offset =3D block_no * (MAX_RXDS_PER_BLOCK + 1) + off; offset1 =3D block_no1 * (MAX_RXDS_PER_BLOCK + 1) + off1; +#else offset =3D block_no * (MAX_RXDS_PER_BLOCK) + off; offset1 =3D block_no1 * (MAX_RXDS_PER_BLOCK) + off1; +#endif + rxdp =3D nic->rx_blocks[ring_no][block_no]. block_virt_addr + off; if ((offset =3D=3D offset1) && (rxdp->Host_Control)) { @@ -1600,6 +1708,7 @@ DBG_PRINT(INTR_DBG, " info equated\n"); goto end; } +#ifndef CONFIG_2BUFF_MODE if (rxdp->Control_1 =3D=3D END_OF_BLOCK) { mac_control->rx_curr_put_info[ring_no]. block_index++; @@ -1617,23 +1726,81 @@ } #ifndef CONFIG_S2IO_NAPI spin_lock_irqsave(&nic->put_lock, flags); + nic->put_pos[ring_no] =3D + (block_no * (MAX_RXDS_PER_BLOCK + 1)) + off; + spin_unlock_irqrestore(&nic->put_lock, flags); +#endif +#else + if (rxdp->Host_Control =3D=3D END_OF_BLOCK) { + mac_control->rx_curr_put_info[ring_no]. + block_index++; + mac_control->rx_curr_put_info[ring_no]. + block_index %=3D nic->block_count[ring_no]; + block_no =3D mac_control->rx_curr_put_info + [ring_no].block_index; + off =3D 0; + DBG_PRINT(INTR_DBG, "%s: block%d at: 0x%llx\n", + dev->name, block_no, + (unsigned long long) rxdp->Control_1); + mac_control->rx_curr_put_info[ring_no].offset =3D + off; + rxdp =3D nic->rx_blocks[ring_no][block_no]. + block_virt_addr; + } +#ifndef CONFIG_S2IO_NAPI + spin_lock_irqsave(&nic->put_lock, flags); nic->put_pos[ring_no] =3D (block_no * (MAX_RXDS_PER_BLOCK + 1)) + off; spin_unlock_irqrestore(&nic->put_lock, flags); #endif +#endif =20 - if (rxdp->Control_1 & RXD_OWN_XENA) { +#ifndef CONFIG_2BUFF_MODE + if (rxdp->Control_1 & RXD_OWN_XENA) +#else + if (rxdp->Control_2 & BIT(0)) +#endif + { mac_control->rx_curr_put_info[ring_no]. offset =3D off; goto end; } +#ifdef CONFIG_2BUFF_MODE + /*=20 + * RxDs Spanning cache lines will be replenished only=20 + * if the succeeding RxD is also owned by Host. It=20 + * will always be the ((8*i)+3) and ((8*i)+6)=20 + * descriptors for the 48 byte descriptor. The offending=20 + * decsriptor is of-course the 3rd descriptor. + */ + rxdpphys =3D nic->rx_blocks[ring_no][block_no]. + block_dma_addr + (off * sizeof(RxD_t)); + if (((u64) (rxdpphys)) % 128 > 80) { + rxdpnext =3D nic->rx_blocks[ring_no][block_no]. + block_virt_addr + (off + 1); + if (rxdpnext->Host_Control =3D=3D END_OF_BLOCK) { + nextblk =3D (block_no + 1) % + (nic->block_count[ring_no]); + rxdpnext =3D nic->rx_blocks[ring_no] + [nextblk].block_virt_addr; + } + if (rxdpnext->Control_2 & BIT(0)) + goto end; + } +#endif =20 +#ifndef CONFIG_2BUFF_MODE skb =3D dev_alloc_skb(size + NET_IP_ALIGN); +#else + skb =3D dev_alloc_skb(dev->mtu + ALIGN_SIZE + + /*BUF0_LEN + */ 22); +#endif if (!skb) { DBG_PRINT(ERR_DBG, "%s: Out of ", dev->name); DBG_PRINT(ERR_DBG, "memory to allocate SKBs\n"); return -ENOMEM; } +#ifndef CONFIG_2BUFF_MODE skb_reserve(skb, NET_IP_ALIGN); memset(rxdp, 0, sizeof(RxD_t)); rxdp->Buffer0_ptr =3D pci_map_single @@ -1645,6 +1812,33 @@ off++; off %=3D (MAX_RXDS_PER_BLOCK + 1); mac_control->rx_curr_put_info[ring_no].offset =3D off; +#else + ba =3D &nic->ba[ring_no][block_no][off]; + tmp =3D (u64) skb->data; + tmp +=3D ALIGN_SIZE; + tmp &=3D ~ALIGN_SIZE; + skb->data =3D (void *) tmp; + + memset(rxdp, 0, sizeof(RxD_t)); + rxdp->Buffer2_ptr =3D pci_map_single + (nic->pdev, skb->data, dev->mtu + 22, + PCI_DMA_FROMDEVICE); + rxdp->Buffer0_ptr =3D + pci_map_single(nic->pdev, ba->ba_0, BUF0_LEN, + PCI_DMA_FROMDEVICE); + rxdp->Buffer1_ptr =3D + pci_map_single(nic->pdev, ba->ba_1, BUF1_LEN, + PCI_DMA_FROMDEVICE); + + rxdp->Control_2 =3D SET_BUFFER2_SIZE(dev->mtu + 22); + rxdp->Control_2 |=3D SET_BUFFER0_SIZE(BUF0_LEN); + rxdp->Control_2 |=3D SET_BUFFER1_SIZE(1); /* dummy. */ + rxdp->Control_2 |=3D BIT(0); /* Set Buffer_Empty bit. */ + rxdp->Host_Control =3D (u64) ((unsigned long) (skb)); + rxdp->Control_1 |=3D RXD_OWN_XENA; + off++; + mac_control->rx_curr_put_info[ring_no].offset =3D off; +#endif atomic_inc(&nic->rx_bufs_left[ring_no]); alloc_tab++; } @@ -1670,6 +1864,9 @@ struct sk_buff *skb; mac_info_t *mac_control; struct config_param *config; +#ifdef CONFIG_2BUFF_MODE + buffAdd_t *ba; +#endif =20 mac_control =3D &sp->mac_control; config =3D &sp->config; @@ -1679,6 +1876,7 @@ off =3D j % (MAX_RXDS_PER_BLOCK + 1); rxdp =3D sp->rx_blocks[i][blk].block_virt_addr + off; =20 +#ifndef CONFIG_2BUFF_MODE if (rxdp->Control_1 =3D=3D END_OF_BLOCK) { rxdp =3D (RxD_t *) ((unsigned long) rxdp-> @@ -1686,6 +1884,12 @@ j++; blk++; } +#else + if (rxdp->Host_Control =3D=3D END_OF_BLOCK) { + blk++; + continue; + } +#endif =20 if (!(rxdp->Control_1 & RXD_OWN_XENA)) { memset(rxdp, 0, sizeof(RxD_t)); @@ -1696,6 +1900,7 @@ (struct sk_buff *) ((unsigned long) rxdp-> Host_Control); if (skb) { +#ifndef CONFIG_2BUFF_MODE pci_unmap_single(sp->pdev, (dma_addr_t) rxdp->Buffer0_ptr, dev->mtu + @@ -1703,6 +1908,21 @@ + HEADER_802_2_SIZE + HEADER_SNAP_SIZE, PCI_DMA_FROMDEVICE); +#else + ba =3D &sp->ba[i][blk][off]; + pci_unmap_single(sp->pdev, (dma_addr_t) + rxdp->Buffer0_ptr, + BUF0_LEN, + PCI_DMA_FROMDEVICE); + pci_unmap_single(sp->pdev, (dma_addr_t) + rxdp->Buffer1_ptr, + BUF1_LEN, + PCI_DMA_FROMDEVICE); + pci_unmap_single(sp->pdev, (dma_addr_t) + rxdp->Buffer2_ptr, + dev->mtu + 22, + PCI_DMA_FROMDEVICE); +#endif dev_kfree_skb(skb); atomic_dec(&sp->rx_bufs_left[i]); buf_cnt++; @@ -1741,11 +1961,16 @@ register u64 val64 =3D 0; rx_curr_get_info_t get_info, put_info; int i, get_block, put_block, get_offset, put_offset, ring_bufs; +#ifndef CONFIG_2BUFF_MODE u16 val16, cksum; +#endif struct sk_buff *skb; RxD_t *rxdp; mac_info_t *mac_control; struct config_param *config; +#ifdef CONFIG_2BUFF_MODE + buffAdd_t *ba; +#endif =20 mac_control =3D &nic->mac_control; config =3D &nic->config; @@ -1764,6 +1989,7 @@ ring_bufs =3D config->rx_cfg[i].num_rxd; rxdp =3D nic->rx_blocks[i][get_block].block_virt_addr + get_info.offset; +#ifndef CONFIG_2BUFF_MODE get_offset =3D (get_block * (MAX_RXDS_PER_BLOCK + 1)) + get_info.offset; put_offset =3D (put_block * (MAX_RXDS_PER_BLOCK + 1)) + @@ -1820,6 +2046,66 @@ mac_control->rx_curr_get_info[i].offset =3D get_info.offset; } +#else + get_offset =3D (get_block * (MAX_RXDS_PER_BLOCK + 1)) + + get_info.offset; + put_offset =3D (put_block * (MAX_RXDS_PER_BLOCK + 1)) + + put_info.offset; + while (((!(rxdp->Control_1 & RXD_OWN_XENA)) && + !(rxdp->Control_2 & BIT(0))) && + (((get_offset + 1) % ring_bufs) !=3D put_offset)) { + if (--pkts_to_process < 0) { + goto no_rx; + } + skb =3D (struct sk_buff *) ((unsigned long) + rxdp->Host_Control); + if (skb =3D=3D NULL) { + DBG_PRINT(ERR_DBG, "%s: The skb is ", + dev->name); + DBG_PRINT(ERR_DBG, "Null in Rx Intr\n"); + goto no_rx; + } + + pci_unmap_single(nic->pdev, (dma_addr_t) + rxdp->Buffer0_ptr, + BUF0_LEN, PCI_DMA_FROMDEVICE); + pci_unmap_single(nic->pdev, (dma_addr_t) + rxdp->Buffer1_ptr, + BUF1_LEN, PCI_DMA_FROMDEVICE); + pci_unmap_single(nic->pdev, (dma_addr_t) + rxdp->Buffer2_ptr, + dev->mtu + 22, + PCI_DMA_FROMDEVICE); + ba =3D &nic->ba[i][get_block][get_info.offset]; + + rx_osm_handler(nic, rxdp, i, ba); + + get_info.offset++; + mac_control->rx_curr_get_info[i].offset =3D + get_info.offset; + rxdp =3D + nic->rx_blocks[i][get_block].block_virt_addr + + get_info.offset; + + if (get_info.offset && + (!(get_info.offset % MAX_RXDS_PER_BLOCK))) { + get_info.offset =3D 0; + mac_control->rx_curr_get_info[i]. + offset =3D get_info.offset; + get_block++; + get_block %=3D nic->block_count[i]; + mac_control->rx_curr_get_info[i]. + block_index =3D get_block; + rxdp =3D + nic->rx_blocks[i][get_block]. + block_virt_addr; + } + get_offset =3D + (get_block * (MAX_RXDS_PER_BLOCK + 1)) + + get_info.offset; + pkt_cnt++; + } +#endif } if (!pkt_cnt) pkt_cnt =3D 1; @@ -1873,12 +2159,17 @@ rx_curr_get_info_t get_info, put_info; RxD_t *rxdp; struct sk_buff *skb; +#ifndef CONFIG_2BUFF_MODE u16 val16, cksum; +#endif register u64 val64 =3D 0; int get_block, get_offset, put_block, put_offset, ring_bufs; int i, pkt_cnt =3D 0; mac_info_t *mac_control; struct config_param *config; +#ifdef CONFIG_2BUFF_MODE + buffAdd_t *ba; +#endif =20 mac_control =3D &nic->mac_control; config =3D &nic->config; @@ -1898,6 +2189,7 @@ ring_bufs =3D config->rx_cfg[i].num_rxd; rxdp =3D nic->rx_blocks[i][get_block].block_virt_addr + get_info.offset; +#ifndef CONFIG_2BUFF_MODE get_offset =3D (get_block * (MAX_RXDS_PER_BLOCK + 1)) + get_info.offset; spin_lock(&nic->put_lock); @@ -1953,6 +2245,67 @@ && (pkt_cnt > indicate_max_pkts)) break; } +#else + get_offset =3D (get_block * (MAX_RXDS_PER_BLOCK + 1)) + + get_info.offset; + spin_lock(&nic->put_lock); + put_offset =3D nic->put_pos[i]; + spin_unlock(&nic->put_lock); + while (((!(rxdp->Control_1 & RXD_OWN_XENA)) && + !(rxdp->Control_2 & BIT(0))) && + (((get_offset + 1) % ring_bufs) !=3D put_offset)) { + skb =3D (struct sk_buff *) ((unsigned long) + rxdp->Host_Control); + if (skb =3D=3D NULL) { + DBG_PRINT(ERR_DBG, "%s: The skb is ", + dev->name); + DBG_PRINT(ERR_DBG, "Null in Rx Intr\n"); + return; + } + + pci_unmap_single(nic->pdev, (dma_addr_t) + rxdp->Buffer0_ptr, + BUF0_LEN, PCI_DMA_FROMDEVICE); + pci_unmap_single(nic->pdev, (dma_addr_t) + rxdp->Buffer1_ptr, + BUF1_LEN, PCI_DMA_FROMDEVICE); + pci_unmap_single(nic->pdev, (dma_addr_t) + rxdp->Buffer2_ptr, + dev->mtu + 22, + PCI_DMA_FROMDEVICE); + ba =3D &nic->ba[i][get_block][get_info.offset]; + + rx_osm_handler(nic, rxdp, i, ba); + + get_info.offset++; + mac_control->rx_curr_get_info[i].offset =3D + get_info.offset; + rxdp =3D + nic->rx_blocks[i][get_block].block_virt_addr + + get_info.offset; + + if (get_info.offset && + (!(get_info.offset % MAX_RXDS_PER_BLOCK))) { + get_info.offset =3D 0; + mac_control->rx_curr_get_info[i]. + offset =3D get_info.offset; + get_block++; + get_block %=3D nic->block_count[i]; + mac_control->rx_curr_get_info[i]. + block_index =3D get_block; + rxdp =3D + nic->rx_blocks[i][get_block]. + block_virt_addr; + } + get_offset =3D + (get_block * (MAX_RXDS_PER_BLOCK + 1)) + + get_info.offset; + pkt_cnt++; + if ((indicate_max_pkts) + && (pkt_cnt > indicate_max_pkts)) + break; + } +#endif if ((indicate_max_pkts) && (pkt_cnt > indicate_max_pkts)) break; } @@ -4096,12 +4449,21 @@ * Return value: * SUCCESS on success and -1 on failure. */ +#ifndef CONFIG_2BUFF_MODE static int rx_osm_handler(nic_t * sp, u16 len, RxD_t * rxdp, int = ring_no) +#else +static int rx_osm_handler(nic_t * sp, RxD_t * rxdp, int ring_no, + buffAdd_t * ba) +#endif { struct net_device *dev =3D (struct net_device *) sp->dev; struct sk_buff *skb =3D (struct sk_buff *) ((unsigned long) rxdp->Host_Control); u16 l3_csum, l4_csum; +#ifdef CONFIG_2BUFF_MODE + int buf0_len, buf2_len; + struct ethhdr *eth =3D (struct ethhdr *) ba->ba_0; +#endif =20 l3_csum =3D RXD_GET_L3_CKSUM(rxdp->Control_1); if ((rxdp->Control_1 & TCP_OR_UDP_FRAME) && (sp->rx_csum)) { @@ -4129,10 +4491,32 @@ DBG_PRINT(ERR_DBG, "%s: Rx error Value: 0x%llx\n", dev->name, err); } +#ifdef CONFIG_2BUFF_MODE + buf0_len =3D RXD_GET_BUFFER0_SIZE(rxdp->Control_2); + buf2_len =3D RXD_GET_BUFFER2_SIZE(rxdp->Control_2); +#endif =20 skb->dev =3D dev; +#ifndef CONFIG_2BUFF_MODE skb_put(skb, len); skb->protocol =3D eth_type_trans(skb, dev); +#else + skb_put(skb, buf2_len); + /*=20 + * Reproducing eth_type_trans functionality and running + * on the ethernet header 'eth' stripped and given to us + * by the hardware in 2Buff mode. + */ + if (*eth->h_dest & 1) { + if (!memcmp(eth->h_dest, dev->broadcast, ETH_ALEN)) + skb->pkt_type =3D PACKET_BROADCAST; + else + skb->pkt_type =3D PACKET_MULTICAST; + } else if (memcmp(eth->h_dest, dev->dev_addr, ETH_ALEN)) { + skb->pkt_type =3D PACKET_OTHERHOST; + } + skb->protocol =3D eth->h_proto; +#endif =20 #ifdef CONFIG_S2IO_NAPI netif_receive_skb(skb); @@ -4143,7 +4527,11 @@ dev->last_rx =3D jiffies; sp->rx_pkt_count++; sp->stats.rx_packets++; +#ifndef CONFIG_2BUFF_MODE sp->stats.rx_bytes +=3D len; +#else + sp->stats.rx_bytes +=3D buf0_len + buf2_len; +#endif =20 atomic_dec(&sp->rx_bufs_left[ring_no]); rxdp->Host_Control =3D 0; diff -urN vanilla-linux/drivers/net/s2io.h = linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-11 21:21:49.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-11 21:22:23.000000000 -0700 @@ -466,19 +466,46 @@ #define RXD_GET_L4_CKSUM(val) ((u16)(val) & 0xFFFF) =20 u64 Control_2; +#ifndef CONFIG_2BUFF_MODE #define MASK_BUFFER0_SIZE vBIT(0xFFFF,0,16) #define SET_BUFFER0_SIZE(val) vBIT(val,0,16) +#else +#define MASK_BUFFER0_SIZE vBIT(0xFF,0,16) +#define MASK_BUFFER1_SIZE vBIT(0xFFFF,16,16) +#define MASK_BUFFER2_SIZE vBIT(0xFFFF,32,16) +#define SET_BUFFER0_SIZE(val) vBIT(val,8,8) +#define SET_BUFFER1_SIZE(val) vBIT(val,16,16) +#define SET_BUFFER2_SIZE(val) vBIT(val,32,16) +#endif + #define MASK_VLAN_TAG vBIT(0xFFFF,48,16) #define SET_VLAN_TAG(val) vBIT(val,48,16) #define SET_NUM_TAG(val) vBIT(val,16,32) =20 +#ifndef CONFIG_2BUFF_MODE #define RXD_GET_BUFFER0_SIZE(Control_2) (u64)((Control_2 & = vBIT(0xFFFF,0,16))) +#else +#define RXD_GET_BUFFER0_SIZE(Control_2) (u8)((Control_2 & = MASK_BUFFER0_SIZE) \ + >> 48) +#define RXD_GET_BUFFER1_SIZE(Control_2) (u16)((Control_2 & = MASK_BUFFER1_SIZE) \ + >> 32) +#define RXD_GET_BUFFER2_SIZE(Control_2) (u16)((Control_2 & = MASK_BUFFER2_SIZE) \ + >> 16) +#define BUF0_LEN 40 +#define BUF1_LEN 1 +#endif + u64 Buffer0_ptr; +#ifdef CONFIG_2BUFF_MODE + u64 Buffer1_ptr; + u64 Buffer2_ptr; +#endif } RxD_t; =20 /* Structure that represents the Rx descriptor block which contains=20 * 128 Rx descriptors. */ +#ifndef CONFIG_2BUFF_MODE typedef struct _RxD_block { #define MAX_RXDS_PER_BLOCK 127 RxD_t rxd[MAX_RXDS_PER_BLOCK]; @@ -492,6 +519,27 @@ * the upper 32 bits should=20 * be 0 */ } RxD_block_t; +#else +typedef struct _RxD_block { +#define MAX_RXDS_PER_BLOCK 85 + RxD_t rxd[MAX_RXDS_PER_BLOCK]; + +#define END_OF_BLOCK 0xFEFFFFFFFFFFFFFFULL + u64 reserved_1; /* 0xFEFFFFFFFFFFFFFF to mark last Rxd=20 + * in this blk */ + u64 pNext_RxD_Blk_physical; /* Phy ponter to next blk. */ +} RxD_block_t; +#define SIZE_OF_BLOCK 4096 + +/* Structure to hold virtual addresses of Buf0 and Buf1 in=20 + * 2buf mode. */ +typedef struct bufAdd { + void *ba_0_org; + void *ba_1_org; + void *ba_0; + void *ba_1; +} buffAdd_t; +#endif =20 /* Structure which stores all the MAC control parameters */ =20 @@ -677,6 +725,10 @@ #define LINK_DOWN 1 #define LINK_UP 2 =20 +#ifdef CONFIG_2BUFF_MODE + /* Buffer Address store. */ + buffAdd_t **ba[MAX_RX_RINGS]; +#endif int task_flag; } nic_t; =20 @@ -802,7 +854,12 @@ static void s2io_tx_watchdog(struct net_device *dev); static void s2io_tasklet(unsigned long dev_addr); static void s2io_set_multicast(struct net_device *dev); +#ifndef CONFIG_2BUFF_MODE static int rx_osm_handler(nic_t * sp, u16 len, RxD_t * rxdp, int = ring_no); +#else +static int rx_osm_handler(nic_t * sp, RxD_t * rxdp, int ring_no, + buffAdd_t * ba); +#endif void s2io_link(nic_t * sp, int link); void s2io_reset(nic_t * sp); #ifdef CONFIG_S2IO_NAPI ------=_NextPart_000_005B_01C4B151.159E9C00-- From pekon@fi.muni.cz Wed Oct 13 19:56:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 19:56:12 -0700 (PDT) Received: from anor.ics.muni.cz (root@anor.ics.muni.cz [147.251.4.35]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9E2u6X9004774 for ; Wed, 13 Oct 2004 19:56:07 -0700 Received: from anxur.fi.muni.cz (IDENT:0@anxur.fi.muni.cz [147.251.48.3]) by anor.ics.muni.cz (8.12.1/8.12.1) with ESMTP id i9E2tndj025803 for ; Thu, 14 Oct 2004 04:55:49 +0200 Received: from decibel.fi.muni.cz (mail@decibel.fi.muni.cz [147.251.50.163]) by anxur.fi.muni.cz (8.12.10/8.12.8) with ESMTP id i9E2tmc4004835 for ; Thu, 14 Oct 2004 04:55:48 +0200 (MEST) Received: from pekon by decibel.fi.muni.cz with local (Exim 3.36 #1 (Debian)) id 1CHvYE-0000B4-00; Thu, 14 Oct 2004 04:41:10 +0200 To: netdev@oss.sgi.com Subject: PATCH: netpoll with xircom_cb X-URL: http://www.fi.muni.cz/~pekon/ From: Petr Konecny Date: Thu, 14 Oct 2004 04:41:10 +0200 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Security Through Obscurity, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Muni-Spam-TestIP: 147.251.48.3 X-Muni-Virus-Test: Clean X-archive-position: 10192 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pekon@fi.muni.cz Precedence: bulk X-list: netdev Content-Length: 2162 Lines: 57 Hi, I have a headless computer with xircom pcmcia card and needed netconsole on it. After looking around in other drivers I concocted this patch. It survived light testing. I have no documentation for the hw, so it maybe totally bogus. What do you think ? Petr lspci -v of the card is: 0000:02:00.1 Serial controller: Xircom Cardbus Ethernet + 56k Modem (rev 03) (prog-if 02 [16550]) Subsystem: Xircom CBEM56G-100 Ethernet + 56k Modem Flags: medium devsel, IRQ 11 I/O ports at 4080 [size=8] Memory at 10801000 (32-bit, non-prefetchable) [size=2K] Memory at 10801800 (32-bit, non-prefetchable) [size=2K] Expansion ROM at 10404000 [disabled] [size=16K] Capabilities: [dc] Power Management version 1 --- linux-2.6.8.1/drivers/net/tulip/xircom_cb.c 2004-08-13 22:37:38.000000000 -0700 +++ work/drivers/net/tulip/xircom_cb.c 2004-10-13 18:54:34.000000000 -0700 @@ -117,6 +117,9 @@ static int xircom_close(struct net_device *dev); static void xircom_up(struct xircom_private *card); static struct net_device_stats *xircom_get_stats(struct net_device *dev); +#if CONFIG_NET_POLL_CONTROLLER +static void xircom_poll_controller(struct net_device *dev); +#endif static void investigate_read_descriptor(struct net_device *dev,struct xircom_private *card, int descnr, unsigned int bufferoffset); static void investigate_write_descriptor(struct net_device *dev, struct xircom_private *card, int descnr, unsigned int bufferoffset); @@ -269,6 +272,9 @@ dev->stop = &xircom_close; dev->get_stats = &xircom_get_stats; dev->priv = private; +#ifdef CONFIG_NET_POLL_CONTROLLER + dev->poll_controller = &xircom_poll_controller; +#endif SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); pci_set_drvdata(pdev, dev); @@ -500,6 +506,14 @@ } +#ifdef CONFIG_NET_POLL_CONTROLLER +static void xircom_poll_controller(struct net_device *dev) +{ + disable_irq(dev->irq); + xircom_interrupt(dev->irq, dev, NULL); + enable_irq(dev->irq); +} +#endif static void initialize_card(struct xircom_private *card) From shemminger@osdl.org Wed Oct 13 20:39:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 13 Oct 2004 20:39:52 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9E3dj1g010963 for ; Wed, 13 Oct 2004 20:39:46 -0700 Received: from www.osdl.org (fire.osdl.org [65.172.181.4]) by fire-1.osdl.org (8.12.8/8.12.8) with SMTP id i9E3dNWK021622; Wed, 13 Oct 2004 20:39:26 -0700 Received: from 63.170.215.71 (SquirrelMail authenticated user shemminger) by www.osdl.org with HTTP; Wed, 13 Oct 2004 20:39:26 -0700 (PDT) Message-ID: <60664.63.170.215.71.1097725166.squirrel@www.osdl.org> In-Reply-To: <41538C5B0002BF06@ims6b.cp.tin.it> References: <41538C5B0002BF06@ims6b.cp.tin.it> Date: Wed, 13 Oct 2004 20:39:26 -0700 (PDT) Subject: Re: Unknown qdisc "netem" From: shemminger@osdl.org To: carlo.altarelli@virgilio.it Cc: netdev@oss.sgi.com User-Agent: SquirrelMail/1.4.2-1_osdl_00 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal Received-SPF: pass (domain of shemminger@osdl.org designates 65.172.181.4 as permitted sender) X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10193 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 Content-Length: 615 Lines: 12 > i'm tring to use netem under a 2.6.8.1 kernel, > the error report is : "Unknown qdisc netem", > I've just rebuild the kernel with these options about QoS: > More likely the problem is out of date versions of tc or picking up the wrong version of tc from the PATH. Some distro's put tc in /sbin but the current iproute2 'make install' puts it in /usr/sbin. With the latest iproute2 the netem support is in the shared library /usr/lib/tc/q_netem.so. I could have built it into tc but wanted to use netem as test case for the extensiblity with shared libraries, and it solves build/link issues with older kernels. From herbert@gondor.apana.org.au Thu Oct 14 02:53:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 02:54:03 -0700 (PDT) Received: from arnor.apana.org.au (arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9E9rnaE005550 for ; Thu, 14 Oct 2004 02:53:53 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CI2IJ-0001RH-00; Thu, 14 Oct 2004 19:53:11 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CI2I2-0001sI-00; Thu, 14 Oct 2004 19:52:54 +1000 From: Herbert Xu To: laforge@gnumonks.org (Harald Welte) Subject: Re: xfrm_user.c doesn't use NLMSG_F_MULTI Cc: netdev@oss.sgi.com Organization: Core In-Reply-To: <20041013080705.GB3387@obroa-skai.de.gnumonks.org> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) Message-Id: Date: Thu, 14 Oct 2004 19:52:54 +1000 X-archive-position: 10194 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 685 Lines: 19 Harald Welte wrote: > > If I send a GETSA with NLM_F_DUMP message from userspace, I receive a > batch of SA messages, but they apparently don't have the F_MULTI flag > set. > > Aren't they (all but the last msg) supposed to have the usual F_MULTI ? > Is this by intention or a mistake? The documentation says so but none of the existing users really care. The doco also says that the DONE message shouldn't have F_MULTI set but it does :) Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From rmk+netdev=oss.sgi.com@arm.linux.org.uk Thu Oct 14 03:31:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 03:31:33 -0700 (PDT) Received: from caramon.arm.linux.org.uk (caramon.arm.linux.org.uk [212.18.232.186]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9EAVQXl027584 for ; Thu, 14 Oct 2004 03:31:27 -0700 Received: from flint.arm.linux.org.uk ([2002:d412:e8ba:1:201:2ff:fe14:8fad]) by caramon.arm.linux.org.uk with asmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.41) id 1CI2sf-00041V-WA; Thu, 14 Oct 2004 11:30:46 +0100 Received: from rmk by flint.arm.linux.org.uk with local (Exim 4.41) id 1CI2se-0002V8-K4; Thu, 14 Oct 2004 11:30:44 +0100 Date: Thu, 14 Oct 2004 11:30:44 +0100 From: Russell King To: Andrew Morton Cc: Hirokazu Takata , jgarzik@pobox.com, takata@linux-m32r.org, linux-kernel@vger.kernel.org, paul.mundt@nokia.com, nico@cam.org, netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc4-mm1] [m32r] Fix smc91x driver for m32r Message-ID: <20041014113044.A5076@flint.arm.linux.org.uk> Mail-Followup-To: Andrew Morton , Hirokazu Takata , jgarzik@pobox.com, takata@linux-m32r.org, linux-kernel@vger.kernel.org, paul.mundt@nokia.com, nico@cam.org, netdev@oss.sgi.com References: <416BFD79.1010306@pobox.com> <20041013.105243.511706221.takata.hirokazu@renesas.com> <416C8E0B.4030409@pobox.com> <20041013.121547.863739114.takata.hirokazu@renesas.com> <20041012223227.45a62301.akpm@osdl.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20041012223227.45a62301.akpm@osdl.org>; from akpm@osdl.org on Tue, Oct 12, 2004 at 10:32:27PM -0700 X-archive-position: 10195 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rmk+lkml@arm.linux.org.uk Precedence: bulk X-list: netdev Content-Length: 444 Lines: 12 On Tue, Oct 12, 2004 at 10:32:27PM -0700, Andrew Morton wrote: > smc91x-assorted-minor-cleanups.patch This patch removes a comment I added to satisfy Jeff's review which explains how the link state is initialised - it probably isn't a good idea to remove this. -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/ 2.6 Serial core From uucp@ganesha.gnumonks.org Thu Oct 14 04:05:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 04:05:12 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9EB54f2016444 for ; Thu, 14 Oct 2004 04:05:05 -0700 Received: from uucp by ganesha.gnumonks.org with local-bsmtp (Exim 4.30) id 1CI3Pd-0000xB-Bp for netdev@oss.sgi.com; Thu, 14 Oct 2004 13:04:49 +0200 Received: from laforge by obroa-skai.gnumonks.org with local (Exim 3.36 #1) id 1CI3Iz-0002qj-00; Thu, 14 Oct 2004 12:57:57 +0200 Date: Thu, 14 Oct 2004 12:57:57 +0200 From: Harald Welte To: Herbert Xu Cc: netdev@oss.sgi.com Subject: Re: xfrm_user.c doesn't use NLMSG_F_MULTI Message-ID: <20041014105757.GB12694@obroa-skai.de.gnumonks.org> References: <20041013080705.GB3387@obroa-skai.de.gnumonks.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="neYutvxvOLaeuPCA" Content-Disposition: inline In-Reply-To: X-Operating-System: Linux obroa-skai.de.gnumonks.org 2.6.9-rc3-bk9gm1 X-Date: Today is Boomtime, the 68th day of Bureaucracy in the YOLD 3170 User-Agent: Mutt/1.5.6+20040722i X-archive-position: 10196 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@gnumonks.org Precedence: bulk X-list: netdev Content-Length: 1791 Lines: 54 --neYutvxvOLaeuPCA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 14, 2004 at 07:52:54PM +1000, Herbert Xu wrote: > Harald Welte wrote: > >=20 > > If I send a GETSA with NLM_F_DUMP message from userspace, I receive a > > batch of SA messages, but they apparently don't have the F_MULTI flag > > set.=20 > >=20 > > Aren't they (all but the last msg) supposed to have the usual F_MULTI ? > > Is this by intention or a mistake? >=20 > The documentation says so but none of the existing users really care. Well, people are developing more users, you know ;) Somebody at Astaro (http://www.astaro.com/) is investigating the possibilities of SA synchronization for IPsec HA, and=20 > The doco also says that the DONE message shouldn't have F_MULTI set > but it does :) Ok, would you like to receive a patch that fixes the xfrm netlink interface to be more compatible with the netlink manpage and what rtnetlink does? > Cheers, --=20 - Harald Welte http://www.gnumonks.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D Programming is like sex: One mistake and you have to support it your lifeti= me --neYutvxvOLaeuPCA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBblu1XaXGVTD0i/8RAg3AAJ0Yb/DU6Ol62rKkwHrGzWYRJ9YefgCeJGS3 lBl83UPypAfrVxEUkKQyABw= =W7B8 -----END PGP SIGNATURE----- --neYutvxvOLaeuPCA-- From herbert@gondor.apana.org.au Thu Oct 14 04:08:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 04:08:29 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9EB8EOo016843 for ; Thu, 14 Oct 2004 04:08:17 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CI3Sa-00020W-00; Thu, 14 Oct 2004 21:07:52 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CI3SR-00023r-00; Thu, 14 Oct 2004 21:07:43 +1000 Date: Thu, 14 Oct 2004 21:07:42 +1000 To: Harald Welte Cc: netdev@oss.sgi.com Subject: Re: xfrm_user.c doesn't use NLMSG_F_MULTI Message-ID: <20041014110742.GA7910@gondor.apana.org.au> References: <20041013080705.GB3387@obroa-skai.de.gnumonks.org> <20041014105757.GB12694@obroa-skai.de.gnumonks.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041014105757.GB12694@obroa-skai.de.gnumonks.org> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10197 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 541 Lines: 15 On Thu, Oct 14, 2004 at 12:57:57PM +0200, Harald Welte wrote: > > Ok, would you like to receive a patch that fixes the xfrm netlink > interface to be more compatible with the netlink manpage and what > rtnetlink does? I have no objections at all :) While you're at it please fix the other netlink users as well, e.g., tcp_diag. -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From nico@cam.org Thu Oct 14 06:47:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 06:47:47 -0700 (PDT) Received: from xanadu.home (modemcable166.48-200-24.mc.videotron.ca [24.200.48.166]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9EDlgGi025362 for ; Thu, 14 Oct 2004 06:47:43 -0700 Received: from localhost (nico@localhost) by xanadu.home (8.11.6/8.11.6) with ESMTP id i9EDkvC29337; Thu, 14 Oct 2004 09:46:57 -0400 X-Authentication-Warning: xanadu.home: nico owned process doing -bs Date: Thu, 14 Oct 2004 09:46:57 -0400 (EDT) From: Nicolas Pitre X-X-Sender: nico@xanadu.home To: Russell King cc: Andrew Morton , Hirokazu Takata , jgarzik@pobox.com, takata@linux-m32r.org, linux-kernel@vger.kernel.org, paul.mundt@nokia.com, netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc4-mm1] [m32r] Fix smc91x driver for m32r In-Reply-To: <20041014113044.A5076@flint.arm.linux.org.uk> Message-ID: References: <416BFD79.1010306@pobox.com> <20041013.105243.511706221.takata.hirokazu@renesas.com> <416C8E0B.4030409@pobox.com> <20041013.121547.863739114.takata.hirokazu@renesas.com> <20041012223227.45a62301.akpm@osdl.org> <20041014113044.A5076@flint.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 10198 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: nico@cam.org Precedence: bulk X-list: netdev Content-Length: 356 Lines: 13 On Thu, 14 Oct 2004, Russell King wrote: > On Tue, Oct 12, 2004 at 10:32:27PM -0700, Andrew Morton wrote: > > smc91x-assorted-minor-cleanups.patch > > This patch removes a comment I added to satisfy Jeff's review which > explains how the link state is initialised - it probably isn't a good > idea to remove this. It was just moved elsewhere. Nicolas From jgarzik@pobox.com Thu Oct 14 07:22:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 07:22:29 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9EEMLbA026586 for ; Thu, 14 Oct 2004 07:22:24 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CI6UY-0003m0-2B; Thu, 14 Oct 2004 15:22:06 +0100 Message-ID: <416E8B7F.9050401@pobox.com> Date: Thu, 14 Oct 2004 10:21:51 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andrew Morton CC: Hirokazu Takata , takata@linux-m32r.org, linux-kernel@vger.kernel.org, paul.mundt@nokia.com, nico@cam.org, netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc4-mm1] [m32r] Fix smc91x driver for m32r References: <416BFD79.1010306@pobox.com> <20041013.105243.511706221.takata.hirokazu@renesas.com> <416C8E0B.4030409@pobox.com> <20041013.121547.863739114.takata.hirokazu@renesas.com> <20041012223227.45a62301.akpm@osdl.org> In-Reply-To: <20041012223227.45a62301.akpm@osdl.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10199 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: 942 Lines: 26 > smc91x-revert-11923358-m32r-modify-drivers-net-smc91xc.patch > smc91x-assorted-minor-cleanups.patch > smc91x-set-the-mac-addr-from-the-smc_enable-function.patch > smc91x-fold-smc_setmulticast-into-smc_set_multicast_list.patch > smc91x-simplify-register-bank-usage.patch > smc91x-move-tx-processing-out-of-irq-context-entirely.patch > smc91x-use-a-work-queue-to-reconfigure-the-phy-from.patch > smc91x-fix-possible-leak-of-the-skb-waiting-for-mem.patch > smc91x-display-pertinent-register-values-from-the.patch > smc91x-straighten-smp-locking.patch > smc91x-cosmetics.patch > m32r-trivial-fix-of-smc91xh.patch > smc91x-fix-smp-lock-usage.patch > smc91x-more-smp-locking-fixes.patch > smc91x-fix-compilation-with-dma-on-pxa2xx.patch > smc91x-receives-two-bytes-too-many.patch > smc91x-release-on-chip-rx-packet-memory-asap.patch > > I'll unload all those onto Jeff... I'll wait for these patches, and drop other smc91x patches... Jeff From jgarzik@pobox.com Thu Oct 14 07:39:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 07:40:02 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9EEdsEU027371 for ; Thu, 14 Oct 2004 07:39:55 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CI6lX-0004Hq-3n; Thu, 14 Oct 2004 15:39:39 +0100 Message-ID: <416E8F9D.7040300@pobox.com> Date: Thu, 14 Oct 2004 10:39:25 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ravinandan.arakali@s2io.com CC: "'Francois Romieu'" , netdev@oss.sgi.com, leonid.grossman@s2io.com, raghavendra.koushik@s2io.com, rapuru.sriram@s2io.com Subject: Re: [PATCH 2.6.9-rc2 1/8] S2io: cosmetic changes References: <003e01c4b18b$0578cd70$6c10100a@S2IOtech.com> In-Reply-To: <003e01c4b18b$0578cd70$6c10100a@S2IOtech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10200 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: 3448 Lines: 109 Ravinandan Arakali wrote: > Hi All, > This is the first patch in the 8 part series. I'll be sending > the remaining immediately following this patch. OK this is MUCH improved, thanks much. There is one final problem with your patches: your email program (Outlook, it appears?) is mangling patches, preventing them from being applied by a script that looks directly at the email. Example from the first few lines of your first patch: > --- vanilla-linux/drivers/net/s2io.c 2004-10-06 11:31:09.552305224 -0700 > +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-06 13:03:08.087360376 -0700 > @@ -69,7 +69,7 @@ > =20 > /* S2io Driver name & version. */ > static char s2io_driver_name[] =3D "s2io"; > -static char s2io_driver_version[] =3D "Version 1.0"; > +static char s2io_driver_version[] =3D "Version 1.7.5.1"; > =20 > #define LINK_IS_UP(val64) (!(val64 & (ADAPTER_STATUS_RMAC_REMOTE_FAULT = > | \ > ADAPTER_STATUS_RMAC_LOCAL_FAULT))) > @@ -99,45 +99,45 @@ > }; > =20 > static char ethtool_stats_keys[][ETH_GSTRING_LEN] =3D { Now we move on the content portion of the review :) > This first patch contains cosmetic changes such as indentation, > change in comment styles, variable name changes etc. > > Randy, we'll implement your comment about C99 syntax along with > all the other comments received, in the next submission. > > Signed-off-by: Raghavendra Koushik Patch 1 comments: 1) undescribed non-cosmetic change: > @@ -1240,82 +1290,72 @@ > * force link down. Since link is already up, we will get > * link state change interrupt after this reset > */ > - writeq(0x8007051500000000ULL, &bar0->dtx_control); > + writeq(0x80010515001E0000ULL, &bar0->dtx_control); > val64 = readq(&bar0->dtx_control); > - writeq(0x80070515000000E0ULL, &bar0->dtx_control); > + udelay(50); > + writeq(0x80010515001E00E0ULL, &bar0->dtx_control); > val64 = readq(&bar0->dtx_control); > + udelay(50); > writeq(0x80070515001F00E4ULL, &bar0->dtx_control); > val64 = readq(&bar0->dtx_control); > + udelay(50); > > return SUCCESS; Resolution: describe change in patch description, or move change to another patch 2) undescribed non-cosmetic change: > #ifdef CONFIG_S2IO_NAPI > dev->poll = s2io_poll; > - dev->weight = 128; /* For now. */ > + dev->weight = 90; /* For now. */ > #endif Resolution: describe change in patch description, or move change to another patch 3) non-cosmetic change, that should not be present in upstream sources: > +#ifdef SET_ETHTOOL_OPS > SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); > - > +#endif Compatibility defines should be kept in an external package, to keep the kernel source relatively clean. There exist compatibility packages such as "kcompat" (http://sf.net/projects/gkernel/) that allow you to develop a driver using the current kernel API, and then add the needed compat definitions in a separate module. Resolution: remove #ifdef 4) non-cosmetic change, that should not be present in upstream sources: > +#ifndef SET_ETHTOOL_OPS > +#define SUPPORTED_10000baseT_Full (1 << 12) > +#endif Resolution: remove all three lines I quoted 5) don't add this #ifdef either: > +#ifdef SET_ETHTOOL_OPS > static struct ethtool_ops netdev_ethtool_ops; > +#endif More comments follow in upcoming emails. From jgarzik@pobox.com Thu Oct 14 07:44:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 07:44:54 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9EEimXY027766 for ; Thu, 14 Oct 2004 07:44:48 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CI6qH-0004SH-I8; Thu, 14 Oct 2004 15:44:33 +0100 Message-ID: <416E90C5.2090307@pobox.com> Date: Thu, 14 Oct 2004 10:44:21 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ravinandan.arakali@s2io.com CC: "'Francois Romieu'" , netdev@oss.sgi.com, leonid.grossman@s2io.com, raghavendra.koushik@s2io.com, rapuru.sriram@s2io.com Subject: Re: [PATCH 2.6.9-rc2 2/8] S2io: sw bug fixes References: <004201c4b18b$14b2f720$6c10100a@S2IOtech.com> In-Reply-To: <004201c4b18b$14b2f720$6c10100a@S2IOtech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10201 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: 2900 Lines: 83 Ravinandan Arakali wrote: > Hi, > Attached is the second patch in this submission. It contains the following > software bug fixes. > > 1. In free_rx_buffers clearing out RxDs not owned by Xena. > > 2. In alarm_intr_handler, when a serr error occurs, schedule a task to reset > the card rather than stopping Tx queue. > > 3. In s2io_close freeing IRQ before calling s2io_reset also added a new call > to flush queued tasks. This is not done if the s2io_close itself is called > from a queued task like s2io_restart_nic. > > 4. read_eeprom function has been changed such that data to be returned is > sent as an input argument and the return value represents a pass/fail. The > previous implementation as Randy had pointed out was error prone as on > failure it returned -1 which can be interpreted as all ff's, so any data > area which contained ff's in the eeprom was likely to be treated as an > error. > > 5. Added a flag "task_flag" to track if the call to s2io_close is coming > from the s2io_restart_nic function or from the ifconfig down called by > user. > > 6. Moved register_netdev call from just after setting entry points to the > end of the s2io_init_nic function. > > 7. In s2io.h field added a new member into the s2io_nic structure called > "task_flag". > > > Signed-off-by: Raghavendra Koushik Comments: 1) the following code looks wrong: > DBG_PRINT(ERR_DBG, "%s: Device indicates ", dev->name); > DBG_PRINT(ERR_DBG, "serious error!!\n"); > - netif_stop_queue(dev); > + schedule_work(&nic->rst_timer_task); Typically you want to stop the queue _and_ schedule_work(). Otherwise, the net stack will continually call your ->hard_start_xmit() hook with new skbs, _during_ your rst_timer_task. 2) can this 'if' test be removed? there is no harm in unconditionally calling flush_scheduled_work() > + /* Flush all scheduled tasks */ > + if (sp->task_flag == 1) { > + DBG_PRINT(INFO_DBG, "%s: Calling close from a task\n", > + dev->name); > + } else { > + flush_scheduled_work(); > + } 3) I do not think that s2io_close should be called from anywhere except the net stack... The following code should not be needed, unless I am missing something: > > nic_t *sp = dev->priv; > > + sp->task_flag = 1; > s2io_close(dev); > + sp->task_flag = 0; > sp->device_close_flag = TRUE; 4) the following code is correct, but should additional propagate the register_netdev() error code back to its caller, upon failure: > sp->rx_csum = 1; /* Rx chksum verify enabled by default */ > > + if (register_netdev(dev)) { > + DBG_PRINT(ERR_DBG, "Device registration failed\n"); > + goto register_failed; > + } > + From jgarzik@pobox.com Thu Oct 14 07:46:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 07:47:01 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9EEkthY028120 for ; Thu, 14 Oct 2004 07:46:55 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CI6sJ-0004UQ-QJ; Thu, 14 Oct 2004 15:46:40 +0100 Message-ID: <416E9142.8030006@pobox.com> Date: Thu, 14 Oct 2004 10:46:26 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ravinandan.arakali@s2io.com CC: "'Francois Romieu'" , netdev@oss.sgi.com, leonid.grossman@s2io.com, raghavendra.koushik@s2io.com, rapuru.sriram@s2io.com Subject: Re: [PATCH 2.6.9-rc2 3/8] S2io: optimizations References: <004601c4b18b$2ee81a30$6c10100a@S2IOtech.com> In-Reply-To: <004601c4b18b$2ee81a30$6c10100a@S2IOtech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10202 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: 533 Lines: 17 Ravinandan Arakali wrote: > Hi, > Following are the optimization-related changes made in this patch. No objections to this patch, but did I miss a description of the following change? > - if ((sp->pkt_cnt[ring] - rxb_size) > 128) { > + if ((sp->pkt_cnt[ring] - rxb_size) > 16) { > level = LOW; > - if (rxb_size < sp->pkt_cnt[ring] / 8) > + if ((sp->pkt_cnt[ring] - rxb_size) < MAX_RXDS_PER_BLOCK) { > level = PANIC; > + } > } From jgarzik@pobox.com Thu Oct 14 07:47:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 07:47:52 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9EEll8A028407 for ; Thu, 14 Oct 2004 07:47:48 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CI6tB-0004Vs-G7; Thu, 14 Oct 2004 15:47:33 +0100 Message-ID: <416E9179.406@pobox.com> Date: Thu, 14 Oct 2004 10:47:21 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ravinandan.arakali@s2io.com CC: "'Francois Romieu'" , netdev@oss.sgi.com, leonid.grossman@s2io.com, raghavendra.koushik@s2io.com, rapuru.sriram@s2io.com Subject: Re: [PATCH 2.6.9-rc2 4/8] S2io: hardware fixes References: <004a01c4b18b$36c1d660$6c10100a@S2IOtech.com> In-Reply-To: <004a01c4b18b$36c1d660$6c10100a@S2IOtech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10203 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: 29 Lines: 2 no objections to this patch From jgarzik@pobox.com Thu Oct 14 07:53:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 07:54:02 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9EErug7028919 for ; Thu, 14 Oct 2004 07:53:57 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CI6z7-0004i3-Gj; Thu, 14 Oct 2004 15:53:42 +0100 Message-ID: <416E92E8.5020103@pobox.com> Date: Thu, 14 Oct 2004 10:53:28 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ravinandan.arakali@s2io.com CC: "'Francois Romieu'" , netdev@oss.sgi.com, leonid.grossman@s2io.com, raghavendra.koushik@s2io.com, rapuru.sriram@s2io.com Subject: Re: [PATCH 2.6.9-rc2 5/8] S2io: module loadable parameters References: <004e01c4b18b$4af2c090$6c10100a@S2IOtech.com> In-Reply-To: <004e01c4b18b$4af2c090$6c10100a@S2IOtech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10204 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: 1263 Lines: 37 Major objections to this patch. Comments: 1) Should use new module_param() not older, less-type-strict MODULE_PARM() in 2.6.x kernels 2) don't create individual module options when arrays are far better suited to the task. The following technique simply bloats up the code and makes use of loops impossible: > +static unsigned int tx_fifo_len_0 = DEFAULT_FIFO_LEN; > +static unsigned int tx_fifo_len_1; > +static unsigned int tx_fifo_len_2; > +static unsigned int tx_fifo_len_3; > +static unsigned int tx_fifo_len_4; > +static unsigned int tx_fifo_len_5; > +static unsigned int tx_fifo_len_6; > +static unsigned int tx_fifo_len_7; 3) do not enable NETIF_F_SG without also enabling a checksum-offload/TSO mode of some sort > > - dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM; > + dev->features |= NETIF_F_SG; > + if (cksum_offload_enable) > + dev->features |= NETIF_F_IP_CSUM; > if (sp->high_dma_flag == TRUE) > dev->features |= NETIF_F_HIGHDMA; 4) I am unsure of the value of verify_load_parm(). Besides being huge, due to issue #2 (above), typically user module option limits should be documented, not necessarily tested. Unix philosophy "root allowed to shoot themselves in the foot" From jgarzik@pobox.com Thu Oct 14 07:58:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 07:58:51 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9EEwivm029448 for ; Thu, 14 Oct 2004 07:58:45 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CI73m-0004pE-Fr; Thu, 14 Oct 2004 15:58:30 +0100 Message-ID: <416E940A.5010501@pobox.com> Date: Thu, 14 Oct 2004 10:58:18 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ravinandan.arakali@s2io.com CC: "'Francois Romieu'" , netdev@oss.sgi.com, leonid.grossman@s2io.com, raghavendra.koushik@s2io.com, rapuru.sriram@s2io.com Subject: Re: [PATCH 2.6.9-rc2 6/8] S2io: new txd allocation References: <005201c4b18b$538b5ff0$6c10100a@S2IOtech.com> In-Reply-To: <005201c4b18b$538b5ff0$6c10100a@S2IOtech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10205 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: 1604 Lines: 45 Ravinandan Arakali wrote: > Hi, > The attached patch contains a modified scheme for allocating Tx descriptor > blocks. > More description follows. > > In the old scheme, the entire Tx descriptor space was allocated in one go. > This could cause driver load to fail on systems with low(or scattered) > memory. The Tx descriptor blocks are now allocated on per-page basis. A new > structure (list_info) has been introduced in nic_t structure to keep track > of the physical and virtual addresses of every TxD allocated this way. > > Signed-off-by: Raghavendra Koushik Comments: 1) spinlock in s2io_close looks questionable. at best you want to minimize the area covered by it. you are guaranteed that netif_running() will be false if the net stack is calling, or has called, dev->stop() hook. 2) netif_queue_stopped() will never be false when your dev->hard_start_xmit() hook is called > + if ((netif_queue_stopped(dev)) || (!netif_carrier_ok(dev))) { > + DBG_PRINT(TX_DBG, "%s:s2io_xmit: Tx Queue stopped\n", > + dev->name); > + dev_kfree_skb(skb); > + spin_unlock_irqrestore(&sp->tx_lock, flags); > + return 0; > + } > + 3) referencing the code above, you should (a) not free the package and (b) return from the following codes listed in include/linux/netdevice.h: #define NETDEV_TX_OK 0 /* driver took care of packet */ #define NETDEV_TX_BUSY 1 /* driver tx path was busy*/ #define NETDEV_TX_LOCKED -1 /* driver tx lock was already taken */ From pekon@fi.muni.cz Thu Oct 14 08:00:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 08:00:41 -0700 (PDT) Received: from anor.ics.muni.cz (root@anor.ics.muni.cz [147.251.4.35]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9EF0ZQp029817 for ; Thu, 14 Oct 2004 08:00:36 -0700 Received: from anxur.fi.muni.cz (IDENT:0@anxur.fi.muni.cz [147.251.48.3]) by anor.ics.muni.cz (8.12.1/8.12.1) with ESMTP id i9EF0Kdj014163; Thu, 14 Oct 2004 17:00:20 +0200 Received: from decibel.fi.muni.cz (mail@decibel.fi.muni.cz [147.251.50.163]) by anxur.fi.muni.cz (8.12.10/8.12.8) with ESMTP id i9EF0Jc4024294; Thu, 14 Oct 2004 17:00:20 +0200 (MEST) Received: from pekon by decibel.fi.muni.cz with local (Exim 3.36 #1 (Debian)) id 1CI6mY-0002cN-00; Thu, 14 Oct 2004 16:40:42 +0200 To: Arjan van de Ven Cc: netdev@oss.sgi.com Subject: Re: PATCH: netpoll with xircom_cb X-URL: http://www.fi.muni.cz/~pekon/ References: <20041014124140.GI2646@devserv.devel.redhat.com> From: Petr Konecny Date: Thu, 14 Oct 2004 16:40:42 +0200 In-Reply-To: <20041014124140.GI2646@devserv.devel.redhat.com> (Arjan van de Ven's message of "Thu, 14 Oct 2004 14:41:40 +0200") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Security Through Obscurity, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Muni-Spam-TestIP: 147.251.48.3 X-Muni-Virus-Test: Clean X-archive-position: 10206 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pekon@fi.muni.cz Precedence: bulk X-list: netdev Content-Length: 1872 Lines: 55 Arjan> On Thu, Oct 14, 2004 at 03:52:46AM +0200, Petr Konecny wrote: >> Hi, >> >> I have a headless computer with xircom pcmcia card and needed netconsole >> on it. After looking around in other drivers I concocted this patch. It >> survived light testing. I have no documentation for the hw, so it maybe >> totally bogus. What do you think ? Arjan> looks correct to me,however I have one remark >> +#ifdef CONFIG_NET_POLL_CONTROLLER >> +static void xircom_poll_controller(struct net_device *dev) >> +{ >> + disable_irq(dev->irq); >> + xircom_interrupt(dev->irq, dev, NULL); >> + enable_irq(dev->irq); >> +} >> +#endif AFAICS all other drivers call the interrupt routine. They differ only in disabling interrupts: some use local_irq_disable, some don't disable it at all, because of a spinlock taken in the interrupt routine. Perhaps the latter would work with xircom_cb. Arjan> I think you want to call investigate_read_descriptor() and Arjan> investigate_read_descriptor() instead of this. But this works too, at least with netconsole. Patch on top of the last one. Petr --- 2.6old/drivers/net/tulip/xircom_cb.c 2004-10-13 18:49:59.000000000 -0700 +++ 2.6/drivers/net/tulip/xircom_cb.c 2004-10-14 07:55:08.000000000 -0700 @@ -509,9 +509,17 @@ #ifdef CONFIG_NET_POLL_CONTROLLER static void xircom_poll_controller(struct net_device *dev) { - disable_irq(dev->irq); - xircom_interrupt(dev->irq, dev, NULL); - enable_irq(dev->irq); + struct xircom_private *card = netdev_priv(dev); + int i; + + enter("xircom_poll"); + spin_lock(&card->lock); + for (i=0;ilock); + leave("xircom_poll"); } #endif From jgarzik@pobox.com Thu Oct 14 08:00:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 08:00:59 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9EF0s7P029878 for ; Thu, 14 Oct 2004 08:00:54 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CI75s-0004t9-2C; Thu, 14 Oct 2004 16:00:40 +0100 Message-ID: <416E948B.5050701@pobox.com> Date: Thu, 14 Oct 2004 11:00:27 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ravinandan.arakali@s2io.com CC: "'Francois Romieu'" , netdev@oss.sgi.com, leonid.grossman@s2io.com, raghavendra.koushik@s2io.com, rapuru.sriram@s2io.com Subject: Re: [PATCH 2.6.9-rc2 7/8] S2io: NAPI fix References: <005601c4b18b$691ac8b0$6c10100a@S2IOtech.com> In-Reply-To: <005601c4b18b$691ac8b0$6c10100a@S2IOtech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10207 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: 347 Lines: 10 Comments on patch #7: 1) Can you prove that put_lock is really necessary, and not covered by other methods of synchronization? Typically the preferred model is that your RX process requires _no_ spinlocks, and instead you use the net stack API to ensure when your RX process is, and is not, running. otherwise, no objections to this patch From jgarzik@pobox.com Thu Oct 14 08:04:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 08:04:28 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9EF4CQK030879 for ; Thu, 14 Oct 2004 08:04:13 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CI794-0004zO-8i; Thu, 14 Oct 2004 16:03:58 +0100 Message-ID: <416E9550.4060001@pobox.com> Date: Thu, 14 Oct 2004 11:03:44 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ravinandan.arakali@s2io.com CC: "'Francois Romieu'" , netdev@oss.sgi.com, leonid.grossman@s2io.com, raghavendra.koushik@s2io.com, rapuru.sriram@s2io.com Subject: Re: [PATCH 2.6.9-rc2 8/8] S2io: two buffer mode References: <005a01c4b18b$c1fd7400$6c10100a@S2IOtech.com> In-Reply-To: <005a01c4b18b$c1fd7400$6c10100a@S2IOtech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10208 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: 395 Lines: 14 no objections but two comments: 1) can this not be done with SKB fragments? 2) the following code needlessly uses GFP_ATOMIC: > + ba = &nic->ba[i][j][k]; > + > + ba->ba_0_org = (void *) kmalloc > + (BUF0_LEN + ALIGN_SIZE, GFP_ATOMIC); and there is another example just a bit down from that one. From jgarzik@pobox.com Thu Oct 14 08:05:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 08:05:47 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9EF5gOH031285 for ; Thu, 14 Oct 2004 08:05:43 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CI7AW-00052I-Gd; Thu, 14 Oct 2004 16:05:28 +0100 Message-ID: <416E95AC.3010005@pobox.com> Date: Thu, 14 Oct 2004 11:05:16 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ravinandan.arakali@s2io.com CC: "'Francois Romieu'" , netdev@oss.sgi.com, leonid.grossman@s2io.com, raghavendra.koushik@s2io.com, rapuru.sriram@s2io.com Subject: s2io: patch disposition References: <005a01c4b18b$c1fd7400$6c10100a@S2IOtech.com> In-Reply-To: <005a01c4b18b$c1fd7400$6c10100a@S2IOtech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10209 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: 268 Lines: 13 Ok, I have sent all my comments for your patches. All patches must be resend, since your mailer mangled them. It is up to you whether you wish to modify these patches for my comments, or create additional patches that address my comments. Your choice. Jeff From raghavendra.koushik@s2io.com Thu Oct 14 09:44:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 09:45:02 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9EGitwN004881 for ; Thu, 14 Oct 2004 09:44:56 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9EGiPje025982; Thu, 14 Oct 2004 12:44:25 -0400 (EDT) Received: from rkoushik ([10.16.16.150]) by guinness.s2io.com (8.12.6/8.12.6) with ESMTP id i9EGi839024175; Thu, 14 Oct 2004 12:44:14 -0400 (EDT) Message-Id: <200410141644.i9EGi839024175@guinness.s2io.com> From: "Raghavendra Koushik" To: "'Jeff Garzik'" , Cc: "'Francois Romieu'" , , , Subject: RE: [PATCH 2.6.9-rc2 7/8] S2io: NAPI fix Date: Thu, 14 Oct 2004 09:44:03 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcSx/pQ8vv8Uv5BKTna4xrDRnE7bggADj0OA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-Reply-To: <416E948B.5050701@pobox.com> X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10210 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: raghavendra.koushik@s2io.com Precedence: bulk X-list: netdev Content-Length: 1378 Lines: 35 Hi Jeff, My comments inline. > -----Original Message----- > From: Jeff Garzik [mailto:jgarzik@pobox.com] > Sent: Thursday, October 14, 2004 8:00 AM > To: ravinandan.arakali@s2io.com > Cc: 'Francois Romieu'; netdev@oss.sgi.com; leonid.grossman@s2io.com; > raghavendra.koushik@s2io.com; rapuru.sriram@s2io.com > Subject: Re: [PATCH 2.6.9-rc2 7/8] S2io: NAPI fix > > Comments on patch #7: > > 1) Can you prove that put_lock is really necessary, and not covered by > other methods of synchronization? Typically the preferred model is that > your RX process requires _no_ spinlocks, and instead you use the net > stack API to ensure when your RX process is, and is not, running. > Lets say, CPU0 after processing s2io_isr, schedules s2io_tasklet. The tasklet in turn calls fill_rx_buffer which will replenish skbs into Rx descriptors and start modifying the put index of the Rx ring, at the same time if there is another Rx interrupt being processed (rx_intr_handler) on CPU1, then it will try to read put index of the ring which can result in synchronization problem. So I created this new variable put_pos to track the absolute value of the put index and make sure all its accesses are between spin locks. The same problem cannot happen if NAPI is used since the s2io_poll and fill_rx_buffer calls are serialized. -Koushik > otherwise, no objections to this patch From raghavendra.koushik@s2io.com Thu Oct 14 10:35:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 10:36:07 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9EHZqmL006188 for ; Thu, 14 Oct 2004 10:35:53 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9EHZOje026298; Thu, 14 Oct 2004 13:35:24 -0400 (EDT) Received: from rkoushik ([10.16.16.150]) by guinness.s2io.com (8.12.6/8.12.6) with ESMTP id i9EHZJ39006121; Thu, 14 Oct 2004 13:35:20 -0400 (EDT) Message-Id: <200410141735.i9EHZJ39006121@guinness.s2io.com> From: "Raghavendra Koushik" To: "'Jeff Garzik'" , Cc: "'Francois Romieu'" , , , Subject: RE: [PATCH 2.6.9-rc2 2/8] S2io: sw bug fixes Date: Thu, 14 Oct 2004 10:35:14 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcSx/FNDGukvH4fzToal+r6R5p2WmgAFl1Xg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-Reply-To: <416E90C5.2090307@pobox.com> X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10211 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: raghavendra.koushik@s2io.com Precedence: bulk X-list: netdev Content-Length: 3804 Lines: 116 > -----Original Message----- > From: Jeff Garzik [mailto:jgarzik@pobox.com] > Sent: Thursday, October 14, 2004 7:44 AM > To: ravinandan.arakali@s2io.com > Cc: 'Francois Romieu'; netdev@oss.sgi.com; leonid.grossman@s2io.com; > raghavendra.koushik@s2io.com; rapuru.sriram@s2io.com > Subject: Re: [PATCH 2.6.9-rc2 2/8] S2io: sw bug fixes > > Ravinandan Arakali wrote: > > Hi, > > Attached is the second patch in this submission. It contains the > following > > software bug fixes. > > > > 1. In free_rx_buffers clearing out RxDs not owned by Xena. > > > > 2. In alarm_intr_handler, when a serr error occurs, schedule a task to > reset > > the card rather than stopping Tx queue. > > > > 3. In s2io_close freeing IRQ before calling s2io_reset also added a new > call > > to flush queued tasks. This is not done if the s2io_close itself is > called > > from a queued task like s2io_restart_nic. > > > > 4. read_eeprom function has been changed such that data to be returned > is > > sent as an input argument and the return value represents a pass/fail. > The > > previous implementation as Randy had pointed out was error prone as on > > failure it returned -1 which can be interpreted as all ff's, so any data > > area which contained ff's in the eeprom was likely to be treated as an > > error. > > > > 5. Added a flag "task_flag" to track if the call to s2io_close is coming > > from the s2io_restart_nic function or from the ifconfig down > called by > > user. > > > > 6. Moved register_netdev call from just after setting entry points to > the > > end of the s2io_init_nic function. > > > > 7. In s2io.h field added a new member into the s2io_nic structure called > > "task_flag". > > > > > > Signed-off-by: Raghavendra Koushik > > > Comments: > > 1) the following code looks wrong: > > > DBG_PRINT(ERR_DBG, "%s: Device indicates ", dev->name); > > DBG_PRINT(ERR_DBG, "serious error!!\n"); > > - netif_stop_queue(dev); > > + schedule_work(&nic->rst_timer_task); > > Typically you want to stop the queue _and_ schedule_work(). Otherwise, > the net stack will continually call your ->hard_start_xmit() hook with > new skbs, _during_ your rst_timer_task. The reset task (s2io_restart_nic) actually calls s2io_close first, which in turn stops the queue to begin with. Hence I got rid of netif_stop_queue. > > 2) can this 'if' test be removed? there is no harm in unconditionally > calling flush_scheduled_work() > > > + /* Flush all scheduled tasks */ > > + if (sp->task_flag == 1) { > > + DBG_PRINT(INFO_DBG, "%s: Calling close from a task\n", > > + dev->name); > > + } else { > > + flush_scheduled_work(); > > + } > As I said the s2io_close can be called from stack or by the reset task. If called from the task (or work) is it still Ok to flush all scheduled works? > 3) I do not think that s2io_close should be called from anywhere except > the net stack... > > The following code should not be needed, unless I am missing something: > > > > nic_t *sp = dev->priv; > > > > + sp->task_flag = 1; > > s2io_close(dev); > > + sp->task_flag = 0; > > sp->device_close_flag = TRUE; > I believe the best way to restart the NIC is to call s2io_close and s2io_open sequentially. > > 4) the following code is correct, but should additional propagate the > register_netdev() error code back to its caller, upon failure: > > > sp->rx_csum = 1; /* Rx chksum verify enabled by default > */ > > > > + if (register_netdev(dev)) { > > + DBG_PRINT(ERR_DBG, "Device registration failed\n"); > > + goto register_failed; > > + } > > + From alex@zodiac.dnsalias.org Thu Oct 14 10:39:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 10:39:14 -0700 (PDT) Received: from ds80-237-205-72.dedicated.hosteurope.de (hs-grafik.net [80.237.205.72]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9EHd712006551 for ; Thu, 14 Oct 2004 10:39:08 -0700 Received: (qmail 2224 invoked from network); 14 Oct 2004 17:38:51 -0000 Received: from p50859ef3.dip.t-dialin.net (80.133.158.243) by n80-237-246-249.cnet.hosteurope.de with RC4-MD5 encrypted SMTP; 14 Oct 2004 17:38:51 -0000 From: Alexander Gran To: Andrew Morton Subject: Re: pppoe broken in 2.6.9-rc2-mm1, working in 2.6.7-mm1 and 2.6.7-rc3 Date: Thu, 14 Oct 2004 19:38:47 +0200 User-Agent: KMail/1.7 Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org References: <200410081736.05976@zodiac.zodiac.dnsalias.org> <20041008121713.12f888c5.akpm@osdl.org> In-Reply-To: <20041008121713.12f888c5.akpm@osdl.org> X-Need-Girlfriend: always X-Ignorant-User: yes MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410141938.47666@zodiac.zodiac.dnsalias.org> X-archive-position: 10212 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: alex@zodiac.dnsalias.org Precedence: bulk X-list: netdev Content-Length: 3092 Lines: 75 Am Freitag, 8. Oktober 2004 21:17 schrieb Andrew Morton: > Alexander Gran wrote: > > Hi, > > > > pppoe doesnot work for me on 2.6.9-rc2-mm1. It works with 2.6.7-mm1 and > > 2.6.7-rc3. > > I think I saw one similar report. Networking was a bit wobbly around > 2.6.9-rc3. Could you try 2.6.9-rc3-mm3? 2.6.9-rc4-mm1 works like a charm. Thanks.. Alex > > The problem seems to be that one package is missing: > > 2.6.7 does this: > > 17:31:09.042999 PPPoE PADI > > 17:31:09.358382 PPPoE PADO [AC-Name "AACX11-erx"] [Service-Name] > > [AC-Cookie 0xC18B5C6E2ECF4E0C6CFBB17EE5777E82] > > 17:31:09.358466 PPPoE PADR [Service-Name] [AC-Cookie > > 0xC18B5C6E2ECF4E0C6CFBB17EE5777E82] > > 17:31:09.651898 PPPoE PADS [ses 0x107d] [Service-Name] [AC-Name > > "AACX11-erx"] [AC-Cookie 0xC18B5C6E2ECF4E0C6CFBB17EE5777E82] > > 17:31:10.037167 PPPoE [ses 0x107d] LCP, Conf-Request (0x01), id 1, > > Magic-Num 0x0024067c, PFC , length 12 > > 0x0000: c021 0101 000c 0506 0024 067c 0702 > > 17:31:10.145315 PPPoE [ses 0x107d] LCP, Conf-Request (0x01), id 96, MRU > > 1492, Auth-Prot PAP, Magic-Num 0x718234ae, length 18 > > 0x0000: c021 0160 0012 0104 05d4 0304 c023 0506 > > 0x0010: 7182 34ae > > 17:31:10.145766 PPPoE [ses 0x107d] LCP, Conf-Ack (0x02), id 96, MRU > > 1492, Auth-Prot PAP, Magic-Num 0x718234ae, length 18 > > 0x0000: c021 0260 0012 0104 05d4 0304 c023 0506 > > 0x0010: 7182 34ae > > 17:31:10.147435 PPPoE [ses 0x107d] LCP, Conf-Ack (0x02), id 1, Magic-Num > > 0x0024067c, PFC , length 12 > > 0x0000: c021 0201 000c 0506 0024 067c 0702 > > 17:31:10.148875 PPPoE [ses 0x107d] LCP, Echo-Request (0x09), id 0, > > Magic-Num 0x0024067c, length 8 > > 0x0000: c021 0900 0008 0024 067c > > 17:31:10.148878 PPPoE [ses 0x107d] Auth-Req(1), Peer > > 0002567923935200490773370001@t-online.de, Name 09856472 > > 17:31:10.260645 PPPoE [ses 0x107d] LCP, Echo-Reply (0x0a), id 0, > > Magic-Num 0x718234ae, length 8 > > 0x0000: c021 0a00 0008 7182 34ae > > 17:31:10.535034 PPPoE [ses 0x107d] Auth-Ack(1), Msg > > 17:31:10.535561 PPPoE [ses 0x107d] unknown, Conf-Request (0x01), id 1, > > Deflate, MVRCA, BSD-Comp, length 15 > > 0x0000: 80fd 0101 000f 1a04 7800 1804 7800 1503 > > 0x0010: 2f > > > > 2.6.9 does not send > > 17:31:10.037167 PPPoE [ses 0x107d] LCP, Conf-Request (0x01), id 1, > > Magic-Num 0x0024067c, PFC , length 12 > > 0x0000: c021 0101 000c 0506 0024 067c 0702 > > and than the AC does not respond to the follwoing packages. > > > > regards > > Alex > > > > -- > > Encrypted Mails welcome. > > PGP-Key at http://zodiac.dnsalias.org/misc/pgpkey.asc | Key-ID: > > 0x6D7DD291 > > > > - > > To unsubscribe from this list: send the line "unsubscribe linux-kernel" > > in the body of a message to majordomo@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > Please read the FAQ at http://www.tux.org/lkml/ -- Encrypted Mails welcome. PGP-Key at http://zodiac.dnsalias.org/misc/pgpkey.asc | Key-ID: 0x6D7DD291 From raghavendra.koushik@s2io.com Thu Oct 14 11:34:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 11:34:43 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9EIYYTU011488 for ; Thu, 14 Oct 2004 11:34:34 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9EIXQje026898; Thu, 14 Oct 2004 14:33:26 -0400 (EDT) Received: from rkoushik ([10.16.16.150]) by guinness.s2io.com (8.12.6/8.12.6) with ESMTP id i9EIXI39018452; Thu, 14 Oct 2004 14:33:19 -0400 (EDT) Message-Id: <200410141833.i9EIXI39018452@guinness.s2io.com> From: "Raghavendra Koushik" To: "'Jeff Garzik'" , Cc: "'Francois Romieu'" , , , Subject: RE: [PATCH 2.6.9-rc2 8/8] S2io: two buffer mode Date: Thu, 14 Oct 2004 11:33:13 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcSx/wh26BFEucuwQO6WE/kdNJKkVwAG9iTg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-Reply-To: <416E9550.4060001@pobox.com> X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10213 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: raghavendra.koushik@s2io.com Precedence: bulk X-list: netdev Content-Length: 1265 Lines: 32 > -----Original Message----- > From: Jeff Garzik [mailto:jgarzik@pobox.com] > Sent: Thursday, October 14, 2004 8:04 AM > To: ravinandan.arakali@s2io.com > Cc: 'Francois Romieu'; netdev@oss.sgi.com; leonid.grossman@s2io.com; > raghavendra.koushik@s2io.com; rapuru.sriram@s2io.com > Subject: Re: [PATCH 2.6.9-rc2 8/8] S2io: two buffer mode > > no objections but two comments: > > 1) can this not be done with SKB fragments? > To acheve what is required, the H/W still has to split the Rx'ed frame into 2 parts. By implementing this through the SKB fragments method, the only thing we avoid is usage of ba_0 and ba_1 fields, but note that none of these are allocated or freed in fast path. They are all pre-allocated buffers (along with the Rx descriptors) and hence won't hit the Rx side performance. Also by pulling down the eth_type_trans implementation partially into the driver any kind of copy during Rx is also avoided. > 2) the following code needlessly uses GFP_ATOMIC: > > > + ba = &nic->ba[i][j][k]; > > + > > + ba->ba_0_org = (void *) kmalloc > > + (BUF0_LEN + ALIGN_SIZE, GFP_ATOMIC); > > and there is another example just a bit down from that one. From chris.leech@gmail.com Thu Oct 14 13:49:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 13:49:29 -0700 (PDT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.196]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9EKnLn4019865 for ; Thu, 14 Oct 2004 13:49:22 -0700 Received: by mproxy.gmail.com with SMTP id v30so29764rnb for ; Thu, 14 Oct 2004 13:49:02 -0700 (PDT) Received: by 10.38.8.35 with SMTP id 35mr412367rnh; Thu, 14 Oct 2004 13:49:02 -0700 (PDT) Received: by 10.38.8.67 with HTTP; Thu, 14 Oct 2004 13:49:02 -0700 (PDT) Message-ID: <41b516cb04101413492af4db1d@mail.gmail.com> Date: Thu, 14 Oct 2004 13:49:02 -0700 From: Chris Leech Reply-To: Chris Leech To: Raghavendra Koushik Subject: Re: [PATCH 2.6.9-rc2 8/8] S2io: two buffer mode Cc: Jeff Garzik , ravinandan.arakali@s2io.com, Francois Romieu , netdev@oss.sgi.com, leonid.grossman@s2io.com, rapuru.sriram@s2io.com In-Reply-To: <200410141833.i9EIXI39018452@guinness.s2io.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <416E9550.4060001@pobox.com> <200410141833.i9EIXI39018452@guinness.s2io.com> X-archive-position: 10214 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chris.leech@gmail.com Precedence: bulk X-list: netdev Content-Length: 956 Lines: 20 On Thu, 14 Oct 2004 11:33:13 -0700, Raghavendra Koushik wrote: > > 1) can this not be done with SKB fragments? > > > To acheve what is required, the H/W still has to split the Rx'ed frame into > 2 parts. By implementing this through the SKB fragments method, the only > thing we avoid is usage of ba_0 and ba_1 fields, but note that none of these > are allocated or freed in fast path. They are all pre-allocated buffers > (along with the Rx descriptors) and hence won't hit the Rx side performance. > Also by pulling down the eth_type_trans implementation partially into the > driver any kind of copy during Rx is also avoided. This change would pass skbs from the driver without the MAC header? What happens in a bridging configuration? And dev->hard_header_parse is set to eth_header_parse, which expects skb->mac.ethernet to be valid, so I think any use of packet sockets will result in a NULL dereference. - Chris From oxymoron@waste.org Thu Oct 14 13:56:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 13:56:10 -0700 (PDT) Received: from waste.org (waste.org [209.173.204.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9EKu2r3020431 for ; Thu, 14 Oct 2004 13:56:04 -0700 Received: from waste.org (localhost [127.0.0.1]) by waste.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id i9EKt0Wk027949; Thu, 14 Oct 2004 15:55:01 -0500 Received: (from oxymoron@localhost) by waste.org (8.12.3/8.12.3/Debian-7.1) id i9EKseuq027882; Thu, 14 Oct 2004 15:54:40 -0500 Date: Thu, 14 Oct 2004 15:54:40 -0500 From: Matt Mackall To: Petr Konecny Cc: netdev@oss.sgi.com, Jeff Garzik Subject: Re: PATCH: netpoll with xircom_cb Message-ID: <20041014205440.GY5414@waste.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i X-Virus-Scanned: by amavisd-new X-archive-position: 10215 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mpm@selenic.com Precedence: bulk X-list: netdev Content-Length: 627 Lines: 19 On Thu, Oct 14, 2004 at 04:41:10AM +0200, Petr Konecny wrote: > Hi, > > I have a headless computer with xircom pcmcia card and needed netconsole > on it. After looking around in other drivers I concocted this patch. It > survived light testing. I have no documentation for the hw, so it maybe > totally bogus. What do you think ? Looks good to me. In general, this generic approach is fine. We can sometimes avoid the heavyweight IRQ manipulation by using internal driver locking, but this is generally not a performance-critical path. Jeff, did you take this one? -- Mathematics is the supreme nostalgia of our time. From herbert@gondor.apana.org.au Thu Oct 14 14:31:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 14:31:16 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9ELV4IM021332 for ; Thu, 14 Oct 2004 14:31:05 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CIDBA-00086c-00; Fri, 15 Oct 2004 07:30:32 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CIDB9-0004ng-00; Fri, 15 Oct 2004 07:30:31 +1000 Date: Fri, 15 Oct 2004 07:30:30 +1000 To: Eric Dumazet Cc: netdev@oss.sgi.com, "David S. Miller" Subject: [1/3] [TCP] Create tcpdiag_dump_sock Message-ID: <20041014213030.GA18433@gondor.apana.org.au> References: <4164F60C.6080807@cosmosbay.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="xHFwDpU9dbj6ez1V" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10216 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 3360 Lines: 110 --xHFwDpU9dbj6ez1V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Oct 07, 2004 at 06:19:41PM +1000, Herbert Xu wrote: > Eric Dumazet wrote: > > > > Of course, /proc/net/tcp on such machine is not an option (never > > completes), so I cant list all connections for this machine. I really > > *need* a working ss command. > > > > Are they known problems ? > > They are known now :) I'm working on a fix to these problems so > stay tuned. OK, this series of patches should solve your problems. The first one move tcpdiag_bc_run calls into one place so that we can change its parameters next. Signed-off-by: Herbert Xu Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --xHFwDpU9dbj6ez1V Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p1 ===== net/ipv4/tcp_diag.c 1.19 vs 1.20 ===== --- 1.19/net/ipv4/tcp_diag.c 2004-10-06 15:01:14 +10:00 +++ 1.20/net/ipv4/tcp_diag.c 2004-10-14 21:11:20 +10:00 @@ -466,16 +466,26 @@ return len == 0 ? 0 : -EINVAL; } +static int tcpdiag_dump_sock(struct sk_buff *skb, struct sock *sk, + struct netlink_callback *cb) +{ + struct tcpdiagreq *r = NLMSG_DATA(cb->nlh); + + if (cb->nlh->nlmsg_len > 4 + NLMSG_SPACE(sizeof(*r))) { + struct rtattr *bc = (struct rtattr *)(r + 1); + if (!tcpdiag_bc_run(RTA_DATA(bc), RTA_PAYLOAD(bc), sk)) + return 0; + } + + return tcpdiag_fill(skb, sk, r->tcpdiag_ext, NETLINK_CB(cb->skb).pid, + cb->nlh->nlmsg_seq); +} static int tcpdiag_dump(struct sk_buff *skb, struct netlink_callback *cb) { int i, num; int s_i, s_num; struct tcpdiagreq *r = NLMSG_DATA(cb->nlh); - struct rtattr *bc = NULL; - - if (cb->nlh->nlmsg_len > 4+NLMSG_SPACE(sizeof(struct tcpdiagreq))) - bc = (struct rtattr*)(r+1); s_i = cb->args[1]; s_num = num = cb->args[2]; @@ -502,11 +512,7 @@ if (r->id.tcpdiag_sport != inet->sport && r->id.tcpdiag_sport) goto next_listen; - if (bc && !tcpdiag_bc_run(RTA_DATA(bc), RTA_PAYLOAD(bc), sk)) - goto next_listen; - if (tcpdiag_fill(skb, sk, r->tcpdiag_ext, - NETLINK_CB(cb->skb).pid, - cb->nlh->nlmsg_seq) <= 0) { + if (tcpdiag_dump_sock(skb, sk, cb) < 0) { tcp_listen_unlock(); goto done; } @@ -546,11 +552,7 @@ goto next_normal; if (r->id.tcpdiag_dport != inet->dport && r->id.tcpdiag_dport) goto next_normal; - if (bc && !tcpdiag_bc_run(RTA_DATA(bc), RTA_PAYLOAD(bc), sk)) - goto next_normal; - if (tcpdiag_fill(skb, sk, r->tcpdiag_ext, - NETLINK_CB(cb->skb).pid, - cb->nlh->nlmsg_seq) <= 0) { + if (tcpdiag_dump_sock(skb, sk, cb) < 0) { read_unlock_bh(&head->lock); goto done; } @@ -571,11 +573,7 @@ if (r->id.tcpdiag_dport != inet->dport && r->id.tcpdiag_dport) goto next_dying; - if (bc && !tcpdiag_bc_run(RTA_DATA(bc), RTA_PAYLOAD(bc), sk)) - goto next_dying; - if (tcpdiag_fill(skb, sk, r->tcpdiag_ext, - NETLINK_CB(cb->skb).pid, - cb->nlh->nlmsg_seq) <= 0) { + if (tcpdiag_dump_sock(skb, sk, cb) < 0) { read_unlock_bh(&head->lock); goto done; } --xHFwDpU9dbj6ez1V-- From herbert@gondor.apana.org.au Thu Oct 14 14:34:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 14:34:06 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9ELXxAL021735 for ; Thu, 14 Oct 2004 14:34:00 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CIDEJ-00088p-00; Fri, 15 Oct 2004 07:33:47 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CIDEJ-0004oG-00; Fri, 15 Oct 2004 07:33:47 +1000 Date: Fri, 15 Oct 2004 07:33:47 +1000 To: Eric Dumazet Cc: netdev@oss.sgi.com, "David S. Miller" Subject: [2/3] [TCP] Make tcpdiag_bc_run take tcpdiag_entry Message-ID: <20041014213347.GB18433@gondor.apana.org.au> References: <4164F60C.6080807@cosmosbay.com> <20041014213030.GA18433@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="GID0FwUMdk1T2AWN" Content-Disposition: inline In-Reply-To: <20041014213030.GA18433@gondor.apana.org.au> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10217 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 4041 Lines: 158 --GID0FwUMdk1T2AWN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline This patch adds a tcpdiag_entry struct and makes tcpdiag_bc_run use it instead of a struct sock. This will allow us to use tcpdiag_bc_run on struct open_request in the next patch. Please note that I've left the CONFIG_IPV6 defines in as to support ipv6 modules we'll need to modularise tcpdiag itself. I'll probably do that after this is all fixed. Signed-off-by: Herbert Xu Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --GID0FwUMdk1T2AWN Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p2 ===== net/ipv4/tcp_diag.c 1.20 vs 1.21 ===== --- 1.20/net/ipv4/tcp_diag.c 2004-10-14 21:11:20 +10:00 +++ 1.21/net/ipv4/tcp_diag.c 2004-10-14 21:15:04 +10:00 @@ -29,6 +29,16 @@ #include +struct tcpdiag_entry +{ + u32 *saddr; + u32 *daddr; + u16 sport; + u16 dport; + u16 family; + u16 userlocks; +}; + static struct sock *tcpnl; @@ -324,11 +334,11 @@ } -static int tcpdiag_bc_run(const void *bc, int len, struct sock *sk) +static int tcpdiag_bc_run(const void *bc, int len, + const struct tcpdiag_entry *entry) { while (len > 0) { int yes = 1; - struct inet_opt *inet = inet_sk(sk); const struct tcpdiag_bc_op *op = bc; switch (op->code) { @@ -338,19 +348,19 @@ yes = 0; break; case TCPDIAG_BC_S_GE: - yes = inet->num >= op[1].no; + yes = entry->sport >= op[1].no; break; case TCPDIAG_BC_S_LE: - yes = inet->num <= op[1].no; + yes = entry->dport <= op[1].no; break; case TCPDIAG_BC_D_GE: - yes = ntohs(inet->dport) >= op[1].no; + yes = entry->dport >= op[1].no; break; case TCPDIAG_BC_D_LE: - yes = ntohs(inet->dport) <= op[1].no; + yes = entry->dport <= op[1].no; break; case TCPDIAG_BC_AUTO: - yes = !(sk->sk_userlocks & SOCK_BINDPORT_LOCK); + yes = !(entry->userlocks & SOCK_BINDPORT_LOCK); break; case TCPDIAG_BC_S_COND: case TCPDIAG_BC_D_COND: @@ -360,7 +370,7 @@ if (cond->port != -1 && cond->port != (op->code == TCPDIAG_BC_S_COND ? - inet->num : ntohs(inet->dport))) { + entry->sport : entry->dport)) { yes = 0; break; } @@ -368,26 +378,14 @@ if (cond->prefix_len == 0) break; -#ifdef CONFIG_IPV6 - if (sk->sk_family == AF_INET6) { - struct ipv6_pinfo *np = inet6_sk(sk); - - if (op->code == TCPDIAG_BC_S_COND) - addr = (u32*)&np->rcv_saddr; - else - addr = (u32*)&np->daddr; - } else -#endif - { - if (op->code == TCPDIAG_BC_S_COND) - addr = &inet->rcv_saddr; - else - addr = &inet->daddr; - } + if (op->code == TCPDIAG_BC_S_COND) + addr = entry->saddr; + else + addr = entry->daddr; if (bitstring_match(addr, cond->addr, cond->prefix_len)) break; - if (sk->sk_family == AF_INET6 && + if (entry->family == AF_INET6 && cond->family == AF_INET) { if (addr[0] == 0 && addr[1] == 0 && addr[2] == htonl(0xffff) && @@ -472,8 +470,28 @@ struct tcpdiagreq *r = NLMSG_DATA(cb->nlh); if (cb->nlh->nlmsg_len > 4 + NLMSG_SPACE(sizeof(*r))) { + struct tcpdiag_entry entry; struct rtattr *bc = (struct rtattr *)(r + 1); - if (!tcpdiag_bc_run(RTA_DATA(bc), RTA_PAYLOAD(bc), sk)) + struct inet_opt *inet = inet_sk(sk); + + entry.family = sk->sk_family; +#ifdef CONFIG_IPV6 + if (entry.family == AF_INET6) { + struct ipv6_pinfo *np = inet6_sk(sk); + + entry.saddr = np->rcv_saddr.s6_addr32; + entry.daddr = np->daddr.s6_addr32; + } else +#endif + { + entry.saddr = &inet->rcv_saddr; + entry.daddr = &inet->daddr; + } + entry.sport = inet->num; + entry.dport = ntohs(inet->dport); + entry.userlocks = sk->sk_userlocks; + + if (!tcpdiag_bc_run(RTA_DATA(bc), RTA_PAYLOAD(bc), &entry)) return 0; } --GID0FwUMdk1T2AWN-- From herbert@gondor.apana.org.au Thu Oct 14 14:35:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 14:35:35 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9ELZTaB022095 for ; Thu, 14 Oct 2004 14:35:29 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CIDFl-00089s-00; Fri, 15 Oct 2004 07:35:17 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CIDFl-0004oo-00; Fri, 15 Oct 2004 07:35:17 +1000 Date: Fri, 15 Oct 2004 07:35:17 +1000 To: Eric Dumazet Cc: netdev@oss.sgi.com, "David S. Miller" Subject: [3/3] [TCP] Dump SYN_RECV sockets in tcpdiag Message-ID: <20041014213517.GC18433@gondor.apana.org.au> References: <4164F60C.6080807@cosmosbay.com> <20041014213030.GA18433@gondor.apana.org.au> <20041014213347.GB18433@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="+nBD6E3TurpgldQp" Content-Disposition: inline In-Reply-To: <20041014213347.GB18433@gondor.apana.org.au> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10218 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 5487 Lines: 232 --+nBD6E3TurpgldQp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Finally this patch adds the code to list SYN_RECV sockets. A future enhancement would be to do this for the GET operation as well. Signed-off-by: Herbert Xu Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --+nBD6E3TurpgldQp Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p3 ===== net/ipv4/tcp_diag.c 1.21 vs edited ===== --- 1.21/net/ipv4/tcp_diag.c 2004-10-14 21:15:04 +10:00 +++ edited/net/ipv4/tcp_diag.c 2004-10-14 23:09:14 +10:00 @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -499,6 +500,141 @@ cb->nlh->nlmsg_seq); } +static int tcpdiag_fill_req(struct sk_buff *skb, struct sock *sk, + struct open_request *req, + u32 pid, u32 seq) +{ + struct inet_opt *inet = inet_sk(sk); + unsigned char *b = skb->tail; + struct tcpdiagmsg *r; + struct nlmsghdr *nlh; + long tmo; + + nlh = NLMSG_PUT(skb, pid, seq, TCPDIAG_GETSOCK, sizeof(*r)); + r = NLMSG_DATA(nlh); + + r->tcpdiag_family = sk->sk_family; + r->tcpdiag_state = TCP_SYN_RECV; + r->tcpdiag_timer = 1; + r->tcpdiag_retrans = req->retrans; + + r->id.tcpdiag_if = sk->sk_bound_dev_if; + r->id.tcpdiag_cookie[0] = (u32)(unsigned long)req; + r->id.tcpdiag_cookie[1] = (u32)(((unsigned long)req >> 31) >> 1); + + tmo = req->expires - jiffies; + if (tmo < 0) + tmo = 0; + + r->id.tcpdiag_sport = inet->sport; + r->id.tcpdiag_dport = req->rmt_port; + r->id.tcpdiag_src[0] = req->af.v4_req.loc_addr; + r->id.tcpdiag_dst[0] = req->af.v4_req.rmt_addr; + r->tcpdiag_expires = jiffies_to_msecs(tmo), + r->tcpdiag_rqueue = 0; + r->tcpdiag_wqueue = 0; + r->tcpdiag_uid = sock_i_uid(sk); + r->tcpdiag_inode = 0; +#ifdef CONFIG_IPV6 + if (r->tcpdiag_family == AF_INET6) { + ipv6_addr_copy((struct in6_addr *)r->id.tcpdiag_src, + &req->af.v6_req.loc_addr); + ipv6_addr_copy((struct in6_addr *)r->id.tcpdiag_dst, + &req->af.v6_req.rmt_addr); + } +#endif + nlh->nlmsg_len = skb->tail - b; + + return skb->len; + +nlmsg_failure: + skb_trim(skb, b - skb->data); + return -1; +} + +static int tcpdiag_dump_reqs(struct sk_buff *skb, struct sock *sk, + struct netlink_callback *cb) +{ + struct tcpdiag_entry entry; + struct tcpdiagreq *r = NLMSG_DATA(cb->nlh); + struct tcp_opt *tp = tcp_sk(sk); + struct tcp_listen_opt *lopt; + struct rtattr *bc = NULL; + struct inet_opt *inet = inet_sk(sk); + int j, s_j; + int reqnum, s_reqnum; + int err = 0; + + s_j = cb->args[3]; + s_reqnum = cb->args[4]; + + if (s_j > 0) + s_j--; + + entry.family = sk->sk_family; + + read_lock_bh(&tp->syn_wait_lock); + + lopt = tp->listen_opt; + if (!lopt || !lopt->qlen) + goto out; + + if (cb->nlh->nlmsg_len > 4 + NLMSG_SPACE(sizeof(*r))) { + bc = (struct rtattr *)(r + 1); + entry.sport = inet->num; + entry.userlocks = sk->sk_userlocks; + } + + for (j = s_j; j < TCP_SYNQ_HSIZE; j++) { + struct open_request *req, *head = lopt->syn_table[j]; + + reqnum = 0; + for (req = head; req; reqnum++, req = req->dl_next) { + if (reqnum < s_reqnum) + continue; + if (r->id.tcpdiag_dport != req->rmt_port && + r->id.tcpdiag_dport) + continue; + + if (bc) { + entry.saddr = +#ifdef CONFIG_IPV6 + (entry.family == AF_INET6) ? + req->af.v6_req.loc_addr.s6_addr32 : +#endif + &req->af.v4_req.loc_addr; + entry.daddr = +#ifdef CONFIG_IPV6 + (entry.family == AF_INET6) ? + req->af.v6_req.rmt_addr.s6_addr32 : +#endif + &req->af.v4_req.rmt_addr; + entry.dport = ntohs(req->rmt_port); + + if (!tcpdiag_bc_run(RTA_DATA(bc), + RTA_PAYLOAD(bc), &entry)) + continue; + } + + err = tcpdiag_fill_req(skb, sk, req, + NETLINK_CB(cb->skb).pid, + cb->nlh->nlmsg_seq); + if (err < 0) { + cb->args[3] = j + 1; + cb->args[4] = reqnum; + goto out; + } + } + + s_reqnum = 0; + } + +out: + read_unlock_bh(&tp->syn_wait_lock); + + return err; +} + static int tcpdiag_dump(struct sk_buff *skb, struct netlink_callback *cb) { int i, num; @@ -516,27 +652,47 @@ struct sock *sk; struct hlist_node *node; - if (i > s_i) - s_num = 0; - num = 0; sk_for_each(sk, node, &tcp_listening_hash[i]) { struct inet_opt *inet = inet_sk(sk); - if (num < s_num) - goto next_listen; - if (!(r->tcpdiag_states&TCPF_LISTEN) || - r->id.tcpdiag_dport) - goto next_listen; + + if (num < s_num) { + num++; + continue; + } + if (r->id.tcpdiag_sport != inet->sport && r->id.tcpdiag_sport) goto next_listen; + + if (!(r->tcpdiag_states&TCPF_LISTEN) || + r->id.tcpdiag_dport || + cb->args[3] > 0) + goto syn_recv; + if (tcpdiag_dump_sock(skb, sk, cb) < 0) { tcp_listen_unlock(); goto done; } + +syn_recv: + if (!(r->tcpdiag_states&TCPF_SYN_RECV)) + goto next_listen; + + if (tcpdiag_dump_reqs(skb, sk, cb) < 0) { + tcp_listen_unlock(); + goto done; + } + next_listen: + cb->args[3] = 0; + cb->args[4] = 0; ++num; } + + s_num = 0; + cb->args[3] = 0; + cb->args[4] = 0; } tcp_listen_unlock(); skip_listen_ht: --+nBD6E3TurpgldQp-- From dannydaemonic@gmail.com Thu Oct 14 15:04:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 15:04:36 -0700 (PDT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.206]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9EM4U5k023105 for ; Thu, 14 Oct 2004 15:04:31 -0700 Received: by mproxy.gmail.com with SMTP id 77so170484rnk for ; Thu, 14 Oct 2004 15:04:11 -0700 (PDT) Received: by 10.38.99.62 with SMTP id w62mr171768rnb; Thu, 14 Oct 2004 15:04:11 -0700 (PDT) Received: by 10.38.150.66 with HTTP; Thu, 14 Oct 2004 15:04:11 -0700 (PDT) Message-ID: <9625752b04101415043a078b93@mail.gmail.com> Date: Thu, 14 Oct 2004 15:04:11 -0700 From: Danny Reply-To: Danny To: linux-kernel@vger.kernel.org Subject: Re: mm kernel oops with r8169 & named, PREEMPT Cc: netdev@oss.sgi.com, Francois Romieu In-Reply-To: <9625752b04101314595f72f84a@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <9625752b041012230068619e68@mail.gmail.com> <9625752b041013091772e26739@mail.gmail.com> <9625752b04101309182a96fbd2@mail.gmail.com> <200410131129.05657.jdmason@us.ltcfwd.linux.ibm.com> <20041013181840.GA30852@electric-eye.fr.zoreil.com> <9625752b04101313417be4cf90@mail.gmail.com> <20041013205433.GC30761@electric-eye.fr.zoreil.com> <9625752b04101314595f72f84a@mail.gmail.com> X-archive-position: 10219 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dannydaemonic@gmail.com Precedence: bulk X-list: netdev Content-Length: 881 Lines: 17 I wasn't able to get the kernel to compile with just the reiser4 patches from the broken-out dir on the ftp. The patching itself seemed to go well though. I tried to apply the patches in the order they were listed in "series" but some had to go out of order anyway, such as reiser4-only.patch had to go first. However I was able to verify it's not a problem with the r8169 driver. I copied over the r8169 driver to a fresh linux-2.6.8.1-mm4 and was able to compile and run fine with the latest r8169 driver from the linux-2.6.9-rc4-mm1 release. I also tested it in reverse, bringing over r8169.c to a fresh linux-2.6.9-rc4-mm1 and it still gave me the oops. I'm not sure where this leaves me now. Perhaps I should repost my oops and my proc info in the lkml with a different subject to draw the attention of others, since I now know this subject to be entirely missleading. From raghavendra.koushik@s2io.com Thu Oct 14 17:03:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 17:03:26 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9F03JNZ032180 for ; Thu, 14 Oct 2004 17:03:20 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9F02nje029173; Thu, 14 Oct 2004 20:02:49 -0400 (EDT) Received: from rkoushik ([10.16.16.150]) by guinness.s2io.com (8.12.6/8.12.6) with ESMTP id i9F02d39021336; Thu, 14 Oct 2004 20:02:39 -0400 (EDT) Message-Id: <200410150002.i9F02d39021336@guinness.s2io.com> From: "Raghavendra Koushik" To: "'Chris Leech'" Cc: "'Jeff Garzik'" , , "'Francois Romieu'" , , , Subject: RE: [PATCH 2.6.9-rc2 8/8] S2io: two buffer mode Date: Thu, 14 Oct 2004 17:02:34 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcSyLz7MdN4qYswuQcG02f6xPRqgfwAGL7Gg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-Reply-To: <41b516cb04101413492af4db1d@mail.gmail.com> X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10220 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: raghavendra.koushik@s2io.com Precedence: bulk X-list: netdev Content-Length: 1862 Lines: 46 Hi Chris, I think you have a point. As an alternative I can allocate some extra buffer space for buffer 2 (Ethernet payload) to begin with and in Rx path copy the buffer 1(Ethernet header) to the start of buffer 2(skb_push). This can then be passed to the upper layer (after eth_type_trans call). I did try fragmented SKB on Rx but it didn't seem to work. If any one can give me some pointers on how to get this working, I would implement 2Buff mode using this method and avoid a copy in fast path. Koushik > -----Original Message----- > From: Chris Leech [mailto:chris.leech@gmail.com] > Sent: Thursday, October 14, 2004 1:49 PM > To: Raghavendra Koushik > Cc: Jeff Garzik; ravinandan.arakali@s2io.com; Francois Romieu; > netdev@oss.sgi.com; leonid.grossman@s2io.com; rapuru.sriram@s2io.com > Subject: Re: [PATCH 2.6.9-rc2 8/8] S2io: two buffer mode > > On Thu, 14 Oct 2004 11:33:13 -0700, Raghavendra Koushik > wrote: > > > > 1) can this not be done with SKB fragments? > > > > > To acheve what is required, the H/W still has to split the Rx'ed frame > into > > 2 parts. By implementing this through the SKB fragments method, the only > > thing we avoid is usage of ba_0 and ba_1 fields, but note that none of > these > > are allocated or freed in fast path. They are all pre-allocated buffers > > (along with the Rx descriptors) and hence won't hit the Rx side > performance. > > Also by pulling down the eth_type_trans implementation partially into > the > > driver any kind of copy during Rx is also avoided. > > This change would pass skbs from the driver without the MAC header? > What happens in a bridging configuration? And dev->hard_header_parse > is set to eth_header_parse, which expects skb->mac.ethernet to be > valid, so I think any use of packet sockets will result in a NULL > dereference. > > - Chris From leonid.grossman@s2io.com Thu Oct 14 17:21:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 17:21:59 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9F0LrK6000384 for ; Thu, 14 Oct 2004 17:21:53 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9F0LMje029276; Thu, 14 Oct 2004 20:21:22 -0400 (EDT) Received: from lgt40 ([10.16.16.105]) by guinness.s2io.com (8.12.6/8.12.6) with ESMTP id i9F0LJ39024214; Thu, 14 Oct 2004 20:21:20 -0400 (EDT) Message-Id: <200410150021.i9F0LJ39024214@guinness.s2io.com> From: "Leonid Grossman" To: "'Raghavendra Koushik'" , "'Chris Leech'" Cc: "'Jeff Garzik'" , , "'Francois Romieu'" , , Subject: RE: [PATCH 2.6.9-rc2 8/8] S2io: two buffer mode Date: Thu, 14 Oct 2004 17:21:04 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 In-Reply-To: <200410150002.i9F02d39021336@guinness.s2io.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Thread-Index: AcSyLz7MdN4qYswuQcG02f6xPRqgfwAGL7GgAAEUj/A= X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10221 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: leonid.grossman@s2io.com Precedence: bulk X-list: netdev Content-Length: 2604 Lines: 74 "fragmented SKB on Rx" is an old problem - we tried to deploy 2 and 5 buffer Xframe modes before and it did not work in Linux. Is anyone aware of any network driver that successfully uses fragmented SKBs? Thanks, Leonid > -----Original Message----- > From: Raghavendra Koushik [mailto:raghavendra.koushik@s2io.com] > Sent: Thursday, October 14, 2004 5:03 PM > To: 'Chris Leech' > Cc: 'Jeff Garzik'; ravinandan.arakali@s2io.com; 'Francois > Romieu'; netdev@oss.sgi.com; leonid.grossman@s2io.com; > rapuru.sriram@s2io.com > Subject: RE: [PATCH 2.6.9-rc2 8/8] S2io: two buffer mode > > Hi Chris, > > I think you have a point. As an alternative I can > allocate some extra buffer space for buffer 2 (Ethernet > payload) to begin with and in Rx path copy the buffer > 1(Ethernet header) to the start of buffer 2(skb_push). > This can then be passed to the upper layer (after > eth_type_trans call). > I did try fragmented SKB on Rx but it didn't seem to work. If > any one can give me some pointers on how to get this working, > I would implement 2Buff mode using this method and avoid a > copy in fast path. > > Koushik > > > > -----Original Message----- > > From: Chris Leech [mailto:chris.leech@gmail.com] > > Sent: Thursday, October 14, 2004 1:49 PM > > To: Raghavendra Koushik > > Cc: Jeff Garzik; ravinandan.arakali@s2io.com; Francois Romieu; > > netdev@oss.sgi.com; leonid.grossman@s2io.com; rapuru.sriram@s2io.com > > Subject: Re: [PATCH 2.6.9-rc2 8/8] S2io: two buffer mode > > > > On Thu, 14 Oct 2004 11:33:13 -0700, Raghavendra Koushik > > wrote: > > > > > > 1) can this not be done with SKB fragments? > > > > > > > To acheve what is required, the H/W still has to split the Rx'ed > > > frame > > into > > > 2 parts. By implementing this through the SKB fragments > method, the > > > only thing we avoid is usage of ba_0 and ba_1 fields, but > note that > > > none of > > these > > > are allocated or freed in fast path. They are all pre-allocated > > > buffers (along with the Rx descriptors) and hence won't > hit the Rx > > > side > > performance. > > > Also by pulling down the eth_type_trans implementation partially > > > into > > the > > > driver any kind of copy during Rx is also avoided. > > > > This change would pass skbs from the driver without the MAC header? > > What happens in a bridging configuration? And > dev->hard_header_parse > > is set to eth_header_parse, which expects skb->mac.ethernet to be > > valid, so I think any use of packet sockets will result in a NULL > > dereference. > > > > - Chris > From andy.grover@gmail.com Thu Oct 14 17:43:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 17:43:58 -0700 (PDT) Received: from mproxy.gmail.com (mproxy.gmail.com [216.239.56.241]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9F0hr3r001060 for ; Thu, 14 Oct 2004 17:43:53 -0700 Received: by mproxy.gmail.com with SMTP id w41so141199cwb for ; Thu, 14 Oct 2004 17:43:39 -0700 (PDT) Received: by 10.11.116.24 with SMTP id o24mr18817cwc; Thu, 14 Oct 2004 17:43:39 -0700 (PDT) Received: by 10.11.99.45 with HTTP; Thu, 14 Oct 2004 17:43:39 -0700 (PDT) Message-ID: Date: Thu, 14 Oct 2004 17:43:39 -0700 From: Andrew Grover Reply-To: Andrew Grover To: netdev@oss.sgi.com Subject: [PATCH] remove unused memcpy_tokerneliovec Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_907_21464745.1097801019093" X-archive-position: 10222 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: andy.grover@gmail.com Precedence: bulk X-list: netdev Content-Length: 2614 Lines: 43 ------=_Part_907_21464745.1097801019093 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline This removes an unused function in net/core/iovec.c. Signed-off-by: Andy Grover ------=_Part_907_21464745.1097801019093 Content-Type: application/octet-stream; name="iovec.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="iovec.diff" PT09PT0gaW5jbHVkZS9saW51eC9zb2NrZXQuaCAxLjEyIHZzIGVkaXRlZCA9PT09PQotLS0gMS4x Mi9pbmNsdWRlL2xpbnV4L3NvY2tldC5oCTIwMDQtMDktMDggMTM6NDA6MDEgLTA3OjAwCisrKyBl ZGl0ZWQvaW5jbHVkZS9saW51eC9zb2NrZXQuaAkyMDA0LTEwLTE0IDE3OjM1OjA1IC0wNzowMApA QCAtMjgyLDcgKzI4Miw2IEBACiAKIGV4dGVybiBpbnQgdmVyaWZ5X2lvdmVjKHN0cnVjdCBtc2do ZHIgKm0sIHN0cnVjdCBpb3ZlYyAqaW92LCBjaGFyICphZGRyZXNzLCBpbnQgbW9kZSk7CiBleHRl cm4gaW50IG1lbWNweV90b2lvdmVjKHN0cnVjdCBpb3ZlYyAqdiwgdW5zaWduZWQgY2hhciAqa2Rh dGEsIGludCBsZW4pOwotZXh0ZXJuIHZvaWQgbWVtY3B5X3Rva2VybmVsaW92ZWMoc3RydWN0IGlv dmVjICppb3YsIHVuc2lnbmVkIGNoYXIgKmtkYXRhLCBpbnQgbGVuKTsKIGV4dGVybiBpbnQgbW92 ZV9hZGRyX3RvX3VzZXIodm9pZCAqa2FkZHIsIGludCBrbGVuLCB2b2lkIF9fdXNlciAqdWFkZHIs IGludCBfX3VzZXIgKnVsZW4pOwogZXh0ZXJuIGludCBtb3ZlX2FkZHJfdG9fa2VybmVsKHZvaWQg X191c2VyICp1YWRkciwgaW50IHVsZW4sIHZvaWQgKmthZGRyKTsKIGV4dGVybiBpbnQgcHV0X2Nt c2coc3RydWN0IG1zZ2hkciosIGludCBsZXZlbCwgaW50IHR5cGUsIGludCBsZW4sIHZvaWQgKmRh dGEpOwo9PT09PSBuZXQvY29yZS9pb3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bmQpOwogRVhQT1JUX1NZTUJPTChtZW1jcHlfdG9pb3ZlYyk7 Ci1FWFBPUlRfU1lNQk9MKG1lbWNweV90b2tlcm5lbGlvdmVjKTsK ------=_Part_907_21464745.1097801019093-- From jgarzik@pobox.com Thu Oct 14 20:26:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 20:26:07 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9F3Q1ba008392 for ; Thu, 14 Oct 2004 20:26:02 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIIiu-00088J-Qw; Fri, 15 Oct 2004 04:25:44 +0100 Message-ID: <416F432D.4050706@pobox.com> Date: Thu, 14 Oct 2004 23:25:33 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Matt Mackall CC: Petr Konecny , netdev@oss.sgi.com Subject: Re: PATCH: netpoll with xircom_cb References: <20041014205440.GY5414@waste.org> In-Reply-To: <20041014205440.GY5414@waste.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10223 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: 622 Lines: 22 Matt Mackall wrote: > On Thu, Oct 14, 2004 at 04:41:10AM +0200, Petr Konecny wrote: > >>Hi, >> >>I have a headless computer with xircom pcmcia card and needed netconsole >>on it. After looking around in other drivers I concocted this patch. It >>survived light testing. I have no documentation for the hw, so it maybe >>totally bogus. What do you think ? > > > Looks good to me. > > In general, this generic approach is fine. We can sometimes avoid the > heavyweight IRQ manipulation by using internal driver locking, but > this is generally not a performance-critical path. > > Jeff, did you take this one? yes From herbert@gondor.apana.org.au Thu Oct 14 23:47:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 14 Oct 2004 23:48:04 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9F6lsqQ012900 for ; Thu, 14 Oct 2004 23:47:55 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CILsE-00032v-00; Fri, 15 Oct 2004 16:47:34 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CILsE-0005cJ-00; Fri, 15 Oct 2004 16:47:34 +1000 From: Herbert Xu To: 7atbggg02@sneakemail.com (Sami Farin), davem@davemloft.net Subject: Re: 2.6.9-rc4 tcp_transmit_skb: BUG_ON(!tcp_skb_pcount(skb)) Cc: netdev@oss.sgi.com Organization: Core In-Reply-To: <20041013231006.GA14742@m.safari.iki.fi> X-Newsgroups: apana.lists.os.linux.kernel,apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) Message-Id: Date: Fri, 15 Oct 2004 16:47:34 +1000 X-archive-position: 10224 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 1339 Lines: 51 Sami Farin <7atbggg02@sneakemail.com> wrote: > > tcp_output.c:277 > Invalid operand 0 > tcp_transmit_skb > tcp_send_synack > tcp_rcv_synsent_state_process OK, this patch should fix it. We weren't copying the TSO fields in skb_copy(). Signed-off-by: Herbert Xu Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- ===== net/core/skbuff.c 1.38 vs edited ===== --- 1.38/net/core/skbuff.c 2004-09-24 07:39:26 +10:00 +++ edited/net/core/skbuff.c 2004-10-15 16:31:49 +10:00 @@ -394,6 +394,8 @@ new->tc_index = old->tc_index; #endif atomic_set(&new->users, 1); + skb_shinfo(new)->tso_size = skb_shinfo(old)->tso_size; + skb_shinfo(new)->tso_segs = skb_shinfo(old)->tso_segs; } /** @@ -483,8 +485,6 @@ } skb_shinfo(n)->nr_frags = i; } - skb_shinfo(n)->tso_size = skb_shinfo(skb)->tso_size; - skb_shinfo(n)->tso_segs = skb_shinfo(skb)->tso_segs; if (skb_shinfo(skb)->frag_list) { skb_shinfo(n)->frag_list = skb_shinfo(skb)->frag_list; @@ -631,8 +631,6 @@ BUG(); copy_skb_header(n, skb); - skb_shinfo(n)->tso_size = skb_shinfo(skb)->tso_size; - skb_shinfo(n)->tso_segs = skb_shinfo(skb)->tso_segs; return n; } From safari-b-netdev=oss.sgi.com-1097830027-cjjg6wxoks4qswbp@b.safari.iki.fi Fri Oct 15 01:47:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 01:48:01 -0700 (PDT) Received: from fep16.inet.fi (fep16.inet.fi [194.251.242.241]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9F8llDS023701 for ; Fri, 15 Oct 2004 01:47:51 -0700 Received: from safari.iki.fi ([80.223.105.208]) by fep16.inet.fi with ESMTP id <20041015084722.LLNT4716.fep16.inet.fi@safari.iki.fi> for ; Fri, 15 Oct 2004 11:47:22 +0300 Received: (qmail 3227 invoked by uid 500); 15 Oct 2004 08:47:07 -0000 Date: Fri, 15 Oct 2004 11:47:07 +0300 From: Sami Farin <7atbggg02@sneakemail.com> To: netdev@oss.sgi.com Subject: Re: 2.6.9-rc4 tcp_transmit_skb: BUG_ON(!tcp_skb_pcount(skb)) Message-ID: <20041015084707.GA29106@m.safari.iki.fi> Mail-Followup-To: netdev@oss.sgi.com References: <20041013231006.GA14742@m.safari.iki.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i X-archive-position: 10225 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: 7atbggg02@sneakemail.com Precedence: bulk X-list: netdev Content-Length: 489 Lines: 22 On Fri, Oct 15, 2004 at 04:47:34PM +1000, Herbert Xu wrote: > Sami Farin <7atbggg02@sneakemail.com> wrote: > > > > tcp_output.c:277 > > Invalid operand 0 > > tcp_transmit_skb > > tcp_send_synack > > tcp_rcv_synsent_state_process > > OK, this patch should fix it. > > We weren't copying the TSO fields in skb_copy(). > > Signed-off-by: Herbert Xu > > Cheers, Thank you! I can't reproduce the BUG anymore. Hopefully this fix gets into 2.6.9-final. -- From mrenzmann@web.de Fri Oct 15 04:13:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 04:13:29 -0700 (PDT) Received: from smtp08.web.de (smtp08.web.de [217.72.192.226]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FBDCar004331 for ; Fri, 15 Oct 2004 04:13:13 -0700 Received: from [195.14.202.190] (helo=[192.168.2.42]) by smtp08.web.de with asmtp (TLSv1:RC4-MD5:128) (WEB.DE 4.101 #44) id 1CIQ0y-0002h7-00 for netdev@oss.sgi.com; Fri, 15 Oct 2004 13:12:52 +0200 Message-ID: <416FB0F9.6040203@web.de> Date: Fri, 15 Oct 2004 13:14:01 +0200 From: Michael Renzmann User-Agent: Mozilla Thunderbird 0.8 (X11/20040916) X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com Subject: Minor bug in tun.c X-Enigmail-Version: 0.86.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Sender: mrenzmann@web.de X-archive-position: 10226 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mrenzmann@web.de Precedence: bulk X-list: netdev Content-Length: 1242 Lines: 41 Hi all. I'm currently trying to learn a bit more about driver programming, therefore I'm working a little with tun.c (using the version that comes with 2.6.7). I have some experience with C programming in general, but I'm a newbie when it comes to kernel stuff. Have a look at the following code (taken from the function tun_net_xmit()): === cut === /* Queue packet */ if (!(tun->flags & TUN_ONE_QUEUE)) { /* Normal queueing mode. * Packet scheduler handles dropping. */ if (skb_queue_len(&tun->readq) >= TUN_READQ_SIZE) netif_stop_queue(dev); } else { /* Single queue mode. * Driver handles dropping itself. */ if (skb_queue_len(&tun->readq) >= dev->tx_queue_len) goto drop; } skb_queue_tail(&tun->readq, skb); === cut === Look at the code that is executed when TUN_ONE_QUEUE isn't set in tun->flags. If the length of the queue has reached its maximum value (given as TUN_READQ_SIZE), the current packet still is appended to the queue, thereby exceeding the maximum length by 1. In my eyes the simplest way to correct that would be to change if (skb_queue_len(&tun->readq) >= TUN_READQ_SIZE) to read if (skb_queue_len(&tun->readq) >= TUN_READQ_SIZE - 1) Please correct me if I'm wrong. Bye, Mike From ganesh.venkatesan@intel.com Fri Oct 15 06:50:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:50:13 -0700 (PDT) Received: from fmsfmr004.fm.intel.com (fmr11.intel.com [192.55.52.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDo83l021793 for ; Fri, 15 Oct 2004 06:50:08 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by fmsfmr004.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDqoBE007744; Fri, 15 Oct 2004 13:52:50 GMT Received: from fmsmsxvs042.fm.intel.com (fmsmsxvs042.fm.intel.com [132.233.42.128]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDrIEC028827; Fri, 15 Oct 2004 13:53:21 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs042.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506494809977 ; Fri, 15 Oct 2004 06:49:48 -0700 Date: Fri, 15 Oct 2004 06:49:48 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 2/3 2.4] e1000: Update to Configure.help Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10229 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 1904 Lines: 35 diff -Nuarp old/linux-2.4/Documentation/Configure.help new/linux-2.4/Documentation/Configure.help --- old/linux-2.4/Documentation/Configure.help 2004-10-07 15:33:24.000000000 -0700 +++ new/linux-2.4/Documentation/Configure.help 2004-10-07 15:33:53.000000000 -0700 @@ -12219,28 +12219,7 @@ CONFIG_E100 Intel(R) PRO/1000 Gigabit Ethernet support CONFIG_E1000 This driver supports Intel(R) PRO/1000 gigabit ethernet family of - adapters, which includes: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - 82542 PRO/1000 Gigabit Server Adapter 700262-xxx, - 717037-xxx - 82543 PRO/1000 F Server Adapter 738640-xxx, - A38888-xxx - 82543 PRO/1000 T Server Adapter A19845-xxx, - A33948-xxx - 82544 PRO/1000 XT Server Adapter A51580-xxx - 82544 PRO/1000 XF Server Adapter A50484-xxx - 82544 PRO/1000 T Desktop Adapter A62947-xxx - 82540 PRO/1000 MT Desktop Adapter A78408-xxx - 82541 PRO/1000 MT Desktop Adapter C91016-xxx - 82545 PRO/1000 MT Server Adapter A92165-xxx - 82546 PRO/1000 MT Dual Port Server Adapter A92111-xxx - 82545 PRO/1000 MF Server Adapter A91622-xxx - 82545 PRO/1000 MF Server Adapter(LX) A91624-xxx - 82546 PRO/1000 MF Dual Port Server Adapter A91620-xxx - - For more information on how to identify your adapter, go to the + adapters. For more information on how to identify your adapter, go to the Adapter & Driver ID Guide at: From ganesh.venkatesan@intel.com Fri Oct 15 06:49:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:50:04 -0700 (PDT) Received: from hermes.jf.intel.com (fmr05.intel.com [134.134.136.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDnwVO021746 for ; Fri, 15 Oct 2004 06:49:59 -0700 Received: from petasus.jf.intel.com (petasus.jf.intel.com [10.7.209.6]) by hermes.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDrK6E028326; Fri, 15 Oct 2004 13:53:20 GMT Received: from orsmsxvs040.jf.intel.com (orsmsxvs040.jf.intel.com [192.168.65.206]) by petasus.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDrAWE024823; Fri, 15 Oct 2004 13:53:10 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by orsmsxvs040.jf.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506493815701 ; Fri, 15 Oct 2004 06:49:38 -0700 Date: Fri, 15 Oct 2004 06:49:38 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 1/3 2.4] e100 Update to Configure.help Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10228 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 4073 Lines: 77 diff -Nuarp old/linux-2.4/Documentation/Configure.help new/linux-2.4/Documentation/Configure.help --- old/linux-2.4/Documentation/Configure.help 2004-10-07 15:33:24.000000000 -0700 +++ new/linux-2.4/Documentation/Configure.help 2004-10-07 15:33:53.000000000 -0700 @@ -12192,65 +12192,16 @@ CONFIG_DL2K EtherExpress Pro/100 support (e100, Alternate Intel driver) CONFIG_E100 - This driver supports Intel(R) PRO/100 family of adapters, which - includes: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - - 82558 PRO/100+ PCI Adapter 668081-xxx, - 689661-xxx - 82558 PRO/100+ Management Adapter 691334-xxx, - 701738-xxx, - 721383-xxx - 82558 PRO/100+ Dual Port Server Adapter 714303-xxx, - 711269-xxx, - A28276-xxx - 82558 PRO/100+ PCI Server Adapter 710550-xxx - 82550 PRO/100 S Server Adapter 752438-xxx - 82559 A56831-xxx, - A10563-xxx, - A12171-xxx, - A12321-xxx, - A12320-xxx, - A12170-xxx - 748568-xxx - 748565-xxx - 82550 PRO/100 S Desktop Adapter 751767-xxx - 82559 748592-xxx, - A12167-xxx, - A12318-xxx, - A12317-xxx, - A12165-xxx, - 748569-xxx - 82559 PRO/100+ Server Adapter 729757-xxx - 82559 PRO/100 S Management Adapter 748566-xxx, - 748564-xxx - 82550 PRO/100 S Dual Port Server Adapter A56831-xxx - 82551 PRO/100 M Desktop Adapter A80897-xxx - PRO/100 S Advanced Management Adapter - 747842-xxx, - 745171-xxx - CNR PRO/100 VE Desktop Adapter A10386-xxx, - A10725-xxx, - A23801-xxx, - A19716-xxx - PRO/100 VM Desktop Adapter A14323-xxx, - A19725-xxx, - A23801-xxx, - A22220-xxx, - A23796-xxx - - + This driver supports Intel(R) PRO/100 family of adapters. To verify that your adapter is supported, find the board ID number on the adapter. Look for a label that has a barcode and a number - in the format 123456-001 (six digits hyphen three digits). Match - this to the list of numbers above. + in the format 123456-001 (six digits hyphen three digits). - For more information on how to identify your adapter, go to the - Adapter & Driver ID Guide at: + Use the above information and the Adapter & Driver ID Guide at: - http://support.intel.com/support/network/adapter/pro100/21397.htm + http://support.intel.com/support/network/adapter/pro100/21397.htm + + to identify the adapter. For the latest Intel PRO/100 network driver for Linux, see: From ganesh.venkatesan@intel.com Fri Oct 15 06:49:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:49:50 -0700 (PDT) Received: from caduceus.fm.intel.com (fmr02.intel.com [192.55.52.25]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDnkbD021733 for ; Fri, 15 Oct 2004 06:49:46 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by caduceus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDo5I8029373; Fri, 15 Oct 2004 13:50:05 GMT Received: from fmsmsxvs040.fm.intel.com (fmsmsxvs040.fm.intel.com [132.233.42.124]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDqwEA028693; Fri, 15 Oct 2004 13:52:59 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs040.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506492628561 ; Fri, 15 Oct 2004 06:49:26 -0700 Date: Fri, 15 Oct 2004 06:49:26 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 0/3 2.4] e100/e1000 Documentation Update Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10227 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 136 Lines: 6 1. e100 configuration help 2. e1000 configuration help 3. detailed information on e1000 (updated Documentation/networking/e1000.txt) From ganesh.venkatesan@intel.com Fri Oct 15 06:50:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:50:38 -0700 (PDT) Received: from fmsfmr004.fm.intel.com (fmr11.intel.com [192.55.52.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDoVmS022065 for ; Fri, 15 Oct 2004 06:50:31 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by fmsfmr004.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDrEBE007826; Fri, 15 Oct 2004 13:53:14 GMT Received: from fmsmsxvs040.fm.intel.com (fmsmsxvs040.fm.intel.com [132.233.42.124]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDreEC029026; Fri, 15 Oct 2004 13:53:45 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs040.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506501028628 ; Fri, 15 Oct 2004 06:50:10 -0700 Date: Fri, 15 Oct 2004 06:50:10 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 0/3 2.5] e100/e1000/ixgb: Confuguration and user guide updates Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10231 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 126 Lines: 5 1. Configuration and user guide for e1000 2. Configuration and user guide for e100 3. Configuration and user guide for ixgb From ganesh.venkatesan@intel.com Fri Oct 15 06:50:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:50:25 -0700 (PDT) Received: from caduceus.fm.intel.com (fmr02.intel.com [192.55.52.25]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDoHWN021864 for ; Fri, 15 Oct 2004 06:50:17 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by caduceus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDobI8029518; Fri, 15 Oct 2004 13:50:37 GMT Received: from fmsmsxvs042.fm.intel.com (fmsmsxvs042.fm.intel.com [132.233.42.128]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDrIEG028827; Fri, 15 Oct 2004 13:53:30 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs042.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506495709991 ; Fri, 15 Oct 2004 06:49:57 -0700 Date: Fri, 15 Oct 2004 06:49:57 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 3/3 2.4] e1000: Update Documentation/networking/e1000.txt Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10230 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 15330 Lines: 359 diff -Nuarp old/Documentation/networking/e1000.txt new/Documentation/networking/e1000.txt --- old/Documentation/networking/e1000.txt 2004-10-07 15:34:48.000000000 -0700 +++ new/Documentation/networking/e1000.txt 2004-10-07 15:35:11.000000000 -0700 @@ -1,7 +1,7 @@ Linux* Base Driver for the Intel(R) PRO/1000 Family of Adapters =============================================================== -January 8, 2003 +September 13, 2004 Contents @@ -20,62 +20,29 @@ In This Release =============== This file describes the Linux* Base Driver for the Intel(R) PRO/1000 Family -of Adapters, version 5.0.x. This driver includes support for -Itanium(TM)-based systems. +of Adapters, version 5.x.x. This driver includes support for Itanium(TM)2 +and EM64T systems. +For questions related to hardware requirements, refer to the documentation +supplied with your Intel PRO/1000 adapter. All hardware requirements listed +apply to use with Linux. +Native VLANs are now available with supported kernels. - -Supported Adapters -================== - -The following Intel network adapters are compatible with the drivers in this -release: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - - 82542 PRO/1000 Gigabit Server Adapter 700262-xxx, 717037-xxx - - 82543 PRO/1000 F Server Adapter 738640-xxx, A38888-xxx - - 82543 PRO/1000 T Server Adapter A19845-xxx, A33948-xxx - - 82544 PRO/1000 XT Server Adapter A51580-xxx - - 82544 PRO/1000 XF Server Adapter A50484-xxx - - 82544 PRO/1000 T Desktop Adapter A62947-xxx - - 82540 PRO/1000 MT Desktop Adapter A78408-xxx - 82541 C91016-xxx - - 82545 PRO/1000 MT Server Adapter A92165-xxx - - 82546 PRO/1000 MT Dual Port Server Adapter A92111-xxx - - 82545 PRO/1000 MF Server Adapter A91622-xxx - - 82545 PRO/1000 MF Server Adapter(LX) A91624-xxx - - 82546 PRO/1000 MF Dual Port Server Adapter A91620-xxx - - - -To verify your Intel adapter is supported, find the board ID number on the -adapter. Look for a label that has a barcode and a number in the format -A12345-001. Match this to the list of numbers above. +Identifying Your Adapter +======================== For more information on how to identify your adapter, go to the Adapter & Driver ID Guide at: http://support.intel.com/support/network/adapter/pro100/21397.htm -For the latest Intel network drivers for Linux, refer to the following +For the latest Intel network drivers for Linux, refer to the following +website. In the search field, enter your adapter name or type, or use the +networking link on the left to search for your adapter: http://downloadfinder.intel.com/scripts-df/support_intel.asp - Command Line Parameters ======================= @@ -91,15 +58,25 @@ For example, with two PRO/1000 PCI adapt insmod e1000 TxDescriptors=80,128 -loads the e1000 driver with 80 TX resources for the first adapter and 128 TX -resources for the second adapter. +loads the e1000 driver with 80 TX descriptors for the first adapter and 128 TX +descriptors for the second adapter. The default value for each parameter is generally the recommended setting, -unless otherwise noted. - -For more information about the AutoNeg, Duplex, and Speed parameters, see the -"Speed and Duplex Configuration" section in this document. +unless otherwise noted. Also, if the driver is statically built into the +kernel, the driver is loaded with the default values for all the parameters. +Ethtool can be used to change some of the parameters at runtime. + + NOTES: For more information about the AutoNeg, Duplex, and Speed + parameters, see the "Speed and Duplex Configuration" section in + this document. + + For more information about the InterruptThrottleRate, RxIntDelay, + TxIntDelay, RxAbsIntDelay, and TxAbsIntDelay parameters, see the + application note at: + http://www.intel.com/design/network/applnots/ap450.htm + A descriptor describes a data buffer and attributes related to the + data buffer. This information is accessed by the hardware. AutoNeg (adapters using copper connections only) Valid Range: 0x01-0x0F, 0x20-0x2F @@ -107,11 +84,13 @@ Default Value: 0x2F This parameter is a bit mask that specifies which speed and duplex settings the board advertises. When this parameter is used, the Speed and Duplex parameters must not be specified. + NOTE: Refer to the Speed and Duplex section of this readme for more + information on the AutoNeg parameter. Duplex (adapters using copper connections only) Valid Range: 0-2 (0=auto-negotiate, 1=half, 2=full) Default Value: 0 - Defines the direction in which data is allowed to flow. Can by either one + Defines the direction in which data is allowed to flow. Can be either one or two-directional. If both Duplex and the link partner are set to auto- negotiate, the board auto-detects the correct duplex. If the link partner is forced (either full or half), Duplex defaults to half-duplex. @@ -124,22 +103,46 @@ Default: Read flow control settings from InterruptThrottleRate Valid Range: 100-100000 (0=off, 1=dynamic) -Default Value: 1 +Default Value: 8000 This value represents the maximum number of interrupts per second the controller generates. InterruptThrottleRate is another setting used in interrupt moderation. Dynamic mode uses a heuristic algorithm to adjust InterruptThrottleRate based on the current traffic load. +Un-supported Adapters: InterruptThrottleRate is NOT supported by 82542, 82543 + or 82544-based adapters. NOTE: InterruptThrottleRate takes precedence over the TxAbsIntDelay and RxAbsIntDelay parameters. In other words, minimizing the receive and/or transmit absolute delays does not force the controller to generate more interrupts than what the Interrupt Throttle Rate allows. + CAUTION: If you are using the Intel PRO/1000 CT Network Connection + (controller 82547), setting InterruptThrottleRate to a value + greater than 75,000, may hang (stop transmitting) adapters under + certain network conditions. If this occurs a NETDEV WATCHDOG + message is logged in the system event log. In addition, the + controller is automatically reset, restoring the network + connection. To eliminate the potential for the hang, ensure + that InterruptThrottleRate is set no greater than 75,000 and is + not set to 0. + NOTE: When e1000 is loaded with default settings and multiple adapters are + in use simultaneously, the CPU utilization may increase non-linearly. + In order to limit the CPU utilization without impacting the overall + throughput, we recommend that you load the driver as follows: + + insmod e1000.o InterruptThrottleRate=3000,3000,3000 + + This sets the InterruptThrottleRate to 3000 interrupts/sec for the + first, second, and third instances of the driver. The range of 2000 to + 3000 interrupts per second works on a majority of systems and is a + good starting point, but the optimal value will be platform-specific. + If CPU utilization is not a concern, use RX_POLLING (NAPI) and default + driver settings. RxDescriptors Valid Range: 80-256 for 82542 and 82543-based adapters - 80-4096 for 82540, 82544, 82545, and 82546-based adapters -Default Value: 80 + 80-4096 for all other supported adapters +Default Value: 256 This value is the number of receive descriptors allocated by the driver. Increasing this value allows the driver to buffer more incoming packets. Each descriptor is 16 bytes. A receive buffer is also allocated for each @@ -148,6 +151,9 @@ Default Value: 80 NOTE: MTU designates the frame size. It only needs to be set for Jumbo Frames. + NOTE: Depending on the available system resources, the request for a + higher number of receive descriptors may be denied. In this case, + use a lower number. RxIntDelay Valid Range: 0-65535 (0=off) @@ -167,11 +173,11 @@ Default Value: 0 restoring the network connection. To eliminate the potential for the hang ensure that RxIntDelay is set to 0. -RxAbsIntDelay (82540, 82545, and 82546-based adapters only) +RxAbsIntDelay (82540, 82545 and later adapters only) Valid Range: 0-65535 (0=off) Default Value: 128 This value, in units of 1.024 microseconds, limits the delay in which a - transmit interrupt is generated. Useful only if RxIntDelay is non-zero, + receive interrupt is generated. Useful only if RxIntDelay is non-zero, this value ensures that an interrupt is generated after the initial packet is received within the set amount of time. Proper tuning, along with RxIntDelay, may improve traffic throughput in specific network @@ -187,12 +193,16 @@ Default Value: 0 (auto-negotiate at all TxDescriptors Valid Range: 80-256 for 82542 and 82543-based adapters - 80-4096 for 82540, 82544, 82545, and 82546-based adapters + 80-4096 for all other supported adapters Default Value: 256 This value is the number of transmit descriptors allocated by the driver. Increasing this value allows the driver to queue more transmits. Each descriptor is 16 bytes. + NOTE: Depending on the available system resources, the request for a + higher number of transmit descriptors may be denied. In this case, + use a lower number. + TxIntDelay Valid Range: 0-65535 (0=off) Default Value: 64 @@ -202,7 +212,7 @@ Default Value: 64 system is reporting dropped transmits, this value may be set too high causing the driver to run out of available transmit descriptors. -TxAbsIntDelay (82540, 82545, and 82546-based adapters only) +TxAbsIntDelay (82540, 82545 and later adapters only) Valid Range: 0-65535 (0=off) Default Value: 64 This value, in units of 1.024 microseconds, limits the delay in which a @@ -218,7 +228,6 @@ Default Value: 1 A value of '1' indicates that the driver should enable IP checksum offload for received packets (both UDP and TCP) to the adapter hardware. - Speed and Duplex Configuration ============================== @@ -250,6 +259,10 @@ Bit 7 6 5 4 Speed (Mbps) N/A N/A 1000 N/A 100 100 10 10 Duplex Full Full Half Full Half +For example to limit the negotiated speed/duplex on the interface to 10 Mbps +Half or Full duplex, set AutoNeg to 0x02: + insmod e1000 AutoNeg=0x02 + Note that setting AutoNeg does not guarantee that the board will link at the highest specified speed or duplex mode, but the board will link at the highest possible speed/duplex of the link partner IF the link partner is also @@ -260,6 +273,38 @@ adapter MUST be forced to the same speed Additional Configurations ========================= + Configuring the Driver on Different Distributions + ------------------------------------------------- + + Configuring a network driver to load properly when the system is started is + distribution dependent. Typically, the configuration process involves adding + an alias line to /etc/modules.conf as well as editing other system startup + scripts and/or configuration files. Many popular Linux distributions ship + with tools to make these changes for you. To learn the proper way to + configure a network device for your system, refer to your distribution + documentation. If during this process you are asked for the driver or module + name, the name for the Linux Base Driver for the Intel PRO/1000 Family of + Adapters is e1000. + + As an example, if you install the e1000 driver for two PRO/1000 adapters + (eth0 and eth1) and set the speed and duplex to 10full and 100half, add the + following to modules.conf: + + alias eth0 e1000 + alias eth1 e1000 + options e1000 Speed=10,100 Duplex=2,1 + + Viewing Link Messages + --------------------- + + Link messages will not be displayed to the console if the distribution is + restricting system messages. In order to see network driver link messages on + your console, set dmesg to eight by entering the following: + + dmesg -n 8 + + NOTE: This setting is not saved across reboots. + Jumbo Frames ------------ @@ -277,6 +322,51 @@ Additional Configurations 10 or 100 Mbps may result in poor performance or loss of link. + NOTE: MTU designates the frame size. To enable Jumbo Frames, increase the + MTU size on the interface beyond 1500. + + Ethtool + ------- + + The driver utilizes the ethtool interface for driver configuration and + diagnostics, as well as displaying statistical information. Ethtool + version 1.6 or later is required for this functionality. + + The latest release of ethtool can be found from + http://sf.net/projects/gkernel. After ethtool is installed, + ethtool-copy.h must be copied and renamed to ethtool.h in your kernel + source tree at /include/linux. Backup the original + ethtool.h as needed before copying. The driver then must be recompiled + in order to take advantage of the latest ethtool features. + + NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support + for a more complete ethtool feature set can be enabled by upgrading + ethtool to ethtool-1.8.1. + + Enabling Wake on LAN* (WoL) + --------------------------- + + WoL is configured through the Ethtool* utility. Ethtool is included with + all versions of Red Hat after Red Hat 7.2. For other Linux distributions, + download and install Ethtool from the following website: + http://sourceforge.net/projects/gkernel. + + For instructions on enabling WoL with Ethtool, refer to the website listed + above. + + WoL will be enabled on the system during the next shut down or reboot. + For this driver version, in order to enable WoL, the e1000 driver must be + loaded when shutting down or rebooting the system. + + NAPI + ---- + + NAPI (Rx polling mode) is supported in the e1000 driver. NAPI is enabled + or disabled based on the configuration of the kernel. + + See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI. + + Known Issues ============ @@ -284,9 +374,9 @@ Known Issues ------------------------------- Memory allocation failures have been observed on Linux systems with 64 MB - of RAM or less that are running Jumbo Frames. If you are using Jumbo - Frames, your system may require more than the advertised minimum - requirement of 64 MB of system memory. + of RAM or less that are running Jumbo Frames. If you are using Jumbo Frames, + your system may require more than the advertised minimum requirement of 64 MB + of system memory. Support From ganesh.venkatesan@intel.com Fri Oct 15 06:50:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:50:50 -0700 (PDT) Received: from fmsfmr004.fm.intel.com (fmr11.intel.com [192.55.52.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDoeKJ022232 for ; Fri, 15 Oct 2004 06:50:40 -0700 Received: from petasus-pilot.fm.intel.com (petasus-pilot.fm.intel.com [10.1.192.44]) by fmsfmr004.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDrNBE007844; Fri, 15 Oct 2004 13:53:23 GMT Received: from fmsmsxvs041.fm.intel.com (fmsmsxvs041.fm.intel.com [132.233.42.126]) by petasus-pilot.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDt1Q6010893; Fri, 15 Oct 2004 13:55:01 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs041.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506502016678 ; Fri, 15 Oct 2004 06:50:20 -0700 Date: Fri, 15 Oct 2004 06:50:20 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 1/3 2.5] e1000: Configuration and user guide update Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10232 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 17268 Lines: 403 diff -Nuarp old/linux-2.5/Documentation/networking/e1000.txt new/linux-2.5/Documentation/networking/e1000.txt --- old/linux-2.5/Documentation/networking/e1000.txt 2004-10-07 15:50:44.000000000 -0700 +++ new/linux-2.5/Documentation/networking/e1000.txt 2004-10-07 15:51:15.000000000 -0700 @@ -1,14 +1,14 @@ Linux* Base Driver for the Intel(R) PRO/1000 Family of Adapters =============================================================== -January 8, 2003 +September 13, 2004 Contents ======== - In This Release -- Supported Adapters +- Identifying Your Adapter - Command Line Parameters - Speed and Duplex Configuration - Additional Configurations @@ -20,63 +20,29 @@ In This Release =============== This file describes the Linux* Base Driver for the Intel(R) PRO/1000 Family -of Adapters, version 5.0.x. This driver includes support for -Itanium(TM)-based systems. +of Adapters, version 5.x.x. This driver includes support for Itanium(TM)2 +and EM64T systems. +For questions related to hardware requirements, refer to the documentation +supplied with your Intel PRO/1000 adapter. All hardware requirements listed +apply to use with Linux. Native VLANs are now available with supported kernels. - -Supported Adapters -================== - -The following Intel network adapters are compatible with the drivers in this -release: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - - 82542 PRO/1000 Gigabit Server Adapter 700262-xxx, 717037-xxx - - 82543 PRO/1000 F Server Adapter 738640-xxx, A38888-xxx - - 82543 PRO/1000 T Server Adapter A19845-xxx, A33948-xxx - - 82544 PRO/1000 XT Server Adapter A51580-xxx - - 82544 PRO/1000 XF Server Adapter A50484-xxx - - 82544 PRO/1000 T Desktop Adapter A62947-xxx - - 82540 PRO/1000 MT Desktop Adapter A78408-xxx - 82541 C91016-xxx - - 82545 PRO/1000 MT Server Adapter A92165-xxx - - 82546 PRO/1000 MT Dual Port Server Adapter A92111-xxx - - 82545 PRO/1000 MF Server Adapter A91622-xxx - - 82545 PRO/1000 MF Server Adapter(LX) A91624-xxx - - 82546 PRO/1000 MF Dual Port Server Adapter A91620-xxx - - - -To verify your Intel adapter is supported, find the board ID number on the -adapter. Look for a label that has a barcode and a number in the format -A12345-001. Match this to the list of numbers above. +Identifying Your Adapter +======================== For more information on how to identify your adapter, go to the Adapter & Driver ID Guide at: http://support.intel.com/support/network/adapter/pro100/21397.htm -For the latest Intel network drivers for Linux, refer to the following +For the latest Intel network drivers for Linux, refer to the following +website. In the search field, enter your adapter name or type, or use the +networking link on the left to search for your adapter: http://downloadfinder.intel.com/scripts-df/support_intel.asp - Command Line Parameters ======================= @@ -92,27 +58,39 @@ For example, with two PRO/1000 PCI adapt insmod e1000 TxDescriptors=80,128 -loads the e1000 driver with 80 TX resources for the first adapter and 128 TX -resources for the second adapter. +loads the e1000 driver with 80 TX descriptors for the first adapter and 128 TX +descriptors for the second adapter. The default value for each parameter is generally the recommended setting, -unless otherwise noted. - -For more information about the AutoNeg, Duplex, and Speed parameters, see the -"Speed and Duplex Configuration" section in this document. +unless otherwise noted. Also, if the driver is statically built into the +kernel, the driver is loaded with the default values for all the parameters. +Ethtool can be used to change some of the parameters at runtime. + + NOTES: For more information about the AutoNeg, Duplex, and Speed + parameters, see the "Speed and Duplex Configuration" section in + this document. + + For more information about the InterruptThrottleRate, RxIntDelay, + TxIntDelay, RxAbsIntDelay, and TxAbsIntDelay parameters, see the + application note at: + http://www.intel.com/design/network/applnots/ap450.htm + A descriptor describes a data buffer and attributes related to the + data buffer. This information is accessed by the hardware. AutoNeg (adapters using copper connections only) Valid Range: 0x01-0x0F, 0x20-0x2F Default Value: 0x2F This parameter is a bit mask that specifies which speed and duplex settings the board advertises. When this parameter is used, the Speed and - Duplex parameters must not be specified. + Duplex parameters must not be specified. + NOTE: Refer to the Speed and Duplex section of this readme for more + information on the AutoNeg parameter. Duplex (adapters using copper connections only) Valid Range: 0-2 (0=auto-negotiate, 1=half, 2=full) Default Value: 0 - Defines the direction in which data is allowed to flow. Can by either one + Defines the direction in which data is allowed to flow. Can be either one or two-directional. If both Duplex and the link partner are set to auto- negotiate, the board auto-detects the correct duplex. If the link partner is forced (either full or half), Duplex defaults to half-duplex. @@ -125,22 +103,46 @@ Default: Read flow control settings from InterruptThrottleRate Valid Range: 100-100000 (0=off, 1=dynamic) -Default Value: 1 +Default Value: 8000 This value represents the maximum number of interrupts per second the controller generates. InterruptThrottleRate is another setting used in interrupt moderation. Dynamic mode uses a heuristic algorithm to adjust InterruptThrottleRate based on the current traffic load. +Un-supported Adapters: InterruptThrottleRate is NOT supported by 82542, 82543 + or 82544-based adapters. NOTE: InterruptThrottleRate takes precedence over the TxAbsIntDelay and RxAbsIntDelay parameters. In other words, minimizing the receive and/or transmit absolute delays does not force the controller to generate more interrupts than what the Interrupt Throttle Rate allows. + CAUTION: If you are using the Intel PRO/1000 CT Network Connection + (controller 82547), setting InterruptThrottleRate to a value + greater than 75,000, may hang (stop transmitting) adapters under + certain network conditions. If this occurs a NETDEV WATCHDOG + message is logged in the system event log. In addition, the + controller is automatically reset, restoring the network + connection. To eliminate the potential for the hang, ensure + that InterruptThrottleRate is set no greater than 75,000 and is + not set to 0. + NOTE: When e1000 is loaded with default settings and multiple adapters are + in use simultaneously, the CPU utilization may increase non-linearly. + In order to limit the CPU utilization without impacting the overall + throughput, we recommend that you load the driver as follows: + + insmod e1000.o InterruptThrottleRate=3000,3000,3000 + + This sets the InterruptThrottleRate to 3000 interrupts/sec for the + first, second, and third instances of the driver. The range of 2000 to + 3000 interrupts per second works on a majority of systems and is a + good starting point, but the optimal value will be platform-specific. + If CPU utilization is not a concern, use RX_POLLING (NAPI) and default + driver settings. RxDescriptors Valid Range: 80-256 for 82542 and 82543-based adapters - 80-4096 for 82540, 82544, 82545, and 82546-based adapters -Default Value: 80 + 80-4096 for all other supported adapters +Default Value: 256 This value is the number of receive descriptors allocated by the driver. Increasing this value allows the driver to buffer more incoming packets. Each descriptor is 16 bytes. A receive buffer is also allocated for each @@ -149,6 +151,9 @@ Default Value: 80 NOTE: MTU designates the frame size. It only needs to be set for Jumbo Frames. + NOTE: Depending on the available system resources, the request for a + higher number of receive descriptors may be denied. In this case, + use a lower number. RxIntDelay Valid Range: 0-65535 (0=off) @@ -168,11 +173,11 @@ Default Value: 0 restoring the network connection. To eliminate the potential for the hang ensure that RxIntDelay is set to 0. -RxAbsIntDelay (82540, 82545, and 82546-based adapters only) +RxAbsIntDelay (82540, 82545 and later adapters only) Valid Range: 0-65535 (0=off) Default Value: 128 This value, in units of 1.024 microseconds, limits the delay in which a - transmit interrupt is generated. Useful only if RxIntDelay is non-zero, + receive interrupt is generated. Useful only if RxIntDelay is non-zero, this value ensures that an interrupt is generated after the initial packet is received within the set amount of time. Proper tuning, along with RxIntDelay, may improve traffic throughput in specific network @@ -188,12 +193,16 @@ Default Value: 0 (auto-negotiate at all TxDescriptors Valid Range: 80-256 for 82542 and 82543-based adapters - 80-4096 for 82540, 82544, 82545, and 82546-based adapters + 80-4096 for all other supported adapters Default Value: 256 This value is the number of transmit descriptors allocated by the driver. Increasing this value allows the driver to queue more transmits. Each descriptor is 16 bytes. + NOTE: Depending on the available system resources, the request for a + higher number of transmit descriptors may be denied. In this case, + use a lower number. + TxIntDelay Valid Range: 0-65535 (0=off) Default Value: 64 @@ -203,7 +212,7 @@ Default Value: 64 system is reporting dropped transmits, this value may be set too high causing the driver to run out of available transmit descriptors. -TxAbsIntDelay (82540, 82545, and 82546-based adapters only) +TxAbsIntDelay (82540, 82545 and later adapters only) Valid Range: 0-65535 (0=off) Default Value: 64 This value, in units of 1.024 microseconds, limits the delay in which a @@ -219,7 +228,6 @@ Default Value: 1 A value of '1' indicates that the driver should enable IP checksum offload for received packets (both UDP and TCP) to the adapter hardware. - Speed and Duplex Configuration ============================== @@ -251,6 +259,10 @@ Bit 7 6 5 4 Speed (Mbps) N/A N/A 1000 N/A 100 100 10 10 Duplex Full Full Half Full Half +For example to limit the negotiated speed/duplex on the interface to 10 Mbps +Half or Full duplex, set AutoNeg to 0x02: + insmod e1000 AutoNeg=0x02 + Note that setting AutoNeg does not guarantee that the board will link at the highest specified speed or duplex mode, but the board will link at the highest possible speed/duplex of the link partner IF the link partner is also @@ -261,6 +273,38 @@ adapter MUST be forced to the same speed Additional Configurations ========================= + Configuring the Driver on Different Distributions + ------------------------------------------------- + + Configuring a network driver to load properly when the system is started is + distribution dependent. Typically, the configuration process involves adding + an alias line to /etc/modules.conf as well as editing other system startup + scripts and/or configuration files. Many popular Linux distributions ship + with tools to make these changes for you. To learn the proper way to + configure a network device for your system, refer to your distribution + documentation. If during this process you are asked for the driver or module + name, the name for the Linux Base Driver for the Intel PRO/1000 Family of + Adapters is e1000. + + As an example, if you install the e1000 driver for two PRO/1000 adapters + (eth0 and eth1) and set the speed and duplex to 10full and 100half, add the + following to modules.conf: + + alias eth0 e1000 + alias eth1 e1000 + options e1000 Speed=10,100 Duplex=2,1 + + Viewing Link Messages + --------------------- + + Link messages will not be displayed to the console if the distribution is + restricting system messages. In order to see network driver link messages on + your console, set dmesg to eight by entering the following: + + dmesg -n 8 + + NOTE: This setting is not saved across reboots. + Jumbo Frames ------------ @@ -278,6 +322,51 @@ Additional Configurations 10 or 100 Mbps may result in poor performance or loss of link. + NOTE: MTU designates the frame size. To enable Jumbo Frames, increase the + MTU size on the interface beyond 1500. + + Ethtool + ------- + + The driver utilizes the ethtool interface for driver configuration and + diagnostics, as well as displaying statistical information. Ethtool + version 1.6 or later is required for this functionality. + + The latest release of ethtool can be found from + http://sf.net/projects/gkernel. After ethtool is installed, + ethtool-copy.h must be copied and renamed to ethtool.h in your kernel + source tree at /include/linux. Backup the original + ethtool.h as needed before copying. The driver then must be recompiled + in order to take advantage of the latest ethtool features. + + NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support + for a more complete ethtool feature set can be enabled by upgrading + ethtool to ethtool-1.8.1. + + Enabling Wake on LAN* (WoL) + --------------------------- + + WoL is configured through the Ethtool* utility. Ethtool is included with + all versions of Red Hat after Red Hat 7.2. For other Linux distributions, + download and install Ethtool from the following website: + http://sourceforge.net/projects/gkernel. + + For instructions on enabling WoL with Ethtool, refer to the website listed + above. + + WoL will be enabled on the system during the next shut down or reboot. + For this driver version, in order to enable WoL, the e1000 driver must be + loaded when shutting down or rebooting the system. + + NAPI + ---- + + NAPI (Rx polling mode) is supported in the e1000 driver. NAPI is enabled + or disabled based on the configuration of the kernel. + + See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI. + + Known Issues ============ @@ -285,9 +374,9 @@ Known Issues ------------------------------- Memory allocation failures have been observed on Linux systems with 64 MB - of RAM or less that are running Jumbo Frames. If you are using Jumbo - Frames, your system may require more than the advertised minimum - requirement of 64 MB of system memory. + of RAM or less that are running Jumbo Frames. If you are using Jumbo Frames, + your system may require more than the advertised minimum requirement of 64 MB + of system memory. Support diff -Nuarp old/linux-2.5/drivers/net/Kconfig new/linux-2.5/drivers/net/Kconfig --- old/linux-2.5/drivers/net/Kconfig 2004-10-07 15:52:11.000000000 -0700 +++ new/linux-2.5/drivers/net/Kconfig 2004-10-07 15:52:27.000000000 -0700 @@ -1933,29 +1933,8 @@ config E1000 depends on PCI ---help--- This driver supports Intel(R) PRO/1000 gigabit ethernet family of - adapters, which includes: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - 82542 PRO/1000 Gigabit Server Adapter 700262-xxx, - 717037-xxx - 82543 PRO/1000 F Server Adapter 738640-xxx, - A38888-xxx - 82543 PRO/1000 T Server Adapter A19845-xxx, - A33948-xxx - 82544 PRO/1000 XT Server Adapter A51580-xxx - 82544 PRO/1000 XF Server Adapter A50484-xxx - 82544 PRO/1000 T Desktop Adapter A62947-xxx - 82540 PRO/1000 MT Desktop Adapter A78408-xxx - 82541 PRO/1000 MT Desktop Adapter C91016-xxx - 82545 PRO/1000 MT Server Adapter A92165-xxx - 82546 PRO/1000 MT Dual Port Server Adapter A92111-xxx - 82545 PRO/1000 MF Server Adapter A91622-xxx - 82545 PRO/1000 MF Server Adapter(LX) A91624-xxx - 82546 PRO/1000 MF Dual Port Server Adapter A91620-xxx - - For more information on how to identify your adapter, go to the - Adapter & Driver ID Guide at: + adapters. For more information on how to identify your adapter, go + to the Adapter & Driver ID Guide at: From ganesh.venkatesan@intel.com Fri Oct 15 06:50:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:50:53 -0700 (PDT) Received: from hermes.fm.intel.com (fmr01.intel.com [192.55.52.18]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDohKI022413 for ; Fri, 15 Oct 2004 06:50:44 -0700 Received: from petasus-pilot.fm.intel.com (petasus-pilot.fm.intel.com [10.1.192.44]) by hermes.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDqoIA013422; Fri, 15 Oct 2004 13:52:50 GMT Received: from fmsmsxvs041.fm.intel.com (fmsmsxvs041.fm.intel.com [132.233.42.126]) by petasus-pilot.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDt1QA010893; Fri, 15 Oct 2004 13:55:09 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs041.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506502816697 ; Fri, 15 Oct 2004 06:50:28 -0700 Date: Fri, 15 Oct 2004 06:50:28 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 2/3 2.5] e100: Configuration and user guide update Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10233 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 9435 Lines: 249 diff -Nuarp old/linux-2.5/Documentation/networking/e100.txt new/linux-2.5/Documentation/networking/e100.txt --- old/linux-2.5/Documentation/networking/e100.txt 2004-10-07 15:50:39.000000000 -0700 +++ new/linux-2.5/Documentation/networking/e100.txt 2004-10-07 15:51:33.000000000 -0700 @@ -1,14 +1,16 @@ Linux* Base Driver for the Intel(R) PRO/100 Family of Adapters ============================================================== -March 15, 2004 +September 13, 2004 Contents ======== - In This Release -- Supported Adapters +- Identifying Your Adapter +- Driver Configuration Parameters +- Additional Configurations - Support @@ -16,26 +18,140 @@ In This Release =============== This file describes the Linux* Base Driver for the Intel(R) PRO/100 Family of -Adapters, version 3.x.x. This driver includes support for Itanium(TM)-based -systems. +Adapters, version 3.2.x. This driver includes support for Itanium(TM)2 and +EM64T systems. -Supported Adapters -================== - -To verify that your adapter is supported, find the board ID number on the -adapter. Look for a label that has a barcode and a number in the format -A12345-001. Match this to the list of numbers above. +Identifying Your Adapter +======================== For more information on how to identify your adapter, go to the Adapter & Driver ID Guide at: http://support.intel.com/support/network/adapter/pro100/21397.htm -For the latest Intel PRO/100 network driver for Linux, see: +For the latest Intel network drivers for Linux, refer to the following +website. In the search field, enter your adapter name or type, or use the +networking link on the left to search for your adapter: http://downloadfinder.intel.com/scripts-df/support_intel.asp +Driver Configuration Parameters +=============================== + +The default value for each parameter is generally the recommended setting, +unless otherwise noted. + +Rx Descriptors: Number of receive descriptors. A receive descriptor is a data + structure that describes a receive buffer and its attributes to the network + controller. The data in the descriptor is used by the controller to write + data from the controller to host memory. In the 3.0.x driver the valid + range for this parameter is 64-256. The default value is 64. This parameter + can be changed using the command + + ethtool -G eth? rx n, where n is the number of desired rx descriptors. + +Tx Descriptors: Number of transmit descriptors. A transmit descriptor is a + data structure that describes a transmit buffer and its attributes to the + network controller. The data in the descriptor is used by the controller to + read data from the host memory to the controller. In the 3.0.x driver the + valid range for this parameter is 64-256. The default value is 64. This + parameter can be changed using the command + + ethtool -G eth? tx n, where n is the number of desired tx descriptors. + +Speed/Duplex: The driver auto-negotiates the link speed and duplex settings by + default. Ethtool can be used as follows to force speed/duplex. + + ethtool -s eth? autoneg off speed {10|100} duplex {full|half} + + NOTE: setting the speed/duplex to incorrect values will cause the link to + fail. + +Event Log Message Level: The driver uses the message level flag to log events + to syslog. The message level can be set at driver load time. It can also be + set using the command + + ethtool -s eth? msglvl n + +Additional Configurations +========================= + + Configuring the Driver on Different Distributions + ------------------------------------------------- + + Configuring a network driver to load properly when the system is started is + distribution dependent. Typically, the configuration process involves adding + an alias line to /etc/modules.conf as well as editing other system startup + scripts and/or configuration files. Many popular Linux distributions ship + with tools to make these changes for you. To learn the proper way to + configure a network device for your system, refer to your distribution + documentation. If during this process you are asked for the driver or module + name, the name for the Linux Base Driver for the Intel PRO/100 Family of + Adapters is e100. + + As an example, if you install the e100 driver for two PRO/100 adapters + (eth0 and eth1), add the following to modules.conf: + + alias eth0 e100 + alias eth1 e100 + + Viewing Link Messages + --------------------- + In order to see link messages and other Intel driver information on your + console, you must set the dmesg level up to six. This can be done by + entering the following on the command line before loading the e100 driver: + + dmesg -n 8 + + If you wish to see all messages issued by the driver, including debug + messages, set the dmesg level to eight. + + NOTE: This setting is not saved across reboots. + + Ethtool + ------- + + The driver utilizes the ethtool interface for driver configuration and + diagnostics, as well as displaying statistical information. Ethtool + version 1.6 or later is required for this functionality. + + The latest release of ethtool can be found at: + http://sf.net/projects/gkernel. + + After ethtool is installed, ethtool-copy.h must be copied and renamed to + ethtool.h in your kernel source tree at /include/linux. + Backup the original ethtool.h as needed before copying. The driver then + must be recompiled in order to take advantage of the latest ethtool + features. + + NOTE: This driver uses mii support from the kernel. As a result, when + there is no link, ethtool will report speed/duplex to be 10/half. + + NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support + for a more complete ethtool feature set can be enabled by upgrading + ethtool to ethtool-1.8.1. + + Enabling Wake on LAN* (WoL) + --------------------------- + WoL is provided through the Ethtool* utility. Ethtool is included with Red + Hat* 8.0. For other Linux distributions, download and install Ethtool from + the following website: http://sourceforge.net/projects/gkernel. + + For instructions on enabling WoL with Ethtool, refer to the Ethtool man + page. + + WoL will be enabled on the system during the next shut down or reboot. For + this driver version, in order to enable WoL, the e100 driver must be + loaded when shutting down or rebooting the system. + + NAPI + ---- + + NAPI (Rx polling mode) is supported in the e100 driver. NAPI is enabled + or disabled based on the configuration of the kernel. + + See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI. Support ======= diff -Nuarp old/linux-2.5/drivers/net/Kconfig new/linux-2.5/drivers/net/Kconfig --- old/linux-2.5/drivers/net/Kconfig 2004-10-07 15:52:11.000000000 -0700 +++ new/linux-2.5/drivers/net/Kconfig 2004-10-07 15:52:27.000000000 -0700 @@ -1413,66 +1413,17 @@ config E100 depends on NET_PCI && PCI select MII ---help--- - This driver supports Intel(R) PRO/100 family of adapters, which - includes: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - - 82558 PRO/100+ PCI Adapter 668081-xxx, - 689661-xxx - 82558 PRO/100+ Management Adapter 691334-xxx, - 701738-xxx, - 721383-xxx - 82558 PRO/100+ Dual Port Server Adapter 714303-xxx, - 711269-xxx, - A28276-xxx - 82558 PRO/100+ PCI Server Adapter 710550-xxx - 82550 PRO/100 S Server Adapter 752438-xxx - 82559 A56831-xxx, - A10563-xxx, - A12171-xxx, - A12321-xxx, - A12320-xxx, - A12170-xxx - 748568-xxx - 748565-xxx - 82550 PRO/100 S Desktop Adapter 751767-xxx - 82559 748592-xxx, - A12167-xxx, - A12318-xxx, - A12317-xxx, - A12165-xxx, - 748569-xxx - 82559 PRO/100+ Server Adapter 729757-xxx - 82559 PRO/100 S Management Adapter 748566-xxx, - 748564-xxx - 82550 PRO/100 S Dual Port Server Adapter A56831-xxx - 82551 PRO/100 M Desktop Adapter A80897-xxx - PRO/100 S Advanced Management Adapter - 747842-xxx, - 745171-xxx - CNR PRO/100 VE Desktop Adapter A10386-xxx, - A10725-xxx, - A23801-xxx, - A19716-xxx - PRO/100 VM Desktop Adapter A14323-xxx, - A19725-xxx, - A23801-xxx, - A22220-xxx, - A23796-xxx - - + This driver supports Intel(R) PRO/100 family of adapters. To verify that your adapter is supported, find the board ID number on the adapter. Look for a label that has a barcode and a number - in the format 123456-001 (six digits hyphen three digits). Match - this to the list of numbers above. + in the format 123456-001 (six digits hyphen three digits). - For more information on how to identify your adapter, go to the - Adapter & Driver ID Guide at: + Use the above information and the Adapter & Driver ID Guide at: http://support.intel.com/support/network/adapter/pro100/21397.htm + to identify the adapter. + For the latest Intel PRO/100 network driver for Linux, see: http://appsr.intel.com/scripts-df/support_intel.asp From ganesh.venkatesan@intel.com Fri Oct 15 06:51:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:51:06 -0700 (PDT) Received: from caduceus.fm.intel.com (fmr02.intel.com [192.55.52.25]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDoxL7022670 for ; Fri, 15 Oct 2004 06:50:59 -0700 Received: from petasus-pilot.fm.intel.com (petasus-pilot.fm.intel.com [10.1.192.44]) by caduceus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDpJI8029772; Fri, 15 Oct 2004 13:51:19 GMT Received: from fmsmsxvs041.fm.intel.com (fmsmsxvs041.fm.intel.com [132.233.42.126]) by petasus-pilot.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDt1QI010899; Fri, 15 Oct 2004 13:55:20 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs041.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506504016712 ; Fri, 15 Oct 2004 06:50:40 -0700 Date: Fri, 15 Oct 2004 06:50:40 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 3/3 2.5] ixgb: Configuration and user guide update Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10234 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 3829 Lines: 106 diff -Nuarp old/linux-2.5/Documentation/networking/ixgb.txt new/linux-2.5/Documentation/networking/ixgb.txt --- old/linux-2.5/Documentation/networking/ixgb.txt 2004-10-07 15:50:50.000000000 -0700 +++ new/linux-2.5/Documentation/networking/ixgb.txt 2004-10-07 15:51:47.000000000 -0700 @@ -1,14 +1,14 @@ Linux* Base Driver for the Intel(R) PRO/10GbE Family of Adapters ================================================================ -January 06, 2003 +September 13, 2004 Contents ======== - In This Release -- Supported Adapters +- Identifying Your Adapter - Command Line Parameters - Improving Performance - Support @@ -18,36 +18,23 @@ In This Release =============== This file describes the Linux* Base Driver for the Intel(R) PRO/10GbE Family -of Adapters, version 1.0.x. This driver is intended for 2.4.x kernels; it is -known to build properly on 2.4.x kernels through 2.4.18. Intel focused -testing on Intel architectures running kernels 2.4.18. This driver includes -support for Itanium(TM)-based systems. +of Adapters, version 1.0.x. This driver includes support for Itanium(TM)2 and +EM64T systems. For questions related to hardware requirements, refer to the documentation supplied with your Intel PRO/10GbE adapter. All hardware requirements listed apply to use with Linux. - -Supported Adapters -================== - -The following Intel network adapters are compatible with the drivers in this -release: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - - 82597EX Intel(R) PRO/10GbE LR Server Adapter A82505-xxx - +Identifying Your Adapter +======================== To verify your Intel adapter is supported, find the board ID number on the adapter. Look for a label that has a barcode and a number in the format -A12345-001. Match this to the list of numbers above. +A12345-001. -For more information on how to identify your adapter, go to the Adapter & -Driver ID Guide at: +Use the above information and the Adapter & Driver ID Guide at: - http://support.intel.com/support/network/adapter/pro100/21397.htm + http://support.intel.com/support/network/adapter/pro100/21397.htm For the latest Intel network drivers for Linux, go to: @@ -72,8 +59,9 @@ loads the ixgb driver with 80 TX resourc resources for the second adapter. The default value for each parameter is generally the recommended setting, -unless otherwise noted. - +unless otherwise noted. Also, if the driver is statically built into the +kernel, the driver is loaded with the default values for all the parameters. +Ethtool can be used to change some of the parameters at runtime. FlowControl Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx) @@ -125,7 +113,6 @@ Default Value: 1 offload for transmitted packets (both UDP and TCP) to the adapter hardware. - Improving Performance ===================== diff -Nuarp old/linux-2.5/drivers/net/Kconfig new/linux-2.5/drivers/net/Kconfig --- old/linux-2.5/drivers/net/Kconfig 2004-10-07 15:52:11.000000000 -0700 +++ new/linux-2.5/drivers/net/Kconfig 2004-10-07 15:52:27.000000000 -0700 @@ -2132,14 +2132,8 @@ config IXGB depends on PCI ---help--- This driver supports Intel(R) PRO/10GbE family of - adapters, which includes: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - 82597EX Intel(R) PRO/10GbE LR Server Adapter A82505-xxx - - For more information on how to identify your adapter, go to the - Adapter & Driver ID Guide at: + adapters. For more information on how to identify your adapter, go + to the Adapter & Driver ID Guide at: From ganesh.venkatesan@intel.com Fri Oct 15 06:51:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:51:14 -0700 (PDT) Received: from orsfmr001.jf.intel.com (fmr12.intel.com [134.134.136.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDp8Zb022853 for ; Fri, 15 Oct 2004 06:51:08 -0700 Received: from petasus.jf.intel.com (petasus.jf.intel.com [10.7.209.6]) by orsfmr001.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDpJOH018066; Fri, 15 Oct 2004 13:51:19 GMT Received: from orsmsxvs040.jf.intel.com (orsmsxvs040.jf.intel.com [192.168.65.206]) by petasus.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDrAWs024826; Fri, 15 Oct 2004 13:54:20 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by orsmsxvs040.jf.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506504815853 ; Fri, 15 Oct 2004 06:50:48 -0700 Date: Fri, 15 Oct 2004 06:50:48 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 0/5 2.4] e1000: driver update Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10235 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 289 Lines: 9 1. modified ethtool_set_pauseparam to use e1000_setup_link for flow control settings for fiber serdes link 2. remove unused function e1000_enable_mng_pass_thru 3. fix set ringparam for ethtool returning error code on bad input 4. driver version number update 5. white space corrections From ganesh.venkatesan@intel.com Fri Oct 15 06:51:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:51:25 -0700 (PDT) Received: from caduceus.fm.intel.com (fmr02.intel.com [192.55.52.25]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDpG4J023047 for ; Fri, 15 Oct 2004 06:51:16 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by caduceus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDpaI8029881; Fri, 15 Oct 2004 13:51:36 GMT Received: from fmsmsxvs040.fm.intel.com (fmsmsxvs040.fm.intel.com [132.233.42.124]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDsQEE029467; Fri, 15 Oct 2004 13:54:29 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs040.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506505628698 ; Fri, 15 Oct 2004 06:50:56 -0700 Date: Fri, 15 Oct 2004 06:50:56 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 1/5 2.4] e1000: fix set_pauseparam for fiber serdes link Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10236 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 533 Lines: 15 diff -up linux-2.4/drivers/net/e1000/e1000_ethtool.c linux-2.4/drivers/net/e1000.new/e1000_ethtool.c --- linux-2.4/drivers/net/e1000/e1000_ethtool.c 2004-10-07 09:11:14.000000000 -0700 +++ linux-2.4/drivers/net/e1000.new/e1000_ethtool.c 2004-10-07 09:11:17.000000000 -0700 @@ -249,7 +249,8 @@ e1000_set_pauseparam(struct net_device * e1000_reset(adapter); } else - return e1000_force_mac_fc(hw); + return ((hw->media_type == e1000_media_type_fiber) ? + e1000_setup_link(hw) : e1000_force_mac_fc(hw)); return 0; } From ganesh.venkatesan@intel.com Fri Oct 15 06:51:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:51:37 -0700 (PDT) Received: from caduceus.fm.intel.com (fmr02.intel.com [192.55.52.25]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDpSlJ023286 for ; Fri, 15 Oct 2004 06:51:28 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by caduceus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDplI8029988; Fri, 15 Oct 2004 13:51:47 GMT Received: from fmsmsxvs043.fm.intel.com (fmsmsxvs043.fm.intel.com [132.233.42.129]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDsXEE029534; Fri, 15 Oct 2004 13:54:41 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs043.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506510830154 ; Fri, 15 Oct 2004 06:51:08 -0700 Date: Fri, 15 Oct 2004 06:51:08 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 2/5 2.4] e1000: remove unused function e1000_enable_mng_pass_thru Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10237 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 1187 Lines: 37 diff -up linux-2.4/drivers/net/e1000/e1000_hw.c linux-2.4/drivers/net/e1000.new/e1000_hw.c --- linux-2.4/drivers/net/e1000/e1000_hw.c 2004-10-07 09:11:14.000000000 -0700 +++ linux-2.4/drivers/net/e1000.new/e1000_hw.c 2004-10-07 09:11:17.000000000 -0700 @@ -5227,31 +5227,6 @@ e1000_set_vco_speed(struct e1000_hw *hw) return E1000_SUCCESS; } -/****************************************************************************** - * Verifies the hardware needs to allow ARPs to be processed by the host - * - * hw - Struct containing variables accessed by shared code - * - * returns: - TRUE/FALSE - * - *****************************************************************************/ -uint32_t -e1000_enable_mng_pass_thru(struct e1000_hw *hw) -{ - uint32_t manc; - - if (hw->asf_firmware_present) { - manc = E1000_READ_REG(hw, MANC); - - if (!(manc & E1000_MANC_RCV_TCO_EN) || - !(manc & E1000_MANC_EN_MAC_ADDR_FILTER)) - return FALSE; - if ((manc & E1000_MANC_SMBUS_EN) && !(manc & E1000_MANC_ASF_EN)) - return TRUE; - } - return FALSE; -} - static int32_t e1000_polarity_reversal_workaround(struct e1000_hw *hw) { From ganesh.venkatesan@intel.com Fri Oct 15 06:51:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:51:44 -0700 (PDT) Received: from fmsfmr003.fm.intel.com (fmr10.intel.com [192.55.52.30]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDpbpx023481 for ; Fri, 15 Oct 2004 06:51:37 -0700 Received: from petasus-pilot.fm.intel.com (petasus-pilot.fm.intel.com [10.1.192.44]) by fmsfmr003.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDqwxw003073; Fri, 15 Oct 2004 13:52:58 GMT Received: from fmsmsxvs041.fm.intel.com (fmsmsxvs041.fm.intel.com [132.233.42.126]) by petasus-pilot.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDtwQ6011430; Fri, 15 Oct 2004 13:55:58 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs041.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506511716791 ; Fri, 15 Oct 2004 06:51:18 -0700 Date: Fri, 15 Oct 2004 06:51:18 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 3/5 2.4] e1000: fix set ringparam for ethtool returning error code on bad input Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10238 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 542 Lines: 16 diff -up linux-2.4/drivers/net/e1000/e1000_ethtool.c linux-2.4/drivers/net/e1000.new/e1000_ethtool.c --- linux-2.4/drivers/net/e1000/e1000_ethtool.c 2004-10-07 09:11:14.000000000 -0700 +++ linux-2.4/drivers/net/e1000.new/e1000_ethtool.c 2004-10-07 09:11:17.000000000 -0700 @@ -593,6 +593,9 @@ e1000_set_ringparam(struct net_device *n tx_old = adapter->tx_ring; rx_old = adapter->rx_ring; + if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) + return -EINVAL; + if(netif_running(adapter->netdev)) e1000_down(adapter); From ganesh.venkatesan@intel.com Fri Oct 15 06:51:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:51:49 -0700 (PDT) Received: from hermes.fm.intel.com (fmr01.intel.com [192.55.52.18]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDphfM023697 for ; Fri, 15 Oct 2004 06:51:43 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by hermes.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDroIA013888; Fri, 15 Oct 2004 13:53:50 GMT Received: from fmsmsxvs040.fm.intel.com (fmsmsxvs040.fm.intel.com [132.233.42.124]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDspEE029771; Fri, 15 Oct 2004 13:55:01 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs040.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506512728747 ; Fri, 15 Oct 2004 06:51:28 -0700 Date: Fri, 15 Oct 2004 06:51:28 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 4/5 2.4] e1000: driver version update Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10239 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 586 Lines: 14 diff -up linux-2.4/drivers/net/e1000/e1000_main.c linux-2.4/drivers/net/e1000.new/e1000_main.c --- linux-2.4/drivers/net/e1000/e1000_main.c 2004-10-07 09:11:14.000000000 -0700 +++ linux-2.4/drivers/net/e1000.new/e1000_main.c 2004-10-07 09:11:17.000000000 -0700 @@ -48,7 +48,7 @@ char e1000_driver_string[] = "Intel(R) P #else #define DRIVERNAPI "-NAPI" #endif -char e1000_driver_version[] = "5.4.11-k1"DRIVERNAPI; +char e1000_driver_version[] = "5.5.4-k1"DRIVERNAPI; char e1000_copyright[] = "Copyright (c) 1999-2004 Intel Corporation."; /* e1000_pci_tbl - PCI Device ID Table From ganesh.venkatesan@intel.com Fri Oct 15 06:52:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:52:23 -0700 (PDT) Received: from caduceus.jf.intel.com (fmr06.intel.com [134.134.136.7]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDqFpf024347 for ; Fri, 15 Oct 2004 06:52:15 -0700 Received: from petasus.jf.intel.com (petasus.jf.intel.com [10.7.209.6]) by caduceus.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDpPSU008013; Fri, 15 Oct 2004 13:51:25 GMT Received: from orsmsxvs040.jf.intel.com (orsmsxvs040.jf.intel.com [192.168.65.206]) by petasus.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDtQWG025894; Fri, 15 Oct 2004 13:55:27 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by orsmsxvs040.jf.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506515615976 ; Fri, 15 Oct 2004 06:51:56 -0700 Date: Fri, 15 Oct 2004 06:51:56 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 5/5 2.4] e1000: white space corrections Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10240 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 644 Lines: 15 diff -up linux-2.4/drivers/net/e1000/e1000_param.c linux-2.4/drivers/net/e1000.new/e1000_param.c --- linux-2.4/drivers/net/e1000/e1000_param.c 2004-10-07 09:11:14.000000000 -0700 +++ linux-2.4/drivers/net/e1000.new/e1000_param.c 2004-10-07 09:11:17.000000000 -0700 @@ -211,7 +211,7 @@ E1000_PARAM(InterruptThrottleRate, "Inte #define MAX_TXABSDELAY 0xFFFF #define MIN_TXABSDELAY 0 -#define DEFAULT_ITR 8000 +#define DEFAULT_ITR 8000 #define MAX_ITR 100000 #define MIN_ITR 100 Only in linux-2.4/drivers/net/e1000.new: kcompat_ethtool.c From ganesh.venkatesan@intel.com Fri Oct 15 06:52:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:52:38 -0700 (PDT) Received: from orsfmr001.jf.intel.com (fmr12.intel.com [134.134.136.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDqSP4024600 for ; Fri, 15 Oct 2004 06:52:28 -0700 Received: from petasus.jf.intel.com (petasus.jf.intel.com [10.7.209.6]) by orsfmr001.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDqdOH018474; Fri, 15 Oct 2004 13:52:39 GMT Received: from orsmsxvs040.jf.intel.com (orsmsxvs040.jf.intel.com [192.168.65.206]) by petasus.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDtQWM025894; Fri, 15 Oct 2004 13:55:40 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by orsmsxvs040.jf.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506520815998 ; Fri, 15 Oct 2004 06:52:08 -0700 Date: Fri, 15 Oct 2004 06:52:08 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 0/5 2.5] e1000: driver update Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10241 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 288 Lines: 8 1. modified ethtool_set_pauseparam to use e1000_setup_link for flow control settings for fiber serdes link 2. remove unused function e1000_enable_mng_pass_thru 3. fix set ringparam for ethtool returning error code on bad input 4. driver version number update 5. white space corrections From ganesh.venkatesan@intel.com Fri Oct 15 06:52:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:52:43 -0700 (PDT) Received: from fmsfmr003.fm.intel.com (fmr10.intel.com [192.55.52.30]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDqY38024717 for ; Fri, 15 Oct 2004 06:52:35 -0700 Received: from petasus-pilot.fm.intel.com (petasus-pilot.fm.intel.com [10.1.192.44]) by fmsfmr003.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDruxw003390; Fri, 15 Oct 2004 13:53:56 GMT Received: from fmsmsxvs041.fm.intel.com (fmsmsxvs041.fm.intel.com [132.233.42.126]) by petasus-pilot.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDurQ8011936; Fri, 15 Oct 2004 13:56:55 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs041.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506521516907 ; Fri, 15 Oct 2004 06:52:15 -0700 Date: Fri, 15 Oct 2004 06:52:15 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 1/5 2.5] e1000: modified ethtool_set_pauseparam to use e1000_setup_link for flow control settings for fiber serdes link Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10242 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 537 Lines: 15 diff -up netdev-2.6/drivers/net/e1000/e1000_ethtool.c netdev-2.6/drivers/net/e1000.new/e1000_ethtool.c --- netdev-2.6/drivers/net/e1000/e1000_ethtool.c 2004-10-07 13:59:52.000000000 -0700 +++ netdev-2.6/drivers/net/e1000.new/e1000_ethtool.c 2004-10-07 13:59:53.000000000 -0700 @@ -249,7 +249,8 @@ e1000_set_pauseparam(struct net_device * e1000_reset(adapter); } else - return e1000_force_mac_fc(hw); + return ((hw->media_type == e1000_media_type_fiber) ? + e1000_setup_link(hw) : e1000_force_mac_fc(hw)); return 0; } From ganesh.venkatesan@intel.com Fri Oct 15 06:52:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:52:53 -0700 (PDT) Received: from orsfmr001.jf.intel.com (fmr12.intel.com [134.134.136.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDqkm9024916 for ; Fri, 15 Oct 2004 06:52:46 -0700 Received: from petasus.jf.intel.com (petasus.jf.intel.com [10.7.209.6]) by orsfmr001.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDqwOH018596; Fri, 15 Oct 2004 13:52:58 GMT Received: from orsmsxvs040.jf.intel.com (orsmsxvs040.jf.intel.com [192.168.65.206]) by petasus.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDtQWa025894; Fri, 15 Oct 2004 13:55:58 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by orsmsxvs040.jf.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506522616028 ; Fri, 15 Oct 2004 06:52:26 -0700 Date: Fri, 15 Oct 2004 06:52:26 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 2/5 2.5] e1000: remove unused function e1000_enable_mng_pass_thru Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10243 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 1191 Lines: 37 diff -up netdev-2.6/drivers/net/e1000/e1000_hw.c netdev-2.6/drivers/net/e1000.new/e1000_hw.c --- netdev-2.6/drivers/net/e1000/e1000_hw.c 2004-10-07 13:59:52.000000000 -0700 +++ netdev-2.6/drivers/net/e1000.new/e1000_hw.c 2004-10-07 13:59:53.000000000 -0700 @@ -5221,31 +5221,6 @@ e1000_set_vco_speed(struct e1000_hw *hw) return E1000_SUCCESS; } -/****************************************************************************** - * Verifies the hardware needs to allow ARPs to be processed by the host - * - * hw - Struct containing variables accessed by shared code - * - * returns: - TRUE/FALSE - * - *****************************************************************************/ -uint32_t -e1000_enable_mng_pass_thru(struct e1000_hw *hw) -{ - uint32_t manc; - - if (hw->asf_firmware_present) { - manc = E1000_READ_REG(hw, MANC); - - if (!(manc & E1000_MANC_RCV_TCO_EN) || - !(manc & E1000_MANC_EN_MAC_ADDR_FILTER)) - return FALSE; - if ((manc & E1000_MANC_SMBUS_EN) && !(manc & E1000_MANC_ASF_EN)) - return TRUE; - } - return FALSE; -} - static int32_t e1000_polarity_reversal_workaround(struct e1000_hw *hw) { From ganesh.venkatesan@intel.com Fri Oct 15 06:53:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:53:06 -0700 (PDT) Received: from caduceus.jf.intel.com (fmr06.intel.com [134.134.136.7]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDqxwK025186 for ; Fri, 15 Oct 2004 06:52:59 -0700 Received: from petasus.jf.intel.com (petasus.jf.intel.com [10.7.209.6]) by caduceus.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDq9SU008176; Fri, 15 Oct 2004 13:52:09 GMT Received: from orsmsxvs040.jf.intel.com (orsmsxvs040.jf.intel.com [192.168.65.206]) by petasus.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDu6WE026227; Fri, 15 Oct 2004 13:56:06 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by orsmsxvs040.jf.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506523416036 ; Fri, 15 Oct 2004 06:52:35 -0700 Date: Fri, 15 Oct 2004 06:52:35 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 3/5 2.5] e1000: fix set ringparam for ethtool returning error code on bad input Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10244 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 544 Lines: 15 diff -up netdev-2.6/drivers/net/e1000/e1000_ethtool.c netdev-2.6/drivers/net/e1000.new/e1000_ethtool.c --- netdev-2.6/drivers/net/e1000/e1000_ethtool.c 2004-10-07 13:59:52.000000000 -0700 +++ netdev-2.6/drivers/net/e1000.new/e1000_ethtool.c 2004-10-07 13:59:53.000000000 -0700 @@ -593,6 +593,9 @@ e1000_set_ringparam(struct net_device *n tx_old = adapter->tx_ring; rx_old = adapter->rx_ring; + if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) + return -EINVAL; + if(netif_running(adapter->netdev)) e1000_down(adapter); From ganesh.venkatesan@intel.com Fri Oct 15 06:53:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:53:12 -0700 (PDT) Received: from caduceus.fm.intel.com (fmr02.intel.com [192.55.52.25]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDr4Ji025308 for ; Fri, 15 Oct 2004 06:53:04 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by caduceus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDrOI8030494; Fri, 15 Oct 2004 13:53:24 GMT Received: from fmsmsxvs040.fm.intel.com (fmsmsxvs040.fm.intel.com [132.233.42.124]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDuHEA030740; Fri, 15 Oct 2004 13:56:17 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs040.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506524428904 ; Fri, 15 Oct 2004 06:52:44 -0700 Date: Fri, 15 Oct 2004 06:52:44 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 4/5 2.5] e1000: driver version update Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10245 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 590 Lines: 14 diff -up netdev-2.6/drivers/net/e1000/e1000_main.c netdev-2.6/drivers/net/e1000.new/e1000_main.c --- netdev-2.6/drivers/net/e1000/e1000_main.c 2004-10-07 13:59:52.000000000 -0700 +++ netdev-2.6/drivers/net/e1000.new/e1000_main.c 2004-10-07 13:59:54.000000000 -0700 @@ -48,7 +48,7 @@ char e1000_driver_string[] = "Intel(R) P #else #define DRIVERNAPI "-NAPI" #endif -char e1000_driver_version[] = "5.3.19-k2"DRIVERNAPI; +char e1000_driver_version[] = "5.5.4-k2"DRIVERNAPI; char e1000_copyright[] = "Copyright (c) 1999-2004 Intel Corporation."; /* e1000_pci_tbl - PCI Device ID Table From ganesh.venkatesan@intel.com Fri Oct 15 06:53:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:53:25 -0700 (PDT) Received: from fmsfmr004.fm.intel.com (fmr11.intel.com [192.55.52.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDrJ1b025629 for ; Fri, 15 Oct 2004 06:53:19 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by fmsfmr004.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDu1BE008798; Fri, 15 Oct 2004 13:56:02 GMT Received: from fmsmsxvs043.fm.intel.com (fmsmsxvs043.fm.intel.com [132.233.42.129]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDu6EW030653; Fri, 15 Oct 2004 13:56:32 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs043.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506525930369 ; Fri, 15 Oct 2004 06:52:59 -0700 Date: Fri, 15 Oct 2004 06:52:59 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 5/5 2.5] e1000: white space corrections Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10246 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 573 Lines: 13 diff -up netdev-2.6/drivers/net/e1000/e1000_ethtool.c netdev-2.6/drivers/net/e1000.new/e1000_ethtool.c --- netdev-2.6/drivers/net/e1000/e1000_ethtool.c 2004-10-07 13:59:52.000000000 -0700 +++ netdev-2.6/drivers/net/e1000.new/e1000_ethtool.c 2004-10-07 13:59:53.000000000 -0700 @@ -641,7 +641,6 @@ err_setup_rx: return err; } - #define REG_PATTERN_TEST(R, M, W) \ { \ uint32_t pat, value; \ From ganesh.venkatesan@intel.com Fri Oct 15 06:53:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:53:36 -0700 (PDT) Received: from caduceus.fm.intel.com (fmr02.intel.com [192.55.52.25]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDrUuE025894 for ; Fri, 15 Oct 2004 06:53:30 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by caduceus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDroI8030644; Fri, 15 Oct 2004 13:53:50 GMT Received: from fmsmsxvs040.fm.intel.com (fmsmsxvs040.fm.intel.com [132.233.42.124]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDuEEM030718; Fri, 15 Oct 2004 13:56:43 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs040.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506531028962 ; Fri, 15 Oct 2004 06:53:10 -0700 Date: Fri, 15 Oct 2004 06:53:10 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 0/5 2.5] e100: driver update Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10247 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 497 Lines: 10 1. Fix e100_watchdog to not accidentally re-enable interrupts when setting the software interrupt bit. Bug fixed was data corruption noticed with i memory poisoning kernel, when under heavy (65000+) packets per second load on PPC64. 2. Downing interface breakes connectivity of BMC removed small portion of TCO workaround in e100_hw_reset routine 3. Fix set ringparam for ethtool returning error code on bad input 4. Driver version number update 5. More DPRINTK messages to log driver state. From ganesh.venkatesan@intel.com Fri Oct 15 06:53:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:53:51 -0700 (PDT) Received: from hermes-pilot.fm.intel.com (fmr99.intel.com [192.55.52.32]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDrfa6026140 for ; Fri, 15 Oct 2004 06:53:41 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by hermes-pilot.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDvwUf020448; Fri, 15 Oct 2004 13:57:58 GMT Received: from fmsmsxvs040.fm.intel.com (fmsmsxvs040.fm.intel.com [132.233.42.124]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDupEA031038; Fri, 15 Oct 2004 13:56:53 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs040.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506531828977 ; Fri, 15 Oct 2004 06:53:18 -0700 Date: Fri, 15 Oct 2004 06:53:18 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 1/5 2.5] e100: Fix e100_watchdog to not accidentally re-enable interrupts when setting the software interrupt bit. Message-ID: ReplyTo: Ganesh Venkatesan MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10248 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 1442 Lines: 43 diff -up netdev-2.6/drivers/net/e100.c netdev-2.6/drivers/net/e100.c.new --- netdev-2.6/drivers/net/e100.c 2004-10-07 13:58:59.000000000 -0700 +++ netdev-2.6/drivers/net/e100.c.new 2004-10-07 13:59:00.000000000 -0700 @@ -575,13 +575,21 @@ static inline void e100_write_flush(stru static inline void e100_enable_irq(struct nic *nic) { + unsigned long flags; + + spin_lock_irqsave(&nic->cmd_lock, flags); writeb(irq_mask_none, &nic->csr->scb.cmd_hi); + spin_unlock_irqrestore(&nic->cmd_lock, flags); e100_write_flush(nic); } static inline void e100_disable_irq(struct nic *nic) { + unsigned long flags; + + spin_lock_irqsave(&nic->cmd_lock, flags); writeb(irq_mask_all, &nic->csr->scb.cmd_hi); + spin_unlock_irqrestore(&nic->cmd_lock, flags); e100_write_flush(nic); } @@ -1254,8 +1262,13 @@ static void e100_watchdog(unsigned long mii_check_link(&nic->mii); /* Software generated interrupt to recover from (rare) Rx - * allocation failure */ - writeb(irq_sw_gen, &nic->csr->scb.cmd_hi); + * allocation failure. + * Unfortunately have to use a spinlock to not re-enable interrupts + * accidentally, due to hardware that shares a register between the + * interrupt mask bit and the SW Interrupt generation bit */ + spin_lock_irq(&nic->cmd_lock); + writeb(readb(&nic->csr->scb.cmd_hi) | irq_sw_gen,&nic->csr->scb.cmd_hi); + spin_unlock_irq(&nic->cmd_lock); e100_write_flush(nic); e100_update_stats(nic); From ganesh.venkatesan@intel.com Fri Oct 15 06:53:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:53:53 -0700 (PDT) Received: from hermes.fm.intel.com (fmr01.intel.com [192.55.52.18]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDrgNM026265 for ; Fri, 15 Oct 2004 06:53:42 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by hermes.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDtnIA014728; Fri, 15 Oct 2004 13:55:49 GMT Received: from fmsmsxvs040.fm.intel.com (fmsmsxvs040.fm.intel.com [132.233.42.124]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDv0EA031077; Fri, 15 Oct 2004 13:57:00 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs040.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506532728992 ; Fri, 15 Oct 2004 06:53:27 -0700 Date: Fri, 15 Oct 2004 06:53:27 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 2/5 2.5] e100: Fix for BMC connectivity loss on interface down Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10249 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 814 Lines: 22 diff -up netdev-2.6/drivers/net/e100.c netdev-2.6/drivers/net/e100.c.new --- netdev-2.6/drivers/net/e100.c 2004-10-07 13:58:59.000000000 -0700 +++ netdev-2.6/drivers/net/e100.c.new 2004-10-07 13:59:00.000000000 -0700 @@ -604,16 +604,6 @@ static void e100_hw_reset(struct nic *ni writel(software_reset, &nic->csr->port); e100_write_flush(nic); udelay(20); - /* TCO workaround - 82559 and greater */ - if(nic->mac >= mac_82559_D101M) { - /* Issue a redundant CU load base without setting - * general pointer, and without waiting for scb to - * clear. This gets us into post-driver. Finally, - * wait 20 msec for reset to take effect. */ - writeb(cuc_load_base, &nic->csr->scb.cmd_lo); - mdelay(20); - } - /* Mask off our interrupt line - it's unmasked after reset */ e100_disable_irq(nic); } From ganesh.venkatesan@intel.com Fri Oct 15 06:54:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:54:12 -0700 (PDT) Received: from hermes.fm.intel.com (fmr01.intel.com [192.55.52.18]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDs32H026648 for ; Fri, 15 Oct 2004 06:54:03 -0700 Received: from petasus-pilot.fm.intel.com (petasus-pilot.fm.intel.com [10.1.192.44]) by hermes.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDuAIA014848; Fri, 15 Oct 2004 13:56:10 GMT Received: from fmsmsxvs041.fm.intel.com (fmsmsxvs041.fm.intel.com [132.233.42.126]) by petasus-pilot.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDwDQC012646; Fri, 15 Oct 2004 13:58:29 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs041.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506534917074 ; Fri, 15 Oct 2004 06:53:49 -0700 Date: Fri, 15 Oct 2004 06:53:49 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 4/5 2.5] e100: driver version update Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10251 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 526 Lines: 14 diff -up netdev-2.6/drivers/net/e100.c netdev-2.6/drivers/net/e100.c.new --- netdev-2.6/drivers/net/e100.c 2004-10-07 13:58:59.000000000 -0700 +++ netdev-2.6/drivers/net/e100.c.new 2004-10-07 13:59:00.000000000 -0700 @@ -155,7 +155,7 @@ #define DRV_NAME "e100" #define DRV_EXT "-NAPI" -#define DRV_VERSION "3.1.4"DRV_EXT +#define DRV_VERSION "3.2.3-k2"DRV_EXT #define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver" #define DRV_COPYRIGHT "Copyright(c) 1999-2004 Intel Corporation" #define PFX DRV_NAME ": " From ganesh.venkatesan@intel.com Fri Oct 15 06:54:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:54:09 -0700 (PDT) Received: from hermes-pilot.fm.intel.com (fmr99.intel.com [192.55.52.32]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDs0mA026462 for ; Fri, 15 Oct 2004 06:54:00 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by hermes-pilot.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDwHUf020556; Fri, 15 Oct 2004 13:58:17 GMT Received: from fmsmsxvs042.fm.intel.com (fmsmsxvs042.fm.intel.com [132.233.42.128]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDvBEC031184; Fri, 15 Oct 2004 13:57:13 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs042.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506534010405 ; Fri, 15 Oct 2004 06:53:40 -0700 Date: Fri, 15 Oct 2004 06:53:40 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 3/5 2.5] e100: Fix set ringparam for ethtool returning error code on bad input Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10250 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 556 Lines: 15 diff -up netdev-2.6/drivers/net/e100.c netdev-2.6/drivers/net/e100.c.new --- netdev-2.6/drivers/net/e100.c 2004-10-07 13:58:59.000000000 -0700 +++ netdev-2.6/drivers/net/e100.c.new 2004-10-07 13:59:00.000000000 -0700 @@ -1957,6 +1957,9 @@ static int e100_set_ringparam(struct net struct param_range *rfds = &nic->params.rfds; struct param_range *cbs = &nic->params.cbs; + if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) + return -EINVAL; + if(netif_running(netdev)) e100_down(nic); rfds->count = max(ring->rx_pending, rfds->min); From ganesh.venkatesan@intel.com Fri Oct 15 06:54:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:54:26 -0700 (PDT) Received: from fmsfmr004.fm.intel.com (fmr11.intel.com [192.55.52.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDsHlR026822 for ; Fri, 15 Oct 2004 06:54:17 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by fmsfmr004.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDuxBE009072; Fri, 15 Oct 2004 13:56:59 GMT Received: from fmsmsxvs042.fm.intel.com (fmsmsxvs042.fm.intel.com [132.233.42.128]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDvSEE031354; Fri, 15 Oct 2004 13:57:30 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs042.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506535710434 ; Fri, 15 Oct 2004 06:53:57 -0700 Date: Fri, 15 Oct 2004 06:53:57 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 5/5 2.5] e100: More DPRINTK messages to log driver state Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10252 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 816 Lines: 22 diff -up netdev-2.6/drivers/net/e100.c netdev-2.6/drivers/net/e100.c.new --- netdev-2.6/drivers/net/e100.c 2004-10-07 13:58:59.000000000 -0700 +++ netdev-2.6/drivers/net/e100.c.new 2004-10-07 13:59:00.000000000 -0700 @@ -1308,6 +1308,7 @@ static int e100_xmit_frame(struct sk_buf switch(err) { case -ENOSPC: /* We queued the skb, but now we're out of space. */ + DPRINTK(TX_ERR, DEBUG, "No space for CB\n"); netif_stop_queue(netdev); break; case -ENOMEM: @@ -1966,6 +1954,8 @@ static int e100_set_ringparam(struct net rfds->count = min(rfds->count, rfds->max); cbs->count = max(ring->tx_pending, cbs->min); cbs->count = min(cbs->count, cbs->max); + DPRINTK(DRV, INFO, "Ring Param settings: rx: %d, tx %d\n", + rfds->count, cbs->count); if(netif_running(netdev)) e100_up(nic); From ganesh.venkatesan@intel.com Fri Oct 15 06:54:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:54:36 -0700 (PDT) Received: from hermes.jf.intel.com (fmr05.intel.com [134.134.136.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDsOeY027014 for ; Fri, 15 Oct 2004 06:54:25 -0700 Received: from petasus.jf.intel.com (petasus.jf.intel.com [10.7.209.6]) by hermes.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDvl6E029911; Fri, 15 Oct 2004 13:57:47 GMT Received: from orsmsxvs040.jf.intel.com (orsmsxvs040.jf.intel.com [192.168.65.206]) by petasus.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDvUWI026882; Fri, 15 Oct 2004 13:57:36 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by orsmsxvs040.jf.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506540516226 ; Fri, 15 Oct 2004 06:54:05 -0700 Date: Fri, 15 Oct 2004 06:54:05 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 1/16 2.5] ixgb: Fix VLAN filter setup errors (while running on PPC) Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10253 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 1039 Lines: 29 diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_main.c net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c --- net-drivers-2.6/drivers/net/ixgb/ixgb_main.c 2004-10-05 15:50:18.000000000 -0700 +++ net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c 2004-10-05 17:55:48.000000000 -0700 @@ -1863,9 +1863,8 @@ ixgb_clean_rx_irq(struct ixgb_adapter *a if (adapter->vlgrp && (rx_desc->status & IXGB_RX_DESC_STATUS_VP)) { vlan_hwaccel_receive_skb(skb, adapter->vlgrp, - le16_to_cpu(rx_desc-> - special & - IXGB_RX_DESC_SPECIAL_VLAN_MASK)); + le16_to_cpu(rx_desc->special) & + IXGB_RX_DESC_SPECIAL_VLAN_MASK); } else { netif_receive_skb(skb); } @@ -1873,9 +1873,8 @@ if (adapter->vlgrp && (rx_desc->status & IXGB_RX_DESC_STATUS_VP)) { vlan_hwaccel_rx(skb, adapter->vlgrp, - le16_to_cpu(rx_desc-> - special & - IXGB_RX_DESC_SPECIAL_VLAN_MASK)); + le16_to_cpu(rx_desc->special) & + IXGB_RX_DESC_SPECIAL_VLAN_MASK); } else { netif_rx(skb); } From ganesh.venkatesan@intel.com Fri Oct 15 06:54:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:54:49 -0700 (PDT) Received: from caduceus.fm.intel.com (fmr02.intel.com [192.55.52.25]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDsYl1027163 for ; Fri, 15 Oct 2004 06:54:34 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by caduceus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDssI8030948; Fri, 15 Oct 2004 13:54:54 GMT Received: from fmsmsxvs042.fm.intel.com (fmsmsxvs042.fm.intel.com [132.233.42.128]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDvgEG031480; Fri, 15 Oct 2004 13:57:47 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs042.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506541410471 ; Fri, 15 Oct 2004 06:54:14 -0700 Date: Fri, 15 Oct 2004 06:54:14 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 2/16 2.5] ixgb: Fix memory leak in NAPI mode. Avoid unnecessary work in NAPI Rx cleanup Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10255 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 792 Lines: 31 diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_main.c net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c --- net-drivers-2.6/drivers/net/ixgb/ixgb_main.c 2004-10-05 15:50:18.000000000 -0700 +++ net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c 2004-10-05 17:55:48.000000000 -0700 @@ -1790,6 +1790,12 @@ ixgb_clean_rx_irq(struct ixgb_adapter *a while (rx_desc->status & IXGB_RX_DESC_STATUS_DD) { +#ifdef CONFIG_IXGB_NAPI + if(*work_done >= work_to_do) + break; + + (*work_done)++; +#endif skb = buffer_info->skb; prefetch(skb->data); @@ -1807,12 +1824,6 @@ ixgb_clean_rx_irq(struct ixgb_adapter *a next_skb = next_buffer->skb; prefetch(next_skb); -#ifdef CONFIG_IXGB_NAPI - if (*work_done >= work_to_do) - break; - - (*work_done)++; -#endif cleaned = TRUE; From ganesh.venkatesan@intel.com Fri Oct 15 06:54:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:54:49 -0700 (PDT) Received: from hermes.fm.intel.com (fmr01.intel.com [192.55.52.18]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDsaka027273 for ; Fri, 15 Oct 2004 06:54:36 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by hermes.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDuhIA015124; Fri, 15 Oct 2004 13:56:43 GMT Received: from fmsmsxvs040.fm.intel.com (fmsmsxvs040.fm.intel.com [132.233.42.124]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDvgEG031482; Fri, 15 Oct 2004 13:57:54 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs040.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506542129086 ; Fri, 15 Oct 2004 06:54:21 -0700 Date: Fri, 15 Oct 2004 06:54:21 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 3/16 2.5] ixgb: Fix endianess issue for Tx cleanup Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10254 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 634 Lines: 14 diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_main.c net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c --- net-drivers-2.6/drivers/net/ixgb/ixgb_main.c 2004-10-05 15:50:18.000000000 -0700 +++ net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c 2004-10-05 17:55:48.000000000 -0700 @@ -1677,7 +1677,7 @@ static boolean_t ixgb_clean_tx_irq(struc eop = tx_ring->buffer_info[i].next_to_watch; eop_desc = IXGB_TX_DESC(*tx_ring, eop); - while (eop_desc->status & cpu_to_le32(IXGB_TX_DESC_STATUS_DD)) { + while(eop_desc->status & IXGB_TX_DESC_STATUS_DD) { for (cleaned = FALSE; !cleaned;) { tx_desc = IXGB_TX_DESC(*tx_ring, i); From ganesh.venkatesan@intel.com Fri Oct 15 06:55:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:55:10 -0700 (PDT) Received: from fmsfmr004.fm.intel.com (fmr11.intel.com [192.55.52.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDt3iX027630 for ; Fri, 15 Oct 2004 06:55:03 -0700 Received: from petasus-pilot.fm.intel.com (petasus-pilot.fm.intel.com [10.1.192.44]) by fmsfmr004.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDvjBE009298; Fri, 15 Oct 2004 13:57:45 GMT Received: from fmsmsxvs041.fm.intel.com (fmsmsxvs041.fm.intel.com [132.233.42.126]) by petasus-pilot.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDx5QI012984; Fri, 15 Oct 2004 13:59:24 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs041.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506544317217 ; Fri, 15 Oct 2004 06:54:43 -0700 Date: Fri, 15 Oct 2004 06:54:43 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 5/16 2.5] ixgb: Condition that determines when to quit polling mode includes work done in Tx path Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10257 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 1001 Lines: 28 diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_main.c net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c --- net-drivers-2.6/drivers/net/ixgb/ixgb_main.c 2004-10-05 15:50:18.000000000 -0700 +++ net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c 2004-10-05 17:55:48.000000000 -0700 @@ -1640,15 +1640,18 @@ static irqreturn_t ixgb_intr(int irq, vo { struct ixgb_adapter *adapter = netdev->priv; int work_to_do = min(*budget, netdev->quota); + int tx_cleaned; int work_done = 0; - - ixgb_clean_tx_irq(adapter); + + tx_cleaned = ixgb_clean_tx_irq(adapter); ixgb_clean_rx_irq(adapter, &work_done, work_to_do); *budget -= work_done; netdev->quota -= work_done; - - if (work_done < work_to_do || !netif_running(netdev)) { + + /* if no Rx and Tx cleanup work was done, exit the polling mode */ + if(!tx_cleaned || (work_done < work_to_do) || + !netif_running(netdev)) { netif_rx_complete(netdev); /* RAIDC will be automatically restarted by irq_enable */ ixgb_irq_enable(adapter); From ganesh.venkatesan@intel.com Fri Oct 15 06:54:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:55:01 -0700 (PDT) Received: from caduceus.fm.intel.com (fmr02.intel.com [192.55.52.25]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDsp2M027455 for ; Fri, 15 Oct 2004 06:54:52 -0700 Received: from petasus-pilot.fm.intel.com (petasus-pilot.fm.intel.com [10.1.192.44]) by caduceus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDtBI8031079; Fri, 15 Oct 2004 13:55:11 GMT Received: from fmsmsxvs041.fm.intel.com (fmsmsxvs041.fm.intel.com [132.233.42.126]) by petasus-pilot.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDwDQW012646; Fri, 15 Oct 2004 13:59:12 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs041.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506543117180 ; Fri, 15 Oct 2004 06:54:32 -0700 Date: Fri, 15 Oct 2004 06:54:31 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 4/16 2.5] ixgb: Fix NAPI driver crash on ifdown during traffic Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10256 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 517 Lines: 13 diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_main.c net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c --- net-drivers-2.6/drivers/net/ixgb/ixgb_main.c 2004-10-05 15:50:18.000000000 -0700 +++ net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c 2004-10-05 17:55:48.000000000 -0700 @@ -1652,6 +1652,7 @@ static irqreturn_t ixgb_intr(int irq, vo netif_rx_complete(netdev); /* RAIDC will be automatically restarted by irq_enable */ ixgb_irq_enable(adapter); + return 0; } return (work_done >= work_to_do); From ganesh.venkatesan@intel.com Fri Oct 15 06:55:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:55:28 -0700 (PDT) Received: from hermes-pilot.fm.intel.com (fmr99.intel.com [192.55.52.32]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDtKNl028031 for ; Fri, 15 Oct 2004 06:55:20 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by hermes-pilot.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDxbUf020950; Fri, 15 Oct 2004 13:59:38 GMT Received: from fmsmsxvs042.fm.intel.com (fmsmsxvs042.fm.intel.com [132.233.42.128]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDwYEA032025; Fri, 15 Oct 2004 13:58:34 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs042.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506550110556 ; Fri, 15 Oct 2004 06:55:01 -0700 Date: Fri, 15 Oct 2004 06:55:01 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 6/16 2.5] ixgb: fix error in setting Frame Size register while changing mtu Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10258 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 1060 Lines: 24 diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_main.c net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c --- net-drivers-2.6/drivers/net/ixgb/ixgb_main.c 2004-10-05 15:50:18.000000000 -0700 +++ net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c 2004-10-05 17:55:48.000000000 -0700 @@ -1437,8 +1437,8 @@ static struct net_device_stats *ixgb_get static int ixgb_change_mtu(struct net_device *netdev, int new_mtu) { struct ixgb_adapter *adapter = netdev->priv; - uint32_t old_mtu = adapter->rx_buffer_len; int max_frame = new_mtu + ENET_HEADER_SIZE + ENET_FCS_LENGTH; + int old_max_frame = netdev->mtu + ENET_HEADER_SIZE + ENET_FCS_LENGTH; if ((max_frame < IXGB_MIN_ENET_FRAME_SIZE_WITHOUT_FCS + ENET_FCS_LENGTH) || (max_frame > IXGB_MAX_JUMBO_FRAME_SIZE + ENET_FCS_LENGTH)) { @@ -1463,7 +1477,7 @@ static int ixgb_change_mtu(struct net_de netdev->mtu = new_mtu; - if (old_mtu != adapter->rx_buffer_len && netif_running(netdev)) { + if(old_max_frame != max_frame && netif_running(netdev)) { ixgb_down(adapter, TRUE); ixgb_up(adapter); From ganesh.venkatesan@intel.com Fri Oct 15 06:55:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:56:01 -0700 (PDT) Received: from hermes.jf.intel.com (fmr05.intel.com [134.134.136.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDtpmD028615 for ; Fri, 15 Oct 2004 06:55:51 -0700 Received: from petasus.jf.intel.com (petasus.jf.intel.com [10.7.209.6]) by hermes.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDxD6E030522; Fri, 15 Oct 2004 13:59:13 GMT Received: from orsmsxvs040.jf.intel.com (orsmsxvs040.jf.intel.com [192.168.65.206]) by petasus.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDwoWM027439; Fri, 15 Oct 2004 13:59:03 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by orsmsxvs040.jf.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506553116363 ; Fri, 15 Oct 2004 06:55:31 -0700 Date: Fri, 15 Oct 2004 06:55:31 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 10/16 2.5] ixgb: shrink size of ixgb_buffer (use uint16_t for length/next_to_watch) Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10262 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 519 Lines: 17 diff -up net-drivers-2.6/drivers/net/ixgb/ixgb.h net-drivers-2.6/drivers/net/ixgb.new/ixgb.h --- net-drivers-2.6/drivers/net/ixgb/ixgb.h 2004-10-05 15:50:18.000000000 -0700 +++ net-drivers-2.6/drivers/net/ixgb.new/ixgb.h 2004-10-05 16:03:24.000000000 -0700 @@ -105,9 +105,9 @@ struct ixgb_adapter; struct ixgb_buffer { struct sk_buff *skb; uint64_t dma; - unsigned long length; + uint16_t length; unsigned long time_stamp; - unsigned int next_to_watch; + uint16_t next_to_watch; }; struct ixgb_desc_ring { From ganesh.venkatesan@intel.com Fri Oct 15 06:55:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:55:50 -0700 (PDT) Received: from hermes.fm.intel.com (fmr01.intel.com [192.55.52.18]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDtdlL028507 for ; Fri, 15 Oct 2004 06:55:39 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by hermes.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDvkIA015539; Fri, 15 Oct 2004 13:57:46 GMT Received: from fmsmsxvs042.fm.intel.com (fmsmsxvs042.fm.intel.com [132.233.42.128]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDwmEC032165; Fri, 15 Oct 2004 13:58:57 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs042.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506552410598 ; Fri, 15 Oct 2004 06:55:24 -0700 Date: Fri, 15 Oct 2004 06:55:24 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 9/16 2.5] ixgb: limit Rx Address Filter Array entries to 3 Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10261 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 784 Lines: 16 diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_hw.h net-drivers-2.6/drivers/net/ixgb.new/ixgb_hw.h --- net-drivers-2.6/drivers/net/ixgb/ixgb_hw.h 2004-10-05 15:50:18.000000000 -0700 +++ net-drivers-2.6/drivers/net/ixgb.new/ixgb_hw.h 2004-10-05 17:54:36.000000000 -0700 @@ -616,9 +616,9 @@ struct ixgb_context_desc { #define IXGB_CONTEXT_DESC_STATUS_DD 0x01 /* Filters */ -#define IXGB_RAR_ENTRIES 16 /* Number of entries in Rx Address array */ #define IXGB_MC_TBL_SIZE 128 /* Multicast Filter Table (4096 bits) */ #define IXGB_VLAN_FILTER_TBL_SIZE 128 /* VLAN Filter Table (4096 bits) */ +#define IXGB_RAR_ENTRIES 3 /* Number of entries in Rx Address array */ #define IXGB_MEMORY_REGISTER_BASE_ADDRESS 0 #define ENET_HEADER_SIZE 14 From ganesh.venkatesan@intel.com Fri Oct 15 06:55:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:55:46 -0700 (PDT) Received: from hermes-pilot.fm.intel.com (fmr99.intel.com [192.55.52.32]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDtZ5G028307 for ; Fri, 15 Oct 2004 06:55:35 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by hermes-pilot.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDxqUf021015; Fri, 15 Oct 2004 13:59:52 GMT Received: from fmsmsxvs042.fm.intel.com (fmsmsxvs042.fm.intel.com [132.233.42.128]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDwYEG032025; Fri, 15 Oct 2004 13:58:48 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs042.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506551510578 ; Fri, 15 Oct 2004 06:55:15 -0700 Date: Fri, 15 Oct 2004 06:55:15 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 8/16 2.5] ixgb: remove sub-device ids for non-existant hardware Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10260 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 580 Lines: 17 diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_ids.h net-drivers-2.6/drivers/net/ixgb.new/ixgb_ids.h --- net-drivers-2.6/drivers/net/ixgb/ixgb_ids.h 2004-10-05 15:50:18.000000000 -0700 +++ net-drivers-2.6/drivers/net/ixgb.new/ixgb_ids.h 2004-10-05 17:54:44.000000000 -0700 @@ -42,11 +42,7 @@ #define IXGB_SUBDEVICE_ID_A11F 0xA11F #define IXGB_SUBDEVICE_ID_A01F 0xA01F -#define IXGB_SUBDEVICE_ID_A15F 0xA15F -#define IXGB_SUBDEVICE_ID_A05F 0xA05F -#define IXGB_SUBDEVICE_ID_A12F 0xA12F -#define IXGB_SUBDEVICE_ID_A02F 0xA02F #endif /* #ifndef _IXGB_IDS_H_ */ From ganesh.venkatesan@intel.com Fri Oct 15 06:55:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:55:42 -0700 (PDT) Received: from caduceus.fm.intel.com (fmr02.intel.com [192.55.52.25]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDtWOO028269 for ; Fri, 15 Oct 2004 06:55:32 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by caduceus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDtlI8031315; Fri, 15 Oct 2004 13:55:47 GMT Received: from fmsmsxvs040.fm.intel.com (fmsmsxvs040.fm.intel.com [132.233.42.124]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDw6EU031749; Fri, 15 Oct 2004 13:58:41 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs040.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506550729185 ; Fri, 15 Oct 2004 06:55:07 -0700 Date: Fri, 15 Oct 2004 06:55:08 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 7/16 2.5] ixgb: prevent infinite loop trying to re-establish link while actively communicating Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10259 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 515 Lines: 16 diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_main.c net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c --- net-drivers-2.6/drivers/net/ixgb/ixgb_main.c 2004-10-05 15:50:18.000000000 -0700 +++ net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c 2004-10-05 17:55:48.000000000 -0700 @@ -1405,10 +1405,8 @@ static void ixgb_tx_timeout(struct net_d { struct ixgb_adapter *adapter = netdev->priv; - netif_device_detach(netdev); ixgb_down(adapter, TRUE); ixgb_up(adapter); - netif_device_attach(netdev); } /** From ganesh.venkatesan@intel.com Fri Oct 15 06:56:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:56:10 -0700 (PDT) Received: from fmsfmr003.fm.intel.com (fmr10.intel.com [192.55.52.30]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDu147028788 for ; Fri, 15 Oct 2004 06:56:01 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by fmsfmr003.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDvMxw004516; Fri, 15 Oct 2004 13:57:22 GMT Received: from fmsmsxvs040.fm.intel.com (fmsmsxvs040.fm.intel.com [132.233.42.124]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDw6Ee031749; Fri, 15 Oct 2004 13:59:14 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs040.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506554129265 ; Fri, 15 Oct 2004 06:55:42 -0700 Date: Fri, 15 Oct 2004 06:55:41 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 11/16 2.5] ixgb: explicitly include workqueue.h Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10263 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 420 Lines: 13 diff -up net-drivers-2.6/drivers/net/ixgb/ixgb.h net-drivers-2.6/drivers/net/ixgb.new/ixgb.h --- net-drivers-2.6/drivers/net/ixgb/ixgb.h 2004-10-05 15:50:18.000000000 -0700 +++ net-drivers-2.6/drivers/net/ixgb.new/ixgb.h 2004-10-05 16:03:24.000000000 -0700 @@ -64,6 +64,7 @@ #ifdef NETIF_F_TSO #include #endif +#include #include #include From ganesh.venkatesan@intel.com Fri Oct 15 06:56:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:56:28 -0700 (PDT) Received: from fmsfmr004.fm.intel.com (fmr11.intel.com [192.55.52.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDuEgX029058 for ; Fri, 15 Oct 2004 06:56:14 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by fmsfmr004.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDwvBE009704; Fri, 15 Oct 2004 13:58:57 GMT Received: from fmsmsxvs043.fm.intel.com (fmsmsxvs043.fm.intel.com [132.233.42.129]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDxQEC032493; Fri, 15 Oct 2004 13:59:27 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs043.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506555430651 ; Fri, 15 Oct 2004 06:55:54 -0700 Date: Fri, 15 Oct 2004 06:55:54 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 12/16 2.5] ixgb: replace kmalloc with vmalloc to allocate driver local data structures Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10264 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 2646 Lines: 82 diff -up net-drivers-2.6/drivers/net/ixgb/ixgb.h net-drivers-2.6/drivers/net/ixgb.new/ixgb.h --- net-drivers-2.6/drivers/net/ixgb/ixgb.h 2004-10-05 15:50:18.000000000 -0700 +++ net-drivers-2.6/drivers/net/ixgb.new/ixgb.h 2004-10-05 16:03:24.000000000 -0700 @@ -46,10 +46,10 @@ #include #include #include +#include #include #include #include -#include #include #include #include diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_main.c net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c --- net-drivers-2.6/drivers/net/ixgb/ixgb_main.c 2004-10-05 15:50:18.000000000 -0700 +++ net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c 2004-10-05 17:55:48.000000000 -0700 @@ -609,8 +609,8 @@ static int ixgb_close(struct net_device int size; size = sizeof(struct ixgb_buffer) * txdr->count; - txdr->buffer_info = kmalloc(size, GFP_KERNEL); - if (!txdr->buffer_info) { + txdr->buffer_info = vmalloc(size); + if(!txdr->buffer_info) { return -ENOMEM; } memset(txdr->buffer_info, 0, size); @@ -621,8 +620,8 @@ static int ixgb_setup_tx_resources(struc IXGB_ROUNDUP(txdr->size, 4096); txdr->desc = pci_alloc_consistent(pdev, txdr->size, &txdr->dma); - if (!txdr->desc) { - kfree(txdr->buffer_info); + if(!txdr->desc) { + vfree(txdr->buffer_info); return -ENOMEM; } memset(txdr->desc, 0, txdr->size); @@ -698,8 +692,8 @@ static void ixgb_configure_tx(struct ixg int size; size = sizeof(struct ixgb_buffer) * rxdr->count; - rxdr->buffer_info = kmalloc(size, GFP_KERNEL); - if (!rxdr->buffer_info) { + rxdr->buffer_info = vmalloc(size); + if(!rxdr->buffer_info) { return -ENOMEM; } memset(rxdr->buffer_info, 0, size); @@ -711,8 +713,8 @@ static int ixgb_setup_rx_resources(struc rxdr->desc = pci_alloc_consistent(pdev, rxdr->size, &rxdr->dma); - if (!rxdr->desc) { - kfree(rxdr->buffer_info); + if(!rxdr->desc) { + vfree(rxdr->buffer_info); return -ENOMEM; } memset(rxdr->desc, 0, rxdr->size); @@ -866,7 +867,7 @@ static void ixgb_configure_rx(struct ixg ixgb_clean_tx_ring(adapter); - kfree(adapter->tx_ring.buffer_info); + vfree(adapter->tx_ring.buffer_info); adapter->tx_ring.buffer_info = NULL; pci_free_consistent(pdev, adapter->tx_ring.size, @@ -932,7 +935,7 @@ static void ixgb_clean_tx_ring(struct ix ixgb_clean_rx_ring(adapter); - kfree(rx_ring->buffer_info); + vfree(rx_ring->buffer_info); rx_ring->buffer_info = NULL; pci_free_consistent(pdev, rx_ring->size, rx_ring->desc, rx_ring->dma); From ganesh.venkatesan@intel.com Fri Oct 15 06:56:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:56:46 -0700 (PDT) Received: from hermes-pilot.fm.intel.com (fmr99.intel.com [192.55.52.32]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDuWi3029359 for ; Fri, 15 Oct 2004 06:56:32 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by hermes-pilot.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FE0oUf021389; Fri, 15 Oct 2004 14:00:50 GMT Received: from fmsmsxvs042.fm.intel.com (fmsmsxvs042.fm.intel.com [132.233.42.128]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDxOEM032474; Fri, 15 Oct 2004 13:59:46 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs042.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506561310711 ; Fri, 15 Oct 2004 06:56:13 -0700 Date: Fri, 15 Oct 2004 06:56:13 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 14/16 2.5] ixgb: version number update Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10266 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 770 Lines: 21 diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_main.c net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c --- net-drivers-2.6/drivers/net/ixgb/ixgb_main.c 2004-10-05 15:50:18.000000000 -0700 +++ net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c 2004-10-05 17:55:48.000000000 -0700 @@ -30,8 +30,13 @@ char ixgb_driver_name[] = "ixgb"; char ixgb_driver_string[] = "Intel(R) PRO/10GbE Network Driver"; -char ixgb_driver_version[] = "1.0.66"; -char ixgb_copyright[] = "Copyright (c) 2001-2004 Intel Corporation."; +#ifndef CONFIG_IXGB_NAPI +#define DRIVERNAPI +#else +#define DRIVERNAPI "-NAPI" +#endif +char ixgb_driver_version[] = "1.0.82-k2"DRIVERNAPI; +char ixgb_copyright[] = "Copyright (c) 2001-2004 Intel Corporation."; /* ixgb_pci_tbl - PCI Device ID Table * From ganesh.venkatesan@intel.com Fri Oct 15 06:56:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:57:06 -0700 (PDT) Received: from hermes.jf.intel.com (fmr05.intel.com [134.134.136.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDusJI029673 for ; Fri, 15 Oct 2004 06:56:54 -0700 Received: from petasus.jf.intel.com (petasus.jf.intel.com [10.7.209.6]) by hermes.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FE0G6E030904; Fri, 15 Oct 2004 14:00:16 GMT Received: from orsmsxvs040.jf.intel.com (orsmsxvs040.jf.intel.com [192.168.65.206]) by petasus.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDxrWO027863; Fri, 15 Oct 2004 14:00:06 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by orsmsxvs040.jf.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506563516448 ; Fri, 15 Oct 2004 06:56:35 -0700 Date: Fri, 15 Oct 2004 06:56:35 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 16/16 2.5] ixgb: white space corrections 2/2 Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10267 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 1053 Lines: 22 diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_ee.h net-drivers-2.6/drivers/net/ixgb.new/ixgb_ee.h --- net-drivers-2.6/drivers/net/ixgb/ixgb_ee.h 2004-10-05 15:50:18.000000000 -0700 +++ net-drivers-2.6/drivers/net/ixgb.new/ixgb_ee.h 2004-10-05 15:56:42.000000000 -0700 @@ -34,11 +34,11 @@ #define IXGB_ETH_LENGTH_OF_ADDRESS 6 /* EEPROM Commands */ -#define EEPROM_READ_OPCODE 0x6 /* EERPOM read opcode */ -#define EEPROM_WRITE_OPCODE 0x5 /* EERPOM write opcode */ -#define EEPROM_ERASE_OPCODE 0x7 /* EERPOM erase opcode */ -#define EEPROM_EWEN_OPCODE 0x13 /* EERPOM erase/write enable */ -#define EEPROM_EWDS_OPCODE 0x10 /* EERPOM erast/write disable */ +#define EEPROM_READ_OPCODE 0x6 /* EERPOM read opcode */ +#define EEPROM_WRITE_OPCODE 0x5 /* EERPOM write opcode */ +#define EEPROM_ERASE_OPCODE 0x7 /* EERPOM erase opcode */ +#define EEPROM_EWEN_OPCODE 0x13 /* EERPOM erase/write enable */ +#define EEPROM_EWDS_OPCODE 0x10 /* EERPOM erase/write disable */ /* EEPROM MAP (Word Offsets) */ #define EEPROM_IA_1_2_REG 0x0000 From ganesh.venkatesan@intel.com Fri Oct 15 06:56:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:56:46 -0700 (PDT) Received: from fmsfmr004.fm.intel.com (fmr11.intel.com [192.55.52.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDuPWD029320 for ; Fri, 15 Oct 2004 06:56:27 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by fmsfmr004.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDx7BE009786; Fri, 15 Oct 2004 13:59:07 GMT Received: from fmsmsxvs040.fm.intel.com (fmsmsxvs040.fm.intel.com [132.233.42.124]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FDx1EK032299; Fri, 15 Oct 2004 13:59:37 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs040.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506560429308 ; Fri, 15 Oct 2004 06:56:04 -0700 Date: Fri, 15 Oct 2004 06:56:04 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 13/16 2.5] ixgb: ethtool_ops support Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10265 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 29768 Lines: 994 diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_ethtool.c net-drivers-2.6/drivers/net/ixgb.new/ixgb_ethtool.c --- net-drivers-2.6/drivers/net/ixgb/ixgb_ethtool.c 2004-10-05 15:50:18.000000000 -0700 +++ net-drivers-2.6/drivers/net/ixgb.new/ixgb_ethtool.c 2004-10-05 16:02:20.000000000 -0700 @@ -37,12 +37,13 @@ extern char ixgb_driver_version[]; extern int ixgb_up(struct ixgb_adapter *adapter); extern void ixgb_down(struct ixgb_adapter *adapter, boolean_t kill_watchdog); +extern void ixgb_reset(struct ixgb_adapter *adapter); +extern int ixgb_setup_rx_resources(struct ixgb_adapter *adapter); +extern int ixgb_setup_tx_resources(struct ixgb_adapter *adapter); +extern void ixgb_free_rx_resources(struct ixgb_adapter *adapter); +extern void ixgb_free_tx_resources(struct ixgb_adapter *adapter); +extern void ixgb_update_stats(struct ixgb_adapter *adapter); -static inline int ixgb_eeprom_size(struct ixgb_hw *hw) -{ - /* return size in bytes */ - return (IXGB_EEPROM_SIZE << 1); -} struct ixgb_stats { char stat_string[ETH_GSTRING_LEN]; @@ -94,9 +55,11 @@ struct ixgb_stats { #define IXGB_STATS_LEN \ sizeof(ixgb_gstrings_stats) / sizeof(struct ixgb_stats) -static void -ixgb_ethtool_gset(struct ixgb_adapter *adapter, struct ethtool_cmd *ecmd) +static int +ixgb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) { + struct ixgb_adapter *adapter = netdev->priv; + ecmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE); ecmd->advertising = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE); ecmd->port = PORT_FIBRE; @@ -111,98 +114,151 @@ ixgb_ethtool_gset(struct ixgb_adapter *a } ecmd->autoneg = AUTONEG_DISABLE; + return 0; } static int -ixgb_ethtool_sset(struct ixgb_adapter *adapter, struct ethtool_cmd *ecmd) +ixgb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) { - if (ecmd->autoneg == AUTONEG_ENABLE || - ecmd->speed + ecmd->duplex != SPEED_10000 + DUPLEX_FULL) + struct ixgb_adapter *adapter = netdev->priv; + if (ecmd->autoneg == AUTONEG_ENABLE || + ecmd->speed + ecmd->duplex != SPEED_10000 + DUPLEX_FULL) return -EINVAL; - else { + + if(netif_running(adapter->netdev)) { ixgb_down(adapter, TRUE); + ixgb_reset(adapter); ixgb_up(adapter); - } + } else + ixgb_reset(adapter); return 0; } -static int -ixgb_ethtool_gpause(struct ixgb_adapter *adapter, - struct ethtool_pauseparam *epause) +static void +ixgb_get_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *pause) { + struct ixgb_adapter *adapter = netdev->priv; struct ixgb_hw *hw = &adapter->hw; - - epause->autoneg = AUTONEG_DISABLE; - - if (hw->fc.type == ixgb_fc_rx_pause) - epause->rx_pause = 1; - else if (hw->fc.type == ixgb_fc_tx_pause) - epause->tx_pause = 1; - else if (hw->fc.type == ixgb_fc_full) { - epause->rx_pause = 1; - epause->tx_pause = 1; + + pause->autoneg = AUTONEG_DISABLE; + + + if (hw->fc.type == ixgb_fc_rx_pause) + pause->rx_pause = 1; + else if (hw->fc.type == ixgb_fc_tx_pause) + pause->tx_pause = 1; + else if (hw->fc.type == ixgb_fc_full) { + pause->rx_pause = 1; + pause->tx_pause = 1; } - - return 0; } static int -ixgb_ethtool_spause(struct ixgb_adapter *adapter, - struct ethtool_pauseparam *epause) +ixgb_set_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *pause) { + struct ixgb_adapter *adapter = netdev->priv; struct ixgb_hw *hw = &adapter->hw; - - if (epause->autoneg == AUTONEG_ENABLE) + + if (pause->autoneg == AUTONEG_ENABLE) return -EINVAL; - if (epause->rx_pause && epause->tx_pause) + if (pause->rx_pause && pause->tx_pause) hw->fc.type = ixgb_fc_full; - else if (epause->rx_pause && !epause->tx_pause) + else if (pause->rx_pause && !pause->tx_pause) hw->fc.type = ixgb_fc_rx_pause; - else if (!epause->rx_pause && epause->tx_pause) + else if (!pause->rx_pause && pause->tx_pause) hw->fc.type = ixgb_fc_tx_pause; - else if (!epause->rx_pause && !epause->tx_pause) + else if (!pause->rx_pause && !pause->tx_pause) hw->fc.type = ixgb_fc_none; - ixgb_down(adapter, TRUE); - ixgb_up(adapter); + if (netif_running(adapter->netdev)) { + ixgb_down(adapter, TRUE); + ixgb_up(adapter); + } else + ixgb_reset(adapter); + + return 0; +} + +static uint32_t +ixgb_get_rx_csum(struct net_device *netdev) +{ + struct ixgb_adapter *adapter = netdev->priv; + return adapter->rx_csum; +} + +static int +ixgb_set_rx_csum(struct net_device *netdev, uint32_t data) +{ + struct ixgb_adapter *adapter = netdev->priv; + adapter->rx_csum = data; + if (netif_running(netdev)) { + ixgb_down(adapter,TRUE); + ixgb_up(adapter); + } else + ixgb_reset(adapter); return 0; } + +static uint32_t +ixgb_get_tx_csum(struct net_device *netdev) +{ + return (netdev->features & NETIF_F_HW_CSUM) != 0; +} -static void -ixgb_ethtool_gdrvinfo(struct ixgb_adapter *adapter, - struct ethtool_drvinfo *drvinfo) +static int +ixgb_set_tx_csum(struct net_device *netdev, uint32_t data) { - strncpy(drvinfo->driver, ixgb_driver_name, 32); - strncpy(drvinfo->version, ixgb_driver_version, 32); - strncpy(drvinfo->fw_version, "N/A", 32); - strncpy(drvinfo->bus_info, pci_name(adapter->pdev), 32); - drvinfo->n_stats = IXGB_STATS_LEN; -#define IXGB_REG_DUMP_LEN 136*sizeof(uint32_t) - drvinfo->regdump_len = IXGB_REG_DUMP_LEN; - drvinfo->eedump_len = ixgb_eeprom_size(&adapter->hw); + + if (data) + netdev->features |= NETIF_F_HW_CSUM; + else + netdev->features &= ~NETIF_F_HW_CSUM; + + return 0; } +#ifdef NETIF_F_TSO +static int +ixgb_set_tso(struct net_device *netdev, uint32_t data) +{ + + if (data) + netdev->features |= NETIF_F_TSO; + else + netdev->features &= ~NETIF_F_TSO; + return 0; +} +#endif /* NETIF_F_TSO */ + #define IXGB_GET_STAT(_A_, _R_) _A_->stats._R_ + +static int +ixgb_get_regs_len(struct net_device *netdev) +{ +#define IXGB_REG_DUMP_LEN 136*sizeof(uint32_t) + return IXGB_REG_DUMP_LEN; +} + static void -ixgb_ethtool_gregs(struct ixgb_adapter *adapter, - struct ethtool_regs *regs, uint32_t * regs_buff) +ixgb_get_regs(struct net_device *netdev, + struct ethtool_regs *regs, void *p) { + struct ixgb_adapter *adapter = netdev->priv; struct ixgb_hw *hw = &adapter->hw; - uint32_t *reg = regs_buff; + uint32_t *reg = p; uint32_t *reg_start = reg; uint8_t i; - regs->version = - (adapter->hw.device_id << 16) | adapter->hw.subsystem_id; + regs->version = (adapter->hw.device_id << 16) | adapter->hw.subsystem_id; /* General Registers */ - *reg++ = IXGB_READ_REG(hw, CTRL0); /* 0 */ - *reg++ = IXGB_READ_REG(hw, CTRL1); /* 1 */ - *reg++ = IXGB_READ_REG(hw, STATUS); /* 2 */ - *reg++ = IXGB_READ_REG(hw, EECD); /* 3 */ + *reg++ = IXGB_READ_REG(hw, CTRL0); /* 0 */ + *reg++ = IXGB_READ_REG(hw, CTRL1); /* 1 */ + *reg++ = IXGB_READ_REG(hw, STATUS); /* 2 */ + *reg++ = IXGB_READ_REG(hw, EECD); /* 3 */ *reg++ = IXGB_READ_REG(hw, MFS); /* 4 */ /* Interrupt */ @@ -323,10 +304,19 @@ ixgb_ethtool_gregs(struct ixgb_adapter * } static int -ixgb_ethtool_geeprom(struct ixgb_adapter *adapter, - struct ethtool_eeprom *eeprom, uint16_t * eeprom_buff) +ixgb_get_eeprom_len(struct net_device *netdev) { + /* return size in bytes */ + return (IXGB_EEPROM_SIZE << 1); +} + +static int +ixgb_get_eeprom(struct net_device *netdev, + struct ethtool_eeprom *eeprom, uint8_t *bytes) +{ + struct ixgb_adapter *adapter = netdev->priv; struct ixgb_hw *hw = &adapter->hw; + uint16_t *eeprom_buff; int i, max_len, first_word, last_word; int ret_val = 0; @@ -337,10 +304,7 @@ eeprom->magic = hw->vendor_id | (hw->device_id << 16); - max_len = ixgb_eeprom_size(hw); - - /* use our function to read the eeprom and update our cache */ - ixgb_get_eeprom_data(hw); + max_len = ixgb_get_eeprom_len(netdev); if (eeprom->offset > eeprom->offset + eeprom->len) { ret_val = -EINVAL; @@ -353,31 +304,44 @@ first_word = eeprom->offset >> 1; last_word = (eeprom->offset + eeprom->len - 1) >> 1; - for (i = 0; i <= (last_word - first_word); i++) { - eeprom_buff[i] = hw->eeprom[first_word + i]; + eeprom_buff = kmalloc(sizeof(uint16_t) * + (last_word - first_word + 1), GFP_KERNEL); + if (!eeprom_buff) + return -ENOMEM; + + /* note the eeprom was good because the driver loaded */ + for(i = 0; i <= (last_word - first_word); i++) { + eeprom_buff[i] = ixgb_get_eeprom_word(hw, (first_word + i)); } - geeprom_error: + + memcpy(bytes, (uint8_t *)eeprom_buff + (eeprom->offset & 1), + eeprom->len); + kfree(eeprom_buff); + +geeprom_error: return ret_val; } static int -ixgb_ethtool_seeprom(struct ixgb_adapter *adapter, - struct ethtool_eeprom *eeprom, void __user *user_data) +ixgb_set_eeprom(struct net_device *netdev, + struct ethtool_eeprom *eeprom, uint8_t *bytes) { + struct ixgb_adapter *adapter = netdev->priv; struct ixgb_hw *hw = &adapter->hw; - uint16_t eeprom_buff[256]; - int i, max_len, first_word, last_word; + uint16_t *eeprom_buff; void *ptr; + int max_len, first_word, last_word; + uint16_t i; - if (eeprom->magic != (hw->vendor_id | (hw->device_id << 16))) - return -EFAULT; - - if (eeprom->len == 0) + if (eeprom->len == 0) return -EINVAL; - max_len = ixgb_eeprom_size(hw); + if (eeprom->magic != (hw->vendor_id | (hw->device_id << 16))) + return -EFAULT; - if (eeprom->offset > eeprom->offset + eeprom->len) + max_len = ixgb_get_eeprom_len(netdev); + + if (eeprom->offset > eeprom->offset + eeprom->len) return -EINVAL; if ((eeprom->offset + eeprom->len) > max_len) @@ -385,6 +304,10 @@ first_word = eeprom->offset >> 1; last_word = (eeprom->offset + eeprom->len - 1) >> 1; + eeprom_buff = kmalloc(max_len, GFP_KERNEL); + if(!eeprom_buff) + return -ENOMEM; + ptr = (void *)eeprom_buff; if (eeprom->offset & 1) { @@ -396,13 +304,14 @@ if ((eeprom->offset + eeprom->len) & 1) { /* need read/modify/write of last changed EEPROM word */ /* only the first byte of the word is being modified */ - eeprom_buff[last_word - first_word] - = ixgb_read_eeprom(hw, last_word); + eeprom_buff[last_word - first_word] + = ixgb_read_eeprom(hw, last_word); } - if (copy_from_user(ptr, user_data, eeprom->len)) - return -EFAULT; - for (i = 0; i <= (last_word - first_word); i++) + + memcpy(ptr, bytes, eeprom->len); + + for(i = 0; i <= (last_word - first_word); i++) ixgb_write_eeprom(hw, first_word + i, eeprom_buff[i]); /* Update the checksum over the first part of the EEPROM if needed */ @@ -409,7 +304,100 @@ if (first_word <= EEPROM_CHECKSUM_REG) ixgb_update_eeprom_checksum(hw); + kfree(eeprom_buff); + return 0; +} + +static void +ixgb_get_drvinfo(struct net_device *netdev, + struct ethtool_drvinfo *drvinfo) +{ + struct ixgb_adapter *adapter = netdev->priv; + + strncpy(drvinfo->driver, ixgb_driver_name, 32); + strncpy(drvinfo->version, ixgb_driver_version, 32); + strncpy(drvinfo->fw_version, "N/A", 32); + strncpy(drvinfo->bus_info, pci_name(adapter->pdev), 32); + drvinfo->n_stats = IXGB_STATS_LEN; + drvinfo->regdump_len = ixgb_get_regs_len(netdev); + drvinfo->eedump_len = ixgb_get_eeprom_len(netdev); +} + +static void +ixgb_get_ringparam(struct net_device *netdev, + struct ethtool_ringparam *ring) +{ + struct ixgb_adapter *adapter = netdev->priv; + struct ixgb_desc_ring *txdr = &adapter->tx_ring; + struct ixgb_desc_ring *rxdr = &adapter->rx_ring; + + ring->rx_max_pending = MAX_RXD; + ring->tx_max_pending = MAX_TXD; + ring->rx_mini_max_pending = 0; + ring->rx_jumbo_max_pending = 0; + ring->rx_pending = rxdr->count; + ring->tx_pending = txdr->count; + ring->rx_mini_pending = 0; + ring->rx_jumbo_pending = 0; +} + +static int +ixgb_set_ringparam(struct net_device *netdev, + struct ethtool_ringparam *ring) +{ + struct ixgb_adapter *adapter = netdev->priv; + struct ixgb_desc_ring *txdr = &adapter->tx_ring; + struct ixgb_desc_ring *rxdr = &adapter->rx_ring; + struct ixgb_desc_ring tx_old, tx_new, rx_old, rx_new; + int err; + + tx_old = adapter->tx_ring; + rx_old = adapter->rx_ring; + + if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) + return -EINVAL; + + if(netif_running(adapter->netdev)) + ixgb_down(adapter,TRUE); + + rxdr->count = max(ring->rx_pending,(uint32_t)MIN_RXD); + rxdr->count = min(rxdr->count,(uint32_t)MAX_RXD); + IXGB_ROUNDUP(rxdr->count, IXGB_REQ_RX_DESCRIPTOR_MULTIPLE); + + txdr->count = max(ring->tx_pending,(uint32_t)MIN_TXD); + txdr->count = min(txdr->count,(uint32_t)MAX_TXD); + IXGB_ROUNDUP(txdr->count, IXGB_REQ_TX_DESCRIPTOR_MULTIPLE); + + if(netif_running(adapter->netdev)) { + /* Try to get new resources before deleting old */ + if((err = ixgb_setup_rx_resources(adapter))) + goto err_setup_rx; + if((err = ixgb_setup_tx_resources(adapter))) + goto err_setup_tx; + + /* save the new, restore the old in order to free it, + * then restore the new back again */ + + rx_new = adapter->rx_ring; + tx_new = adapter->tx_ring; + adapter->rx_ring = rx_old; + adapter->tx_ring = tx_old; + ixgb_free_rx_resources(adapter); + ixgb_free_tx_resources(adapter); + adapter->rx_ring = rx_new; + adapter->tx_ring = tx_new; + if((err = ixgb_up(adapter))) + return err; + } + return 0; +err_setup_tx: + ixgb_free_rx_resources(adapter); +err_setup_rx: + adapter->rx_ring = rx_old; + adapter->tx_ring = tx_old; + ixgb_up(adapter); + return err; } /* toggle LED 4 times per second = 2 "blinks" per second */ @@ -420,7 +304,7 @@ static void ixgb_led_blink_callback(unsigned long data) { - struct ixgb_adapter *adapter = (struct ixgb_adapter *)data; + struct ixgb_adapter *adapter = (struct ixgb_adapter *) data; if (test_and_change_bit(IXGB_LED_ON, &adapter->led_status)) ixgb_led_off(&adapter->hw); @@ -431,19 +441,24 @@ static void ixgb_led_blink_callback(unsi } static int -ixgb_ethtool_led_blink(struct ixgb_adapter *adapter, struct ethtool_value *id) +ixgb_phys_id(struct net_device *netdev, uint32_t data) { - if (!adapter->blink_timer.function) { + struct ixgb_adapter *adapter = netdev->priv; + + if (!data || data > (uint32_t)(MAX_SCHEDULE_TIMEOUT / HZ)) + data = (uint32_t)(MAX_SCHEDULE_TIMEOUT / HZ); + + if (!adapter->blink_timer.function) { init_timer(&adapter->blink_timer); adapter->blink_timer.function = ixgb_led_blink_callback; - adapter->blink_timer.data = (unsigned long)adapter; + adapter->blink_timer.data = (unsigned long) adapter; } mod_timer(&adapter->blink_timer, jiffies); set_current_state(TASK_INTERRUPTIBLE); - if (id->data) - schedule_timeout(id->data * HZ); + if (data) + schedule_timeout(data * HZ); else schedule_timeout(MAX_SCHEDULE_TIMEOUT); @@ -454,268 +464,74 @@ ixgb_ethtool_led_blink(struct ixgb_adapt return 0; } -int ixgb_ethtool_ioctl(struct net_device *netdev, struct ifreq *ifr) +static int +ixgb_get_stats_count(struct net_device *netdev) { - struct ixgb_adapter *adapter = netdev->priv; - void __user *addr = ifr->ifr_data; - uint32_t cmd; - - if (get_user(cmd, (uint32_t __user *) addr)) - return -EFAULT; - - switch (cmd) { - case ETHTOOL_GSET:{ - struct ethtool_cmd ecmd = { ETHTOOL_GSET }; - ixgb_ethtool_gset(adapter, &ecmd); - if (copy_to_user(addr, &ecmd, sizeof(ecmd))) - return -EFAULT; - return 0; - } - case ETHTOOL_SSET:{ - struct ethtool_cmd ecmd; - if (copy_from_user(&ecmd, addr, sizeof(ecmd))) - return -EFAULT; - return ixgb_ethtool_sset(adapter, &ecmd); - } - case ETHTOOL_GDRVINFO:{ - struct ethtool_drvinfo drvinfo = { ETHTOOL_GDRVINFO }; - ixgb_ethtool_gdrvinfo(adapter, &drvinfo); - if (copy_to_user(addr, &drvinfo, sizeof(drvinfo))) - return -EFAULT; - return 0; - } - case ETHTOOL_GSTRINGS:{ - struct ethtool_gstrings gstrings = { ETHTOOL_GSTRINGS }; - char *strings = NULL; - int err = 0; - - if (copy_from_user(&gstrings, addr, sizeof(gstrings))) - return -EFAULT; - switch (gstrings.string_set) { - case ETH_SS_STATS:{ - int i; - gstrings.len = IXGB_STATS_LEN; - strings = - kmalloc(IXGB_STATS_LEN * - ETH_GSTRING_LEN, - GFP_KERNEL); - if (!strings) - return -ENOMEM; - for (i = 0; i < IXGB_STATS_LEN; i++) { - memcpy(&strings - [i * ETH_GSTRING_LEN], - ixgb_gstrings_stats[i]. - stat_string, - ETH_GSTRING_LEN); - } - break; - } - default: - return -EOPNOTSUPP; - } - if (copy_to_user(addr, &gstrings, sizeof(gstrings))) - err = -EFAULT; - addr += offsetof(struct ethtool_gstrings, data); - if (!err && copy_to_user(addr, strings, - gstrings.len * - ETH_GSTRING_LEN)) - err = -EFAULT; - - kfree(strings); - return err; - } - case ETHTOOL_GREGS:{ - struct ethtool_regs regs = { ETHTOOL_GREGS }; - uint32_t regs_buff[IXGB_REG_DUMP_LEN]; - - if (copy_from_user(®s, addr, sizeof(regs))) - return -EFAULT; - ixgb_ethtool_gregs(adapter, ®s, regs_buff); - if (copy_to_user(addr, ®s, sizeof(regs))) - return -EFAULT; - - addr += offsetof(struct ethtool_regs, data); - if (copy_to_user(addr, regs_buff, regs.len)) - return -EFAULT; - - return 0; - } - case ETHTOOL_NWAY_RST:{ - if (netif_running(netdev)) { - ixgb_down(adapter, TRUE); - ixgb_up(adapter); - } - return 0; - } - case ETHTOOL_PHYS_ID:{ - struct ethtool_value id; - if (copy_from_user(&id, addr, sizeof(id))) - return -EFAULT; - return ixgb_ethtool_led_blink(adapter, &id); - } - case ETHTOOL_GLINK:{ - struct ethtool_value link = { ETHTOOL_GLINK }; - link.data = netif_carrier_ok(netdev); - if (copy_to_user(addr, &link, sizeof(link))) - return -EFAULT; - return 0; - } - - case ETHTOOL_GEEPROM:{ - struct ethtool_eeprom eeprom = { ETHTOOL_GEEPROM }; - uint16_t eeprom_buff[IXGB_EEPROM_SIZE]; - void *ptr; - int err = 0; - - if (copy_from_user(&eeprom, addr, sizeof(eeprom))) - return -EFAULT; - - if ((err = - ixgb_ethtool_geeprom(adapter, &eeprom, - eeprom_buff)) < 0) - return err; - - if (copy_to_user(addr, &eeprom, sizeof(eeprom))) - return -EFAULT; - - addr += offsetof(struct ethtool_eeprom, data); - ptr = ((void *)eeprom_buff) + (eeprom.offset & 1); - - if (copy_to_user(addr, ptr, eeprom.len)) - return -EFAULT; - return 0; - } - case ETHTOOL_SEEPROM:{ - struct ethtool_eeprom eeprom; - - if (copy_from_user(&eeprom, addr, sizeof(eeprom))) - return -EFAULT; - - addr += offsetof(struct ethtool_eeprom, data); - return ixgb_ethtool_seeprom(adapter, &eeprom, addr); - } - case ETHTOOL_GPAUSEPARAM:{ - struct ethtool_pauseparam epause = - { ETHTOOL_GPAUSEPARAM }; - ixgb_ethtool_gpause(adapter, &epause); - if (copy_to_user(addr, &epause, sizeof(epause))) - return -EFAULT; - return 0; - } - case ETHTOOL_SPAUSEPARAM:{ - struct ethtool_pauseparam epause; - if (copy_from_user(&epause, addr, sizeof(epause))) - return -EFAULT; - return ixgb_ethtool_spause(adapter, &epause); - } - case ETHTOOL_GSTATS:{ - struct { - struct ethtool_stats eth_stats; - uint64_t data[IXGB_STATS_LEN]; - } stats = { { - ETHTOOL_GSTATS, IXGB_STATS_LEN}}; - int i; - - for (i = 0; i < IXGB_STATS_LEN; i++) - stats.data[i] = - (ixgb_gstrings_stats[i].sizeof_stat == - sizeof(uint64_t)) ? *(uint64_t *) ((char *) - adapter - + - ixgb_gstrings_stats - [i]. - stat_offset) - : *(uint32_t *) ((char *)adapter + - ixgb_gstrings_stats[i]. - stat_offset); - if (copy_to_user(addr, &stats, sizeof(stats))) - return -EFAULT; - return 0; - } - case ETHTOOL_GRXCSUM:{ - struct ethtool_value edata = { ETHTOOL_GRXCSUM }; - - edata.data = adapter->rx_csum; - if (copy_to_user(addr, &edata, sizeof(edata))) - return -EFAULT; - return 0; - } - case ETHTOOL_SRXCSUM:{ - struct ethtool_value edata; - - if (copy_from_user(&edata, addr, sizeof(edata))) - return -EFAULT; - adapter->rx_csum = edata.data; - ixgb_down(adapter, TRUE); - ixgb_up(adapter); - return 0; - } - case ETHTOOL_GTXCSUM:{ - struct ethtool_value edata = { ETHTOOL_GTXCSUM }; - - edata.data = (netdev->features & NETIF_F_HW_CSUM) != 0; - if (copy_to_user(addr, &edata, sizeof(edata))) - return -EFAULT; - return 0; - } - case ETHTOOL_STXCSUM:{ - struct ethtool_value edata; - - if (copy_from_user(&edata, addr, sizeof(edata))) - return -EFAULT; - - if (edata.data) - netdev->features |= NETIF_F_HW_CSUM; - else - netdev->features &= ~NETIF_F_HW_CSUM; - - return 0; - } - case ETHTOOL_GSG:{ - struct ethtool_value edata = { ETHTOOL_GSG }; + return IXGB_STATS_LEN; +} - edata.data = (netdev->features & NETIF_F_SG) != 0; - if (copy_to_user(addr, &edata, sizeof(edata))) - return -EFAULT; - return 0; - } - case ETHTOOL_SSG:{ - struct ethtool_value edata; +static void +ixgb_get_ethtool_stats(struct net_device *netdev, + struct ethtool_stats *stats, uint64_t *data) +{ + struct ixgb_adapter *adapter = netdev->priv; + int i; - if (copy_from_user(&edata, addr, sizeof(edata))) - return -EFAULT; + ixgb_update_stats(adapter); + for(i = 0; i < IXGB_STATS_LEN; i++) { + char *p = (char *)adapter+ixgb_gstrings_stats[i].stat_offset; + data[i] = (ixgb_gstrings_stats[i].sizeof_stat == + sizeof(uint64_t)) ? *(uint64_t *)p : *(uint32_t *)p; + } +} - if (edata.data) - netdev->features |= NETIF_F_SG; - else - netdev->features &= ~NETIF_F_SG; +static void +ixgb_get_strings(struct net_device *netdev, uint32_t stringset, uint8_t *data) +{ + int i; + + switch(stringset) { + case ETH_SS_STATS: + for (i=0; i < IXGB_STATS_LEN; i++) { + memcpy(data + i * ETH_GSTRING_LEN, + ixgb_gstrings_stats[i].stat_string, + ETH_GSTRING_LEN); + } + break; + } +} - return 0; - } +struct ethtool_ops ixgb_ethtool_ops = { + .get_settings = ixgb_get_settings, + .set_settings = ixgb_set_settings, + .get_drvinfo = ixgb_get_drvinfo, + .get_regs_len = ixgb_get_regs_len, + .get_regs = ixgb_get_regs, + .get_link = ethtool_op_get_link, + .get_eeprom_len = ixgb_get_eeprom_len, + .get_eeprom = ixgb_get_eeprom, + .set_eeprom = ixgb_set_eeprom, + .get_ringparam = ixgb_get_ringparam, + .set_ringparam = ixgb_set_ringparam, + .get_pauseparam = ixgb_get_pauseparam, + .set_pauseparam = ixgb_set_pauseparam, + .get_rx_csum = ixgb_get_rx_csum, + .set_rx_csum = ixgb_set_rx_csum, + .get_tx_csum = ixgb_get_tx_csum, + .set_tx_csum = ixgb_set_tx_csum, + .get_sg = ethtool_op_get_sg, + .set_sg = ethtool_op_set_sg, #ifdef NETIF_F_TSO - case ETHTOOL_GTSO:{ - struct ethtool_value edata = { ETHTOOL_GTSO }; - - edata.data = (netdev->features & NETIF_F_TSO) != 0; - if (copy_to_user(addr, &edata, sizeof(edata))) - return -EFAULT; - return 0; - } - case ETHTOOL_STSO:{ - struct ethtool_value edata; - - if (copy_from_user(&edata, addr, sizeof(edata))) - return -EFAULT; - - if (edata.data) - netdev->features |= NETIF_F_TSO; - else - netdev->features &= ~NETIF_F_TSO; - - return 0; - } + .get_tso = ethtool_op_get_tso, + .set_tso = ixgb_set_tso, #endif - default: - return -EOPNOTSUPP; - } + .get_strings = ixgb_get_strings, + .phys_id = ixgb_phys_id, + .get_stats_count = ixgb_get_stats_count, + .get_ethtool_stats = ixgb_get_ethtool_stats, +}; + +void set_ethtool_ops(struct net_device *netdev) +{ + SET_ETHTOOL_OPS(netdev, &ixgb_ethtool_ops); } diff -up net-drivers-2.6/drivers/net/ixgb/ixgb.h net-drivers-2.6/drivers/net/ixgb.new/ixgb.h --- net-drivers-2.6/drivers/net/ixgb/ixgb.h 2004-10-05 15:50:18.000000000 -0700 +++ net-drivers-2.6/drivers/net/ixgb.new/ixgb.h 2004-10-05 16:03:24.000000000 -0700 @@ -86,6 +86,15 @@ struct ixgb_adapter; #define IXGB_ERR(args...) printk(KERN_ERR "ixgb: " args) +/* TX/RX descriptor defines */ +#define DEFAULT_TXD 256 +#define MAX_TXD 4096 +#define MIN_TXD 64 + +#define DEFAULT_RXD 1024 +#define MAX_RXD 4096 +#define MIN_RXD 64 + /* Supported Rx Buffer Sizes */ #define IXGB_RXBUFFER_2048 2048 #define IXGB_RXBUFFER_4096 4096 diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_main.c net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c --- net-drivers-2.6/drivers/net/ixgb/ixgb_main.c 2004-10-05 15:50:18.000000000 -0700 +++ net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c 2004-10-05 17:55:48.000000000 -0700 @@ -60,6 +60,11 @@ MODULE_DEVICE_TABLE(pci, ixgb_pci_tbl); int ixgb_up(struct ixgb_adapter *adapter); void ixgb_down(struct ixgb_adapter *adapter, boolean_t kill_watchdog); void ixgb_reset(struct ixgb_adapter *adapter); +int ixgb_setup_tx_resources(struct ixgb_adapter *adapter); +int ixgb_setup_rx_resources(struct ixgb_adapter *adapter); +void ixgb_free_tx_resources(struct ixgb_adapter *adapter); +void ixgb_free_rx_resources(struct ixgb_adapter *adapter); +void ixgb_update_stats(struct ixgb_adapter *adapter); static int ixgb_init_module(void); static void ixgb_exit_module(void); @@ -68,15 +71,11 @@ static void __devexit ixgb_remove(struct static int ixgb_sw_init(struct ixgb_adapter *adapter); static int ixgb_open(struct net_device *netdev); static int ixgb_close(struct net_device *netdev); -static int ixgb_setup_tx_resources(struct ixgb_adapter *adapter); -static int ixgb_setup_rx_resources(struct ixgb_adapter *adapter); static void ixgb_configure_tx(struct ixgb_adapter *adapter); static void ixgb_configure_rx(struct ixgb_adapter *adapter); static void ixgb_setup_rctl(struct ixgb_adapter *adapter); static void ixgb_clean_tx_ring(struct ixgb_adapter *adapter); static void ixgb_clean_rx_ring(struct ixgb_adapter *adapter); -static void ixgb_free_tx_resources(struct ixgb_adapter *adapter); -static void ixgb_free_rx_resources(struct ixgb_adapter *adapter); static void ixgb_set_multi(struct net_device *netdev); static void ixgb_watchdog(unsigned long data); static int ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev); @@ -83,7 +71,6 @@ static struct net_device_stats *ixgb_get_stats(struct net_device *netdev); static int ixgb_change_mtu(struct net_device *netdev, int new_mtu); static int ixgb_set_mac(struct net_device *netdev, void *p); -static void ixgb_update_stats(struct ixgb_adapter *adapter); static irqreturn_t ixgb_intr(int irq, void *data, struct pt_regs *regs); static boolean_t ixgb_clean_tx_irq(struct ixgb_adapter *adapter); static inline void ixgb_rx_checksum(struct ixgb_adapter *adapter, @@ -98,6 +71,9 @@ #endif static void ixgb_alloc_rx_buffers(struct ixgb_adapter *adapter); static int ixgb_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd); + +void set_ethtool_ops(struct net_device *netdev); + static void ixgb_tx_timeout(struct net_device *dev); static void ixgb_tx_timeout_task(struct net_device *dev); static void ixgb_vlan_rx_register(struct net_device *netdev, @@ -124,7 +71,6 @@ /* Exported from other modules */ extern void ixgb_check_options(struct ixgb_adapter *adapter); -extern int ixgb_ethtool_ioctl(struct net_device *netdev, struct ifreq *ifr); static struct pci_driver ixgb_driver = { .name = ixgb_driver_name, @@ -373,6 +356,7 @@ ixgb_probe(struct pci_dev *pdev, const s netdev->set_mac_address = &ixgb_set_mac; netdev->change_mtu = &ixgb_change_mtu; netdev->do_ioctl = &ixgb_ioctl; + set_ethtool_ops(netdev); netdev->tx_timeout = &ixgb_tx_timeout; netdev->watchdog_timeo = HZ; #ifdef CONFIG_IXGB_NAPI @@ -602,7 +597,8 @@ static int ixgb_close(struct net_device * Return 0 on success, negative on failure **/ -static int ixgb_setup_tx_resources(struct ixgb_adapter *adapter) +int +ixgb_setup_tx_resources(struct ixgb_adapter *adapter) { struct ixgb_desc_ring *txdr = &adapter->tx_ring; struct pci_dev *pdev = adapter->pdev; @@ -691,7 +688,8 @@ static void ixgb_configure_tx(struct ixg * Returns 0 on success, negative on failure **/ -static int ixgb_setup_rx_resources(struct ixgb_adapter *adapter) +int +ixgb_setup_rx_resources(struct ixgb_adapter *adapter) { struct ixgb_desc_ring *rxdr = &adapter->rx_ring; struct pci_dev *pdev = adapter->pdev; @@ -860,7 +862,8 @@ static void ixgb_configure_rx(struct ixg * Free all transmit software resources **/ -static void ixgb_free_tx_resources(struct ixgb_adapter *adapter) +void +ixgb_free_tx_resources(struct ixgb_adapter *adapter) { struct pci_dev *pdev = adapter->pdev; @@ -925,7 +929,8 @@ static void ixgb_clean_tx_ring(struct ix * Free all receive software resources **/ -static void ixgb_free_rx_resources(struct ixgb_adapter *adapter) +void +ixgb_free_rx_resources(struct ixgb_adapter *adapter) { struct ixgb_desc_ring *rx_ring = &adapter->rx_ring; struct pci_dev *pdev = adapter->pdev; @@ -1475,7 +1475,8 @@ static int ixgb_change_mtu(struct net_de * @adapter: board private structure **/ -static void ixgb_update_stats(struct ixgb_adapter *adapter) +void +ixgb_update_stats(struct ixgb_adapter *adapter) { adapter->stats.tprl += IXGB_READ_REG(&adapter->hw, TPRL); adapter->stats.tprh += IXGB_READ_REG(&adapter->hw, TPRH); @@ -1980,7 +1984,6 @@ static void ixgb_alloc_rx_buffers(struct { switch (cmd) { case SIOCETHTOOL: - return ixgb_ethtool_ioctl(netdev, ifr); default: return -EOPNOTSUPP; } diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_param.c net-drivers-2.6/drivers/net/ixgb.new/ixgb_param.c --- net-drivers-2.6/drivers/net/ixgb/ixgb_param.c 2004-10-05 15:50:18.000000000 -0700 +++ net-drivers-2.6/drivers/net/ixgb.new/ixgb_param.c 2004-10-05 17:55:52.000000000 -0700 @@ -173,13 +173,6 @@ IXGB_PARAM(FCReqTimeout, "Flow Control R IXGB_PARAM(IntDelayEnable, "Transmit Interrupt Delay Enable"); -#define DEFAULT_TXD 256 -#define MAX_TXD 4096 -#define MIN_TXD 64 - -#define DEFAULT_RXD 1024 -#define MAX_RXD 4096 -#define MIN_RXD 64 #define DEFAULT_TIDV 32 #define MAX_TIDV 0xFFFF From ganesh.venkatesan@intel.com Fri Oct 15 06:57:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 06:57:21 -0700 (PDT) Received: from fmsfmr003.fm.intel.com (fmr10.intel.com [192.55.52.30]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FDvCBk029962 for ; Fri, 15 Oct 2004 06:57:12 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by fmsfmr003.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FDwXxw004882; Fri, 15 Oct 2004 13:58:33 GMT Received: from fmsmsxvs043.fm.intel.com (fmsmsxvs043.fm.intel.com [132.233.42.129]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FE0PEA000507; Fri, 15 Oct 2004 14:00:25 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs043.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101506565230711 ; Fri, 15 Oct 2004 06:56:52 -0700 Date: Fri, 15 Oct 2004 06:56:52 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [Patch 0/16 2.5] ixgb driver update Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10268 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 888 Lines: 22 1. Fix VLAN filter setup errors (while running on PPC) 2. Fix memory leak in NAPI mode. Avoid unnecessary work in NAPI Rx cleanup, if we are done 3. Fix endianess issue for Tx cleanup 4. Fix NAPI driver crash on ifdown during traffic 5. Condition that determines when to quit polling mode includes work done in Tx path 6. Fix error in setting Frame Size register while changing mtu 7. Prevent infinite loop trying to re-establish link while actively communicating 8. Remove sub-device ids for non-existant hardware. 9. Limit Rx Address Filter Array entries to 3 10. Shrink size of ixgb_buffer (use uint16_t for length/next_to_watch) 11. Explicitly include workqueue.h 12. Replace kmalloc with vmalloc to allocate driver local data structures 13. Ethtool_ops support 14. Version number update 15. White space corrections -- 1/2 16. White space corrections -- 2/2 From SRS0+ab394b835847dd03aec5+418+infradead.org+hch@phoenix.srs.infradead.org Fri Oct 15 08:41:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 08:41:33 -0700 (PDT) Received: from phoenix.infradead.org (phoenix.infradead.org [81.187.226.98]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FFfRR4009714 for ; Fri, 15 Oct 2004 08:41:28 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.42 #1 (Red Hat Linux)) id 1CIUCW-0005uh-0O; Fri, 15 Oct 2004 16:41:04 +0100 Date: Fri, 15 Oct 2004 16:41:03 +0100 From: Christoph Hellwig To: Ganesh Venkatesan Cc: "jgarzik@pobox.com" , netdev Subject: Re: [Patch 2/3 2.5] e100: Configuration and user guide update Message-ID: <20041015154103.GA22699@infradead.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 10269 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: netdev Content-Length: 380 Lines: 9 > This file describes the Linux* Base Driver for the Intel(R) PRO/100 Family of > -Adapters, version 3.x.x. This driver includes support for Itanium(TM)-based > -systems. > +Adapters, version 3.2.x. This driver includes support for Itanium(TM)2 and > +EM64T systems. It seems to work on lots of non-intel architectures nicely aswell. What about killing this silly sentence? From ganesh.venkatesan@intel.com Fri Oct 15 08:56:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 08:56:27 -0700 (PDT) Received: from orsfmr001.jf.intel.com (fmr12.intel.com [134.134.136.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FFuM44010745 for ; Fri, 15 Oct 2004 08:56:22 -0700 Received: from petasus.jf.intel.com (petasus.jf.intel.com [10.7.209.6]) by orsfmr001.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FFuQOH017435; Fri, 15 Oct 2004 15:56:27 GMT Received: from orsmsxvs040.jf.intel.com (orsmsxvs040.jf.intel.com [192.168.65.206]) by petasus.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FFx6WO006682; Fri, 15 Oct 2004 15:59:26 GMT Received: from orsmsx332.amr.corp.intel.com ([192.168.65.60]) by orsmsxvs040.jf.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101508555504022 ; Fri, 15 Oct 2004 08:55:55 -0700 Received: from orsmsx408.amr.corp.intel.com ([192.168.65.52]) by orsmsx332.amr.corp.intel.com with Microsoft SMTPSVC(6.0.3790.0); Fri, 15 Oct 2004 08:55:54 -0700 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Subject: RE: [Patch 2/3 2.5] e100: Configuration and user guide update Date: Fri, 15 Oct 2004 08:55:53 -0700 Message-ID: <468F3FDA28AA87429AD807992E22D07E02E60265@orsmsx408> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [Patch 2/3 2.5] e100: Configuration and user guide update Thread-Index: AcSyzWledCnCMPahSHyVkOCC0a8FxAAAf7yA From: "Venkatesan, Ganesh" To: "Christoph Hellwig" Cc: , "netdev" X-OriginalArrivalTime: 15 Oct 2004 15:55:55.0028 (UTC) FILETIME=[742CBD40:01C4B2CF] X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i9FFuM44010745 X-archive-position: 10270 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 669 Lines: 22 Good point. Will fix this next time around. -----Original Message----- From: Christoph Hellwig [mailto:hch@infradead.org] Sent: Friday, October 15, 2004 8:41 AM To: Venkatesan, Ganesh Cc: jgarzik@pobox.com; netdev Subject: Re: [Patch 2/3 2.5] e100: Configuration and user guide update > This file describes the Linux* Base Driver for the Intel(R) PRO/100 Family of > -Adapters, version 3.x.x. This driver includes support for Itanium(TM)-based > -systems. > +Adapters, version 3.2.x. This driver includes support for Itanium(TM)2 and > +EM64T systems. It seems to work on lots of non-intel architectures nicely aswell. What about killing this silly sentence? From romieu@fr.zoreil.com Fri Oct 15 09:21:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 09:22:00 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FGLs8w011945 for ; Fri, 15 Oct 2004 09:21:55 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i9FGIIvr002875; Fri, 15 Oct 2004 18:18:18 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i9FGII9m002874; Fri, 15 Oct 2004 18:18:18 +0200 Date: Fri, 15 Oct 2004 18:18:18 +0200 From: Francois Romieu To: Danny Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: mm kernel oops with r8169 & named, PREEMPT Message-ID: <20041015161818.GA2577@electric-eye.fr.zoreil.com> References: <9625752b041012230068619e68@mail.gmail.com> <9625752b041013091772e26739@mail.gmail.com> <9625752b04101309182a96fbd2@mail.gmail.com> <200410131129.05657.jdmason@us.ltcfwd.linux.ibm.com> <20041013181840.GA30852@electric-eye.fr.zoreil.com> <9625752b04101313417be4cf90@mail.gmail.com> <20041013205433.GC30761@electric-eye.fr.zoreil.com> <9625752b04101314595f72f84a@mail.gmail.com> <9625752b04101415043a078b93@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9625752b04101415043a078b93@mail.gmail.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 10271 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 Content-Length: 373 Lines: 13 Danny : [...] > I'm not sure where this leaves me now. Perhaps I should repost my > oops and my proc info in the lkml with a different subject to draw the > attention of others, since I now know this subject to be entirely > missleading. May be try this one first: http://www.uwsg.indiana.edu/hypermail/linux/kernel/0410.1/1920.html -- Ueimor From garzik@havoc.gtf.org Fri Oct 15 09:22:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 09:22:34 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [69.28.190.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FGMQOv012051 for ; Fri, 15 Oct 2004 09:22:26 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id 787247B8D; Fri, 15 Oct 2004 12:22:06 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i9FGM508030836; Fri, 15 Oct 2004 12:22:05 -0400 Date: Fri, 15 Oct 2004 12:22:05 -0400 From: Jeff Garzik To: netdev@oss.sgi.com Cc: linux-kernel@vger.kernel.org, akpm@osdl.org, ganesh.venkatesan@intel.com Subject: [BK PATCHES] netdev-2.6 queue updated Message-ID: <20041015162205.GA30722@havoc.gtf.org> Reply-To: netdev@oss.sgi.com Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.4.1i X-archive-position: 10272 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: 11882 Lines: 308 For anybody submitting netdev patches, it is preferred to diff against the patch below, or akpm's -mm tree, as quite a pile of patches has appeared... BK users: bk pull bk://gkernel.bkbits.net/netdev-2.6 Patch: http://www.kernel.org/pub/linux/kernel/people/jgarzik/patchkits/2.6/2.6.9-rc4-bk3-netdev1.patch.bz2 This will update the following files: arch/cris/arch-v10/drivers/ethernet.c | 140 ++-- drivers/ieee1394/eth1394.c | 95 +-- drivers/media/dvb/dvb-core/dvb_net.c | 9 drivers/net/3c509.c | 151 +---- drivers/net/8139cp.c | 100 ++- drivers/net/8139too.c | 14 drivers/net/Kconfig | 45 - drivers/net/acenic.c | 171 ++--- drivers/net/acenic.h | 23 drivers/net/acenic_firmware.h | 2 drivers/net/amd8111e.c | 248 +++----- drivers/net/atp.c | 2 drivers/net/b44.c | 102 ++- drivers/net/b44.h | 113 --- drivers/net/defxx.c | 144 ++-- drivers/net/defxx.h | 2 drivers/net/dl2k.c | 267 ++++----- drivers/net/e100.c | 38 - drivers/net/e1000/e1000.h | 2 drivers/net/e1000/e1000_ethtool.c | 6 drivers/net/e1000/e1000_hw.c | 115 +++ drivers/net/e1000/e1000_main.c | 41 - drivers/net/e1000/e1000_osdep.h | 6 drivers/net/e1000/e1000_param.c | 167 +++-- drivers/net/eepro100.c | 425 ++++++-------- drivers/net/ewrk3.c | 326 +++++------ drivers/net/forcedeth.c | 142 ++-- drivers/net/hamachi.c | 157 ++--- drivers/net/hamradio/hdlcdrv.c | 2 drivers/net/ibmlana.c | 9 drivers/net/iseries_veth.c | 81 +- drivers/net/ixgb/ixgb_ethtool.c | 494 +++++------------ drivers/net/ixgb/ixgb_main.c | 34 - drivers/net/mac8390.c | 4 drivers/net/meth.c | 26 drivers/net/natsemi.c | 273 ++++----- drivers/net/ne2k-pci.c | 31 + drivers/net/ns83820.c | 173 ++++- drivers/net/pcmcia/smc91c92_cs.c | 181 +++--- drivers/net/r8169.c | 752 +++++++++++++++++++------- drivers/net/sis900.c | 276 +++++---- drivers/net/sk_mca.c | 9 drivers/net/smc91x.c | 484 ++++++++-------- drivers/net/smc91x.h | 76 ++ drivers/net/starfire.c | 191 +++--- drivers/net/sundance.c | 187 ++---- drivers/net/tulip/de2104x.c | 3 drivers/net/tulip/de4x5.c | 2 drivers/net/tulip/tulip_core.c | 55 - drivers/net/tulip/winbond-840.c | 2 drivers/net/tulip/xircom_cb.c | 14 drivers/net/tulip/xircom_tulip_cb.c | 194 +++--- drivers/net/typhoon.c | 232 +++----- drivers/net/wan/lmc/lmc_main.c | 9 drivers/net/wireless/airo.c | 45 + drivers/net/wireless/netwave_cs.c | 12 drivers/net/wireless/prism54/isl_38xx.c | 15 drivers/net/wireless/prism54/isl_38xx.h | 4 drivers/net/wireless/prism54/isl_ioctl.c | 639 +++++++++++++++++++--- drivers/net/wireless/prism54/isl_ioctl.h | 2 drivers/net/wireless/prism54/isl_oid.h | 9 drivers/net/wireless/prism54/islpci_dev.c | 49 + drivers/net/wireless/prism54/islpci_dev.h | 4 drivers/net/wireless/prism54/islpci_eth.c | 5 drivers/net/wireless/prism54/islpci_hotplug.c | 3 drivers/net/wireless/prism54/islpci_mgt.c | 1 drivers/net/wireless/prism54/islpci_mgt.h | 2 drivers/net/wireless/prism54/oid_mgt.c | 126 +++- drivers/net/wireless/prism54/oid_mgt.h | 5 drivers/net/wireless/wavelan.c | 19 drivers/net/wireless/wavelan.p.h | 3 drivers/net/wireless/wavelan_cs.c | 181 ++---- drivers/net/wireless/wavelan_cs.p.h | 3 drivers/net/wireless/wl3501_cs.c | 53 - drivers/net/yellowfin.c | 62 -- drivers/usb/gadget/ether.c | 73 -- drivers/usb/net/catc.c | 122 +--- drivers/usb/net/kaweth.c | 34 - drivers/usb/net/pegasus.c | 297 ++++------ drivers/usb/net/rtl8150.c | 186 ++---- include/linux/netdevice.h | 4 include/linux/wireless.h | 64 +- include/net/iw_handler.h | 60 +- net/core/dev.c | 2 net/core/wireless.c | 210 +++++-- net/irda/irlan/irlan_client.c | 2 86 files changed, 4818 insertions(+), 4325 deletions(-) through these ChangeSets: : o [netdrvr b44] clean up SiliconBackplane definitions/functions o [netdrvr b44] ignore carrier lost errors : o netpoll with xircom_cb : o janitor: net/tulip: pci_find_device to pci_dev_present o janitor: net/sis900: pci_find_device to pci_get_device Alexander Viro: o (27/27) catc ethtool conversion o (26/27) kaweth ethtool conversion o (25/27) pegasus ethtool conversion o (24/27) rtl8150 ethtool conversion o (23/27) gadget ethtool conversion o (22/27) amd8111e ethtool conversion o (21/27) dl2k ethtool conversion o (20/27) eepro100 ethtool conversion o (19/27) ewrk3 ethtool conversion o (18/27) forcedeth ethtool conversion o (17/27) hamachi ethtool conversion o (16/27) veth ethtool conversion o (15/27) natsemi ethtool conversion o (14/27) ns83820 ethtool conversion o (13/27) starfire ethtool conversion o (12/27) sundance ethtool conversion o (11/27) typhoon ethtool conversion o (10/27) yellowfin ethtool conversion o (9/27) wl3501_cs ethtool conversion o (8/27) wavelan ethtool conversion o (7/27) xircom ethtool conversion o (6/27) tulip ethtool conversion o (5/27) smc91c92_cs ethtool conversion o (4/27) 3c509 ethtool conversion o (3/27) ixgb ethtool conversion o (2/27) cris ethtool conversion o (1/27) eth1394 ethtool conversion o [netdrvr starfire] use netdev_priv o [netdrvr starfire] fix unregister_netdev call site o [netdrvr] use netdev_priv in dl2k, hamachi o [netdrvr] netdev_priv for sundance, typhoon, yellowfin o [netdrvr] netdev_priv for ewrk3, xircom_tulip_cb, wavelan_cs o [netdrvr usb] use netdev_priv o [netdrvr eth1394] use netdev_priv Andrew Morton: o e1000 sparc64 dma_mapping build fix o igxb speedup o pegasus.c fixes o de4x5 warning fix Anton Blanchard: o fix acenic hotplug Daniele Venzano: o [netdrvr sis900] whitespace and codingstyle updates David Dillow: o PCI cleanups and convert to ethtool_ops David S. Miller: o eepro100.c iomap conversion Felipe Damasio: o 8139cp net driver: add MODULE_VERSION François Romieu: o r8169: cleanup o r8169: rtl8169_close() races o r8169: automatic pci dac step down o r8169: wrong advertisement of VLAN features o r8169: Tx timeout rework o via-velocity: wrong module name in Kconfig documentation o r8169: default on disabling PCIDAC o r8169: Mac identifier extracted from Realtek's driver v2.2 o r8169: TSO support o r8169: hint for Tx flow control o r8169: miscalculation of available Tx descriptors o 8139cp: SG support fixes o r8169: vlan support o r8169: Rx checksum support o r8169: advertise DMA to high memory o r8169: Tx checksum offload o r8169: comment a gcc 2.95.x bug o r8169: sync the names of a few bits with the 8139cp driver o r8169: bump version number o r8169: enable MWI o r8169: code cleanup o r8169: per device receive buffer size o r8169: add ethtool_ops.{get_regs_len/get_regs} Ganesh Venkatesan: o e1000 update -- fix MODULE_PARM, module_param, module_param_array o e1000 - Ethtool -- 82545 do not support WoL o e1000 - Polarity reversal workaround for 10F/10H links o e1000 - Fix VLAN filter setup errors (while running on PPC) o e1000 Check value returned by from pci_enable_device o e1000 - Removed support for advanced TCO features o e1000 - use pci_device_name for syslog messages till registering netdevice. o e100 driver version number update o e100 - use NET_IP_ALIGN to set rx data buffer alignment o e100 - Use pci_device_name for syslog messages till registering netdevice Hirokazu Takata: o m32r: trivial fix of smc91x.h Jean Tourrilhes: o WE-17 typo fix o wireless-drivers-update-for-we-17.patch o wireless-extension-v17-for-linus.patch Jeff Garzik: o Hand-merge typhoon conflicts o [netdrvr eepro100] fix pci_iomap() args and info msg that follows o [netdrvr b44] update MODULE_AUTHORS o [netdrvr 8139cp] TSO support o [netdev] Remove no-op in-driver implementations of ->set_config() Jesse Brandeburg: o e100: whitespace and DPRINTKS o e100: fix NAPI race with watchdog o ixgb: fix endianness issue for tx cleanup Kenji Kaneshige: o add missing pci_disable_device for e1000 Maciej W. Rozycki: o defxx device name fixes o defxx trivial updates Manfred Spraul: o rx checksum support for gige nForce ethernet Marc Singer: o adding smc91x ethernet to lpd7a40x Margit Schubert-While: o prism54 bug initialization/mgt_commit o prism54 print firmware version o prism54 Bug in timeout scheduling o prism54 remove TRACE o prism54 fix wpa_supplicant frequency parsing o prism54 initial WPA support o prism54 add WE17 support o prism54 remove module params o prism54 Code cleanup Mika Kukkonen: o sparse: fix warnings in net/irda/* Neil Horman: o ns83820: add vlan tag hardware acceleration support Nicolas Pitre: o smc91x: release on-chip RX packet memory ASAP o smc91x: receives two bytes too many o smc91x: fix compilation with DMA on PXA2xx o smc91x: more SMP locking fixes o smc91x: fix SMP lock usage o smc91x: cosmetics o smc91x: straighten SMP locking o smc91x: display pertinent register values from the timeout function o smc91x: fix possible leak of the skb waiting for mem allocation o smc91x: use a work queue to reconfigure the phy from smc_timeout() o smc91x: move TX processing out of IRQ context entirely o smc91x: simplify register bank usage o smc91x: fold smc_setmulticast() into smc_set_multicast_list() o smc91x: set the MAC addr from the smc_enable function o smc91x: Assorted minor cleanups o smc91x: Revert 1.1923.3.58: "m32r: modify drivers/net/smc91x.c for m32r" Nishanth Aravamudan: o net/de2104x: replace schedule_timeout() with msleep() Olaf Hering: o remove old version check from mac8390 Pavel Machek: o swsuspend for ne2k-pci cards Pekka Pietikäinen: o b44: use bounce buffers to workaround chip DMA bug/limitations Ralf Bächle: o Stop queue on close in hdlcdrv Rene Herman: o 8139too Interframe Gap Time Roger Luethi: o mc_filter on big-endian arch Steffen Klassert: o 8139cp - add netpoll support Stephen Hemminger: o 8139cp - module_param o (4/4) acenic - don't spin forever in hard_start_xmit o (3/4) acenic - __iomem warnings cleanup o (2/4) acenic - eliminate MAX_SKB_FRAGS #if o (1/4) acenic - use netdev_priv From jgarzik@pobox.com Fri Oct 15 09:24:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 09:24:46 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FGOffw012629 for ; Fri, 15 Oct 2004 09:24:42 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIUsU-0003kg-Te; Fri, 15 Oct 2004 17:24:27 +0100 Message-ID: <416FF9AE.20304@pobox.com> Date: Fri, 15 Oct 2004 12:24:14 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ganesh Venkatesan CC: netdev Subject: Re: [Patch 1/5 2.5] e100: Fix e100_watchdog to not accidentally re-enable interrupts when setting the software interrupt bit. References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10273 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: 233 Lines: 10 I'm afraid these patches did not apply, due to the pre-existing e100 patches that have already been applied. Please re-diff and resend this patch series against the netdev-2.6 patch that I just posted (and CC'd to you). Jeff From jgarzik@pobox.com Fri Oct 15 09:29:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 09:29:38 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FGTXr4015253 for ; Fri, 15 Oct 2004 09:29:33 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIUxC-0004BD-Pz; Fri, 15 Oct 2004 17:29:18 +0100 Message-ID: <416FFAD3.2080902@pobox.com> Date: Fri, 15 Oct 2004 12:29:07 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ganesh Venkatesan CC: netdev Subject: Re: [Patch 1/3 2.4] e100 Update to Configure.help References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10274 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: 427 Lines: 14 Ganesh Venkatesan wrote: > diff -Nuarp old/linux-2.4/Documentation/Configure.help new/linux-2.4/Documentation/Configure.help > --- old/linux-2.4/Documentation/Configure.help 2004-10-07 15:33:24.000000000 -0700 > +++ new/linux-2.4/Documentation/Configure.help 2004-10-07 15:33:53.000000000 -0700 patch OK, but not applied: invalid patch header. see item #3, Rule Number Three: http://linux.yyz.us/patch-format.html Jeff From jgarzik@pobox.com Fri Oct 15 09:29:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 09:30:02 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FGTutO015350 for ; Fri, 15 Oct 2004 09:29:57 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIUxZ-0004Bf-W1; Fri, 15 Oct 2004 17:29:42 +0100 Message-ID: <416FFAEA.50207@pobox.com> Date: Fri, 15 Oct 2004 12:29:30 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ganesh Venkatesan CC: netdev Subject: Re: [Patch 2/3 2.4] e1000: Update to Configure.help References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10275 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: 394 Lines: 9 Ganesh Venkatesan wrote: > diff -Nuarp old/linux-2.4/Documentation/Configure.help new/linux-2.4/Documentation/Configure.help > --- old/linux-2.4/Documentation/Configure.help 2004-10-07 15:33:24.000000000 -0700 > +++ new/linux-2.4/Documentation/Configure.help 2004-10-07 15:33:53.000000000 -0700 patch OK but not applied due to invalid patch header (same as your first patch in this series) From jgarzik@pobox.com Fri Oct 15 09:30:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 09:30:10 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FGU4NR015434 for ; Fri, 15 Oct 2004 09:30:04 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIUxh-0004Bu-UK; Fri, 15 Oct 2004 17:29:50 +0100 Message-ID: <416FFAF2.4050802@pobox.com> Date: Fri, 15 Oct 2004 12:29:38 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ganesh Venkatesan CC: netdev Subject: Re: [Patch 3/3 2.4] e1000: Update Documentation/networking/e1000.txt References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10276 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: 24 Lines: 2 patch applied to 2.4.x From jgarzik@pobox.com Fri Oct 15 09:33:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 09:33:07 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FGX2IE016305 for ; Fri, 15 Oct 2004 09:33:02 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIV0Z-0004Gh-Q7; Fri, 15 Oct 2004 17:32:47 +0100 Message-ID: <416FFBA4.1080001@pobox.com> Date: Fri, 15 Oct 2004 12:32:36 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ganesh Venkatesan CC: netdev Subject: Re: [Patch 1/3 2.5] e1000: Configuration and user guide update References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10277 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: 513 Lines: 14 Ganesh Venkatesan wrote: > diff -Nuarp old/linux-2.5/Documentation/networking/e1000.txt new/linux-2.5/Documentation/networking/e1000.txt > --- old/linux-2.5/Documentation/networking/e1000.txt 2004-10-07 15:50:44.000000000 -0700 > +++ new/linux-2.5/Documentation/networking/e1000.txt 2004-10-07 15:51:15.000000000 -0700 all three patches in this series look OK, but are rejected due to invalid patch header (see previous emails with details). Your patch _must_ be apply-able with "patch -sp1 < patch" Jeff From jgarzik@pobox.com Fri Oct 15 09:35:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 09:35:38 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FGZXDw016759 for ; Fri, 15 Oct 2004 09:35:33 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIV30-0004Nx-HG; Fri, 15 Oct 2004 17:35:18 +0100 Message-ID: <416FFC3A.5050101@pobox.com> Date: Fri, 15 Oct 2004 12:35:06 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ganesh Venkatesan CC: netdev Subject: Re: [Patch 0/5 2.4] e1000: driver update References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10278 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: 396 Lines: 14 Ganesh Venkatesan wrote: > 1. modified ethtool_set_pauseparam to use e1000_setup_link for flow control > settings for fiber serdes link > 2. remove unused function e1000_enable_mng_pass_thru > 3. fix set ringparam for ethtool returning error code on bad input > 4. driver version number update > 5. white space corrections all five patches in this series successfully applied to 2.4.x Jeff From linux-kernel@borntraeger.net Fri Oct 15 09:47:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 09:47:09 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.190]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FGl38Q017528 for ; Fri, 15 Oct 2004 09:47:03 -0700 Received: from [212.227.126.206] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CIVE4-00085W-00; Fri, 15 Oct 2004 18:46:44 +0200 Received: from [213.23.46.247] (helo=cubus.S-IK) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1CIVE4-0003ng-00; Fri, 15 Oct 2004 18:46:44 +0200 From: Christian Borntraeger To: Ganesh Venkatesan Subject: Re: [Patch 12/16 2.5] ixgb: replace kmalloc with vmalloc to allocate driver local data structures Date: Fri, 15 Oct 2004 18:46:42 +0200 User-Agent: KMail/1.7 Cc: "jgarzik@pobox.com" , netdev References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410151846.42479.linux-kernel@borntraeger.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:5a8b66f42810086ecd21595c2d6103b9 X-archive-position: 10279 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linux-kernel@borntraeger.net Precedence: bulk X-list: netdev Content-Length: 264 Lines: 13 Ganesh Venkatesan wrote: > - rxdr->buffer_info = kmalloc(size, GFP_KERNEL); [...] > + rxdr->buffer_info = vmalloc(size); What is the rationale for this change? If I recall correctly, Linus opposes the use of vmalloc if there is no real need. cheers Christian From jgarzik@pobox.com Fri Oct 15 09:50:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 09:50:26 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FGoL9Z017945 for ; Fri, 15 Oct 2004 09:50:22 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIVHL-0004x6-9Q; Fri, 15 Oct 2004 17:50:07 +0100 Message-ID: <416FFFB2.8000602@pobox.com> Date: Fri, 15 Oct 2004 12:49:54 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ganesh Venkatesan CC: netdev Subject: Re: [Patch 0/5 2.5] e1000: driver update References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10280 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: 382 Lines: 14 Ganesh Venkatesan wrote: > 1. modified ethtool_set_pauseparam to use e1000_setup_link for flow control > settings for fiber serdes link > 2. remove unused function e1000_enable_mng_pass_thru > 3. fix set ringparam for ethtool returning error code on bad input > 4. driver version number update > 5. white space corrections all five changes successfully applied to 2.6.x. Jeff From jgarzik@pobox.com Fri Oct 15 10:03:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 10:03:53 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FH3naD018660 for ; Fri, 15 Oct 2004 10:03:49 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIVUM-0005XW-Re; Fri, 15 Oct 2004 18:03:34 +0100 Message-ID: <417002DB.4070009@pobox.com> Date: Fri, 15 Oct 2004 13:03:23 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ganesh Venkatesan CC: netdev Subject: Re: [Patch 2/16 2.5] ixgb: Fix memory leak in NAPI mode. Avoid unnecessary work in NAPI Rx cleanup References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10282 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: 9 Lines: 2 applied From jgarzik@pobox.com Fri Oct 15 10:03:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 10:03:47 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FH3gOX018647 for ; Fri, 15 Oct 2004 10:03:42 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIVUF-0005XJ-Qs; Fri, 15 Oct 2004 18:03:27 +0100 Message-ID: <417002D3.5040401@pobox.com> Date: Fri, 15 Oct 2004 13:03:15 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ganesh Venkatesan CC: netdev Subject: Re: [Patch 1/16 2.5] ixgb: Fix VLAN filter setup errors (while running on PPC) References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10281 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: 8 Lines: 1 applied From jgarzik@pobox.com Fri Oct 15 10:04:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 10:04:42 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FH4aHS018971 for ; Fri, 15 Oct 2004 10:04:37 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIVV8-0005Yt-Cm; Fri, 15 Oct 2004 18:04:22 +0100 Message-ID: <4170030A.4030508@pobox.com> Date: Fri, 15 Oct 2004 13:04:10 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ganesh Venkatesan CC: netdev Subject: Re: [Patch 3/16 2.5] ixgb: Fix endianess issue for Tx cleanup References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10283 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: 954 Lines: 23 Ganesh Venkatesan wrote: > diff -up net-drivers-2.6/drivers/net/ixgb/ixgb_main.c net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c > --- net-drivers-2.6/drivers/net/ixgb/ixgb_main.c 2004-10-05 15:50:18.000000000 -0700 > +++ net-drivers-2.6/drivers/net/ixgb.new/ixgb_main.c 2004-10-05 17:55:48.000000000 -0700 > @@ -1677,7 +1677,7 @@ static boolean_t ixgb_clean_tx_irq(struc > eop = tx_ring->buffer_info[i].next_to_watch; > eop_desc = IXGB_TX_DESC(*tx_ring, eop); > > - while (eop_desc->status & cpu_to_le32(IXGB_TX_DESC_STATUS_DD)) { > + while(eop_desc->status & IXGB_TX_DESC_STATUS_DD) { > > for (cleaned = FALSE; !cleaned;) { patch OK but patch(1) could not apply the patch: bk import -tpatch -CR -yixgb: Fix endianess issue for Tx cleanup /tmp/patch4377 . Patching... Patch failed. **** patch log follows **** Patching file drivers/net/ixgb/ixgb_main.c 1 out of 1 hunk FAILED -- saving rejects to file drivers/net/ixgb/ixgb_main.c.rej From jgarzik@pobox.com Fri Oct 15 10:04:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 10:04: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.13.0/8.13.0) with ESMTP id i9FH4mcu019063 for ; Fri, 15 Oct 2004 10:04:49 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIVVK-0005Z0-4j; Fri, 15 Oct 2004 18:04:34 +0100 Message-ID: <41700316.2090601@pobox.com> Date: Fri, 15 Oct 2004 13:04:22 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ganesh Venkatesan CC: netdev Subject: Re: [Patch 4/16 2.5] ixgb: Fix NAPI driver crash on ifdown during traffic References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10284 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: 45 Lines: 2 patch(1) failed to apply this patch as well From jgarzik@pobox.com Fri Oct 15 10:04:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 10:05:02 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FH4ulu019188 for ; Fri, 15 Oct 2004 10:04:57 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIVVS-0005Z7-Bj; Fri, 15 Oct 2004 18:04:42 +0100 Message-ID: <4170031E.8050401@pobox.com> Date: Fri, 15 Oct 2004 13:04:30 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ganesh Venkatesan CC: netdev Subject: Re: [Patch 5/16 2.5] ixgb: Condition that determines when to quit polling mode includes work done in Tx path References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10285 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: 15 Lines: 2 patch applied From jgarzik@pobox.com Fri Oct 15 10:17:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 10:17:17 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FHHBjg020462 for ; Fri, 15 Oct 2004 10:17:12 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIVhJ-0005zK-7z; Fri, 15 Oct 2004 18:16:57 +0100 Message-ID: <417005FD.4020109@pobox.com> Date: Fri, 15 Oct 2004 13:16:45 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ganesh Venkatesan CC: netdev Subject: Re: [Patch 6/16 2.5] ixgb: fix error in setting Frame Size register while changing mtu References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10286 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: 255 Lines: 15 patches 6 through 16 rejected because of the high likelihood of patch(1) rejects. Please rediff the remaining patches (3, 4, 6-16) against a tree consisting of * netdev-2.6 (info CC'd in an earlier email) * ixgb patches 1, 2, and 5 Thanks, Jeff From romieu@fr.zoreil.com Fri Oct 15 10:57:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 10:57:55 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FHvnc2021636 for ; Fri, 15 Oct 2004 10:57:50 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i9FHsRvr004848; Fri, 15 Oct 2004 19:54:27 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i9FHsQCG004847; Fri, 15 Oct 2004 19:54:26 +0200 Date: Fri, 15 Oct 2004 19:54:26 +0200 From: Francois Romieu To: Ganesh Venkatesan Cc: "jgarzik@pobox.com" , netdev Subject: Re: [Patch 13/16 2.5] ixgb: ethtool_ops support Message-ID: <20041015175426.GA2878@electric-eye.fr.zoreil.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 10287 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 Content-Length: 2303 Lines: 73 Ganesh Venkatesan : [...] > @@ -94,9 +55,11 @@ struct ixgb_stats { > #define IXGB_STATS_LEN \ > sizeof(ixgb_gstrings_stats) / sizeof(struct ixgb_stats) > > -static void > -ixgb_ethtool_gset(struct ixgb_adapter *adapter, struct ethtool_cmd *ecmd) > +static int > +ixgb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) > { > + struct ixgb_adapter *adapter = netdev->priv; > + > ecmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE); > ecmd->advertising = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE); > ecmd->port = PORT_FIBRE; What about simply naming the net_device 'dev' and make use of netdev_priv() in this patch ? It is not a big issue but your editor shows a trend to eat lines after the declaration of variables and to crunch spaces after 'if' and 'for'. [...] > +static int > +ixgb_set_ringparam(struct net_device *netdev, > + struct ethtool_ringparam *ring) > +{ > + struct ixgb_adapter *adapter = netdev->priv; > + struct ixgb_desc_ring *txdr = &adapter->tx_ring; > + struct ixgb_desc_ring *rxdr = &adapter->rx_ring; > + struct ixgb_desc_ring tx_old, tx_new, rx_old, rx_new; > + int err; > + > + tx_old = adapter->tx_ring; > + rx_old = adapter->rx_ring; > + > + if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) > + return -EINVAL; > + > + if(netif_running(adapter->netdev)) > + ixgb_down(adapter,TRUE); > + [...] > + if(netif_running(adapter->netdev)) { > + /* Try to get new resources before deleting old */ > + if((err = ixgb_setup_rx_resources(adapter))) > + goto err_setup_rx; > + if((err = ixgb_setup_tx_resources(adapter))) > + goto err_setup_tx; > + > + /* save the new, restore the old in order to free it, > + * then restore the new back again */ > + > + rx_new = adapter->rx_ring; > + tx_new = adapter->tx_ring; > + adapter->rx_ring = rx_old; > + adapter->tx_ring = tx_old; > + ixgb_free_rx_resources(adapter); > + ixgb_free_tx_resources(adapter); > + adapter->rx_ring = rx_new; > + adapter->tx_ring = tx_new; > + if((err = ixgb_up(adapter))) > + return err; -> ixgb_up() failed and netif_running() is true. If dev_close() (or a call to set_ringparam()) is issued by the user once rtnl_lock() is released, it will trigger a second call to ixgb_down(). -- Ueimor From jgarzik@pobox.com Fri Oct 15 11:45:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 11:45:27 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FIjLLb022765 for ; Fri, 15 Oct 2004 11:45:21 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIX4c-0000dV-EE; Fri, 15 Oct 2004 19:45:06 +0100 Message-ID: <41701AA6.6020709@pobox.com> Date: Fri, 15 Oct 2004 14:44:54 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Margit Schubert-While CC: netdev@oss.sgi.com, prism54-devel@prism54.org Subject: Re: [PATCH 1/1 linux-2.4.28-pre3] prism54 status to 2.6 References: <200410091517.58362.margitsw@t-online.de> In-Reply-To: <200410091517.58362.margitsw@t-online.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10288 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: 9 Lines: 2 applied From jgarzik@pobox.com Fri Oct 15 11:47:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 11:47:57 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FIlqWA023092 for ; Fri, 15 Oct 2004 11:47:52 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIX73-0000l6-3U; Fri, 15 Oct 2004 19:47:37 +0100 Message-ID: <41701B3C.8020006@pobox.com> Date: Fri, 15 Oct 2004 14:47:24 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Leonid Grossman CC: "'Raghavendra Koushik'" , "'Chris Leech'" , ravinandan.arakali@s2io.com, "'Francois Romieu'" , netdev@oss.sgi.com, rapuru.sriram@s2io.com Subject: Re: [PATCH 2.6.9-rc2 8/8] S2io: two buffer mode References: <200410150021.i9F0LJ39024214@guinness.s2io.com> In-Reply-To: <200410150021.i9F0LJ39024214@guinness.s2io.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10289 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: 657 Lines: 22 Leonid Grossman wrote: > "fragmented SKB on Rx" is an old problem - we tried to deploy 2 and 5 > buffer Xframe modes before and it did not work in Linux. > Is anyone aware of any network driver that successfully uses fragmented > SKBs? Raghavendra Koushik wrote: > I did try fragmented SKB on Rx but it didn't seem to work. If any one can > give me some pointers on how to get this working, I would implement 2Buff > mode using this method and avoid a copy in fast path. My suggestion would be to investigate why fragmented SKBs don't work ;-) The source code is all there, debug away... If S2IO can fix this, a lot of people will benefit. Jeff From jgarzik@pobox.com Fri Oct 15 11:52:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 11:52:49 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FIqiaG023504 for ; Fri, 15 Oct 2004 11:52:44 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIXBm-0000zB-07; Fri, 15 Oct 2004 19:52:30 +0100 Message-ID: <41701C61.2090109@pobox.com> Date: Fri, 15 Oct 2004 14:52:17 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Raghavendra Koushik CC: ravinandan.arakali@s2io.com, "'Francois Romieu'" , netdev@oss.sgi.com, leonid.grossman@s2io.com, rapuru.sriram@s2io.com Subject: Re: [PATCH 2.6.9-rc2 2/8] S2io: sw bug fixes References: <200410141735.i9EHZJ39006121@guinness.s2io.com> In-Reply-To: <200410141735.i9EHZJ39006121@guinness.s2io.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10290 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: 1014 Lines: 29 Raghavendra Koushik wrote: > As I said the s2io_close can be called from stack or by the reset task. If > called from the task (or work) is it still Ok to flush all scheduled works? [...] > I believe the best way to restart the NIC is to call s2io_close and > s2io_open sequentially. Look at other drivers, e.g. drivers/net/tulip/tulip_core.c. You will see two levels of functions: tulip_open() -- net stack dev->open() hook tulip_close() -- net stack dev->stop() hook tulip_up() -- reset-and-start-hardware helper function tulip_down() -- stop-hardware helper function If S2IO follows this model, all good. If you have both the net stack and your own code directly calling the net stack dev->stop() hook, that will lead to problems. If you are doing this, you must _precisely duplicate_ the code in dev_close() in order to avoid races; but even then, you are really interfering with the code that synchronizes and manages reference-counted objects (struct net_device), which is unwise. Jeff From jgarzik@pobox.com Fri Oct 15 11:54:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 11:54:19 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FIsDXR023860 for ; Fri, 15 Oct 2004 11:54:13 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIXDD-00010x-0w; Fri, 15 Oct 2004 19:53:59 +0100 Message-ID: <41701CBA.7010108@pobox.com> Date: Fri, 15 Oct 2004 14:53:46 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Raghavendra Koushik CC: ravinandan.arakali@s2io.com, "'Francois Romieu'" , netdev@oss.sgi.com, leonid.grossman@s2io.com, rapuru.sriram@s2io.com Subject: Re: [PATCH 2.6.9-rc2 7/8] S2io: NAPI fix References: <200410141644.i9EGi839024175@guinness.s2io.com> In-Reply-To: <200410141644.i9EGi839024175@guinness.s2io.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10291 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: 1514 Lines: 41 Raghavendra Koushik wrote: > Hi Jeff, > > My comments inline. > > >>-----Original Message----- >>From: Jeff Garzik [mailto:jgarzik@pobox.com] >>Sent: Thursday, October 14, 2004 8:00 AM >>To: ravinandan.arakali@s2io.com >>Cc: 'Francois Romieu'; netdev@oss.sgi.com; leonid.grossman@s2io.com; >>raghavendra.koushik@s2io.com; rapuru.sriram@s2io.com >>Subject: Re: [PATCH 2.6.9-rc2 7/8] S2io: NAPI fix >> >>Comments on patch #7: >> >>1) Can you prove that put_lock is really necessary, and not covered by >>other methods of synchronization? Typically the preferred model is that >>your RX process requires _no_ spinlocks, and instead you use the net >>stack API to ensure when your RX process is, and is not, running. >> > > > Lets say, CPU0 after processing s2io_isr, schedules s2io_tasklet. > The tasklet in turn calls fill_rx_buffer which will replenish skbs into Rx > descriptors and start modifying the put index of the Rx ring, at the same > time if there is another Rx interrupt being processed (rx_intr_handler) on > CPU1, then it will try to read put index of the ring which can result in > synchronization problem. So I created this new variable put_pos to track the > absolute value of the put index and make sure all its accesses are between > spin locks. The same problem cannot happen if NAPI is used since the > s2io_poll and fill_rx_buffer calls are serialized. Have you actually benchmarked this on SMP? It seems to me that you pay a penalty cross-CPU traffic with this scheme? Jeff From linux-netdev@gmane.org Fri Oct 15 12:03:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 12:03:47 -0700 (PDT) Received: from main.gmane.org (main.gmane.org [80.91.229.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FJ3e7Y024479 for ; Fri, 15 Oct 2004 12:03:41 -0700 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CIXMM-0001Uo-00 for ; Fri, 15 Oct 2004 21:03:26 +0200 Received: from 69.15.40.50 ([69.15.40.50]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Oct 2004 21:03:26 +0200 Received: from lunz by 69.15.40.50 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 15 Oct 2004 21:03:26 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: netdev@oss.sgi.com From: Jason Lunz Subject: Re: [Patch 3/3 2.4] e1000: Update Documentation/networking/e1000.txt Date: Fri, 15 Oct 2004 19:03:23 +0000 (UTC) Organization: PBR Streetgang Message-ID: References: X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 69.15.40.50 User-Agent: slrn/0.9.8.1 (Linux) X-archive-position: 10292 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: lunz@falooley.org Precedence: bulk X-list: netdev Content-Length: 740 Lines: 14 ganesh.venkatesan@intel.com said: > + This sets the InterruptThrottleRate to 3000 interrupts/sec for the > + first, second, and third instances of the driver. The range of 2000 to > + 3000 interrupts per second works on a majority of systems and is a > + good starting point, but the optimal value will be platform-specific. > + If CPU utilization is not a concern, use RX_POLLING (NAPI) and default > + driver settings. I don't understand this bit. Isn't the point of NAPI to disable rx interrupts entirely, and only gather as many frames from the driver as CPU time permits? That's supposed to limit network-rx CPU usage, not increase it as the above paragraph implies. Jason From jgarzik@pobox.com Fri Oct 15 12:25:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 12:25:26 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FJPJ8n028460 for ; Fri, 15 Oct 2004 12:25:20 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIXhI-0002PF-RC; Fri, 15 Oct 2004 20:25:04 +0100 Message-ID: <41702405.6070100@pobox.com> Date: Fri, 15 Oct 2004 15:24:53 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Randy.Dunlap" CC: netdev , mlindner@syskonnect.de Subject: Re: [PATCH] skfp: remove assignment expression in conditional (sparse) References: <4169BB68.7030206@osdl.org> In-Reply-To: <4169BB68.7030206@osdl.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10293 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: 1048 Lines: 35 Randy.Dunlap wrote: > Fix sparse warning: > drivers/net/skfp/hwmtm.c:1904:20: warning: assignment expression in > conditional > > > ------------------------------------------------------------------------ > > > Fix sparse warning: > drivers/net/skfp/hwmtm.c:1904:20: warning: assignment expression in conditional > > Signed-off-by: Randy Dunlap > > diffstat:= > drivers/net/skfp/hwmtm.c | 2 +- > 1 files changed, 1 insertion(+), 1 deletion(-) > > diff -Naurp ./drivers/net/skfp/hwmtm.c~skfp_expr ./drivers/net/skfp/hwmtm.c > --- ./drivers/net/skfp/hwmtm.c~skfp_expr 2004-08-13 22:36:59.000000000 -0700 > +++ ./drivers/net/skfp/hwmtm.c 2004-10-10 15:15:21.090772760 -0700 > @@ -1901,7 +1901,7 @@ void smt_send_mbuf(struct s_smc *smc, SM > } > > if (!smc->hw.mac_ring_is_up || frag_count > queue->tx_free) { > - if (frame_status &= ~LAN_TX) { > + if ((frame_status &= ~LAN_TX) != 0) { I would prefer to fix a 'assignment expression in conditional' warning by splitting the assignment and the test. Jeff From jgarzik@pobox.com Fri Oct 15 12:26:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 12:26:46 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FJQgaa028776 for ; Fri, 15 Oct 2004 12:26:42 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIXid-0002Qv-Bu; Fri, 15 Oct 2004 20:26:27 +0100 Message-ID: <41702457.7030107@pobox.com> Date: Fri, 15 Oct 2004 15:26:15 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Randy.Dunlap" CC: netdev , tsbogend@alpha.franken.de, brazilnut@us.ibm.com Subject: Re: [PATCH] pcnet32: use unsigned 1-bit fields References: <4169BB5E.1070409@osdl.org> In-Reply-To: <4169BB5E.1070409@osdl.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10294 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: 9 Lines: 2 applied From jgarzik@pobox.com Fri Oct 15 12:34:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 12:34:08 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FJY2FP030456 for ; Fri, 15 Oct 2004 12:34:03 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIXpi-0002aQ-2V; Fri, 15 Oct 2004 20:33:46 +0100 Message-ID: <4170260D.9010905@pobox.com> Date: Fri, 15 Oct 2004 15:33:33 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: akpm@osdl.org CC: "John W. Linville" , linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Donald Becker Subject: Re: [patch 2.6.9-rc3] 3c59x: reload EEPROM values at rmmod for needy cards References: <20040928145455.C12480@tuxdriver.com> <20040930091407.A10417@tuxdriver.com> <20041007134601.B29517@tuxdriver.com> <20041008123955.E14378@tuxdriver.com> In-Reply-To: <20041008123955.E14378@tuxdriver.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10295 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: 327 Lines: 14 John W. Linville wrote: > Enable reload of EEPROM values in reset at rmmod for cards that need > it, similar to old EEPROM_NORESET flag but in reverse. > > Signed-of-by: John W. Linville Andrew... ack/nak? Seems OK to me, provided that it chills out in -mm for a while for people to test. Jeff From akepner@sgi.com Fri Oct 15 12:36:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 12:36:59 -0700 (PDT) Received: from omx2.sgi.com (omx2-ext.sgi.com [192.48.171.19]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FJas58030834 for ; Fri, 15 Oct 2004 12:36:54 -0700 Received: from nodin.corp.sgi.com (nodin.corp.sgi.com [192.26.51.193]) by omx2.sgi.com (8.12.11/8.12.9/linux-outbound_gateway-1.1) with ESMTP id i9FKnPDg015604 for ; Fri, 15 Oct 2004 13:49:25 -0700 Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by nodin.corp.sgi.com (8.12.9/8.12.10/SGI_generic_relay-1.2) with ESMTP id i9FJael238512200 for ; Fri, 15 Oct 2004 12:36:40 -0700 (PDT) From: akepner@sgi.com Received: from [192.168.2.3] (mtv-vpn-sw-corp-0-176.corp.sgi.com [134.15.0.176]) by cthulhu.engr.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id i9FJZZLH4043561; Fri, 15 Oct 2004 12:35:36 -0700 (PDT) Date: Fri, 15 Oct 2004 12:20:48 -0700 (PDT) X-X-Sender: To: Jason Lunz cc: Subject: Re: [Patch 3/3 2.4] e1000: Update Documentation/networking/e1000.txt In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 10296 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: akepner@sgi.com Precedence: bulk X-list: netdev Content-Length: 1083 Lines: 26 On Fri, 15 Oct 2004, Jason Lunz wrote: > ganesh.venkatesan@intel.com said: > > + This sets the InterruptThrottleRate to 3000 interrupts/sec for the > > + first, second, and third instances of the driver. The range of 2000 to > > + 3000 interrupts per second works on a majority of systems and is a > > + good starting point, but the optimal value will be platform-specific. > > + If CPU utilization is not a concern, use RX_POLLING (NAPI) and default > > + driver settings. > > I don't understand this bit. Isn't the point of NAPI to disable rx > interrupts entirely, and only gather as many frames from the driver as > CPU time permits? That's supposed to limit network-rx CPU usage, not > increase it as the above paragraph implies. In my experience (on Altix systems, so that experience may be somewhat atypical), NAPI results in few (2-7) packets processed per interrupt, so the interrupt rate (and CPU utilization) can be very high. Interrupt coalescence is much better in both of these respects. -- Arthur From leonid.grossman@s2io.com Fri Oct 15 12:49:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 12:50:00 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FJnr5D031404 for ; Fri, 15 Oct 2004 12:49:54 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9FJn4je004665; Fri, 15 Oct 2004 15:49:04 -0400 (EDT) Received: from lgt40 ([10.16.16.105]) by guinness.s2io.com (8.12.6/8.12.6) with ESMTP id i9FJmo39006757; Fri, 15 Oct 2004 15:48:52 -0400 (EDT) Message-Id: <200410151948.i9FJmo39006757@guinness.s2io.com> From: "Leonid Grossman" To: "'Jeff Garzik'" Cc: "'Raghavendra Koushik'" , "'Chris Leech'" , , "'Francois Romieu'" , , Subject: RE: [PATCH 2.6.9-rc2 8/8] S2io: two buffer mode Date: Fri, 15 Oct 2004 12:48:34 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 In-Reply-To: <41701B3C.8020006@pobox.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Thread-Index: AcSy53Jq7TBEk87dT6qMRKfom9kjrQACEUaQ X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10297 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: leonid.grossman@s2io.com Precedence: bulk X-list: netdev Content-Length: 1109 Lines: 39 OK, we will debug and try to fix this. Leonid > -----Original Message----- > From: Jeff Garzik [mailto:jgarzik@pobox.com] > Sent: Friday, October 15, 2004 11:47 AM > To: Leonid Grossman > Cc: 'Raghavendra Koushik'; 'Chris Leech'; > ravinandan.arakali@s2io.com; 'Francois Romieu'; > netdev@oss.sgi.com; rapuru.sriram@s2io.com > Subject: Re: [PATCH 2.6.9-rc2 8/8] S2io: two buffer mode > > Leonid Grossman wrote: > > "fragmented SKB on Rx" is an old problem - we tried to > deploy 2 and 5 > > buffer Xframe modes before and it did not work in Linux. > > Is anyone aware of any network driver that successfully uses > > fragmented SKBs? > > Raghavendra Koushik wrote: > > I did try fragmented SKB on Rx but it didn't seem to work. > If any one > > can give me some pointers on how to get this working, I would > > implement 2Buff mode using this method and avoid a copy in > fast path. > > > > My suggestion would be to investigate why fragmented SKBs > don't work ;-) > > The source code is all there, debug away... > > If S2IO can fix this, a lot of people will benefit. > > Jeff > > From ak@suse.de Fri Oct 15 12:57:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 12:57:51 -0700 (PDT) Received: from Cantor.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FJvhk5031914 for ; Fri, 15 Oct 2004 12:57:44 -0700 Received: from hermes.suse.de (hermes-ext.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 37ABFD7F675; Fri, 15 Oct 2004 21:57:24 +0200 (CEST) Date: Fri, 15 Oct 2004 21:57:23 +0200 From: Andi Kleen To: Leonid Grossman Cc: "'Jeff Garzik'" , "'Raghavendra Koushik'" , "'Chris Leech'" , ravinandan.arakali@s2io.com, "'Francois Romieu'" , netdev@oss.sgi.com, rapuru.sriram@s2io.com Subject: Re: [PATCH 2.6.9-rc2 8/8] S2io: two buffer mode Message-ID: <20041015195723.GC31195@wotan.suse.de> References: <41701B3C.8020006@pobox.com> <200410151948.i9FJmo39006757@guinness.s2io.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410151948.i9FJmo39006757@guinness.s2io.com> X-archive-position: 10298 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 Content-Length: 338 Lines: 9 On Fri, Oct 15, 2004 at 12:48:34PM -0700, Leonid Grossman wrote: > OK, we will debug and try to fix this. iirc it was originally implemented for HIPPI because the MM system had some problems with allocating 64K linear buffers reliably. But I'm not sure anybody still uses the HIPPI driver so it may have been a bit bitrotted. -Andi From ganesh.venkatesan@intel.com Fri Oct 15 13:10:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 13:10:31 -0700 (PDT) Received: from orsfmr001.jf.intel.com (fmr12.intel.com [134.134.136.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FKAQRl032471 for ; Fri, 15 Oct 2004 13:10:27 -0700 Received: from talaria.jf.intel.com (talaria.jf.intel.com [10.7.209.7]) by orsfmr001.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9FKAaOH002916; Fri, 15 Oct 2004 20:10:37 GMT Received: from orsmsxvs040.jf.intel.com (orsmsxvs040.jf.intel.com [192.168.65.206]) by talaria.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9FK3h9d008963; Fri, 15 Oct 2004 20:04:08 GMT Received: from orsmsx332.amr.corp.intel.com ([192.168.65.60]) by orsmsxvs040.jf.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101513100518626 ; Fri, 15 Oct 2004 13:10:05 -0700 Received: from orsmsx408.amr.corp.intel.com ([192.168.65.52]) by orsmsx332.amr.corp.intel.com with Microsoft SMTPSVC(6.0.3790.0); Fri, 15 Oct 2004 13:10:05 -0700 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Subject: RE: [Patch 12/16 2.5] ixgb: replace kmalloc with vmalloc to allocate driver local data structures Date: Fri, 15 Oct 2004 13:10:03 -0700 Message-ID: <468F3FDA28AA87429AD807992E22D07E02E6087C@orsmsx408> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [Patch 12/16 2.5] ixgb: replace kmalloc with vmalloc to allocate driver local data structures Thread-Index: AcSy1phBTlkAa6RRSuy/l0mQHNlhTwAHAgPg From: "Venkatesan, Ganesh" To: "Christian Borntraeger" Cc: , "netdev" X-OriginalArrivalTime: 15 Oct 2004 20:10:05.0118 (UTC) FILETIME=[F5EFCDE0:01C4B2F2] X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i9FKAQRl032471 X-archive-position: 10299 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 827 Lines: 30 Kmalloc resources are more scarce than vmalloc. In this case, there are systems where allocation of [rt]xdr->buffer_info fails when the descriptor ring sizes are set to the maximum allowable value (4096) and kmalloc is used. Using vmalloc solves this issue. Ganesh. -----Original Message----- From: Christian Borntraeger [mailto:linux-kernel@borntraeger.net] Sent: Friday, October 15, 2004 9:47 AM To: Venkatesan, Ganesh Cc: jgarzik@pobox.com; netdev Subject: Re: [Patch 12/16 2.5] ixgb: replace kmalloc with vmalloc to allocate driver local data structures Ganesh Venkatesan wrote: > - rxdr->buffer_info = kmalloc(size, GFP_KERNEL); [...] > + rxdr->buffer_info = vmalloc(size); What is the rationale for this change? If I recall correctly, Linus opposes the use of vmalloc if there is no real need. cheers Christian From dannydaemonic@gmail.com Fri Oct 15 14:07:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 14:07:40 -0700 (PDT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.202]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FL7ZrL001695 for ; Fri, 15 Oct 2004 14:07:35 -0700 Received: by mproxy.gmail.com with SMTP id 77so20487rnk for ; Fri, 15 Oct 2004 14:07:18 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=E7FxAJ8Gy+tsz1pZ4QUH0rjRYs1HMRAROd7pyoyYqJ6FhMRRwR0yjLtQCtuFWUa8HuNJ2mGIk5j1OzXjUQBJVCc42eH2djMpKMCdYBLvs8/rWpptnjvZZz0A8kBQkMf0wMJsAGnHJqDV0CjxUZTQVnXNjKRwNe+AHhPdwYWoh68 Received: by 10.38.14.39 with SMTP id 39mr154563rnn; Fri, 15 Oct 2004 14:07:17 -0700 (PDT) Received: by 10.38.150.66 with HTTP; Fri, 15 Oct 2004 14:07:17 -0700 (PDT) Message-ID: <9625752b04101514073f6dab24@mail.gmail.com> Date: Fri, 15 Oct 2004 14:07:17 -0700 From: Danny Reply-To: Danny To: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: mm kernel oops with r8169 & named, PREEMPT In-Reply-To: <20041015161818.GA2577@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <9625752b041012230068619e68@mail.gmail.com> <9625752b041013091772e26739@mail.gmail.com> <9625752b04101309182a96fbd2@mail.gmail.com> <200410131129.05657.jdmason@us.ltcfwd.linux.ibm.com> <20041013181840.GA30852@electric-eye.fr.zoreil.com> <9625752b04101313417be4cf90@mail.gmail.com> <20041013205433.GC30761@electric-eye.fr.zoreil.com> <9625752b04101314595f72f84a@mail.gmail.com> <9625752b04101415043a078b93@mail.gmail.com> <20041015161818.GA2577@electric-eye.fr.zoreil.com> X-archive-position: 10300 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dannydaemonic@gmail.com Precedence: bulk X-list: netdev Content-Length: 671 Lines: 16 On Fri, 15 Oct 2004 18:18:18 +0200, Francois Romieu wrote: > May be try this one first: > > http://www.uwsg.indiana.edu/hypermail/linux/kernel/0410.1/1920.html Thanks, that appears to have fixed it. I'm not getting an oops any more. I wish I hadn't assumed so much in my subject line, perhaps someone would have found the solution before John Flinchbaugh even reported his problem. Also posting the oops directly instead of linking to it probably allows people passing by to look at the oops, increasing the total number of eyes. I have a quick question though, if I'm using the kernel with all the debug features turned on, should I still run it through ksymoops? From akpm@osdl.org Fri Oct 15 14:15:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 14:15:08 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FLF3pw002141 for ; Fri, 15 Oct 2004 14:15:03 -0700 Received: from bix (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i9FLEa917966; Fri, 15 Oct 2004 14:14:36 -0700 Date: Fri, 15 Oct 2004 14:12:50 -0700 From: Andrew Morton To: Jeff Garzik Cc: linville@tuxdriver.com, linux-kernel@vger.kernel.org, netdev@oss.sgi.com, becker@scyld.com Subject: Re: [patch 2.6.9-rc3] 3c59x: reload EEPROM values at rmmod for needy cards Message-Id: <20041015141250.3920ab2f.akpm@osdl.org> In-Reply-To: <4170260D.9010905@pobox.com> References: <20040928145455.C12480@tuxdriver.com> <20040930091407.A10417@tuxdriver.com> <20041007134601.B29517@tuxdriver.com> <20041008123955.E14378@tuxdriver.com> <4170260D.9010905@pobox.com> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10301 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 Content-Length: 470 Lines: 16 Jeff Garzik wrote: > > John W. Linville wrote: > > Enable reload of EEPROM values in reset at rmmod for cards that need > > it, similar to old EEPROM_NORESET flag but in reverse. > > > > Signed-of-by: John W. Linville > > Andrew... ack/nak? I queued it up. > Seems OK to me, provided that it chills out in -mm for a while for > people to test. Yes, it takes some time for problems in this area to be shaken out. From bobwirka@rtcworks.com Fri Oct 15 14:31:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 14:31:20 -0700 (PDT) Received: from smtp814.mail.sc5.yahoo.com (smtp814.mail.sc5.yahoo.com [66.163.170.84]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9FLVFMm002735 for ; Fri, 15 Oct 2004 14:31:16 -0700 Received: from unknown (HELO ?192.168.1.97?) (bobwirka@ameritech.net@68.73.107.68 with plain) by smtp814.mail.sc5.yahoo.com with SMTP; 15 Oct 2004 21:31:01 -0000 Message-ID: <41704198.8000206@rtcworks.com> Date: Fri, 15 Oct 2004 16:31:04 -0500 From: Bob Wirka User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com Subject: NFS and Network Driver Question Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10302 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bobwirka@rtcworks.com Precedence: bulk X-list: netdev Content-Length: 910 Lines: 24 Hello, I'm trying to build a kernel that mounts a NFS root file system. This is an embedded system; it uses an SMSC LAN91C111 network chip that is hardwired to I/O addres 0x300 and IRQ 5. I've been using the driver (as supplied by SMSC) as a module, and it works fine. Now I'm trying to incorporate it into the kernel build so that I can mount an NFS file system when the system boots. I've added the source code to the kernel tree, and modified the Makefile(s) and Config.in files so that the driver <> to be compiled into the kernel. The kernel will load, but the chip is not initialized and the NFS fails. Since I don't know how to pass the io address and irq number to the kernel, I've hard-coded them into the driver's init function (which I don't see being called). If someone could point me in the right direction, I'd appreciate it. Thank you, Bob Wirka Realtime Control Works From rddunlap@osdl.org Fri Oct 15 14:59:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 14:59:44 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FLxbhZ003628 for ; Fri, 15 Oct 2004 14:59:38 -0700 Received: from [172.20.1.27] (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9FLxHWL031829 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Fri, 15 Oct 2004 14:59:17 -0700 Message-ID: <41704636.7040402@osdl.org> Date: Fri, 15 Oct 2004 14:50:46 -0700 From: "Randy.Dunlap" Organization: OSDL User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jeff Garzik CC: netdev , mlindner@syskonnect.de Subject: [PATCH] skfp: remove assignment expression in conditional (sparse)(v2) References: <4169BB68.7030206@osdl.org> <41702405.6070100@pobox.com> In-Reply-To: <41702405.6070100@pobox.com> Content-Type: multipart/mixed; boundary="------------000703060209030807000409" X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10303 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rddunlap@osdl.org Precedence: bulk X-list: netdev Content-Length: 1325 Lines: 48 This is a multi-part message in MIME format. --------------000703060209030807000409 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > I would prefer to fix a 'assignment expression in conditional' warning > by splitting the assignment and the test. > > Jeff OK, here you are. -- ~Randy --------------000703060209030807000409 Content-Type: text/x-patch; name="skfp_expr_v2.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="skfp_expr_v2.patch" Fix sparse warning: drivers/net/skfp/hwmtm.c:1904:20: warning: assignment expression in conditional Signed-off-by: Randy Dunlap diffstat:= drivers/net/skfp/hwmtm.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) diff -Naurp ./drivers/net/skfp/hwmtm.c~skfp_expr ./drivers/net/skfp/hwmtm.c --- ./drivers/net/skfp/hwmtm.c~skfp_expr 2004-08-13 22:36:59.000000000 -0700 +++ ./drivers/net/skfp/hwmtm.c 2004-10-15 14:47:41.942720928 -0700 @@ -1901,7 +1901,8 @@ void smt_send_mbuf(struct s_smc *smc, SM } if (!smc->hw.mac_ring_is_up || frag_count > queue->tx_free) { - if (frame_status &= ~LAN_TX) { + frame_status &= ~LAN_TX; + if (frame_status) { DB_TX("Ring is down: terminate LAN_TX",0,0,2) ; } else { --------------000703060209030807000409-- From shemminger@osdl.org Fri Oct 15 15:45:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 15:46:11 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FMjHQU004952 for ; Fri, 15 Oct 2004 15:45:23 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9FMiwWL002890 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 15 Oct 2004 15:44:58 -0700 Date: Fri, 15 Oct 2004 15:35:19 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc4] eql: use netdev_priv Message-Id: <20041015153519.6616db0d@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10316 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 Content-Length: 3250 Lines: 121 Use netdev_priv where possible. Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/eql.c b/drivers/net/eql.c --- a/drivers/net/eql.c 2004-10-15 14:26:15 -07:00 +++ b/drivers/net/eql.c 2004-10-15 14:26:15 -07:00 @@ -164,12 +164,12 @@ static void __init eql_setup(struct net_device *dev) { - equalizer_t *eql = dev->priv; + equalizer_t *eql = netdev_priv(dev); SET_MODULE_OWNER(dev); init_timer(&eql->timer); - eql->timer.data = (unsigned long) dev->priv; + eql->timer.data = (unsigned long) eql; eql->timer.expires = jiffies + EQL_DEFAULT_RESCHED_IVAL; eql->timer.function = eql_timer; @@ -197,7 +197,7 @@ static int eql_open(struct net_device *dev) { - equalizer_t *eql = dev->priv; + equalizer_t *eql = netdev_priv(dev); /* XXX We should force this off automatically for the user. */ printk(KERN_INFO "%s: remember to turn off Van-Jacobson compression on " @@ -241,7 +241,7 @@ static int eql_close(struct net_device *dev) { - equalizer_t *eql = dev->priv; + equalizer_t *eql = netdev_priv(dev); /* * The timer has to be stopped first before we start hacking away @@ -326,7 +326,7 @@ static int eql_slave_xmit(struct sk_buff *skb, struct net_device *dev) { - equalizer_t *eql = dev->priv; + equalizer_t *eql = netdev_priv(dev); slave_t *slave; spin_lock(&eql->queue.lock); @@ -352,7 +352,7 @@ static struct net_device_stats * eql_get_stats(struct net_device *dev) { - equalizer_t *eql = dev->priv; + equalizer_t *eql = netdev_priv(dev); return &eql->stats; } @@ -378,7 +378,7 @@ static inline int eql_is_full(slave_queue_t *queue) { - equalizer_t *eql = queue->master_dev->priv; + equalizer_t *eql = netdev_priv(queue->master_dev); if (queue->num_slaves >= eql->max_slaves) return 1; @@ -420,7 +420,7 @@ if (!eql_is_master(slave_dev) && !eql_is_slave(slave_dev)) { slave_t *s = kmalloc(sizeof(*s), GFP_KERNEL); - equalizer_t *eql = master_dev->priv; + equalizer_t *eql = netdev_priv(master_dev); int ret; if (!s) { @@ -453,7 +453,7 @@ static int eql_emancipate(struct net_device *master_dev, slaving_request_t __user *srqp) { - equalizer_t *eql = master_dev->priv; + equalizer_t *eql = netdev_priv(master_dev); struct net_device *slave_dev; slaving_request_t srq; int ret; @@ -485,7 +485,7 @@ static int eql_g_slave_cfg(struct net_device *dev, slave_config_t __user *scp) { - equalizer_t *eql = dev->priv; + equalizer_t *eql = netdev_priv(dev); slave_t *slave; struct net_device *slave_dev; slave_config_t sc; @@ -539,7 +539,7 @@ if (!slave_dev) return ret; - eql = dev->priv; + eql = netdev_priv(dev); spin_lock_bh(&eql->queue.lock); if (eql_is_slave(slave_dev)) { slave = __eql_find_slave_dev(&eql->queue, slave_dev); @@ -561,7 +561,7 @@ master_config_t mc; if (eql_is_master(dev)) { - eql = dev->priv; + eql = netdev_priv(dev); mc.max_slaves = eql->max_slaves; mc.min_slaves = eql->min_slaves; if (copy_to_user(mcp, &mc, sizeof (master_config_t))) @@ -580,7 +580,7 @@ return -EFAULT; if (eql_is_master(dev)) { - eql = dev->priv; + eql = netdev_priv(dev); eql->max_slaves = mc.max_slaves; eql->min_slaves = mc.min_slaves; return 0; From shemminger@osdl.org Fri Oct 15 15:45:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 15:45:23 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FMj9rf004906 for ; Fri, 15 Oct 2004 15:45:09 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9FMinWL002858 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 15 Oct 2004 15:44:50 -0700 Date: Fri, 15 Oct 2004 13:58:20 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc4 1/2] via-rhine: use module_param Message-Id: <20041015135820.19747027@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10309 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 Content-Length: 1027 Lines: 28 Use module_param here Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c --- a/drivers/net/via-rhine.c 2004-10-15 12:27:28 -07:00 +++ b/drivers/net/via-rhine.c 2004-10-15 12:27:28 -07:00 @@ -177,6 +177,7 @@ #define PKT_BUF_SZ 1536 /* Size of each temporary Rx buffer.*/ #include +#include #include #include #include @@ -226,9 +227,9 @@ MODULE_DESCRIPTION("VIA Rhine PCI Fast Ethernet driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(max_interrupt_work, "i"); -MODULE_PARM(debug, "i"); -MODULE_PARM(rx_copybreak, "i"); +module_param(max_interrupt_work, int, 0); +module_param(debug, int, 0); +module_param(rx_copybreak, int, 0); MODULE_PARM_DESC(max_interrupt_work, "VIA Rhine maximum events handled per interrupt"); MODULE_PARM_DESC(debug, "VIA Rhine debug level (0-7)"); MODULE_PARM_DESC(rx_copybreak, "VIA Rhine copy breakpoint for copy-only-tiny-frames"); From shemminger@osdl.org Fri Oct 15 15:45:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 15:46:12 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FMjFGs004938 for ; Fri, 15 Oct 2004 15:45:23 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9FMitWL002882 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 15 Oct 2004 15:44:56 -0700 Date: Fri, 15 Oct 2004 15:33:54 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc4] 8139too: use netdev_priv Message-Id: <20041015153354.0c007eae@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10320 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 Content-Length: 10149 Lines: 353 Use netdev_priv where appropriate, and get rid of "can't happen anymore" assert's. Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/8139too.c b/drivers/net/8139too.c --- a/drivers/net/8139too.c 2004-10-15 15:25:02 -07:00 +++ b/drivers/net/8139too.c 2004-10-15 15:25:02 -07:00 @@ -734,13 +734,10 @@ static void __rtl8139_cleanup_dev (struct net_device *dev) { - struct rtl8139_private *tp; + struct rtl8139_private *tp = netdev_priv(dev); struct pci_dev *pdev; assert (dev != NULL); - assert (dev->priv != NULL); - - tp = dev->priv; assert (tp->pci_dev != NULL); pdev = tp->pci_dev; @@ -792,7 +789,7 @@ *dev_out = NULL; - /* dev and dev->priv zeroed in alloc_etherdev */ + /* dev and priv zeroed in alloc_etherdev */ dev = alloc_etherdev (sizeof (*tp)); if (dev == NULL) { printk (KERN_ERR PFX "%s: Unable to alloc new net device\n", pci_name(pdev)); @@ -801,7 +798,7 @@ SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); - tp = dev->priv; + tp = netdev_priv(dev); tp->pci_dev = pdev; /* enable device (incl. PCI PM wakeup and hotplug setup) */ @@ -983,8 +980,8 @@ return i; assert (dev != NULL); - tp = dev->priv; - assert (tp != NULL); + tp = netdev_priv(dev); + ioaddr = tp->mmio_addr; assert (ioaddr != NULL); @@ -1017,8 +1014,8 @@ dev->irq = pdev->irq; - /* dev->priv/tp zeroed and aligned in alloc_etherdev */ - tp = dev->priv; + /* tp zeroed and aligned in alloc_etherdev */ + tp = netdev_priv(dev); /* note: tp->chipset set in rtl8139_init_board */ tp->drv_flags = board_info[ent->driver_data].hw_flags; @@ -1123,11 +1120,8 @@ static void __devexit rtl8139_remove_one (struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata (pdev); - struct rtl8139_private *np; assert (dev != NULL); - np = dev->priv; - assert (np != NULL); unregister_netdev (dev); @@ -1241,7 +1235,7 @@ static int mdio_read (struct net_device *dev, int phy_id, int location) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); int retval = 0; #ifdef CONFIG_8139TOO_8129 void *mdio_addr = tp->mmio_addr + Config4; @@ -1283,7 +1277,7 @@ static void mdio_write (struct net_device *dev, int phy_id, int location, int value) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); #ifdef CONFIG_8139TOO_8129 void *mdio_addr = tp->mmio_addr + Config4; int mii_cmd = (0x5002 << 16) | (phy_id << 23) | (location << 18) | value; @@ -1326,7 +1320,7 @@ static int rtl8139_open (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); int retval; void *ioaddr = tp->mmio_addr; @@ -1374,7 +1368,7 @@ static void rtl_check_media (struct net_device *dev, unsigned int init_media) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); if (tp->phys[0] >= 0) { mii_check_media(&tp->mii, netif_msg_link(tp), init_media); @@ -1384,7 +1378,7 @@ /* Start the hardware at open or resume. */ static void rtl8139_hw_start (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; u32 i; u8 tmp; @@ -1451,7 +1445,7 @@ /* Initialize the Rx and Tx rings, along with various 'dev' bits. */ static void rtl8139_init_ring (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); int i; tp->cur_rx = 0; @@ -1618,7 +1612,7 @@ static int rtl8139_thread (void *data) { struct net_device *dev = data; - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); unsigned long timeout; daemonize("%s", dev->name); @@ -1650,7 +1644,7 @@ static void rtl8139_start_thread(struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); tp->thr_pid = -1; tp->twistie = 0; @@ -1678,7 +1672,7 @@ static void rtl8139_tx_timeout (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; int i; u8 tmp8; @@ -1723,7 +1717,7 @@ static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; unsigned int entry; unsigned int len = skb->len; @@ -1771,7 +1765,6 @@ unsigned long dirty_tx, tx_left; assert (dev != NULL); - assert (tp != NULL); assert (ioaddr != NULL); dirty_tx = tp->dirty_tx; @@ -2130,7 +2123,7 @@ static int rtl8139_poll(struct net_device *dev, int *budget) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; int orig_budget = min(*budget, dev->quota); int done = 1; @@ -2168,7 +2161,7 @@ struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_instance; - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; u16 status, ackstat; int link_changed = 0; /* avoid bogus "uninit" warning */ @@ -2244,7 +2237,7 @@ static int rtl8139_close (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; int ret = 0; unsigned long flags; @@ -2307,7 +2300,7 @@ other threads or interrupts aren't messing with the 8139. */ static void rtl8139_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); void *ioaddr = np->mmio_addr; spin_lock_irq(&np->lock); @@ -2341,7 +2334,7 @@ aren't messing with the 8139. */ static int rtl8139_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); void *ioaddr = np->mmio_addr; u32 support; u8 cfg3, cfg5; @@ -2381,7 +2374,7 @@ static void rtl8139_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); strcpy(info->driver, DRV_NAME); strcpy(info->version, DRV_VERSION); strcpy(info->bus_info, pci_name(np->pci_dev)); @@ -2390,7 +2383,7 @@ static int rtl8139_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); spin_lock_irq(&np->lock); mii_ethtool_gset(&np->mii, cmd); spin_unlock_irq(&np->lock); @@ -2399,7 +2392,7 @@ static int rtl8139_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); int rc; spin_lock_irq(&np->lock); rc = mii_ethtool_sset(&np->mii, cmd); @@ -2409,25 +2402,25 @@ static int rtl8139_nway_reset(struct net_device *dev) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); return mii_nway_restart(&np->mii); } static u32 rtl8139_get_link(struct net_device *dev) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); return mii_link_ok(&np->mii); } static u32 rtl8139_get_msglevel(struct net_device *dev) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); return np->msg_enable; } static void rtl8139_set_msglevel(struct net_device *dev, u32 datum) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); np->msg_enable = datum; } @@ -2438,13 +2431,13 @@ #else static int rtl8139_get_regs_len(struct net_device *dev) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); return np->regs_len; } static void rtl8139_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *regbuf) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); regs->version = RTL_REGS_VER; @@ -2461,7 +2454,7 @@ static void rtl8139_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, u64 *data) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); data[0] = np->xstats.early_rx; data[1] = np->xstats.tx_buf_mapped; @@ -2493,7 +2486,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); int rc; if (!netif_running(dev)) @@ -2509,7 +2502,7 @@ static struct net_device_stats *rtl8139_get_stats (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; unsigned long flags; @@ -2528,7 +2521,7 @@ static void __set_rx_mode (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; u32 mc_filter[2]; /* Multicast hash filter */ int i, rx_mode; @@ -2577,7 +2570,7 @@ static void rtl8139_set_rx_mode (struct net_device *dev) { unsigned long flags; - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); spin_lock_irqsave (&tp->lock, flags); __set_rx_mode(dev); @@ -2589,7 +2582,7 @@ static int rtl8139_suspend (struct pci_dev *pdev, u32 state) { struct net_device *dev = pci_get_drvdata (pdev); - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; unsigned long flags; @@ -2621,7 +2614,7 @@ static int rtl8139_resume (struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata (pdev); - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); pci_restore_state (pdev, tp->pci_state); if (!netif_running (dev)) From shemminger@osdl.org Fri Oct 15 15:45:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 15:46:11 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FMjDhF004926 for ; Fri, 15 Oct 2004 15:45:23 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9FMirWL002874 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 15 Oct 2004 15:44:54 -0700 Date: Fri, 15 Oct 2004 15:32:30 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc4] dummy: use netdev_priv Message-Id: <20041015153230.60e718af@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10313 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 Content-Length: 683 Lines: 25 Can use netdev_priv in dummy device. Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/dummy.c b/drivers/net/dummy.c --- a/drivers/net/dummy.c 2004-10-15 14:25:11 -07:00 +++ b/drivers/net/dummy.c 2004-10-15 14:25:11 -07:00 @@ -77,7 +77,7 @@ static int dummy_xmit(struct sk_buff *skb, struct net_device *dev) { - struct net_device_stats *stats = dev->priv; + struct net_device_stats *stats = netdev_priv(dev); stats->tx_packets++; stats->tx_bytes+=skb->len; @@ -88,7 +88,7 @@ static struct net_device_stats *dummy_get_stats(struct net_device *dev) { - return dev->priv; + return netdev_priv(dev); } static struct net_device **dummies; From shemminger@osdl.org Fri Oct 15 15:45:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 15:46:12 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FMjKgK004963 for ; Fri, 15 Oct 2004 15:45:23 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9FMj1WL002918 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 15 Oct 2004 15:45:01 -0700 Date: Fri, 15 Oct 2004 13:53:53 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc4 1/2] typhoon: use module_param Message-Id: <20041015135353.53b1f263@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10319 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 Content-Length: 2020 Lines: 58 Use module_param Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c --- a/drivers/net/via-rhine.c 2004-10-15 12:27:28 -07:00 +++ b/drivers/net/via-rhine.c 2004-10-15 12:27:28 -07:00 @@ -177,6 +177,7 @@ #define PKT_BUF_SZ 1536 /* Size of each temporary Rx buffer.*/ #include +#include #include #include #include @@ -226,9 +227,9 @@ MODULE_DESCRIPTION("VIA Rhine PCI Fast Ethernet driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(max_interrupt_work, "i"); -MODULE_PARM(debug, "i"); -MODULE_PARM(rx_copybreak, "i"); +module_param(max_interrupt_work, int, 0); +module_param(debug, int, 0); +module_param(rx_copybreak, int, 0); MODULE_PARM_DESC(max_interrupt_work, "VIA Rhine maximum events handled per interrupt"); MODULE_PARM_DESC(debug, "VIA Rhine debug level (0-7)"); MODULE_PARM_DESC(rx_copybreak, "VIA Rhine copy breakpoint for copy-only-tiny-frames"); # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/15 12:46:45-07:00 shemminger@zqx3.pdx.osdl.net # use module_param # # drivers/net/typhoon.c # 2004/10/15 12:46:34-07:00 shemminger@zqx3.pdx.osdl.net +2 -1 # use module_param # diff -Nru a/drivers/net/typhoon.c b/drivers/net/typhoon.c --- a/drivers/net/typhoon.c 2004-10-15 12:46:59 -07:00 +++ b/drivers/net/typhoon.c 2004-10-15 12:46:59 -07:00 @@ -99,6 +99,7 @@ #define ERR_PFX KERN_ERR PFX #include +#include #include #include #include @@ -132,7 +133,7 @@ MODULE_AUTHOR("David Dillow "); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("3Com Typhoon Family (3C990, 3CR990, and variants)"); -MODULE_PARM(rx_copybreak, "i"); +module_param(rx_copybreak, int, 0); #if defined(NETIF_F_TSO) && MAX_SKB_FRAGS > 32 #warning Typhoon only supports 32 entries in its SG list for TSO, disabling TSO From shemminger@osdl.org Fri Oct 15 15:45:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 15:46:11 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FMjGKk004948 for ; Fri, 15 Oct 2004 15:45:23 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9FMivWL002886 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 15 Oct 2004 15:44:57 -0700 Date: Fri, 15 Oct 2004 13:48:18 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc4 2/3] tg3: use netdev_priv Message-Id: <20041015134818.306d8d14@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10317 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 Content-Length: 780 Lines: 25 use netdev_priv Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/tg3.c b/drivers/net/tg3.c --- a/drivers/net/tg3.c 2004-10-15 12:19:26 -07:00 +++ b/drivers/net/tg3.c 2004-10-15 12:19:26 -07:00 @@ -6323,7 +6323,7 @@ u32 offset, u32 *val); static int tg3_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, u8 *data) { - struct tg3 *tp = dev->priv; + struct tg3 *tp = netdev_priv(dev); int ret; u8 *pd; u32 i, offset, len, val, b_offset, b_count; @@ -6685,7 +6685,7 @@ static void tg3_get_ethtool_stats (struct net_device *dev, struct ethtool_stats *estats, u64 *tmp_stats) { - struct tg3 *tp = dev->priv; + struct tg3 *tp = netdev_priv(dev); memcpy(tmp_stats, tg3_get_estats(tp), sizeof(tp->estats)); } From shemminger@osdl.org Fri Oct 15 15:45:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 15:45:30 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FMjBhm004916 for ; Fri, 15 Oct 2004 15:45:11 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9FMipWL002866 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 15 Oct 2004 15:44:52 -0700 Date: Fri, 15 Oct 2004 13:58:27 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc4 2/2] via-rhine: free_ring should be static Message-Id: <20041015135827.2b1da377@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10311 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 Content-Length: 440 Lines: 16 free_ring is a local function Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c --- a/drivers/net/via-rhine.c 2004-10-15 12:45:02 -07:00 +++ b/drivers/net/via-rhine.c 2004-10-15 12:45:02 -07:00 @@ -948,7 +948,7 @@ return 0; } -void free_ring(struct net_device* dev) +static void free_ring(struct net_device* dev) { struct rhine_private *rp = netdev_priv(dev); From shemminger@osdl.org Fri Oct 15 15:45:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 15:46:11 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FMjMcC004967 for ; Fri, 15 Oct 2004 15:45:23 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9FMj2WL002928 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 15 Oct 2004 15:45:02 -0700 Date: Fri, 15 Oct 2004 15:38:04 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc4 2/2] r8169: use netdev_priv Message-Id: <20041015153804.4ff3fca6@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10315 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 Content-Length: 650 Lines: 25 Use netdev_priv in a couple of places in realtek 8169 Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/r8169.c b/drivers/net/r8169.c --- a/drivers/net/r8169.c 2004-10-15 15:00:43 -07:00 +++ b/drivers/net/r8169.c 2004-10-15 15:00:43 -07:00 @@ -1119,7 +1119,7 @@ SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); - tp = dev->priv; + tp = netdev_priv(dev); // enable device (incl. PCI PM wakeup and hotplug setup) rc = pci_enable_device(pdev); @@ -1270,7 +1270,7 @@ if (rc) return rc; - tp = dev->priv; + tp = netdev_priv(dev); assert(ioaddr != NULL); if (RTL_R8(PHYstatus) & TBI_Enable) { From shemminger@osdl.org Fri Oct 15 15:45:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 15:45:11 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FMj4Si004898 for ; Fri, 15 Oct 2004 15:45:04 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9FMiiWL002838 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 15 Oct 2004 15:44:45 -0700 Date: Fri, 15 Oct 2004 13:55:41 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc4 2/2] typhoon: use netdev_priv Message-Id: <20041015135541.435cfe39@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10304 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 Content-Length: 552 Lines: 16 Use netdev_priv instead of dev->priv Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/typhoon.c b/drivers/net/typhoon.c --- a/drivers/net/typhoon.c 2004-10-15 12:56:42 -07:00 +++ b/drivers/net/typhoon.c 2004-10-15 12:56:42 -07:00 @@ -1778,7 +1778,7 @@ typhoon_interrupt(int irq, void *dev_instance, struct pt_regs *rgs) { struct net_device *dev = (struct net_device *) dev_instance; - struct typhoon *tp = dev->priv; + struct typhoon *tp = netdev_priv(dev); void __iomem *ioaddr = tp->ioaddr; u32 intr_status; From shemminger@osdl.org Fri Oct 15 15:45:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 15:45:17 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FMj5GW004899 for ; Fri, 15 Oct 2004 15:45:05 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9FMijWL002842 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 15 Oct 2004 15:44:46 -0700 Date: Fri, 15 Oct 2004 15:44:00 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc4 2/3] ns83820: move eeprom.h and clean up Message-Id: <20041015154400.11611d9b@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10305 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 Content-Length: 6157 Lines: 258 The file linux/eeprom.h was only being used by the ns83820 driver, and it contained non-inline functions in a .h file. This patch fixes that and: * Only two functions are actually used (and only used once) so ditch the rest and make those inline. * EEprom is in iomemory space so get rid of the warnings. Compiles but I don't have this hardware, so it has not been tested. Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/ns83820.c b/drivers/net/ns83820.c --- a/drivers/net/ns83820.c 2004-10-15 15:30:10 -07:00 +++ b/drivers/net/ns83820.c 2004-10-15 15:30:10 -07:00 @@ -107,7 +107,6 @@ #include #include /* for iph */ #include /* for IPPROTO_... */ -#include #include #include #include @@ -118,6 +117,8 @@ #include #include +#include "ns83820_eeprom.h" + #define DRV_NAME "ns83820" /* Global parameters. See module_param near the bottom. */ @@ -1897,8 +1898,8 @@ dev->IMR_cache = 0; - setup_ee_mem_bitbanger(&dev->ee, (long)dev->base + MEAR, 3, 2, 1, 0, - 0); + setup_ee_mem_bitbanger(&dev->ee, (void __iomem *)dev->base + MEAR, + 3, 2, 1, 0, 0); err = request_irq(pci_dev->irq, ns83820_irq, SA_SHIRQ, DRV_NAME, ndev); diff -Nru a/drivers/net/ns83820_eeprom.h b/drivers/net/ns83820_eeprom.h --- /dev/null Wed Dec 31 16:00:00 196900 +++ b/drivers/net/ns83820_eeprom.h 2004-10-15 15:30:10 -07:00 @@ -0,0 +1,72 @@ +/* credit winbond-840.c + */ +#include +struct eeprom_ops { + void (*set_cs)(void *ee); + void (*clear_cs)(void *ee); +}; + +#define EEPOL_EEDI 0x01 +#define EEPOL_EEDO 0x02 +#define EEPOL_EECLK 0x04 +#define EEPOL_EESEL 0x08 + +struct eeprom { + void *dev; + struct eeprom_ops *ops; + + void __iomem *addr; + + unsigned ee_addr_bits; + + unsigned eesel; + unsigned eeclk; + unsigned eedo; + unsigned eedi; + unsigned polarity; + unsigned ee_state; + + spinlock_t *lock; + u32 *cache; +}; + +/* The EEPROM commands include the alway-set leading bit. */ +enum EEPROM_Cmds { + EE_WriteCmd=(5 << 6), EE_ReadCmd=(6 << 6), EE_EraseCmd=(7 << 6), +}; + +static inline void setup_ee_mem_bitbanger(struct eeprom *ee, + void __iomem *memaddr, + int eesel_bit, int eeclk_bit, + int eedo_bit, int eedi_bit, + unsigned polarity) +{ + ee->addr = memaddr; + ee->eesel = 1 << eesel_bit; + ee->eeclk = 1 << eeclk_bit; + ee->eedo = 1 << eedo_bit; + ee->eedi = 1 << eedi_bit; + + ee->polarity = polarity; + + *ee->cache = readl(ee->addr); +} + +/* foo. put this in a .c file */ +static inline void eeprom_update(struct eeprom *ee, u32 mask, int pol) +{ + unsigned long flags; + u32 data; + + spin_lock_irqsave(ee->lock, flags); + data = *ee->cache; + + data &= ~mask; + if (pol) + data |= mask; + + *ee->cache = data; +//printk("update: %08x\n", data); + writel(data, ee->addr); + spin_unlock_irqrestore(ee->lock, flags); +} diff -Nru a/include/linux/eeprom.h b/include/linux/eeprom.h --- a/include/linux/eeprom.h 2004-10-15 15:30:10 -07:00 +++ /dev/null Wed Dec 31 16:00:00 196900 @@ -1,136 +0,0 @@ -/* credit winbond-840.c - */ -#include -struct eeprom_ops { - void (*set_cs)(void *ee); - void (*clear_cs)(void *ee); -}; - -#define EEPOL_EEDI 0x01 -#define EEPOL_EEDO 0x02 -#define EEPOL_EECLK 0x04 -#define EEPOL_EESEL 0x08 - -struct eeprom { - void *dev; - struct eeprom_ops *ops; - - long addr; - - unsigned ee_addr_bits; - - unsigned eesel; - unsigned eeclk; - unsigned eedo; - unsigned eedi; - unsigned polarity; - unsigned ee_state; - - spinlock_t *lock; - u32 *cache; -}; - - -u8 eeprom_readb(struct eeprom *ee, unsigned address); -void eeprom_read(struct eeprom *ee, unsigned address, u8 *bytes, - unsigned count); -void eeprom_writeb(struct eeprom *ee, unsigned address, u8 data); -void eeprom_write(struct eeprom *ee, unsigned address, u8 *bytes, - unsigned count); - -/* The EEPROM commands include the alway-set leading bit. */ -enum EEPROM_Cmds { - EE_WriteCmd=(5 << 6), EE_ReadCmd=(6 << 6), EE_EraseCmd=(7 << 6), -}; - -void setup_ee_mem_bitbanger(struct eeprom *ee, long memaddr, int eesel_bit, int eeclk_bit, int eedo_bit, int eedi_bit, unsigned polarity) -{ - ee->addr = memaddr; - ee->eesel = 1 << eesel_bit; - ee->eeclk = 1 << eeclk_bit; - ee->eedo = 1 << eedo_bit; - ee->eedi = 1 << eedi_bit; - - ee->polarity = polarity; - - *ee->cache = readl(ee->addr); -} - -/* foo. put this in a .c file */ -static inline void eeprom_update(struct eeprom *ee, u32 mask, int pol) -{ - unsigned long flags; - u32 data; - - spin_lock_irqsave(ee->lock, flags); - data = *ee->cache; - - data &= ~mask; - if (pol) - data |= mask; - - *ee->cache = data; -//printk("update: %08x\n", data); - writel(data, ee->addr); - spin_unlock_irqrestore(ee->lock, flags); -} - -void eeprom_clk_lo(struct eeprom *ee) -{ - int pol = !!(ee->polarity & EEPOL_EECLK); - - eeprom_update(ee, ee->eeclk, pol); - udelay(2); -} - -void eeprom_clk_hi(struct eeprom *ee) -{ - int pol = !!(ee->polarity & EEPOL_EECLK); - - eeprom_update(ee, ee->eeclk, !pol); - udelay(2); -} - -void eeprom_send_addr(struct eeprom *ee, unsigned address) -{ - int pol = !!(ee->polarity & EEPOL_EEDI); - unsigned i; - address |= 6 << 6; - - /* Shift the read command bits out. */ - for (i=0; i<11; i++) { - eeprom_update(ee, ee->eedi, ((address >> 10) & 1) ^ pol); - address <<= 1; - eeprom_clk_hi(ee); - eeprom_clk_lo(ee); - } - eeprom_update(ee, ee->eedi, pol); -} - -u16 eeprom_readw(struct eeprom *ee, unsigned address) -{ - unsigned i; - u16 res = 0; - - eeprom_clk_lo(ee); - eeprom_update(ee, ee->eesel, 1 ^ !!(ee->polarity & EEPOL_EESEL)); - eeprom_send_addr(ee, address); - - for (i=0; i<16; i++) { - u32 data; - eeprom_clk_hi(ee); - res <<= 1; - data = readl(ee->addr); -//printk("eeprom_readw: %08x\n", data); - res |= !!(data & ee->eedo) ^ !!(ee->polarity & EEPOL_EEDO); - eeprom_clk_lo(ee); - } - eeprom_update(ee, ee->eesel, 0 ^ !!(ee->polarity & EEPOL_EESEL)); - - return res; -} - - -void eeprom_writeb(struct eeprom *ee, unsigned address, u8 data) -{ -} From shemminger@osdl.org Fri Oct 15 15:45:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 15:45:22 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FMj8pS004905 for ; Fri, 15 Oct 2004 15:45:08 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9FMinWL002854 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 15 Oct 2004 15:44:49 -0700 Date: Fri, 15 Oct 2004 13:03:08 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc4 2/2] b44: use netdev_priv Message-Id: <20041015130308.2965d8b3@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10308 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 Content-Length: 752 Lines: 25 Replace uses of dev->priv with netdev_priv Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/b44.c b/drivers/net/b44.c --- a/drivers/net/b44.c 2004-10-15 12:23:59 -07:00 +++ b/drivers/net/b44.c 2004-10-15 12:23:59 -07:00 @@ -1885,7 +1885,7 @@ static int b44_suspend(struct pci_dev *pdev, u32 state) { struct net_device *dev = pci_get_drvdata(pdev); - struct b44 *bp = dev->priv; + struct b44 *bp = netdev_priv(dev); if (!netif_running(dev)) return 0; @@ -1906,7 +1906,7 @@ static int b44_resume(struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); - struct b44 *bp = dev->priv; + struct b44 *bp = netdev_priv(dev); pci_restore_state(pdev, bp->pci_cfg_state); From shemminger@osdl.org Fri Oct 15 15:45:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 15:46:11 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FMjJ2K004953 for ; Fri, 15 Oct 2004 15:45:23 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9FMixWL002894 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 15 Oct 2004 15:44:59 -0700 Date: Fri, 15 Oct 2004 13:50:05 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc4 3/3] tg3: make driver only data static Message-Id: <20041015135005.6bf68ee3@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10314 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 Content-Length: 1879 Lines: 54 Several data structures should have been marked static because the are local to this driver. Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/tg3.c b/drivers/net/tg3.c --- a/drivers/net/tg3.c 2004-10-15 12:57:56 -07:00 +++ b/drivers/net/tg3.c 2004-10-15 12:57:56 -07:00 @@ -224,8 +224,8 @@ MODULE_DEVICE_TABLE(pci, tg3_pci_tbl); -struct { - char string[ETH_GSTRING_LEN]; +static struct { + const char string[ETH_GSTRING_LEN]; } ethtool_stats_keys[TG3_NUM_STATS] = { { "rx_octets" }, { "rx_fragments" }, @@ -4504,7 +4504,7 @@ 0xac470014, 0xac4a0018, 0x03e00008, 0xac4b001c, 0x00000000, 0x00000000, }; -u32 tg3TsoFwRodata[] = { +static u32 tg3TsoFwRodata[] = { 0x4d61696e, 0x43707542, 0x00000000, 0x4d61696e, 0x43707541, 0x00000000, 0x00000000, 0x00000000, 0x73746b6f, 0x66666c64, 0x496e0000, 0x73746b6f, 0x66662a2a, 0x00000000, 0x53774576, 0x656e7430, 0x00000000, 0x00000000, @@ -4512,7 +4512,7 @@ 0x00000000, }; -u32 tg3TsoFwData[] = { +static u32 tg3TsoFwData[] = { 0x00000000, 0x73746b6f, 0x66666c64, 0x5f76312e, 0x362e3000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, @@ -4693,14 +4693,14 @@ 0x00000000, 0x00000000, 0x00000000, }; -u32 tg3Tso5FwRodata[(TG3_TSO5_FW_RODATA_LEN / 4) + 1] = { +static u32 tg3Tso5FwRodata[(TG3_TSO5_FW_RODATA_LEN / 4) + 1] = { 0x4d61696e, 0x43707542, 0x00000000, 0x4d61696e, 0x43707541, 0x00000000, 0x00000000, 0x00000000, 0x73746b6f, 0x66666c64, 0x00000000, 0x00000000, 0x73746b6f, 0x66666c64, 0x00000000, 0x00000000, 0x66617461, 0x6c457272, 0x00000000, 0x00000000, 0x00000000, }; -u32 tg3Tso5FwData[(TG3_TSO5_FW_DATA_LEN / 4) + 1] = { +static u32 tg3Tso5FwData[(TG3_TSO5_FW_DATA_LEN / 4) + 1] = { 0x00000000, 0x73746b6f, 0x66666c64, 0x5f76312e, 0x322e3000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; From shemminger@osdl.org Fri Oct 15 15:45:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 15:46:11 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FMjNT7004978 for ; Fri, 15 Oct 2004 15:45:24 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9FMj3WL002939 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 15 Oct 2004 15:45:04 -0700 Date: Fri, 15 Oct 2004 15:40:06 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc4 1/3] ns83820: use module_param Message-Id: <20041015154006.432602a6@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10321 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 Content-Length: 1216 Lines: 41 Replace MODULE_PARM with module_param Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/ns83820.c b/drivers/net/ns83820.c --- a/drivers/net/ns83820.c 2004-10-15 15:05:25 -07:00 +++ b/drivers/net/ns83820.c 2004-10-15 15:05:25 -07:00 @@ -96,6 +96,7 @@ #include #include +#include #include #include #include @@ -119,7 +120,7 @@ #define DRV_NAME "ns83820" -/* Global parameters. See MODULE_PARM near the bottom. */ +/* Global parameters. See module_param near the bottom. */ static int ihr = 2; static int reset_phy = 0; static int lnksts = 0; /* CFG_LNKSTS bit polarity */ @@ -2209,13 +2210,13 @@ MODULE_DEVICE_TABLE(pci, ns83820_pci_tbl); -MODULE_PARM(lnksts, "i"); +module_param(lnksts, int, 0); MODULE_PARM_DESC(lnksts, "Polarity of LNKSTS bit"); -MODULE_PARM(ihr, "i"); +module_param(ihr, int, 0); MODULE_PARM_DESC(ihr, "Time in 100 us increments to delay interrupts (range 0-127)"); -MODULE_PARM(reset_phy, "i"); +module_param(reset_phy, int, 0); MODULE_PARM_DESC(reset_phy, "Set to 1 to reset the PHY on startup"); module_init(ns83820_init); From shemminger@osdl.org Fri Oct 15 15:45:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 15:45:23 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FMjAJr004911 for ; Fri, 15 Oct 2004 15:45:10 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9FMioWL002862 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 15 Oct 2004 15:44:51 -0700 Date: Fri, 15 Oct 2004 13:04:28 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc4 1/2] slip: use module_param Message-Id: <20041015130428.76eef1c3@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10310 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 Content-Length: 836 Lines: 26 Replace MODULE_PARM with module_param (also make slip_maxdev static). Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/slip.c b/drivers/net/slip.c --- a/drivers/net/slip.c 2004-10-15 12:34:30 -07:00 +++ b/drivers/net/slip.c 2004-10-15 12:34:30 -07:00 @@ -57,6 +57,7 @@ #define SL_CHECK_TRANSMIT #include #include +#include #include #include @@ -85,8 +86,8 @@ static struct net_device **slip_devs; -int slip_maxdev = SL_NRUNIT; /* Can be overridden with insmod! */ -MODULE_PARM(slip_maxdev, "i"); +static int slip_maxdev = SL_NRUNIT; +module_param(slip_maxdev, int, 0); MODULE_PARM_DESC(slip_maxdev, "Maximum number of slip devices"); static int slip_esc(unsigned char *p, unsigned char *d, int len); From shemminger@osdl.org Fri Oct 15 15:45:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 15:45:21 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FMj64j004902 for ; Fri, 15 Oct 2004 15:45:06 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9FMikWL002846 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 15 Oct 2004 15:44:47 -0700 Date: Fri, 15 Oct 2004 15:45:20 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc4 3/3] ns83820: use netdev_priv properly Message-Id: <20041015154520.3f0b3ac9@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10306 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 Content-Length: 7145 Lines: 250 Replace ugly local inline with call to netdev_priv. Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/ns83820.c b/drivers/net/ns83820.c --- a/drivers/net/ns83820.c 2004-10-15 15:30:43 -07:00 +++ b/drivers/net/ns83820.c 2004-10-15 15:30:43 -07:00 @@ -482,16 +482,11 @@ struct timer_list tx_watchdog; }; -static inline struct ns83820 *PRIV(struct net_device *dev) -{ - return netdev_priv(dev); -} - #define __kick_rx(dev) writel(CR_RXE, dev->base + CR) static inline void kick_rx(struct net_device *ndev) { - struct ns83820 *dev = PRIV(ndev); + struct ns83820 *dev = netdev_priv(ndev); dprintk("kick_rx: maybe kicking\n"); if (test_and_clear_bit(0, &dev->rx_info.idle)) { dprintk("actually kicking\n"); @@ -513,7 +508,7 @@ #ifdef NS83820_VLAN_ACCEL_SUPPORT static void ns83820_vlan_rx_register(struct net_device *ndev, struct vlan_group *grp) { - struct ns83820 *dev = PRIV(ndev); + struct ns83820 *dev = netdev_priv(ndev); spin_lock_irq(&dev->misc_lock); spin_lock(&dev->tx_lock); @@ -526,7 +521,7 @@ static void ns83820_vlan_rx_kill_vid(struct net_device *ndev, unsigned short vid) { - struct ns83820 *dev = PRIV(ndev); + struct ns83820 *dev = netdev_priv(ndev); spin_lock_irq(&dev->misc_lock); spin_lock(&dev->tx_lock); @@ -602,7 +597,7 @@ static inline int rx_refill(struct net_device *ndev, int gfp) { - struct ns83820 *dev = PRIV(ndev); + struct ns83820 *dev = netdev_priv(ndev); unsigned i; unsigned long flags = 0; @@ -652,7 +647,7 @@ static inline void queue_refill(void *_dev) { struct net_device *ndev = _dev; - struct ns83820 *dev = PRIV(ndev); + struct ns83820 *dev = netdev_priv(ndev); rx_refill(ndev, GFP_KERNEL); if (dev->rx_info.up) @@ -667,7 +662,7 @@ static void FASTCALL(phy_intr(struct net_device *ndev)); static void fastcall phy_intr(struct net_device *ndev) { - struct ns83820 *dev = PRIV(ndev); + struct ns83820 *dev = netdev_priv(ndev); static char *speeds[] = { "10", "100", "1000", "1000(?)", "1000F" }; u32 cfg, new_cfg; u32 tbisr, tanar, tanlpar; @@ -762,7 +757,7 @@ static int ns83820_setup_rx(struct net_device *ndev) { - struct ns83820 *dev = PRIV(ndev); + struct ns83820 *dev = netdev_priv(ndev); unsigned i; int ret; @@ -854,7 +849,7 @@ static void FASTCALL(ns83820_rx_kick(struct net_device *ndev)); static void fastcall ns83820_rx_kick(struct net_device *ndev) { - struct ns83820 *dev = PRIV(ndev); + struct ns83820 *dev = netdev_priv(ndev); /*if (nr_rx_empty(dev) >= NR_RX_DESC/4)*/ { if (dev->rx_info.up) { rx_refill_atomic(ndev); @@ -876,7 +871,7 @@ static void FASTCALL(rx_irq(struct net_device *ndev)); static void fastcall rx_irq(struct net_device *ndev) { - struct ns83820 *dev = PRIV(ndev); + struct ns83820 *dev = netdev_priv(ndev); struct rx_info *info = &dev->rx_info; unsigned next_rx; int rx_rc, len; @@ -988,7 +983,7 @@ static void rx_action(unsigned long _dev) { struct net_device *ndev = (void *)_dev; - struct ns83820 *dev = PRIV(ndev); + struct ns83820 *dev = netdev_priv(ndev); rx_irq(ndev); writel(ihr, dev->base + IHR); @@ -1015,7 +1010,7 @@ */ static void do_tx_done(struct net_device *ndev) { - struct ns83820 *dev = PRIV(ndev); + struct ns83820 *dev = netdev_priv(ndev); u32 cmdsts, tx_done_idx, *desc; spin_lock_irq(&dev->tx_lock); @@ -1107,7 +1102,7 @@ */ static int ns83820_hard_start_xmit(struct sk_buff *skb, struct net_device *ndev) { - struct ns83820 *dev = PRIV(ndev); + struct ns83820 *dev = netdev_priv(ndev); u32 free_idx, cmdsts, extsts; int nr_free, nr_frags; unsigned tx_done_idx, last_idx; @@ -1264,7 +1259,7 @@ static struct net_device_stats *ns83820_get_stats(struct net_device *ndev) { - struct ns83820 *dev = PRIV(ndev); + struct ns83820 *dev = netdev_priv(ndev); /* somewhat overkill */ spin_lock_irq(&dev->misc_lock); @@ -1276,7 +1271,7 @@ static void ns83820_get_drvinfo(struct net_device *ndev, struct ethtool_drvinfo *info) { - struct ns83820 *dev = PRIV(ndev); + struct ns83820 *dev = netdev_priv(ndev); strcpy(info->driver, "ns83820"); strcpy(info->version, VERSION); strcpy(info->bus_info, pci_name(dev->pci_dev)); @@ -1284,7 +1279,7 @@ static u32 ns83820_get_link(struct net_device *ndev) { - struct ns83820 *dev = PRIV(ndev); + struct ns83820 *dev = netdev_priv(ndev); u32 cfg = readl(dev->base + CFG) ^ SPDSTS_POLARITY; return cfg & CFG_LNKSTS ? 1 : 0; } @@ -1305,7 +1300,7 @@ static irqreturn_t ns83820_irq(int foo, void *data, struct pt_regs *regs) { struct net_device *ndev = data; - struct ns83820 *dev = PRIV(ndev); + struct ns83820 *dev = netdev_priv(ndev); u32 isr; dprintk("ns83820_irq(%p)\n", ndev); @@ -1319,7 +1314,7 @@ static void ns83820_do_isr(struct net_device *ndev, u32 isr) { - struct ns83820 *dev = PRIV(ndev); + struct ns83820 *dev = netdev_priv(ndev); #ifdef DEBUG if (isr & ~(ISR_PHY | ISR_RXDESC | ISR_RXEARLY | ISR_RXOK | ISR_RXERR | ISR_TXIDLE | ISR_TXOK | ISR_TXDESC)) Dprintk("odd isr? 0x%08x\n", isr); @@ -1435,7 +1430,7 @@ static int ns83820_stop(struct net_device *ndev) { - struct ns83820 *dev = PRIV(ndev); + struct ns83820 *dev = netdev_priv(ndev); /* FIXME: protect against interrupt handler? */ del_timer_sync(&dev->tx_watchdog); @@ -1464,7 +1459,7 @@ static void ns83820_tx_timeout(struct net_device *ndev) { - struct ns83820 *dev = PRIV(ndev); + struct ns83820 *dev = netdev_priv(ndev); u32 tx_done_idx, *desc; unsigned long flags; @@ -1501,7 +1496,7 @@ static void ns83820_tx_watch(unsigned long data) { struct net_device *ndev = (void *)data; - struct ns83820 *dev = PRIV(ndev); + struct ns83820 *dev = netdev_priv(ndev); #if defined(DEBUG) printk("ns83820_tx_watch: %u %u %d\n", @@ -1523,7 +1518,7 @@ static int ns83820_open(struct net_device *ndev) { - struct ns83820 *dev = PRIV(ndev); + struct ns83820 *dev = netdev_priv(ndev); unsigned i; u32 desc; int ret; @@ -1593,7 +1588,7 @@ static void ns83820_set_multicast(struct net_device *ndev) { - struct ns83820 *dev = PRIV(ndev); + struct ns83820 *dev = netdev_priv(ndev); u8 *rfcr = dev->base + RFCR; u32 and_mask = 0xffffffff; u32 or_mask = 0; @@ -1619,7 +1614,7 @@ static void ns83820_run_bist(struct net_device *ndev, const char *name, u32 enable, u32 done, u32 fail) { - struct ns83820 *dev = PRIV(ndev); + struct ns83820 *dev = netdev_priv(ndev); int timed_out = 0; long start; u32 status; @@ -1779,7 +1774,7 @@ static void ns83820_probe_phy(struct net_device *ndev) { - struct ns83820 *dev = PRIV(ndev); + struct ns83820 *dev = netdev_priv(ndev); static int first; int i; #define MII_PHYIDR1 0x02 @@ -1852,7 +1847,7 @@ } ndev = alloc_etherdev(sizeof(struct ns83820)); - dev = PRIV(ndev); + dev = netdev_priv(ndev); err = -ENOMEM; if (!dev) goto out; @@ -2156,7 +2151,7 @@ static void __devexit ns83820_remove_one(struct pci_dev *pci_dev) { struct net_device *ndev = pci_get_drvdata(pci_dev); - struct ns83820 *dev = PRIV(ndev); /* ok even if NULL */ + struct ns83820 *dev = netdev_priv(ndev); /* ok even if NULL */ if (!ndev) /* paranoia */ return; From shemminger@osdl.org Fri Oct 15 15:45:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 15:46:12 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FMjCfN004921 for ; Fri, 15 Oct 2004 15:45:23 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9FMiqWL002870 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 15 Oct 2004 15:44:53 -0700 Date: Fri, 15 Oct 2004 13:05:39 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc4 2/2] slip: use netdev_priv Message-Id: <20041015130539.00e6776c@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10322 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 Content-Length: 3608 Lines: 157 Replace dev->priv with netdev_priv(dev) Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/slip.c b/drivers/net/slip.c --- a/drivers/net/slip.c 2004-10-15 12:35:54 -07:00 +++ b/drivers/net/slip.c 2004-10-15 12:35:54 -07:00 @@ -459,13 +459,11 @@ static void sl_tx_timeout(struct net_device *dev) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); spin_lock(&sl->lock); if (netif_queue_stopped(dev)) { - struct slip *sl = (struct slip*)(dev->priv); - if (!netif_running(dev)) goto out; @@ -495,7 +493,7 @@ static int sl_xmit(struct sk_buff *skb, struct net_device *dev) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); spin_lock(&sl->lock); if (!netif_running(dev)) { @@ -529,7 +527,7 @@ static int sl_close(struct net_device *dev) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); spin_lock_bh(&sl->lock); if (sl->tty) { @@ -548,7 +546,7 @@ static int sl_open(struct net_device *dev) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); if (sl->tty==NULL) return -ENODEV; @@ -562,7 +560,7 @@ static int sl_change_mtu(struct net_device *dev, int new_mtu) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); if (new_mtu < 68 || new_mtu > 65534) return -EINVAL; @@ -578,7 +576,7 @@ sl_get_stats(struct net_device *dev) { static struct net_device_stats stats; - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); #ifdef SL_INCLUDE_CSLIP struct slcompress *comp; #endif @@ -613,7 +611,7 @@ static int sl_init(struct net_device *dev) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); /* * Finish setting up the DEVICE info. @@ -631,7 +629,7 @@ static void sl_uninit(struct net_device *dev) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); sl_free_bufs(sl); } @@ -720,7 +718,7 @@ if ((dev = slip_devs[i]) == NULL) break; - sl = dev->priv; + sl = netdev_priv(dev); if (sl->tty || sl->leased) continue; if (dev->flags&IFF_UP) @@ -747,7 +745,7 @@ if (dev == NULL) break; - sl = dev->priv; + sl = netdev_priv(dev); if (sl->leased) { if (sl->line != line) continue; @@ -789,7 +787,7 @@ i = sel; dev = slip_devs[i]; if (score > 1) { - sl = dev->priv; + sl = netdev_priv(dev); sl->flags &= (1 << SLF_INUSE); return sl; } @@ -800,7 +798,7 @@ return NULL; if (dev) { - sl = dev->priv; + sl = netdev_priv(dev); if (test_bit(SLF_INUSE, &sl->flags)) { unregister_netdevice(dev); dev = NULL; @@ -818,7 +816,7 @@ dev->base_addr = i; } - sl = dev->priv; + sl = netdev_priv(dev); /* Initialize channel control data */ sl->magic = SLIP_MAGIC; @@ -1261,7 +1259,7 @@ static int sl_ioctl(struct net_device *dev,struct ifreq *rq,int cmd) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); unsigned long *p = (unsigned long *)&rq->ifr_ifru; if (sl == NULL) /* Allocation failed ?? */ @@ -1407,7 +1405,7 @@ dev = slip_devs[i]; if (!dev) continue; - sl = dev->priv; + sl = netdev_priv(dev); spin_lock_bh(&sl->lock); if (sl->tty) { busy++; @@ -1424,7 +1422,7 @@ continue; slip_devs[i] = NULL; - sl = dev->priv; + sl = netdev_priv(dev); if (sl->tty) { printk(KERN_ERR "%s: tty discipline still running\n", dev->name); From shemminger@osdl.org Fri Oct 15 15:45:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 15:46:11 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FMjJfx004957 for ; Fri, 15 Oct 2004 15:45:23 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9FMj0WL002905 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 15 Oct 2004 15:45:00 -0700 Date: Fri, 15 Oct 2004 15:36:37 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc4 1/2] r8169: use module_param Message-Id: <20041015153637.15739e5a@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10318 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 Content-Length: 1149 Lines: 36 Use module_param instead of deprecated MDOULE_PARM Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/r8169.c b/drivers/net/r8169.c --- a/drivers/net/r8169.c 2004-10-15 14:56:05 -07:00 +++ b/drivers/net/r8169.c 2004-10-15 14:56:05 -07:00 @@ -44,6 +44,7 @@ */ #include +#include #include #include #include @@ -93,6 +94,7 @@ /* media options */ #define MAX_UNITS 8 static int media[MAX_UNITS] = { -1, -1, -1, -1, -1, -1, -1, -1 }; +static int num_media = 0; /* Maximum events (Rx packets, etc.) to handle at each interrupt. */ static int max_interrupt_work = 20; @@ -405,9 +407,9 @@ MODULE_AUTHOR("Realtek"); MODULE_DESCRIPTION("RealTek RTL-8169 Gigabit Ethernet driver"); -MODULE_PARM(media, "1-" __MODULE_STRING(MAX_UNITS) "i"); -MODULE_PARM(rx_copybreak, "i"); -MODULE_PARM(use_dac, "i"); +module_param_array(media, int, num_media, 0); +module_param(rx_copybreak, int, 0); +module_param(use_dac, int, 0); MODULE_PARM_DESC(use_dac, "Enable PCI DAC. Unsafe on 32 bit PCI slot."); MODULE_LICENSE("GPL"); From shemminger@osdl.org Fri Oct 15 15:45:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 15:45:22 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FMj7e9004903 for ; Fri, 15 Oct 2004 15:45:07 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9FMimWL002850 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 15 Oct 2004 15:44:48 -0700 Date: Fri, 15 Oct 2004 13:02:57 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc4 1/2] b44: replace MODULE_PARM Message-Id: <20041015130257.4035b65c@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10307 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 Content-Length: 1010 Lines: 28 Replace MODULE_PARM with module_param Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/b44.c b/drivers/net/b44.c --- a/drivers/net/b44.c 2004-10-15 12:23:11 -07:00 +++ b/drivers/net/b44.c 2004-10-15 12:23:11 -07:00 @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -79,10 +80,10 @@ MODULE_AUTHOR("Florian Schirmer, Pekka Pietikainen, David S. Miller"); MODULE_DESCRIPTION("Broadcom 4400 10/100 PCI ethernet driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(b44_debug, "i"); -MODULE_PARM_DESC(b44_debug, "B44 bitmapped debugging message enable value"); static int b44_debug = -1; /* -1 == use B44_DEF_MSG_ENABLE as value */ +module_param(b44_debug, int, 0); +MODULE_PARM_DESC(b44_debug, "B44 bitmapped debugging message enable value"); static struct pci_device_id b44_pci_tbl[] = { { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_BCM4401, From shemminger@osdl.org Fri Oct 15 15:45:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 15:46:11 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FMjEX0004927 for ; Fri, 15 Oct 2004 15:45:23 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9FMisWL002878 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 15 Oct 2004 15:44:55 -0700 Date: Fri, 15 Oct 2004 13:44:52 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc4 1/3] tg3: use module_param Message-Id: <20041015134452.08fccaf8@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10312 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 Content-Length: 1036 Lines: 29 get rid of deprecated use of MODULE_PARM Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/tg3.c b/drivers/net/tg3.c --- a/drivers/net/tg3.c 2004-10-15 12:19:54 -07:00 +++ b/drivers/net/tg3.c 2004-10-15 12:19:54 -07:00 @@ -12,7 +12,7 @@ #include #include - +#include #include #include #include @@ -141,10 +141,10 @@ MODULE_AUTHOR("David S. Miller (davem@redhat.com) and Jeff Garzik (jgarzik@pobox.com)"); MODULE_DESCRIPTION("Broadcom Tigon3 ethernet driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(tg3_debug, "i"); -MODULE_PARM_DESC(tg3_debug, "Tigon3 bitmapped debugging message enable value"); static int tg3_debug = -1; /* -1 == use TG3_DEF_MSG_ENABLE as value */ +module_param(tg3_debug, int, 0); +MODULE_PARM_DESC(tg3_debug, "Tigon3 bitmapped debugging message enable value"); static struct pci_device_id tg3_pci_tbl[] = { { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5700, From raghavendra.koushik@s2io.com Fri Oct 15 16:15:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 16:15:32 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FNFQgW011766 for ; Fri, 15 Oct 2004 16:15:27 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9FNEvje006322; Fri, 15 Oct 2004 19:14:57 -0400 (EDT) Received: from rkoushik ([10.16.16.150]) by guinness.s2io.com (8.12.6/8.12.6) with ESMTP id i9FNEs39016702; Fri, 15 Oct 2004 19:14:55 -0400 (EDT) Message-Id: <200410152314.i9FNEs39016702@guinness.s2io.com> From: "Raghavendra Koushik" To: "'Jeff Garzik'" , "'Leonid Grossman'" Cc: "'Chris Leech'" , , "'Francois Romieu'" , , Subject: RE: [PATCH 2.6.9-rc2 8/8] S2io: two buffer mode Date: Fri, 15 Oct 2004 16:14:49 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Thread-Index: AcSy53Jq086kYiA2SbGuPqD/j8iuGwAIXf0A In-Reply-To: <41701B3C.8020006@pobox.com> X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10323 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: raghavendra.koushik@s2io.com Precedence: bulk X-list: netdev Content-Length: 1246 Lines: 39 Jeff, In this submission I'll use copy for 2Buff mode, but continue to debug the fragmented skb Rx. If we do get it working sometime, I'll submit another patch to update the driver. Is this Ok? - Koushik > -----Original Message----- > From: Jeff Garzik [mailto:jgarzik@pobox.com] > Sent: Friday, October 15, 2004 11:47 AM > To: Leonid Grossman > Cc: 'Raghavendra Koushik'; 'Chris Leech'; ravinandan.arakali@s2io.com; > 'Francois Romieu'; netdev@oss.sgi.com; rapuru.sriram@s2io.com > Subject: Re: [PATCH 2.6.9-rc2 8/8] S2io: two buffer mode > > Leonid Grossman wrote: > > "fragmented SKB on Rx" is an old problem - we tried to deploy 2 and 5 > > buffer Xframe modes before and it did not work in Linux. > > Is anyone aware of any network driver that successfully uses fragmented > > SKBs? > > Raghavendra Koushik wrote: > > I did try fragmented SKB on Rx but it didn't seem to work. If any one > can > > give me some pointers on how to get this working, I would implement > 2Buff > > mode using this method and avoid a copy in fast path. > > > > My suggestion would be to investigate why fragmented SKBs don't work ;-) > > The source code is all there, debug away... > > If S2IO can fix this, a lot of people will benefit. > > Jeff From garzik@havoc.gtf.org Fri Oct 15 16:16:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 16:16:25 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [69.28.190.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FNGKdP011954 for ; Fri, 15 Oct 2004 16:16:20 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id F22677A54; Fri, 15 Oct 2004 19:15:57 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i9FNFvwP026917; Fri, 15 Oct 2004 19:15:57 -0400 Date: Fri, 15 Oct 2004 19:15:57 -0400 From: Jeff Garzik To: Raghavendra Koushik Cc: "'Leonid Grossman'" , "'Chris Leech'" , ravinandan.arakali@s2io.com, "'Francois Romieu'" , netdev@oss.sgi.com, rapuru.sriram@s2io.com Subject: Re: [PATCH 2.6.9-rc2 8/8] S2io: two buffer mode Message-ID: <20041015231557.GA26909@havoc.gtf.org> References: <41701B3C.8020006@pobox.com> <200410152314.i9FNEs39016702@guinness.s2io.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410152314.i9FNEs39016702@guinness.s2io.com> User-Agent: Mutt/1.4.1i X-archive-position: 10324 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: 303 Lines: 13 On Fri, Oct 15, 2004 at 04:14:49PM -0700, Raghavendra Koushik wrote: > Jeff, > In this submission I'll use copy for 2Buff mode, but continue to debug the > fragmented skb Rx. If we do get it working sometime, I'll submit another > patch to update the driver. Is this Ok? Sounds good to me. Jeff From jgarzik@pobox.com Fri Oct 15 16:18:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 16:18:49 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FNIihP012463 for ; Fri, 15 Oct 2004 16:18:44 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIbLB-0002ic-Av; Sat, 16 Oct 2004 00:18:29 +0100 Message-ID: <41705AB7.7030405@pobox.com> Date: Fri, 15 Oct 2004 19:18:15 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephen Hemminger CC: netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc4 1/2] b44: replace MODULE_PARM References: <20041015130257.4035b65c@zqx3.pdx.osdl.net> In-Reply-To: <20041015130257.4035b65c@zqx3.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10325 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: 14 Lines: 2 applied both From jgarzik@pobox.com Fri Oct 15 16:23:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 16:23:33 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FNNSWg016075 for ; Fri, 15 Oct 2004 16:23:28 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIbPl-0002v9-UT; Sat, 16 Oct 2004 00:23:14 +0100 Message-ID: <41705BD6.7040601@pobox.com> Date: Fri, 15 Oct 2004 19:23:02 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephen Hemminger CC: netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc4 2/2] r8169: use netdev_priv References: <20041015153804.4ff3fca6@zqx3.pdx.osdl.net> In-Reply-To: <20041015153804.4ff3fca6@zqx3.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10326 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: 28 Lines: 2 applied both r8169 patches From jgarzik@pobox.com Fri Oct 15 16:26:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 16:26:17 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FNQCmF016423 for ; Fri, 15 Oct 2004 16:26:12 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIbSP-000304-GW; Sat, 16 Oct 2004 00:25:57 +0100 Message-ID: <41705C79.8020200@pobox.com> Date: Fri, 15 Oct 2004 19:25:45 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephen Hemminger CC: netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc4] 8139too: use netdev_priv References: <20041015153354.0c007eae@zqx3.pdx.osdl.net> In-Reply-To: <20041015153354.0c007eae@zqx3.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10327 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: 9 Lines: 2 applied From greearb@candelatech.com Fri Oct 15 16:28:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 16:28:11 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FNS4as016763 for ; Fri, 15 Oct 2004 16:28:04 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i9FNXoLH013593; Fri, 15 Oct 2004 16:33:50 -0700 Message-ID: <41705CF2.9050303@candelatech.com> Date: Fri, 15 Oct 2004 16:27:46 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Linux 802.1Q VLAN" , pavlic@de.ibm.com, netdev@oss.sgi.com, "David S. Miller" Subject: FWD: setting skb->dev to vlan device in vlan_hwaccel_rx is wrong ... References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10328 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Content-Length: 4029 Lines: 150 Earlier, Frank had written as explanation: > Hi , > I found a problem using vlan_hwaccel_rx function to pass skb to the stack. > vlan_hwaccel_rx sets skb->dev to the vlan device accordingly to the vlan > id. > After checking pkt_type netif_rx is called in non polling mode . vlan_skb_recv > is called with a wrong skb->dev setting as the receive function is still > expecting the real device .... , the problem also exists in 2.4 vlan code ... I am not so sure we need this patch, as I believe the net_rx_skb methods should handle receiving a pkt with a vlan-device as the skb->dev. Frank, could you explain the problem you see in more detail? Dave, since you did the hw-accel work, what do you think of this patch? Frank Pavlic wrote: > Kernel 2.6.8.1 .... > > I'm sorry about 2.4 kernel it was an old one ..., but nevertheless 2.4.27 > hasn't the bug fixed yet .. > > patch for Kernel 2.4.27 : > > --- include/linux/if_vlan.old 2004-04-14 15:05:40.000000000 +0200 > +++ include/linux/if_vlan.h 2004-10-15 17:16:09.000000000 +0200 > @@ -183,7 +183,7 @@ > skb->pkt_type = PACKET_HOST; > break; > }; > - > + skb->dev = skb->real_dev; > return (polling ? netif_receive_skb(skb) : netif_rx(skb)); > } > > > > > > > Ben Greear > Sent by: vlan-bounces@candelatech.com > 14.10.2004 19:07 > Please respond to > "Linux 802.1Q VLAN" > > > To > "Linux 802.1Q VLAN" > cc > > Subject > Re: [VLAN] |PATCH| setting skb->dev to vlan device in > vlan_hwaccel_rx is wrong ... > > > > > > > Frank Pavlic wrote: > >>IHi , >>I found a problem using vlan_hwaccel_rx function to pass skb to the > > stack. > >>vlan_hwaccel_rx sets skb->dev to the vlan device accordingly to the vlan > > >>id. >>After checking pkt_type netif_rx is called in non polling mode . >>vlan_skb_recv >>is called with a wrong skb->dev setting as the receive function is still > > >>expecting >>the real device .... , the problem also exists in 2.4 vlan code ... > > > While looking at the 2.4.27 code, I think that this fix may > already be in. > > 2.6.7 also looks correct. > > What versions did you base these patches off of? > > Ben > > >>Frank >> >>Kernel 2.6: >> >>Index: include/linux/if_vlan.h >>=================================================================== >>RCS file: /home/cvs/linux-2.5/include/linux/if_vlan.h,v >>retrieving revision 1.10 >>diff -B -u -b -r1.10 if_vlan.h >>--- include/linux/if_vlan.h 17 Aug 2004 11:50:08 -0000 1.10 >>+++ include/linux/if_vlan.h 14 Oct 2004 13:43:58 -0000 >>@@ -184,7 +184,7 @@ >> skb->pkt_type = PACKET_HOST; >> break; >> }; >>- >>+ skb->dev = skb->real_dev; >> return (polling ? netif_receive_skb(skb) : netif_rx(skb)); >> } >> >>KERNEL > 2.4.21: >> >>Index: include/linux/if_vlan.h >>=================================================================== >>RCS file: /home/cvs/linux-2.3/include/linux/if_vlan.h,v >>retrieving revision 1.6 >>diff -B -u -b -r1.6 if_vlan.h >>--- include/linux/if_vlan.h 17 Feb 2003 10:36:43 -0000 1.6 >>+++ include/linux/if_vlan.h 14 Oct 2004 13:45:39 -0000 >>@@ -147,6 +147,7 @@ >> unsigned short vlan_tag, int > > polling) > >> { >> struct net_device_stats *stats; >>+ struct net_device *real_dev = skb->dev; >> >> skb->dev = grp->vlan_devices[vlan_tag & VLAN_VID_MASK]; >> if (skb->dev == NULL) { >>@@ -182,7 +183,7 @@ >> skb->pkt_type = PACKET_HOST; >> break; >> }; >>- >>+ skb->dev = real_dev; >> return (polling ? netif_receive_skb(skb) : netif_rx(skb)); >> } >>_______________________________________________ >>Vlan mailing list >>Vlan@lanforge.com >>http://www.lanforge.com/mailman/listinfo/vlan -- Ben Greear Candela Technologies Inc http://www.candelatech.com From jgarzik@pobox.com Fri Oct 15 16:43:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 16:44:02 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FNhvhu017339 for ; Fri, 15 Oct 2004 16:43:58 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIbja-0003cK-UJ; Sat, 16 Oct 2004 00:43:43 +0100 Message-ID: <417060A2.9060207@pobox.com> Date: Fri, 15 Oct 2004 19:43:30 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephen Hemminger CC: netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc4 1/3] ns83820: use module_param References: <20041015154006.432602a6@zqx3.pdx.osdl.net> In-Reply-To: <20041015154006.432602a6@zqx3.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10329 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: 9 Lines: 2 applied From jgarzik@pobox.com Fri Oct 15 16:44:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 16:44:54 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FNimic017551 for ; Fri, 15 Oct 2004 16:44:49 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIbkQ-0003cy-5d; Sat, 16 Oct 2004 00:44:34 +0100 Message-ID: <417060D6.3080100@pobox.com> Date: Fri, 15 Oct 2004 19:44:22 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephen Hemminger CC: netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc4 2/3] ns83820: move eeprom.h and clean up References: <20041015154400.11611d9b@zqx3.pdx.osdl.net> In-Reply-To: <20041015154400.11611d9b@zqx3.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10330 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: 661 Lines: 21 Stephen Hemminger wrote: > The file linux/eeprom.h was only being used by the ns83820 driver, > and it contained non-inline functions in a .h file. This patch > fixes that and: > * Only two functions are actually used (and only used once) > so ditch the rest and make those inline. > * EEprom is in iomemory space so get rid of the warnings. > > Compiles but I don't have this hardware, so it has not been tested. > > Signed-off-by: Stephen Hemminger actually, Ben's idea with linux/eeprom.h was to stop duplicating the same eeprom logic in each driver, and centralize it instead. Did you look at trying to do that? Jeff From jgarzik@pobox.com Fri Oct 15 16:45:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 16:46:04 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FNjxmr018023 for ; Fri, 15 Oct 2004 16:45:59 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIblY-0003eb-Iq; Sat, 16 Oct 2004 00:45:44 +0100 Message-ID: <4170611C.6090200@pobox.com> Date: Fri, 15 Oct 2004 19:45:32 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephen Hemminger CC: netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc4] eql: use netdev_priv References: <20041015153519.6616db0d@zqx3.pdx.osdl.net> In-Reply-To: <20041015153519.6616db0d@zqx3.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10331 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: 50 Lines: 2 applied this and 'dummy use netdev_priv' patches From jgarzik@pobox.com Fri Oct 15 16:47:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 16:47:49 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FNlipK018358 for ; Fri, 15 Oct 2004 16:47:44 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIbnF-0003fp-Ot; Sat, 16 Oct 2004 00:47:29 +0100 Message-ID: <41706186.5090904@pobox.com> Date: Fri, 15 Oct 2004 19:47:18 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephen Hemminger CC: netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc4 1/2] typhoon: use module_param References: <20041015135353.53b1f263@zqx3.pdx.osdl.net> In-Reply-To: <20041015135353.53b1f263@zqx3.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10332 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: 194 Lines: 9 looks like the via-rhine patch got sucked into this one. can you retransmit -just- the typhoon module_param patch, it looks like somebody else already got to netdev_priv in typhoon. Jeff From jgarzik@pobox.com Fri Oct 15 16:50:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 16:50:43 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FNoc1Z018719 for ; Fri, 15 Oct 2004 16:50:39 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIbq3-0003iN-UR; Sat, 16 Oct 2004 00:50:24 +0100 Message-ID: <41706232.7050603@pobox.com> Date: Fri, 15 Oct 2004 19:50:10 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephen Hemminger CC: netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc4 1/2] via-rhine: use module_param References: <20041015135820.19747027@zqx3.pdx.osdl.net> In-Reply-To: <20041015135820.19747027@zqx3.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10333 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: 14 Lines: 2 applied both From jgarzik@pobox.com Fri Oct 15 16:52:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 16:52:58 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FNqsK3019077 for ; Fri, 15 Oct 2004 16:52:54 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIbsF-0003rk-Ia; Sat, 16 Oct 2004 00:52:39 +0100 Message-ID: <417062BB.1090302@pobox.com> Date: Fri, 15 Oct 2004 19:52:27 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephen Hemminger CC: netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc4 1/3] tg3: use module_param References: <20041015134452.08fccaf8@zqx3.pdx.osdl.net> In-Reply-To: <20041015134452.08fccaf8@zqx3.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10334 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: 19 Lines: 2 applied all three From jgarzik@pobox.com Fri Oct 15 16:54:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 16:54:29 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FNsMwh019413 for ; Fri, 15 Oct 2004 16:54:24 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIbtf-0003xn-Or; Sat, 16 Oct 2004 00:54:07 +0100 Message-ID: <41706313.2070403@pobox.com> Date: Fri, 15 Oct 2004 19:53:55 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephen Hemminger CC: netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc4 1/2] slip: use module_param References: <20041015130428.76eef1c3@zqx3.pdx.osdl.net> In-Reply-To: <20041015130428.76eef1c3@zqx3.pdx.osdl.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10335 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: 14 Lines: 2 applied both From jgarzik@pobox.com Fri Oct 15 16:55:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 16:55:22 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9FNtI7H019834 for ; Fri, 15 Oct 2004 16:55:18 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CIbuZ-00041J-Hg; Sat, 16 Oct 2004 00:55:03 +0100 Message-ID: <4170634B.9010507@pobox.com> Date: Fri, 15 Oct 2004 19:54:51 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Randy.Dunlap" CC: netdev , mlindner@syskonnect.de Subject: Re: [PATCH] skfp: remove assignment expression in conditional (sparse)(v2) References: <4169BB68.7030206@osdl.org> <41702405.6070100@pobox.com> <41704636.7040402@osdl.org> In-Reply-To: <41704636.7040402@osdl.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10336 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: 9 Lines: 2 applied From garzik@havoc.gtf.org Fri Oct 15 18:00:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 15 Oct 2004 18:01:05 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [69.28.190.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9G10tZT021349 for ; Fri, 15 Oct 2004 18:00:56 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id 70C267A6F; Fri, 15 Oct 2004 21:00:36 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i9G10ams032258; Fri, 15 Oct 2004 21:00:36 -0400 Date: Fri, 15 Oct 2004 21:00:36 -0400 From: Jeff Garzik To: netdev@oss.sgi.com Subject: netdev-2.6 queue updated Message-ID: <20041016010036.GA32213@havoc.gtf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.4.1i X-archive-position: 10337 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: 13698 Lines: 357 BK users: bk pull bk://gkernel.bkbits.net/netdev-2.6 Patch: http://www.kernel.org/pub/linux/kernel/people/jgarzik/patchkits/2.6/2.6.9-rc4-bk3-netdev3.patch.bz2 This will update the following files: arch/cris/arch-v10/drivers/ethernet.c | 140 +--- drivers/ieee1394/eth1394.c | 95 -- drivers/media/dvb/dvb-core/dvb_net.c | 9 drivers/net/3c509.c | 151 +--- drivers/net/3c59x.c | 2 drivers/net/8139cp.c | 102 ++- drivers/net/8139too.c | 97 +-- drivers/net/Kconfig | 45 - drivers/net/acenic.c | 171 ++--- drivers/net/acenic.h | 23 drivers/net/acenic_firmware.h | 2 drivers/net/amd8111e.c | 278 +++----- drivers/net/amd8111e.h | 2 drivers/net/atp.c | 2 drivers/net/b44.c | 131 ++-- drivers/net/b44.h | 113 --- drivers/net/defxx.c | 144 ++-- drivers/net/defxx.h | 2 drivers/net/dl2k.c | 267 +++----- drivers/net/dummy.c | 4 drivers/net/e100.c | 38 - drivers/net/e1000/e1000.h | 2 drivers/net/e1000/e1000_ethtool.c | 13 drivers/net/e1000/e1000_hw.c | 128 +++- drivers/net/e1000/e1000_main.c | 43 - drivers/net/e1000/e1000_osdep.h | 6 drivers/net/e1000/e1000_param.c | 167 +++-- drivers/net/eepro100.c | 425 +++++-------- drivers/net/eql.c | 26 drivers/net/ewrk3.c | 326 ++++------ drivers/net/forcedeth.c | 142 +--- drivers/net/hamachi.c | 157 ++-- drivers/net/hamradio/hdlcdrv.c | 2 drivers/net/ibmlana.c | 9 drivers/net/iseries_veth.c | 81 -- drivers/net/ixgb/ixgb_ethtool.c | 494 +++++---------- drivers/net/ixgb/ixgb_main.c | 67 -- drivers/net/mac8390.c | 4 drivers/net/meth.c | 26 drivers/net/natsemi.c | 273 +++----- drivers/net/ne2k-pci.c | 31 drivers/net/ns83820.c | 182 +++-- drivers/net/pcmcia/smc91c92_cs.c | 181 ++--- drivers/net/pcnet32.c | 6 drivers/net/r8169.c | 832 +++++++++++++++++++------- drivers/net/sis900.c | 276 ++++---- drivers/net/sk_mca.c | 9 drivers/net/skfp/hwmtm.c | 3 drivers/net/slip.c | 39 - drivers/net/smc91x.c | 484 ++++++++------- drivers/net/smc91x.h | 76 +- drivers/net/starfire.c | 191 ++--- drivers/net/sundance.c | 187 ++--- drivers/net/tg3.c | 22 drivers/net/tokenring/olympic.c | 1 drivers/net/tulip/de2104x.c | 3 drivers/net/tulip/de4x5.c | 2 drivers/net/tulip/tulip_core.c | 55 - drivers/net/tulip/winbond-840.c | 2 drivers/net/tulip/xircom_cb.c | 14 drivers/net/tulip/xircom_tulip_cb.c | 194 ++---- drivers/net/typhoon.c | 232 +++---- drivers/net/via-rhine.c | 9 drivers/net/wan/lmc/lmc_main.c | 9 drivers/net/wireless/airo.c | 45 - drivers/net/wireless/netwave_cs.c | 12 drivers/net/wireless/prism54/isl_38xx.c | 15 drivers/net/wireless/prism54/isl_38xx.h | 4 drivers/net/wireless/prism54/isl_ioctl.c | 639 +++++++++++++++++-- drivers/net/wireless/prism54/isl_ioctl.h | 2 drivers/net/wireless/prism54/isl_oid.h | 9 drivers/net/wireless/prism54/islpci_dev.c | 49 + drivers/net/wireless/prism54/islpci_dev.h | 4 drivers/net/wireless/prism54/islpci_eth.c | 5 drivers/net/wireless/prism54/islpci_hotplug.c | 3 drivers/net/wireless/prism54/islpci_mgt.c | 1 drivers/net/wireless/prism54/islpci_mgt.h | 2 drivers/net/wireless/prism54/oid_mgt.c | 126 +++ drivers/net/wireless/prism54/oid_mgt.h | 5 drivers/net/wireless/wavelan.c | 19 drivers/net/wireless/wavelan.p.h | 3 drivers/net/wireless/wavelan_cs.c | 181 ++--- drivers/net/wireless/wavelan_cs.p.h | 3 drivers/net/wireless/wl3501_cs.c | 53 - drivers/net/yellowfin.c | 62 - drivers/usb/gadget/ether.c | 73 -- drivers/usb/net/catc.c | 122 +-- drivers/usb/net/kaweth.c | 34 - drivers/usb/net/pegasus.c | 297 +++------ drivers/usb/net/rtl8150.c | 186 ++--- include/linux/netdevice.h | 4 include/linux/pci_ids.h | 3 include/linux/wireless.h | 64 +- include/net/iw_handler.h | 60 + net/core/dev.c | 2 net/core/wireless.c | 210 ++++-- net/irda/irlan/irlan_client.c | 2 97 files changed, 5021 insertions(+), 4527 deletions(-) through these ChangeSets: : o [netdrvr b44] clean up SiliconBackplane definitions/functions o [netdrvr b44] ignore carrier lost errors : o netpoll with xircom_cb : o [netdrvr 8139cp] add PCI ID : o janitor: net/tulip: pci_find_device to pci_dev_present o janitor: net/sis900: pci_find_device to pci_get_device Adrian Bunk: o net/tokenring/olympic.c: remove unused variable Alexander Viro: o amd8111e iomem annotations o iomem annotations in r8169 o (27/27) catc ethtool conversion o (26/27) kaweth ethtool conversion o (25/27) pegasus ethtool conversion o (24/27) rtl8150 ethtool conversion o (23/27) gadget ethtool conversion o (22/27) amd8111e ethtool conversion o (21/27) dl2k ethtool conversion o (20/27) eepro100 ethtool conversion o (19/27) ewrk3 ethtool conversion o (18/27) forcedeth ethtool conversion o (17/27) hamachi ethtool conversion o (16/27) veth ethtool conversion o (15/27) natsemi ethtool conversion o (14/27) ns83820 ethtool conversion o (13/27) starfire ethtool conversion o (12/27) sundance ethtool conversion o (11/27) typhoon ethtool conversion o (10/27) yellowfin ethtool conversion o (9/27) wl3501_cs ethtool conversion o (8/27) wavelan ethtool conversion o (7/27) xircom ethtool conversion o (6/27) tulip ethtool conversion o (5/27) smc91c92_cs ethtool conversion o (4/27) 3c509 ethtool conversion o (3/27) ixgb ethtool conversion o (2/27) cris ethtool conversion o (1/27) eth1394 ethtool conversion o [netdrvr starfire] use netdev_priv o [netdrvr starfire] fix unregister_netdev call site o [netdrvr] use netdev_priv in dl2k, hamachi o [netdrvr] netdev_priv for sundance, typhoon, yellowfin o [netdrvr] netdev_priv for ewrk3, xircom_tulip_cb, wavelan_cs o [netdrvr usb] use netdev_priv o [netdrvr eth1394] use netdev_priv Andrew Morton: o e1000 sparc64 dma_mapping build fix o igxb speedup o pegasus.c fixes o de4x5 warning fix Anton Blanchard: o fix acenic hotplug Con Kolivas: o b44poll - whitespace o netconsole support for b44 Daniele Venzano: o [netdrvr sis900] whitespace and codingstyle updates David Dillow: o PCI cleanups and convert to ethtool_ops David S. Miller: o eepro100.c iomap conversion Felipe Damasio: o 8139cp net driver: add MODULE_VERSION François Romieu: o r8169: cleanup o r8169: rtl8169_close() races o r8169: automatic pci dac step down o r8169: wrong advertisement of VLAN features o r8169: Tx timeout rework o via-velocity: wrong module name in Kconfig documentation o r8169: default on disabling PCIDAC o r8169: Mac identifier extracted from Realtek's driver v2.2 o r8169: TSO support o r8169: hint for Tx flow control o r8169: miscalculation of available Tx descriptors o 8139cp: SG support fixes o r8169: vlan support o r8169: Rx checksum support o r8169: advertise DMA to high memory o r8169: Tx checksum offload o r8169: comment a gcc 2.95.x bug o r8169: sync the names of a few bits with the 8139cp driver o r8169: bump version number o r8169: enable MWI o r8169: code cleanup o r8169: per device receive buffer size o r8169: add ethtool_ops.{get_regs_len/get_regs} Ganesh Venkatesan: o ixgb: Condition that determines when to quit polling o ixgb: Fix memory leak in NAPI mode. Avoid unnecessary o ixgb: Fix VLAN filter setup errors (while running o e1000: white space corrections o e1000: driver version update o e1000: fix set ringparam for ethtool returning error code on bad input o e1000: remove unused function e1000_enable_mng_pass_thru o e1000: modified ethtool_set_pauseparam to use e1000_setup_link for flow control settings for fiber serdes link o e1000 update -- fix MODULE_PARM, module_param, module_param_array o e1000 - Ethtool -- 82545 do not support WoL o e1000 - Polarity reversal workaround for 10F/10H links o e1000 - Fix VLAN filter setup errors (while running on PPC) o e1000 Check value returned by from pci_enable_device o e1000 - Removed support for advanced TCO features o e1000 - use pci_device_name for syslog messages till registering netdevice. o e100 driver version number update o e100 - use NET_IP_ALIGN to set rx data buffer alignment o e100 - Use pci_device_name for syslog messages till registering netdevice Hirokazu Takata: o m32r: trivial fix of smc91x.h Jean Tourrilhes: o WE-17 typo fix o wireless-drivers-update-for-we-17.patch o wireless-extension-v17-for-linus.patch Jeff Garzik: o Hand-merge typhoon conflicts o [netdrvr eepro100] fix pci_iomap() args and info msg that follows o [netdrvr b44] update MODULE_AUTHORS o [netdrvr 8139cp] TSO support o [netdev] Remove no-op in-driver implementations of ->set_config() Jesse Brandeburg: o e100: whitespace and DPRINTKS o e100: fix NAPI race with watchdog o ixgb: fix endianness issue for tx cleanup John W. Linville: o 3c59x: style change in vortex_ethtool_ops declaration Kenji Kaneshige: o add missing pci_disable_device for e1000 Maciej W. Rozycki: o defxx device name fixes o defxx trivial updates Manfred Spraul: o rx checksum support for gige nForce ethernet Marc Singer: o adding smc91x ethernet to lpd7a40x Margit Schubert-While: o prism54 bug initialization/mgt_commit o prism54 print firmware version o prism54 Bug in timeout scheduling o prism54 remove TRACE o prism54 fix wpa_supplicant frequency parsing o prism54 initial WPA support o prism54 add WE17 support o prism54 remove module params o prism54 Code cleanup Mika Kukkonen: o sparse: fix warnings in net/irda/* Neil Horman: o ns83820: add vlan tag hardware acceleration support Nicolas Pitre: o smc91x: release on-chip RX packet memory ASAP o smc91x: receives two bytes too many o smc91x: fix compilation with DMA on PXA2xx o smc91x: more SMP locking fixes o smc91x: fix SMP lock usage o smc91x: cosmetics o smc91x: straighten SMP locking o smc91x: display pertinent register values from the timeout function o smc91x: fix possible leak of the skb waiting for mem allocation o smc91x: use a work queue to reconfigure the phy from smc_timeout() o smc91x: move TX processing out of IRQ context entirely o smc91x: simplify register bank usage o smc91x: fold smc_setmulticast() into smc_set_multicast_list() o smc91x: set the MAC addr from the smc_enable function o smc91x: Assorted minor cleanups o smc91x: Revert 1.1923.3.58: "m32r: modify drivers/net/smc91x.c for m32r" Nishanth Aravamudan: o net/de2104x: replace schedule_timeout() with msleep() Olaf Hering: o remove old version check from mac8390 Pavel Machek: o swsuspend for ne2k-pci cards Pekka Pietikäinen: o b44: use bounce buffers to workaround chip DMA bug/limitations Ralf Bächle: o Stop queue on close in hdlcdrv Randy Dunlap: o skfp: remove assignment expression in conditional (sparse)(v2) o pcnet32: use unsigned 1-bit fields Rene Herman: o 8139too Interframe Gap Time Roger Luethi: o mc_filter on big-endian arch Steffen Klassert: o 8139cp - add netpoll support Stephen Hemminger: o slip: use netdev_priv o slip: use module_param o tg3: make driver only data static o tg3: use netdev_priv o tg3: use module_param o via-rhine: free_ring should be static o via-rhine: use module_param o dummy: use netdev_priv o eql: use netdev_priv o ns83820: use module_param o 8139too: use netdev_priv o r8169: use netdev_priv o r8169: use module_param o b44: use netdev_priv o b44: replace MODULE_PARM o 8139cp - module_param o (4/4) acenic - don't spin forever in hard_start_xmit o (3/4) acenic - __iomem warnings cleanup o (2/4) acenic - eliminate MAX_SKB_FRAGS #if o (1/4) acenic - use netdev_priv From ylg@pps.jussieu.fr Sat Oct 16 01:32:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 16 Oct 2004 01:32:28 -0700 (PDT) Received: from postfix4-2.free.fr (postfix4-2.free.fr [213.228.0.176]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9G8WLbY003787 for ; Sat, 16 Oct 2004 01:32:22 -0700 Received: from champigny-4-82-224-234-167.fbx.proxad.net (champigny-4-82-224-234-167.fbx.proxad.net [82.224.234.167]) by postfix4-2.free.fr (Postfix) with ESMTP id B195B23140D for ; Sat, 16 Oct 2004 10:32:06 +0200 (CEST) Subject: sendmsg/IPv6 routing header/bug From: Yves =?ISO-8859-1?Q?Legrandg=E9rard?= To: netdev@oss.sgi.com Content-Type: text/plain Message-Id: <1097915528.12492.130.camel@pcylg> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Sat, 16 Oct 2004 10:32:08 +0200 Content-Transfer-Encoding: 7bit X-archive-position: 10338 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ylg@pps.jussieu.fr Precedence: bulk X-list: netdev Content-Length: 803 Lines: 24 Hi, I've discovered the following bug in IPv6 stack: 1. `sendmsg' crash when sending a UDP datagram with a routing header of type 0 (IPV6_RTHDR_TYPE_0) as ancillary data. 2. When sending a UDP datagram with such a routing header as ancillary data, `sendmsg' is interrupted on receiving SIG_SEGV (segment violation). This bug concerns ONLY UDP protocol. More precisely, if you send, for example, an ICMPv6 Echo Request with a routing header of type 0 as ancillary data, everything works properly. There is a problem with routing header only. All other ancillary data, hoplimit, pktinfo, nexthop, etc. are working fine. 3. This bug affects Linux versions from 2.4.21 to 2.4.27 included and DOES NOT affect Linux 2.4.20. I have not tried with Linux 2.6.xx. Thank you for your attention, [ylg]. From uucp@ganesha.gnumonks.org Sat Oct 16 01:41:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 16 Oct 2004 01:42:13 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9G8fw0L004234 for ; Sat, 16 Oct 2004 01:41:59 -0700 Received: from uucp by ganesha.gnumonks.org with local-bsmtp (Exim 4.30) id 1CIk89-0002B4-5U for netdev@oss.sgi.com; Sat, 16 Oct 2004 10:41:37 +0200 Received: from laforge by obroa-skai.gnumonks.org with local (Exim 3.36 #1) id 1CIXXJ-0000k7-00; Fri, 15 Oct 2004 21:14:45 +0200 Date: Fri, 15 Oct 2004 21:14:44 +0200 From: Harald Welte To: Herbert Xu Cc: netdev@oss.sgi.com Subject: [PATCH 2.6] Re: xfrm_user.c doesn't use NLMSG_F_MULTI Message-ID: <20041015191444.GM17516@obroa-skai.de.gnumonks.org> References: <20041013080705.GB3387@obroa-skai.de.gnumonks.org> <20041014105757.GB12694@obroa-skai.de.gnumonks.org> <20041014110742.GA7910@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zHDeOHGDnzKksZSU" Content-Disposition: inline In-Reply-To: <20041014110742.GA7910@gondor.apana.org.au> X-Operating-System: Linux obroa-skai.de.gnumonks.org 2.6.9-rc3-bk9gm1 X-Date: Today is Pungenday, the 69th day of Bureaucracy in the YOLD 3170 User-Agent: Mutt/1.5.6+20040722i X-archive-position: 10339 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@gnumonks.org Precedence: bulk X-list: netdev Content-Length: 4353 Lines: 144 --zHDeOHGDnzKksZSU Content-Type: multipart/mixed; boundary="kaF1vgn83Aa7CiXN" Content-Disposition: inline --kaF1vgn83Aa7CiXN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 14, 2004 at 09:07:42PM +1000, Herbert Xu wrote: > On Thu, Oct 14, 2004 at 12:57:57PM +0200, Harald Welte wrote: > >=20 > > Ok, would you like to receive a patch that fixes the xfrm netlink > > interface to be more compatible with the netlink manpage and what > > rtnetlink does? >=20 > I have no objections at all :) >=20 > While you're at it please fix the other netlink users as well, e.g., > tcp_diag. I did a short grep for netlink_dump and the only two places where F_MULTI wasn't used was tcp_diag.c and xfrm_user.c. Please let me know if you know any other cases. Pleae find a proposed patch attached to this email. I didn't have the means to test it at this point, though.. but it's pretty straightforward. Please consider applying it... --=20 - Harald Welte http://www.gnumonks.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D Programming is like sex: One mistake and you have to support it your lifeti= me --kaF1vgn83Aa7CiXN Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="2.6.9-rc3-bk9-netlink_f_multi.patch" Content-Transfer-Encoding: quoted-printable Fix xfrm_user.c and tcp_diag.c netlink dump: We have to set NLM_F_MULTI. Signed-off-by: Harald Welte --- linux-2.6.9-rc3-bk9-test/net/ipv4/tcp_diag.c 2004-10-10 14:01:47.000000= 000 +0200 +++ linux-2.6.9-rc3-bk9-test-xfrm_netlink/net/ipv4/tcp_diag.c 2004-10-15 21= :02:19.000000000 +0200 @@ -97,7 +97,7 @@ } =20 static int tcpdiag_fill(struct sk_buff *skb, struct sock *sk, - int ext, u32 pid, u32 seq) + int ext, u32 pid, u32 seq, u16 nlmsg_flags) { struct inet_opt *inet =3D inet_sk(sk); struct tcp_opt *tp =3D tcp_sk(sk); @@ -224,6 +224,7 @@ } =20 nlh->nlmsg_len =3D skb->tail - b; + nlh->nlmsg_flags =3D nlmsg_flags; return skb->len; =20 nlmsg_failure: @@ -280,7 +281,7 @@ =20 if (tcpdiag_fill(rep, sk, req->tcpdiag_ext, NETLINK_CB(in_skb).pid, - nlh->nlmsg_seq) <=3D 0) + nlh->nlmsg_seq, 0) <=3D 0) BUG(); =20 err =3D netlink_unicast(tcpnl, rep, NETLINK_CB(in_skb).pid, MSG_DONTWAIT); @@ -506,7 +507,8 @@ goto next_listen; if (tcpdiag_fill(skb, sk, r->tcpdiag_ext, NETLINK_CB(cb->skb).pid, - cb->nlh->nlmsg_seq) <=3D 0) { + cb->nlh->nlmsg_seq, + NLM_F_MULTI) <=3D 0) { tcp_listen_unlock(); goto done; } @@ -550,7 +552,8 @@ goto next_normal; if (tcpdiag_fill(skb, sk, r->tcpdiag_ext, NETLINK_CB(cb->skb).pid, - cb->nlh->nlmsg_seq) <=3D 0) { + cb->nlh->nlmsg_seq, + NLM_F_MULTI) <=3D 0) { read_unlock_bh(&head->lock); goto done; } @@ -575,7 +578,8 @@ goto next_dying; if (tcpdiag_fill(skb, sk, r->tcpdiag_ext, NETLINK_CB(cb->skb).pid, - cb->nlh->nlmsg_seq) <=3D 0) { + cb->nlh->nlmsg_seq, + NLM_F_MULTI) <=3D 0) { read_unlock_bh(&head->lock); goto done; } diff -Nru linux-2.6.9-rc3-bk9-test/net/xfrm/xfrm_user.c linux-2.6.9-rc3-bk9= -test-xfrm_netlink/net/xfrm/xfrm_user.c --- linux-2.6.9-rc3-bk9-test/net/xfrm/xfrm_user.c 2004-10-10 14:01:03.00000= 0000 +0200 +++ linux-2.6.9-rc3-bk9-test-xfrm_netlink/net/xfrm/xfrm_user.c 2004-10-15 2= 0:55:58.000000000 +0200 @@ -351,7 +351,10 @@ nlh =3D NLMSG_PUT(skb, NETLINK_CB(in_skb).pid, sp->nlmsg_seq, XFRM_MSG_NEWSA, sizeof(*p)); - nlh->nlmsg_flags =3D 0; + if (count !=3D 0) + nlh->nlmsg_flags =3D NLM_F_MULTI; + else + nlh->nlmsg_flags =3D 0; =20 p =3D NLMSG_DATA(nlh); copy_to_user_state(x, p); --kaF1vgn83Aa7CiXN-- --zHDeOHGDnzKksZSU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBcCGjXaXGVTD0i/8RAnLCAJ9u3iP1+zFmTwDUoyj+sQR8UvBJvgCfebGt VmxCtQJbqLZsmebm6GFEWCU= =mxtt -----END PGP SIGNATURE----- --zHDeOHGDnzKksZSU-- From herbert@gondor.apana.org.au Sat Oct 16 02:46:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 16 Oct 2004 02:46:18 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9G9k7de007690 for ; Sat, 16 Oct 2004 02:46:08 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CIl8P-0004dw-00; Sat, 16 Oct 2004 19:45:57 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CIl8L-0001iz-00; Sat, 16 Oct 2004 19:45:53 +1000 Date: Sat, 16 Oct 2004 19:45:53 +1000 To: Harald Welte Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6] Re: xfrm_user.c doesn't use NLMSG_F_MULTI Message-ID: <20041016094553.GA6546@gondor.apana.org.au> References: <20041013080705.GB3387@obroa-skai.de.gnumonks.org> <20041014105757.GB12694@obroa-skai.de.gnumonks.org> <20041014110742.GA7910@gondor.apana.org.au> <20041015191444.GM17516@obroa-skai.de.gnumonks.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041015191444.GM17516@obroa-skai.de.gnumonks.org> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10340 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 1781 Lines: 46 On Fri, Oct 15, 2004 at 09:14:44PM +0200, Harald Welte wrote: > > Pleae find a proposed patch attached to this email. I didn't have the > means to test it at this point, though.. but it's pretty > straightforward. Please consider applying it... Thanks for the patch. > --- linux-2.6.9-rc3-bk9-test/net/ipv4/tcp_diag.c 2004-10-10 14:01:47.000000000 +0200 > +++ linux-2.6.9-rc3-bk9-test-xfrm_netlink/net/ipv4/tcp_diag.c 2004-10-15 21:02:19.000000000 +0200 > @@ -97,7 +97,7 @@ > } > > static int tcpdiag_fill(struct sk_buff *skb, struct sock *sk, > - int ext, u32 pid, u32 seq) > + int ext, u32 pid, u32 seq, u16 nlmsg_flags) The patch looks OK. But I have some pending patches in this area (see http://oss.sgi.com/projects/netdev/archive/2004-10/msg00456.html). Could you please hold off on it for a while? } > diff -Nru linux-2.6.9-rc3-bk9-test/net/xfrm/xfrm_user.c linux-2.6.9-rc3-bk9-test-xfrm_netlink/net/xfrm/xfrm_user.c > --- linux-2.6.9-rc3-bk9-test/net/xfrm/xfrm_user.c 2004-10-10 14:01:03.000000000 +0200 > +++ linux-2.6.9-rc3-bk9-test-xfrm_netlink/net/xfrm/xfrm_user.c 2004-10-15 20:55:58.000000000 +0200 > @@ -351,7 +351,10 @@ > nlh = NLMSG_PUT(skb, NETLINK_CB(in_skb).pid, > sp->nlmsg_seq, > XFRM_MSG_NEWSA, sizeof(*p)); > - nlh->nlmsg_flags = 0; > + if (count != 0) > + nlh->nlmsg_flags = NLM_F_MULTI; > + else > + nlh->nlmsg_flags = 0; > > p = NLMSG_DATA(nlh); > copy_to_user_state(x, p); I think count can be zero when you're dumping as well. You probably want to change dump_one_policy while you're at it. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From romieu@fr.zoreil.com Sat Oct 16 03:01:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 16 Oct 2004 03:02:02 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9GA1u7H008315 for ; Sat, 16 Oct 2004 03:01:57 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i9GA1Qvr016114; Sat, 16 Oct 2004 12:01:26 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i9GA1QWd016113; Sat, 16 Oct 2004 12:01:26 +0200 Date: Sat, 16 Oct 2004 12:01:26 +0200 From: Francois Romieu To: Danny Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: profile path bug again (was Re: mm kernel oops with r8169 & named, PREEMPT) Message-ID: <20041016100125.GA15833@electric-eye.fr.zoreil.com> References: <9625752b041013091772e26739@mail.gmail.com> <9625752b04101309182a96fbd2@mail.gmail.com> <200410131129.05657.jdmason@us.ltcfwd.linux.ibm.com> <20041013181840.GA30852@electric-eye.fr.zoreil.com> <9625752b04101313417be4cf90@mail.gmail.com> <20041013205433.GC30761@electric-eye.fr.zoreil.com> <9625752b04101314595f72f84a@mail.gmail.com> <9625752b04101415043a078b93@mail.gmail.com> <20041015161818.GA2577@electric-eye.fr.zoreil.com> <9625752b04101514073f6dab24@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9625752b04101514073f6dab24@mail.gmail.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 10341 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 Content-Length: 478 Lines: 17 Danny : [profile path bug hits hard] > Also posting the oops directly instead of linking to it probably > allows people passing by to look at the oops, increasing the total > number of eyes. Yes. Oops posting is still on-topic in l-k. > I have a quick question though, if I'm using the kernel with all the > debug features turned on, should I still run it through ksymoops? Your file named "oops-raw" contained the relevant information. -- Ueimor From herbert@gondor.apana.org.au Sat Oct 16 04:30:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 16 Oct 2004 04:30:38 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9GBUS56013583 for ; Sat, 16 Oct 2004 04:30:29 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CImlI-0005Lh-00; Sat, 16 Oct 2004 21:30:12 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CImlC-0003uR-00; Sat, 16 Oct 2004 21:30:06 +1000 Date: Sat, 16 Oct 2004 21:30:06 +1000 To: Pablo Neira , hadi@cyberus.ca, "David S. Miller" , netdev@oss.sgi.com Subject: [RFC] Yield in netlink_broadcast when congested Message-ID: <20041016113006.GA12843@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="4Ckj6UjgE2iN1+kY" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10342 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 3180 Lines: 101 --4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi: Before we start please bear in mind that netlink is fundamentally an *unreliable* protocol. This is the price we pay in order to use it in all the contexts that we do. So what we're looking for here is not how to make netlink 100% reliable, but what we can do to improve the quality of its implementation. I have a proposal for the specific case of overruns with netlink broadcast messages generated in a synchronous context typified by the ifconfig example that Jamal gave. In such contexts it is possible for the sender to sleep. However, we don't want to delay them indefinitely since the system must progress even in the presence of idle multicast listeners. I also have strong reservations about introducing any additional queues since all the ones I've seen don't deliver anything over and above what you can achieve by increasing the receive queue of the listener itself. Now I noticed that on SMP machines Jamal's case works successfully. That is, ip monitor is able to keep up with the flood generated by ifconfig. In fact, what's happening on UP is that in the time slice given to the sender --- ifconfig, the kernel is able to generate a lot more messages than what the average netlink receive queue can accomodate. So here is my proposal: if we detect signs of impending congestion in netlink_broadcast(), and that we're in a sleepable context, then we yield(). This gives the receivers a chance to pull down the messages without having the sender spinning indefinitely. I've tested it on my UP machine and it does resolve the problem for ip monitor. Comments anyone? Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== net/netlink/af_netlink.c 1.56 vs edited ===== --- 1.56/net/netlink/af_netlink.c 2004-09-29 07:47:22 +10:00 +++ edited/net/netlink/af_netlink.c 2004-10-16 21:23:29 +10:00 @@ -593,7 +593,7 @@ skb_set_owner_r(skb, sk); skb_queue_tail(&sk->sk_receive_queue, skb); sk->sk_data_ready(sk, skb->len); - return 0; + return atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf; } return -1; } @@ -606,6 +606,8 @@ struct sk_buff *skb2 = NULL; int protocol = ssk->sk_protocol; int failure = 0, delivered = 0; + int congested = 0; + int val; netlink_trim(skb, allocation); @@ -640,9 +642,10 @@ netlink_overrun(sk); /* Clone failed. Notify ALL listeners. */ failure = 1; - } else if (netlink_broadcast_deliver(sk, skb2)) { + } else if ((val = netlink_broadcast_deliver(sk, skb2)) < 0) { netlink_overrun(sk); } else { + congested |= val; delivered = 1; skb2 = NULL; } @@ -655,8 +658,11 @@ kfree_skb(skb2); kfree_skb(skb); - if (delivered) + if (delivered) { + if (congested && (allocation & __GFP_WAIT)) + yield(); return 0; + } if (failure) return -ENOBUFS; return -ESRCH; --4Ckj6UjgE2iN1+kY-- From dannydaemonic@gmail.com Sat Oct 16 08:52:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 16 Oct 2004 08:52:30 -0700 (PDT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.204]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9GFqOMa021674 for ; Sat, 16 Oct 2004 08:52:25 -0700 Received: by mproxy.gmail.com with SMTP id 77so60891rnk for ; Sat, 16 Oct 2004 08:52:05 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=V9ojoVxpZgOXggGAs8QzK7Gc3R1jy6G62HtEUKdNFqFKt9eaz+hmhmS2cFK0bmk9799ZVvxEbjilSiaF8yIerdgN9JPTWj5lYd3NRSPlmSQTYuP1Ypj/avSPdOqFvH3z/llfC0G9xst6CNBs+StL/VuL3KIR8NepRPrSFxQ7H2A Received: by 10.38.83.9 with SMTP id g9mr25190rnb; Sat, 16 Oct 2004 08:52:05 -0700 (PDT) Received: by 10.38.150.66 with HTTP; Sat, 16 Oct 2004 08:52:05 -0700 (PDT) Message-ID: <9625752b041016085257a62ed@mail.gmail.com> Date: Sat, 16 Oct 2004 08:52:05 -0700 From: Danny Reply-To: Danny To: Francois Romieu Subject: Re: profile path bug again (was Re: mm kernel oops with r8169 & named, PREEMPT) Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com In-Reply-To: <20041016100125.GA15833@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <9625752b041013091772e26739@mail.gmail.com> <200410131129.05657.jdmason@us.ltcfwd.linux.ibm.com> <20041013181840.GA30852@electric-eye.fr.zoreil.com> <9625752b04101313417be4cf90@mail.gmail.com> <20041013205433.GC30761@electric-eye.fr.zoreil.com> <9625752b04101314595f72f84a@mail.gmail.com> <9625752b04101415043a078b93@mail.gmail.com> <20041015161818.GA2577@electric-eye.fr.zoreil.com> <9625752b04101514073f6dab24@mail.gmail.com> <20041016100125.GA15833@electric-eye.fr.zoreil.com> X-archive-position: 10343 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dannydaemonic@gmail.com Precedence: bulk X-list: netdev Content-Length: 42 Lines: 1 Thanks for your help. Live and learn. :) From jkillius@arcor.de Sat Oct 16 11:04:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 16 Oct 2004 11:04:20 -0700 (PDT) Received: from mail-in-01.arcor-online.net (mail-in-07.arcor-online.net [151.189.21.47]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9GI4F0S024334 for ; Sat, 16 Oct 2004 11:04:16 -0700 Received: from unigate.homeip.net (dsl-082-082-121-039.arcor-ip.net [82.82.121.39]) by mail-in-01.arcor-online.net (Postfix) with ESMTP id A1AB15A974 for ; Sat, 16 Oct 2004 20:04:00 +0200 (CEST) Received: by unigate.homeip.net (Postfix, from userid 612) id 872F85603E1; Sat, 16 Oct 2004 20:04:00 +0200 (CEST) Received: from deepspace (deepspace [192.168.1.2]) by unigate.homeip.net (Postfix) with ESMTP id 9029956011D for ; Sat, 16 Oct 2004 20:03:59 +0200 (CEST) From: Jan Killius To: netdev@oss.sgi.com Subject: r8169: page allocation failure Date: Sat, 16 Oct 2004 20:04:17 +0200 User-Agent: KMail/1.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410162004.17573.jkillius@arcor.de> X-archive-position: 10344 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jkillius@arcor.de Precedence: bulk X-list: netdev Content-Length: 566 Lines: 26 Hello, I'm getting a page allocation failure under high net load. Here is the error: swapper: page allocation failure. order:3, mode:0x20 [] [] [] [] [] [] [] [] [] [] This problem happens while a ftp transfer. The kernel version is 2.6.9-rc4 but I'm using the r8169 driver and the netdev snapshot from 2.6.9-rc4-mm1. ethtool -k: Offload parameters for eth2: rx-checksumming: on tx-checksumming: on scatter-gather: on tcp segmentation offload: on -- Jan From jkillius@arcor.de Sat Oct 16 11:13:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 16 Oct 2004 11:13:47 -0700 (PDT) Received: from mail-in-01.arcor-online.net (mail-in-07.arcor-online.net [151.189.21.47]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9GIDfoq024797 for ; Sat, 16 Oct 2004 11:13:42 -0700 Received: from unigate.homeip.net (dsl-082-082-121-039.arcor-ip.net [82.82.121.39]) by mail-in-01.arcor-online.net (Postfix) with ESMTP id 306385A99A for ; Sat, 16 Oct 2004 20:13:27 +0200 (CEST) Received: by unigate.homeip.net (Postfix, from userid 612) id 17BF75603E1; Sat, 16 Oct 2004 20:13:27 +0200 (CEST) Received: from deepspace (deepspace [192.168.1.2]) by unigate.homeip.net (Postfix) with ESMTP id E0D5356011D for ; Sat, 16 Oct 2004 20:13:25 +0200 (CEST) From: Jan Killius To: netdev@oss.sgi.com Subject: sk98lin: page allocation error too Date: Sat, 16 Oct 2004 20:13:44 +0200 User-Agent: KMail/1.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410162013.44305.jkillius@arcor.de> X-archive-position: 10345 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jkillius@arcor.de Precedence: bulk X-list: netdev Content-Length: 2547 Lines: 54 Hello, I'm getting the page allocation error on my other machine too. This is a x86_64 machine on 2.6.9-rc3. Here is one of the call traces: kswapd0: page allocation failure. order:0, mode:0x20 Call Trace: {__alloc_pages+1011} {__wake_up_common+62} {__get_free_pages+31} {kmem_getpages+27} {__alloc_pages+1011} {cache_alloc_refill+674} {__kmalloc+83} {alloc_skb+81} {:sk98lin:FillRxRing+73} {:sk98lin:SkGeIsrOnePort+79} {handle_IRQ_event+44} {do_IRQ+212} {ret_from_intr+0} {mempool_free_slab+0} {__end_that_request_first+304} {__end_that_request_first+315} {sd_rw_intr+0} {scsi_end_request+60} {mempool_free+1} {scsi_io_completion+541} {scsi_softirq+238} {__do_softirq+83} {do_softirq+53} {do_IRQ+383} {ret_from_intr+0} {autoremove_wake_function+9} {__wake_up_common+62} {mempool_free_slab+0} {get_request+457} {get_request+443} {get_io_context+167} {get_request_wait+164} {autoremove_wake_function+0} {autoremove_wake_function+0} {__make_request+875} {generic_make_request+339} {autoremove_wake_function+0} {submit_bio+248} {bio_alloc+359} {submit_bh+282} {__block_write_full_page+442} {ext3_get_block+0} {ext3_ordered_writepage+261} {shrink_zone+1594} {balance_pgdat+597} {finish_wait+4} {kswapd+257} {autoremove_wake_function+0} {finish_task_switch+85} {autoremove_wake_function+0} {schedule_tail+14} {child_rip+8} {kswapd+0} {child_rip+0} -- Jan From romieu@fr.zoreil.com Sat Oct 16 12:09:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 16 Oct 2004 12:10:03 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9GJ9uHM026140 for ; Sat, 16 Oct 2004 12:09:58 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i9GJ8xvr022047; Sat, 16 Oct 2004 21:08:59 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i9GJ8x9N022046; Sat, 16 Oct 2004 21:08:59 +0200 Date: Sat, 16 Oct 2004 21:08:59 +0200 From: Francois Romieu To: Jan Killius Cc: netdev@oss.sgi.com Subject: Re: r8169: page allocation failure Message-ID: <20041016190859.GA21849@electric-eye.fr.zoreil.com> References: <200410162004.17573.jkillius@arcor.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410162004.17573.jkillius@arcor.de> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 10346 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 Content-Length: 729 Lines: 29 Jan Killius : [...] > Here is the error: > swapper: page allocation failure. order:3, mode:0x20 > [] > [] > [] It would be useful to map some of these adresses with the relevant functions in your System.map. [...] > This problem happens while a ftp transfer. The kernel version is > 2.6.9-rc4 but I'm using the r8169 driver and the netdev snapshot > from 2.6.9-rc4-mm1. > > ethtool -k: > Offload parameters for eth2: > rx-checksumming: on > tx-checksumming: on > scatter-gather: on > tcp segmentation offload: on The r8169 driver is not expected to allocate > 0 order pages until the day it handles jumbo frames. Scary messages apart, how does the system behave ? -- Ueimor From jkillius@arcor.de Sat Oct 16 13:12:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 16 Oct 2004 13:12:31 -0700 (PDT) Received: from mail-in-01.arcor-online.net (mail-in-05.arcor-online.net [151.189.21.45]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9GKCKpV031947 for ; Sat, 16 Oct 2004 13:12:21 -0700 Received: from unigate.homeip.net (dsl-082-082-121-039.arcor-ip.net [82.82.121.39]) by mail-in-01.arcor-online.net (Postfix) with ESMTP id DCD6040120; Sat, 16 Oct 2004 22:11:58 +0200 (CEST) Received: by unigate.homeip.net (Postfix, from userid 612) id 976245603E1; Sat, 16 Oct 2004 22:11:58 +0200 (CEST) Received: from deepspace (deepspace [192.168.1.2]) by unigate.homeip.net (Postfix) with ESMTP id 70ACD56011D; Sat, 16 Oct 2004 22:11:56 +0200 (CEST) From: Jan Killius To: Francois Romieu Subject: Re: r8169: page allocation failure Date: Sat, 16 Oct 2004 22:12:14 +0200 User-Agent: KMail/1.7.1 References: <200410162004.17573.jkillius@arcor.de> <200410162134.22727.jkillius@arcor.de> <20041016195435.GA21317@electric-eye.fr.zoreil.com> In-Reply-To: <20041016195435.GA21317@electric-eye.fr.zoreil.com> Cc: netdev@oss.sgi.com MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_eCYcBdXF0z7yCtH" Message-Id: <200410162212.14676.jkillius@arcor.de> X-archive-position: 10347 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jkillius@arcor.de Precedence: bulk X-list: netdev Content-Length: 209840 Lines: 2786 --Boundary-00=_eCYcBdXF0z7yCtH Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Saturday 16 October 2004 21:54, you wrote: > Jan Killius : > [...] > > > I've tried to map them down but I didn't have any success. The adresses > > weren't in my System.map. > > Were they not at least between two addresses in your System.map ? Here is the first error I have attached my bzipped System.map Oct 16 19:27:00 gate swapper: page allocation failure. order:3, mode:0x20 Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] Oct 16 19:27:00 gate [] > > [...] > > > The system is behaving normal, only the data rate is stagnating. > > Rate value and 'vmstat 1' for a few seconds during test would be > welcome. 1 0 131328 54876 15540 43616 0 0 0 132 33110 6424 0 93 7 0 1 0 131328 54812 15540 43616 0 0 0 0 35681 18766 2 90 8 0 1 0 131328 54428 15540 43616 0 0 0 0 35664 19280 0 91 9 0 1 0 131328 53340 15540 43616 0 0 0 0 35668 18263 1 91 8 0 1 0 131328 53404 15540 43616 0 0 0 0 35745 20324 2 90 8 0 1 0 131328 53412 15540 43616 0 0 0 0 35688 20244 0 92 8 0 2 0 131328 53412 15540 43616 0 0 0 0 34983 18064 1 89 10 0 1 0 131328 53476 15540 43616 0 0 0 0 35373 20532 1 89 10 0 1 0 131328 53404 15548 43616 0 0 8 140 35484 19244 1 89 9 1 1 0 131328 53404 15548 43616 0 0 0 0 35221 20991 1 89 10 0 1 0 131328 53388 15548 43616 0 0 0 0 35456 19485 1 91 8 0 1 0 131328 53388 15556 43616 0 0 0 24 35547 20610 1 91 8 0 2 0 131328 53388 15556 43616 0 0 0 0 35398 19624 1 90 9 0 2 0 131328 53388 15556 43616 0 0 0 0 35610 19196 1 88 11 0 1 0 131328 53452 15556 43616 0 0 0 0 35657 20496 1 89 10 0 1 0 131328 53452 15556 43616 0 0 0 0 35834 20126 1 91 8 0 1 0 131328 53452 15556 43616 0 0 0 0 35605 20334 1 92 7 0 1 0 131328 53468 15556 43616 0 0 0 0 35819 20711 1 91 8 0 2 0 131328 53468 15556 43616 0 0 0 0 35769 19753 1 77 22 0 1 0 131328 53468 15556 43616 0 0 0 0 35810 21609 1 89 10 0 1 0 131328 53404 15556 43616 0 0 0 0 35151 21286 0 90 10 0 1 0 131328 53476 15556 43616 0 0 0 0 35508 21409 1 91 8 0 1 0 131328 53476 15556 43616 0 0 0 0 35216 22581 1 89 10 0 1 0 131328 53468 15572 43616 0 0 8 80 35276 20625 1 89 10 0 2 0 131328 53212 15572 43616 0 0 0 0 36289 19173 2 90 8 0 1 0 131328 45340 15572 43616 0 0 0 0 31957 9366 14 82 4 0 2 0 131328 45404 15572 43616 0 0 0 0 35237 21628 1 90 9 0 1 0 131328 45468 15572 43616 0 0 0 0 35666 21426 1 88 11 0 1 0 131328 45276 15668 43708 0 0 0 272 35269 20345 1 90 9 0 1 0 131328 45276 15668 43708 0 0 0 0 35348 21849 2 88 10 0 1 0 131328 45276 15668 43708 0 0 0 0 35358 20267 1 89 10 0 1 0 131328 45276 15668 43708 0 0 0 0 35449 20505 1 90 9 0 1 0 131328 45284 15668 43708 0 0 0 0 35403 19478 0 91 9 0 2 0 131328 45284 15676 43708 0 0 0 100 35653 20336 1 90 9 0 1 0 131328 45284 15676 43708 0 0 0 0 35653 19626 2 88 10 0 1 0 131328 45284 15676 43708 0 0 0 0 35545 20062 0 92 8 0 1 0 131328 45220 15676 43708 0 0 0 0 35867 20312 1 92 7 0 1 0 131328 45284 15676 43708 0 0 0 0 35410 18833 1 79 20 0 > > > Can you disable TSO and tell if the messages disappear ? > with TSO off there are no messages. > > > Now I have new errors: > > eth2: Rx buffers exhausted > > The system is still running and the network is functional too. > > You are running with NAPI enabled, right ? Yes. > > Please, pretty please, keep the Cc: on netdev. It is archived and > googlable whereas my mailbox is not. sorry. > > -- > Ueimor -- Jan --Boundary-00=_eCYcBdXF0z7yCtH Content-Type: application/x-bzip2; name="System.map-2.6.9-rc4.bz2" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="System.map-2.6.9-rc4.bz2" QlpoOTFBWSZTWTq5OOoCs/9fgHAQQAF/4L///+C////wYzg7zk+7hdzVKShpnbIZHXQc0Z3NR20q MN3NRXahSqqVBSqK2HauRHS2ctfW9n1lUcbM2kit7a1p0kg+7iXfABkstiNsyDWbAABtgaAAKANZ AD7bkA9yuWWq17fTtbpvVB8AAABsatjrwAGeHkU3x7QAAA0AAAAAAA0vvPkKULt10ImmVUqFQm1t Oqsz3cOhQAUAFwA6AAAAAAAAAAAAH3eUAoFKAAUB7wAAAAAKAAADux83ffQPgAA+8d77vWtW1a1T axgAAAAUAAFAAABFQGqkbGg0GabWlMwAAAKKAAAAKAUAAoAANqrCgBWlAbLfbgap6Dux6r7vmda7 WDbuABn3y73vrrKj3B1yoXfOfOr2+nfI3nt3Vecc7end7h4vd7qKsJfc9c992l1hs9O5srbSLe3F ze63k5Hm2a0AbYAFdvRU9udbKoBoGedyqroYhQt71vRHobatC97h57YQoXPcHvbVYqUHvd1eZVmg Xvbvab21W9uUvVw9zt7vl97d8X1u+zV4133c+2PvfWPeZ73HyN3vvenPfPleXh98JACIAAVZ0j7c 7SlvNuw3W77Lbz3eNnu3evvr7V15GpfeF8A+C99vXyfOwBV7uDpTdnvZffLuq93l4dzeea773M9N 4NBQWwAa33s+zN992haNWm9nOEsmy0hCYl093upbGYLNRVrEmChUQADbAAAvcM5dxydMWrC0prVS 2ZTWpMWk2M+bu0bMLLDNqZtCD2bhoANABrZVNjGWibaqs2qIqTJW0kRmla1LWYtYwkJM2W664ANE gACYIykkQ2bu7oI01apsshNa2bs1dtbYsytFRdzADoUAUXdnU2llaNC4ejkfdtXvXV76zex3bL3j Detz3nt7vPd15ve84c7nbdu+h3YPd25rW4UCgAAAAAAAAA2jnvue+iE1k2NKG2u9n32+mmG2jbZL MqGi223XfWdgyd2kcAAAAFu3r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TdKCdGNKp dE1JGTJA7oe/mIkN4hAWSHjthhBYCWh59FwLjIiL7M//4u5IpwoSB1cnHUA= --Boundary-00=_eCYcBdXF0z7yCtH-- From romieu@fr.zoreil.com Sat Oct 16 13:50:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 16 Oct 2004 13:50:06 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9GKnwTu001546 for ; Sat, 16 Oct 2004 13:49:59 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i9GKmovr023353; Sat, 16 Oct 2004 22:48:50 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i9GKmnUd023352; Sat, 16 Oct 2004 22:48:49 +0200 Date: Sat, 16 Oct 2004 22:48:48 +0200 From: Francois Romieu To: Jan Killius Cc: netdev@oss.sgi.com, davem@davemloft.net, jgarzik@pobox.com Subject: Re: r8169: page allocation failure Message-ID: <20041016204848.GB21849@electric-eye.fr.zoreil.com> References: <200410162004.17573.jkillius@arcor.de> <200410162134.22727.jkillius@arcor.de> <20041016195435.GA21317@electric-eye.fr.zoreil.com> <200410162212.14676.jkillius@arcor.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410162212.14676.jkillius@arcor.de> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 10348 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 Content-Length: 2038 Lines: 64 Jan Killius : > On Saturday 16 October 2004 21:54, you wrote: > > Jan Killius : [...] > Here is the first error I have attached my bzipped System.map > Oct 16 19:27:00 gate swapper: page allocation failure. order:3, mode:0x20 > Oct 16 19:27:00 gate [] > Oct 16 19:27:00 gate [] > Oct 16 19:27:00 gate [] > Oct 16 19:27:00 gate [] > Oct 16 19:27:00 gate [] > Oct 16 19:27:00 gate [] > Oct 16 19:27:00 gate [] c01ff130 T skb_under_panic c01ff180 T alloc_skb c01ff270 t skb_drop_fraglist > Oct 16 19:27:00 gate [] > Oct 16 19:27:00 gate [] c022d8d0 T tcp_set_skb_tso_segs c022d920 t tcp_fragment c022dc70 t __pskb_trim_head [...] > > Rate value and 'vmstat 1' for a few seconds during test would be > > welcome. > 1 0 131328 54876 15540 43616 0 0 0 132 33110 6424 0 93 7 0 > 1 0 131328 54812 15540 43616 0 0 0 0 35681 18766 2 90 8 0 > 1 0 131328 54428 15540 43616 0 0 0 0 35664 19280 0 91 9 0 > 1 0 131328 53340 15540 43616 0 0 0 0 35668 18263 1 91 8 0 > 1 0 131328 53404 15540 43616 0 0 0 0 35745 20324 2 90 8 0 - what is the current transfer rate and is it better/worse w/o TSO ? - which cpu/disk system are there within the (?) 128Mo box ? I am not sure there is much to do. Lower the cache ? Suggestions anyone ? [...] > > > > Can you disable TSO and tell if the messages disappear ? > > > with TSO off there are no messages. > > > > > Now I have new errors: > > > eth2: Rx buffers exhausted > > > The system is still running and the network is functional too. > > > > You are running with NAPI enabled, right ? > Yes. The system would probably not have recovered from Rx buffers exhaustion otherwise. :o) > > Please, pretty please, keep the Cc: on netdev. It is archived and > > googlable whereas my mailbox is not. > sorry. No problem. -- Ueimor From jkillius@arcor.de Sat Oct 16 14:04:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 16 Oct 2004 14:04:44 -0700 (PDT) Received: from mail-in-01.arcor-online.net (mail-in-04.arcor-online.net [151.189.21.44]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9GL4brm002188 for ; Sat, 16 Oct 2004 14:04:38 -0700 Received: from unigate.homeip.net (dsl-082-082-121-039.arcor-ip.net [82.82.121.39]) by mail-in-01.arcor-online.net (Postfix) with ESMTP id 64E4D495E6; Sat, 16 Oct 2004 23:04:22 +0200 (CEST) Received: by unigate.homeip.net (Postfix, from userid 612) id 27150560212; Sat, 16 Oct 2004 23:04:22 +0200 (CEST) Received: from deepspace (deepspace [192.168.1.2]) by unigate.homeip.net (Postfix) with ESMTP id ECFFF56011D; Sat, 16 Oct 2004 23:04:20 +0200 (CEST) From: Jan Killius To: Francois Romieu Subject: Re: r8169: page allocation failure Date: Sat, 16 Oct 2004 23:04:38 +0200 User-Agent: KMail/1.7.1 Cc: netdev@oss.sgi.com, davem@davemloft.net, jgarzik@pobox.com References: <200410162004.17573.jkillius@arcor.de> <200410162212.14676.jkillius@arcor.de> <20041016204848.GB21849@electric-eye.fr.zoreil.com> In-Reply-To: <20041016204848.GB21849@electric-eye.fr.zoreil.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410162304.38905.jkillius@arcor.de> X-archive-position: 10349 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jkillius@arcor.de Precedence: bulk X-list: netdev Content-Length: 283 Lines: 7 > - what is the current transfer rate and is it better/worse w/o TSO ? I'm getting almost the same with both settings ~405Mbit/s. > - which cpu/disk system are there within the (?) 128Mo box ? Athlon XP 1600+ the disk is a Maxtor 6Y060L0 gets with hdparm 42.76 MB/s -- Jan From jkillius@arcor.de Sat Oct 16 14:22:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 16 Oct 2004 14:23:04 -0700 (PDT) Received: from mail-in-01.arcor-online.net (mail-in-04.arcor-online.net [151.189.21.44]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9GLMwET002776 for ; Sat, 16 Oct 2004 14:22:58 -0700 Received: from unigate.homeip.net (dsl-082-082-121-039.arcor-ip.net [82.82.121.39]) by mail-in-01.arcor-online.net (Postfix) with ESMTP id B795F49734; Sat, 16 Oct 2004 23:22:43 +0200 (CEST) Received: by unigate.homeip.net (Postfix, from userid 612) id 90D175603E1; Sat, 16 Oct 2004 23:22:43 +0200 (CEST) Received: from deepspace (deepspace [192.168.1.2]) by unigate.homeip.net (Postfix) with ESMTP id B7A9456011D; Sat, 16 Oct 2004 23:22:42 +0200 (CEST) From: Jan Killius To: Francois Romieu Subject: Re: r8169: page allocation failure Date: Sat, 16 Oct 2004 23:23:00 +0200 User-Agent: KMail/1.7.1 Cc: netdev@oss.sgi.com, davem@davemloft.net, jgarzik@pobox.com References: <200410162004.17573.jkillius@arcor.de> <20041016204848.GB21849@electric-eye.fr.zoreil.com> <200410162304.38905.jkillius@arcor.de> In-Reply-To: <200410162304.38905.jkillius@arcor.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410162323.01006.jkillius@arcor.de> X-archive-position: 10350 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jkillius@arcor.de Precedence: bulk X-list: netdev Content-Length: 402 Lines: 11 On Saturday 16 October 2004 23:04, Jan Killius wrote: > > - what is the current transfer rate and is it better/worse w/o TSO ? > > I'm getting almost the same with both settings ~405Mbit/s. > > > - which cpu/disk system are there within the (?) 128Mo box ? > > Athlon XP 1600+ the disk is a Maxtor 6Y060L0 gets with hdparm 42.76 MB/s ups forget to say the ram size 512MB FSB333 DDR RAM -- Jan From romieu@fr.zoreil.com Sat Oct 16 14:50:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 16 Oct 2004 14:50:07 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9GLnw0G003398 for ; Sat, 16 Oct 2004 14:49:59 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i9GLn4vr023959; Sat, 16 Oct 2004 23:49:04 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i9GLn3aI023958; Sat, 16 Oct 2004 23:49:03 +0200 Date: Sat, 16 Oct 2004 23:49:03 +0200 From: Francois Romieu To: Jan Killius Cc: netdev@oss.sgi.com, davem@davemloft.net, jgarzik@pobox.com Subject: Re: r8169: page allocation failure Message-ID: <20041016214903.GC21849@electric-eye.fr.zoreil.com> References: <200410162004.17573.jkillius@arcor.de> <20041016204848.GB21849@electric-eye.fr.zoreil.com> <200410162304.38905.jkillius@arcor.de> <200410162323.01006.jkillius@arcor.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410162323.01006.jkillius@arcor.de> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 10351 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 Content-Length: 818 Lines: 23 Jan Killius : > On Saturday 16 October 2004 23:04, Jan Killius wrote: > > > - what is the current transfer rate and is it better/worse w/o TSO ? > > > > I'm getting almost the same with both settings ~405Mbit/s. Roughly the same CPU usage ? > > > > > - which cpu/disk system are there within the (?) 128Mo box ? > > > > Athlon XP 1600+ the disk is a Maxtor 6Y060L0 gets with hdparm 42.76 MB/s > ups forget to say the ram size 512MB FSB333 DDR RAM I did not notice it first but the bi/bo columns of the vmstat output are mostly null. Assuming this is a single session ftp transfer, what ftp software does the r8169 based system run ? Pure curiosity: can you issue a test+vmstat with a blowfish scp to see if TSO makes a difference for your setup when the system is not disk-limited ? -- Ueimor From tgr@reeler.org Sat Oct 16 16:52:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 16 Oct 2004 16:52:23 -0700 (PDT) Received: from rei.rakuen (217-162-107-144.dclient.hispeed.ch [217.162.107.144]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9GNqHPi008416 for ; Sat, 16 Oct 2004 16:52:17 -0700 Received: from tgr by rei.rakuen with local (Exim 4.34) id 1CIyKn-0002Dt-VU; Sun, 17 Oct 2004 01:51:37 +0200 Date: Sun, 17 Oct 2004 01:51:37 +0200 From: Thomas Graf To: Herbert Xu Cc: Pablo Neira , hadi@cyberus.ca, "David S. Miller" , netdev@oss.sgi.com Subject: Re: [RFC] Yield in netlink_broadcast when congested Message-ID: <20041016235137.GE19714@rei.reeler.org> References: <20041016113006.GA12843@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041016113006.GA12843@gondor.apana.org.au> X-archive-position: 10352 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 1165 Lines: 33 * Herbert Xu <20041016113006.GA12843@gondor.apana.org.au> 2004-10-16 21:30 > So here is my proposal: if we detect signs of impending congestion > in netlink_broadcast(), and that we're in a sleepable context, then > we yield(). > > This gives the receivers a chance to pull down the messages without > having the sender spinning indefinitely. I've tested it on my UP > machine and it does resolve the problem for ip monitor. Looks good. Up to how many receivers does that work? We would still see the effect if too many receivers are registered, right? I haven't had the time to read through the previous conversion so I don't know if this has come up so far but we could request an ACK from each receiver an congest based on the following strategy: SS := Last serial sent SR := Last serial received LL := Lower congestion limit to ignore short bursts UL := Upper congestion limit to avoid infinite congestion: Congestion map for (SS - SR) 0..LL: NOP LL..UL: dp-congestion UL..MAX: NOP The biggest problem is that I don't know of any application handling ACK requests properly yet. Just a wild idea anyway, I'm not even sure whether it's worth the effort. From herbert@gondor.apana.org.au Sun Oct 17 00:40:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 00:40:46 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9H7ebm0022119 for ; Sun, 17 Oct 2004 00:40:38 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CJ5e9-0002hx-00; Sun, 17 Oct 2004 17:40:05 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CJ5e1-0005d8-00; Sun, 17 Oct 2004 17:39:57 +1000 Date: Sun, 17 Oct 2004 17:39:57 +1000 To: Thomas Graf Cc: Pablo Neira , hadi@cyberus.ca, "David S. Miller" , netdev@oss.sgi.com Subject: Re: [RFC] Yield in netlink_broadcast when congested Message-ID: <20041017073957.GA21632@gondor.apana.org.au> References: <20041016113006.GA12843@gondor.apana.org.au> <20041016235137.GE19714@rei.reeler.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041016235137.GE19714@rei.reeler.org> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10354 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 667 Lines: 17 On Sun, Oct 17, 2004 at 01:51:37AM +0200, Thomas Graf wrote: > > So here is my proposal: if we detect signs of impending congestion > > in netlink_broadcast(), and that we're in a sleepable context, then > > we yield(). > > Up to how many receivers does that work? We would still see the > effect if too many receivers are registered, right? Assuming the scheduler is fair then every listener should get their time slice to receive the messages. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From jkillius@arcor.de Sun Oct 17 00:40:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 00:40:31 -0700 (PDT) Received: from mail-in-01.arcor-online.net (mail-in-03.arcor-online.net [151.189.21.43]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9H7ePqx022099 for ; Sun, 17 Oct 2004 00:40:25 -0700 Received: from unigate.homeip.net (dsl-082-082-121-039.arcor-ip.net [82.82.121.39]) by mail-in-01.arcor-online.net (Postfix) with ESMTP id 066DF9132F; Sun, 17 Oct 2004 09:40:10 +0200 (CEST) Received: by unigate.homeip.net (Postfix, from userid 612) id E778E5603E1; Sun, 17 Oct 2004 09:40:09 +0200 (CEST) Received: from deepspace (deepspace [192.168.1.2]) by unigate.homeip.net (Postfix) with ESMTP id 3540A56011D; Sun, 17 Oct 2004 09:40:08 +0200 (CEST) From: Jan Killius To: Francois Romieu Subject: Re: r8169: page allocation failure Date: Sun, 17 Oct 2004 09:40:28 +0200 User-Agent: KMail/1.7.1 Cc: netdev@oss.sgi.com, davem@davemloft.net, jgarzik@pobox.com References: <200410162004.17573.jkillius@arcor.de> <200410162323.01006.jkillius@arcor.de> <20041016214903.GC21849@electric-eye.fr.zoreil.com> In-Reply-To: <20041016214903.GC21849@electric-eye.fr.zoreil.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410170940.28350.jkillius@arcor.de> X-archive-position: 10353 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jkillius@arcor.de Precedence: bulk X-list: netdev Content-Length: 2734 Lines: 72 On Saturday 16 October 2004 23:49, Francois Romieu wrote: > Jan Killius : > > On Saturday 16 October 2004 23:04, Jan Killius wrote: > > > > - what is the current transfer rate and is it better/worse w/o TSO ? > > > > > > I'm getting almost the same with both settings ~405Mbit/s. > > Roughly the same CPU usage ? I have tested the maximum transfer rate with netperf here makes TSO no difference in cpu usage. > > > > > - which cpu/disk system are there within the (?) 128Mo box ? > > > > > > Athlon XP 1600+ the disk is a Maxtor 6Y060L0 gets with hdparm 42.76 > > > MB/s > > > > ups forget to say the ram size 512MB FSB333 DDR RAM > > I did not notice it first but the bi/bo columns of the vmstat output > are mostly null. Assuming this is a single session ftp transfer, what ftp > software does the r8169 based system run ? vsftpd > > Pure curiosity: can you issue a test+vmstat with a blowfish scp to see if > TSO makes a difference for your setup when the system is not disk-limited ? without TSO(1628MB 11.1MB/s 02:27): 1 0 166388 27716 332 97264 0 0 12300 0 12323 7616 37 45 0 18 1 0 166388 26108 332 99804 0 0 12880 4 12727 7975 39 52 0 9 1 0 166388 24612 336 102796 0 0 12720 0 12590 7900 38 48 0 15 1 0 166388 27644 332 100420 0 0 8232 0 8845 5517 27 30 2 40 1 2 166388 27648 368 101024 0 0 11240 4 11705 7546 35 44 0 21 1 0 166388 26592 384 102536 0 0 12372 56 13001 8409 34 55 0 11 1 2 166388 25192 388 104424 0 0 12504 0 12428 7700 43 44 0 13 1 0 166388 25488 436 104424 0 0 10844 48 10900 6868 34 40 0 27 0 1 166388 25076 452 105200 0 0 11928 0 11949 7412 36 48 0 17 1 1 166388 24412 456 106108 0 0 12172 60 12225 7612 39 45 0 15 with TSO(1628MB 12.8MB/s 02:07): 1 0 166340 27672 376 120056 0 0 13740 0 11879 2041 36 58 6 0 1 0 166340 25352 384 122288 0 0 13968 4 12148 2072 41 55 3 1 1 0 166340 22924 376 124692 0 0 14028 0 12174 2050 36 60 4 0 1 0 166340 20896 368 126696 0 0 13644 0 11859 2016 39 54 7 0 0 0 166340 30792 352 116856 0 0 13328 0 11646 2013 36 56 8 0 1 0 166340 28440 332 119280 0 0 14156 0 12343 2063 37 59 2 2 1 3 166340 28120 348 119556 0 0 11936 4 10527 2329 32 49 4 15 1 3 166340 27728 456 119920 0 0 12152 4 10549 2516 31 52 0 17 2 0 166340 26600 492 120588 0 0 12216 208 10347 2274 37 48 0 16 0 2 166340 24344 572 122760 0 0 13900 0 11937 2217 37 58 0 5 > > -- > Ueimor -- Jan From herbert@gondor.apana.org.au Sun Oct 17 00:48:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 00:48:28 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9H7mJFR022862 for ; Sun, 17 Oct 2004 00:48:19 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CJ5lr-0002uf-00; Sun, 17 Oct 2004 17:48:03 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CJ5lg-0005eC-00; Sun, 17 Oct 2004 17:47:52 +1000 From: Herbert Xu To: romieu@fr.zoreil.com (Francois Romieu) Subject: Re: r8169: page allocation failure Cc: jkillius@arcor.de, netdev@oss.sgi.com, davem@davemloft.net, jgarzik@pobox.com Organization: Core In-Reply-To: <20041016204848.GB21849@electric-eye.fr.zoreil.com> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) Message-Id: Date: Sun, 17 Oct 2004 17:47:52 +1000 X-archive-position: 10355 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 692 Lines: 21 Francois Romieu wrote: > >> Oct 16 19:27:00 gate [] >> Oct 16 19:27:00 gate [] > > c022d8d0 T tcp_set_skb_tso_segs > c022d920 t tcp_fragment > c022dc70 t __pskb_trim_head Good catch. tcp_fragment's behaviour is broken when TSO is present. We can start with a list of n 1-mss fragments and tcp_fragment will end up allocating a continuous skb of n-1 mss bytes. It should instead allocate a new skb of 1 mss. I'll work on it. Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From herbert@gondor.apana.org.au Sun Oct 17 02:09:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 02:09:11 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9H991qP026520 for ; Sun, 17 Oct 2004 02:09:02 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CJ71z-00039h-00; Sun, 17 Oct 2004 19:08:47 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CJ71p-0006LL-00; Sun, 17 Oct 2004 19:08:37 +1000 Date: Sun, 17 Oct 2004 19:08:37 +1000 To: Francois Romieu Cc: jkillius@arcor.de, netdev@oss.sgi.com, davem@davemloft.net, jgarzik@pobox.com Subject: Re: r8169: page allocation failure Message-ID: <20041017090837.GA24362@gondor.apana.org.au> References: <20041016204848.GB21849@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="PNTmBPCT7hxwcZjr" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10356 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 1315 Lines: 47 --PNTmBPCT7hxwcZjr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Oct 17, 2004 at 05:47:52PM +1000, Herbert Xu wrote: > > It should instead allocate a new skb of 1 mss. I'll work on it. In fact it was allocating space that it wasn't even using :) The following patch makes it allocate skb_headlen(skb) - len instead of skb->len - len. When skb is linear there is no difference. When it's non-linear we only ever copy the bytes in the header. Please let me know whether this fixes your problem. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --PNTmBPCT7hxwcZjr Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== net/ipv4/tcp_output.c 1.67 vs edited ===== --- 1.67/net/ipv4/tcp_output.c 2004-10-01 13:56:45 +10:00 +++ edited/net/ipv4/tcp_output.c 2004-10-17 18:58:47 +10:00 @@ -455,8 +455,12 @@ { struct tcp_opt *tp = tcp_sk(sk); struct sk_buff *buff; - int nsize = skb->len - len; + int nsize; u16 flags; + + nsize = skb_headlen(skb) - len; + if (nsize < 0) + nsize = 0; if (skb_cloned(skb) && skb_is_nonlinear(skb) && --PNTmBPCT7hxwcZjr-- From jkillius@arcor.de Sun Oct 17 03:13:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 03:13:11 -0700 (PDT) Received: from mail-in-01.arcor-online.net (mail-in-02.arcor-online.net [151.189.21.42]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9HAD6IR029490 for ; Sun, 17 Oct 2004 03:13:07 -0700 Received: from unigate.homeip.net (dsl-082-082-120-070.arcor-ip.net [82.82.120.70]) by mail-in-01.arcor-online.net (Postfix) with ESMTP id 0C0976B52B; Sun, 17 Oct 2004 12:12:52 +0200 (CEST) Received: by unigate.homeip.net (Postfix, from userid 612) id B290D5603E1; Sun, 17 Oct 2004 12:12:47 +0200 (CEST) Received: from deepspace (deepspace [192.168.1.2]) by unigate.homeip.net (Postfix) with ESMTP id 74A8D56011D; Sun, 17 Oct 2004 12:12:44 +0200 (CEST) From: Jan Killius To: Herbert Xu Subject: Re: r8169: page allocation failure Date: Sun, 17 Oct 2004 12:13:04 +0200 User-Agent: KMail/1.7.1 Cc: Francois Romieu , netdev@oss.sgi.com, davem@davemloft.net, jgarzik@pobox.com References: <20041016204848.GB21849@electric-eye.fr.zoreil.com> <20041017090837.GA24362@gondor.apana.org.au> In-Reply-To: <20041017090837.GA24362@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410171213.04418.jkillius@arcor.de> X-archive-position: 10357 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jkillius@arcor.de Precedence: bulk X-list: netdev Content-Length: 581 Lines: 17 On Sunday 17 October 2004 11:08, Herbert Xu wrote: > On Sun, Oct 17, 2004 at 05:47:52PM +1000, Herbert Xu wrote: > > It should instead allocate a new skb of 1 mss. I'll work on it. > > In fact it was allocating space that it wasn't even using :) > > The following patch makes it allocate skb_headlen(skb) - len instead > of skb->len - len. When skb is linear there is no difference. When > it's non-linear we only ever copy the bytes in the header. > > Please let me know whether this fixes your problem. Yes the patch solved the problem completely > > Cheers, -- Jan From manfred@colorfullife.com Sun Oct 17 03:27:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 03:28:03 -0700 (PDT) Received: from dbl.q-ag.de (dbl.q-ag.de [213.172.117.3]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9HARooX029965 for ; Sun, 17 Oct 2004 03:27:52 -0700 Received: from dbl.q-ag.de (dbl [127.0.0.1]) by dbl.q-ag.de (8.12.3/8.12.3/Debian-6.6) with ESMTP id i9HARNSL029890; Sun, 17 Oct 2004 12:27:23 +0200 Received: from localhost (manfred@localhost) by dbl.q-ag.de (8.12.3/8.12.3/Debian-6.6) with ESMTP id i9HARLh1029886; Sun, 17 Oct 2004 12:27:21 +0200 X-Authentication-Warning: dbl.q-ag.de: manfred owned process doing -bs Date: Sun, 17 Oct 2004 12:27:21 +0200 (CEST) From: Manfred Spraul X-X-Sender: manfred@dbl.q-ag.de To: jgarzik@pobox.com cc: marcelo.tosatti@cyclades.com, , Subject: [PATCH 2.4.28-pre4-bk3] forcedeth: Gigabit ethernet support and media detection changes Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 10358 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: manfred@colorfullife.com Precedence: bulk X-list: netdev Content-Length: 49591 Lines: 1508 Backport of the 0.29 forcedeth driver to 2.4. Changes: - lots of bugfixes. - completely rewritten PHY initialization and media detection - gigabit ethernet support The actual backport was done by Jane Liu from NVIDIA: - all occurrences of msleep changed to mdelay - invocations of synchronize_irq changed to take no parameters - SET_NETDEV_DEV calls removed - module_param call changed to MODULE_PARM Signed-Off-By: Manfred Spraul // Kernel Version: // VERSION = 2 // PATCHLEVEL = 4 // SUBLEVEL = 28 // EXTRAVERSION = -pre4-bk3 --- 2.4/drivers/net/forcedeth.c 2004-04-14 15:05:30.000000000 +0200 +++ build-2.4/drivers/net/forcedeth.c 2004-10-17 11:32:40.156443632 +0200 @@ -10,8 +10,11 @@ * trademarks of NVIDIA Corporation in the United States and other * countries. * - * Copyright (C) 2003 Manfred Spraul + * Copyright (C) 2003,4 Manfred Spraul * Copyright (C) 2004 Andrew de Quincey (wol support) + * Copyright (C) 2004 Carl-Daniel Hailfinger (invalid MAC handling, insane + * IRQ rate fixes, bigendian fixes, cleanups, verification) + * Copyright (c) 2004 NVIDIA Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -60,15 +63,19 @@ * 0.19: 29 Nov 2003: Handle RxNoBuf, detect & handle invalid mac * addresses, really stop rx if already running * in nv_start_rx, clean up a bit. - * (C) Carl-Daniel Hailfinger * 0.20: 07 Dec 2003: alloc fixes * 0.21: 12 Jan 2004: additional alloc fix, nic polling fix. * 0.22: 19 Jan 2004: reprogram timer to a sane rate, avoid lockup - * on close. - * (C) Carl-Daniel Hailfinger, Manfred Spraul + * on close. * 0.23: 26 Jan 2004: various small cleanups * 0.24: 27 Feb 2004: make driver even less anonymous in backtraces * 0.25: 09 Mar 2004: wol support + * 0.26: 03 Jun 2004: netdriver specific annotation, sparse-related fixes + * 0.27: 19 Jun 2004: Gigabit support, new descriptor rings, + * added CK804/MCP04 device IDs, code fixes + * for registers, link status and other minor fixes. + * 0.28: 21 Jun 2004: Big cleanup, making driver mostly endian safe + * 0.29: 31 Aug 2004: Add backup timer for link change notification. * * Known bugs: * We suspect that on some hardware no TX done interrupts are generated. @@ -80,7 +87,8 @@ * DEV_NEED_TIMERIRQ will not harm you on sane hardware, only generating a few * superfluous timer interrupts from the nic. */ -#define FORCEDETH_VERSION "0.25" +#define FORCEDETH_VERSION "0.29" +#define DRV_NAME "forcedeth" #include #include @@ -113,16 +121,18 @@ * Hardware access: */ -#define DEV_NEED_LASTPACKET1 0x0001 -#define DEV_IRQMASK_1 0x0002 -#define DEV_IRQMASK_2 0x0004 -#define DEV_NEED_TIMERIRQ 0x0008 +#define DEV_NEED_LASTPACKET1 0x0001 /* set LASTPACKET1 in tx flags */ +#define DEV_IRQMASK_1 0x0002 /* use NVREG_IRQMASK_WANTED_1 for irq mask */ +#define DEV_IRQMASK_2 0x0004 /* use NVREG_IRQMASK_WANTED_2 for irq mask */ +#define DEV_NEED_TIMERIRQ 0x0008 /* set the timer irq flag in the irq mask */ +#define DEV_NEED_LINKTIMER 0x0010 /* poll link settings. Relies on the timer irq */ enum { NvRegIrqStatus = 0x000, #define NVREG_IRQSTAT_MIIEVENT 0x040 #define NVREG_IRQSTAT_MASK 0x1ff NvRegIrqMask = 0x004, +#define NVREG_IRQ_RX_ERROR 0x0001 #define NVREG_IRQ_RX 0x0002 #define NVREG_IRQ_RX_NOBUF 0x0004 #define NVREG_IRQ_TX_ERR 0x0008 @@ -132,7 +142,7 @@ enum { #define NVREG_IRQ_TX1 0x0100 #define NVREG_IRQMASK_WANTED_1 0x005f #define NVREG_IRQMASK_WANTED_2 0x0147 -#define NVREG_IRQ_UNKNOWN (~(NVREG_IRQ_RX|NVREG_IRQ_RX_NOBUF|NVREG_IRQ_TX_ERR|NVREG_IRQ_TX2|NVREG_IRQ_TIMER|NVREG_IRQ_LINK|NVREG_IRQ_TX1)) +#define NVREG_IRQ_UNKNOWN (~(NVREG_IRQ_RX_ERROR|NVREG_IRQ_RX|NVREG_IRQ_RX_NOBUF|NVREG_IRQ_TX_ERR|NVREG_IRQ_TX2|NVREG_IRQ_TIMER|NVREG_IRQ_LINK|NVREG_IRQ_TX1)) NvRegUnknownSetupReg6 = 0x008, #define NVREG_UNKSETUP6_VAL 3 @@ -159,7 +169,7 @@ enum { NvRegOffloadConfig = 0x90, #define NVREG_OFFLOAD_HOMEPHY 0x601 -#define NVREG_OFFLOAD_NORMAL 0x5ee +#define NVREG_OFFLOAD_NORMAL RX_NIC_BUFSIZE NvRegReceiverControl = 0x094, #define NVREG_RCVCTL_START 0x01 NvRegReceiverStatus = 0x98, @@ -168,6 +178,8 @@ enum { NvRegRandomSeed = 0x9c, #define NVREG_RNDSEED_MASK 0x00ff #define NVREG_RNDSEED_FORCE 0x7f00 +#define NVREG_RNDSEED_FORCE2 0x2d00 +#define NVREG_RNDSEED_FORCE3 0x7400 NvRegUnknownSetupReg1 = 0xA0, #define NVREG_UNKSETUP1_VAL 0x16070f @@ -181,6 +193,9 @@ enum { NvRegMulticastMaskA = 0xB8, NvRegMulticastMaskB = 0xBC, + NvRegPhyInterface = 0xC0, +#define PHY_RGMII 0x10000000 + NvRegTxRingPhysAddr = 0x100, NvRegRxRingPhysAddr = 0x104, NvRegRingSizes = 0x108, @@ -189,12 +204,12 @@ enum { NvRegUnknownTransmitterReg = 0x10c, NvRegLinkSpeed = 0x110, #define NVREG_LINKSPEED_FORCE 0x10000 -#define NVREG_LINKSPEED_10 10 +#define NVREG_LINKSPEED_10 1000 #define NVREG_LINKSPEED_100 100 -#define NVREG_LINKSPEED_1000 1000 +#define NVREG_LINKSPEED_1000 50 NvRegUnknownSetupReg5 = 0x130, #define NVREG_UNKSETUP5_BIT31 (1<<31) - NvRegUnknownSetupReg3 = 0x134, + NvRegUnknownSetupReg3 = 0x13c, #define NVREG_UNKSETUP3_VAL1 0x200010 NvRegTxRxControl = 0x144, #define NVREG_TXRXCTL_KICK 0x0001 @@ -213,15 +228,15 @@ enum { NvRegAdapterControl = 0x188, #define NVREG_ADAPTCTL_START 0x02 #define NVREG_ADAPTCTL_LINKUP 0x04 -#define NVREG_ADAPTCTL_PHYVALID 0x4000 +#define NVREG_ADAPTCTL_PHYVALID 0x40000 #define NVREG_ADAPTCTL_RUNNING 0x100000 #define NVREG_ADAPTCTL_PHYSHIFT 24 NvRegMIISpeed = 0x18c, #define NVREG_MIISPEED_BIT8 (1<<8) #define NVREG_MIIDELAY 5 NvRegMIIControl = 0x190, -#define NVREG_MIICTL_INUSE 0x10000 -#define NVREG_MIICTL_WRITE 0x08000 +#define NVREG_MIICTL_INUSE 0x08000 +#define NVREG_MIICTL_WRITE 0x00400 #define NVREG_MIICTL_ADDRSHIFT 5 NvRegMIIData = 0x194, NvRegWakeUpFlags = 0x200, @@ -253,34 +268,63 @@ enum { #define NVREG_POWERSTATE_D3 0x0003 }; +/* Big endian: should work, but is untested */ struct ring_desc { u32 PacketBuffer; - u16 Length; - u16 Flags; + u32 FlagLen; }; -#define NV_TX_LASTPACKET (1<<0) -#define NV_TX_RETRYERROR (1<<3) -#define NV_TX_LASTPACKET1 (1<<8) -#define NV_TX_DEFERRED (1<<10) -#define NV_TX_CARRIERLOST (1<<11) -#define NV_TX_LATECOLLISION (1<<12) -#define NV_TX_UNDERFLOW (1<<13) -#define NV_TX_ERROR (1<<14) -#define NV_TX_VALID (1<<15) - -#define NV_RX_DESCRIPTORVALID (1<<0) -#define NV_RX_MISSEDFRAME (1<<1) -#define NV_RX_SUBSTRACT1 (1<<3) -#define NV_RX_ERROR1 (1<<7) -#define NV_RX_ERROR2 (1<<8) -#define NV_RX_ERROR3 (1<<9) -#define NV_RX_ERROR4 (1<<10) -#define NV_RX_CRCERR (1<<11) -#define NV_RX_OVERFLOW (1<<12) -#define NV_RX_FRAMINGERR (1<<13) -#define NV_RX_ERROR (1<<14) -#define NV_RX_AVAIL (1<<15) +#define FLAG_MASK_V1 0xffff0000 +#define FLAG_MASK_V2 0xffffc000 +#define LEN_MASK_V1 (0xffffffff ^ FLAG_MASK_V1) +#define LEN_MASK_V2 (0xffffffff ^ FLAG_MASK_V2) + +#define NV_TX_LASTPACKET (1<<16) +#define NV_TX_RETRYERROR (1<<19) +#define NV_TX_LASTPACKET1 (1<<24) +#define NV_TX_DEFERRED (1<<26) +#define NV_TX_CARRIERLOST (1<<27) +#define NV_TX_LATECOLLISION (1<<28) +#define NV_TX_UNDERFLOW (1<<29) +#define NV_TX_ERROR (1<<30) +#define NV_TX_VALID (1<<31) + +#define NV_TX2_LASTPACKET (1<<29) +#define NV_TX2_RETRYERROR (1<<18) +#define NV_TX2_LASTPACKET1 (1<<23) +#define NV_TX2_DEFERRED (1<<25) +#define NV_TX2_CARRIERLOST (1<<26) +#define NV_TX2_LATECOLLISION (1<<27) +#define NV_TX2_UNDERFLOW (1<<28) +/* error and valid are the same for both */ +#define NV_TX2_ERROR (1<<30) +#define NV_TX2_VALID (1<<31) + +#define NV_RX_DESCRIPTORVALID (1<<16) +#define NV_RX_MISSEDFRAME (1<<17) +#define NV_RX_SUBSTRACT1 (1<<18) +#define NV_RX_ERROR1 (1<<23) +#define NV_RX_ERROR2 (1<<24) +#define NV_RX_ERROR3 (1<<25) +#define NV_RX_ERROR4 (1<<26) +#define NV_RX_CRCERR (1<<27) +#define NV_RX_OVERFLOW (1<<28) +#define NV_RX_FRAMINGERR (1<<29) +#define NV_RX_ERROR (1<<30) +#define NV_RX_AVAIL (1<<31) + +#define NV_RX2_DESCRIPTORVALID (1<<29) +#define NV_RX2_SUBSTRACT1 (1<<25) +#define NV_RX2_ERROR1 (1<<18) +#define NV_RX2_ERROR2 (1<<19) +#define NV_RX2_ERROR3 (1<<20) +#define NV_RX2_ERROR4 (1<<21) +#define NV_RX2_CRCERR (1<<22) +#define NV_RX2_OVERFLOW (1<<23) +#define NV_RX2_FRAMINGERR (1<<24) +/* error and avail are the same for both */ +#define NV_RX2_ERROR (1<<30) +#define NV_RX2_AVAIL (1<<31) /* Miscelaneous hardware related defines: */ #define NV_PCI_REGSZ 0x270 @@ -306,28 +350,67 @@ struct ring_desc { /* General driver defaults */ #define NV_WATCHDOG_TIMEO (5*HZ) -#define DEFAULT_MTU 1500 /* also maximum supported, at least for now */ #define RX_RING 128 -#define TX_RING 16 -/* limited to 1 packet until we understand NV_TX_LASTPACKET */ -#define TX_LIMIT_STOP 10 -#define TX_LIMIT_START 5 +#define TX_RING 64 +/* + * If your nic mysteriously hangs then try to reduce the limits + * to 1/0: It might be required to set NV_TX_LASTPACKET in the + * last valid ring entry. But this would be impossible to + * implement - probably a disassembly error. + */ +#define TX_LIMIT_STOP 63 +#define TX_LIMIT_START 62 /* rx/tx mac addr + type + vlan + align + slack*/ -#define RX_NIC_BUFSIZE (DEFAULT_MTU + 64) +#define RX_NIC_BUFSIZE (ETH_DATA_LEN + 64) /* even more slack */ -#define RX_ALLOC_BUFSIZE (DEFAULT_MTU + 128) +#define RX_ALLOC_BUFSIZE (ETH_DATA_LEN + 128) #define OOM_REFILL (1+HZ/20) #define POLL_WAIT (1+HZ/100) +#define LINK_TIMEOUT (3*HZ) + +#define DESC_VER_1 0x0 +#define DESC_VER_2 0x02100 + +/* PHY defines */ +#define PHY_OUI_MARVELL 0x5043 +#define PHY_OUI_CICADA 0x03f1 +#define PHYID1_OUI_MASK 0x03ff +#define PHYID1_OUI_SHFT 6 +#define PHYID2_OUI_MASK 0xfc00 +#define PHYID2_OUI_SHFT 10 +#define PHY_INIT1 0x0f000 +#define PHY_INIT2 0x0e00 +#define PHY_INIT3 0x01000 +#define PHY_INIT4 0x0200 +#define PHY_INIT5 0x0004 +#define PHY_INIT6 0x02000 +#define PHY_GIGABIT 0x0100 + +#define PHY_TIMEOUT 0x1 +#define PHY_ERROR 0x2 + +#define PHY_100 0x1 +#define PHY_1000 0x2 +#define PHY_HALF 0x100 + +/* FIXME: MII defines that should be added to */ +#define MII_1000BT_CR 0x09 +#define MII_1000BT_SR 0x0a +#define ADVERTISE_1000FULL 0x0200 +#define ADVERTISE_1000HALF 0x0100 +#define LPA_1000FULL 0x0800 +#define LPA_1000HALF 0x0400 + /* * SMP locking: * All hardware access under dev->priv->lock, except the performance * critical parts: * - rx is (pseudo-) lockless: it relies on the single-threading provided - * by the arch code for interrupts. + * by the arch code for interrupts. * - tx setup is lockless: it relies on dev->xmit_lock. Actual submission * needs dev->priv->lock :-( * - set_multicast_list: preparation lockless, relies on dev->xmit_lock. @@ -345,12 +428,15 @@ struct fe_priv { int duplex; int phyaddr; int wolenabled; + unsigned int phy_oui; + u16 gigabit; /* General data: RO fields */ dma_addr_t ring_addr; struct pci_dev *pci_dev; u32 orig_mac[2]; u32 irqmask; + u32 desc_ver; /* rx specific fields. * Locking: Within irq hander or disable_irq+spin_lock(&np->lock); @@ -363,6 +449,11 @@ struct fe_priv { struct timer_list oom_kick; struct timer_list nic_poll; + /* media detection workaround. + * Locking: Within irq hander or disable_irq+spin_lock(&np->lock); + */ + int need_linktimer; + unsigned long link_timeout; /* * tx specific fields. */ @@ -370,7 +461,7 @@ struct fe_priv { unsigned int next_tx, nic_tx; struct sk_buff *tx_skbuff[TX_RING]; dma_addr_t tx_dma[TX_RING]; - u16 tx_flags; + u32 tx_flags; }; /* @@ -395,6 +486,12 @@ static inline void pci_push(u8 * base) readl(base); } +static inline u32 nv_descr_getlength(struct ring_desc *prd, u32 v) +{ + return le32_to_cpu(prd->FlagLen) + & ((v == DESC_VER_1) ? LEN_MASK_V1 : LEN_MASK_V2); +} + static int reg_delay(struct net_device *dev, int offset, u32 mask, u32 target, int delay, int delaymax, const char *msg) { @@ -421,24 +518,18 @@ static int reg_delay(struct net_device * static int mii_rw(struct net_device *dev, int addr, int miireg, int value) { u8 *base = get_hwbase(dev); - int was_running; u32 reg; int retval; writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus); - was_running = 0; - reg = readl(base + NvRegAdapterControl); - if (reg & NVREG_ADAPTCTL_RUNNING) { - was_running = 1; - writel(reg & ~NVREG_ADAPTCTL_RUNNING, base + NvRegAdapterControl); - } + reg = readl(base + NvRegMIIControl); if (reg & NVREG_MIICTL_INUSE) { writel(NVREG_MIICTL_INUSE, base + NvRegMIIControl); udelay(NV_MIIBUSY_DELAY); } - reg = NVREG_MIICTL_INUSE | (addr << NVREG_MIICTL_ADDRSHIFT) | miireg; + reg = (addr << NVREG_MIICTL_ADDRSHIFT) | miireg; if (value != MII_READ) { writel(value, base + NvRegMIIData); reg |= NVREG_MIICTL_WRITE; @@ -460,19 +551,117 @@ static int mii_rw(struct net_device *dev dev->name, miireg, addr); retval = -1; } else { - /* FIXME: why is that required? */ - udelay(50); retval = readl(base + NvRegMIIData); dprintk(KERN_DEBUG "%s: mii_rw read from reg %d at PHY %d: 0x%x.\n", dev->name, miireg, addr, retval); } - if (was_running) { - reg = readl(base + NvRegAdapterControl); - writel(reg | NVREG_ADAPTCTL_RUNNING, base + NvRegAdapterControl); - } + return retval; } +static int phy_reset(struct net_device *dev) +{ + struct fe_priv *np = get_nvpriv(dev); + u32 miicontrol; + unsigned int tries = 0; + + miicontrol = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); + miicontrol |= BMCR_RESET; + if (mii_rw(dev, np->phyaddr, MII_BMCR, miicontrol)) { + return -1; + } + + /* wait for 500ms */ + mdelay(500); + + /* must wait till reset is deasserted */ + while (miicontrol & BMCR_RESET) { + mdelay(10); + miicontrol = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); + /* FIXME: 100 tries seem excessive */ + if (tries++ > 100) + return -1; + } + return 0; +} + +static int phy_init(struct net_device *dev) +{ + struct fe_priv *np = get_nvpriv(dev); + u8 *base = get_hwbase(dev); + u32 phyinterface, phy_reserved, mii_status, mii_control, mii_control_1000,reg; + + /* set advertise register */ + reg = mii_rw(dev, np->phyaddr, MII_ADVERTISE, MII_READ); + reg |= (ADVERTISE_10HALF|ADVERTISE_10FULL|ADVERTISE_100HALF|ADVERTISE_100FULL|0x800|0x400); + if (mii_rw(dev, np->phyaddr, MII_ADVERTISE, reg)) { + printk(KERN_INFO "%s: phy write to advertise failed.\n", pci_name(np->pci_dev)); + return PHY_ERROR; + } + + /* get phy interface type */ + phyinterface = readl(base + NvRegPhyInterface); + + /* see if gigabit phy */ + mii_status = mii_rw(dev, np->phyaddr, MII_BMSR, MII_READ); + if (mii_status & PHY_GIGABIT) { + np->gigabit = PHY_GIGABIT; + mii_control_1000 = mii_rw(dev, np->phyaddr, MII_1000BT_CR, MII_READ); + mii_control_1000 &= ~ADVERTISE_1000HALF; + if (phyinterface & PHY_RGMII) + mii_control_1000 |= ADVERTISE_1000FULL; + else + mii_control_1000 &= ~ADVERTISE_1000FULL; + + if (mii_rw(dev, np->phyaddr, MII_1000BT_CR, mii_control_1000)) { + printk(KERN_INFO "%s: phy init failed.\n", pci_name(np->pci_dev)); + return PHY_ERROR; + } + } + else + np->gigabit = 0; + + /* reset the phy */ + if (phy_reset(dev)) { + printk(KERN_INFO "%s: phy reset failed\n", pci_name(np->pci_dev)); + return PHY_ERROR; + } + + /* phy vendor specific configuration */ + if ((np->phy_oui == PHY_OUI_CICADA) && (phyinterface & PHY_RGMII) ) { + phy_reserved = mii_rw(dev, np->phyaddr, MII_RESV1, MII_READ); + phy_reserved &= ~(PHY_INIT1 | PHY_INIT2); + phy_reserved |= (PHY_INIT3 | PHY_INIT4); + if (mii_rw(dev, np->phyaddr, MII_RESV1, phy_reserved)) { + printk(KERN_INFO "%s: phy init failed.\n", pci_name(np->pci_dev)); + return PHY_ERROR; + } + phy_reserved = mii_rw(dev, np->phyaddr, MII_NCONFIG, MII_READ); + phy_reserved |= PHY_INIT5; + if (mii_rw(dev, np->phyaddr, MII_NCONFIG, phy_reserved)) { + printk(KERN_INFO "%s: phy init failed.\n", pci_name(np->pci_dev)); + return PHY_ERROR; + } + } + if (np->phy_oui == PHY_OUI_CICADA) { + phy_reserved = mii_rw(dev, np->phyaddr, MII_SREVISION, MII_READ); + phy_reserved |= PHY_INIT6; + if (mii_rw(dev, np->phyaddr, MII_SREVISION, phy_reserved)) { + printk(KERN_INFO "%s: phy init failed.\n", pci_name(np->pci_dev)); + return PHY_ERROR; + } + } + + /* restart auto negotiation */ + mii_control = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); + mii_control |= (BMCR_ANRESTART | BMCR_ANENABLE); + if (mii_rw(dev, np->phyaddr, MII_BMCR, mii_control)) { + return PHY_ERROR; + } + + return 0; +} + static void nv_start_rx(struct net_device *dev) { struct fe_priv *np = get_nvpriv(dev); @@ -487,6 +676,8 @@ static void nv_start_rx(struct net_devic writel(np->linkspeed, base + NvRegLinkSpeed); pci_push(base); writel(NVREG_RCVCTL_START, base + NvRegReceiverControl); + dprintk(KERN_DEBUG "%s: nv_start_rx to duplex %d, speed 0x%08x.\n", + dev->name, np->duplex, np->linkspeed); pci_push(base); } @@ -497,8 +688,8 @@ static void nv_stop_rx(struct net_device dprintk(KERN_DEBUG "%s: nv_stop_rx\n", dev->name); writel(0, base + NvRegReceiverControl); reg_delay(dev, NvRegReceiverStatus, NVREG_RCVSTAT_BUSY, 0, - NV_RXSTOP_DELAY1, NV_RXSTOP_DELAY1MAX, - KERN_INFO "nv_stop_rx: ReceiverStatus remained busy"); + NV_RXSTOP_DELAY1, NV_RXSTOP_DELAY1MAX, + KERN_INFO "nv_stop_rx: ReceiverStatus remained busy"); udelay(NV_RXSTOP_DELAY2); writel(0, base + NvRegLinkSpeed); @@ -520,8 +711,8 @@ static void nv_stop_tx(struct net_device dprintk(KERN_DEBUG "%s: nv_stop_tx\n", dev->name); writel(0, base + NvRegTransmitterControl); reg_delay(dev, NvRegTransmitterStatus, NVREG_XMITSTAT_BUSY, 0, - NV_TXSTOP_DELAY1, NV_TXSTOP_DELAY1MAX, - KERN_INFO "nv_stop_tx: TransmitterStatus remained busy"); + NV_TXSTOP_DELAY1, NV_TXSTOP_DELAY1MAX, + KERN_INFO "nv_stop_tx: TransmitterStatus remained busy"); udelay(NV_TXSTOP_DELAY2); writel(0, base + NvRegUnknownTransmitterReg); @@ -529,13 +720,14 @@ static void nv_stop_tx(struct net_device static void nv_txrx_reset(struct net_device *dev) { + struct fe_priv *np = get_nvpriv(dev); u8 *base = get_hwbase(dev); dprintk(KERN_DEBUG "%s: nv_txrx_reset\n", dev->name); - writel(NVREG_TXRXCTL_BIT2 | NVREG_TXRXCTL_RESET, base + NvRegTxRxControl); + writel(NVREG_TXRXCTL_BIT2 | NVREG_TXRXCTL_RESET | np->desc_ver, base + NvRegTxRxControl); pci_push(base); udelay(NV_TXRX_RESET_DELAY); - writel(NVREG_TXRXCTL_BIT2, base + NvRegTxRxControl); + writel(NVREG_TXRXCTL_BIT2 | np->desc_ver, base + NvRegTxRxControl); pci_push(base); } @@ -556,7 +748,7 @@ static struct net_device_stats *nv_get_s return &np->stats; } -static int nv_ethtool_ioctl(struct net_device *dev, void *useraddr) +static int nv_ethtool_ioctl(struct net_device *dev, void __user *useraddr) { struct fe_priv *np = get_nvpriv(dev); u8 *base = get_hwbase(dev); @@ -634,7 +826,7 @@ static int nv_ioctl(struct net_device *d { switch(cmd) { case SIOCETHTOOL: - return nv_ethtool_ioctl(dev, (void *) rq->ifr_data); + return nv_ethtool_ioctl(dev, rq->ifr_data); default: return -EOPNOTSUPP; @@ -650,11 +842,12 @@ static int nv_alloc_rx(struct net_device { struct fe_priv *np = get_nvpriv(dev); unsigned int refill_rx = np->refill_rx; + int nr; while (np->cur_rx != refill_rx) { - int nr = refill_rx % RX_RING; struct sk_buff *skb; + nr = refill_rx % RX_RING; if (np->rx_skbuff[nr] == NULL) { skb = dev_alloc_skb(RX_ALLOC_BUFSIZE); @@ -669,10 +862,9 @@ static int nv_alloc_rx(struct net_device np->rx_dma[nr] = pci_map_single(np->pci_dev, skb->data, skb->len, PCI_DMA_FROMDEVICE); np->rx_ring[nr].PacketBuffer = cpu_to_le32(np->rx_dma[nr]); - np->rx_ring[nr].Length = cpu_to_le16(RX_NIC_BUFSIZE); wmb(); - np->rx_ring[nr].Flags = cpu_to_le16(NV_RX_AVAIL); - dprintk(KERN_DEBUG "%s: nv_alloc_rx: Packet %d marked as Available\n", + np->rx_ring[nr].FlagLen = cpu_to_le32(RX_NIC_BUFSIZE | NV_RX_AVAIL); + dprintk(KERN_DEBUG "%s: nv_alloc_rx: Packet %d marked as Available\n", dev->name, refill_rx); refill_rx++; } @@ -703,15 +895,13 @@ static int nv_init_ring(struct net_devic int i; np->next_tx = np->nic_tx = 0; - for (i = 0; i < TX_RING; i++) { - np->tx_ring[i].Flags = 0; - } + for (i = 0; i < TX_RING; i++) + np->tx_ring[i].FlagLen = 0; np->cur_rx = RX_RING; np->refill_rx = 0; - for (i = 0; i < RX_RING; i++) { - np->rx_ring[i].Flags = 0; - } + for (i = 0; i < RX_RING; i++) + np->rx_ring[i].FlagLen = 0; return nv_alloc_rx(dev); } @@ -720,7 +910,7 @@ static void nv_drain_tx(struct net_devic struct fe_priv *np = get_nvpriv(dev); int i; for (i = 0; i < TX_RING; i++) { - np->tx_ring[i].Flags = 0; + np->tx_ring[i].FlagLen = 0; if (np->tx_skbuff[i]) { pci_unmap_single(np->pci_dev, np->tx_dma[i], np->tx_skbuff[i]->len, @@ -737,7 +927,7 @@ static void nv_drain_rx(struct net_devic struct fe_priv *np = get_nvpriv(dev); int i; for (i = 0; i < RX_RING; i++) { - np->rx_ring[i].Flags = 0; + np->rx_ring[i].FlagLen = 0; wmb(); if (np->rx_skbuff[i]) { pci_unmap_single(np->pci_dev, np->rx_dma[i], @@ -769,11 +959,10 @@ static int nv_start_xmit(struct sk_buff PCI_DMA_TODEVICE); np->tx_ring[nr].PacketBuffer = cpu_to_le32(np->tx_dma[nr]); - np->tx_ring[nr].Length = cpu_to_le16(skb->len-1); spin_lock_irq(&np->lock); wmb(); - np->tx_ring[nr].Flags = np->tx_flags; + np->tx_ring[nr].FlagLen = cpu_to_le32( (skb->len-1) | np->tx_flags ); dprintk(KERN_DEBUG "%s: nv_start_xmit: packet packet %d queued for transmission.\n", dev->name, np->next_tx); { @@ -792,7 +981,7 @@ static int nv_start_xmit(struct sk_buff if (np->next_tx - np->nic_tx >= TX_LIMIT_STOP) netif_stop_queue(dev); spin_unlock_irq(&np->lock); - writel(NVREG_TXRXCTL_KICK, get_hwbase(dev) + NvRegTxRxControl); + writel(NVREG_TXRXCTL_KICK|np->desc_ver, get_hwbase(dev) + NvRegTxRxControl); pci_push(get_hwbase(dev)); return 0; } @@ -805,27 +994,42 @@ static int nv_start_xmit(struct sk_buff static void nv_tx_done(struct net_device *dev) { struct fe_priv *np = get_nvpriv(dev); + u32 Flags; + int i; - while (np->nic_tx < np->next_tx) { - struct ring_desc *prd; - int i = np->nic_tx % TX_RING; + while (np->nic_tx != np->next_tx) { + i = np->nic_tx % TX_RING; - prd = &np->tx_ring[i]; + Flags = le32_to_cpu(np->tx_ring[i].FlagLen); dprintk(KERN_DEBUG "%s: nv_tx_done: looking at packet %d, Flags 0x%x.\n", - dev->name, np->nic_tx, prd->Flags); - if (prd->Flags & cpu_to_le16(NV_TX_VALID)) + dev->name, np->nic_tx, Flags); + if (Flags & NV_TX_VALID) break; - if (prd->Flags & cpu_to_le16(NV_TX_RETRYERROR|NV_TX_CARRIERLOST|NV_TX_LATECOLLISION| - NV_TX_UNDERFLOW|NV_TX_ERROR)) { - if (prd->Flags & cpu_to_le16(NV_TX_UNDERFLOW)) - np->stats.tx_fifo_errors++; - if (prd->Flags & cpu_to_le16(NV_TX_CARRIERLOST)) - np->stats.tx_carrier_errors++; - np->stats.tx_errors++; + if (np->desc_ver == DESC_VER_1) { + if (Flags & (NV_TX_RETRYERROR|NV_TX_CARRIERLOST|NV_TX_LATECOLLISION| + NV_TX_UNDERFLOW|NV_TX_ERROR)) { + if (Flags & NV_TX_UNDERFLOW) + np->stats.tx_fifo_errors++; + if (Flags & NV_TX_CARRIERLOST) + np->stats.tx_carrier_errors++; + np->stats.tx_errors++; + } else { + np->stats.tx_packets++; + np->stats.tx_bytes += np->tx_skbuff[i]->len; + } } else { - np->stats.tx_packets++; - np->stats.tx_bytes += np->tx_skbuff[i]->len; + if (Flags & (NV_TX2_RETRYERROR|NV_TX2_CARRIERLOST|NV_TX2_LATECOLLISION| + NV_TX2_UNDERFLOW|NV_TX2_ERROR)) { + if (Flags & NV_TX2_UNDERFLOW) + np->stats.tx_fifo_errors++; + if (Flags & NV_TX2_CARRIERLOST) + np->stats.tx_carrier_errors++; + np->stats.tx_errors++; + } else { + np->stats.tx_packets++; + np->stats.tx_bytes += np->tx_skbuff[i]->len; + } } pci_unmap_single(np->pci_dev, np->tx_dma[i], np->tx_skbuff[i]->len, @@ -875,9 +1079,9 @@ static void nv_tx_timeout(struct net_dev static void nv_rx_process(struct net_device *dev) { struct fe_priv *np = get_nvpriv(dev); + u32 Flags; for (;;) { - struct ring_desc *prd; struct sk_buff *skb; int len; int i; @@ -885,11 +1089,13 @@ static void nv_rx_process(struct net_dev break; /* we scanned the whole ring - do not continue */ i = np->cur_rx % RX_RING; - prd = &np->rx_ring[i]; + Flags = le32_to_cpu(np->rx_ring[i].FlagLen); + len = nv_descr_getlength(&np->rx_ring[i], np->desc_ver); + dprintk(KERN_DEBUG "%s: nv_rx_process: looking at packet %d, Flags 0x%x.\n", - dev->name, np->cur_rx, prd->Flags); + dev->name, np->cur_rx, Flags); - if (prd->Flags & cpu_to_le16(NV_RX_AVAIL)) + if (Flags & NV_RX_AVAIL) break; /* still owned by hardware, */ /* @@ -903,7 +1109,7 @@ static void nv_rx_process(struct net_dev { int j; - dprintk(KERN_DEBUG "Dumping packet (flags 0x%x).",prd->Flags); + dprintk(KERN_DEBUG "Dumping packet (flags 0x%x).",Flags); for (j=0; j<64; j++) { if ((j%16) == 0) dprintk("\n%03x:", j); @@ -912,41 +1118,69 @@ static void nv_rx_process(struct net_dev dprintk("\n"); } /* look at what we actually got: */ - if (!(prd->Flags & cpu_to_le16(NV_RX_DESCRIPTORVALID))) - goto next_pkt; - - - len = le16_to_cpu(prd->Length); + if (np->desc_ver == DESC_VER_1) { + if (!(Flags & NV_RX_DESCRIPTORVALID)) + goto next_pkt; - if (prd->Flags & cpu_to_le16(NV_RX_MISSEDFRAME)) { - np->stats.rx_missed_errors++; - np->stats.rx_errors++; - goto next_pkt; - } - if (prd->Flags & cpu_to_le16(NV_RX_ERROR1|NV_RX_ERROR2|NV_RX_ERROR3|NV_RX_ERROR4)) { - np->stats.rx_errors++; - goto next_pkt; - } - if (prd->Flags & cpu_to_le16(NV_RX_CRCERR)) { - np->stats.rx_crc_errors++; - np->stats.rx_errors++; - goto next_pkt; - } - if (prd->Flags & cpu_to_le16(NV_RX_OVERFLOW)) { - np->stats.rx_over_errors++; - np->stats.rx_errors++; - goto next_pkt; - } - if (prd->Flags & cpu_to_le16(NV_RX_ERROR)) { - /* framing errors are soft errors, the rest is fatal. */ - if (prd->Flags & cpu_to_le16(NV_RX_FRAMINGERR)) { - if (prd->Flags & cpu_to_le16(NV_RX_SUBSTRACT1)) { - len--; + if (Flags & NV_RX_MISSEDFRAME) { + np->stats.rx_missed_errors++; + np->stats.rx_errors++; + goto next_pkt; + } + if (Flags & (NV_RX_ERROR1|NV_RX_ERROR2|NV_RX_ERROR3|NV_RX_ERROR4)) { + np->stats.rx_errors++; + goto next_pkt; + } + if (Flags & NV_RX_CRCERR) { + np->stats.rx_crc_errors++; + np->stats.rx_errors++; + goto next_pkt; + } + if (Flags & NV_RX_OVERFLOW) { + np->stats.rx_over_errors++; + np->stats.rx_errors++; + goto next_pkt; + } + if (Flags & NV_RX_ERROR) { + /* framing errors are soft errors, the rest is fatal. */ + if (Flags & NV_RX_FRAMINGERR) { + if (Flags & NV_RX_SUBSTRACT1) { + len--; + } + } else { + np->stats.rx_errors++; + goto next_pkt; } - } else { + } + } else { + if (!(Flags & NV_RX2_DESCRIPTORVALID)) + goto next_pkt; + + if (Flags & (NV_RX2_ERROR1|NV_RX2_ERROR2|NV_RX2_ERROR3|NV_RX2_ERROR4)) { + np->stats.rx_errors++; + goto next_pkt; + } + if (Flags & NV_RX2_CRCERR) { + np->stats.rx_crc_errors++; np->stats.rx_errors++; goto next_pkt; } + if (Flags & NV_RX2_OVERFLOW) { + np->stats.rx_over_errors++; + np->stats.rx_errors++; + goto next_pkt; + } + if (Flags & NV_RX2_ERROR) { + /* framing errors are soft errors, the rest is fatal. */ + if (Flags & NV_RX2_FRAMINGERR) { + if (Flags & NV_RX2_SUBSTRACT1) { + len--; + } + } else { + np->stats.rx_errors++; + goto next_pkt; + } + } } /* got a valid packet - forward it to the network core */ skb = np->rx_skbuff[i]; @@ -971,7 +1205,7 @@ next_pkt: */ static int nv_change_mtu(struct net_device *dev, int new_mtu) { - if (new_mtu > DEFAULT_MTU) + if (new_mtu > ETH_DATA_LEN) return -EINVAL; dev->mtu = new_mtu; return 0; @@ -1035,6 +1269,8 @@ static void nv_set_multicast(struct net_ writel(mask[0], base + NvRegMulticastMaskA); writel(mask[1], base + NvRegMulticastMaskB); writel(pff, base + NvRegPacketFilterFlags); + dprintk(KERN_INFO "%s: reconfiguration for multicast lists.\n", + dev->name); nv_start_rx(dev); spin_unlock_irq(&np->lock); } @@ -1042,16 +1278,62 @@ static void nv_set_multicast(struct net_ static int nv_update_linkspeed(struct net_device *dev) { struct fe_priv *np = get_nvpriv(dev); - int adv, lpa, newls, newdup; + u8 *base = get_hwbase(dev); + int adv, lpa; + int newls = np->linkspeed; + int newdup = np->duplex; + int mii_status; + int retval = 0; + u32 control_1000, status_1000, phyreg; + + /* BMSR_LSTATUS is latched, read it twice: + * we want the current value. + */ + mii_rw(dev, np->phyaddr, MII_BMSR, MII_READ); + mii_status = mii_rw(dev, np->phyaddr, MII_BMSR, MII_READ); + + if (!(mii_status & BMSR_LSTATUS)) { + dprintk(KERN_DEBUG "%s: no link detected by phy - falling back to 10HD.\n", + dev->name); + newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10; + newdup = 0; + retval = 0; + goto set_speed; + } + + /* check auto negotiation is complete */ + if (!(mii_status & BMSR_ANEGCOMPLETE)) { + /* still in autonegotiation - configure nic for 10 MBit HD and wait. */ + newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10; + newdup = 0; + retval = 0; + dprintk(KERN_DEBUG "%s: autoneg not completed - falling back to 10HD.\n", dev->name); + goto set_speed; + } + + retval = 1; + if (np->gigabit == PHY_GIGABIT) { + control_1000 = mii_rw(dev, np->phyaddr, MII_1000BT_CR, MII_READ); + status_1000 = mii_rw(dev, np->phyaddr, MII_1000BT_SR, MII_READ); + + if ((control_1000 & ADVERTISE_1000FULL) && + (status_1000 & LPA_1000FULL)) { + dprintk(KERN_DEBUG "%s: nv_update_linkspeed: GBit ethernet detected.\n", + dev->name); + newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_1000; + newdup = 1; + goto set_speed; + } + } adv = mii_rw(dev, np->phyaddr, MII_ADVERTISE, MII_READ); lpa = mii_rw(dev, np->phyaddr, MII_LPA, MII_READ); dprintk(KERN_DEBUG "%s: nv_update_linkspeed: PHY advertises 0x%04x, lpa 0x%04x.\n", dev->name, adv, lpa); - /* FIXME: handle parallel detection properly, handle gigabit ethernet */ + /* FIXME: handle parallel detection properly */ lpa = lpa & adv; - if (lpa & LPA_100FULL) { + if (lpa & LPA_100FULL) { newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_100; newdup = 1; } else if (lpa & LPA_100HALF) { @@ -1068,37 +1350,57 @@ static int nv_update_linkspeed(struct ne newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10; newdup = 0; } - if (np->duplex != newdup || np->linkspeed != newls) { - np->duplex = newdup; - np->linkspeed = newls; - return 1; - } - return 0; -} -static void nv_link_irq(struct net_device *dev) -{ - struct fe_priv *np = get_nvpriv(dev); - u8 *base = get_hwbase(dev); - u32 miistat; - int miival; +set_speed: + if (np->duplex == newdup && np->linkspeed == newls) + return retval; + + dprintk(KERN_INFO "%s: changing link setting from %d/%d to %d/%d.\n", + dev->name, np->linkspeed, np->duplex, newls, newdup); + + np->duplex = newdup; + np->linkspeed = newls; + + if (np->gigabit == PHY_GIGABIT) { + phyreg = readl(base + NvRegRandomSeed); + phyreg &= ~(0x3FF00); + if ((np->linkspeed & 0xFFF) == NVREG_LINKSPEED_10) + phyreg |= NVREG_RNDSEED_FORCE3; + else if ((np->linkspeed & 0xFFF) == NVREG_LINKSPEED_100) + phyreg |= NVREG_RNDSEED_FORCE2; + else if ((np->linkspeed & 0xFFF) == NVREG_LINKSPEED_1000) + phyreg |= NVREG_RNDSEED_FORCE; + writel(phyreg, base + NvRegRandomSeed); + } + + phyreg = readl(base + NvRegPhyInterface); + phyreg &= ~(PHY_HALF|PHY_100|PHY_1000); + if (np->duplex == 0) + phyreg |= PHY_HALF; + if ((np->linkspeed & 0xFFF) == NVREG_LINKSPEED_100) + phyreg |= PHY_100; + else if ((np->linkspeed & 0xFFF) == NVREG_LINKSPEED_1000) + phyreg |= PHY_1000; + writel(phyreg, base + NvRegPhyInterface); - miistat = readl(base + NvRegMIIStatus); - writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus); - printk(KERN_DEBUG "%s: link change notification, status 0x%x.\n", dev->name, miistat); + writel(NVREG_MISC1_FORCE | ( np->duplex ? 0 : NVREG_MISC1_HD), + base + NvRegMisc1); + pci_push(base); + writel(np->linkspeed, base + NvRegLinkSpeed); + pci_push(base); - miival = mii_rw(dev, np->phyaddr, MII_BMSR, MII_READ); - if (miival & BMSR_ANEGCOMPLETE) { - nv_update_linkspeed(dev); + return retval; +} +static void nv_linkchange(struct net_device *dev) +{ + if (nv_update_linkspeed(dev)) { if (netif_carrier_ok(dev)) { nv_stop_rx(dev); } else { netif_carrier_on(dev); printk(KERN_INFO "%s: link up.\n", dev->name); } - writel(NVREG_MISC1_FORCE | ( np->duplex ? 0 : NVREG_MISC1_HD), - base + NvRegMisc1); nv_start_rx(dev); } else { if (netif_carrier_ok(dev)) { @@ -1106,11 +1408,23 @@ static void nv_link_irq(struct net_devic printk(KERN_INFO "%s: link down.\n", dev->name); nv_stop_rx(dev); } - writel(np->linkspeed, base + NvRegLinkSpeed); - pci_push(base); } } +static void nv_link_irq(struct net_device *dev) +{ + u8 *base = get_hwbase(dev); + u32 miistat; + + miistat = readl(base + NvRegMIIStatus); + writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus); + dprintk(KERN_INFO "%s: link change irq, status 0x%x.\n", dev->name, miistat); + + if (miistat & (NVREG_MIISTAT_LINKCHANGE)) + nv_linkchange(dev); + dprintk(KERN_DEBUG "%s: link change notification done.\n", dev->name); +} + static irqreturn_t nv_nic_irq(int foo, void *data, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) data; @@ -1135,7 +1449,7 @@ static irqreturn_t nv_nic_irq(int foo, v spin_unlock(&np->lock); } - if (events & (NVREG_IRQ_RX|NVREG_IRQ_RX_NOBUF)) { + if (events & (NVREG_IRQ_RX_ERROR|NVREG_IRQ_RX|NVREG_IRQ_RX_NOBUF)) { nv_rx_process(dev); if (nv_alloc_rx(dev)) { spin_lock(&np->lock); @@ -1150,6 +1464,12 @@ static irqreturn_t nv_nic_irq(int foo, v nv_link_irq(dev); spin_unlock(&np->lock); } + if (np->need_linktimer && time_after(jiffies, np->link_timeout)) { + spin_lock(&np->lock); + nv_linkchange(dev); + spin_unlock(&np->lock); + np->link_timeout = jiffies + LINK_TIMEOUT; + } if (events & (NVREG_IRQ_TX_ERR)) { dprintk(KERN_DEBUG "%s: received irq with events 0x%x. Probably TX fail.\n", dev->name, events); @@ -1157,7 +1477,7 @@ static irqreturn_t nv_nic_irq(int foo, v if (events & (NVREG_IRQ_UNKNOWN)) { printk(KERN_DEBUG "%s: received irq with unknown events 0x%x. Please report\n", dev->name, events); - } + } if (i > max_interrupt_work) { spin_lock(&np->lock); /* disable interrupts on the nic */ @@ -1210,21 +1530,27 @@ static int nv_open(struct net_device *de writel(0, base + NvRegMulticastMaskA); writel(0, base + NvRegMulticastMaskB); writel(0, base + NvRegPacketFilterFlags); + + writel(0, base + NvRegTransmitterControl); + writel(0, base + NvRegReceiverControl); + writel(0, base + NvRegAdapterControl); + + /* 2) initialize descriptor rings */ + oom = nv_init_ring(dev); + writel(0, base + NvRegLinkSpeed); writel(0, base + NvRegUnknownTransmitterReg); nv_txrx_reset(dev); writel(0, base + NvRegUnknownSetupReg6); - /* 2) initialize descriptor rings */ np->in_shutdown = 0; - oom = nv_init_ring(dev); /* 3) set mac address */ { u32 mac[2]; - mac[0] = (dev->dev_addr[0] << 0) + (dev->dev_addr[1] << 8) + + mac[0] = (dev->dev_addr[0] << 0) + (dev->dev_addr[1] << 8) + (dev->dev_addr[2] << 16) + (dev->dev_addr[3] << 24); mac[1] = (dev->dev_addr[4] << 0) + (dev->dev_addr[5] << 8); @@ -1232,53 +1558,31 @@ static int nv_open(struct net_device *de writel(mac[1], base + NvRegMacAddrB); } - /* 4) continue setup */ + /* 4) give hw rings */ + writel((u32) np->ring_addr, base + NvRegRxRingPhysAddr); + writel((u32) (np->ring_addr + RX_RING*sizeof(struct ring_desc)), base + NvRegTxRingPhysAddr); + writel( ((RX_RING-1) << NVREG_RINGSZ_RXSHIFT) + ((TX_RING-1) << NVREG_RINGSZ_TXSHIFT), + base + NvRegRingSizes); + + /* 5) continue setup */ np->linkspeed = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10; np->duplex = 0; + + writel(np->linkspeed, base + NvRegLinkSpeed); writel(NVREG_UNKSETUP3_VAL1, base + NvRegUnknownSetupReg3); - writel(0, base + NvRegTxRxControl); + writel(np->desc_ver, base + NvRegTxRxControl); pci_push(base); - writel(NVREG_TXRXCTL_BIT1, base + NvRegTxRxControl); + writel(NVREG_TXRXCTL_BIT1|np->desc_ver, base + NvRegTxRxControl); reg_delay(dev, NvRegUnknownSetupReg5, NVREG_UNKSETUP5_BIT31, NVREG_UNKSETUP5_BIT31, NV_SETUP5_DELAY, NV_SETUP5_DELAYMAX, KERN_INFO "open: SetupReg5, Bit 31 remained off\n"); - writel(0, base + NvRegUnknownSetupReg4); - - /* 5) Find a suitable PHY */ - writel(NVREG_MIISPEED_BIT8|NVREG_MIIDELAY, base + NvRegMIISpeed); - for (i = 1; i < 32; i++) { - int id1, id2; - - spin_lock_irq(&np->lock); - id1 = mii_rw(dev, i, MII_PHYSID1, MII_READ); - spin_unlock_irq(&np->lock); - if (id1 < 0 || id1 == 0xffff) - continue; - spin_lock_irq(&np->lock); - id2 = mii_rw(dev, i, MII_PHYSID2, MII_READ); - spin_unlock_irq(&np->lock); - if (id2 < 0 || id2 == 0xffff) - continue; - dprintk(KERN_DEBUG "%s: open: Found PHY %04x:%04x at address %d.\n", - dev->name, id1, id2, i); - np->phyaddr = i; - - spin_lock_irq(&np->lock); - nv_update_linkspeed(dev); - spin_unlock_irq(&np->lock); - break; - } - if (i == 32) { - printk(KERN_INFO "%s: open: failing due to lack of suitable PHY.\n", - dev->name); - ret = -EINVAL; - goto out_drain; - } + writel(0, base + NvRegUnknownSetupReg4); + writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus); + writel(NVREG_MIISTAT_MASK2, base + NvRegMIIStatus); /* 6) continue setup */ - writel(NVREG_MISC1_FORCE | ( np->duplex ? 0 : NVREG_MISC1_HD), - base + NvRegMisc1); + writel(NVREG_MISC1_FORCE | NVREG_MISC1_HD, base + NvRegMisc1); writel(readl(base + NvRegTransmitterStatus), base + NvRegTransmitterStatus); writel(NVREG_PFF_ALWAYS, base + NvRegPacketFilterFlags); writel(NVREG_OFFLOAD_NORMAL, base + NvRegOffloadConfig); @@ -1290,17 +1594,12 @@ static int nv_open(struct net_device *de writel(NVREG_UNKSETUP2_VAL, base + NvRegUnknownSetupReg2); writel(NVREG_POLL_DEFAULT, base + NvRegPollingInterval); writel(NVREG_UNKSETUP6_VAL, base + NvRegUnknownSetupReg6); - writel((np->phyaddr << NVREG_ADAPTCTL_PHYSHIFT)|NVREG_ADAPTCTL_PHYVALID, + writel((np->phyaddr << NVREG_ADAPTCTL_PHYSHIFT)|NVREG_ADAPTCTL_PHYVALID|NVREG_ADAPTCTL_RUNNING, base + NvRegAdapterControl); + writel(NVREG_MIISPEED_BIT8|NVREG_MIIDELAY, base + NvRegMIISpeed); writel(NVREG_UNKSETUP4_VAL, base + NvRegUnknownSetupReg4); writel(NVREG_WAKEUPFLAGS_VAL, base + NvRegWakeUpFlags); - /* 7) start packet processing */ - writel((u32) np->ring_addr, base + NvRegRxRingPhysAddr); - writel((u32) (np->ring_addr + RX_RING*sizeof(struct ring_desc)), base + NvRegTxRingPhysAddr); - writel( ((RX_RING-1) << NVREG_RINGSZ_RXSHIFT) + ((TX_RING-1) << NVREG_RINGSZ_TXSHIFT), - base + NvRegRingSizes); - i = readl(base + NvRegPowerState); if ( (i & NVREG_POWERSTATE_POWEREDUP) == 0) writel(NVREG_POWERSTATE_POWEREDUP|i, base + NvRegPowerState); @@ -1308,13 +1607,9 @@ static int nv_open(struct net_device *de pci_push(base); udelay(10); writel(readl(base + NvRegPowerState) | NVREG_POWERSTATE_VALID, base + NvRegPowerState); - writel(NVREG_ADAPTCTL_RUNNING, base + NvRegAdapterControl); - writel(0, base + NvRegIrqMask); pci_push(base); - writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus); - pci_push(base); writel(NVREG_MIISTAT_MASK2, base + NvRegMIIStatus); writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus); pci_push(base); @@ -1323,6 +1618,7 @@ static int nv_open(struct net_device *de if (ret) goto out_drain; + /* ask for interrupts */ writel(np->irqmask, base + NvRegIrqMask); spin_lock_irq(&np->lock); @@ -1331,18 +1627,27 @@ static int nv_open(struct net_device *de writel(0, base + NvRegMulticastMaskA); writel(0, base + NvRegMulticastMaskB); writel(NVREG_PFF_ALWAYS|NVREG_PFF_MYADDR, base + NvRegPacketFilterFlags); + /* One manual link speed update: Interrupts are enabled, future link + * speed changes cause interrupts and are handled by nv_link_irq(). + */ + { + u32 miistat; + miistat = readl(base + NvRegMIIStatus); + writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus); + dprintk(KERN_INFO "startup: got 0x%08x.\n", miistat); + } + ret = nv_update_linkspeed(dev); nv_start_rx(dev); nv_start_tx(dev); netif_start_queue(dev); - if (oom) - mod_timer(&np->oom_kick, jiffies + OOM_REFILL); - if (mii_rw(dev, np->phyaddr, MII_BMSR, MII_READ) & BMSR_ANEGCOMPLETE) { + if (ret) { netif_carrier_on(dev); } else { printk("%s: no link during initialization.\n", dev->name); netif_carrier_off(dev); } - + if (oom) + mod_timer(&np->oom_kick, jiffies + OOM_REFILL); spin_unlock_irq(&np->lock); return 0; @@ -1406,7 +1711,6 @@ static int __devinit nv_probe(struct pci np->pci_dev = pci_dev; spin_lock_init(&np->lock); SET_MODULE_OWNER(dev); - SET_NETDEV_DEV(dev, &pci_dev->dev); init_timer(&np->oom_kick); np->oom_kick.data = (unsigned long) dev; @@ -1424,7 +1728,7 @@ static int __devinit nv_probe(struct pci pci_set_master(pci_dev); - err = pci_request_regions(pci_dev, dev->name); + err = pci_request_regions(pci_dev, DRV_NAME); if (err < 0) goto out_disable; @@ -1447,6 +1751,14 @@ static int __devinit nv_probe(struct pci goto out_relreg; } + /* handle different descriptor versions */ + if (pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_1 || + pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_2 || + pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_3) + np->desc_ver = DESC_VER_1; + else + np->desc_ver = DESC_VER_2; + err = -ENOMEM; dev->base_addr = (unsigned long) ioremap(addr, NV_PCI_REGSZ); if (!dev->base_addr) @@ -1506,15 +1818,65 @@ static int __devinit nv_probe(struct pci writel(0, base + NvRegWakeUpFlags); np->wolenabled = 0; - np->tx_flags = cpu_to_le16(NV_TX_LASTPACKET|NV_TX_LASTPACKET1|NV_TX_VALID); - if (id->driver_data & DEV_NEED_LASTPACKET1) - np->tx_flags |= cpu_to_le16(NV_TX_LASTPACKET1); + if (np->desc_ver == DESC_VER_1) { + np->tx_flags = NV_TX_LASTPACKET|NV_TX_VALID; + if (id->driver_data & DEV_NEED_LASTPACKET1) + np->tx_flags |= NV_TX_LASTPACKET1; + } else { + np->tx_flags = NV_TX2_LASTPACKET|NV_TX2_VALID; + if (id->driver_data & DEV_NEED_LASTPACKET1) + np->tx_flags |= NV_TX2_LASTPACKET1; + } if (id->driver_data & DEV_IRQMASK_1) np->irqmask = NVREG_IRQMASK_WANTED_1; if (id->driver_data & DEV_IRQMASK_2) np->irqmask = NVREG_IRQMASK_WANTED_2; if (id->driver_data & DEV_NEED_TIMERIRQ) np->irqmask |= NVREG_IRQ_TIMER; + if (id->driver_data & DEV_NEED_LINKTIMER) { + dprintk(KERN_INFO "%s: link timer on.\n", pci_name(pci_dev)); + np->need_linktimer = 1; + np->link_timeout = jiffies + LINK_TIMEOUT; + } else { + dprintk(KERN_INFO "%s: link timer off.\n", pci_name(pci_dev)); + np->need_linktimer = 0; + } + + /* find a suitable phy */ + for (i = 1; i < 32; i++) { + int id1, id2; + + spin_lock_irq(&np->lock); + id1 = mii_rw(dev, i, MII_PHYSID1, MII_READ); + spin_unlock_irq(&np->lock); + if (id1 < 0 || id1 == 0xffff) + continue; + spin_lock_irq(&np->lock); + id2 = mii_rw(dev, i, MII_PHYSID2, MII_READ); + spin_unlock_irq(&np->lock); + if (id2 < 0 || id2 == 0xffff) + continue; + + id1 = (id1 & PHYID1_OUI_MASK) << PHYID1_OUI_SHFT; + id2 = (id2 & PHYID2_OUI_MASK) >> PHYID2_OUI_SHFT; + dprintk(KERN_DEBUG "%s: open: Found PHY %04x:%04x at address %d.\n", + pci_name(pci_dev), id1, id2, i); + np->phyaddr = i; + np->phy_oui = id1 | id2; + break; + } + if (i == 32) { + /* PHY in isolate mode? No phy attached and user wants to + * test loopback? Very odd, but can be correct. + */ + printk(KERN_INFO "%s: open: Could not find a valid PHY.\n", + pci_name(pci_dev)); + } + + if (i != 32) { + /* reset it */ + phy_init(dev); + } err = register_netdev(dev); if (err) { @@ -1569,21 +1931,77 @@ static void __devexit nv_remove(struct p static struct pci_device_id pci_tbl[] = { { /* nForce Ethernet Controller */ .vendor = PCI_VENDOR_ID_NVIDIA, - .device = 0x1C3, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_1, .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, - .driver_data = DEV_IRQMASK_1|DEV_NEED_TIMERIRQ, + .driver_data = DEV_IRQMASK_1|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER, }, { /* nForce2 Ethernet Controller */ .vendor = PCI_VENDOR_ID_NVIDIA, - .device = 0x0066, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_2, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER, + }, + { /* nForce3 Ethernet Controller */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_3, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER, + }, + { /* nForce3 Ethernet Controller */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_4, .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, }, { /* nForce3 Ethernet Controller */ .vendor = PCI_VENDOR_ID_NVIDIA, - .device = 0x00D6, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_5, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, + }, + { /* nForce3 Ethernet Controller */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_6, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, + }, + { /* nForce3 Ethernet Controller */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_7, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, + }, + { /* CK804 Ethernet Controller */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_8, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, + }, + { /* CK804 Ethernet Controller */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_9, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, + }, + { /* MCP04 Ethernet Controller */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_10, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, + }, + { /* MCP04 Ethernet Controller */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_11, .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, @@ -1612,7 +2030,7 @@ static void __exit exit_nic(void) MODULE_PARM(max_interrupt_work, "i"); MODULE_PARM_DESC(max_interrupt_work, "forcedeth maximum events handled per interrupt"); - + MODULE_AUTHOR("Manfred Spraul "); MODULE_DESCRIPTION("Reverse Engineered nForce ethernet driver"); MODULE_LICENSE("GPL"); --- 2.4/include/linux/pci_ids.h 2004-10-17 11:37:27.179629041 +0200 +++ build-2.4/include/linux/pci_ids.h 2004-10-17 11:47:58.651240827 +0200 @@ -981,24 +981,34 @@ #define PCI_DEVICE_ID_NVIDIA_UVTNT2 0x002D #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE 0x0035 #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA 0x0036 +#define PCI_DEVICE_ID_NVIDIA_NVENET_10 0x0037 +#define PCI_DEVICE_ID_NVIDIA_NVENET_11 0x0038 #define PCI_DEVICE_ID_NVIDIA_MCP04_AUDIO 0x003a #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2 0x003e #define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE 0x0053 #define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA 0x0054 #define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2 0x0055 +#define PCI_DEVICE_ID_NVIDIA_NVENET_8 0x0056 +#define PCI_DEVICE_ID_NVIDIA_NVENET_9 0x0057 #define PCI_DEVICE_ID_NVIDIA_CK804_AUDIO 0x0059 #define PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE 0x0065 +#define PCI_DEVICE_ID_NVIDIA_NVENET_2 0x0066 #define PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO 0x006a #define PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE 0x0085 +#define PCI_DEVICE_ID_NVIDIA_NVENET_4 0x0086 +#define PCI_DEVICE_ID_NVIDIA_NVENET_5 0x008c #define PCI_DEVICE_ID_NVIDIA_MCP2S_AUDIO 0x008a #define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA 0x008e #define PCI_DEVICE_ID_NVIDIA_ITNT2 0x00A0 #define PCI_DEVICE_ID_NVIDIA_NFORCE3 0x00d1 #define PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE 0x00d5 +#define PCI_DEVICE_ID_NVIDIA_NVENET_3 0x00d6 #define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da +#define PCI_DEVICE_ID_NVIDIA_NVENET_7 0x00df #define PCI_DEVICE_ID_NVIDIA_NFORCE3S 0x00e1 #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA 0x00e3 #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE 0x00e5 +#define PCI_DEVICE_ID_NVIDIA_NVENET_6 0x00e6 #define PCI_DEVICE_ID_NVIDIA_CK8S_AUDIO 0x00ea #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2 0x00ee #define PCI_DEVICE_ID_NVIDIA_GEFORCE_SDR 0x0100 @@ -1016,6 +1026,7 @@ #define PCI_DEVICE_ID_NVIDIA_NFORCE 0x01a4 #define PCI_DEVICE_ID_NVIDIA_MCP1_AUDIO 0x01b1 #define PCI_DEVICE_ID_NVIDIA_NFORCE_IDE 0x01bc +#define PCI_DEVICE_ID_NVIDIA_NVENET_1 0x01c3 #define PCI_DEVICE_ID_NVIDIA_NFORCE2 0x01e0 #define PCI_DEVICE_ID_NVIDIA_GEFORCE3 0x0200 #define PCI_DEVICE_ID_NVIDIA_GEFORCE3_1 0x0201 From romieu@fr.zoreil.com Sun Oct 17 03:42:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 03:42:12 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9HAg6sY030464 for ; Sun, 17 Oct 2004 03:42:07 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i9HAdIvr001671; Sun, 17 Oct 2004 12:39:18 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i9HAdIxE001670; Sun, 17 Oct 2004 12:39:18 +0200 Date: Sun, 17 Oct 2004 12:39:18 +0200 From: Francois Romieu To: Jan Killius Cc: netdev@oss.sgi.com, davem@davemloft.net, jgarzik@pobox.com Subject: Re: r8169: page allocation failure Message-ID: <20041017103918.GA1517@electric-eye.fr.zoreil.com> References: <200410162004.17573.jkillius@arcor.de> <200410162323.01006.jkillius@arcor.de> <20041016214903.GC21849@electric-eye.fr.zoreil.com> <200410170940.28350.jkillius@arcor.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410170940.28350.jkillius@arcor.de> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 10359 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 Content-Length: 827 Lines: 20 Jan Killius : [scp test] > without TSO(1628MB 11.1MB/s 02:27): > 1 0 166388 27716 332 97264 0 0 12300 0 12323 7616 37 45 0 18 > 1 0 166388 26108 332 99804 0 0 12880 4 12727 7975 39 52 0 9 > 1 0 166388 24612 336 102796 0 0 12720 0 12590 7900 38 48 0 15 [...] > with TSO(1628MB 12.8MB/s 02:07): > 1 0 166340 27672 376 120056 0 0 13740 0 11879 2041 36 58 6 0 > 1 0 166340 25352 384 122288 0 0 13968 4 12148 2072 41 55 3 1 > 1 0 166340 22924 376 124692 0 0 14028 0 12174 2050 36 60 4 0 It could be done again now that M. Xu fixed the issue but the numbers seem consistent with the improvement I see here. TSO saves 5~8% of the cpu for this kind of setup. Thanks for the testing. -- Ueimor From tgraf@suug.ch Sun Oct 17 04:08:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 04:08:19 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9HB84eN031527 for ; Sun, 17 Oct 2004 04:08:05 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 0E2BDF; Sun, 17 Oct 2004 13:07:25 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 579971C0E9; Sun, 17 Oct 2004 13:08:07 +0200 (CEST) Date: Sun, 17 Oct 2004 13:08:07 +0200 From: Thomas Graf To: Herbert Xu Cc: Pablo Neira , hadi@cyberus.ca, "David S. Miller" , netdev@oss.sgi.com Subject: Re: [RFC] Yield in netlink_broadcast when congested Message-ID: <20041017110807.GV21977@postel.suug.ch> References: <20041016113006.GA12843@gondor.apana.org.au> <20041016235137.GE19714@rei.reeler.org> <20041017073957.GA21632@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041017073957.GA21632@gondor.apana.org.au> X-archive-position: 10360 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 920 Lines: 20 * Herbert Xu <20041017073957.GA21632@gondor.apana.org.au> 2004-10-17 17:39 > On Sun, Oct 17, 2004 at 01:51:37AM +0200, Thomas Graf wrote: > > > So here is my proposal: if we detect signs of impending congestion > > > in netlink_broadcast(), and that we're in a sleepable context, then > > > we yield(). > > > > Up to how many receivers does that work? We would still see the > > effect if too many receivers are registered, right? > > Assuming the scheduler is fair then every listener should get their > time slice to receive the messages. Assuming there is only a few listeners per process. I tried it out and my UP system could handle 7 listeners in the same process but would sporadically overrun above. I couldn't reproduce it with 1 listener per process anymore. Therefore I guess this is fine for now, the problem might appear again if someone finally writes the netlink daemon to solve the locking problems. From ckjohnson@gwi.net Sun Oct 17 04:52:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 04:52:47 -0700 (PDT) Received: from localhost.localdomain (d-216-195-166-69.gwi.net [216.195.166.69]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9HBqfU3008224 for ; Sun, 17 Oct 2004 04:52:42 -0700 Received: from [127.0.0.1] (chris [127.0.0.1]) by localhost.localdomain (8.12.11/8.12.11) with ESMTP id i9HBqLPA003503 for ; Sun, 17 Oct 2004 07:52:21 -0400 Message-ID: <41725CF5.2010606@gwi.net> Date: Sun, 17 Oct 2004 07:52:21 -0400 From: "Christopher K. Johnson" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com Subject: IPsec tunnel mode bug - malformed, misaddressed packets Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10361 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ckjohnson@gwi.net Precedence: bulk X-list: netdev Content-Length: 896 Lines: 20 There is an ipsec bug in FC2 kernel 2.6.8-1.521 for ipsec tunnel mode. I have proven with a packet trace that some packets are misaddressed. Specifically it constructs a packet of the form: IP header1 | AH header | IP header2 | ESP The IP header1 has an incorrect destination address of the host in the remote tunneled subnet instead of the remote vpn partner, whereas IP header2 has the correct destination address of the remote vpn partner. For an host in local ipsec subnet contacting a web server in remote ipsec subnet the initial syn and response of syn,ack are tunnelled successfuly, but the encrypted ack goes out malformed as indicated above, thus is never delivered. Packet trace and setkey config are attached to bugzilla entry at http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=132832 Your help in resolving this bug so ipsec is usable would be appreciated greatly. Chris From herbert@gondor.apana.org.au Sun Oct 17 05:42:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 05:42:49 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9HCgdHg009454 for ; Sun, 17 Oct 2004 05:42:40 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CJAMb-00044Q-00; Sun, 17 Oct 2004 22:42:17 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CJAMU-0006eR-00; Sun, 17 Oct 2004 22:42:10 +1000 From: Herbert Xu To: tgraf@suug.ch (Thomas Graf) Subject: Re: [RFC] Yield in netlink_broadcast when congested Cc: herbert@gondor.apana.org.au, pablo@eurodev.net, hadi@cyberus.ca, davem@davemloft.net, netdev@oss.sgi.com Organization: Core In-Reply-To: <20041017110807.GV21977@postel.suug.ch> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) Message-Id: Date: Sun, 17 Oct 2004 22:42:10 +1000 X-archive-position: 10362 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 1197 Lines: 31 Thomas Graf wrote: > > Assuming there is only a few listeners per process. I tried it out and > my UP system could handle 7 listeners in the same process but would > sporadically overrun above. I couldn't reproduce it with 1 listener > per process anymore. Please recall what I said in my original message: : Before we start please bear in mind that netlink is fundamentally : an *unreliable* protocol. This is the price we pay in order to use : it in all the contexts that we do. So what we're looking for here : is not how to make netlink 100% reliable, but what we can do to : improve the quality of its implementation. Having 7 listeners in the same process isn't really the killer application I was looking for :) > Therefore I guess this is fine for now, the problem might appear again > if someone finally writes the netlink daemon to solve the locking > problems. I don't think I understand what you are referring to. Could you please elaborte? Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From margitsw@t-online.de Sun Oct 17 06:06:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 06:06:52 -0700 (PDT) Received: from mailout07.sul.t-online.com (mailout07.sul.t-online.com [194.25.134.83]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9HD6k8b010249 for ; Sun, 17 Oct 2004 06:06:47 -0700 Received: from fwd03.aul.t-online.de by mailout07.sul.t-online.com with smtp id 1CJAk0-00069A-06; Sun, 17 Oct 2004 15:06:28 +0200 Received: from roglap.local (TD+InrZ6YeIYd5hOsXuk9q-+K-kV+oe5rJuV7mfpt99ePoo14X3X60@[80.128.219.57]) by fwd03.sul.t-online.com with esmtp id 1CJAjw-1N3bwe0; Sun, 17 Oct 2004 15:06:24 +0200 From: margitsw@t-online.de (Margit Schubert-While) To: jgarzik@pobox.com Subject: [PATCH 0/2 linux-2.6.9-rc3/linux-2.4.28-pre4] prism54 bugs/patches Date: Sun, 17 Oct 2004 14:06:37 +0200 User-Agent: KMail/1.5.4 Cc: netdev@oss.sgi.com, prism54-devel@prism54.org MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200410101529.59287.margitsw@t-online.de> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-ID: TD+InrZ6YeIYd5hOsXuk9q-+K-kV+oe5rJuV7mfpt99ePoo14X3X60 X-TOI-MSGID: 3f2a6cae-5611-47d3-bc74-f09c557ae0c9 X-archive-position: 10363 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: margitsw@t-online.de Precedence: bulk X-list: netdev Content-Length: 294 Lines: 30 2004-10-17 Margit Schubert-While * 01_fix_resume.patch * Fix resume processing * 02_sparse.patch * Sparse fixes on top of Linus's Jeff: as usual, applies to both 2.4 and 2.6; On top of backed up 2.6 patches and previously posted 2.4 patch. Margit From margitsw@t-online.de Sun Oct 17 06:08:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 06:08:25 -0700 (PDT) Received: from mailout03.sul.t-online.com (mailout03.sul.t-online.com [194.25.134.81]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9HD8Bi3010464 for ; Sun, 17 Oct 2004 06:08:12 -0700 Received: from fwd03.aul.t-online.de by mailout03.sul.t-online.com with smtp id 1CJAlP-0005VX-05; Sun, 17 Oct 2004 15:07:55 +0200 Received: from roglap.local (SOfky0Zl8eAN7mflVcoAA2g2xQn54+2h+8oheHumzyrYmkjlgxMJQ6@[80.128.219.57]) by fwd03.sul.t-online.com with esmtp id 1CJAlM-1kGasS0; Sun, 17 Oct 2004 15:07:52 +0200 From: margitsw@t-online.de (Margit Schubert-While) To: jgarzik@pobox.com Subject: [PATCH 1/2 linux-2.6.9-rc3/linux-2.4.28-pre4] prism54 fix resume processing Date: Sun, 17 Oct 2004 14:08:06 +0200 User-Agent: KMail/1.5.4 Cc: netdev@oss.sgi.com, prism54-devel@prism54.org MIME-Version: 1.0 Message-Id: <200410101530.08274.margitsw@t-online.de> Content-Type: Multipart/Mixed; boundary="Boundary-00=_mCmcBauZdA0KsYS" X-ID: SOfky0Zl8eAN7mflVcoAA2g2xQn54+2h+8oheHumzyrYmkjlgxMJQ6 X-TOI-MSGID: 27c53d83-8579-48bb-ac8d-06d9720bd00b X-archive-position: 10364 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: margitsw@t-online.de Precedence: bulk X-list: netdev Content-Length: 1097 Lines: 44 --Boundary-00=_mCmcBauZdA0KsYS Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline 2004-10-17 Margit Schubert-While * 01_fix_resume.patch * We need to enable the device on resume. Margit --Boundary-00=_mCmcBauZdA0KsYS Content-Type: text/x-diff; charset="us-ascii"; name="01_fix_resume.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="01_fix_resume.patch" diff -Naur linux-2.6.9rc3/drivers/net/wireless/prism54/islpci_hotplug.c linux-2.6.9-rc3msw/drivers/net/wireless/prism54/islpci_hotplug.c --- linux-2.6.9rc3/drivers/net/wireless/prism54/islpci_hotplug.c 2004-10-02 12:25:47.000000000 +0200 +++ linux-2.6.9-rc3msw/drivers/net/wireless/prism54/islpci_hotplug.c 2004-10-07 19:16:27.000000000 +0200 @@ -292,6 +292,8 @@ islpci_private *priv = ndev ? netdev_priv(ndev) : NULL; BUG_ON(!priv); + pci_enable_device(pdev); + printk(KERN_NOTICE "%s: got resume request\n", ndev->name); pci_restore_state(pdev, priv->pci_state); --Boundary-00=_mCmcBauZdA0KsYS-- From tgraf@suug.ch Sun Oct 17 06:08:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 06:08:40 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9HD8Xi4010547 for ; Sun, 17 Oct 2004 06:08:34 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 5733BF; Sun, 17 Oct 2004 15:07:56 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 557AF1C0E9; Sun, 17 Oct 2004 15:08:38 +0200 (CEST) Date: Sun, 17 Oct 2004 15:08:38 +0200 From: Thomas Graf To: Herbert Xu Cc: pablo@eurodev.net, hadi@cyberus.ca, davem@davemloft.net, netdev@oss.sgi.com Subject: Re: [RFC] Yield in netlink_broadcast when congested Message-ID: <20041017130838.GW21977@postel.suug.ch> References: <20041017110807.GV21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-archive-position: 10365 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 1143 Lines: 25 > Having 7 listeners in the same process isn't really the killer application > I was looking for :) Agreed, my statement was no offense, I'm totally fine with your path and I think it suits us well. > > Therefore I guess this is fine for now, the problem might appear again > > if someone finally writes the netlink daemon to solve the locking > > problems. > > I don't think I understand what you are referring to. Could you > please elaborte? Although NLM_F_ATOMIC exists it's not a good way to lock certain sets of netlink requests which must be atomic. Currently there is no locking implemented in any application as far as i know, f.e. iproute2 looks up an ifindex and uses it w/o locking so the link could be renamed or removed in between. If we ever implement the ietf netconf protocol we would also require to provide locking functionality. For that reason, the idea of a netlink daemon was mentioned a few times which would act as a gate and implement the required locking in userspace. This daemon could easly lead to multiple listeners in a single process. Nevertheless, I guess we can ignore it for now as it's hypothetical. From margitsw@t-online.de Sun Oct 17 06:08:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 06:08:43 -0700 (PDT) Received: from mailout07.sul.t-online.com (mailout07.sul.t-online.com [194.25.134.83]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9HD8aHb010573 for ; Sun, 17 Oct 2004 06:08:37 -0700 Received: from fwd03.aul.t-online.de by mailout07.sul.t-online.com with smtp id 1CJAlp-0006xz-00; Sun, 17 Oct 2004 15:08:21 +0200 Received: from roglap.local (rPHIKBZYweB+ndn29S3qHi-Y0R7Segvu9OXm+k5S6w+ONq0dHlYU84@[80.128.219.57]) by fwd03.sul.t-online.com with esmtp id 1CJAle-1paZZA0; Sun, 17 Oct 2004 15:08:10 +0200 From: margitsw@t-online.de (Margit Schubert-While) To: jgarzik@pobox.com Subject: [PATCH 2/2 linux-2.6.9-rc3/linux-2.4.28-pre4] prism54 sparse fixes Date: Sun, 17 Oct 2004 14:08:25 +0200 User-Agent: KMail/1.5.4 Cc: netdev@oss.sgi.com, prism54-devel@prism54.org MIME-Version: 1.0 Message-Id: <200410101530.13397.margitsw@t-online.de> Content-Type: Multipart/Mixed; boundary="Boundary-00=_5CmcBi7BHwbPvNp" X-ID: rPHIKBZYweB+ndn29S3qHi-Y0R7Segvu9OXm+k5S6w+ONq0dHlYU84 X-TOI-MSGID: 4a965679-afe2-4397-a00e-3eef18f0eddb X-archive-position: 10366 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: margitsw@t-online.de Precedence: bulk X-list: netdev Content-Length: 2863 Lines: 96 --Boundary-00=_5CmcBi7BHwbPvNp Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline 2004-10-17 Margit Schubert-While * 02_sparse.patch * On top of Linus's sparse changes, here is a * fix that further reduces sparse warnings. We are still left with 2 warnings caused by the member "data.pointer" in struct "iwreq_data" being "__user" (from wireless.h). Margit --Boundary-00=_5CmcBi7BHwbPvNp Content-Type: text/x-diff; charset="us-ascii"; name="02_sparse.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="02_sparse.patch" diff -Naur linux-2.6.9rc3/drivers/net/wireless/prism54/isl_ioctl.c linux-2.6.9-rc3msw/drivers/net/wireless/prism54/isl_ioctl.c --- linux-2.6.9rc3/drivers/net/wireless/prism54/isl_ioctl.c 2004-10-09 14:32:52.000000000 +0200 +++ linux-2.6.9-rc3msw/drivers/net/wireless/prism54/isl_ioctl.c 2004-10-09 14:43:06.000000000 +0200 @@ -1524,31 +1524,35 @@ const struct obj_mlme *mlme, int error) { union iwreq_data wrqu; + char *memptr; - wrqu.data.pointer = kmalloc(IW_CUSTOM_MAX, GFP_KERNEL); - if (!wrqu.data.pointer) + memptr = kmalloc(IW_CUSTOM_MAX, GFP_KERNEL); + if (!memptr) return; + wrqu.data.pointer = memptr; wrqu.data.length = 0; - format_event(priv, wrqu.data.pointer, str, mlme, &wrqu.data.length, + format_event(priv, memptr, str, mlme, &wrqu.data.length, error); - wireless_send_event(priv->ndev, IWEVCUSTOM, &wrqu, wrqu.data.pointer); - kfree(wrqu.data.pointer); + wireless_send_event(priv->ndev, IWEVCUSTOM, &wrqu, memptr); + kfree(memptr); } static void send_simple_event(islpci_private *priv, const char *str) { union iwreq_data wrqu; + char *memptr; int n = strlen(str); - wrqu.data.pointer = kmalloc(IW_CUSTOM_MAX, GFP_KERNEL); - if (!wrqu.data.pointer) + memptr = kmalloc(IW_CUSTOM_MAX, GFP_KERNEL); + if (!memptr) return; BUG_ON(n > IW_CUSTOM_MAX); + wrqu.data.pointer = memptr; wrqu.data.length = n; - strcpy(wrqu.data.pointer, str); - wireless_send_event(priv->ndev, IWEVCUSTOM, &wrqu, wrqu.data.pointer); - kfree(wrqu.data.pointer); + strcpy(memptr, str); + wireless_send_event(priv->ndev, IWEVCUSTOM, &wrqu, memptr); + kfree(memptr); } static void diff -Naur linux-2.6.9rc3/drivers/net/wireless/prism54/prismcompat.h linux-2.6.9-rc3msw/drivers/net/wireless/prism54/prismcompat.h --- linux-2.6.9rc3/drivers/net/wireless/prism54/prismcompat.h 2004-10-09 14:32:52.000000000 +0200 +++ linux-2.6.9-rc3msw/drivers/net/wireless/prism54/prismcompat.h 2004-10-09 15:20:50.000000000 +0200 @@ -38,6 +38,10 @@ #error Firmware Loading is not configured in the kernel ! #endif +#ifndef __iomem +#define __iomem +#endif + #define prism54_synchronize_irq(irq) synchronize_irq(irq) #define PRISM_FW_PDEV &priv->pdev->dev --Boundary-00=_5CmcBi7BHwbPvNp-- From SRS0+354b750ca8f3879a4ec9+420+infradead.org+hch@phoenix.srs.infradead.org Sun Oct 17 06:38:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 06:38:36 -0700 (PDT) Received: from phoenix.infradead.org (phoenix.infradead.org [81.187.226.98]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9HDcV2o011916 for ; Sun, 17 Oct 2004 06:38:32 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.42 #1 (Red Hat Linux)) id 1CJBEe-0005jo-2Y; Sun, 17 Oct 2004 14:38:08 +0100 Date: Sun, 17 Oct 2004 14:38:07 +0100 From: Christoph Hellwig To: Manfred Spraul Cc: jgarzik@pobox.com, marcelo.tosatti@cyclades.com, blazara@nvidia.com, netdev@oss.sgi.com Subject: Re: [PATCH 2.4.28-pre4-bk3] forcedeth: Gigabit ethernet support and media detection changes Message-ID: <20041017133807.GA21964@infradead.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 10367 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: netdev Content-Length: 622 Lines: 22 On Sun, Oct 17, 2004 at 12:27:21PM +0200, Manfred Spraul wrote: > Backport of the 0.29 forcedeth driver to 2.4. > Changes: > - lots of bugfixes. > - completely rewritten PHY initialization and media detection > - gigabit ethernet support > > The actual backport was done by Jane Liu from NVIDIA: > > - all occurrences of msleep changed to mdelay that sounds wrong - mdelay spins instead of sleeping. Better provide a msleep backport. > - SET_NETDEV_DEV calls removed doesn't recent 2.4 have a noop variant of it? > - module_param call changed to MODULE_PARM Didn't rusty backport module_param to 2.4 a while ago? From jgarzik@pobox.com Sun Oct 17 06:47:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 06:47:05 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9HDl0No012380 for ; Sun, 17 Oct 2004 06:47:00 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CJBMy-0004a2-2E; Sun, 17 Oct 2004 14:46:44 +0100 Message-ID: <417277B7.8000705@pobox.com> Date: Sun, 17 Oct 2004 09:46:31 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Manfred Spraul CC: marcelo.tosatti@cyclades.com, blazara@nvidia.com, netdev@oss.sgi.com Subject: Re: [PATCH 2.4.28-pre4-bk3] forcedeth: Gigabit ethernet support and media detection changes References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10368 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: 522 Lines: 26 Manfred Spraul wrote: > Backport of the 0.29 forcedeth driver to 2.4. > Changes: > - lots of bugfixes. > - completely rewritten PHY initialization and media detection > - gigabit ethernet support > > The actual backport was done by Jane Liu from NVIDIA: > > - all occurrences of msleep changed to mdelay NAK, mdelay(500) isn't acceptable. Use schedule_timeout or add msleep to 2.4.x. > - SET_NETDEV_DEV calls removed NAK, SET_NETDEV_DEV() exists in 2.4.x > - module_param call changed to MODULE_PARM OK Jeff From manfred@colorfullife.com Sun Oct 17 07:11:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 07:11:19 -0700 (PDT) Received: from dbl.q-ag.de (dbl.q-ag.de [213.172.117.3]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9HEBDam013171 for ; Sun, 17 Oct 2004 07:11:14 -0700 Received: from [127.0.0.2] (dbl [127.0.0.1]) by dbl.q-ag.de (8.12.3/8.12.3/Debian-6.6) with ESMTP id i9HEAkSL001015; Sun, 17 Oct 2004 16:10:47 +0200 Message-ID: <41727D66.8070007@colorfullife.com> Date: Sun, 17 Oct 2004 16:10:46 +0200 From: Manfred Spraul User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jeff Garzik CC: marcelo.tosatti@cyclades.com, blazara@nvidia.com, netdev@oss.sgi.com Subject: Re: [PATCH 2.4.28-pre4-bk3] forcedeth: Gigabit ethernet support and media detection changes References: <417277B7.8000705@pobox.com> In-Reply-To: <417277B7.8000705@pobox.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10369 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: manfred@colorfullife.com Precedence: bulk X-list: netdev Content-Length: 180 Lines: 13 Jeff Garzik wrote: > >> - module_param call changed to MODULE_PARM > > > OK > Not true anymore - module_param was backported as well. I'll post an updated patch. -- Manfred From linville@bilbo.tuxdriver.com Sun Oct 17 08:04:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 08:04:27 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9HF4I1P014322 for ; Sun, 17 Oct 2004 08:04:19 -0700 Received: from bilbo.tuxdriver.com (bilbo.tuxdriver.com [24.172.12.5]) by ra.tuxdriver.com (8.11.6/8.11.6) with ESMTP id i9HDxuh28271; Sun, 17 Oct 2004 09:59:56 -0400 Received: from bilbo.tuxdriver.com (bilbo.tuxdriver.com [24.172.12.5]) by bilbo.tuxdriver.com (8.12.11/8.12.11) with ESMTP id i9HF5Blm023185; Sun, 17 Oct 2004 11:05:11 -0400 Received: (from linville@localhost) by bilbo.tuxdriver.com (8.12.11/8.12.11/Submit) id i9HF5BBY023184; Sun, 17 Oct 2004 11:05:11 -0400 Date: Sun, 17 Oct 2004 11:05:11 -0400 From: "John W. Linville" To: akpm@osdl.org Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: [patch 2.6.9-rc2] 3c59x: remove EEPROM_RESET for 3c905B Message-ID: <20041017150511.GC13491@tuxdriver.com> Mail-Followup-To: akpm@osdl.org, netdev@oss.sgi.com, linux-kernel@vger.kernel.org References: <20040928145455.C12480@tuxdriver.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040928145455.C12480@tuxdriver.com> User-Agent: Mutt/1.4.1i X-archive-position: 10370 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 1875 Lines: 40 Remove the EEPROM_RESET flag for the 3c905B cards. Signed-off-by: John W. Linville --- Looks like I over-reached. Apparently only the 3c905 cards actually need the EEPROM reset, and the 3c905B cards don't like it... drivers/net/3c59x.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) --- linux-2.6/drivers/net/3c59x.c.orig 2004-10-17 10:53:38.142281232 -0400 +++ linux-2.6/drivers/net/3c59x.c 2004-10-17 10:54:25.975009552 -0400 @@ -508,12 +508,12 @@ static struct vortex_chip_info { {"3c905 Boomerang 100baseT4", PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_RESET, 64, }, {"3c905B Cyclone 100baseTx", - PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE|EEPROM_RESET, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, {"3c905B Cyclone 10/100/BNC", - PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EEPROM_RESET, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, {"3c905B-FX Cyclone 100baseFx", - PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM|EEPROM_RESET, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, {"3c905C Tornado", PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, {"3c920B-EMB-WNM (ATI Radeon 9100 IGP)", @@ -564,7 +564,7 @@ static struct vortex_chip_info { {"3c982 Hydra Dual Port B", PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_HWCKSM|HAS_NWAY, 128, }, {"3c905B-T4", - PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE|EEPROM_RESET, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, {"3c920B-EMB-WNM Tornado", PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, }, -- John W. Linville linville@tuxdriver.com From manfred@colorfullife.com Sun Oct 17 08:06:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 08:06:38 -0700 (PDT) Received: from dbl.q-ag.de (dbl.q-ag.de [213.172.117.3]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9HF6Qjq014788 for ; Sun, 17 Oct 2004 08:06:27 -0700 Received: from dbl.q-ag.de (dbl [127.0.0.1]) by dbl.q-ag.de (8.12.3/8.12.3/Debian-6.6) with ESMTP id i9HF66SL001361; Sun, 17 Oct 2004 17:06:07 +0200 Received: from localhost (manfred@localhost) by dbl.q-ag.de (8.12.3/8.12.3/Debian-6.6) with ESMTP id i9HF65dN001357; Sun, 17 Oct 2004 17:06:05 +0200 X-Authentication-Warning: dbl.q-ag.de: manfred owned process doing -bs Date: Sun, 17 Oct 2004 17:06:05 +0200 (CEST) From: Manfred Spraul X-X-Sender: manfred@dbl.q-ag.de To: netdev@oss.sgi.com cc: linux-kernel@vger.kernel.org, Subject: [CFT,PATCH] new forcedeth backport to 2.4 Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 10371 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: manfred@colorfullife.com Precedence: bulk X-list: netdev Content-Length: 54491 Lines: 1684 Hi, Jeff and Christoph found a few bugs in the previous backport, thus I've decided to start a new backport from the latest driver (0.30) from the 2.6 -mm tree. Changes: - lots of bugfixes. - completely rewritten PHY initialization and media detection - gigabit ethernet support - hardware checksuming support for nForce 250-Gb It's a new backport, not based on the backport from Jane Liu. - static msleep helper added. - invocations of synchronize_irq changed to take no parameters Please test it - it works on my nForce 250 Gb, but I don't have an non-gigabit board to test the media detection changes. // Kernel Version: // VERSION = 2 // PATCHLEVEL = 4 // SUBLEVEL = 28 // EXTRAVERSION = -pre4-bk3 // $Header$ // Kernel Version: // VERSION = 2 // PATCHLEVEL = 4 // SUBLEVEL = 28 // EXTRAVERSION = -pre4-bk3 --- 2.4/drivers/net/forcedeth.c 2004-10-17 16:23:05.672096642 +0200 +++ build-2.4/drivers/net/forcedeth.c 2004-10-17 16:17:35.653011008 +0200 @@ -10,8 +10,11 @@ * trademarks of NVIDIA Corporation in the United States and other * countries. * - * Copyright (C) 2003 Manfred Spraul + * Copyright (C) 2003,4 Manfred Spraul * Copyright (C) 2004 Andrew de Quincey (wol support) + * Copyright (C) 2004 Carl-Daniel Hailfinger (invalid MAC handling, insane + * IRQ rate fixes, bigendian fixes, cleanups, verification) + * Copyright (c) 2004 NVIDIA Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -60,15 +63,22 @@ * 0.19: 29 Nov 2003: Handle RxNoBuf, detect & handle invalid mac * addresses, really stop rx if already running * in nv_start_rx, clean up a bit. - * (C) Carl-Daniel Hailfinger * 0.20: 07 Dec 2003: alloc fixes * 0.21: 12 Jan 2004: additional alloc fix, nic polling fix. * 0.22: 19 Jan 2004: reprogram timer to a sane rate, avoid lockup - * on close. - * (C) Carl-Daniel Hailfinger, Manfred Spraul + * on close. * 0.23: 26 Jan 2004: various small cleanups * 0.24: 27 Feb 2004: make driver even less anonymous in backtraces * 0.25: 09 Mar 2004: wol support + * 0.26: 03 Jun 2004: netdriver specific annotation, sparse-related fixes + * 0.27: 19 Jun 2004: Gigabit support, new descriptor rings, + * added CK804/MCP04 device IDs, code fixes + * for registers, link status and other minor fixes. + * 0.28: 21 Jun 2004: Big cleanup, making driver mostly endian safe + * 0.29: 31 Aug 2004: Add backup timer for link change notification. + * 0.30: 25 Sep 2004: rx checksum support for nf 250 Gb. Add rx reset + * into nv_close, otherwise reenabling for wol can + * cause DMA to kfree'd memory. * * Known bugs: * We suspect that on some hardware no TX done interrupts are generated. @@ -80,9 +90,11 @@ * DEV_NEED_TIMERIRQ will not harm you on sane hardware, only generating a few * superfluous timer interrupts from the nic. */ -#define FORCEDETH_VERSION "0.25" +#define FORCEDETH_VERSION "0.30" +#define DRV_NAME "forcedeth" #include +#include #include #include #include @@ -113,16 +125,18 @@ * Hardware access: */ -#define DEV_NEED_LASTPACKET1 0x0001 -#define DEV_IRQMASK_1 0x0002 -#define DEV_IRQMASK_2 0x0004 -#define DEV_NEED_TIMERIRQ 0x0008 +#define DEV_NEED_LASTPACKET1 0x0001 /* set LASTPACKET1 in tx flags */ +#define DEV_IRQMASK_1 0x0002 /* use NVREG_IRQMASK_WANTED_1 for irq mask */ +#define DEV_IRQMASK_2 0x0004 /* use NVREG_IRQMASK_WANTED_2 for irq mask */ +#define DEV_NEED_TIMERIRQ 0x0008 /* set the timer irq flag in the irq mask */ +#define DEV_NEED_LINKTIMER 0x0010 /* poll link settings. Relies on the timer irq */ enum { NvRegIrqStatus = 0x000, #define NVREG_IRQSTAT_MIIEVENT 0x040 #define NVREG_IRQSTAT_MASK 0x1ff NvRegIrqMask = 0x004, +#define NVREG_IRQ_RX_ERROR 0x0001 #define NVREG_IRQ_RX 0x0002 #define NVREG_IRQ_RX_NOBUF 0x0004 #define NVREG_IRQ_TX_ERR 0x0008 @@ -132,7 +146,7 @@ enum { #define NVREG_IRQ_TX1 0x0100 #define NVREG_IRQMASK_WANTED_1 0x005f #define NVREG_IRQMASK_WANTED_2 0x0147 -#define NVREG_IRQ_UNKNOWN (~(NVREG_IRQ_RX|NVREG_IRQ_RX_NOBUF|NVREG_IRQ_TX_ERR|NVREG_IRQ_TX2|NVREG_IRQ_TIMER|NVREG_IRQ_LINK|NVREG_IRQ_TX1)) +#define NVREG_IRQ_UNKNOWN (~(NVREG_IRQ_RX_ERROR|NVREG_IRQ_RX|NVREG_IRQ_RX_NOBUF|NVREG_IRQ_TX_ERR|NVREG_IRQ_TX2|NVREG_IRQ_TIMER|NVREG_IRQ_LINK|NVREG_IRQ_TX1)) NvRegUnknownSetupReg6 = 0x008, #define NVREG_UNKSETUP6_VAL 3 @@ -159,7 +173,7 @@ enum { NvRegOffloadConfig = 0x90, #define NVREG_OFFLOAD_HOMEPHY 0x601 -#define NVREG_OFFLOAD_NORMAL 0x5ee +#define NVREG_OFFLOAD_NORMAL RX_NIC_BUFSIZE NvRegReceiverControl = 0x094, #define NVREG_RCVCTL_START 0x01 NvRegReceiverStatus = 0x98, @@ -168,6 +182,8 @@ enum { NvRegRandomSeed = 0x9c, #define NVREG_RNDSEED_MASK 0x00ff #define NVREG_RNDSEED_FORCE 0x7f00 +#define NVREG_RNDSEED_FORCE2 0x2d00 +#define NVREG_RNDSEED_FORCE3 0x7400 NvRegUnknownSetupReg1 = 0xA0, #define NVREG_UNKSETUP1_VAL 0x16070f @@ -181,6 +197,9 @@ enum { NvRegMulticastMaskA = 0xB8, NvRegMulticastMaskB = 0xBC, + NvRegPhyInterface = 0xC0, +#define PHY_RGMII 0x10000000 + NvRegTxRingPhysAddr = 0x100, NvRegRxRingPhysAddr = 0x104, NvRegRingSizes = 0x108, @@ -189,12 +208,12 @@ enum { NvRegUnknownTransmitterReg = 0x10c, NvRegLinkSpeed = 0x110, #define NVREG_LINKSPEED_FORCE 0x10000 -#define NVREG_LINKSPEED_10 10 +#define NVREG_LINKSPEED_10 1000 #define NVREG_LINKSPEED_100 100 -#define NVREG_LINKSPEED_1000 1000 +#define NVREG_LINKSPEED_1000 50 NvRegUnknownSetupReg5 = 0x130, #define NVREG_UNKSETUP5_BIT31 (1<<31) - NvRegUnknownSetupReg3 = 0x134, + NvRegUnknownSetupReg3 = 0x13c, #define NVREG_UNKSETUP3_VAL1 0x200010 NvRegTxRxControl = 0x144, #define NVREG_TXRXCTL_KICK 0x0001 @@ -202,6 +221,7 @@ enum { #define NVREG_TXRXCTL_BIT2 0x0004 #define NVREG_TXRXCTL_IDLE 0x0008 #define NVREG_TXRXCTL_RESET 0x0010 +#define NVREG_TXRXCTL_RXCHECK 0x0400 NvRegMIIStatus = 0x180, #define NVREG_MIISTAT_ERROR 0x0001 #define NVREG_MIISTAT_LINKCHANGE 0x0008 @@ -213,15 +233,15 @@ enum { NvRegAdapterControl = 0x188, #define NVREG_ADAPTCTL_START 0x02 #define NVREG_ADAPTCTL_LINKUP 0x04 -#define NVREG_ADAPTCTL_PHYVALID 0x4000 +#define NVREG_ADAPTCTL_PHYVALID 0x40000 #define NVREG_ADAPTCTL_RUNNING 0x100000 #define NVREG_ADAPTCTL_PHYSHIFT 24 NvRegMIISpeed = 0x18c, #define NVREG_MIISPEED_BIT8 (1<<8) #define NVREG_MIIDELAY 5 NvRegMIIControl = 0x190, -#define NVREG_MIICTL_INUSE 0x10000 -#define NVREG_MIICTL_WRITE 0x08000 +#define NVREG_MIICTL_INUSE 0x08000 +#define NVREG_MIICTL_WRITE 0x00400 #define NVREG_MIICTL_ADDRSHIFT 5 NvRegMIIData = 0x194, NvRegWakeUpFlags = 0x200, @@ -253,34 +273,67 @@ enum { #define NVREG_POWERSTATE_D3 0x0003 }; +/* Big endian: should work, but is untested */ struct ring_desc { u32 PacketBuffer; - u16 Length; - u16 Flags; + u32 FlagLen; }; -#define NV_TX_LASTPACKET (1<<0) -#define NV_TX_RETRYERROR (1<<3) -#define NV_TX_LASTPACKET1 (1<<8) -#define NV_TX_DEFERRED (1<<10) -#define NV_TX_CARRIERLOST (1<<11) -#define NV_TX_LATECOLLISION (1<<12) -#define NV_TX_UNDERFLOW (1<<13) -#define NV_TX_ERROR (1<<14) -#define NV_TX_VALID (1<<15) - -#define NV_RX_DESCRIPTORVALID (1<<0) -#define NV_RX_MISSEDFRAME (1<<1) -#define NV_RX_SUBSTRACT1 (1<<3) -#define NV_RX_ERROR1 (1<<7) -#define NV_RX_ERROR2 (1<<8) -#define NV_RX_ERROR3 (1<<9) -#define NV_RX_ERROR4 (1<<10) -#define NV_RX_CRCERR (1<<11) -#define NV_RX_OVERFLOW (1<<12) -#define NV_RX_FRAMINGERR (1<<13) -#define NV_RX_ERROR (1<<14) -#define NV_RX_AVAIL (1<<15) +#define FLAG_MASK_V1 0xffff0000 +#define FLAG_MASK_V2 0xffffc000 +#define LEN_MASK_V1 (0xffffffff ^ FLAG_MASK_V1) +#define LEN_MASK_V2 (0xffffffff ^ FLAG_MASK_V2) + +#define NV_TX_LASTPACKET (1<<16) +#define NV_TX_RETRYERROR (1<<19) +#define NV_TX_LASTPACKET1 (1<<24) +#define NV_TX_DEFERRED (1<<26) +#define NV_TX_CARRIERLOST (1<<27) +#define NV_TX_LATECOLLISION (1<<28) +#define NV_TX_UNDERFLOW (1<<29) +#define NV_TX_ERROR (1<<30) +#define NV_TX_VALID (1<<31) + +#define NV_TX2_LASTPACKET (1<<29) +#define NV_TX2_RETRYERROR (1<<18) +#define NV_TX2_LASTPACKET1 (1<<23) +#define NV_TX2_DEFERRED (1<<25) +#define NV_TX2_CARRIERLOST (1<<26) +#define NV_TX2_LATECOLLISION (1<<27) +#define NV_TX2_UNDERFLOW (1<<28) +/* error and valid are the same for both */ +#define NV_TX2_ERROR (1<<30) +#define NV_TX2_VALID (1<<31) + +#define NV_RX_DESCRIPTORVALID (1<<16) +#define NV_RX_MISSEDFRAME (1<<17) +#define NV_RX_SUBSTRACT1 (1<<18) +#define NV_RX_ERROR1 (1<<23) +#define NV_RX_ERROR2 (1<<24) +#define NV_RX_ERROR3 (1<<25) +#define NV_RX_ERROR4 (1<<26) +#define NV_RX_CRCERR (1<<27) +#define NV_RX_OVERFLOW (1<<28) +#define NV_RX_FRAMINGERR (1<<29) +#define NV_RX_ERROR (1<<30) +#define NV_RX_AVAIL (1<<31) + +#define NV_RX2_CHECKSUMMASK (0x1C000000) +#define NV_RX2_CHECKSUMOK1 (0x10000000) +#define NV_RX2_CHECKSUMOK2 (0x14000000) +#define NV_RX2_CHECKSUMOK3 (0x18000000) +#define NV_RX2_DESCRIPTORVALID (1<<29) +#define NV_RX2_SUBSTRACT1 (1<<25) +#define NV_RX2_ERROR1 (1<<18) +#define NV_RX2_ERROR2 (1<<19) +#define NV_RX2_ERROR3 (1<<20) +#define NV_RX2_ERROR4 (1<<21) +#define NV_RX2_CRCERR (1<<22) +#define NV_RX2_OVERFLOW (1<<23) +#define NV_RX2_FRAMINGERR (1<<24) +/* error and avail are the same for both */ +#define NV_RX2_ERROR (1<<30) +#define NV_RX2_AVAIL (1<<31) /* Miscelaneous hardware related defines: */ #define NV_PCI_REGSZ 0x270 @@ -306,28 +359,74 @@ struct ring_desc { /* General driver defaults */ #define NV_WATCHDOG_TIMEO (5*HZ) -#define DEFAULT_MTU 1500 /* also maximum supported, at least for now */ #define RX_RING 128 -#define TX_RING 16 -/* limited to 1 packet until we understand NV_TX_LASTPACKET */ -#define TX_LIMIT_STOP 10 -#define TX_LIMIT_START 5 +#define TX_RING 64 +/* + * If your nic mysteriously hangs then try to reduce the limits + * to 1/0: It might be required to set NV_TX_LASTPACKET in the + * last valid ring entry. But this would be impossible to + * implement - probably a disassembly error. + */ +#define TX_LIMIT_STOP 63 +#define TX_LIMIT_START 62 /* rx/tx mac addr + type + vlan + align + slack*/ -#define RX_NIC_BUFSIZE (DEFAULT_MTU + 64) +#define RX_NIC_BUFSIZE (ETH_DATA_LEN + 64) /* even more slack */ -#define RX_ALLOC_BUFSIZE (DEFAULT_MTU + 128) +#define RX_ALLOC_BUFSIZE (ETH_DATA_LEN + 128) #define OOM_REFILL (1+HZ/20) #define POLL_WAIT (1+HZ/100) +#define LINK_TIMEOUT (3*HZ) + +/* + * desc_ver values: + * This field has two purposes: + * - Newer nics uses a different ring layout. The layout is selected by + * comparing np->desc_ver with DESC_VER_xy. + * - It contains bits that are forced on when writing to NvRegTxRxControl. + */ +#define DESC_VER_1 0x0 +#define DESC_VER_2 (0x02100|NVREG_TXRXCTL_RXCHECK) + +/* PHY defines */ +#define PHY_OUI_MARVELL 0x5043 +#define PHY_OUI_CICADA 0x03f1 +#define PHYID1_OUI_MASK 0x03ff +#define PHYID1_OUI_SHFT 6 +#define PHYID2_OUI_MASK 0xfc00 +#define PHYID2_OUI_SHFT 10 +#define PHY_INIT1 0x0f000 +#define PHY_INIT2 0x0e00 +#define PHY_INIT3 0x01000 +#define PHY_INIT4 0x0200 +#define PHY_INIT5 0x0004 +#define PHY_INIT6 0x02000 +#define PHY_GIGABIT 0x0100 + +#define PHY_TIMEOUT 0x1 +#define PHY_ERROR 0x2 + +#define PHY_100 0x1 +#define PHY_1000 0x2 +#define PHY_HALF 0x100 + +/* FIXME: MII defines that should be added to */ +#define MII_1000BT_CR 0x09 +#define MII_1000BT_SR 0x0a +#define ADVERTISE_1000FULL 0x0200 +#define ADVERTISE_1000HALF 0x0100 +#define LPA_1000FULL 0x0800 +#define LPA_1000HALF 0x0400 + /* * SMP locking: * All hardware access under dev->priv->lock, except the performance * critical parts: * - rx is (pseudo-) lockless: it relies on the single-threading provided - * by the arch code for interrupts. + * by the arch code for interrupts. * - tx setup is lockless: it relies on dev->xmit_lock. Actual submission * needs dev->priv->lock :-( * - set_multicast_list: preparation lockless, relies on dev->xmit_lock. @@ -345,12 +444,15 @@ struct fe_priv { int duplex; int phyaddr; int wolenabled; + unsigned int phy_oui; + u16 gigabit; /* General data: RO fields */ dma_addr_t ring_addr; struct pci_dev *pci_dev; u32 orig_mac[2]; u32 irqmask; + u32 desc_ver; /* rx specific fields. * Locking: Within irq hander or disable_irq+spin_lock(&np->lock); @@ -363,6 +465,11 @@ struct fe_priv { struct timer_list oom_kick; struct timer_list nic_poll; + /* media detection workaround. + * Locking: Within irq hander or disable_irq+spin_lock(&np->lock); + */ + int need_linktimer; + unsigned long link_timeout; /* * tx specific fields. */ @@ -370,7 +477,7 @@ struct fe_priv { unsigned int next_tx, nic_tx; struct sk_buff *tx_skbuff[TX_RING]; dma_addr_t tx_dma[TX_RING]; - u16 tx_flags; + u32 tx_flags; }; /* @@ -395,6 +502,12 @@ static inline void pci_push(u8 * base) readl(base); } +static inline u32 nv_descr_getlength(struct ring_desc *prd, u32 v) +{ + return le32_to_cpu(prd->FlagLen) + & ((v == DESC_VER_1) ? LEN_MASK_V1 : LEN_MASK_V2); +} + static int reg_delay(struct net_device *dev, int offset, u32 mask, u32 target, int delay, int delaymax, const char *msg) { @@ -421,24 +534,18 @@ static int reg_delay(struct net_device * static int mii_rw(struct net_device *dev, int addr, int miireg, int value) { u8 *base = get_hwbase(dev); - int was_running; u32 reg; int retval; writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus); - was_running = 0; - reg = readl(base + NvRegAdapterControl); - if (reg & NVREG_ADAPTCTL_RUNNING) { - was_running = 1; - writel(reg & ~NVREG_ADAPTCTL_RUNNING, base + NvRegAdapterControl); - } + reg = readl(base + NvRegMIIControl); if (reg & NVREG_MIICTL_INUSE) { writel(NVREG_MIICTL_INUSE, base + NvRegMIIControl); udelay(NV_MIIBUSY_DELAY); } - reg = NVREG_MIICTL_INUSE | (addr << NVREG_MIICTL_ADDRSHIFT) | miireg; + reg = (addr << NVREG_MIICTL_ADDRSHIFT) | miireg; if (value != MII_READ) { writel(value, base + NvRegMIIData); reg |= NVREG_MIICTL_WRITE; @@ -460,19 +567,123 @@ static int mii_rw(struct net_device *dev dev->name, miireg, addr); retval = -1; } else { - /* FIXME: why is that required? */ - udelay(50); retval = readl(base + NvRegMIIData); dprintk(KERN_DEBUG "%s: mii_rw read from reg %d at PHY %d: 0x%x.\n", dev->name, miireg, addr, retval); } - if (was_running) { - reg = readl(base + NvRegAdapterControl); - writel(reg | NVREG_ADAPTCTL_RUNNING, base + NvRegAdapterControl); - } + return retval; } +static void msleep(unsigned long msecs) +{ + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout((HZ * msecs + 999) / 1000); +} + +static int phy_reset(struct net_device *dev) +{ + struct fe_priv *np = get_nvpriv(dev); + u32 miicontrol; + unsigned int tries = 0; + + miicontrol = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); + miicontrol |= BMCR_RESET; + if (mii_rw(dev, np->phyaddr, MII_BMCR, miicontrol)) { + return -1; + } + + /* wait for 500ms */ + msleep(500); + + /* must wait till reset is deasserted */ + while (miicontrol & BMCR_RESET) { + msleep(10); + miicontrol = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); + /* FIXME: 100 tries seem excessive */ + if (tries++ > 100) + return -1; + } + return 0; +} + +static int phy_init(struct net_device *dev) +{ + struct fe_priv *np = get_nvpriv(dev); + u8 *base = get_hwbase(dev); + u32 phyinterface, phy_reserved, mii_status, mii_control, mii_control_1000,reg; + + /* set advertise register */ + reg = mii_rw(dev, np->phyaddr, MII_ADVERTISE, MII_READ); + reg |= (ADVERTISE_10HALF|ADVERTISE_10FULL|ADVERTISE_100HALF|ADVERTISE_100FULL|0x800|0x400); + if (mii_rw(dev, np->phyaddr, MII_ADVERTISE, reg)) { + printk(KERN_INFO "%s: phy write to advertise failed.\n", pci_name(np->pci_dev)); + return PHY_ERROR; + } + + /* get phy interface type */ + phyinterface = readl(base + NvRegPhyInterface); + + /* see if gigabit phy */ + mii_status = mii_rw(dev, np->phyaddr, MII_BMSR, MII_READ); + if (mii_status & PHY_GIGABIT) { + np->gigabit = PHY_GIGABIT; + mii_control_1000 = mii_rw(dev, np->phyaddr, MII_1000BT_CR, MII_READ); + mii_control_1000 &= ~ADVERTISE_1000HALF; + if (phyinterface & PHY_RGMII) + mii_control_1000 |= ADVERTISE_1000FULL; + else + mii_control_1000 &= ~ADVERTISE_1000FULL; + + if (mii_rw(dev, np->phyaddr, MII_1000BT_CR, mii_control_1000)) { + printk(KERN_INFO "%s: phy init failed.\n", pci_name(np->pci_dev)); + return PHY_ERROR; + } + } + else + np->gigabit = 0; + + /* reset the phy */ + if (phy_reset(dev)) { + printk(KERN_INFO "%s: phy reset failed\n", pci_name(np->pci_dev)); + return PHY_ERROR; + } + + /* phy vendor specific configuration */ + if ((np->phy_oui == PHY_OUI_CICADA) && (phyinterface & PHY_RGMII) ) { + phy_reserved = mii_rw(dev, np->phyaddr, MII_RESV1, MII_READ); + phy_reserved &= ~(PHY_INIT1 | PHY_INIT2); + phy_reserved |= (PHY_INIT3 | PHY_INIT4); + if (mii_rw(dev, np->phyaddr, MII_RESV1, phy_reserved)) { + printk(KERN_INFO "%s: phy init failed.\n", pci_name(np->pci_dev)); + return PHY_ERROR; + } + phy_reserved = mii_rw(dev, np->phyaddr, MII_NCONFIG, MII_READ); + phy_reserved |= PHY_INIT5; + if (mii_rw(dev, np->phyaddr, MII_NCONFIG, phy_reserved)) { + printk(KERN_INFO "%s: phy init failed.\n", pci_name(np->pci_dev)); + return PHY_ERROR; + } + } + if (np->phy_oui == PHY_OUI_CICADA) { + phy_reserved = mii_rw(dev, np->phyaddr, MII_SREVISION, MII_READ); + phy_reserved |= PHY_INIT6; + if (mii_rw(dev, np->phyaddr, MII_SREVISION, phy_reserved)) { + printk(KERN_INFO "%s: phy init failed.\n", pci_name(np->pci_dev)); + return PHY_ERROR; + } + } + + /* restart auto negotiation */ + mii_control = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); + mii_control |= (BMCR_ANRESTART | BMCR_ANENABLE); + if (mii_rw(dev, np->phyaddr, MII_BMCR, mii_control)) { + return PHY_ERROR; + } + + return 0; +} + static void nv_start_rx(struct net_device *dev) { struct fe_priv *np = get_nvpriv(dev); @@ -487,6 +698,8 @@ static void nv_start_rx(struct net_devic writel(np->linkspeed, base + NvRegLinkSpeed); pci_push(base); writel(NVREG_RCVCTL_START, base + NvRegReceiverControl); + dprintk(KERN_DEBUG "%s: nv_start_rx to duplex %d, speed 0x%08x.\n", + dev->name, np->duplex, np->linkspeed); pci_push(base); } @@ -497,8 +710,8 @@ static void nv_stop_rx(struct net_device dprintk(KERN_DEBUG "%s: nv_stop_rx\n", dev->name); writel(0, base + NvRegReceiverControl); reg_delay(dev, NvRegReceiverStatus, NVREG_RCVSTAT_BUSY, 0, - NV_RXSTOP_DELAY1, NV_RXSTOP_DELAY1MAX, - KERN_INFO "nv_stop_rx: ReceiverStatus remained busy"); + NV_RXSTOP_DELAY1, NV_RXSTOP_DELAY1MAX, + KERN_INFO "nv_stop_rx: ReceiverStatus remained busy"); udelay(NV_RXSTOP_DELAY2); writel(0, base + NvRegLinkSpeed); @@ -520,8 +733,8 @@ static void nv_stop_tx(struct net_device dprintk(KERN_DEBUG "%s: nv_stop_tx\n", dev->name); writel(0, base + NvRegTransmitterControl); reg_delay(dev, NvRegTransmitterStatus, NVREG_XMITSTAT_BUSY, 0, - NV_TXSTOP_DELAY1, NV_TXSTOP_DELAY1MAX, - KERN_INFO "nv_stop_tx: TransmitterStatus remained busy"); + NV_TXSTOP_DELAY1, NV_TXSTOP_DELAY1MAX, + KERN_INFO "nv_stop_tx: TransmitterStatus remained busy"); udelay(NV_TXSTOP_DELAY2); writel(0, base + NvRegUnknownTransmitterReg); @@ -529,13 +742,14 @@ static void nv_stop_tx(struct net_device static void nv_txrx_reset(struct net_device *dev) { + struct fe_priv *np = get_nvpriv(dev); u8 *base = get_hwbase(dev); dprintk(KERN_DEBUG "%s: nv_txrx_reset\n", dev->name); - writel(NVREG_TXRXCTL_BIT2 | NVREG_TXRXCTL_RESET, base + NvRegTxRxControl); + writel(NVREG_TXRXCTL_BIT2 | NVREG_TXRXCTL_RESET | np->desc_ver, base + NvRegTxRxControl); pci_push(base); udelay(NV_TXRX_RESET_DELAY); - writel(NVREG_TXRXCTL_BIT2, base + NvRegTxRxControl); + writel(NVREG_TXRXCTL_BIT2 | np->desc_ver, base + NvRegTxRxControl); pci_push(base); } @@ -556,91 +770,50 @@ static struct net_device_stats *nv_get_s return &np->stats; } -static int nv_ethtool_ioctl(struct net_device *dev, void *useraddr) +static void nv_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { struct fe_priv *np = get_nvpriv(dev); - u8 *base = get_hwbase(dev); - u32 ethcmd; - - if (copy_from_user(ðcmd, useraddr, sizeof (ethcmd))) - return -EFAULT; - - switch (ethcmd) { - case ETHTOOL_GDRVINFO: - { - struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO }; - strcpy(info.driver, "forcedeth"); - strcpy(info.version, FORCEDETH_VERSION); - strcpy(info.bus_info, pci_name(np->pci_dev)); - if (copy_to_user(useraddr, &info, sizeof (info))) - return -EFAULT; - return 0; - } - case ETHTOOL_GLINK: - { - struct ethtool_value edata = { ETHTOOL_GLINK }; - - edata.data = !!netif_carrier_ok(dev); - - if (copy_to_user(useraddr, &edata, sizeof(edata))) - return -EFAULT; - return 0; - } - case ETHTOOL_GWOL: - { - struct ethtool_wolinfo wolinfo; - memset(&wolinfo, 0, sizeof(wolinfo)); - wolinfo.supported = WAKE_MAGIC; - - spin_lock_irq(&np->lock); - if (np->wolenabled) - wolinfo.wolopts = WAKE_MAGIC; - spin_unlock_irq(&np->lock); - - if (copy_to_user(useraddr, &wolinfo, sizeof(wolinfo))) - return -EFAULT; - return 0; - } - case ETHTOOL_SWOL: - { - struct ethtool_wolinfo wolinfo; - if (copy_from_user(&wolinfo, useraddr, sizeof(wolinfo))) - return -EFAULT; - - spin_lock_irq(&np->lock); - if (wolinfo.wolopts == 0) { - writel(0, base + NvRegWakeUpFlags); - np->wolenabled = 0; - } - if (wolinfo.wolopts & WAKE_MAGIC) { - writel(NVREG_WAKEUPFLAGS_ENABLE, base + NvRegWakeUpFlags); - np->wolenabled = 1; - } - spin_unlock_irq(&np->lock); - return 0; - } + strcpy(info->driver, "forcedeth"); + strcpy(info->version, FORCEDETH_VERSION); + strcpy(info->bus_info, pci_name(np->pci_dev)); +} - default: - break; - } +static void nv_get_wol(struct net_device *dev, struct ethtool_wolinfo *wolinfo) +{ + struct fe_priv *np = get_nvpriv(dev); + wolinfo->supported = WAKE_MAGIC; - return -EOPNOTSUPP; + spin_lock_irq(&np->lock); + if (np->wolenabled) + wolinfo->wolopts = WAKE_MAGIC; + spin_unlock_irq(&np->lock); } -/* - * nv_ioctl: dev->do_ioctl function - * Called with rtnl_lock held. - */ -static int nv_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) + +static int nv_set_wol(struct net_device *dev, struct ethtool_wolinfo *wolinfo) { - switch(cmd) { - case SIOCETHTOOL: - return nv_ethtool_ioctl(dev, (void *) rq->ifr_data); + struct fe_priv *np = get_nvpriv(dev); + u8 *base = get_hwbase(dev); - default: - return -EOPNOTSUPP; + spin_lock_irq(&np->lock); + if (wolinfo->wolopts == 0) { + writel(0, base + NvRegWakeUpFlags); + np->wolenabled = 0; + } + if (wolinfo->wolopts & WAKE_MAGIC) { + writel(NVREG_WAKEUPFLAGS_ENABLE, base + NvRegWakeUpFlags); + np->wolenabled = 1; } + spin_unlock_irq(&np->lock); + return 0; } +static struct ethtool_ops ops = { + .get_drvinfo = nv_get_drvinfo, + .get_link = ethtool_op_get_link, + .get_wol = nv_get_wol, + .set_wol = nv_set_wol, +}; + /* * nv_alloc_rx: fill rx ring entries. * Return 1 if the allocations for the skbs failed and the @@ -650,11 +823,12 @@ static int nv_alloc_rx(struct net_device { struct fe_priv *np = get_nvpriv(dev); unsigned int refill_rx = np->refill_rx; + int nr; while (np->cur_rx != refill_rx) { - int nr = refill_rx % RX_RING; struct sk_buff *skb; + nr = refill_rx % RX_RING; if (np->rx_skbuff[nr] == NULL) { skb = dev_alloc_skb(RX_ALLOC_BUFSIZE); @@ -669,10 +843,9 @@ static int nv_alloc_rx(struct net_device np->rx_dma[nr] = pci_map_single(np->pci_dev, skb->data, skb->len, PCI_DMA_FROMDEVICE); np->rx_ring[nr].PacketBuffer = cpu_to_le32(np->rx_dma[nr]); - np->rx_ring[nr].Length = cpu_to_le16(RX_NIC_BUFSIZE); wmb(); - np->rx_ring[nr].Flags = cpu_to_le16(NV_RX_AVAIL); - dprintk(KERN_DEBUG "%s: nv_alloc_rx: Packet %d marked as Available\n", + np->rx_ring[nr].FlagLen = cpu_to_le32(RX_NIC_BUFSIZE | NV_RX_AVAIL); + dprintk(KERN_DEBUG "%s: nv_alloc_rx: Packet %d marked as Available\n", dev->name, refill_rx); refill_rx++; } @@ -703,15 +876,13 @@ static int nv_init_ring(struct net_devic int i; np->next_tx = np->nic_tx = 0; - for (i = 0; i < TX_RING; i++) { - np->tx_ring[i].Flags = 0; - } + for (i = 0; i < TX_RING; i++) + np->tx_ring[i].FlagLen = 0; np->cur_rx = RX_RING; np->refill_rx = 0; - for (i = 0; i < RX_RING; i++) { - np->rx_ring[i].Flags = 0; - } + for (i = 0; i < RX_RING; i++) + np->rx_ring[i].FlagLen = 0; return nv_alloc_rx(dev); } @@ -720,7 +891,7 @@ static void nv_drain_tx(struct net_devic struct fe_priv *np = get_nvpriv(dev); int i; for (i = 0; i < TX_RING; i++) { - np->tx_ring[i].Flags = 0; + np->tx_ring[i].FlagLen = 0; if (np->tx_skbuff[i]) { pci_unmap_single(np->pci_dev, np->tx_dma[i], np->tx_skbuff[i]->len, @@ -737,7 +908,7 @@ static void nv_drain_rx(struct net_devic struct fe_priv *np = get_nvpriv(dev); int i; for (i = 0; i < RX_RING; i++) { - np->rx_ring[i].Flags = 0; + np->rx_ring[i].FlagLen = 0; wmb(); if (np->rx_skbuff[i]) { pci_unmap_single(np->pci_dev, np->rx_dma[i], @@ -769,11 +940,10 @@ static int nv_start_xmit(struct sk_buff PCI_DMA_TODEVICE); np->tx_ring[nr].PacketBuffer = cpu_to_le32(np->tx_dma[nr]); - np->tx_ring[nr].Length = cpu_to_le16(skb->len-1); spin_lock_irq(&np->lock); wmb(); - np->tx_ring[nr].Flags = np->tx_flags; + np->tx_ring[nr].FlagLen = cpu_to_le32( (skb->len-1) | np->tx_flags ); dprintk(KERN_DEBUG "%s: nv_start_xmit: packet packet %d queued for transmission.\n", dev->name, np->next_tx); { @@ -792,7 +962,7 @@ static int nv_start_xmit(struct sk_buff if (np->next_tx - np->nic_tx >= TX_LIMIT_STOP) netif_stop_queue(dev); spin_unlock_irq(&np->lock); - writel(NVREG_TXRXCTL_KICK, get_hwbase(dev) + NvRegTxRxControl); + writel(NVREG_TXRXCTL_KICK|np->desc_ver, get_hwbase(dev) + NvRegTxRxControl); pci_push(get_hwbase(dev)); return 0; } @@ -805,27 +975,42 @@ static int nv_start_xmit(struct sk_buff static void nv_tx_done(struct net_device *dev) { struct fe_priv *np = get_nvpriv(dev); + u32 Flags; + int i; - while (np->nic_tx < np->next_tx) { - struct ring_desc *prd; - int i = np->nic_tx % TX_RING; + while (np->nic_tx != np->next_tx) { + i = np->nic_tx % TX_RING; - prd = &np->tx_ring[i]; + Flags = le32_to_cpu(np->tx_ring[i].FlagLen); dprintk(KERN_DEBUG "%s: nv_tx_done: looking at packet %d, Flags 0x%x.\n", - dev->name, np->nic_tx, prd->Flags); - if (prd->Flags & cpu_to_le16(NV_TX_VALID)) + dev->name, np->nic_tx, Flags); + if (Flags & NV_TX_VALID) break; - if (prd->Flags & cpu_to_le16(NV_TX_RETRYERROR|NV_TX_CARRIERLOST|NV_TX_LATECOLLISION| - NV_TX_UNDERFLOW|NV_TX_ERROR)) { - if (prd->Flags & cpu_to_le16(NV_TX_UNDERFLOW)) - np->stats.tx_fifo_errors++; - if (prd->Flags & cpu_to_le16(NV_TX_CARRIERLOST)) - np->stats.tx_carrier_errors++; - np->stats.tx_errors++; + if (np->desc_ver == DESC_VER_1) { + if (Flags & (NV_TX_RETRYERROR|NV_TX_CARRIERLOST|NV_TX_LATECOLLISION| + NV_TX_UNDERFLOW|NV_TX_ERROR)) { + if (Flags & NV_TX_UNDERFLOW) + np->stats.tx_fifo_errors++; + if (Flags & NV_TX_CARRIERLOST) + np->stats.tx_carrier_errors++; + np->stats.tx_errors++; + } else { + np->stats.tx_packets++; + np->stats.tx_bytes += np->tx_skbuff[i]->len; + } } else { - np->stats.tx_packets++; - np->stats.tx_bytes += np->tx_skbuff[i]->len; + if (Flags & (NV_TX2_RETRYERROR|NV_TX2_CARRIERLOST|NV_TX2_LATECOLLISION| + NV_TX2_UNDERFLOW|NV_TX2_ERROR)) { + if (Flags & NV_TX2_UNDERFLOW) + np->stats.tx_fifo_errors++; + if (Flags & NV_TX2_CARRIERLOST) + np->stats.tx_carrier_errors++; + np->stats.tx_errors++; + } else { + np->stats.tx_packets++; + np->stats.tx_bytes += np->tx_skbuff[i]->len; + } } pci_unmap_single(np->pci_dev, np->tx_dma[i], np->tx_skbuff[i]->len, @@ -875,9 +1060,9 @@ static void nv_tx_timeout(struct net_dev static void nv_rx_process(struct net_device *dev) { struct fe_priv *np = get_nvpriv(dev); + u32 Flags; for (;;) { - struct ring_desc *prd; struct sk_buff *skb; int len; int i; @@ -885,11 +1070,13 @@ static void nv_rx_process(struct net_dev break; /* we scanned the whole ring - do not continue */ i = np->cur_rx % RX_RING; - prd = &np->rx_ring[i]; + Flags = le32_to_cpu(np->rx_ring[i].FlagLen); + len = nv_descr_getlength(&np->rx_ring[i], np->desc_ver); + dprintk(KERN_DEBUG "%s: nv_rx_process: looking at packet %d, Flags 0x%x.\n", - dev->name, np->cur_rx, prd->Flags); + dev->name, np->cur_rx, Flags); - if (prd->Flags & cpu_to_le16(NV_RX_AVAIL)) + if (Flags & NV_RX_AVAIL) break; /* still owned by hardware, */ /* @@ -903,7 +1090,7 @@ static void nv_rx_process(struct net_dev { int j; - dprintk(KERN_DEBUG "Dumping packet (flags 0x%x).",prd->Flags); + dprintk(KERN_DEBUG "Dumping packet (flags 0x%x).",Flags); for (j=0; j<64; j++) { if ((j%16) == 0) dprintk("\n%03x:", j); @@ -912,41 +1099,78 @@ static void nv_rx_process(struct net_dev dprintk("\n"); } /* look at what we actually got: */ - if (!(prd->Flags & cpu_to_le16(NV_RX_DESCRIPTORVALID))) - goto next_pkt; - - - len = le16_to_cpu(prd->Length); + if (np->desc_ver == DESC_VER_1) { + if (!(Flags & NV_RX_DESCRIPTORVALID)) + goto next_pkt; - if (prd->Flags & cpu_to_le16(NV_RX_MISSEDFRAME)) { - np->stats.rx_missed_errors++; - np->stats.rx_errors++; - goto next_pkt; - } - if (prd->Flags & cpu_to_le16(NV_RX_ERROR1|NV_RX_ERROR2|NV_RX_ERROR3|NV_RX_ERROR4)) { - np->stats.rx_errors++; - goto next_pkt; - } - if (prd->Flags & cpu_to_le16(NV_RX_CRCERR)) { - np->stats.rx_crc_errors++; - np->stats.rx_errors++; - goto next_pkt; - } - if (prd->Flags & cpu_to_le16(NV_RX_OVERFLOW)) { - np->stats.rx_over_errors++; - np->stats.rx_errors++; - goto next_pkt; - } - if (prd->Flags & cpu_to_le16(NV_RX_ERROR)) { - /* framing errors are soft errors, the rest is fatal. */ - if (prd->Flags & cpu_to_le16(NV_RX_FRAMINGERR)) { - if (prd->Flags & cpu_to_le16(NV_RX_SUBSTRACT1)) { - len--; + if (Flags & NV_RX_MISSEDFRAME) { + np->stats.rx_missed_errors++; + np->stats.rx_errors++; + goto next_pkt; + } + if (Flags & (NV_RX_ERROR1|NV_RX_ERROR2|NV_RX_ERROR3|NV_RX_ERROR4)) { + np->stats.rx_errors++; + goto next_pkt; + } + if (Flags & NV_RX_CRCERR) { + np->stats.rx_crc_errors++; + np->stats.rx_errors++; + goto next_pkt; + } + if (Flags & NV_RX_OVERFLOW) { + np->stats.rx_over_errors++; + np->stats.rx_errors++; + goto next_pkt; + } + if (Flags & NV_RX_ERROR) { + /* framing errors are soft errors, the rest is fatal. */ + if (Flags & NV_RX_FRAMINGERR) { + if (Flags & NV_RX_SUBSTRACT1) { + len--; + } + } else { + np->stats.rx_errors++; + goto next_pkt; } - } else { + } + } else { + if (!(Flags & NV_RX2_DESCRIPTORVALID)) + goto next_pkt; + + if (Flags & (NV_RX2_ERROR1|NV_RX2_ERROR2|NV_RX2_ERROR3|NV_RX2_ERROR4)) { np->stats.rx_errors++; goto next_pkt; } + if (Flags & NV_RX2_CRCERR) { + np->stats.rx_crc_errors++; + np->stats.rx_errors++; + goto next_pkt; + } + if (Flags & NV_RX2_OVERFLOW) { + np->stats.rx_over_errors++; + np->stats.rx_errors++; + goto next_pkt; + } + if (Flags & NV_RX2_ERROR) { + /* framing errors are soft errors, the rest is fatal. */ + if (Flags & NV_RX2_FRAMINGERR) { + if (Flags & NV_RX2_SUBSTRACT1) { + len--; + } + } else { + np->stats.rx_errors++; + goto next_pkt; + } + } + Flags &= NV_RX2_CHECKSUMMASK; + if (Flags == NV_RX2_CHECKSUMOK1 || + Flags == NV_RX2_CHECKSUMOK2 || + Flags == NV_RX2_CHECKSUMOK3) { + dprintk(KERN_DEBUG "%s: hw checksum hit!.\n", dev->name); + np->rx_skbuff[i]->ip_summed = CHECKSUM_UNNECESSARY; + } else { + dprintk(KERN_DEBUG "%s: hwchecksum miss!.\n", dev->name); + } } /* got a valid packet - forward it to the network core */ skb = np->rx_skbuff[i]; @@ -971,7 +1195,7 @@ next_pkt: */ static int nv_change_mtu(struct net_device *dev, int new_mtu) { - if (new_mtu > DEFAULT_MTU) + if (new_mtu > ETH_DATA_LEN) return -EINVAL; dev->mtu = new_mtu; return 0; @@ -1035,6 +1259,8 @@ static void nv_set_multicast(struct net_ writel(mask[0], base + NvRegMulticastMaskA); writel(mask[1], base + NvRegMulticastMaskB); writel(pff, base + NvRegPacketFilterFlags); + dprintk(KERN_INFO "%s: reconfiguration for multicast lists.\n", + dev->name); nv_start_rx(dev); spin_unlock_irq(&np->lock); } @@ -1042,16 +1268,62 @@ static void nv_set_multicast(struct net_ static int nv_update_linkspeed(struct net_device *dev) { struct fe_priv *np = get_nvpriv(dev); - int adv, lpa, newls, newdup; + u8 *base = get_hwbase(dev); + int adv, lpa; + int newls = np->linkspeed; + int newdup = np->duplex; + int mii_status; + int retval = 0; + u32 control_1000, status_1000, phyreg; + + /* BMSR_LSTATUS is latched, read it twice: + * we want the current value. + */ + mii_rw(dev, np->phyaddr, MII_BMSR, MII_READ); + mii_status = mii_rw(dev, np->phyaddr, MII_BMSR, MII_READ); + + if (!(mii_status & BMSR_LSTATUS)) { + dprintk(KERN_DEBUG "%s: no link detected by phy - falling back to 10HD.\n", + dev->name); + newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10; + newdup = 0; + retval = 0; + goto set_speed; + } + + /* check auto negotiation is complete */ + if (!(mii_status & BMSR_ANEGCOMPLETE)) { + /* still in autonegotiation - configure nic for 10 MBit HD and wait. */ + newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10; + newdup = 0; + retval = 0; + dprintk(KERN_DEBUG "%s: autoneg not completed - falling back to 10HD.\n", dev->name); + goto set_speed; + } + + retval = 1; + if (np->gigabit == PHY_GIGABIT) { + control_1000 = mii_rw(dev, np->phyaddr, MII_1000BT_CR, MII_READ); + status_1000 = mii_rw(dev, np->phyaddr, MII_1000BT_SR, MII_READ); + + if ((control_1000 & ADVERTISE_1000FULL) && + (status_1000 & LPA_1000FULL)) { + dprintk(KERN_DEBUG "%s: nv_update_linkspeed: GBit ethernet detected.\n", + dev->name); + newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_1000; + newdup = 1; + goto set_speed; + } + } adv = mii_rw(dev, np->phyaddr, MII_ADVERTISE, MII_READ); lpa = mii_rw(dev, np->phyaddr, MII_LPA, MII_READ); dprintk(KERN_DEBUG "%s: nv_update_linkspeed: PHY advertises 0x%04x, lpa 0x%04x.\n", dev->name, adv, lpa); - /* FIXME: handle parallel detection properly, handle gigabit ethernet */ + /* FIXME: handle parallel detection properly */ lpa = lpa & adv; - if (lpa & LPA_100FULL) { + if (lpa & LPA_100FULL) { newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_100; newdup = 1; } else if (lpa & LPA_100HALF) { @@ -1068,37 +1340,57 @@ static int nv_update_linkspeed(struct ne newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10; newdup = 0; } - if (np->duplex != newdup || np->linkspeed != newls) { - np->duplex = newdup; - np->linkspeed = newls; - return 1; - } - return 0; -} -static void nv_link_irq(struct net_device *dev) -{ - struct fe_priv *np = get_nvpriv(dev); - u8 *base = get_hwbase(dev); - u32 miistat; - int miival; +set_speed: + if (np->duplex == newdup && np->linkspeed == newls) + return retval; + + dprintk(KERN_INFO "%s: changing link setting from %d/%d to %d/%d.\n", + dev->name, np->linkspeed, np->duplex, newls, newdup); + + np->duplex = newdup; + np->linkspeed = newls; + + if (np->gigabit == PHY_GIGABIT) { + phyreg = readl(base + NvRegRandomSeed); + phyreg &= ~(0x3FF00); + if ((np->linkspeed & 0xFFF) == NVREG_LINKSPEED_10) + phyreg |= NVREG_RNDSEED_FORCE3; + else if ((np->linkspeed & 0xFFF) == NVREG_LINKSPEED_100) + phyreg |= NVREG_RNDSEED_FORCE2; + else if ((np->linkspeed & 0xFFF) == NVREG_LINKSPEED_1000) + phyreg |= NVREG_RNDSEED_FORCE; + writel(phyreg, base + NvRegRandomSeed); + } + + phyreg = readl(base + NvRegPhyInterface); + phyreg &= ~(PHY_HALF|PHY_100|PHY_1000); + if (np->duplex == 0) + phyreg |= PHY_HALF; + if ((np->linkspeed & 0xFFF) == NVREG_LINKSPEED_100) + phyreg |= PHY_100; + else if ((np->linkspeed & 0xFFF) == NVREG_LINKSPEED_1000) + phyreg |= PHY_1000; + writel(phyreg, base + NvRegPhyInterface); - miistat = readl(base + NvRegMIIStatus); - writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus); - printk(KERN_DEBUG "%s: link change notification, status 0x%x.\n", dev->name, miistat); + writel(NVREG_MISC1_FORCE | ( np->duplex ? 0 : NVREG_MISC1_HD), + base + NvRegMisc1); + pci_push(base); + writel(np->linkspeed, base + NvRegLinkSpeed); + pci_push(base); - miival = mii_rw(dev, np->phyaddr, MII_BMSR, MII_READ); - if (miival & BMSR_ANEGCOMPLETE) { - nv_update_linkspeed(dev); + return retval; +} +static void nv_linkchange(struct net_device *dev) +{ + if (nv_update_linkspeed(dev)) { if (netif_carrier_ok(dev)) { nv_stop_rx(dev); } else { netif_carrier_on(dev); printk(KERN_INFO "%s: link up.\n", dev->name); } - writel(NVREG_MISC1_FORCE | ( np->duplex ? 0 : NVREG_MISC1_HD), - base + NvRegMisc1); nv_start_rx(dev); } else { if (netif_carrier_ok(dev)) { @@ -1106,11 +1398,23 @@ static void nv_link_irq(struct net_devic printk(KERN_INFO "%s: link down.\n", dev->name); nv_stop_rx(dev); } - writel(np->linkspeed, base + NvRegLinkSpeed); - pci_push(base); } } +static void nv_link_irq(struct net_device *dev) +{ + u8 *base = get_hwbase(dev); + u32 miistat; + + miistat = readl(base + NvRegMIIStatus); + writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus); + dprintk(KERN_INFO "%s: link change irq, status 0x%x.\n", dev->name, miistat); + + if (miistat & (NVREG_MIISTAT_LINKCHANGE)) + nv_linkchange(dev); + dprintk(KERN_DEBUG "%s: link change notification done.\n", dev->name); +} + static irqreturn_t nv_nic_irq(int foo, void *data, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) data; @@ -1135,7 +1439,7 @@ static irqreturn_t nv_nic_irq(int foo, v spin_unlock(&np->lock); } - if (events & (NVREG_IRQ_RX|NVREG_IRQ_RX_NOBUF)) { + if (events & (NVREG_IRQ_RX_ERROR|NVREG_IRQ_RX|NVREG_IRQ_RX_NOBUF)) { nv_rx_process(dev); if (nv_alloc_rx(dev)) { spin_lock(&np->lock); @@ -1150,6 +1454,12 @@ static irqreturn_t nv_nic_irq(int foo, v nv_link_irq(dev); spin_unlock(&np->lock); } + if (np->need_linktimer && time_after(jiffies, np->link_timeout)) { + spin_lock(&np->lock); + nv_linkchange(dev); + spin_unlock(&np->lock); + np->link_timeout = jiffies + LINK_TIMEOUT; + } if (events & (NVREG_IRQ_TX_ERR)) { dprintk(KERN_DEBUG "%s: received irq with events 0x%x. Probably TX fail.\n", dev->name, events); @@ -1157,7 +1467,7 @@ static irqreturn_t nv_nic_irq(int foo, v if (events & (NVREG_IRQ_UNKNOWN)) { printk(KERN_DEBUG "%s: received irq with unknown events 0x%x. Please report\n", dev->name, events); - } + } if (i > max_interrupt_work) { spin_lock(&np->lock); /* disable interrupts on the nic */ @@ -1210,21 +1520,27 @@ static int nv_open(struct net_device *de writel(0, base + NvRegMulticastMaskA); writel(0, base + NvRegMulticastMaskB); writel(0, base + NvRegPacketFilterFlags); + + writel(0, base + NvRegTransmitterControl); + writel(0, base + NvRegReceiverControl); + writel(0, base + NvRegAdapterControl); + + /* 2) initialize descriptor rings */ + oom = nv_init_ring(dev); + writel(0, base + NvRegLinkSpeed); writel(0, base + NvRegUnknownTransmitterReg); nv_txrx_reset(dev); writel(0, base + NvRegUnknownSetupReg6); - /* 2) initialize descriptor rings */ np->in_shutdown = 0; - oom = nv_init_ring(dev); /* 3) set mac address */ { u32 mac[2]; - mac[0] = (dev->dev_addr[0] << 0) + (dev->dev_addr[1] << 8) + + mac[0] = (dev->dev_addr[0] << 0) + (dev->dev_addr[1] << 8) + (dev->dev_addr[2] << 16) + (dev->dev_addr[3] << 24); mac[1] = (dev->dev_addr[4] << 0) + (dev->dev_addr[5] << 8); @@ -1232,53 +1548,31 @@ static int nv_open(struct net_device *de writel(mac[1], base + NvRegMacAddrB); } - /* 4) continue setup */ + /* 4) give hw rings */ + writel((u32) np->ring_addr, base + NvRegRxRingPhysAddr); + writel((u32) (np->ring_addr + RX_RING*sizeof(struct ring_desc)), base + NvRegTxRingPhysAddr); + writel( ((RX_RING-1) << NVREG_RINGSZ_RXSHIFT) + ((TX_RING-1) << NVREG_RINGSZ_TXSHIFT), + base + NvRegRingSizes); + + /* 5) continue setup */ np->linkspeed = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10; np->duplex = 0; + + writel(np->linkspeed, base + NvRegLinkSpeed); writel(NVREG_UNKSETUP3_VAL1, base + NvRegUnknownSetupReg3); - writel(0, base + NvRegTxRxControl); + writel(np->desc_ver, base + NvRegTxRxControl); pci_push(base); - writel(NVREG_TXRXCTL_BIT1, base + NvRegTxRxControl); + writel(NVREG_TXRXCTL_BIT1|np->desc_ver, base + NvRegTxRxControl); reg_delay(dev, NvRegUnknownSetupReg5, NVREG_UNKSETUP5_BIT31, NVREG_UNKSETUP5_BIT31, NV_SETUP5_DELAY, NV_SETUP5_DELAYMAX, KERN_INFO "open: SetupReg5, Bit 31 remained off\n"); - writel(0, base + NvRegUnknownSetupReg4); - - /* 5) Find a suitable PHY */ - writel(NVREG_MIISPEED_BIT8|NVREG_MIIDELAY, base + NvRegMIISpeed); - for (i = 1; i < 32; i++) { - int id1, id2; - - spin_lock_irq(&np->lock); - id1 = mii_rw(dev, i, MII_PHYSID1, MII_READ); - spin_unlock_irq(&np->lock); - if (id1 < 0 || id1 == 0xffff) - continue; - spin_lock_irq(&np->lock); - id2 = mii_rw(dev, i, MII_PHYSID2, MII_READ); - spin_unlock_irq(&np->lock); - if (id2 < 0 || id2 == 0xffff) - continue; - dprintk(KERN_DEBUG "%s: open: Found PHY %04x:%04x at address %d.\n", - dev->name, id1, id2, i); - np->phyaddr = i; - spin_lock_irq(&np->lock); - nv_update_linkspeed(dev); - spin_unlock_irq(&np->lock); - - break; - } - if (i == 32) { - printk(KERN_INFO "%s: open: failing due to lack of suitable PHY.\n", - dev->name); - ret = -EINVAL; - goto out_drain; - } + writel(0, base + NvRegUnknownSetupReg4); + writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus); + writel(NVREG_MIISTAT_MASK2, base + NvRegMIIStatus); /* 6) continue setup */ - writel(NVREG_MISC1_FORCE | ( np->duplex ? 0 : NVREG_MISC1_HD), - base + NvRegMisc1); + writel(NVREG_MISC1_FORCE | NVREG_MISC1_HD, base + NvRegMisc1); writel(readl(base + NvRegTransmitterStatus), base + NvRegTransmitterStatus); writel(NVREG_PFF_ALWAYS, base + NvRegPacketFilterFlags); writel(NVREG_OFFLOAD_NORMAL, base + NvRegOffloadConfig); @@ -1290,17 +1584,12 @@ static int nv_open(struct net_device *de writel(NVREG_UNKSETUP2_VAL, base + NvRegUnknownSetupReg2); writel(NVREG_POLL_DEFAULT, base + NvRegPollingInterval); writel(NVREG_UNKSETUP6_VAL, base + NvRegUnknownSetupReg6); - writel((np->phyaddr << NVREG_ADAPTCTL_PHYSHIFT)|NVREG_ADAPTCTL_PHYVALID, + writel((np->phyaddr << NVREG_ADAPTCTL_PHYSHIFT)|NVREG_ADAPTCTL_PHYVALID|NVREG_ADAPTCTL_RUNNING, base + NvRegAdapterControl); + writel(NVREG_MIISPEED_BIT8|NVREG_MIIDELAY, base + NvRegMIISpeed); writel(NVREG_UNKSETUP4_VAL, base + NvRegUnknownSetupReg4); writel(NVREG_WAKEUPFLAGS_VAL, base + NvRegWakeUpFlags); - /* 7) start packet processing */ - writel((u32) np->ring_addr, base + NvRegRxRingPhysAddr); - writel((u32) (np->ring_addr + RX_RING*sizeof(struct ring_desc)), base + NvRegTxRingPhysAddr); - writel( ((RX_RING-1) << NVREG_RINGSZ_RXSHIFT) + ((TX_RING-1) << NVREG_RINGSZ_TXSHIFT), - base + NvRegRingSizes); - i = readl(base + NvRegPowerState); if ( (i & NVREG_POWERSTATE_POWEREDUP) == 0) writel(NVREG_POWERSTATE_POWEREDUP|i, base + NvRegPowerState); @@ -1308,13 +1597,9 @@ static int nv_open(struct net_device *de pci_push(base); udelay(10); writel(readl(base + NvRegPowerState) | NVREG_POWERSTATE_VALID, base + NvRegPowerState); - writel(NVREG_ADAPTCTL_RUNNING, base + NvRegAdapterControl); - writel(0, base + NvRegIrqMask); pci_push(base); - writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus); - pci_push(base); writel(NVREG_MIISTAT_MASK2, base + NvRegMIIStatus); writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus); pci_push(base); @@ -1323,6 +1608,7 @@ static int nv_open(struct net_device *de if (ret) goto out_drain; + /* ask for interrupts */ writel(np->irqmask, base + NvRegIrqMask); spin_lock_irq(&np->lock); @@ -1331,18 +1617,27 @@ static int nv_open(struct net_device *de writel(0, base + NvRegMulticastMaskA); writel(0, base + NvRegMulticastMaskB); writel(NVREG_PFF_ALWAYS|NVREG_PFF_MYADDR, base + NvRegPacketFilterFlags); + /* One manual link speed update: Interrupts are enabled, future link + * speed changes cause interrupts and are handled by nv_link_irq(). + */ + { + u32 miistat; + miistat = readl(base + NvRegMIIStatus); + writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus); + dprintk(KERN_INFO "startup: got 0x%08x.\n", miistat); + } + ret = nv_update_linkspeed(dev); nv_start_rx(dev); nv_start_tx(dev); netif_start_queue(dev); - if (oom) - mod_timer(&np->oom_kick, jiffies + OOM_REFILL); - if (mii_rw(dev, np->phyaddr, MII_BMSR, MII_READ) & BMSR_ANEGCOMPLETE) { + if (ret) { netif_carrier_on(dev); } else { printk("%s: no link during initialization.\n", dev->name); netif_carrier_off(dev); } - + if (oom) + mod_timer(&np->oom_kick, jiffies + OOM_REFILL); spin_unlock_irq(&np->lock); return 0; @@ -1368,9 +1663,10 @@ static int nv_close(struct net_device *d spin_lock_irq(&np->lock); nv_stop_tx(dev); nv_stop_rx(dev); - base = get_hwbase(dev); + nv_txrx_reset(dev); /* disable interrupts on the nic or we will lock up */ + base = get_hwbase(dev); writel(0, base + NvRegIrqMask); pci_push(base); dprintk(KERN_INFO "%s: Irqmask is zero again\n", dev->name); @@ -1424,7 +1720,7 @@ static int __devinit nv_probe(struct pci pci_set_master(pci_dev); - err = pci_request_regions(pci_dev, dev->name); + err = pci_request_regions(pci_dev, DRV_NAME); if (err < 0) goto out_disable; @@ -1447,6 +1743,14 @@ static int __devinit nv_probe(struct pci goto out_relreg; } + /* handle different descriptor versions */ + if (pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_1 || + pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_2 || + pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_3) + np->desc_ver = DESC_VER_1; + else + np->desc_ver = DESC_VER_2; + err = -ENOMEM; dev->base_addr = (unsigned long) ioremap(addr, NV_PCI_REGSZ); if (!dev->base_addr) @@ -1464,7 +1768,7 @@ static int __devinit nv_probe(struct pci dev->get_stats = nv_get_stats; dev->change_mtu = nv_change_mtu; dev->set_multicast_list = nv_set_multicast; - dev->do_ioctl = nv_ioctl; + SET_ETHTOOL_OPS(dev, &ops); dev->tx_timeout = nv_tx_timeout; dev->watchdog_timeo = NV_WATCHDOG_TIMEO; @@ -1506,15 +1810,65 @@ static int __devinit nv_probe(struct pci writel(0, base + NvRegWakeUpFlags); np->wolenabled = 0; - np->tx_flags = cpu_to_le16(NV_TX_LASTPACKET|NV_TX_LASTPACKET1|NV_TX_VALID); - if (id->driver_data & DEV_NEED_LASTPACKET1) - np->tx_flags |= cpu_to_le16(NV_TX_LASTPACKET1); + if (np->desc_ver == DESC_VER_1) { + np->tx_flags = NV_TX_LASTPACKET|NV_TX_VALID; + if (id->driver_data & DEV_NEED_LASTPACKET1) + np->tx_flags |= NV_TX_LASTPACKET1; + } else { + np->tx_flags = NV_TX2_LASTPACKET|NV_TX2_VALID; + if (id->driver_data & DEV_NEED_LASTPACKET1) + np->tx_flags |= NV_TX2_LASTPACKET1; + } if (id->driver_data & DEV_IRQMASK_1) np->irqmask = NVREG_IRQMASK_WANTED_1; if (id->driver_data & DEV_IRQMASK_2) np->irqmask = NVREG_IRQMASK_WANTED_2; if (id->driver_data & DEV_NEED_TIMERIRQ) np->irqmask |= NVREG_IRQ_TIMER; + if (id->driver_data & DEV_NEED_LINKTIMER) { + dprintk(KERN_INFO "%s: link timer on.\n", pci_name(pci_dev)); + np->need_linktimer = 1; + np->link_timeout = jiffies + LINK_TIMEOUT; + } else { + dprintk(KERN_INFO "%s: link timer off.\n", pci_name(pci_dev)); + np->need_linktimer = 0; + } + + /* find a suitable phy */ + for (i = 1; i < 32; i++) { + int id1, id2; + + spin_lock_irq(&np->lock); + id1 = mii_rw(dev, i, MII_PHYSID1, MII_READ); + spin_unlock_irq(&np->lock); + if (id1 < 0 || id1 == 0xffff) + continue; + spin_lock_irq(&np->lock); + id2 = mii_rw(dev, i, MII_PHYSID2, MII_READ); + spin_unlock_irq(&np->lock); + if (id2 < 0 || id2 == 0xffff) + continue; + + id1 = (id1 & PHYID1_OUI_MASK) << PHYID1_OUI_SHFT; + id2 = (id2 & PHYID2_OUI_MASK) >> PHYID2_OUI_SHFT; + dprintk(KERN_DEBUG "%s: open: Found PHY %04x:%04x at address %d.\n", + pci_name(pci_dev), id1, id2, i); + np->phyaddr = i; + np->phy_oui = id1 | id2; + break; + } + if (i == 32) { + /* PHY in isolate mode? No phy attached and user wants to + * test loopback? Very odd, but can be correct. + */ + printk(KERN_INFO "%s: open: Could not find a valid PHY.\n", + pci_name(pci_dev)); + } + + if (i != 32) { + /* reset it */ + phy_init(dev); + } err = register_netdev(dev); if (err) { @@ -1569,21 +1923,77 @@ static void __devexit nv_remove(struct p static struct pci_device_id pci_tbl[] = { { /* nForce Ethernet Controller */ .vendor = PCI_VENDOR_ID_NVIDIA, - .device = 0x1C3, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_1, .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, - .driver_data = DEV_IRQMASK_1|DEV_NEED_TIMERIRQ, + .driver_data = DEV_IRQMASK_1|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER, }, { /* nForce2 Ethernet Controller */ .vendor = PCI_VENDOR_ID_NVIDIA, - .device = 0x0066, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_2, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER, + }, + { /* nForce3 Ethernet Controller */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_3, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER, + }, + { /* nForce3 Ethernet Controller */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_4, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, + }, + { /* nForce3 Ethernet Controller */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_5, .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, }, { /* nForce3 Ethernet Controller */ .vendor = PCI_VENDOR_ID_NVIDIA, - .device = 0x00D6, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_6, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, + }, + { /* nForce3 Ethernet Controller */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_7, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, + }, + { /* CK804 Ethernet Controller */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_8, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, + }, + { /* CK804 Ethernet Controller */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_9, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, + }, + { /* MCP04 Ethernet Controller */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_10, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, + }, + { /* MCP04 Ethernet Controller */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_11, .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, @@ -1610,9 +2020,9 @@ static void __exit exit_nic(void) pci_unregister_driver(&driver); } -MODULE_PARM(max_interrupt_work, "i"); +module_param(max_interrupt_work, int, 0); MODULE_PARM_DESC(max_interrupt_work, "forcedeth maximum events handled per interrupt"); - + MODULE_AUTHOR("Manfred Spraul "); MODULE_DESCRIPTION("Reverse Engineered nForce ethernet driver"); MODULE_LICENSE("GPL"); --- 2.4/include/linux/pci_ids.h 2004-10-17 16:23:05.702090106 +0200 +++ build-2.4/include/linux/pci_ids.h 2004-10-17 12:09:35.374632012 +0200 @@ -981,24 +981,34 @@ #define PCI_DEVICE_ID_NVIDIA_UVTNT2 0x002D #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE 0x0035 #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA 0x0036 +#define PCI_DEVICE_ID_NVIDIA_NVENET_10 0x0037 +#define PCI_DEVICE_ID_NVIDIA_NVENET_11 0x0038 #define PCI_DEVICE_ID_NVIDIA_MCP04_AUDIO 0x003a #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2 0x003e #define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE 0x0053 #define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA 0x0054 #define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2 0x0055 +#define PCI_DEVICE_ID_NVIDIA_NVENET_8 0x0056 +#define PCI_DEVICE_ID_NVIDIA_NVENET_9 0x0057 #define PCI_DEVICE_ID_NVIDIA_CK804_AUDIO 0x0059 #define PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE 0x0065 +#define PCI_DEVICE_ID_NVIDIA_NVENET_2 0x0066 #define PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO 0x006a #define PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE 0x0085 +#define PCI_DEVICE_ID_NVIDIA_NVENET_4 0x0086 +#define PCI_DEVICE_ID_NVIDIA_NVENET_5 0x008c #define PCI_DEVICE_ID_NVIDIA_MCP2S_AUDIO 0x008a #define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA 0x008e #define PCI_DEVICE_ID_NVIDIA_ITNT2 0x00A0 #define PCI_DEVICE_ID_NVIDIA_NFORCE3 0x00d1 #define PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE 0x00d5 +#define PCI_DEVICE_ID_NVIDIA_NVENET_3 0x00d6 #define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da +#define PCI_DEVICE_ID_NVIDIA_NVENET_7 0x00df #define PCI_DEVICE_ID_NVIDIA_NFORCE3S 0x00e1 #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA 0x00e3 #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE 0x00e5 +#define PCI_DEVICE_ID_NVIDIA_NVENET_6 0x00e6 #define PCI_DEVICE_ID_NVIDIA_CK8S_AUDIO 0x00ea #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2 0x00ee #define PCI_DEVICE_ID_NVIDIA_GEFORCE_SDR 0x0100 @@ -1016,6 +1026,7 @@ #define PCI_DEVICE_ID_NVIDIA_NFORCE 0x01a4 #define PCI_DEVICE_ID_NVIDIA_MCP1_AUDIO 0x01b1 #define PCI_DEVICE_ID_NVIDIA_NFORCE_IDE 0x01bc +#define PCI_DEVICE_ID_NVIDIA_NVENET_1 0x01c3 #define PCI_DEVICE_ID_NVIDIA_NFORCE2 0x01e0 #define PCI_DEVICE_ID_NVIDIA_GEFORCE3 0x0200 #define PCI_DEVICE_ID_NVIDIA_GEFORCE3_1 0x0201 From linville@bilbo.tuxdriver.com Sun Oct 17 08:19:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 08:19:41 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9HFJZu2018493 for ; Sun, 17 Oct 2004 08:19:35 -0700 Received: from bilbo.tuxdriver.com (bilbo.tuxdriver.com [24.172.12.5]) by ra.tuxdriver.com (8.11.6/8.11.6) with ESMTP id i9HEFBh28580; Sun, 17 Oct 2004 10:15:11 -0400 Received: from bilbo.tuxdriver.com (bilbo.tuxdriver.com [24.172.12.5]) by bilbo.tuxdriver.com (8.12.11/8.12.11) with ESMTP id i9HFKRho023272; Sun, 17 Oct 2004 11:20:27 -0400 Received: (from linville@localhost) by bilbo.tuxdriver.com (8.12.11/8.12.11/Submit) id i9HFKQ1c023271; Sun, 17 Oct 2004 11:20:26 -0400 Date: Sun, 17 Oct 2004 11:20:26 -0400 From: "John W. Linville" To: akpm@osdl.org, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Cc: marcelo.tosatti@cyclades.com Subject: [patch 2.4.28-pre3] 3c59x: remove EEPROM_RESET for 3c905B Message-ID: <20041017152026.GD13491@tuxdriver.com> Mail-Followup-To: akpm@osdl.org, netdev@oss.sgi.com, linux-kernel@vger.kernel.org, marcelo.tosatti@cyclades.com References: <20040928145455.C12480@tuxdriver.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040928145455.C12480@tuxdriver.com> User-Agent: Mutt/1.4.1i X-archive-position: 10372 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 1936 Lines: 42 Remove the EEPROM_RESET flag for the 3c905B cards. Signed-off-by: John W. Linville --- Looks like I over-reached. Apparently only the 3c905 cards actually need the EEPROM reset, and the 3c905B cards don't like it... (Virtually identical to the 2.6 patch posted previously...) drivers/net/3c59x.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) --- linux-2.4/drivers/net/3c59x.c.orig 2004-10-17 11:11:01.023739152 -0400 +++ linux-2.4/drivers/net/3c59x.c 2004-10-17 11:11:24.834119424 -0400 @@ -506,12 +506,12 @@ static struct vortex_chip_info { {"3c905 Boomerang 100baseT4", PCI_USES_IO|PCI_USES_MASTER, IS_BOOMERANG|HAS_MII|EEPROM_RESET, 64, }, {"3c905B Cyclone 100baseTx", - PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE|EEPROM_RESET, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, {"3c905B Cyclone 10/100/BNC", - PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EEPROM_RESET, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM, 128, }, {"3c905B-FX Cyclone 100baseFx", - PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM|EEPROM_RESET, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_HWCKSM, 128, }, {"3c905C Tornado", PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, {"3c920B-EMB-WNM (ATI Radeon 9100 IGP)", @@ -562,7 +562,7 @@ static struct vortex_chip_info { {"3c982 Hydra Dual Port B", PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_HWCKSM|HAS_NWAY, 128, }, {"3c905B-T4", - PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE|EEPROM_RESET, 128, }, + PCI_USES_IO|PCI_USES_MASTER, IS_CYCLONE|HAS_NWAY|HAS_HWCKSM|EXTRA_PREAMBLE, 128, }, {"3c920B-EMB-WNM Tornado", PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, }, -- John W. Linville linville@tuxdriver.com From kevin@intrameta.com Sun Oct 17 08:31:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 08:31:21 -0700 (PDT) Received: from senegal.corp.im (adsl-69-152-116-157.dsl.rcsntx.swbell.net [69.152.116.157]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9HFVGZ5018996 for ; Sun, 17 Oct 2004 08:31:17 -0700 Subject: VIA Velocity RC4 test report Date: Sun, 17 Oct 2004 10:29:11 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Message-ID: <4F07B3611CD7FA4CA11A6176501B1DA863E1@senegal.corp.im> Content-class: urn:content-classes:message X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: VIA Velocity RC4 test report Thread-Index: AcS0Xg094tdSKzZKQpGiIGO/wGhumQ== From: "Kevin McCarthy" To: , Cc: "Kris Efland" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i9HFVGZ5018996 X-archive-position: 10373 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kevin@intrameta.com Precedence: bulk X-list: netdev Content-Length: 360 Lines: 13 We found the RC4 to work much better than RC3. Pre-RC3, loading the module on init caused Oops. RC3 loaded fine on boot but any activity soon flooded the PHY and took down an entire switch. It is possible the NIC detected gigabit when it was plugged into a 100MBit switch but I am not sure. RC4 has been working very well so far (24 hours). Thanks, Kevin From kaber@trash.net Sun Oct 17 08:48:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 08:48:47 -0700 (PDT) Received: from gw.localnet ([62.206.217.67]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9HFmfrM019638 for ; Sun, 17 Oct 2004 08:48:41 -0700 Received: from [172.16.1.123] (helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1CJDO5-0000LE-00; Sun, 17 Oct 2004 17:56:02 +0200 Message-ID: <4172943B.8050904@trash.net> Date: Sun, 17 Oct 2004 17:48:11 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: netdev@oss.sgi.com, Herbert Xu Subject: [PATCH 2.6]: Check against correct policy list in ip_forward/ip6_forward Content-Type: multipart/mixed; boundary="------------060107060407040907040007" X-archive-position: 10374 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kaber@trash.net Precedence: bulk X-list: netdev Content-Length: 2906 Lines: 86 This is a multi-part message in MIME format. --------------060107060407040907040007 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Hi Dave, currently forwarded packets from a tunnel mode SA are checked in ip_forward/ip6_forward against the XFRM_POLICY_FWD policy list. Neither racoon nor pluto generate a policy for IPSEC_DIR_FWD, so the checks are performed against an empty list. I'm not sure who is wrong here, Linux or the keying daemons, but I think using XFRM_POLICY_IN is more logical since we also use XFRM_POLICY_OUT for forwarded packets, not XFRM_POLICY_FWD. This patch changes ip_forward/ip6_forward to check against the XFRM_POLICY_IN list. BTW: The policy checks succeed as long as the policy list really is empty because xfrm_policy_check skips the check if xfrm_policy_list[dir] == NULL: return !xfrm_policy_list[dir] || (skb->dst->flags & DST_NOPOLICY) || __xfrm_policy_check(sk, dir, skb, family); I think this should really read (!xfrm_policy_list[dir] && !skb->sp) so decapsulated IPsec packets are dropped if no policy exists. Regards Patrick --------------060107060407040907040007 Content-Type: text/plain; name="x" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="x" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/17 05:19:03+02:00 kaber@coreworks.de # [IPSEC]: Check against correct policy list in ip_forward/ip6_forward # # Signed-off-by: Patrick McHardy # # net/ipv6/ip6_output.c # 2004/10/17 05:18:26+02:00 kaber@coreworks.de +1 -1 # [IPSEC]: Check against correct policy list in ip_forward/ip6_forward # # Signed-off-by: Patrick McHardy # # net/ipv4/ip_forward.c # 2004/10/17 05:18:26+02:00 kaber@coreworks.de +1 -1 # [IPSEC]: Check against correct policy list in ip_forward/ip6_forward # # Signed-off-by: Patrick McHardy # diff -Nru a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c --- a/net/ipv4/ip_forward.c 2004-10-17 16:57:28 +02:00 +++ b/net/ipv4/ip_forward.c 2004-10-17 16:57:28 +02:00 @@ -60,7 +60,7 @@ struct rtable *rt; /* Route we use */ struct ip_options * opt = &(IPCB(skb)->opt); - if (!xfrm4_policy_check(NULL, XFRM_POLICY_FWD, skb)) + if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) goto drop; if (IPCB(skb)->opt.router_alert && ip_call_ra_chain(skb)) diff -Nru a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c --- a/net/ipv6/ip6_output.c 2004-10-17 16:57:28 +02:00 +++ b/net/ipv6/ip6_output.c 2004-10-17 16:57:28 +02:00 @@ -355,7 +355,7 @@ if (ipv6_devconf.forwarding == 0) goto error; - if (!xfrm6_policy_check(NULL, XFRM_POLICY_FWD, skb)) { + if (!xfrm6_policy_check(NULL, XFRM_POLICY_IN, skb)) { IP6_INC_STATS(IPSTATS_MIB_INDISCARDS); goto drop; } --------------060107060407040907040007-- From herbert@gondor.apana.org.au Sun Oct 17 14:23:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 14:23:50 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9HLNZhC029663 for ; Sun, 17 Oct 2004 14:23:36 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CJIUr-0007Xx-00; Mon, 18 Oct 2004 07:23:21 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CJIUn-0007Rv-00; Mon, 18 Oct 2004 07:23:17 +1000 Date: Mon, 18 Oct 2004 07:23:17 +1000 To: Patrick McHardy Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 2.6]: Check against correct policy list in ip_forward/ip6_forward Message-ID: <20041017212317.GA28615@gondor.apana.org.au> References: <4172943B.8050904@trash.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4172943B.8050904@trash.net> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10375 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 697 Lines: 17 On Sun, Oct 17, 2004 at 05:48:11PM +0200, Patrick McHardy wrote: > > currently forwarded packets from a tunnel mode SA are checked > in ip_forward/ip6_forward against the XFRM_POLICY_FWD policy > list. Neither racoon nor pluto generate a policy for > IPSEC_DIR_FWD, so the checks are performed against an empty Actually I made damn sure that pluto does generate rules for IPSEC_DIR_FWD after discussing it with Alexey :) Search for XFRM_POLICY_FWD in openswan/programs/pluto. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From herbert@gondor.apana.org.au Sun Oct 17 14:31:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 14:31:48 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9HLVdmH030141 for ; Sun, 17 Oct 2004 14:31:40 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CJIcf-0007jy-00; Mon, 18 Oct 2004 07:31:25 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CJIcU-0007TW-00; Mon, 18 Oct 2004 07:31:14 +1000 From: Herbert Xu To: tgraf@suug.ch (Thomas Graf) Subject: Re: [RFC] Yield in netlink_broadcast when congested Cc: herbert@gondor.apana.org.au, pablo@eurodev.net, hadi@cyberus.ca, davem@davemloft.net, netdev@oss.sgi.com Organization: Core In-Reply-To: <20041017130838.GW21977@postel.suug.ch> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) Message-Id: Date: Mon, 18 Oct 2004 07:31:14 +1000 X-archive-position: 10376 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 1166 Lines: 26 Thomas Graf wrote: > > locking implemented in any application as far as i know, f.e. iproute2 > looks up an ifindex and uses it w/o locking so the link could > be renamed or removed in between. If we ever implement the ietf IMHO that particular case should be dealt with by providing a way for the application to bind to a device and thus holding a reference on it. This reference should then ensure that the interface name/ifindex doesn't go away until the appliation relinquinshes it or dies (i.e., the socket where the binding resides is closed). > in userspace. This daemon could easly lead to multiple listeners > in a single process. Nevertheless, I guess we can ignore it for now as Multiple listeners in a single process should be fine as long as they're listening to different groups. It's only when you listen to the same thing multiple times that you're going to overrun your time-slice and then your receive queue. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From kaber@trash.net Sun Oct 17 15:28:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 15:28:48 -0700 (PDT) Received: from gw.localnet ([62.206.217.67]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9HMSfeC031706 for ; Sun, 17 Oct 2004 15:28:42 -0700 Received: from [172.16.1.123] (helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1CJJbu-00015Q-00; Mon, 18 Oct 2004 00:34:42 +0200 Message-ID: <4172F1AB.4020305@trash.net> Date: Mon, 18 Oct 2004 00:26:51 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 X-Accept-Language: en MIME-Version: 1.0 To: Herbert Xu CC: "David S. Miller" , netdev@oss.sgi.com, ipsec-tools-devel@lists.sourceforge.net Subject: Re: [PATCH 2.6]: Check against correct policy list in ip_forward/ip6_forward References: <4172943B.8050904@trash.net> <20041017212317.GA28615@gondor.apana.org.au> In-Reply-To: <20041017212317.GA28615@gondor.apana.org.au> Content-Type: multipart/mixed; boundary="------------070707010003070307020000" X-archive-position: 10377 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kaber@trash.net Precedence: bulk X-list: netdev Content-Length: 2617 Lines: 78 This is a multi-part message in MIME format. --------------070707010003070307020000 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Herbert Xu wrote: >On Sun, Oct 17, 2004 at 05:48:11PM +0200, Patrick McHardy wrote: > > >>currently forwarded packets from a tunnel mode SA are checked >>in ip_forward/ip6_forward against the XFRM_POLICY_FWD policy >>list. Neither racoon nor pluto generate a policy for >>IPSEC_DIR_FWD, so the checks are performed against an empty >> >> > >Actually I made damn sure that pluto does generate rules for >IPSEC_DIR_FWD after discussing it with Alexey :) Search for >XFRM_POLICY_FWD in openswan/programs/pluto. > > Thanks, I didn't know pluto uses the xfrm_user interface, so I only looked for pfkey symbolic names. So it seems only racoon needs to be fixed. I think we should apply the attached patch to make xfrm_policy_check reject packets decapsulated by IPsec without a policy for this direction, so people will notice something is wrong. It also prevents skipping checks against the socket policy if there is an empty policy list .. or am I missing something ? Regards Patrick --------------070707010003070307020000 Content-Type: text/plain; name="x" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="x" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/18 00:09:08+02:00 kaber@coreworks.de # [XFRM]: Fix invalid optimization in xfrm_policy_check # # By skipping policy checks when the policy list is empty we # allow packets decapsulated by IPsec without a policy and # miss checking against socket policies. # # Signed-off-by: Patrick McHardy # # include/net/xfrm.h # 2004/10/18 00:08:14+02:00 kaber@coreworks.de +1 -1 # [XFRM]: Fix invalid optimization in xfrm_policy_check # # By skipping policy checks when the policy list is empty we # allow packets decapsulated by IPsec without a policy and # miss checking against socket policies. # # Signed-off-by: Patrick McHardy # diff -Nru a/include/net/xfrm.h b/include/net/xfrm.h --- a/include/net/xfrm.h 2004-10-18 00:15:18 +02:00 +++ b/include/net/xfrm.h 2004-10-18 00:15:18 +02:00 @@ -601,7 +601,7 @@ if (sk && sk->sk_policy[XFRM_POLICY_IN]) return __xfrm_policy_check(sk, dir, skb, family); - return !xfrm_policy_list[dir] || + return ((!sk || !sk->sk_policy[dir]) && !xfrm_policy_list[dir] && !skb->sp) || (skb->dst->flags & DST_NOPOLICY) || __xfrm_policy_check(sk, dir, skb, family); } --------------070707010003070307020000-- From kaber@trash.net Sun Oct 17 15:43:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 15:43:31 -0700 (PDT) Received: from gw.localnet ([62.206.217.67]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9HMhQBO032287 for ; Sun, 17 Oct 2004 15:43:26 -0700 Received: from [172.16.1.123] (helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1CJJqg-0004On-00; Mon, 18 Oct 2004 00:49:58 +0200 Message-ID: <4172F53F.2040808@trash.net> Date: Mon, 18 Oct 2004 00:42:07 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 X-Accept-Language: en MIME-Version: 1.0 To: Patrick McHardy CC: Herbert Xu , "David S. Miller" , netdev@oss.sgi.com, ipsec-tools-devel@lists.sourceforge.net Subject: Re: [PATCH 2.6]: Check against correct policy list in ip_forward/ip6_forward References: <4172943B.8050904@trash.net> <20041017212317.GA28615@gondor.apana.org.au> <4172F1AB.4020305@trash.net> In-Reply-To: <4172F1AB.4020305@trash.net> Content-Type: multipart/mixed; boundary="------------000007000302020204020909" X-archive-position: 10378 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kaber@trash.net Precedence: bulk X-list: netdev Content-Length: 1829 Lines: 57 This is a multi-part message in MIME format. --------------000007000302020204020909 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Patrick McHardy wrote: > Thanks, I didn't know pluto uses the xfrm_user interface, so > I only looked for pfkey symbolic names. So it seems only racoon > needs to be fixed. I think we should apply the attached patch > to make xfrm_policy_check reject packets decapsulated by IPsec > without a policy for this direction, so people will notice > something is wrong. It also prevents skipping checks against the > socket policy if there is an empty policy list .. or am I missing > something ? Obsiously I did :) This patch should be better. > Regards > Patrick > >--- a/include/net/xfrm.h 2004-10-18 00:15:18 +02:00 >+++ b/include/net/xfrm.h 2004-10-18 00:15:18 +02:00 >@@ -601,7 +601,7 @@ > if (sk && sk->sk_policy[XFRM_POLICY_IN]) > return __xfrm_policy_check(sk, dir, skb, family); > >- return !xfrm_policy_list[dir] || >+ return ((!sk || !sk->sk_policy[dir]) && !xfrm_policy_list[dir] && !skb->sp) || > (skb->dst->flags & DST_NOPOLICY) || > __xfrm_policy_check(sk, dir, skb, family); > } > > --------------000007000302020204020909 Content-Type: text/plain; name="x" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="x" ===== include/net/xfrm.h 1.68 vs edited ===== --- 1.68/include/net/xfrm.h 2004-09-10 23:35:53 +02:00 +++ edited/include/net/xfrm.h 2004-10-18 00:41:28 +02:00 @@ -601,7 +601,7 @@ if (sk && sk->sk_policy[XFRM_POLICY_IN]) return __xfrm_policy_check(sk, dir, skb, family); - return !xfrm_policy_list[dir] || + return (!xfrm_policy_list[dir] && !skb->sp) || (skb->dst->flags & DST_NOPOLICY) || __xfrm_policy_check(sk, dir, skb, family); } --------------000007000302020204020909-- From herbert@gondor.apana.org.au Sun Oct 17 16:14:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 16:14:12 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9HNDwZb000862 for ; Sun, 17 Oct 2004 16:14:02 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CJKDB-0008RG-00; Mon, 18 Oct 2004 09:13:13 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CJKCw-0007d8-00; Mon, 18 Oct 2004 09:12:58 +1000 Date: Mon, 18 Oct 2004 09:12:58 +1000 To: Patrick McHardy Cc: "David S. Miller" , netdev@oss.sgi.com, ipsec-tools-devel@lists.sourceforge.net Subject: Re: [PATCH 2.6]: Check against correct policy list in ip_forward/ip6_forward Message-ID: <20041017231258.GA29294@gondor.apana.org.au> References: <4172943B.8050904@trash.net> <20041017212317.GA28615@gondor.apana.org.au> <4172F1AB.4020305@trash.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4172F1AB.4020305@trash.net> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10379 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 1057 Lines: 27 On Mon, Oct 18, 2004 at 12:26:51AM +0200, Patrick McHardy wrote: > > I only looked for pfkey symbolic names. So it seems only racoon > needs to be fixed. Agreed. > I think we should apply the attached patch > to make xfrm_policy_check reject packets decapsulated by IPsec > without a policy for this direction, so people will notice > something is wrong. It also prevents skipping checks against the Well it's too late to change the default policy. People rely on the default policy being allow so changing it will wreak havoc. Even if you do it only for packets with an IPsec encapsulation by checking skb->sp it may still break people who use manual keying and rely on the property that you can always add optional SAs. More importantly that it'll stick out like a sore thumb in terms of its semantics. So let's just fix racoon. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From herbert@gondor.apana.org.au Sun Oct 17 18:08:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 17 Oct 2004 18:08:39 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9I18Tbo015821 for ; Sun, 17 Oct 2004 18:08:30 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CJM0a-0000VM-00; Mon, 18 Oct 2004 11:08:20 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CJM0W-0007pD-00; Mon, 18 Oct 2004 11:08:16 +1000 Date: Mon, 18 Oct 2004 11:08:16 +1000 To: "Christopher K. Johnson" Cc: netdev@oss.sgi.com Subject: Re: IPsec tunnel mode bug - malformed, misaddressed packets Message-ID: <20041018010816.GA30059@gondor.apana.org.au> References: <41725CF5.2010606@gwi.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41725CF5.2010606@gwi.net> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10380 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 797 Lines: 19 On Sun, Oct 17, 2004 at 11:52:21AM +0000, Christopher K. Johnson wrote: > There is an ipsec bug in FC2 kernel 2.6.8-1.521 for ipsec tunnel mode. > I have proven with a packet trace that some packets are > misaddressed. Specifically it constructs a packet of the form: > IP header1 | AH header | IP header2 | ESP This is purely a user-space error. The Linux IPsec stack is very flexible. In particular, you can configure it to generate non-sense such as the above quite easily. In this case, racoon needs to be taught that only the inner SA should be marked as tunnel mode. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From ganesh.venkatesan@intel.com Mon Oct 18 03:23:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 03:23:20 -0700 (PDT) Received: from caduceus.fm.intel.com (fmr02.intel.com [192.55.52.25]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IANDe4005682 for ; Mon, 18 Oct 2004 03:23:13 -0700 Received: from petasus.fm.intel.com (petasus.fm.intel.com [10.1.192.37]) by caduceus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9IANW9d015047; Mon, 18 Oct 2004 10:23:35 GMT Received: from fmsmsxvs043.fm.intel.com (fmsmsxvs043.fm.intel.com [132.233.42.129]) by petasus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9IAMa7j029082; Mon, 18 Oct 2004 10:22:39 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs043.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101803225025647 ; Mon, 18 Oct 2004 03:22:51 -0700 Date: Mon, 18 Oct 2004 03:22:51 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" , Ganesh Venkatesan cc: netdev Subject: [Patch 2.5 1/3] e1000: Configuration and user guide update In-Reply-To: Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10386 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 17253 Lines: 406 Signed-off-by: Ganesh Venkatesan diff -Nuarp old/Documentation/networking/e1000.txt new/Documentation/networking/e1000.txt --- old/Documentation/networking/e1000.txt 2004-10-07 15:50:44.000000000 -0700 +++ new/Documentation/networking/e1000.txt 2004-10-07 15:51:15.000000000 -0700 @@ -1,14 +1,14 @@ Linux* Base Driver for the Intel(R) PRO/1000 Family of Adapters =============================================================== -January 8, 2003 +September 13, 2004 Contents ======== - In This Release -- Supported Adapters +- Identifying Your Adapter - Command Line Parameters - Speed and Duplex Configuration - Additional Configurations @@ -20,63 +20,29 @@ In This Release =============== This file describes the Linux* Base Driver for the Intel(R) PRO/1000 Family -of Adapters, version 5.0.x. This driver includes support for -Itanium(TM)-based systems. +of Adapters, version 5.x.x. This driver includes support for Itanium(TM)2 +and EM64T systems. +For questions related to hardware requirements, refer to the documentation +supplied with your Intel PRO/1000 adapter. All hardware requirements listed +apply to use with Linux. Native VLANs are now available with supported kernels. - -Supported Adapters -================== - -The following Intel network adapters are compatible with the drivers in this -release: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - - 82542 PRO/1000 Gigabit Server Adapter 700262-xxx, 717037-xxx - - 82543 PRO/1000 F Server Adapter 738640-xxx, A38888-xxx - - 82543 PRO/1000 T Server Adapter A19845-xxx, A33948-xxx - - 82544 PRO/1000 XT Server Adapter A51580-xxx - - 82544 PRO/1000 XF Server Adapter A50484-xxx - - 82544 PRO/1000 T Desktop Adapter A62947-xxx - - 82540 PRO/1000 MT Desktop Adapter A78408-xxx - 82541 C91016-xxx - - 82545 PRO/1000 MT Server Adapter A92165-xxx - - 82546 PRO/1000 MT Dual Port Server Adapter A92111-xxx - - 82545 PRO/1000 MF Server Adapter A91622-xxx - - 82545 PRO/1000 MF Server Adapter(LX) A91624-xxx - - 82546 PRO/1000 MF Dual Port Server Adapter A91620-xxx - - - -To verify your Intel adapter is supported, find the board ID number on the -adapter. Look for a label that has a barcode and a number in the format -A12345-001. Match this to the list of numbers above. +Identifying Your Adapter +======================== For more information on how to identify your adapter, go to the Adapter & Driver ID Guide at: http://support.intel.com/support/network/adapter/pro100/21397.htm -For the latest Intel network drivers for Linux, refer to the following +For the latest Intel network drivers for Linux, refer to the following +website. In the search field, enter your adapter name or type, or use the +networking link on the left to search for your adapter: http://downloadfinder.intel.com/scripts-df/support_intel.asp - Command Line Parameters ======================= @@ -92,27 +58,39 @@ For example, with two PRO/1000 PCI adapt insmod e1000 TxDescriptors=80,128 -loads the e1000 driver with 80 TX resources for the first adapter and 128 TX -resources for the second adapter. +loads the e1000 driver with 80 TX descriptors for the first adapter and 128 TX +descriptors for the second adapter. The default value for each parameter is generally the recommended setting, -unless otherwise noted. - -For more information about the AutoNeg, Duplex, and Speed parameters, see the -"Speed and Duplex Configuration" section in this document. +unless otherwise noted. Also, if the driver is statically built into the +kernel, the driver is loaded with the default values for all the parameters. +Ethtool can be used to change some of the parameters at runtime. + + NOTES: For more information about the AutoNeg, Duplex, and Speed + parameters, see the "Speed and Duplex Configuration" section in + this document. + + For more information about the InterruptThrottleRate, RxIntDelay, + TxIntDelay, RxAbsIntDelay, and TxAbsIntDelay parameters, see the + application note at: + http://www.intel.com/design/network/applnots/ap450.htm + A descriptor describes a data buffer and attributes related to the + data buffer. This information is accessed by the hardware. AutoNeg (adapters using copper connections only) Valid Range: 0x01-0x0F, 0x20-0x2F Default Value: 0x2F This parameter is a bit mask that specifies which speed and duplex settings the board advertises. When this parameter is used, the Speed and - Duplex parameters must not be specified. + Duplex parameters must not be specified. + NOTE: Refer to the Speed and Duplex section of this readme for more + information on the AutoNeg parameter. Duplex (adapters using copper connections only) Valid Range: 0-2 (0=auto-negotiate, 1=half, 2=full) Default Value: 0 - Defines the direction in which data is allowed to flow. Can by either one + Defines the direction in which data is allowed to flow. Can be either one or two-directional. If both Duplex and the link partner are set to auto- negotiate, the board auto-detects the correct duplex. If the link partner is forced (either full or half), Duplex defaults to half-duplex. @@ -125,22 +103,46 @@ Default: Read flow control settings from InterruptThrottleRate Valid Range: 100-100000 (0=off, 1=dynamic) -Default Value: 1 +Default Value: 8000 This value represents the maximum number of interrupts per second the controller generates. InterruptThrottleRate is another setting used in interrupt moderation. Dynamic mode uses a heuristic algorithm to adjust InterruptThrottleRate based on the current traffic load. +Un-supported Adapters: InterruptThrottleRate is NOT supported by 82542, 82543 + or 82544-based adapters. NOTE: InterruptThrottleRate takes precedence over the TxAbsIntDelay and RxAbsIntDelay parameters. In other words, minimizing the receive and/or transmit absolute delays does not force the controller to generate more interrupts than what the Interrupt Throttle Rate allows. + CAUTION: If you are using the Intel PRO/1000 CT Network Connection + (controller 82547), setting InterruptThrottleRate to a value + greater than 75,000, may hang (stop transmitting) adapters under + certain network conditions. If this occurs a NETDEV WATCHDOG + message is logged in the system event log. In addition, the + controller is automatically reset, restoring the network + connection. To eliminate the potential for the hang, ensure + that InterruptThrottleRate is set no greater than 75,000 and is + not set to 0. + NOTE: When e1000 is loaded with default settings and multiple adapters are + in use simultaneously, the CPU utilization may increase non-linearly. + In order to limit the CPU utilization without impacting the overall + throughput, we recommend that you load the driver as follows: + + insmod e1000.o InterruptThrottleRate=3000,3000,3000 + + This sets the InterruptThrottleRate to 3000 interrupts/sec for the + first, second, and third instances of the driver. The range of 2000 to + 3000 interrupts per second works on a majority of systems and is a + good starting point, but the optimal value will be platform-specific. + If CPU utilization is not a concern, use RX_POLLING (NAPI) and default + driver settings. RxDescriptors Valid Range: 80-256 for 82542 and 82543-based adapters - 80-4096 for 82540, 82544, 82545, and 82546-based adapters -Default Value: 80 + 80-4096 for all other supported adapters +Default Value: 256 This value is the number of receive descriptors allocated by the driver. Increasing this value allows the driver to buffer more incoming packets. Each descriptor is 16 bytes. A receive buffer is also allocated for each @@ -149,6 +151,9 @@ Default Value: 80 NOTE: MTU designates the frame size. It only needs to be set for Jumbo Frames. + NOTE: Depending on the available system resources, the request for a + higher number of receive descriptors may be denied. In this case, + use a lower number. RxIntDelay Valid Range: 0-65535 (0=off) @@ -168,11 +173,11 @@ Default Value: 0 restoring the network connection. To eliminate the potential for the hang ensure that RxIntDelay is set to 0. -RxAbsIntDelay (82540, 82545, and 82546-based adapters only) +RxAbsIntDelay (82540, 82545 and later adapters only) Valid Range: 0-65535 (0=off) Default Value: 128 This value, in units of 1.024 microseconds, limits the delay in which a - transmit interrupt is generated. Useful only if RxIntDelay is non-zero, + receive interrupt is generated. Useful only if RxIntDelay is non-zero, this value ensures that an interrupt is generated after the initial packet is received within the set amount of time. Proper tuning, along with RxIntDelay, may improve traffic throughput in specific network @@ -188,12 +193,16 @@ Default Value: 0 (auto-negotiate at all TxDescriptors Valid Range: 80-256 for 82542 and 82543-based adapters - 80-4096 for 82540, 82544, 82545, and 82546-based adapters + 80-4096 for all other supported adapters Default Value: 256 This value is the number of transmit descriptors allocated by the driver. Increasing this value allows the driver to queue more transmits. Each descriptor is 16 bytes. + NOTE: Depending on the available system resources, the request for a + higher number of transmit descriptors may be denied. In this case, + use a lower number. + TxIntDelay Valid Range: 0-65535 (0=off) Default Value: 64 @@ -203,7 +212,7 @@ Default Value: 64 system is reporting dropped transmits, this value may be set too high causing the driver to run out of available transmit descriptors. -TxAbsIntDelay (82540, 82545, and 82546-based adapters only) +TxAbsIntDelay (82540, 82545 and later adapters only) Valid Range: 0-65535 (0=off) Default Value: 64 This value, in units of 1.024 microseconds, limits the delay in which a @@ -219,7 +228,6 @@ Default Value: 1 A value of '1' indicates that the driver should enable IP checksum offload for received packets (both UDP and TCP) to the adapter hardware. - Speed and Duplex Configuration ============================== @@ -251,6 +259,10 @@ Bit 7 6 5 4 Speed (Mbps) N/A N/A 1000 N/A 100 100 10 10 Duplex Full Full Half Full Half +For example to limit the negotiated speed/duplex on the interface to 10 Mbps +Half or Full duplex, set AutoNeg to 0x02: + insmod e1000 AutoNeg=0x02 + Note that setting AutoNeg does not guarantee that the board will link at the highest specified speed or duplex mode, but the board will link at the highest possible speed/duplex of the link partner IF the link partner is also @@ -261,6 +273,38 @@ adapter MUST be forced to the same speed Additional Configurations ========================= + Configuring the Driver on Different Distributions + ------------------------------------------------- + + Configuring a network driver to load properly when the system is started is + distribution dependent. Typically, the configuration process involves adding + an alias line to /etc/modules.conf as well as editing other system startup + scripts and/or configuration files. Many popular Linux distributions ship + with tools to make these changes for you. To learn the proper way to + configure a network device for your system, refer to your distribution + documentation. If during this process you are asked for the driver or module + name, the name for the Linux Base Driver for the Intel PRO/1000 Family of + Adapters is e1000. + + As an example, if you install the e1000 driver for two PRO/1000 adapters + (eth0 and eth1) and set the speed and duplex to 10full and 100half, add the + following to modules.conf: + + alias eth0 e1000 + alias eth1 e1000 + options e1000 Speed=10,100 Duplex=2,1 + + Viewing Link Messages + --------------------- + + Link messages will not be displayed to the console if the distribution is + restricting system messages. In order to see network driver link messages on + your console, set dmesg to eight by entering the following: + + dmesg -n 8 + + NOTE: This setting is not saved across reboots. + Jumbo Frames ------------ @@ -278,6 +322,51 @@ Additional Configurations 10 or 100 Mbps may result in poor performance or loss of link. + NOTE: MTU designates the frame size. To enable Jumbo Frames, increase the + MTU size on the interface beyond 1500. + + Ethtool + ------- + + The driver utilizes the ethtool interface for driver configuration and + diagnostics, as well as displaying statistical information. Ethtool + version 1.6 or later is required for this functionality. + + The latest release of ethtool can be found from + http://sf.net/projects/gkernel. After ethtool is installed, + ethtool-copy.h must be copied and renamed to ethtool.h in your kernel + source tree at /include/linux. Backup the original + ethtool.h as needed before copying. The driver then must be recompiled + in order to take advantage of the latest ethtool features. + + NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support + for a more complete ethtool feature set can be enabled by upgrading + ethtool to ethtool-1.8.1. + + Enabling Wake on LAN* (WoL) + --------------------------- + + WoL is configured through the Ethtool* utility. Ethtool is included with + all versions of Red Hat after Red Hat 7.2. For other Linux distributions, + download and install Ethtool from the following website: + http://sourceforge.net/projects/gkernel. + + For instructions on enabling WoL with Ethtool, refer to the website listed + above. + + WoL will be enabled on the system during the next shut down or reboot. + For this driver version, in order to enable WoL, the e1000 driver must be + loaded when shutting down or rebooting the system. + + NAPI + ---- + + NAPI (Rx polling mode) is supported in the e1000 driver. NAPI is enabled + or disabled based on the configuration of the kernel. + + See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI. + + Known Issues ============ @@ -285,9 +374,9 @@ Known Issues ------------------------------- Memory allocation failures have been observed on Linux systems with 64 MB - of RAM or less that are running Jumbo Frames. If you are using Jumbo - Frames, your system may require more than the advertised minimum - requirement of 64 MB of system memory. + of RAM or less that are running Jumbo Frames. If you are using Jumbo Frames, + your system may require more than the advertised minimum requirement of 64 MB + of system memory. Support diff -Nuarp old/drivers/net/Kconfig new/drivers/net/Kconfig --- old/drivers/net/Kconfig 2004-10-07 15:52:11.000000000 -0700 +++ new/drivers/net/Kconfig 2004-10-07 15:52:27.000000000 -0700 @@ -1933,29 +1933,8 @@ config E1000 depends on PCI ---help--- This driver supports Intel(R) PRO/1000 gigabit ethernet family of - adapters, which includes: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - 82542 PRO/1000 Gigabit Server Adapter 700262-xxx, - 717037-xxx - 82543 PRO/1000 F Server Adapter 738640-xxx, - A38888-xxx - 82543 PRO/1000 T Server Adapter A19845-xxx, - A33948-xxx - 82544 PRO/1000 XT Server Adapter A51580-xxx - 82544 PRO/1000 XF Server Adapter A50484-xxx - 82544 PRO/1000 T Desktop Adapter A62947-xxx - 82540 PRO/1000 MT Desktop Adapter A78408-xxx - 82541 PRO/1000 MT Desktop Adapter C91016-xxx - 82545 PRO/1000 MT Server Adapter A92165-xxx - 82546 PRO/1000 MT Dual Port Server Adapter A92111-xxx - 82545 PRO/1000 MF Server Adapter A91622-xxx - 82545 PRO/1000 MF Server Adapter(LX) A91624-xxx - 82546 PRO/1000 MF Dual Port Server Adapter A91620-xxx - - For more information on how to identify your adapter, go to the - Adapter & Driver ID Guide at: + adapters. For more information on how to identify your adapter, go + to the Adapter & Driver ID Guide at: From ganesh.venkatesan@intel.com Mon Oct 18 03:24:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 03:24:32 -0700 (PDT) Received: from hermes-pilot.fm.intel.com (fmr99.intel.com [192.55.52.32]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IAORcZ006352 for ; Mon, 18 Oct 2004 03:24:27 -0700 Received: from petasus.fm.intel.com (petasus.fm.intel.com [10.1.192.37]) by hermes-pilot.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9IASm4F021237; Mon, 18 Oct 2004 10:28:48 GMT Received: from fmsmsxvs040.fm.intel.com (fmsmsxvs040.fm.intel.com [132.233.42.124]) by petasus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9IANo7h029538; Mon, 18 Oct 2004 10:23:55 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs040.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101803240100661 ; Mon, 18 Oct 2004 03:24:01 -0700 Date: Mon, 18 Oct 2004 03:24:02 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [PATCH 2.5 3/3] e100: Driver version number update Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10392 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 593 Lines: 16 Signed-off-by: Ganesh Venkatesan diff -up netdev-2.6/drivers/net/e100.c netdev-2.6/drivers/net/e100.new.c --- netdev-2.6/drivers/net/e100.c 2004-10-15 12:27:00.000000000 -0700 +++ netdev-2.6/drivers/net/e100.c.new 2004-10-15 12:27:01.000000000 -0700 @@ -155,7 +155,7 @@ #define DRV_NAME "e100" #define DRV_EXT "-NAPI" -#define DRV_VERSION "3.1.4-k2"DRV_EXT +#define DRV_VERSION "3.2.3-k2"DRV_EXT #define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver" #define DRV_COPYRIGHT "Copyright(c) 1999-2004 Intel Corporation" #define PFX DRV_NAME ": " From ganesh.venkatesan@intel.com Mon Oct 18 03:22:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 03:22:28 -0700 (PDT) Received: from fmsfmr003.fm.intel.com (fmr10.intel.com [192.55.52.30]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IAMMg1005563 for ; Mon, 18 Oct 2004 03:22:22 -0700 Received: from petasus.fm.intel.com (petasus.fm.intel.com [10.1.192.37]) by fmsfmr003.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9IANjou027106; Mon, 18 Oct 2004 10:23:45 GMT Received: from fmsmsxvs040.fm.intel.com (fmsmsxvs040.fm.intel.com [132.233.42.124]) by petasus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9IALj7j028739; Mon, 18 Oct 2004 10:21:50 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs040.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101803220100467 ; Mon, 18 Oct 2004 03:22:01 -0700 Date: Mon, 18 Oct 2004 03:22:01 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" , Ganesh Venkatesan cc: netdev Subject: [Patch 2.4 1/2] e100: Update to Configure.help In-Reply-To: Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10383 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 4099 Lines: 81 Signed-off-by: Ganesh Venkatesan diff -Nuarp old/Documentation/Configure.help new/Documentation/Configure.help --- old/Documentation/Configure.help 2004-10-07 15:33:24.000000000 -0700 +++ new/Documentation/Configure.help 2004-10-07 15:33:53.000000000 -0700 @@ -12192,65 +12192,16 @@ CONFIG_DL2K EtherExpress Pro/100 support (e100, Alternate Intel driver) CONFIG_E100 - This driver supports Intel(R) PRO/100 family of adapters, which - includes: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - - 82558 PRO/100+ PCI Adapter 668081-xxx, - 689661-xxx - 82558 PRO/100+ Management Adapter 691334-xxx, - 701738-xxx, - 721383-xxx - 82558 PRO/100+ Dual Port Server Adapter 714303-xxx, - 711269-xxx, - A28276-xxx - 82558 PRO/100+ PCI Server Adapter 710550-xxx - 82550 PRO/100 S Server Adapter 752438-xxx - 82559 A56831-xxx, - A10563-xxx, - A12171-xxx, - A12321-xxx, - A12320-xxx, - A12170-xxx - 748568-xxx - 748565-xxx - 82550 PRO/100 S Desktop Adapter 751767-xxx - 82559 748592-xxx, - A12167-xxx, - A12318-xxx, - A12317-xxx, - A12165-xxx, - 748569-xxx - 82559 PRO/100+ Server Adapter 729757-xxx - 82559 PRO/100 S Management Adapter 748566-xxx, - 748564-xxx - 82550 PRO/100 S Dual Port Server Adapter A56831-xxx - 82551 PRO/100 M Desktop Adapter A80897-xxx - PRO/100 S Advanced Management Adapter - 747842-xxx, - 745171-xxx - CNR PRO/100 VE Desktop Adapter A10386-xxx, - A10725-xxx, - A23801-xxx, - A19716-xxx - PRO/100 VM Desktop Adapter A14323-xxx, - A19725-xxx, - A23801-xxx, - A22220-xxx, - A23796-xxx - - + This driver supports Intel(R) PRO/100 family of adapters. To verify that your adapter is supported, find the board ID number on the adapter. Look for a label that has a barcode and a number - in the format 123456-001 (six digits hyphen three digits). Match - this to the list of numbers above. + in the format 123456-001 (six digits hyphen three digits). - For more information on how to identify your adapter, go to the - Adapter & Driver ID Guide at: + Use the above information and the Adapter & Driver ID Guide at: - http://support.intel.com/support/network/adapter/pro100/21397.htm + http://support.intel.com/support/network/adapter/pro100/21397.htm + + to identify the adapter. For the latest Intel PRO/100 network driver for Linux, see: From ganesh.venkatesan@intel.com Mon Oct 18 03:24:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 03:24:05 -0700 (PDT) Received: from hermes-pilot.fm.intel.com (fmr99.intel.com [192.55.52.32]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IAO1fA006045 for ; Mon, 18 Oct 2004 03:24:01 -0700 Received: from petasus-pilot.fm.intel.com (petasus-pilot.fm.intel.com [10.1.192.44]) by hermes-pilot.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9IASM4F021132; Mon, 18 Oct 2004 10:28:22 GMT Received: from fmsmsxvs041.fm.intel.com (fmsmsxvs041.fm.intel.com [132.233.42.126]) by petasus-pilot.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9IASJSr002522; Mon, 18 Oct 2004 10:28:25 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs041.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101803234013538 ; Mon, 18 Oct 2004 03:23:41 -0700 Date: Mon, 18 Oct 2004 03:23:41 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [PATCH 2.5 1/3] e100: Fix loss of connectivity to BMC when interface is brought down Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10390 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 878 Lines: 24 Signed-off-by: Ganesh Venkatesan diff -up netdev-2.6/drivers/net/e100.c netdev-2.6/drivers/net/e100.new.c --- netdev-2.6/drivers/net/e100.c 2004-10-15 12:27:00.000000000 -0700 +++ netdev-2.6/drivers/net/e100.c.new 2004-10-15 12:27:01.000000000 -0700 @@ -604,16 +604,6 @@ static void e100_hw_reset(struct nic *ni writel(software_reset, &nic->csr->port); e100_write_flush(nic); udelay(20); - /* TCO workaround - 82559 and greater */ - if(nic->mac >= mac_82559_D101M) { - /* Issue a redundant CU load base without setting - * general pointer, and without waiting for scb to - * clear. This gets us into post-driver. Finally, - * wait 20 msec for reset to take effect. */ - writeb(cuc_load_base, &nic->csr->scb.cmd_lo); - mdelay(20); - } - /* Mask off our interrupt line - it's unmasked after reset */ e100_disable_irq(nic); } From ganesh.venkatesan@intel.com Mon Oct 18 03:23:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 03:23:38 -0700 (PDT) Received: from hermes-pilot.fm.intel.com (fmr99.intel.com [192.55.52.32]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IANXYT005779 for ; Mon, 18 Oct 2004 03:23:33 -0700 Received: from petasus-pilot.fm.intel.com (petasus-pilot.fm.intel.com [10.1.192.44]) by hermes-pilot.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9IARs4F021019; Mon, 18 Oct 2004 10:27:54 GMT Received: from fmsmsxvs042.fm.intel.com (fmsmsxvs042.fm.intel.com [132.233.42.128]) by petasus-pilot.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9IARsSr002260; Mon, 18 Oct 2004 10:27:58 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs042.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101803231208379 ; Mon, 18 Oct 2004 03:23:13 -0700 Date: Mon, 18 Oct 2004 03:23:13 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" , Ganesh Venkatesan cc: netdev Subject: [Patch 2.5 3/3] ixgb: Configuration and user guide update In-Reply-To: Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10388 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 3813 Lines: 108 Signed-off-by: Ganesh Venkatesan diff -Nuarp old/Documentation/networking/ixgb.txt new/Documentation/networking/ixgb.txt --- old/Documentation/networking/ixgb.txt 2004-10-07 15:50:50.000000000 -0700 +++ new/Documentation/networking/ixgb.txt 2004-10-07 15:51:47.000000000 -0700 @@ -1,14 +1,14 @@ Linux* Base Driver for the Intel(R) PRO/10GbE Family of Adapters ================================================================ -January 06, 2003 +September 13, 2004 Contents ======== - In This Release -- Supported Adapters +- Identifying Your Adapter - Command Line Parameters - Improving Performance - Support @@ -18,36 +18,23 @@ In This Release =============== This file describes the Linux* Base Driver for the Intel(R) PRO/10GbE Family -of Adapters, version 1.0.x. This driver is intended for 2.4.x kernels; it is -known to build properly on 2.4.x kernels through 2.4.18. Intel focused -testing on Intel architectures running kernels 2.4.18. This driver includes -support for Itanium(TM)-based systems. +of Adapters, version 1.0.x. This driver includes support for Itanium(TM)2 and +EM64T systems. For questions related to hardware requirements, refer to the documentation supplied with your Intel PRO/10GbE adapter. All hardware requirements listed apply to use with Linux. - -Supported Adapters -================== - -The following Intel network adapters are compatible with the drivers in this -release: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - - 82597EX Intel(R) PRO/10GbE LR Server Adapter A82505-xxx - +Identifying Your Adapter +======================== To verify your Intel adapter is supported, find the board ID number on the adapter. Look for a label that has a barcode and a number in the format -A12345-001. Match this to the list of numbers above. +A12345-001. -For more information on how to identify your adapter, go to the Adapter & -Driver ID Guide at: +Use the above information and the Adapter & Driver ID Guide at: - http://support.intel.com/support/network/adapter/pro100/21397.htm + http://support.intel.com/support/network/adapter/pro100/21397.htm For the latest Intel network drivers for Linux, go to: @@ -72,8 +59,9 @@ loads the ixgb driver with 80 TX resourc resources for the second adapter. The default value for each parameter is generally the recommended setting, -unless otherwise noted. - +unless otherwise noted. Also, if the driver is statically built into the +kernel, the driver is loaded with the default values for all the parameters. +Ethtool can be used to change some of the parameters at runtime. FlowControl Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx) @@ -125,7 +113,6 @@ Default Value: 1 offload for transmitted packets (both UDP and TCP) to the adapter hardware. - Improving Performance ===================== diff -Nuarp old/drivers/net/Kconfig new/drivers/net/Kconfig --- old/drivers/net/Kconfig 2004-10-07 15:52:11.000000000 -0700 +++ new/drivers/net/Kconfig 2004-10-07 15:52:27.000000000 -0700 @@ -2132,14 +2132,8 @@ config IXGB depends on PCI ---help--- This driver supports Intel(R) PRO/10GbE family of - adapters, which includes: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - 82597EX Intel(R) PRO/10GbE LR Server Adapter A82505-xxx - - For more information on how to identify your adapter, go to the - Adapter & Driver ID Guide at: + adapters. For more information on how to identify your adapter, go + to the Adapter & Driver ID Guide at: From ganesh.venkatesan@intel.com Mon Oct 18 03:23:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 03:23:29 -0700 (PDT) Received: from caduceus.fm.intel.com (fmr02.intel.com [192.55.52.25]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IANNT2005719 for ; Mon, 18 Oct 2004 03:23:23 -0700 Received: from petasus.fm.intel.com (petasus.fm.intel.com [10.1.192.37]) by caduceus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9IANj9d015109; Mon, 18 Oct 2004 10:23:45 GMT Received: from fmsmsxvs040.fm.intel.com (fmsmsxvs040.fm.intel.com [132.233.42.124]) by petasus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9IAMf7m029090; Mon, 18 Oct 2004 10:22:52 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs040.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101803230300573 ; Mon, 18 Oct 2004 03:23:03 -0700 Date: Mon, 18 Oct 2004 03:23:04 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" , Ganesh Venkatesan cc: netdev Subject: [Patch 2.5 2/3] e100: Configuration and user guide update In-Reply-To: Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10387 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 9419 Lines: 251 Signed-off-by: Ganesh Venkatesan diff -Nuarp old/Documentation/networking/e100.txt new/Documentation/networking/e100.txt --- old/Documentation/networking/e100.txt 2004-10-07 15:50:39.000000000 -0700 +++ new/Documentation/networking/e100.txt 2004-10-07 15:51:33.000000000 -0700 @@ -1,14 +1,16 @@ Linux* Base Driver for the Intel(R) PRO/100 Family of Adapters ============================================================== -March 15, 2004 +September 13, 2004 Contents ======== - In This Release -- Supported Adapters +- Identifying Your Adapter +- Driver Configuration Parameters +- Additional Configurations - Support @@ -16,26 +18,140 @@ In This Release =============== This file describes the Linux* Base Driver for the Intel(R) PRO/100 Family of -Adapters, version 3.x.x. This driver includes support for Itanium(TM)-based -systems. +Adapters, version 3.2.x. This driver includes support for Itanium(TM)2 and +EM64T systems. -Supported Adapters -================== - -To verify that your adapter is supported, find the board ID number on the -adapter. Look for a label that has a barcode and a number in the format -A12345-001. Match this to the list of numbers above. +Identifying Your Adapter +======================== For more information on how to identify your adapter, go to the Adapter & Driver ID Guide at: http://support.intel.com/support/network/adapter/pro100/21397.htm -For the latest Intel PRO/100 network driver for Linux, see: +For the latest Intel network drivers for Linux, refer to the following +website. In the search field, enter your adapter name or type, or use the +networking link on the left to search for your adapter: http://downloadfinder.intel.com/scripts-df/support_intel.asp +Driver Configuration Parameters +=============================== + +The default value for each parameter is generally the recommended setting, +unless otherwise noted. + +Rx Descriptors: Number of receive descriptors. A receive descriptor is a data + structure that describes a receive buffer and its attributes to the network + controller. The data in the descriptor is used by the controller to write + data from the controller to host memory. In the 3.0.x driver the valid + range for this parameter is 64-256. The default value is 64. This parameter + can be changed using the command + + ethtool -G eth? rx n, where n is the number of desired rx descriptors. + +Tx Descriptors: Number of transmit descriptors. A transmit descriptor is a + data structure that describes a transmit buffer and its attributes to the + network controller. The data in the descriptor is used by the controller to + read data from the host memory to the controller. In the 3.0.x driver the + valid range for this parameter is 64-256. The default value is 64. This + parameter can be changed using the command + + ethtool -G eth? tx n, where n is the number of desired tx descriptors. + +Speed/Duplex: The driver auto-negotiates the link speed and duplex settings by + default. Ethtool can be used as follows to force speed/duplex. + + ethtool -s eth? autoneg off speed {10|100} duplex {full|half} + + NOTE: setting the speed/duplex to incorrect values will cause the link to + fail. + +Event Log Message Level: The driver uses the message level flag to log events + to syslog. The message level can be set at driver load time. It can also be + set using the command + + ethtool -s eth? msglvl n + +Additional Configurations +========================= + + Configuring the Driver on Different Distributions + ------------------------------------------------- + + Configuring a network driver to load properly when the system is started is + distribution dependent. Typically, the configuration process involves adding + an alias line to /etc/modules.conf as well as editing other system startup + scripts and/or configuration files. Many popular Linux distributions ship + with tools to make these changes for you. To learn the proper way to + configure a network device for your system, refer to your distribution + documentation. If during this process you are asked for the driver or module + name, the name for the Linux Base Driver for the Intel PRO/100 Family of + Adapters is e100. + + As an example, if you install the e100 driver for two PRO/100 adapters + (eth0 and eth1), add the following to modules.conf: + + alias eth0 e100 + alias eth1 e100 + + Viewing Link Messages + --------------------- + In order to see link messages and other Intel driver information on your + console, you must set the dmesg level up to six. This can be done by + entering the following on the command line before loading the e100 driver: + + dmesg -n 8 + + If you wish to see all messages issued by the driver, including debug + messages, set the dmesg level to eight. + + NOTE: This setting is not saved across reboots. + + Ethtool + ------- + + The driver utilizes the ethtool interface for driver configuration and + diagnostics, as well as displaying statistical information. Ethtool + version 1.6 or later is required for this functionality. + + The latest release of ethtool can be found at: + http://sf.net/projects/gkernel. + + After ethtool is installed, ethtool-copy.h must be copied and renamed to + ethtool.h in your kernel source tree at /include/linux. + Backup the original ethtool.h as needed before copying. The driver then + must be recompiled in order to take advantage of the latest ethtool + features. + + NOTE: This driver uses mii support from the kernel. As a result, when + there is no link, ethtool will report speed/duplex to be 10/half. + + NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support + for a more complete ethtool feature set can be enabled by upgrading + ethtool to ethtool-1.8.1. + + Enabling Wake on LAN* (WoL) + --------------------------- + WoL is provided through the Ethtool* utility. Ethtool is included with Red + Hat* 8.0. For other Linux distributions, download and install Ethtool from + the following website: http://sourceforge.net/projects/gkernel. + + For instructions on enabling WoL with Ethtool, refer to the Ethtool man + page. + + WoL will be enabled on the system during the next shut down or reboot. For + this driver version, in order to enable WoL, the e100 driver must be + loaded when shutting down or rebooting the system. + + NAPI + ---- + + NAPI (Rx polling mode) is supported in the e100 driver. NAPI is enabled + or disabled based on the configuration of the kernel. + + See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI. Support ======= diff -Nuarp old/drivers/net/Kconfig new/drivers/net/Kconfig --- old/drivers/net/Kconfig 2004-10-07 15:52:11.000000000 -0700 +++ new/drivers/net/Kconfig 2004-10-07 15:52:27.000000000 -0700 @@ -1413,66 +1413,17 @@ config E100 depends on NET_PCI && PCI select MII ---help--- - This driver supports Intel(R) PRO/100 family of adapters, which - includes: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - - 82558 PRO/100+ PCI Adapter 668081-xxx, - 689661-xxx - 82558 PRO/100+ Management Adapter 691334-xxx, - 701738-xxx, - 721383-xxx - 82558 PRO/100+ Dual Port Server Adapter 714303-xxx, - 711269-xxx, - A28276-xxx - 82558 PRO/100+ PCI Server Adapter 710550-xxx - 82550 PRO/100 S Server Adapter 752438-xxx - 82559 A56831-xxx, - A10563-xxx, - A12171-xxx, - A12321-xxx, - A12320-xxx, - A12170-xxx - 748568-xxx - 748565-xxx - 82550 PRO/100 S Desktop Adapter 751767-xxx - 82559 748592-xxx, - A12167-xxx, - A12318-xxx, - A12317-xxx, - A12165-xxx, - 748569-xxx - 82559 PRO/100+ Server Adapter 729757-xxx - 82559 PRO/100 S Management Adapter 748566-xxx, - 748564-xxx - 82550 PRO/100 S Dual Port Server Adapter A56831-xxx - 82551 PRO/100 M Desktop Adapter A80897-xxx - PRO/100 S Advanced Management Adapter - 747842-xxx, - 745171-xxx - CNR PRO/100 VE Desktop Adapter A10386-xxx, - A10725-xxx, - A23801-xxx, - A19716-xxx - PRO/100 VM Desktop Adapter A14323-xxx, - A19725-xxx, - A23801-xxx, - A22220-xxx, - A23796-xxx - - + This driver supports Intel(R) PRO/100 family of adapters. To verify that your adapter is supported, find the board ID number on the adapter. Look for a label that has a barcode and a number - in the format 123456-001 (six digits hyphen three digits). Match - this to the list of numbers above. + in the format 123456-001 (six digits hyphen three digits). - For more information on how to identify your adapter, go to the - Adapter & Driver ID Guide at: + Use the above information and the Adapter & Driver ID Guide at: http://support.intel.com/support/network/adapter/pro100/21397.htm + to identify the adapter. + For the latest Intel PRO/100 network driver for Linux, see: http://appsr.intel.com/scripts-df/support_intel.asp From ganesh.venkatesan@intel.com Mon Oct 18 03:22:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 03:22:13 -0700 (PDT) Received: from caduceus.fm.intel.com (fmr02.intel.com [192.55.52.25]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IAM8lt005551 for ; Mon, 18 Oct 2004 03:22:09 -0700 Received: from petasus-pilot.fm.intel.com (petasus-pilot.fm.intel.com [10.1.192.44]) by caduceus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9IAMU9d014706; Mon, 18 Oct 2004 10:22:30 GMT Received: from fmsmsxvs041.fm.intel.com (fmsmsxvs041.fm.intel.com [132.233.42.126]) by petasus-pilot.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9IAQXSp001727; Mon, 18 Oct 2004 10:26:33 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs041.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101803214813385 ; Mon, 18 Oct 2004 03:21:48 -0700 Date: Mon, 18 Oct 2004 03:21:48 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: ganesh.venkatesan@intel.com, netdev Subject: [Patch 2.4 0/2] e100/e1000: Documentation Update In-Reply-To: Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10382 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 59 Lines: 6 1. e100 configuration help 2. e1000 configuration help From ganesh.venkatesan@intel.com Mon Oct 18 03:23:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 03:23:55 -0700 (PDT) Received: from caduceus.fm.intel.com (fmr02.intel.com [192.55.52.25]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IANphM005982 for ; Mon, 18 Oct 2004 03:23:51 -0700 Received: from petasus.fm.intel.com (petasus.fm.intel.com [10.1.192.37]) by caduceus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9IAOD9d015247; Mon, 18 Oct 2004 10:24:13 GMT Received: from fmsmsxvs043.fm.intel.com (fmsmsxvs043.fm.intel.com [132.233.42.129]) by petasus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9IAN77p029264; Mon, 18 Oct 2004 10:23:19 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs043.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101803233025716 ; Mon, 18 Oct 2004 03:23:31 -0700 Date: Mon, 18 Oct 2004 03:23:31 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [PATCH 2.5 0/3] e100: driver update Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10389 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 168 Lines: 6 1. Fix loss of connectivity to BMC when interface is brought down 2. Fix set ringparam for ethtool returning error code on bad input 3. Driver version number update From ganesh.venkatesan@intel.com Mon Oct 18 03:22:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 03:22:35 -0700 (PDT) Received: from orsfmr001.jf.intel.com (fmr12.intel.com [134.134.136.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IAMTvF005586 for ; Mon, 18 Oct 2004 03:22:30 -0700 Received: from petasus.jf.intel.com (petasus.jf.intel.com [10.7.209.6]) by orsfmr001.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9IAMhL6021448; Mon, 18 Oct 2004 10:22:43 GMT Received: from orsmsxvs040.jf.intel.com (orsmsxvs040.jf.intel.com [192.168.65.206]) by petasus.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9IAPbLJ014070; Mon, 18 Oct 2004 10:25:44 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by orsmsxvs040.jf.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101803220928187 ; Mon, 18 Oct 2004 03:22:09 -0700 Date: Mon, 18 Oct 2004 03:22:09 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" , Ganesh Venkatesan cc: netdev Subject: [Patch 2.4 2/2] e1000: Update to Configure.help In-Reply-To: Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10384 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 1929 Lines: 38 Signed-off-by: Ganesh Venkatesan diff -Nuarp old/Documentation/Configure.help new/Documentation/Configure.help --- old/Documentation/Configure.help 2004-10-07 15:33:24.000000000 -0700 +++ new/Documentation/Configure.help 2004-10-07 15:33:53.000000000 -0700 @@ -12219,28 +12219,7 @@ CONFIG_E100 Intel(R) PRO/1000 Gigabit Ethernet support CONFIG_E1000 This driver supports Intel(R) PRO/1000 gigabit ethernet family of - adapters, which includes: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - 82542 PRO/1000 Gigabit Server Adapter 700262-xxx, - 717037-xxx - 82543 PRO/1000 F Server Adapter 738640-xxx, - A38888-xxx - 82543 PRO/1000 T Server Adapter A19845-xxx, - A33948-xxx - 82544 PRO/1000 XT Server Adapter A51580-xxx - 82544 PRO/1000 XF Server Adapter A50484-xxx - 82544 PRO/1000 T Desktop Adapter A62947-xxx - 82540 PRO/1000 MT Desktop Adapter A78408-xxx - 82541 PRO/1000 MT Desktop Adapter C91016-xxx - 82545 PRO/1000 MT Server Adapter A92165-xxx - 82546 PRO/1000 MT Dual Port Server Adapter A92111-xxx - 82545 PRO/1000 MF Server Adapter A91622-xxx - 82545 PRO/1000 MF Server Adapter(LX) A91624-xxx - 82546 PRO/1000 MF Dual Port Server Adapter A91620-xxx - - For more information on how to identify your adapter, go to the + adapters. For more information on how to identify your adapter, go to the Adapter & Driver ID Guide at: From ganesh.venkatesan@intel.com Mon Oct 18 03:22:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 03:22:57 -0700 (PDT) Received: from fmsfmr004.fm.intel.com (fmr11.intel.com [192.55.52.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IAMrtj005639 for ; Mon, 18 Oct 2004 03:22:53 -0700 Received: from petasus.fm.intel.com (petasus.fm.intel.com [10.1.192.37]) by fmsfmr004.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9IAPcvc011920; Mon, 18 Oct 2004 10:25:38 GMT Received: from fmsmsxvs043.fm.intel.com (fmsmsxvs043.fm.intel.com [132.233.42.129]) by petasus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9IAML7h028987; Mon, 18 Oct 2004 10:22:21 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs043.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101803223225612 ; Mon, 18 Oct 2004 03:22:33 -0700 Date: Mon, 18 Oct 2004 03:22:33 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" , Ganesh Venkatesan cc: netdev Subject: [Patch 2.5 0/3] e100/e1000/ixgb: Configuration and user guide updates In-Reply-To: Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10385 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 126 Lines: 5 1. Configuration and user guide for e1000 2. Configuration and user guide for e100 3. Configuration and user guide for ixgb From ganesh.venkatesan@intel.com Mon Oct 18 03:24:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 03:24:14 -0700 (PDT) Received: from fmsfmr003.fm.intel.com (fmr10.intel.com [192.55.52.30]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IAO9jT006087 for ; Mon, 18 Oct 2004 03:24:09 -0700 Received: from petasus.fm.intel.com (petasus.fm.intel.com [10.1.192.37]) by fmsfmr003.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9IAPXou027680; Mon, 18 Oct 2004 10:25:33 GMT Received: from fmsmsxvs043.fm.intel.com (fmsmsxvs043.fm.intel.com [132.233.42.129]) by petasus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9IANL7l029359; Mon, 18 Oct 2004 10:23:37 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs043.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004101803234925753 ; Mon, 18 Oct 2004 03:23:49 -0700 Date: Mon, 18 Oct 2004 03:23:49 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [PATCH 2.5 2/3] e100: Fix set ringparam for ethtool returning error code on bad input Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 10391 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Content-Length: 620 Lines: 17 Signed-off-by: Ganesh Venkatesan diff -up netdev-2.6/drivers/net/e100.c netdev-2.6/drivers/net/e100.new.c --- netdev-2.6/drivers/net/e100.c 2004-10-15 12:27:00.000000000 -0700 +++ netdev-2.6/drivers/net/e100.c.new 2004-10-15 12:27:01.000000000 -0700 @@ -1958,6 +1958,9 @@ static int e100_set_ringparam(struct net struct param_range *rfds = &nic->params.rfds; struct param_range *cbs = &nic->params.cbs; + if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) + return -EINVAL; + if(netif_running(netdev)) e100_down(nic); rfds->count = max(ring->rx_pending, rfds->min); From linville@ra.tuxdriver.com Mon Oct 18 11:58:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 11:58:28 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IIwLQZ008742 for ; Mon, 18 Oct 2004 11:58:21 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i9IHrkb11253; Mon, 18 Oct 2004 13:53:46 -0400 Date: Mon, 18 Oct 2004 13:53:46 -0400 From: "John W. Linville" To: netdev@oss.sgi.com Cc: linux-kernel@vger.kernel.org, jgarzik@pobox.com, romieu@fr.zoreil.com Subject: [patch 2.6.9-rc4] r8169: netconsole support Message-ID: <20041018135346.E7539@tuxdriver.com> Mail-Followup-To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, romieu@fr.zoreil.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i X-archive-position: 10393 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 1609 Lines: 52 Add a netconsole polling routine to the r8169 driver. Tested w/ netconsole (& netdump) on x86_64 w/ FC3 Test3... Signed-off-by: John W. Linville --- linux-2.6/drivers/net/r8169.c.orig +++ linux-2.6/drivers/net/r8169.c @@ -376,6 +376,10 @@ static struct net_device_stats *rtl8169_ #ifdef CONFIG_R8169_NAPI static int rtl8169_poll(struct net_device *dev, int *budget); #endif +#ifdef CONFIG_NET_POLL_CONTROLLER +/* for netdump / net console */ +static void rtl8169_netpoll(struct net_device *netdev); +#endif static const u16 rtl8169_intr_mask = SYSErr | LinkChg | RxOverflow | RxFIFOOver | TxErr | TxOK | RxErr | RxOK; @@ -1120,6 +1124,9 @@ rtl8169_init_one(struct pci_dev *pdev, c dev->weight = R8169_NAPI_WEIGHT; printk(KERN_INFO PFX "NAPI enabled\n"); #endif +#ifdef CONFIG_NET_POLL_CONTROLLER + dev->poll_controller = rtl8169_netpoll; +#endif tp->intr_mask = 0xffff; tp->pci_dev = pdev; tp->mmio_addr = ioaddr; @@ -1950,6 +1957,22 @@ static struct net_device_stats *rtl8169_ return &tp->stats; } +#ifdef CONFIG_NET_POLL_CONTROLLER +/* + * Polling 'interrupt' - used by things like netconsole to send skbs + * without having to re-enable interrupts. It's not called while + * the interrupt routine is executing. + */ +static void +rtl8169_netpoll (struct net_device *dev) +{ + struct rtl8169_private *tp = netdev_priv(dev); + disable_irq(tp->pci_dev->irq); + rtl8169_interrupt(tp->pci_dev->irq, dev, NULL); + enable_irq(tp->pci_dev->irq); +} +#endif + static struct pci_driver rtl8169_pci_driver = { .name = MODULENAME, .id_table = rtl8169_pci_tbl, From shemminger@osdl.org Mon Oct 18 12:19:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 12:19:21 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IJJFkf012726 for ; Mon, 18 Oct 2004 12:19:15 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IJIsWL023272 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 12:18:55 -0700 Date: Mon, 18 Oct 2004 12:19:53 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH] [RFT] yellowfin: get rid of __iomem warnings Message-Id: <20041018121953.77d87e8f@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i9IJJFkf012726 X-archive-position: 10394 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 Content-Length: 8267 Lines: 266 This patch converts driver to use module_param and gets rid of warnings because now we type check for io memory. Patch against the 2.6.9 version in jeff's netdev tree. Compiled, but not tested. Could someone with this board make sure it doesn't break everything? Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/yellowfin.c b/drivers/net/yellowfin.c --- a/drivers/net/yellowfin.c 2004-10-18 12:18:27 -07:00 +++ b/drivers/net/yellowfin.c 2004-10-18 12:18:27 -07:00 @@ -53,13 +53,6 @@ #define PFX DRV_NAME ": " -/* The user-configurable values. - These may be modified when a driver module is loaded.*/ - -static int debug = 1; /* 1 normal messages, 0 quiet .. 7 verbose. */ -/* Maximum events (Rx packets, etc.) to handle at each interrupt. */ -static int max_interrupt_work = 20; -static int mtu; #ifdef YF_PROTOTYPE /* Support for prototype hardware errata. */ /* System-wide count of bogus-rx frames. */ static int bogus_rx; @@ -73,9 +66,6 @@ static int fifo_cfg = 0x0020; /* Bypass external Tx FIFO. */ #endif -/* Set the copy breakpoint for the copy-only-tiny-frames scheme. - Setting to > 1514 effectively disables this feature. */ -static int rx_copybreak; /* Used to pass the media type, etc. No media types are currently defined. These exist for driver @@ -109,6 +99,7 @@ #define yellowfin_debug debug #include +#include #include #include #include @@ -154,13 +145,26 @@ MODULE_DESCRIPTION("Packet Engines Yellowfin G-NIC Gigabit Ethernet driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(max_interrupt_work, "i"); -MODULE_PARM(mtu, "i"); -MODULE_PARM(debug, "i"); -MODULE_PARM(rx_copybreak, "i"); -MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i"); -MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i"); -MODULE_PARM(gx_fix, "i"); +/* The user-configurable values. + These may be modified when a driver module is loaded.*/ +static int debug = 1; /* 1 normal messages, 0 quiet .. 7 verbose. */ +/* Maximum events (Rx packets, etc.) to handle at each interrupt. */ +static int max_interrupt_work = 20; +static int mtu; +/* Set the copy breakpoint for the copy-only-tiny-frames scheme. + Setting to > 1514 effectively disables this feature. */ +static int rx_copybreak; + +module_param(max_interrupt_work, int, 0); +module_param(mtu, int, 0); +module_param(debug, int, 0); +module_param(rx_copybreak, int, 0); +module_param(gx_fix, int, 0); + +static int num_units; +module_param_array(options, int, num_units, 0); +module_param_array(full_duplex, int, num_units, 0); + MODULE_PARM_DESC(max_interrupt_work, "G-NIC maximum events handled per interrupt"); MODULE_PARM_DESC(mtu, "G-NIC MTU (all boards)"); MODULE_PARM_DESC(debug, "G-NIC debug level (0-7)"); @@ -391,9 +395,9 @@ spinlock_t lock; }; -static int read_eeprom(long ioaddr, int location); -static int mdio_read(long ioaddr, int phy_id, int location); -static void mdio_write(long ioaddr, int phy_id, int location, int value); +static int read_eeprom(void __iomem *ioaddr, int location); +static int mdio_read(void __iomem *ioaddr, int phy_id, int location); +static void mdio_write(void __iomem *ioaddr, int phy_id, int location, int value); static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); static int yellowfin_open(struct net_device *dev); static void yellowfin_timer(unsigned long data); @@ -417,7 +421,7 @@ int irq; int chip_idx = ent->driver_data; static int find_cnt; - long ioaddr, real_ioaddr; + void __iomem *ioaddr; int i, option = find_cnt < MAX_UNITS ? options[find_cnt] : 0; int drv_flags = pci_id_tbl[chip_idx].drv_flags; void *ring_space; @@ -449,10 +453,9 @@ pci_set_master (pdev); #ifdef USE_IO_OPS - real_ioaddr = ioaddr = pci_resource_start (pdev, 0); + ioaddr = (void __iomem *) pci_resource_start (pdev, 0); #else - real_ioaddr = ioaddr = pci_resource_start (pdev, 1); - ioaddr = (long) ioremap(ioaddr, YELLOWFIN_SIZE); + ioaddr = ioremap(pci_resource_start (pdev, 1), YELLOWFIN_SIZE); if (!ioaddr) goto err_out_free_res; #endif @@ -470,7 +473,7 @@ /* Reset the chip. */ outl(0x80000000, ioaddr + DMACtrl); - dev->base_addr = ioaddr; + dev->base_addr = (unsigned long) ioaddr; dev->irq = irq; pci_set_drvdata(pdev, dev); @@ -533,7 +536,7 @@ if (i) goto err_out_unmap_status; - printk(KERN_INFO "%s: %s type %8x at 0x%lx, ", + printk(KERN_INFO "%s: %s type %8x at 0x%p, ", dev->name, pci_id_tbl[chip_idx].name, inl(ioaddr + ChipRev), ioaddr); for (i = 0; i < 5; i++) printk("%2.2x:", dev->dev_addr[i]); @@ -577,7 +580,7 @@ return -ENODEV; } -static int __devinit read_eeprom(long ioaddr, int location) +static int read_eeprom(void __iomem *ioaddr, int location) { int bogus_cnt = 10000; /* Typical 33Mhz: 1050 ticks */ @@ -592,7 +595,7 @@ These routines assume the MDIO controller is idle, and do not exit until the command is finished. */ -static int mdio_read(long ioaddr, int phy_id, int location) +static int mdio_read(void __iomem *ioaddr, int phy_id, int location) { int i; @@ -604,7 +607,7 @@ return inw(ioaddr + MII_Rd_Data); } -static void mdio_write(long ioaddr, int phy_id, int location, int value) +static void mdio_write(void __iomem *ioaddr, int phy_id, int location, int value) { int i; @@ -619,10 +622,15 @@ } +static inline void __iomem *dev_ioaddr(struct net_device *dev) +{ + return (void __iomem *) dev->base_addr; +} + static int yellowfin_open(struct net_device *dev) { struct yellowfin_private *yp = netdev_priv(dev); - long ioaddr = dev->base_addr; + void __iomem *ioaddr = dev_ioaddr(dev); int i; /* Reset the chip. */ @@ -704,7 +712,7 @@ { struct net_device *dev = (struct net_device *)data; struct yellowfin_private *yp = netdev_priv(dev); - long ioaddr = dev->base_addr; + void __iomem *ioaddr = dev_ioaddr(dev); int next_tick = 60*HZ; if (yellowfin_debug > 3) { @@ -738,7 +746,7 @@ static void yellowfin_tx_timeout(struct net_device *dev) { struct yellowfin_private *yp = netdev_priv(dev); - long ioaddr = dev->base_addr; + void __iomem *ioaddr = dev_ioaddr(dev); printk(KERN_WARNING "%s: Yellowfin transmit timed out at %d/%d Tx " "status %4.4x, Rx status %4.4x, resetting...\n", @@ -763,7 +771,7 @@ dev->if_port = 0; /* Wake the potentially-idle transmit channel. */ - outl(0x10001000, dev->base_addr + TxCtrl); + outl(0x10001000, dev_ioaddr(dev) + TxCtrl); if (yp->cur_tx - yp->dirty_tx < TX_QUEUE_SIZE) netif_wake_queue (dev); /* Typical path */ @@ -922,7 +930,7 @@ /* Non-x86 Todo: explicitly flush cache lines here. */ /* Wake the potentially-idle transmit channel. */ - outl(0x10001000, dev->base_addr + TxCtrl); + outl(0x10001000, dev_ioaddr(dev) + TxCtrl); if (yp->cur_tx - yp->dirty_tx < TX_QUEUE_SIZE) netif_start_queue (dev); /* Typical path */ @@ -943,7 +951,7 @@ { struct net_device *dev = dev_instance; struct yellowfin_private *yp; - long ioaddr; + void __iomem *ioaddr; int boguscnt = max_interrupt_work; unsigned int handled = 0; @@ -954,8 +962,8 @@ } #endif - ioaddr = dev->base_addr; yp = netdev_priv(dev); + ioaddr = dev_ioaddr(dev); spin_lock (&yp->lock); @@ -1254,7 +1262,7 @@ static int yellowfin_close(struct net_device *dev) { - long ioaddr = dev->base_addr; + void __iomem *ioaddr = dev_ioaddr(dev); struct yellowfin_private *yp = netdev_priv(dev); int i; @@ -1351,7 +1359,7 @@ static void set_rx_mode(struct net_device *dev) { struct yellowfin_private *yp = netdev_priv(dev); - long ioaddr = dev->base_addr; + void __iomem *ioaddr = dev_ioaddr(dev); u16 cfg_value = inw(ioaddr + Cnfg); /* Stop the Rx process to change any value. */ @@ -1411,7 +1419,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { struct yellowfin_private *np = netdev_priv(dev); - long ioaddr = dev->base_addr; + void __iomem *ioaddr = dev_ioaddr(dev); struct mii_ioctl_data *data = if_mii(rq); switch(cmd) { @@ -1465,7 +1473,7 @@ pci_release_regions (pdev); #ifndef USE_IO_OPS - iounmap ((void *) dev->base_addr); + iounmap (dev_ioaddr(dev)); #endif free_netdev (dev); From shemminger@osdl.org Mon Oct 18 12:27:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 12:27:33 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IJRRw2013242 for ; Mon, 18 Oct 2004 12:27:27 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IJETWL022956 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 12:14:29 -0700 Date: Mon, 18 Oct 2004 12:15:27 -0700 From: Stephen Hemminger To: Jeff Garzik , Jean Tourrilhes Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9] hp100: use module_param and netdev_priv Message-Id: <20041018121527.053b3309@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10395 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 Content-Length: 8720 Lines: 294 Convert hp100 to use module_param and netdev_priv. Compiled only, not tested. Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/hp100.c b/drivers/net/hp100.c --- a/drivers/net/hp100.c 2004-10-18 12:13:23 -07:00 +++ b/drivers/net/hp100.c 2004-10-18 12:13:24 -07:00 @@ -98,6 +98,7 @@ #include #include +#include #include #include #include @@ -224,9 +225,9 @@ static int hp100_priority_tx = HP100_DEFAULT_PRIORITY_TX; static int hp100_mode = 1; -MODULE_PARM(hp100_rx_ratio, "1i"); -MODULE_PARM(hp100_priority_tx, "1i"); -MODULE_PARM(hp100_mode, "1i"); +module_param(hp100_rx_ratio, int, 0); +module_param(hp100_priority_tx, int, 0); +module_param(hp100_mode, int, 0); /* * prototypes @@ -280,8 +281,8 @@ * address - Jean II */ static inline dma_addr_t virt_to_whatever(struct net_device *dev, u32 * ptr) { - return ((u_long) ptr) + - ((struct hp100_private *) (dev->priv))->whatever_offset; + return ((u_long) ptr) + + ((struct hp100_private *) netdev_priv)->whatever_offset; } /* TODO: This function should not really be needed in a good design... */ @@ -631,7 +632,7 @@ } /* Initialise the "private" data structure for this card. */ - lp = (struct hp100_private *) dev->priv; + lp = netdev_priv(dev); spin_lock_init(&lp->lock); strlcpy(lp->id, eid, HP100_SIG_LEN); @@ -781,7 +782,7 @@ static void hp100_hwinit(struct net_device *dev) { int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); #ifdef HP100_DEBUG_B hp100_outw(0x4202, TRACE); @@ -875,7 +876,7 @@ static void hp100_mmuinit(struct net_device *dev) { int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); int i; #ifdef HP100_DEBUG_B @@ -1053,7 +1054,7 @@ static int hp100_open(struct net_device *dev) { - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); #ifdef HP100_DEBUG_B int ioaddr = dev->base_addr; #endif @@ -1093,7 +1094,7 @@ static int hp100_close(struct net_device *dev) { int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); #ifdef HP100_DEBUG_B hp100_outw(0x4205, TRACE); @@ -1126,7 +1127,7 @@ */ static void hp100_init_pdls(struct net_device *dev) { - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); hp100_ring_t *ringptr; u_int *pageptr; /* Warning : increment by 4 - Jean II */ int i; @@ -1227,6 +1228,7 @@ static int hp100_build_rx_pdl(hp100_ring_t * ringptr, struct net_device *dev) { + struct hp100_private *lp = netdev_priv(dev); #ifdef HP100_DEBUG_B int ioaddr = dev->base_addr; #endif @@ -1273,7 +1275,10 @@ /* Conversion to new PCI API : map skbuf data to PCI bus. * Doc says it's OK for EISA as well - Jean II */ ringptr->pdl[0] = 0x00020000; /* Write PDH */ - ringptr->pdl[3] = ((u_int) pci_map_single(((struct hp100_private *) (dev->priv))->pci_dev, ringptr->skb->data, MAX_ETHER_SIZE, PCI_DMA_FROMDEVICE)); + ringptr->pdl[3] = (u_int) pci_map_single(lp->pci_dev, + ringptr->skb->data, + MAX_ETHER_SIZE, + PCI_DMA_FROMDEVICE); ringptr->pdl[4] = MAX_ETHER_SIZE; /* Length of Data */ #ifdef HP100_DEBUG_BM @@ -1310,7 +1315,7 @@ { int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); hp100_ring_t *ringptr; #ifdef HP100_DEBUG_B @@ -1351,7 +1356,7 @@ static void hp100_BM_shutdown(struct net_device *dev) { int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); unsigned long time; #ifdef HP100_DEBUG_B @@ -1432,7 +1437,7 @@ static int hp100_check_lan(struct net_device *dev) { - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); if (lp->lan_type < 0) { /* no LAN type detected yet? */ hp100_stop_interface(dev); @@ -1458,7 +1463,7 @@ unsigned long flags; int i, ok_flag; int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); hp100_ring_t *ringptr; #ifdef HP100_DEBUG_B @@ -1576,7 +1581,7 @@ */ static void hp100_clean_txring(struct net_device *dev) { - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); int ioaddr = dev->base_addr; int donecount; @@ -1615,7 +1620,7 @@ int i, ok_flag; int ioaddr = dev->base_addr; u_short val; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); #ifdef HP100_DEBUG_B hp100_outw(0x4212, TRACE); @@ -1755,7 +1760,7 @@ { int packets, pkt_len; int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); u_int header; struct sk_buff *skb; @@ -1864,7 +1869,7 @@ static void hp100_rx_bm(struct net_device *dev) { int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); hp100_ring_t *ptr; u_int header; int pkt_len; @@ -1973,7 +1978,7 @@ { unsigned long flags; int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); #ifdef HP100_DEBUG_B hp100_outw(0x4215, TRACE); @@ -1991,7 +1996,7 @@ { int ioaddr = dev->base_addr; u_short val; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); #ifdef HP100_DEBUG_B hp100_outw(0x4216, TRACE); @@ -2017,7 +2022,7 @@ #ifdef HP100_DEBUG_B int ioaddr = dev->base_addr; #endif - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); #ifdef HP100_DEBUG_B int ioaddr = dev->base_addr; @@ -2061,7 +2066,7 @@ { unsigned long flags; int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); #ifdef HP100_DEBUG_B hp100_outw(0x4218, TRACE); @@ -2191,7 +2196,7 @@ static irqreturn_t hp100_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); int ioaddr; u_int val; @@ -2322,7 +2327,7 @@ { unsigned long flags; int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); #ifdef HP100_DEBUG_B hp100_outw(0x4220, TRACE); @@ -2381,7 +2386,7 @@ static void hp100_stop_interface(struct net_device *dev) { - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); int ioaddr = dev->base_addr; u_int val; @@ -2442,7 +2447,7 @@ { int ioaddr = dev->base_addr; u_short val_VG, val_10; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); #ifdef HP100_DEBUG_B hp100_outw(0x4223, TRACE); @@ -2488,7 +2493,7 @@ static int hp100_down_vg_link(struct net_device *dev) { - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); int ioaddr = dev->base_addr; unsigned long time; long savelan, newlan; @@ -2604,7 +2609,7 @@ static int hp100_login_to_vg_hub(struct net_device *dev, u_short force_relogin) { int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); u_short val = 0; unsigned long time; int startst; @@ -2775,7 +2780,7 @@ static void hp100_cascade_reset(struct net_device *dev, u_short enable) { int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); #ifdef HP100_DEBUG_B hp100_outw(0x4226, TRACE); @@ -2836,7 +2841,7 @@ static void cleanup_dev(struct net_device *d) { - struct hp100_private *p = (struct hp100_private *) d->priv; + struct hp100_private *p = netdev_priv(d); unregister_netdev(d); release_region(d->base_addr, HP100_REGION_SIZE); From davem@davemloft.net Mon Oct 18 13:26:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 13:26:42 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IKQaUT015187 for ; Mon, 18 Oct 2004 13:26:36 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CJe0c-00058m-00 for ; Mon, 18 Oct 2004 13:21:34 -0700 Date: Mon, 18 Oct 2004 13:21:33 -0700 From: "David S. Miller" To: netdev@oss.sgi.com Subject: back from japan Message-Id: <20041018132133.65ed1f98.davem@davemloft.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10396 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 290 Lines: 11 I just got back from a week in Japan. I have all of the pending patches people posted, and I will start applying them over the next day or so. So, there is no need to resend things at this time, but do expect me to be a little slow the next day or so as I catch up with things. Thanks. From kaber@trash.net Mon Oct 18 13:36:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 13:36:06 -0700 (PDT) Received: from gw.localnet ([62.206.217.67]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IKa1l9015734 for ; Mon, 18 Oct 2004 13:36:01 -0700 Received: from [172.16.1.123] (helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1CJeKf-0000xu-00; Mon, 18 Oct 2004 22:42:17 +0200 Message-ID: <417428CF.2050802@trash.net> Date: Mon, 18 Oct 2004 22:34:23 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 X-Accept-Language: en MIME-Version: 1.0 To: Herbert Xu CC: "David S. Miller" , netdev@oss.sgi.com, ipsec-tools-devel@lists.sourceforge.net Subject: Re: [PATCH 2.6]: Check against correct policy list in ip_forward/ip6_forward References: <4172943B.8050904@trash.net> <20041017212317.GA28615@gondor.apana.org.au> <4172F1AB.4020305@trash.net> <20041017231258.GA29294@gondor.apana.org.au> In-Reply-To: <20041017231258.GA29294@gondor.apana.org.au> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10397 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kaber@trash.net Precedence: bulk X-list: netdev Content-Length: 866 Lines: 29 Herbert Xu wrote: > >Well it's too late to change the default policy. People rely on the >default policy being allow so changing it will wreak havoc. Even if >you do it only for packets with an IPsec encapsulation by checking >skb->sp it may still break people who use manual keying and rely on >the property that you can always add optional SAs. > You're right. > More importantly that it'll stick out like a sore thumb in terms of > > its semantics. __xfrm_policy_check already rejects packets without a matching policy and skb->sp set, but it is skipped while the policy list is empty. What, from a semantics point of view, would be wrong with making xfrm_policy_check behave the same way ? > >So let's just fix racoon. > Agreed. I have a patch I'm currently testing. Judging from a quick grep isakmpd also doesn't add forward policies. Regards Patrick From shemminger@osdl.org Mon Oct 18 13:45:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 13:45:57 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IKjoDc016267 for ; Mon, 18 Oct 2004 13:45:51 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IKjTWL032315 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 13:45:30 -0700 Date: Mon, 18 Oct 2004 13:46:28 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc4 1/2] typhoon: use module_param Message-Id: <20041018134628.5876a261@zqx3.pdx.osdl.net> In-Reply-To: <41706186.5090904@pobox.com> References: <20041015135353.53b1f263@zqx3.pdx.osdl.net> <41706186.5090904@pobox.com> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10398 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 Content-Length: 1056 Lines: 30 Here is the diff between my current and your netdev tree. --- netdev-2.6/drivers/net/typhoon.c 2004-09-22 14:39:42.000000000 -0700 +++ tcp-2.6/drivers/net/typhoon.c 2004-10-18 12:59:51.000000000 -0700 @@ -99,6 +99,7 @@ #define ERR_PFX KERN_ERR PFX #include +#include #include #include #include @@ -132,7 +133,7 @@ MODULE_AUTHOR("David Dillow "); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("3Com Typhoon Family (3C990, 3CR990, and variants)"); -MODULE_PARM(rx_copybreak, "i"); +module_param(rx_copybreak, int, 0); #if defined(NETIF_F_TSO) && MAX_SKB_FRAGS > 32 #warning Typhoon only supports 32 entries in its SG list for TSO, disabling TSO @@ -1777,7 +1778,7 @@ typhoon_interrupt(int irq, void *dev_instance, struct pt_regs *rgs) { struct net_device *dev = (struct net_device *) dev_instance; - struct typhoon *tp = dev->priv; + struct typhoon *tp = netdev_priv(dev); void __iomem *ioaddr = tp->ioaddr; u32 intr_status; From shemminger@osdl.org Mon Oct 18 13:48:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 13:48:57 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IKmp8T016629 for ; Mon, 18 Oct 2004 13:48:52 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IKd3WL031708 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 13:39:03 -0700 Date: Mon, 18 Oct 2004 13:40:02 -0700 From: Stephen Hemminger To: Jeff Garzik , Jean Tourrilhes Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9] hp100: use module_param and netdev_priv Message-Id: <20041018134002.695c347e@zqx3.pdx.osdl.net> In-Reply-To: <20041018121527.053b3309@zqx3.pdx.osdl.net> References: <20041018121527.053b3309@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10399 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 Content-Length: 620 Lines: 16 One more module_param here. Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/hp100.c b/drivers/net/hp100.c --- a/drivers/net/hp100.c 2004-10-18 13:38:10 -07:00 +++ b/drivers/net/hp100.c 2004-10-18 13:38:10 -07:00 @@ -3003,7 +3003,8 @@ #define HP100_DEVICES 5 /* Parameters set by insmod */ static int hp100_port[HP100_DEVICES] = { 0, [1 ... (HP100_DEVICES-1)] = -1 }; -MODULE_PARM(hp100_port, "1-" __MODULE_STRING(HP100_DEVICES) "i"); +static int nports; +module_param_array(hp100_port, int, nports, 0); /* List of devices */ static struct net_device *hp100_devlist[HP100_DEVICES]; From kaber@trash.net Mon Oct 18 13:49:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 13:49:09 -0700 (PDT) Received: from gw.localnet ([62.206.217.67]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IKn3O7016640 for ; Mon, 18 Oct 2004 13:49:03 -0700 Received: from [172.16.1.123] (helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1CJeYO-00010R-00; Mon, 18 Oct 2004 22:56:28 +0200 Message-ID: <41742C24.6070305@trash.net> Date: Mon, 18 Oct 2004 22:48:36 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: netdev@oss.sgi.com Subject: [PATCH 2.6]: Fix policy update bug when increasing priority of last policy Content-Type: multipart/mixed; boundary="------------000009030309030704020409" X-archive-position: 10400 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kaber@trash.net Precedence: bulk X-list: netdev Content-Length: 2808 Lines: 88 This is a multi-part message in MIME format. --------------000009030309030704020409 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit When the last policy for a direction is replaced by a policy with equal selector but a higher priority, insertion of the new policy fails. in xfrm_policy_insert: for (p = &xfrm_policy_list[dir]; (pol=*p)!=NULL; p = &pol->next) { if (!delpol && memcmp(&policy->selector, &pol->selector, sizeof(pol->selector)) == 0) { if (excl) { write_unlock_bh(&xfrm_policy_lock); return -EEXIST; } *p = pol->next; delpol = pol; X if (policy->priority > pol->priority) X continue; } else if (policy->priority >= pol->priority) continue; if (!newpos) newpos = p; if (delpol) break; } If the new policy has a higher priority than the old one, the loop will be continued in the lines marked with X, but because there are no further elements, it will leave the loop without setting newpos. The problem can be verified with ip xfrm: # ip xfrm policy list # ip xfrm policy update dir fwd src 10.0.0.1 dst 10.0.0.2 action allow priority 0 # ip xfrm policy list src 10.0.0.1/32 dst 10.0.0.2/32 dir fwd priority 0 # ip xfrm policy update dir fwd src 10.0.0.1 dst 10.0.0.2 action allow priority 1 # ip xfrm policy list # This patch checks for *p != NULL before continuing the loop. Regards Patrick --------------000009030309030704020409 Content-Type: text/plain; name="x" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="x" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/18 21:57:18+02:00 kaber@coreworks.de # [XFRM]: Fix policy update bug when increasing priority of last policy # # Signed-off-by: Patrick McHardy # # net/xfrm/xfrm_policy.c # 2004/10/18 21:56:41+02:00 kaber@coreworks.de +1 -1 # [XFRM]: Fix policy update bug when increasing priority of last policy # # Signed-off-by: Patrick McHardy # diff -Nru a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c --- a/net/xfrm/xfrm_policy.c 2004-10-18 21:58:24 +02:00 +++ b/net/xfrm/xfrm_policy.c 2004-10-18 21:58:24 +02:00 @@ -340,7 +340,7 @@ } *p = pol->next; delpol = pol; - if (policy->priority > pol->priority) + if (policy->priority > pol->priority && *p != NULL) continue; } else if (policy->priority >= pol->priority) continue; --------------000009030309030704020409-- From chas@cmf.nrl.navy.mil Mon Oct 18 13:56:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 13:56:56 -0700 (PDT) Received: from ginger.cmf.nrl.navy.mil (ginger.cmf.nrl.navy.mil [134.207.10.161]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IKukmX017534 for ; Mon, 18 Oct 2004 13:56:46 -0700 Received: from cmf.nrl.navy.mil (thirdoffive.cmf.nrl.navy.mil [134.207.10.180]) by ginger.cmf.nrl.navy.mil (8.12.11/8.12.11) with ESMTP id i9IKuL2s022173; Mon, 18 Oct 2004 16:56:22 -0400 (EDT) Message-Id: <200410182056.i9IKuL2s022173@ginger.cmf.nrl.navy.mil> To: netdev@oss.sgi.com Cc: davem@redhat.com Subject: [PATCH][ATM]: use RCV_SHUTDOWN to exit skb_recv_datagram() Reply-To: chas3@users.sourceforge.net Date: Mon, 18 Oct 2004 16:56:22 -0400 From: "chas williams (contractor)" X-Virus-Scanned: NAI Completed X-Scanned-By: MIMEDefang 2.30 (www . roaringpenguin . com / mimedefang) X-archive-position: 10401 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chas@cmf.nrl.navy.mil Precedence: bulk X-list: netdev Content-Length: 1992 Lines: 63 this patch makes the svc socket protocol act a little more like a connection oriented protocol. please apply to 2.6. thanks! # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/06 17:12:52-04:00 chas@relax.cmf.nrl.navy.mil # [ATM]: use RCV_SHUTDOWN to exit skb_recv_datagram() # # net/atm/signaling.c # 2004/10/06 17:12:36-04:00 chas@relax.cmf.nrl.navy.mil +2 -6 # [ATM]: use RCV_SHUTDOWN to exit skb_recv_datagram() # # net/atm/common.c # 2004/10/06 17:12:36-04:00 chas@relax.cmf.nrl.navy.mil +2 -0 # [ATM]: use RCV_SHUTDOWN to exit skb_recv_datagram() # diff -Nru a/net/atm/common.c b/net/atm/common.c --- a/net/atm/common.c 2004-10-18 16:13:32 -04:00 +++ b/net/atm/common.c 2004-10-18 16:13:32 -04:00 @@ -178,6 +178,7 @@ struct atm_vcc *vcc = atm_sk(sk); struct sk_buff *skb; + set_bit(ATM_VF_CLOSE, &vcc->flags); clear_bit(ATM_VF_READY, &vcc->flags); if (vcc->dev) { if (vcc->dev->ops->close) @@ -216,6 +217,7 @@ void vcc_release_async(struct atm_vcc *vcc, int reply) { set_bit(ATM_VF_CLOSE, &vcc->flags); + vcc->sk->sk_shutdown |= RCV_SHUTDOWN; vcc->sk->sk_err = -reply; clear_bit(ATM_VF_WAITING, &vcc->flags); vcc->sk->sk_state_change(vcc->sk); diff -Nru a/net/atm/signaling.c b/net/atm/signaling.c --- a/net/atm/signaling.c 2004-10-18 16:13:32 -04:00 +++ b/net/atm/signaling.c 2004-10-18 16:13:32 -04:00 @@ -147,9 +147,7 @@ return 0; case as_close: set_bit(ATM_VF_RELEASED,&vcc->flags); - clear_bit(ATM_VF_READY,&vcc->flags); - vcc->sk->sk_err = -msg->reply; - clear_bit(ATM_VF_WAITING, &vcc->flags); + vcc_release_async(vcc, msg->reply); break; case as_modify: modify_qos(vcc,msg); @@ -205,9 +203,7 @@ if (vcc->sk->sk_family == PF_ATMSVC && !test_bit(ATM_VF_META,&vcc->flags)) { set_bit(ATM_VF_RELEASED,&vcc->flags); - vcc->sk->sk_err = EUNATCH; - clear_bit(ATM_VF_WAITING, &vcc->flags); - vcc->sk->sk_state_change(vcc->sk); + vcc_release_async(vcc, -EUNATCH); } } From chas@cmf.nrl.navy.mil Mon Oct 18 14:22:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 14:22:14 -0700 (PDT) Received: from ginger.cmf.nrl.navy.mil (ginger.cmf.nrl.navy.mil [134.207.10.161]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9ILM84m018273 for ; Mon, 18 Oct 2004 14:22:08 -0700 Received: from cmf.nrl.navy.mil (thirdoffive.cmf.nrl.navy.mil [134.207.10.180]) by ginger.cmf.nrl.navy.mil (8.12.11/8.12.11) with ESMTP id i9ILLfxC022524; Mon, 18 Oct 2004 17:21:41 -0400 (EDT) Message-Id: <200410182121.i9ILLfxC022524@ginger.cmf.nrl.navy.mil> To: netdev@oss.sgi.com Cc: davem@redhat.com Subject: [PATCH][ATM]: point to multipoint signalling (from ekinzie@cmf.nrl.navy.mil) Reply-To: chas3@users.sourceforge.net Date: Mon, 18 Oct 2004 17:21:42 -0400 From: "chas williams (contractor)" X-Virus-Scanned: NAI Completed X-Scanned-By: MIMEDefang 2.30 (www . roaringpenguin . com / mimedefang) X-archive-position: 10402 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chas@cmf.nrl.navy.mil Precedence: bulk X-list: netdev Content-Length: 8678 Lines: 287 this patch adds the kernel support necessary for point to multipoint signalling. please apply to 2.6. thanks! # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/08 13:31:46-04:00 chas@relax.cmf.nrl.navy.mil # [ATM]: point to multipoint signalling (from ekinzie@cmf.nrl.navy.mil) # # net/atm/svc.c # 2004/10/08 13:31:29-04:00 chas@relax.cmf.nrl.navy.mil +123 -19 # [ATM]: point to multipoint signalling (from ekinzie@cmf.nrl.navy.mil) # # net/atm/signaling.c # 2004/10/08 13:31:29-04:00 chas@relax.cmf.nrl.navy.mil +11 -0 # [ATM]: point to multipoint signalling (from ekinzie@cmf.nrl.navy.mil) # # include/linux/atmsvc.h # 2004/10/08 13:31:29-04:00 chas@relax.cmf.nrl.navy.mil +4 -3 # [ATM]: point to multipoint signalling (from ekinzie@cmf.nrl.navy.mil) # # include/linux/atmdev.h # 2004/10/08 13:31:29-04:00 chas@relax.cmf.nrl.navy.mil +4 -0 # [ATM]: point to multipoint signalling (from ekinzie@cmf.nrl.navy.mil) # # include/linux/atm.h # 2004/10/08 13:31:29-04:00 chas@relax.cmf.nrl.navy.mil +3 -0 # [ATM]: point to multipoint signalling (from ekinzie@cmf.nrl.navy.mil) # diff -Nru a/include/linux/atm.h b/include/linux/atm.h --- a/include/linux/atm.h 2004-10-18 16:14:11 -04:00 +++ b/include/linux/atm.h 2004-10-18 16:14:11 -04:00 @@ -78,6 +78,9 @@ /* Service Access Point */ #define SO_ATMPVC __SO_ENCODE(SOL_ATM,4,struct sockaddr_atmpvc) /* "PVC" address (also for SVCs); get only */ +#define SO_MULTIPOINT __SO_ENCODE(SOL_ATM, 5, int) + /* make this vc a p2mp */ + /* * Note @@@: since the socket layers don't really distinguish the control and diff -Nru a/include/linux/atmdev.h b/include/linux/atmdev.h --- a/include/linux/atmdev.h 2004-10-18 16:14:11 -04:00 +++ b/include/linux/atmdev.h 2004-10-18 16:14:11 -04:00 @@ -95,6 +95,10 @@ /* set backend handler */ #define ATM_NEWBACKENDIF _IOW('a',ATMIOC_SPECIAL+3,atm_backend_t) /* use backend to make new if */ +#define ATM_ADDPARTY _IOW('a', ATMIOC_SPECIAL+4,struct atm_iobuf) + /* add party to p2mp call */ +#define ATM_DROPPARTY _IOW('a', ATMIOC_SPECIAL+5,int) + /* drop party from p2mp call */ /* * These are backend handkers that can be set via the ATM_SETBACKEND call diff -Nru a/include/linux/atmsvc.h b/include/linux/atmsvc.h --- a/include/linux/atmsvc.h 2004-10-18 16:14:11 -04:00 +++ b/include/linux/atmsvc.h 2004-10-18 16:14:11 -04:00 @@ -14,9 +14,10 @@ #define ATMSIGD_CTRL _IO('a',ATMIOC_SPECIAL) /* become ATM signaling demon control socket */ -enum atmsvc_msg_type { as_catch_null,as_bind,as_connect,as_accept,as_reject, - as_listen,as_okay,as_error,as_indicate,as_close,as_itf_notify, - as_modify,as_identify,as_terminate }; +enum atmsvc_msg_type { as_catch_null, as_bind, as_connect, as_accept, as_reject, + as_listen, as_okay, as_error, as_indicate, as_close, + as_itf_notify, as_modify, as_identify, as_terminate, + as_addparty, as_dropparty }; struct atmsvc_msg { enum atmsvc_msg_type type; diff -Nru a/net/atm/signaling.c b/net/atm/signaling.c --- a/net/atm/signaling.c 2004-10-18 16:14:11 -04:00 +++ b/net/atm/signaling.c 2004-10-18 16:14:11 -04:00 @@ -152,6 +152,11 @@ case as_modify: modify_qos(vcc,msg); break; + case as_addparty: + case as_dropparty: + vcc->sk->sk_err_soft = msg->reply; /* < 0 failure, otherwise ep_ref */ + clear_bit(ATM_VF_WAITING, &vcc->flags); + break; default: printk(KERN_ALERT "sigd_send: bad message type %d\n", (int) msg->type); @@ -169,6 +174,7 @@ { struct sk_buff *skb; struct atmsvc_msg *msg; + static unsigned session = 0; DPRINTK("sigd_enq %d (0x%p)\n",(int) type,vcc); while (!(skb = alloc_skb(sizeof(struct atmsvc_msg),GFP_KERNEL))) @@ -184,6 +190,11 @@ if (svc) msg->svc = *svc; if (vcc) msg->local = vcc->local; if (pvc) msg->pvc = *pvc; + if (vcc) { + if (type == as_connect && test_bit(ATM_VF_SESSION, &vcc->flags)) + msg->session = ++session; + /* every new pmp connect gets the next session number */ + } sigd_put_skb(skb); if (vcc) set_bit(ATM_VF_REGIS,&vcc->flags); } diff -Nru a/net/atm/svc.c b/net/atm/svc.c --- a/net/atm/svc.c 2004-10-18 16:14:11 -04:00 +++ b/net/atm/svc.c 2004-10-18 16:14:11 -04:00 @@ -194,10 +194,6 @@ } break; case SS_UNCONNECTED: - if (test_bit(ATM_VF_SESSION, &vcc->flags)) { - error = -EINVAL; - goto out; - } addr = (struct sockaddr_atmsvc *) sockaddr; if (addr->sas_family != AF_ATMSVC) { error = -EAFNOSUPPORT; @@ -458,24 +454,48 @@ } -static int svc_setsockopt(struct socket *sock,int level,int optname, - char __user *optval,int optlen) +static int svc_setsockopt(struct socket *sock, int level, int optname, + char __user *optval, int optlen) { struct sock *sk = sock->sk; - struct atm_vcc *vcc; - int error = 0; + struct atm_vcc *vcc = ATM_SD(sock); + int value, error = 0; - if (!__SO_LEVEL_MATCH(optname, level) || optname != SO_ATMSAP || - optlen != sizeof(struct atm_sap)) { - error = vcc_setsockopt(sock, level, optname, optval, optlen); - goto out; - } - vcc = ATM_SD(sock); - if (copy_from_user(&vcc->sap, optval, optlen)) { - error = -EFAULT; - goto out; + lock_sock(sk); + switch (optname) { + case SO_ATMSAP: + if (level != SOL_ATM || optlen != sizeof(struct atm_sap)) { + error = -EINVAL; + goto out; + } + if (copy_from_user(&vcc->sap, optval, optlen)) { + error = -EFAULT; + goto out; + } + set_bit(ATM_VF_HASSAP, &vcc->flags); + break; + case SO_MULTIPOINT: + if (level != SOL_ATM || optlen != sizeof(int)) { + error = -EINVAL; + goto out; + } + if (get_user(value, (int *) optval)) { + error = -EFAULT; + goto out; + } + if (value == 1) { + set_bit(ATM_VF_SESSION, &vcc->flags); + } else if (value == 0) { + clear_bit(ATM_VF_SESSION, &vcc->flags); + } else { + error = -EINVAL; + } + break; + default: + error = vcc_setsockopt(sock, level, optname, + optval, optlen); } - set_bit(ATM_VF_HASSAP, &vcc->flags); + out: release_sock(sk); return error; @@ -511,6 +531,90 @@ } +static int svc_addparty(struct socket *sock, struct sockaddr *sockaddr, + int sockaddr_len, int flags) +{ + DEFINE_WAIT(wait); + struct atm_vcc *vcc = ATM_SD(sock); + int error; + + lock_sock(vcc->sk); + set_bit(ATM_VF_WAITING, &vcc->flags); + prepare_to_wait(vcc->sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); + sigd_enq(vcc, as_addparty, NULL, NULL, + (struct sockaddr_atmsvc *) sockaddr); + if (flags & O_NONBLOCK) { + finish_wait(vcc->sk->sk_sleep, &wait); + error = -EINPROGRESS; + goto out; + } + DPRINTK("svc_addparty added wait queue\n"); + while (test_bit(ATM_VF_WAITING, &vcc->flags) && sigd) { + schedule(); + prepare_to_wait(vcc->sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); + } + finish_wait(vcc->sk->sk_sleep, &wait); + error = xchg(&vcc->sk->sk_err_soft, 0); +out: + release_sock(vcc->sk); + return error; +} + + +static int svc_dropparty(struct socket *sock, int ep_ref) +{ + DEFINE_WAIT(wait); + struct atm_vcc *vcc = ATM_SD(sock); + int error; + + lock_sock(vcc->sk); + set_bit(ATM_VF_WAITING, &vcc->flags); + prepare_to_wait(vcc->sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); + sigd_enq2(vcc, as_dropparty, NULL, NULL, NULL, NULL, ep_ref); + while (test_bit(ATM_VF_WAITING, &vcc->flags) && sigd) { + schedule(); + prepare_to_wait(vcc->sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); + } + finish_wait(vcc->sk->sk_sleep, &wait); + if (!sigd) { + error = -EUNATCH; + goto out; + } + error = xchg(&vcc->sk->sk_err_soft, 0); +out: + release_sock(vcc->sk); + return error; +} + + +static int svc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) +{ + int error, ep_ref; + struct sockaddr_atmsvc sa; + struct atm_vcc *vcc = ATM_SD(sock); + + switch (cmd) { + case ATM_ADDPARTY: + if (!test_bit(ATM_VF_SESSION, &vcc->flags)) + return -EINVAL; + if (copy_from_user(&sa, (void *) arg, sizeof(sa))) + return -EFAULT; + error = svc_addparty(sock, (struct sockaddr *) &sa, sizeof(sa), 0); + break; + case ATM_DROPPARTY: + if (!test_bit(ATM_VF_SESSION, &vcc->flags)) + return -EINVAL; + if (copy_from_user(&ep_ref, (void *) arg, sizeof(int))) + return -EFAULT; + error = svc_dropparty(sock, ep_ref); + break; + default: + error = vcc_ioctl(sock, cmd, arg); + } + + return error; +} + static struct proto_ops svc_proto_ops = { .family = PF_ATMSVC, .owner = THIS_MODULE, @@ -522,7 +626,7 @@ .accept = svc_accept, .getname = svc_getname, .poll = vcc_poll, - .ioctl = vcc_ioctl, + .ioctl = svc_ioctl, .listen = svc_listen, .shutdown = svc_shutdown, .setsockopt = svc_setsockopt, From herbert@gondor.apana.org.au Mon Oct 18 14:44:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 14:44:23 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9ILhqTa018897 for ; Mon, 18 Oct 2004 14:44:13 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CJfHo-0000rz-00; Tue, 19 Oct 2004 07:43:24 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CJfHq-0001ji-00; Tue, 19 Oct 2004 07:43:26 +1000 Date: Tue, 19 Oct 2004 07:43:26 +1000 To: Patrick McHardy Cc: "David S. Miller" , netdev@oss.sgi.com, ipsec-tools-devel@lists.sourceforge.net Subject: [XFRM] Allow transport SAs even when there is no policy Message-ID: <20041018214326.GA6589@gondor.apana.org.au> References: <4172943B.8050904@trash.net> <20041017212317.GA28615@gondor.apana.org.au> <4172F1AB.4020305@trash.net> <20041017231258.GA29294@gondor.apana.org.au> <417428CF.2050802@trash.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="gKMricLos+KVdGMg" Content-Disposition: inline In-Reply-To: <417428CF.2050802@trash.net> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10403 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 2036 Lines: 81 --gKMricLos+KVdGMg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Oct 18, 2004 at 10:34:23PM +0200, Patrick McHardy wrote: > > > More importantly that it'll stick out like a sore thumb in terms of > > > > its semantics. > > __xfrm_policy_check already rejects packets without a matching policy > and skb->sp set, but it is skipped while the policy list is empty. > What, from a semantics point of view, would be wrong with making > xfrm_policy_check behave the same way ? Good catch. That was a bug introduced by yours truly :) What I meant to say is all packets with tunnel mode SAs should be rejected since we don't allow optional tunnel transforms for security reasons. This patch fixes it. Signed-off-by: Herbert Xu Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --gKMricLos+KVdGMg Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== net/xfrm/xfrm_policy.c 1.54 vs edited ===== --- 1.54/net/xfrm/xfrm_policy.c 2004-09-18 08:16:56 +10:00 +++ edited/net/xfrm/xfrm_policy.c 2004-10-19 07:42:37 +10:00 @@ -893,6 +893,16 @@ return 0; } +static inline int secpath_has_tunnel(struct sec_path *sp, int k) +{ + for (; k < sp->len; k++) { + if (sp->x[k].xvec->props.mode) + return 1; + } + + return 0; +} + int __xfrm_policy_check(struct sock *sk, int dir, struct sk_buff *skb, unsigned short family) { @@ -930,7 +940,7 @@ xfrm_policy_lookup); if (!pol) - return !skb->sp; + return !skb->sp || !secpath_has_tunnel(skb->sp, 0); pol->curlft.use_time = (unsigned long)xtime.tv_sec; @@ -954,10 +964,8 @@ goto reject; } - for (; k < sp->len; k++) { - if (sp->x[k].xvec->props.mode) - goto reject; - } + if (secpath_has_tunnel(sp, k)) + goto reject; xfrm_pol_put(pol); return 1; --gKMricLos+KVdGMg-- From jt@bougret.hpl.hp.com Mon Oct 18 14:44:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 14:45:04 -0700 (PDT) Received: from palrel13.hp.com (palrel13.hp.com [156.153.255.238]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9ILicdc018946 for ; Mon, 18 Oct 2004 14:44:58 -0700 Received: from tomil.hpl.hp.com (tomil.hpl.hp.com [15.0.152.100]) by palrel13.hp.com (Postfix) with ESMTP id 571001C03746; Mon, 18 Oct 2004 14:44:21 -0700 (PDT) Received: from bougret.hpl.hp.com (bougret.hpl.hp.com [15.4.92.227]) by tomil.hpl.hp.com (8.9.3 (PHNE_29774)/8.9.3 HPLabs Timeshare Server) with ESMTP id OAA00922; Mon, 18 Oct 2004 14:48:34 -0700 (PDT) Received: from jt by bougret.hpl.hp.com with local (Exim 3.35 #1 (Debian)) id 1CJfIi-0005Cl-00; Mon, 18 Oct 2004 14:44:20 -0700 Date: Mon, 18 Oct 2004 14:44:20 -0700 To: Stephen Hemminger Cc: Jeff Garzik , netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9] hp100: use module_param and netdev_priv Message-ID: <20041018214420.GA19481@bougret.hpl.hp.com> Reply-To: jt@hpl.hp.com References: <20041018121527.053b3309@zqx3.pdx.osdl.net> <20041018134002.695c347e@zqx3.pdx.osdl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041018134002.695c347e@zqx3.pdx.osdl.net> User-Agent: Mutt/1.3.28i Organisation: HP Labs Palo Alto Address: HP Labs, 1U-17, 1501 Page Mill road, Palo Alto, CA 94304, USA. E-mail: jt@hpl.hp.com From: Jean Tourrilhes X-archive-position: 10404 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jt@bougret.hpl.hp.com Precedence: bulk X-list: netdev Content-Length: 259 Lines: 9 On Mon, Oct 18, 2004 at 01:40:02PM -0700, Stephen Hemminger wrote: > One more module_param here. I'm sorry, but one of those two patches broken the driver. I did not investigate further because I guess you'll find the problem in 2 sec. Good luck... Jean From ravinandan.arakali@s2io.com Mon Oct 18 14:59:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 14:59:07 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9ILx1cd019883 for ; Mon, 18 Oct 2004 14:59:02 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9ILwXje023133; Mon, 18 Oct 2004 17:58:33 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9ILwT39028031; Mon, 18 Oct 2004 17:58:29 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" Cc: "'Francois Romieu'" , , , , Subject: RE: s2io: patch disposition Date: Mon, 18 Oct 2004 15:06:47 -0700 Message-ID: <001e01c4b55e$c37aba50$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-Reply-To: <416E95AC.3010005@pobox.com> Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10405 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Content-Length: 770 Lines: 30 Jeff, We'll resend the original 8 patches, followed by patch to address your comments. Is it okay to send a single patch to address your comments or you want that to be split as well ? Thanks, Ravi -----Original Message----- From: Jeff Garzik [mailto:jgarzik@pobox.com] Sent: Thursday, October 14, 2004 8:05 AM To: ravinandan.arakali@s2io.com Cc: 'Francois Romieu'; netdev@oss.sgi.com; leonid.grossman@s2io.com; raghavendra.koushik@s2io.com; rapuru.sriram@s2io.com Subject: s2io: patch disposition Ok, I have sent all my comments for your patches. All patches must be resend, since your mailer mangled them. It is up to you whether you wish to modify these patches for my comments, or create additional patches that address my comments. Your choice. Jeff From jgarzik@pobox.com Mon Oct 18 15:04:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 15:05:11 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IM4bJo020262 for ; Mon, 18 Oct 2004 15:04:57 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CJfc4-0000pK-KG; Mon, 18 Oct 2004 23:04:20 +0100 Message-ID: <41743DD7.2070500@pobox.com> Date: Mon, 18 Oct 2004 18:04:07 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ravinandan.arakali@s2io.com CC: "'Francois Romieu'" , netdev@oss.sgi.com, leonid.grossman@s2io.com, raghavendra.koushik@s2io.com, rapuru.sriram@s2io.com Subject: Re: s2io: patch disposition References: <001e01c4b55e$c37aba50$9810100a@S2IOtech.com> In-Reply-To: <001e01c4b55e$c37aba50$9810100a@S2IOtech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10406 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: 297 Lines: 12 Ravinandan Arakali wrote: > Jeff, > We'll resend the original 8 patches, followed by patch to address > your comments. Is it okay to send a single patch to address your > comments or you want that to be split as well ? It depends on the changes. The rule is "separate logical changes" Jeff From romieu@fr.zoreil.com Mon Oct 18 15:22:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 15:22:40 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IMMDEU020819 for ; Mon, 18 Oct 2004 15:22:34 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i9IML7vr025983; Tue, 19 Oct 2004 00:21:07 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i9IML71n025982; Tue, 19 Oct 2004 00:21:07 +0200 Date: Tue, 19 Oct 2004 00:21:07 +0200 From: Francois Romieu To: Ravinandan Arakali Cc: Jeff Garzik , netdev@oss.sgi.com, leonid.grossman@s2io.com, raghavendra.koushik@s2io.com, rapuru.sriram@s2io.com Subject: Re: s2io: patch disposition Message-ID: <20041018222107.GA19990@electric-eye.fr.zoreil.com> References: <416E95AC.3010005@pobox.com> <001e01c4b55e$c37aba50$9810100a@S2IOtech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <001e01c4b55e$c37aba50$9810100a@S2IOtech.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 10407 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 Content-Length: 438 Lines: 13 Ravinandan Arakali : [...] > We'll resend the original 8 patches, followed by patch to address > your comments. Is it okay to send a single patch to address your > comments or you want that to be split as well ? Dumb question: is there something which prevents your patches to be sent with an MUA which inlines patches ? Or is there any hope for you to run some Perl crap on your computer ? :o) -- Ueimor From ravinandan.arakali@s2io.com Mon Oct 18 15:31:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 15:31:09 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IMV3Zk021214 for ; Mon, 18 Oct 2004 15:31:04 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9IMUbje023319; Mon, 18 Oct 2004 18:30:37 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9IMUZ39004516; Mon, 18 Oct 2004 18:30:35 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Francois Romieu'" Cc: "'Jeff Garzik'" , , , , Subject: RE: s2io: patch disposition Date: Mon, 18 Oct 2004 15:38:53 -0700 Message-ID: <001f01c4b563$3f6d8b70$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-Reply-To: <20041018222107.GA19990@electric-eye.fr.zoreil.com> Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10408 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Content-Length: 819 Lines: 28 Hi Francois, When we resend the patches, they will be inlined in the e-mail. Ravi -----Original Message----- From: Francois Romieu [mailto:romieu@fr.zoreil.com] Sent: Monday, October 18, 2004 3:21 PM To: Ravinandan Arakali Cc: Jeff Garzik; netdev@oss.sgi.com; leonid.grossman@s2io.com; raghavendra.koushik@s2io.com; rapuru.sriram@s2io.com Subject: Re: s2io: patch disposition Ravinandan Arakali : [...] > We'll resend the original 8 patches, followed by patch to address > your comments. Is it okay to send a single patch to address your > comments or you want that to be split as well ? Dumb question: is there something which prevents your patches to be sent with an MUA which inlines patches ? Or is there any hope for you to run some Perl crap on your computer ? :o) -- Ueimor From shemminger@osdl.org Mon Oct 18 15:34:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 15:34:36 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IMXoFD021569 for ; Mon, 18 Oct 2004 15:34:10 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IMXUWL009175 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 15:33:30 -0700 Date: Mon, 18 Oct 2004 15:24:06 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9 4/5] skge: use netdev_priv Message-Id: <20041018152406.5353c657@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10409 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 Content-Length: 5313 Lines: 204 Use netdev_priv (and dev->priv can't be null). Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c --- a/drivers/net/sk98lin/skge.c 2004-10-18 15:14:35 -07:00 +++ b/drivers/net/sk98lin/skge.c 2004-10-18 15:14:35 -07:00 @@ -337,22 +337,20 @@ DEV_NET *pNet; SK_AC *pAC; - if (dev->priv) { - pNet = (DEV_NET*) dev->priv; - pAC = pNet->pAC; - AllocFlag = pAC->AllocFlag; - if (pAC->PciDev) { - pci_release_regions(pAC->PciDev); - } - if (AllocFlag & SK_ALLOC_IRQ) { - free_irq(dev->irq, dev); - } - if (pAC->IoBase) { - iounmap(pAC->IoBase); - } - if (pAC->pDescrMem) { - BoardFreeMem(pAC); - } + pNet = netdev_priv(dev); + pAC = pNet->pAC; + AllocFlag = pAC->AllocFlag; + if (pAC->PciDev) { + pci_release_regions(pAC->PciDev); + } + if (AllocFlag & SK_ALLOC_IRQ) { + free_irq(dev->irq, dev); + } + if (pAC->IoBase) { + iounmap(pAC->IoBase); + } + if (pAC->pDescrMem) { + BoardFreeMem(pAC); } } /* FreeResources */ @@ -887,7 +885,7 @@ SK_AC *pAC; SK_U32 IntSrc; /* interrupts source register contents */ - pNet = (DEV_NET*) dev->priv; + pNet = netdev_priv(dev); pAC = pNet->pAC; /* @@ -1036,7 +1034,7 @@ SK_AC *pAC; SK_U32 IntSrc; /* interrupts source register contents */ - pNet = (DEV_NET*) dev->priv; + pNet = netdev_priv(dev); pAC = pNet->pAC; /* @@ -1152,7 +1150,7 @@ int i; SK_EVPARA EvPara; /* an event parameter union */ - pNet = (DEV_NET*) dev->priv; + pNet = netdev_priv(dev); pAC = pNet->pAC; SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY, @@ -1273,7 +1271,7 @@ SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY, ("SkGeClose: pAC=0x%lX ", (unsigned long)pAC)); - pNet = (DEV_NET*) dev->priv; + pNet = netdev_priv(dev); pAC = pNet->pAC; #ifdef SK_DIAG_SUPPORT @@ -1284,7 +1282,7 @@ ** by operator interaction must not be started up ** again when the DIAG has finished. */ - newPtrNet = (DEV_NET *) pAC->dev[0]->priv; + newPtrNet = netdev_priv(pAC->dev[0]); if (newPtrNet == pNet) { pAC->WasIfUp[0] = SK_FALSE; } else { @@ -1394,7 +1392,7 @@ SK_AC *pAC; int Rc; /* return code of XmitFrame */ - pNet = (DEV_NET*) dev->priv; + pNet = netdev_priv(dev); pAC = pNet->pAC; if ((!skb_shinfo(skb)->nr_frags) || @@ -2490,7 +2488,7 @@ static int SkGeSetMacAddr(struct SK_NET_DEVICE *dev, void *p) { -DEV_NET *pNet = (DEV_NET*) dev->priv; +DEV_NET *pNet = netdev_priv(dev); SK_AC *pAC = pNet->pAC; struct sockaddr *addr = p; @@ -2547,7 +2545,7 @@ SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY, ("SkGeSetRxMode starts now... ")); - pNet = (DEV_NET*) dev->priv; + pNet = netdev_priv(dev); pAC = pNet->pAC; if (pAC->RlmtNets == 1) PortIdx = pAC->ActivePort; @@ -2619,7 +2617,7 @@ SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY, ("SkGeChangeMtu starts now...\n")); - pNet = (DEV_NET*) dev->priv; + pNet = netdev_priv(dev); pAC = pNet->pAC; if ((NewMtu < 68) || (NewMtu > SK_JUMBO_MTU)) { @@ -2641,7 +2639,7 @@ #endif pNet->Mtu = NewMtu; - pOtherNet = (DEV_NET*)pAC->dev[1 - pNet->NetNr]->priv; + pOtherNet = netdev_priv(pAC->dev[1 - pNet->NetNr]); if ((pOtherNet->Mtu>1500) && (NewMtu<=1500) && (pOtherNet->Up==1)) { return(0); } @@ -2847,7 +2845,7 @@ */ static struct net_device_stats *SkGeStats(struct SK_NET_DEVICE *dev) { -DEV_NET *pNet = (DEV_NET*) dev->priv; +DEV_NET *pNet = netdev_priv(dev); SK_AC *pAC = pNet->pAC; SK_PNMI_STRUCT_DATA *pPnmiStruct; /* structure for all Pnmi-Data */ SK_PNMI_STAT *pPnmiStat; /* pointer to virtual XMAC stat. data */ @@ -2945,7 +2943,7 @@ SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY, ("SkGeIoctl starts now...\n")); - pNet = (DEV_NET*) dev->priv; + pNet = netdev_priv(dev); pAC = pNet->pAC; if(copy_from_user(&Ioctl, rq->ifr_data, sizeof(SK_GE_IOCTL))) { @@ -4531,11 +4529,8 @@ int SkDrvEnterDiagMode( SK_AC *pAc) /* pointer to adapter context */ { - SK_AC *pAC = NULL; - DEV_NET *pNet = NULL; - - pNet = (DEV_NET *) pAc->dev[0]->priv; - pAC = pNet->pAC; + DEV_NET *pNet = netdev_priv(pAc->dev[0]); + SK_AC *pAC = pNet->pAC; SK_MEMCPY(&(pAc->PnmiBackup), &(pAc->PnmiStruct), sizeof(SK_PNMI_STRUCT_DATA)); @@ -4550,8 +4545,8 @@ } else { pAC->WasIfUp[0] = SK_FALSE; } - if (pNet != (DEV_NET *) pAc->dev[1]->priv) { - pNet = (DEV_NET *) pAc->dev[1]->priv; + if (pNet != netdev_priv(pAC->dev[1])) { + pNet = netdev_priv(pAC->dev[1]); if (pNet->Up) { pAC->WasIfUp[1] = SK_TRUE; pAC->DiagFlowCtrl = SK_TRUE; /* for SkGeClose */ @@ -4897,7 +4892,7 @@ goto out_disable_device; } - pNet = dev->priv; + pNet = netdev_priv(dev); pNet->pAC = kmalloc(sizeof(SK_AC), GFP_KERNEL); if (!pNet->pAC) { printk(KERN_ERR "Unable to allocate adapter " @@ -4997,7 +4992,7 @@ } pAC->dev[1] = dev; - pNet = dev->priv; + pNet = netdev_priv(dev); pNet->PortNr = 1; pNet->NetNr = 1; pNet->pAC = pAC; @@ -5073,7 +5068,7 @@ static void __devexit skge_remove_one(struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); - DEV_NET *pNet = (DEV_NET *) dev->priv; + DEV_NET *pNet = netdev_priv(dev); SK_AC *pAC = pNet->pAC; int have_second_mac = 0; From shemminger@osdl.org Mon Oct 18 15:34:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 15:35:37 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IMYAYq021586 for ; Mon, 18 Oct 2004 15:34:15 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IMXoWL009250 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 15:33:51 -0700 Date: Mon, 18 Oct 2004 13:41:12 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9] 3c509: use module_param Message-Id: <20041018134112.3ba865c3@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10412 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 Content-Length: 1339 Lines: 38 Another 3com card change to use module_param Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/3c509.c b/drivers/net/3c509.c --- a/drivers/net/3c509.c 2004-10-18 13:32:47 -07:00 +++ b/drivers/net/3c509.c 2004-10-18 13:32:47 -07:00 @@ -70,6 +70,7 @@ #include #include +#include #ifdef CONFIG_MCA #include #endif @@ -1535,16 +1536,17 @@ static int irq[] = {-1, -1, -1, -1, -1, -1, -1, -1}; static int xcvr[] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; -MODULE_PARM(debug,"i"); -MODULE_PARM(irq,"1-8i"); -MODULE_PARM(xcvr,"1-12i"); -MODULE_PARM(max_interrupt_work, "i"); +module_param(debug, int, 0); +static int num_params; +module_param_array(irq, int, num_params, 0); +module_param_array(xcvr, int, num_params, 0); +module_param(max_interrupt_work, int, 0); MODULE_PARM_DESC(debug, "debug level (0-6)"); MODULE_PARM_DESC(irq, "IRQ number(s) (assigned)"); MODULE_PARM_DESC(xcvr,"transceiver(s) (0=internal, 1=external)"); MODULE_PARM_DESC(max_interrupt_work, "maximum events handled per interrupt"); #if defined(__ISAPNP__) -MODULE_PARM(nopnp, "i"); +module_param(nopnp, int, 0); MODULE_PARM_DESC(nopnp, "disable ISA PnP support (0-1)"); MODULE_DEVICE_TABLE(isapnp, el3_isapnp_adapters); #endif /* __ISAPNP__ */ From shemminger@osdl.org Mon Oct 18 15:34:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 15:35:24 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IMXpR7021570 for ; Mon, 18 Oct 2004 15:34:12 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IMXVWL009180 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 15:33:32 -0700 Date: Mon, 18 Oct 2004 13:03:02 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9] 3c501: convert to module_param Message-Id: <20041018130302.51f910b9@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10410 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 Content-Length: 1847 Lines: 73 Convert old 3c501 to use: * module_param * don't need need to zero private area, it's already zero * module_init() vs. old style init_module Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/3c501.c b/drivers/net/3c501.c --- a/drivers/net/3c501.c 2004-10-18 12:22:58 -07:00 +++ b/drivers/net/3c501.c 2004-10-18 12:22:58 -07:00 @@ -112,7 +112,7 @@ */ #include - +#include #include #include #include @@ -305,7 +305,6 @@ if (el_debug) printk(KERN_DEBUG "%s", version); - memset(dev->priv, 0, sizeof(struct net_local)); lp = netdev_priv(dev); spin_lock_init(&lp->lock); @@ -892,8 +891,8 @@ static struct net_device *dev_3c501; -MODULE_PARM(io, "i"); -MODULE_PARM(irq, "i"); +module_param(io, int, 0); +module_param(irq, int, 0); MODULE_PARM_DESC(io, "EtherLink I/O base address"); MODULE_PARM_DESC(irq, "EtherLink IRQ number"); @@ -908,14 +907,14 @@ * Returns 0 for success or -EIO if a card is not found. Returning an error * here also causes the module to be unloaded */ - -int init_module(void) +static int __init el1_init_module(void) { dev_3c501 = el1_probe(-1); if (IS_ERR(dev_3c501)) return PTR_ERR(dev_3c501); return 0; } +module_init(el1_init_module); /** * cleanup_module: @@ -923,15 +922,14 @@ * The module is being unloaded. We unhook our network device from the system * and then free up the resources we took when the card was found. */ - -void cleanup_module(void) +static void __exit el1_cleanup_module(void) { struct net_device *dev = dev_3c501; unregister_netdev(dev); release_region(dev->base_addr, EL1_IO_EXTENT); free_netdev(dev); } - +module_exit(el1_cleanup_module); #endif /* MODULE */ MODULE_AUTHOR("Donald Becker, Alan Cox"); From shemminger@osdl.org Mon Oct 18 15:34:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 15:35:37 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IMY7u2021583 for ; Mon, 18 Oct 2004 15:34:17 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IMXkWL009230 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 15:33:47 -0700 Date: Mon, 18 Oct 2004 13:12:36 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9] 3c59x: use module_param and netdev_priv Message-Id: <20041018131236.2f70117a@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i9IMY7u2021583 X-archive-position: 10411 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 Content-Length: 5484 Lines: 144 Use netdev_priv and module_param Signed-off-by: Stephen Hemminger --- netdev-2.6/drivers/net/3c59x.c 2004-10-18 13:09:11.664690912 -0700 +++ tcp-2.6/drivers/net/3c59x.c 2004-10-18 13:09:26.020508496 -0700 @@ -240,6 +240,7 @@ static int vortex_debug = 1; #include #include +#include #include #include #include @@ -278,22 +279,35 @@ MODULE_DESCRIPTION("3Com 3c59x/3c9xx eth DRV_VERSION " " DRV_RELDATE); MODULE_LICENSE("GPL"); -MODULE_PARM(debug, "i"); -MODULE_PARM(global_options, "i"); -MODULE_PARM(options, "1-" __MODULE_STRING(8) "i"); -MODULE_PARM(global_full_duplex, "i"); -MODULE_PARM(full_duplex, "1-" __MODULE_STRING(8) "i"); -MODULE_PARM(hw_checksums, "1-" __MODULE_STRING(8) "i"); -MODULE_PARM(flow_ctrl, "1-" __MODULE_STRING(8) "i"); -MODULE_PARM(global_enable_wol, "i"); -MODULE_PARM(enable_wol, "1-" __MODULE_STRING(8) "i"); -MODULE_PARM(rx_copybreak, "i"); -MODULE_PARM(max_interrupt_work, "i"); -MODULE_PARM(compaq_ioaddr, "i"); -MODULE_PARM(compaq_irq, "i"); -MODULE_PARM(compaq_device_id, "i"); -MODULE_PARM(watchdog, "i"); -MODULE_PARM_DESC(debug, "3c59x debug level (0-6)"); +/* This driver uses 'options' to pass the media type, full-duplex flag, etc. */ +/* Option count limit only -- unlimited interfaces are supported. */ +#define MAX_UNITS 8 +static int options[MAX_UNITS] = { -1, -1, -1, -1, -1, -1, -1, -1,}; +static int full_duplex[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1}; +static int hw_checksums[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1}; +static int flow_ctrl[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1}; +static int enable_wol[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1}; +static int global_options = -1; +static int global_full_duplex = -1; +static int global_enable_wol = -1; +static int compaq_ioaddr, compaq_irq, compaq_device_id = 0x5900; + +static int num_units; +module_param(global_options, int, 0); +module_param_array(options, int, num_units, 0); +module_param(global_full_duplex, int, 0); +module_param_array(full_duplex, int, num_units, 0); +module_param_array(hw_checksums, int, num_units, 0); +module_param_array(flow_ctrl, int, num_units, 0); +module_param(global_enable_wol, int, 0); +module_param_array(enable_wol, int, num_units, 0); +module_param(rx_copybreak, int, 0); +module_param(max_interrupt_work, int, 0); +module_param(compaq_ioaddr, int, 0); +module_param(compaq_irq, int, 0); +module_param(compaq_device_id, int, 0); +module_param(watchdog, int, 0); + MODULE_PARM_DESC(options, "3c59x: Bits 0-3: media type, bit 4: bus mastering, bit 9: full duplex"); MODULE_PARM_DESC(global_options, "3c59x: same as options, but applies to all NICs if options is unset"); MODULE_PARM_DESC(full_duplex, "3c59x full duplex setting(s) (1)"); @@ -911,22 +925,10 @@ static struct ethtool_ops vortex_ethtool static void set_8021q_mode(struct net_device *dev, int enable); -/* This driver uses 'options' to pass the media type, full-duplex flag, etc. */ -/* Option count limit only -- unlimited interfaces are supported. */ -#define MAX_UNITS 8 -static int options[MAX_UNITS] = { -1, -1, -1, -1, -1, -1, -1, -1,}; -static int full_duplex[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1}; -static int hw_checksums[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1}; -static int flow_ctrl[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1}; -static int enable_wol[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1}; -static int global_options = -1; -static int global_full_duplex = -1; -static int global_enable_wol = -1; /* #define dev_alloc_skb dev_alloc_skb_debug */ /* Variables to work-around the Compaq PCI BIOS32 problem. */ -static int compaq_ioaddr, compaq_irq, compaq_device_id = 0x5900; static struct net_device *compaq_net_device; static int vortex_cards_found; @@ -934,7 +936,7 @@ static int vortex_cards_found; #ifdef CONFIG_NET_POLL_CONTROLLER static void poll_vortex(struct net_device *dev) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); unsigned long flags; local_save_flags(flags); local_irq_disable(); @@ -949,7 +951,7 @@ static int vortex_suspend (struct pci_de { struct net_device *dev = pci_get_drvdata(pdev); - if (dev && dev->priv) { + if (dev) { if (netif_running(dev)) { netif_device_detach(dev); vortex_down(dev, 1); @@ -962,7 +964,7 @@ static int vortex_resume (struct pci_dev { struct net_device *dev = pci_get_drvdata(pdev); - if (dev && dev->priv) { + if (dev) { if (netif_running(dev)) { vortex_up(dev); netif_device_attach(dev); @@ -2888,7 +2890,7 @@ static void vortex_get_drvinfo(struct ne } static struct ethtool_ops vortex_ethtool_ops = { - .get_drvinfo = vortex_get_drvinfo, + .get_drvinfo = vortex_get_drvinfo, }; #ifdef CONFIG_PCI @@ -2982,7 +2984,7 @@ static void set_rx_mode(struct net_devic static void set_8021q_mode(struct net_device *dev, int enable) { - struct vortex_private *vp = (struct vortex_private *)dev->priv; + struct vortex_private *vp = netdev_priv(dev); long ioaddr = dev->base_addr; int old_window = inw(ioaddr + EL3_CMD); int mac_ctrl; @@ -3225,7 +3227,7 @@ static void __exit vortex_eisa_cleanup ( #endif if (compaq_net_device) { - vp = compaq_net_device->priv; + vp = netdev_priv(compaq_net_device); ioaddr = compaq_net_device->base_addr; unregister_netdev (compaq_net_device); From shemminger@osdl.org Mon Oct 18 15:34:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 15:35:45 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IMXrbw021571 for ; Mon, 18 Oct 2004 15:34:13 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IMXXWL009185 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 15:33:33 -0700 Date: Mon, 18 Oct 2004 15:24:54 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9 5/5] skge: use module_param_array Message-Id: <20041018152454.66f9a5f0@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10420 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 Content-Length: 3219 Lines: 70 Use module_param_array Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c --- a/drivers/net/sk98lin/skge.c 2004-10-18 15:17:11 -07:00 +++ b/drivers/net/sk98lin/skge.c 2004-10-18 15:17:11 -07:00 @@ -109,6 +109,7 @@ #include "h/skversion.h" #include +#include #include #include @@ -358,26 +359,6 @@ MODULE_AUTHOR("Mirko Lindner "); MODULE_DESCRIPTION("SysKonnect SK-NET Gigabit Ethernet SK-98xx driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(Speed_A, "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s"); -MODULE_PARM(Speed_B, "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s"); -MODULE_PARM(AutoNeg_A, "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s"); -MODULE_PARM(AutoNeg_B, "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s"); -MODULE_PARM(DupCap_A, "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s"); -MODULE_PARM(DupCap_B, "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s"); -MODULE_PARM(FlowCtrl_A, "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s"); -MODULE_PARM(FlowCtrl_B, "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s"); -MODULE_PARM(Role_A, "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s"); -MODULE_PARM(Role_B, "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s"); -MODULE_PARM(ConType, "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s"); -MODULE_PARM(PrefPort, "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s"); -MODULE_PARM(RlmtMode, "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s"); -/* used for interrupt moderation */ -MODULE_PARM(IntsPerSec, "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "i"); -MODULE_PARM(Moderation, "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s"); -MODULE_PARM(Stats, "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s"); -MODULE_PARM(ModerationMask, "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s"); -MODULE_PARM(AutoSizing, "1-" __MODULE_STRING(SK_MAX_CARD_PARAM) "s"); - #ifdef LINK_SPEED_A static char *Speed_A[SK_MAX_CARD_PARAM] = LINK_SPEED; @@ -462,6 +443,27 @@ static char *ModerationMask[SK_MAX_CARD_PARAM]; static char *AutoSizing[SK_MAX_CARD_PARAM]; static char *Stats[SK_MAX_CARD_PARAM]; + +static int nparams; +module_param_array(Speed_A, charp, nparams, 0); +module_param_array(Speed_B, charp, nparams, 0); +module_param_array(AutoNeg_A, charp, nparams, 0); +module_param_array(AutoNeg_B, charp, nparams, 0); +module_param_array(DupCap_A, charp, nparams, 0); +module_param_array(DupCap_B, charp, nparams, 0); +module_param_array(FlowCtrl_A, charp, nparams, 0); +module_param_array(FlowCtrl_B, charp, nparams, 0); +module_param_array(Role_A, charp, nparams, 0); +module_param_array(Role_B, charp, nparams, 0); +module_param_array(ConType, charp, nparams, 0); +module_param_array(PrefPort, charp, nparams, 0); +module_param_array(RlmtMode, charp, nparams, 0); +/* used for interrupt moderation */ +module_param_array(IntsPerSec, int, nparams, 0); +module_param_array(Moderation, charp, nparams, 0); +module_param_array(Stats, charp, nparams, 0); +module_param_array(ModerationMask, charp, nparams, 0); +module_param_array(AutoSizing, charp, nparams, 0); /***************************************************************************** * From shemminger@osdl.org Mon Oct 18 15:34:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 15:35:37 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IMY82n021584 for ; Mon, 18 Oct 2004 15:34:13 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IMXmWL009240 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 15:33:48 -0700 Date: Mon, 18 Oct 2004 14:09:13 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9 2/2] via-velocity: get rid of unused global Message-Id: <20041018140913.4b00ec14@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10411 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 Content-Length: 457 Lines: 21 Get rid of unused global variable, name the enum instead. Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/via-velocity.h b/drivers/net/via-velocity.h --- a/drivers/net/via-velocity.h 2004-10-18 14:04:11 -07:00 +++ b/drivers/net/via-velocity.h 2004-10-18 14:04:11 -07:00 @@ -291,10 +291,10 @@ dma_addr_t buf_dma; }; -enum { +enum velocity_owner { OWNED_BY_HOST = 0, OWNED_BY_NIC = 1 -} velocity_owner; +}; /* From shemminger@osdl.org Mon Oct 18 15:34:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 15:35:42 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IMYEk3021590 for ; Mon, 18 Oct 2004 15:34:14 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IMXsWL009266 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 15:33:54 -0700 Date: Mon, 18 Oct 2004 15:19:57 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9 2/5] skge: eliminate a global variable Message-Id: <20041018151957.7c7f8059@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10417 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 Content-Length: 576 Lines: 16 This variable is only defined and used in one file Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/sk98lin/skaddr.c b/drivers/net/sk98lin/skaddr.c --- a/drivers/net/sk98lin/skaddr.c 2004-10-18 15:08:52 -07:00 +++ b/drivers/net/sk98lin/skaddr.c 2004-10-18 15:08:52 -07:00 @@ -79,7 +79,7 @@ /* 64-bit hash values with all bits set. */ -SK_U16 OnesHash[4] = {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF}; +static SK_U16 OnesHash[4] = {0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF}; /* local variables ************************************************************/ From shemminger@osdl.org Mon Oct 18 15:34:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 15:35:43 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IMXs9B021572 for ; Mon, 18 Oct 2004 15:34:14 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IMXYWL009191 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 15:33:34 -0700 Date: Mon, 18 Oct 2004 14:06:10 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9 2/3] tlan: inline functions should be static + bogus xor Message-Id: <20041018140610.6edf1769@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10418 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 Content-Length: 3353 Lines: 116 Thunderlan driver has lots of inline functions that should have been declared static (private). Also, someone didn't know there C operators. Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/tlan.h b/drivers/net/tlan.h --- a/drivers/net/tlan.h 2004-10-18 13:59:34 -07:00 +++ b/drivers/net/tlan.h 2004-10-18 13:59:34 -07:00 @@ -443,7 +443,7 @@ /* Routines to access internal registers. */ -inline u8 TLan_DioRead8(u16 base_addr, u16 internal_addr) +static inline u8 TLan_DioRead8(u16 base_addr, u16 internal_addr) { outw(internal_addr, base_addr + TLAN_DIO_ADR); return (inb((base_addr + TLAN_DIO_DATA) + (internal_addr & 0x3))); @@ -453,7 +453,7 @@ -inline u16 TLan_DioRead16(u16 base_addr, u16 internal_addr) +static inline u16 TLan_DioRead16(u16 base_addr, u16 internal_addr) { outw(internal_addr, base_addr + TLAN_DIO_ADR); return (inw((base_addr + TLAN_DIO_DATA) + (internal_addr & 0x2))); @@ -463,7 +463,7 @@ -inline u32 TLan_DioRead32(u16 base_addr, u16 internal_addr) +static inline u32 TLan_DioRead32(u16 base_addr, u16 internal_addr) { outw(internal_addr, base_addr + TLAN_DIO_ADR); return (inl(base_addr + TLAN_DIO_DATA)); @@ -473,7 +473,7 @@ -inline void TLan_DioWrite8(u16 base_addr, u16 internal_addr, u8 data) +static inline void TLan_DioWrite8(u16 base_addr, u16 internal_addr, u8 data) { outw(internal_addr, base_addr + TLAN_DIO_ADR); outb(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x3)); @@ -483,7 +483,7 @@ -inline void TLan_DioWrite16(u16 base_addr, u16 internal_addr, u16 data) +static inline void TLan_DioWrite16(u16 base_addr, u16 internal_addr, u16 data) { outw(internal_addr, base_addr + TLAN_DIO_ADR); outw(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x2)); @@ -493,7 +493,7 @@ -inline void TLan_DioWrite32(u16 base_addr, u16 internal_addr, u32 data) +static inline void TLan_DioWrite32(u16 base_addr, u16 internal_addr, u32 data) { outw(internal_addr, base_addr + TLAN_DIO_ADR); outl(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x2)); @@ -503,7 +503,7 @@ #if 0 -inline void TLan_ClearBit(u8 bit, u16 port) +static inline void TLan_ClearBit(u8 bit, u16 port) { outb_p(inb_p(port) & ~bit, port); } @@ -511,7 +511,7 @@ -inline int TLan_GetBit(u8 bit, u16 port) +static inline int TLan_GetBit(u8 bit, u16 port) { return ((int) (inb_p(port) & bit)); } @@ -519,7 +519,7 @@ -inline void TLan_SetBit(u8 bit, u16 port) +static inline void TLan_SetBit(u8 bit, u16 port) { outb_p(inb_p(port) | bit, port); } @@ -532,7 +532,7 @@ #ifdef I_LIKE_A_FAST_HASH_FUNCTION /* given 6 bytes, view them as 8 6-bit numbers and return the XOR of those */ /* the code below is about seven times as fast as the original code */ -inline u32 TLan_HashFunc( u8 *a ) +static inline u32 TLan_HashFunc( u8 *a ) { u8 hash; @@ -548,14 +548,14 @@ #else /* original code */ -inline u32 xor( u32 a, u32 b ) +static inline u32 xor( u32 a, u32 b ) { - return ( ( a && ! b ) || ( ! a && b ) ); + return a ^ b; } #define XOR8( a, b, c, d, e, f, g, h ) xor( a, xor( b, xor( c, xor( d, xor( e, xor( f, xor( g, h ) ) ) ) ) ) ) #define DA( a, bit ) ( ( (u8) a[bit/8] ) & ( (u8) ( 1 << bit%8 ) ) ) -inline u32 TLan_HashFunc( u8 *a ) +static inline u32 TLan_HashFunc( u8 *a ) { u32 hash; From shemminger@osdl.org Mon Oct 18 15:34:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 15:35:48 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IMXvJI021577 for ; Mon, 18 Oct 2004 15:34:18 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IMXbWL009204 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 15:33:37 -0700 Date: Mon, 18 Oct 2004 14:06:17 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9 1/3] tlan: use module_param Message-Id: <20041018140617.3af8bbfa@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10422 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 Content-Length: 9359 Lines: 358 Convert tlan to use module_param and netdev_priv Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/tlan.c b/drivers/net/tlan.c --- a/drivers/net/tlan.c 2004-10-18 13:37:06 -07:00 +++ b/drivers/net/tlan.c 2004-10-18 13:37:06 -07:00 @@ -167,6 +167,7 @@ *******************************************************************************/ #include +#include #include #include #include @@ -193,16 +194,20 @@ static int duplex[MAX_TLAN_BOARDS]; static int speed[MAX_TLAN_BOARDS]; static int boards_found; +/* Turn on debugging. See Documentation/networking/tlan.txt for details */ +static int debug; +static int bbuf; MODULE_AUTHOR("Maintainer: Samuel Chessman "); MODULE_DESCRIPTION("Driver for TI ThunderLAN based ethernet PCI adapters"); MODULE_LICENSE("GPL"); -MODULE_PARM(aui, "1-" __MODULE_STRING(MAX_TLAN_BOARDS) "i"); -MODULE_PARM(duplex, "1-" __MODULE_STRING(MAX_TLAN_BOARDS) "i"); -MODULE_PARM(speed, "1-" __MODULE_STRING(MAX_TLAN_BOARDS) "i"); -MODULE_PARM(debug, "i"); -MODULE_PARM(bbuf, "i"); +static int num_boards; +module_param_array(aui, int, num_boards, 0); +module_param_array(duplex, int, num_boards, 0); +module_param_array(speed, int, num_boards, 0); +module_param(debug, int, 0); +module_param(bbuf, int, 0); MODULE_PARM_DESC(aui, "ThunderLAN use AUI port(s) (0-1)"); MODULE_PARM_DESC(duplex, "ThunderLAN duplex setting(s) (0-default, 1-half, 2-full)"); MODULE_PARM_DESC(speed, "ThunderLAN port speen setting(s) (0,10,100)"); @@ -212,10 +217,6 @@ /* Define this to enable Link beat monitoring */ #undef MONITOR -/* Turn on debugging. See Documentation/networking/tlan.txt for details */ -static int debug; - -static int bbuf; static u8 *TLanPadBuffer; static dma_addr_t TLanPadBufferDMA; static char TLanSignature[] = "TLAN"; @@ -382,7 +383,7 @@ static inline void TLan_SetTimer( struct net_device *dev, u32 ticks, u32 type ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); unsigned long flags = 0; if (!in_irq()) @@ -438,7 +439,7 @@ static void __devexit tlan_remove_one( struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata( pdev ); - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); unregister_netdev( dev ); @@ -557,7 +558,7 @@ SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); - priv = dev->priv; + priv = netdev_priv(dev); priv->pciDev = pdev; @@ -693,7 +694,7 @@ while( tlan_have_eisa ) { dev = TLan_Eisa_Devices; - priv = dev->priv; + priv = netdev_priv(dev); if (priv->dmaStorage) { pci_free_consistent(priv->pciDev, priv->dmaSize, priv->dmaStorage, priv->dmaStorageDMA ); } @@ -854,7 +855,7 @@ int i; TLanPrivateInfo *priv; - priv = dev->priv; + priv = netdev_priv(dev); if ( bbuf ) { dma_size = ( TLAN_NUM_RX_LISTS + TLAN_NUM_TX_LISTS ) @@ -937,7 +938,7 @@ static int TLan_Open( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); int err; priv->tlanRev = TLan_DioRead8( dev->base_addr, TLAN_DEF_REVISION ); @@ -983,7 +984,7 @@ static int TLan_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); struct mii_ioctl_data *data = if_mii(rq); u32 phy = priv->phy[priv->phyNum]; @@ -1062,7 +1063,7 @@ static int TLan_StartTx( struct sk_buff *skb, struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); TLanList *tail_list; dma_addr_t tail_list_phys; u8 *tail_buffer; @@ -1170,7 +1171,7 @@ TLanPrivateInfo *priv; dev = dev_id; - priv = dev->priv; + priv = netdev_priv(dev); spin_lock(&priv->lock); @@ -1211,7 +1212,7 @@ static int TLan_Close(struct net_device *dev) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); netif_stop_queue(dev); priv->neg_be_verbose = 0; @@ -1251,7 +1252,7 @@ static struct net_device_stats *TLan_GetStats( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); int i; /* Should only read stats if open ? */ @@ -1270,7 +1271,7 @@ TLan_PrintList( priv->txList + i, "TX", i ); } - return ( &( (TLanPrivateInfo *) dev->priv )->stats ); + return ( &( (TLanPrivateInfo *) netdev_priv(dev) )->stats ); } /* TLan_GetStats */ @@ -1405,7 +1406,7 @@ u32 TLan_HandleTxEOF( struct net_device *dev, u16 host_int ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); int eoc = 0; TLanList *head_list; dma_addr_t head_list_phys; @@ -1527,7 +1528,7 @@ u32 TLan_HandleRxEOF( struct net_device *dev, u16 host_int ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u32 ack = 0; int eoc = 0; u8 *head_buffer; @@ -1694,7 +1695,7 @@ u32 TLan_HandleTxEOC( struct net_device *dev, u16 host_int ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); TLanList *head_list; dma_addr_t head_list_phys; u32 ack = 1; @@ -1742,7 +1743,7 @@ u32 TLan_HandleStatusCheck( struct net_device *dev, u16 host_int ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u32 ack; u32 error; u8 net_sts; @@ -1817,7 +1818,7 @@ u32 TLan_HandleRxEOC( struct net_device *dev, u16 host_int ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); dma_addr_t head_list_phys; u32 ack = 1; @@ -1878,7 +1879,7 @@ void TLan_Timer( unsigned long data ) { struct net_device *dev = (struct net_device *) data; - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u32 elapsed; unsigned long flags = 0; @@ -1958,7 +1959,7 @@ void TLan_ResetLists( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); int i; TLanList *list; dma_addr_t list_phys; @@ -2018,7 +2019,7 @@ void TLan_FreeLists( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); int i; TLanList *list; struct sk_buff *skb; @@ -2138,7 +2139,7 @@ void TLan_ReadAndClearStats( struct net_device *dev, int record ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u32 tx_good, tx_under; u32 rx_good, rx_over; u32 def_tx, crc, code; @@ -2214,7 +2215,7 @@ void TLan_ResetAdapter( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); int i; u32 addr; u32 data; @@ -2300,7 +2301,7 @@ void TLan_FinishReset( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u8 data; u32 phy; u8 sio; @@ -2464,7 +2465,7 @@ void TLan_PhyPrint( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u16 i, data0, data1, data2, data3, phy; phy = priv->phy[priv->phyNum]; @@ -2513,7 +2514,7 @@ void TLan_PhyDetect( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u16 control; u16 hi; u16 lo; @@ -2560,7 +2561,7 @@ void TLan_PhyPowerDown( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u16 value; TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Powering down PHY(s).\n", dev->name ); @@ -2585,7 +2586,7 @@ void TLan_PhyPowerUp( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u16 value; TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Powering up PHY.\n", dev->name ); @@ -2606,7 +2607,7 @@ void TLan_PhyReset( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u16 phy; u16 value; @@ -2634,7 +2635,7 @@ void TLan_PhyStartLink( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u16 ability; u16 control; u16 data; @@ -2721,7 +2722,7 @@ void TLan_PhyFinishAutoNeg( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u16 an_adv; u16 an_lpa; u16 data; @@ -2805,7 +2806,7 @@ void TLan_PhyMonitor( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u16 phy; u16 phy_status; @@ -2882,7 +2883,7 @@ u32 i; int err; int minten; - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); unsigned long flags = 0; err = FALSE; @@ -3051,7 +3052,7 @@ u16 sio; int minten; unsigned long flags = 0; - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); outw(TLAN_NET_SIO, dev->base_addr + TLAN_DIO_ADR); sio = dev->base_addr + TLAN_DIO_DATA + TLAN_NET_SIO; @@ -3278,7 +3279,7 @@ int TLan_EeReadByte( struct net_device *dev, u8 ee_addr, u8 *data ) { int err; - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); unsigned long flags = 0; int ret=0; From shemminger@osdl.org Mon Oct 18 15:34:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 15:35:40 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IMY3WE021580 for ; Mon, 18 Oct 2004 15:34:18 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IMXhWL009216 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 15:33:43 -0700 Date: Mon, 18 Oct 2004 14:07:16 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9 3/3] tlan: get rid of unneeded global Message-Id: <20041018140716.3555a203@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10416 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 Content-Length: 653 Lines: 21 More unnecessary globals. Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/tlan.c b/drivers/net/tlan.c --- a/drivers/net/tlan.c 2004-10-18 14:03:05 -07:00 +++ b/drivers/net/tlan.c 2004-10-18 14:03:05 -07:00 @@ -224,12 +224,12 @@ static int tlan_have_pci; static int tlan_have_eisa; -const char *media[] = { +static const char *media[] = { "10BaseT-HD ", "10BaseT-FD ","100baseTx-HD ", "100baseTx-FD", "100baseT4", NULL }; -int media_map[] = { 0x0020, 0x0040, 0x0080, 0x0100, 0x0200,}; +static int media_map[] = { 0x0020, 0x0040, 0x0080, 0x0100, 0x0200,}; static struct board { const char *deviceLabel; From shemminger@osdl.org Mon Oct 18 15:34:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 15:35:37 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IMXt5b021573 for ; Mon, 18 Oct 2004 15:34:15 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IMXZWL009195 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 15:33:35 -0700 Date: Mon, 18 Oct 2004 15:32:04 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9] xircom_tulip_cb: convert to using module_param Message-Id: <20041018153204.4d3cf14d@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10411 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 Content-Length: 1155 Lines: 36 Convert to use module_param Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/tulip/xircom_tulip_cb.c b/drivers/net/tulip/xircom_tulip_cb.c --- a/drivers/net/tulip/xircom_tulip_cb.c 2004-10-18 15:27:10 -07:00 +++ b/drivers/net/tulip/xircom_tulip_cb.c 2004-10-18 15:27:10 -07:00 @@ -93,6 +93,7 @@ #include #include +#include #include #include #include @@ -117,12 +118,14 @@ MODULE_DESCRIPTION("Xircom CBE-100 ethernet driver"); MODULE_LICENSE("GPL v2"); -MODULE_PARM(debug, "i"); -MODULE_PARM(max_interrupt_work, "i"); -MODULE_PARM(rx_copybreak, "i"); -MODULE_PARM(csr0, "i"); -MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i"); -MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i"); +module_param(debug, int, 0); +module_param(max_interrupt_work, int, 0); +module_param(rx_copybreak, int, 0); +module_param(csr0, int, 0); + +static int num_units; +module_param_array(options, num_units, int, 0); +module_param_array(full_duplex, num_units, int, 0); #define RUN_AT(x) (jiffies + (x)) From shemminger@osdl.org Mon Oct 18 15:34:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 15:35:50 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IMY0Lq021578 for ; Mon, 18 Oct 2004 15:34:16 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IMXdWL009208 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 15:33:40 -0700 Date: Mon, 18 Oct 2004 15:34:11 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9] tulip/winbond-840: convert to module_param and get rid of warnings Message-Id: <20041018153411.15f7568e@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i9IMY0Lq021578 X-archive-position: 10426 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 Content-Length: 13224 Lines: 437 Convert to module_param and get rid of __iomem warnings. To handle the __iomem, adds a inline dev_ioaddr(dev) Signed-off-by: Stephen Hemmminger diff -Nru a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c --- a/drivers/net/tulip/winbond-840.c 2004-10-18 15:28:04 -07:00 +++ b/drivers/net/tulip/winbond-840.c 2004-10-18 15:28:04 -07:00 @@ -113,6 +113,7 @@ /* Include files, designed to support most kernel versions 2.0.0 and later. */ #include +#include #include #include #include @@ -145,12 +146,15 @@ MODULE_DESCRIPTION("Winbond W89c840 Ethernet driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(max_interrupt_work, "i"); -MODULE_PARM(debug, "i"); -MODULE_PARM(rx_copybreak, "i"); -MODULE_PARM(multicast_filter_limit, "i"); -MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i"); -MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i"); +module_param(max_interrupt_work, int, 0); +module_param(debug, int, 0); +module_param(rx_copybreak, int, 0); +module_param(multicast_filter_limit, int, 0); + +static int num_params; +module_param_array(options, int, num_params, 0); +module_param_array(full_duplex, int, num_params, 0); + MODULE_PARM_DESC(max_interrupt_work, "winbond-840 maximum events handled per interrupt"); MODULE_PARM_DESC(debug, "winbond-840 debug level (0-6)"); MODULE_PARM_DESC(rx_copybreak, "winbond-840 copy breakpoint for copy-only-tiny-frames"); @@ -363,7 +367,7 @@ struct mii_if_info mii_if; }; -static int eeprom_read(long ioaddr, int location); +static int eeprom_read(void __iomem *ioaddr, int location); static int mdio_read(struct net_device *dev, int phy_id, int location); static void mdio_write(struct net_device *dev, int phy_id, int location, int value); static int netdev_open(struct net_device *dev); @@ -397,7 +401,7 @@ int chip_idx = ent->driver_data; int irq; int i, option = find_cnt < MAX_UNITS ? options[find_cnt] : 0; - long ioaddr; + void __iomem *ioaddr; i = pci_enable_device(pdev); if (i) return i; @@ -421,10 +425,10 @@ goto err_out_netdev; #ifdef USE_IO_OPS - ioaddr = pci_resource_start(pdev, 0); + ioaddr = (void __iomem *) pci_resource_start(pdev, 0); #else - ioaddr = pci_resource_start(pdev, 1); - ioaddr = (long) ioremap (ioaddr, pci_id_tbl[chip_idx].io_size); + ioaddr = ioremap (pci_resource_start(pdev, 1), + pci_id_tbl[chip_idx].io_size); if (!ioaddr) goto err_out_free_res; #endif @@ -436,10 +440,10 @@ No hold time required! */ writel(0x00000001, ioaddr + PCIBusCfg); - dev->base_addr = ioaddr; + dev->base_addr = (unsigned long) ioaddr; dev->irq = irq; - np = dev->priv; + np = netdev_priv(dev); np->pci_dev = pdev; np->chip_id = chip_idx; np->drv_flags = pci_id_tbl[chip_idx].drv_flags; @@ -482,7 +486,7 @@ if (i) goto err_out_cleardev; - printk(KERN_INFO "%s: %s at 0x%lx, ", + printk(KERN_INFO "%s: %s at 0x%p, ", dev->name, pci_id_tbl[chip_idx].name, ioaddr); for (i = 0; i < 5; i++) printk("%2.2x:", dev->dev_addr[i]); @@ -549,11 +553,11 @@ EE_WriteCmd=(5 << 6), EE_ReadCmd=(6 << 6), EE_EraseCmd=(7 << 6), }; -static int eeprom_read(long addr, int location) +static int eeprom_read(void __iomem *addr, int location) { int i; int retval = 0; - long ee_addr = addr + EECtrl; + void __iomem *ee_addr = addr + EECtrl; int read_cmd = location | EE_ReadCmd; writel(EE_ChipSelect, ee_addr); @@ -600,7 +604,7 @@ /* Generate the preamble required for initial synchronization and a few older transceivers. */ -static void mdio_sync(long mdio_addr) +static void mdio_sync(void __iomem *mdio_addr) { int bits = 32; @@ -613,9 +617,14 @@ } } +static inline void __iomem *dev_ioaddr(struct net_device *dev) +{ + return (void __iomem *) dev->base_addr; +} + static int mdio_read(struct net_device *dev, int phy_id, int location) { - long mdio_addr = dev->base_addr + MIICtrl; + void __iomem * mdio_addr = dev_ioaddr(dev) + MIICtrl; int mii_cmd = (0xf6 << 10) | (phy_id << 5) | location; int i, retval = 0; @@ -644,8 +653,8 @@ static void mdio_write(struct net_device *dev, int phy_id, int location, int value) { - struct netdev_private *np = dev->priv; - long mdio_addr = dev->base_addr + MIICtrl; + struct netdev_private *np = netdev_priv(dev); + void __iomem *mdio_addr = dev_ioaddr(dev) + MIICtrl; int mii_cmd = (0x5002 << 16) | (phy_id << 23) | (location<<18) | value; int i; @@ -677,8 +686,8 @@ static int netdev_open(struct net_device *dev) { - struct netdev_private *np = dev->priv; - long ioaddr = dev->base_addr; + struct netdev_private *np = netdev_priv(dev); + void __iomem *ioaddr = dev_ioaddr(dev); int i; writel(0x00000001, ioaddr + PCIBusCfg); /* Reset */ @@ -720,7 +729,7 @@ static int update_link(struct net_device *dev) { - struct netdev_private *np = dev->priv; + struct netdev_private *np = netdev_priv(dev); int duplex, fasteth, result, mii_reg; /* BSMR */ @@ -783,8 +792,8 @@ #define RXTX_TIMEOUT 2000 static inline void update_csr6(struct net_device *dev, int new) { - struct netdev_private *np = dev->priv; - long ioaddr = dev->base_addr; + struct netdev_private *np = netdev_priv(dev); + void __iomem *ioaddr = dev_ioaddr(dev); int limit = RXTX_TIMEOUT; if (!netif_device_present(dev)) @@ -824,8 +833,8 @@ static void netdev_timer(unsigned long data) { struct net_device *dev = (struct net_device *)data; - struct netdev_private *np = dev->priv; - long ioaddr = dev->base_addr; + struct netdev_private *np = netdev_priv(dev); + void __iomem *ioaddr = dev_ioaddr(dev); if (debug > 2) printk(KERN_DEBUG "%s: Media selection timer tick, status %8.8x " @@ -841,7 +850,7 @@ static void init_rxtx_rings(struct net_device *dev) { - struct netdev_private *np = dev->priv; + struct netdev_private *np = netdev_priv(dev); int i; np->rx_head_desc = &np->rx_ring[0]; @@ -881,10 +890,9 @@ np->tx_full = 0; np->tx_q_bytes = np->dirty_tx = np->cur_tx = 0; - writel(np->ring_dma_addr, dev->base_addr + RxRingPtr); + writel(np->ring_dma_addr, dev_ioaddr(dev) + RxRingPtr); writel(np->ring_dma_addr+sizeof(struct w840_rx_desc)*RX_RING_SIZE, - dev->base_addr + TxRingPtr); - + dev_ioaddr(dev) + TxRingPtr); } static void free_rxtx_rings(struct netdev_private* np) @@ -916,8 +924,8 @@ static void init_registers(struct net_device *dev) { - struct netdev_private *np = dev->priv; - long ioaddr = dev->base_addr; + struct netdev_private *np = netdev_priv(dev); + void __iomem *ioaddr = dev_ioaddr(dev); int i; for (i = 0; i < 6; i++) @@ -974,8 +982,8 @@ static void tx_timeout(struct net_device *dev) { - struct netdev_private *np = dev->priv; - long ioaddr = dev->base_addr; + struct netdev_private *np = netdev_priv(dev); + void __iomem *ioaddr = dev_ioaddr(dev); printk(KERN_WARNING "%s: Transmit timed out, status %8.8x," " resetting...\n", dev->name, (int)readl(ioaddr + IntrStatus)); @@ -1002,7 +1010,7 @@ * everything. */ - writel(1, dev->base_addr+PCIBusCfg); + writel(1, dev_ioaddr(dev) + PCIBusCfg); udelay(1); free_rxtx_rings(np); @@ -1020,7 +1028,7 @@ /* Initialize the Rx and Tx rings, along with various 'dev' bits. */ static int alloc_ringdesc(struct net_device *dev) { - struct netdev_private *np = dev->priv; + struct netdev_private *np = netdev_priv(dev); np->rx_buf_sz = (dev->mtu <= 1500 ? PKT_BUF_SZ : dev->mtu + 32); @@ -1045,7 +1053,7 @@ static int start_tx(struct sk_buff *skb, struct net_device *dev) { - struct netdev_private *np = dev->priv; + struct netdev_private *np = netdev_priv(dev); unsigned entry; /* Caution: the write order is important here, set the field @@ -1086,7 +1094,7 @@ wmb(); /* flush length, buffer1, buffer2 */ np->tx_ring[entry].status = DescOwn; wmb(); /* flush status and kick the hardware */ - writel(0, dev->base_addr + TxStartDemand); + writel(0, dev_ioaddr(dev) + TxStartDemand); np->tx_q_bytes += skb->len; /* Work around horrible bug in the chip by marking the queue as full when we do not have FIFO room for a maximum sized packet. */ @@ -1109,7 +1117,7 @@ static void netdev_tx_done(struct net_device *dev) { - struct netdev_private *np = dev->priv; + struct netdev_private *np = netdev_priv(dev); for (; np->cur_tx - np->dirty_tx > 0; np->dirty_tx++) { int entry = np->dirty_tx % TX_RING_SIZE; int tx_status = np->tx_ring[entry].status; @@ -1162,8 +1170,8 @@ static irqreturn_t intr_handler(int irq, void *dev_instance, struct pt_regs *rgs) { struct net_device *dev = (struct net_device *)dev_instance; - struct netdev_private *np = dev->priv; - long ioaddr = dev->base_addr; + struct netdev_private *np = netdev_priv(dev); + void __iomem *ioaddr = dev_ioaddr(dev); int work_limit = max_interrupt_work; int handled = 0; @@ -1226,7 +1234,7 @@ for clarity and better register allocation. */ static int netdev_rx(struct net_device *dev) { - struct netdev_private *np = dev->priv; + struct netdev_private *np = netdev_priv(dev); int entry = np->cur_rx % RX_RING_SIZE; int work_limit = np->dirty_rx + RX_RING_SIZE - np->cur_rx; @@ -1342,8 +1350,8 @@ static void netdev_error(struct net_device *dev, int intr_status) { - long ioaddr = dev->base_addr; - struct netdev_private *np = dev->priv; + void __iomem *ioaddr = dev_ioaddr(dev); + struct netdev_private *np = netdev_priv(dev); if (debug > 2) printk(KERN_DEBUG "%s: Abnormal event, %8.8x.\n", @@ -1386,8 +1394,8 @@ static struct net_device_stats *get_stats(struct net_device *dev) { - long ioaddr = dev->base_addr; - struct netdev_private *np = dev->priv; + void __iomem *ioaddr = dev_ioaddr(dev); + struct netdev_private *np = netdev_priv(dev); /* The chip only need report frame silently dropped. */ spin_lock_irq(&np->lock); @@ -1401,7 +1409,7 @@ static u32 __set_rx_mode(struct net_device *dev) { - long ioaddr = dev->base_addr; + void __iomem *ioaddr = dev_ioaddr(dev); u32 mc_filter[2]; /* Multicast hash filter */ u32 rx_mode; @@ -1435,7 +1443,7 @@ static void set_rx_mode(struct net_device *dev) { - struct netdev_private *np = dev->priv; + struct netdev_private *np = netdev_priv(dev); u32 rx_mode = __set_rx_mode(dev); spin_lock_irq(&np->lock); update_csr6(dev, (np->csr6 & ~0x00F8) | rx_mode); @@ -1444,7 +1452,7 @@ static void netdev_get_drvinfo (struct net_device *dev, struct ethtool_drvinfo *info) { - struct netdev_private *np = dev->priv; + struct netdev_private *np = netdev_priv(dev); strcpy (info->driver, DRV_NAME); strcpy (info->version, DRV_VERSION); @@ -1453,7 +1461,7 @@ static int netdev_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) { - struct netdev_private *np = dev->priv; + struct netdev_private *np = netdev_priv(dev); int rc; spin_lock_irq(&np->lock); @@ -1465,7 +1473,7 @@ static int netdev_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) { - struct netdev_private *np = dev->priv; + struct netdev_private *np = netdev_priv(dev); int rc; spin_lock_irq(&np->lock); @@ -1477,13 +1485,13 @@ static int netdev_nway_reset(struct net_device *dev) { - struct netdev_private *np = dev->priv; + struct netdev_private *np = netdev_priv(dev); return mii_nway_restart(&np->mii_if); } static u32 netdev_get_link(struct net_device *dev) { - struct netdev_private *np = dev->priv; + struct netdev_private *np = netdev_priv(dev); return mii_link_ok(&np->mii_if); } @@ -1516,7 +1524,7 @@ switch(cmd) { case SIOCGMIIPHY: /* Get address of MII PHY in use. */ - data->phy_id = ((struct netdev_private *)dev->priv)->phys[0] & 0x1f; + data->phy_id = ((struct netdev_private *)netdev_priv(dev))->phys[0] & 0x1f; /* Fall Through */ case SIOCGMIIREG: /* Read MII PHY register. */ @@ -1539,8 +1547,8 @@ static int netdev_close(struct net_device *dev) { - long ioaddr = dev->base_addr; - struct netdev_private *np = dev->priv; + void __iomem *ioaddr = dev_ioaddr(dev); + struct netdev_private *np = netdev_priv(dev); netif_stop_queue(dev); @@ -1602,7 +1610,7 @@ unregister_netdev(dev); pci_release_regions(pdev); #ifndef USE_IO_OPS - iounmap((char *)(dev->base_addr)); + iounmap(dev_ioaddr(dev)); #endif free_netdev(dev); } @@ -1638,8 +1646,8 @@ static int w840_suspend (struct pci_dev *pdev, u32 state) { struct net_device *dev = pci_get_drvdata (pdev); - struct netdev_private *np = dev->priv; - long ioaddr = dev->base_addr; + struct netdev_private *np = netdev_priv(dev); + void __iomem *ioaddr = dev_ioaddr(dev); rtnl_lock(); if (netif_running (dev)) { @@ -1675,7 +1683,7 @@ static int w840_resume (struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata (pdev); - struct netdev_private *np = dev->priv; + struct netdev_private *np = netdev_priv(dev); rtnl_lock(); if (netif_device_present(dev)) @@ -1685,8 +1693,8 @@ /* pci_power_on(pdev); */ spin_lock_irq(&np->lock); - writel(1, dev->base_addr+PCIBusCfg); - readl(dev->base_addr+PCIBusCfg); + writel(1, dev_ioaddr(dev) + PCIBusCfg); + readl(dev_ioaddr(dev) + PCIBusCfg); udelay(1); netif_device_attach(dev); init_rxtx_rings(dev); From shemminger@osdl.org Mon Oct 18 15:34:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 15:35:49 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IMYBJ2021587 for ; Mon, 18 Oct 2004 15:34:17 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IMXpWL009254 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 15:33:52 -0700 Date: Mon, 18 Oct 2004 15:18:45 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9 1/5] skge: network drivers must not do ref counting. Message-Id: <20041018151845.7012a202@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10423 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 Content-Length: 2974 Lines: 94 Skge driver is trying to do old style module reference counting on 2.6. This is a *bug* and is wrong. All network drivers need to be unloadable. Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c --- a/drivers/net/sk98lin/skge.c 2004-10-18 15:09:05 -07:00 +++ b/drivers/net/sk98lin/skge.c 2004-10-18 15:09:05 -07:00 @@ -1166,10 +1166,6 @@ } #endif - if (!try_module_get(THIS_MODULE)) { - return (-1); /* increase of usage count not possible */ - } - /* Set blink mode */ if ((pAC->PciDev->vendor == 0x1186) || (pAC->PciDev->vendor == 0x11ab )) pAC->GIni.GILedBlinkCtrl = OEM_CONFIG_VALUE; @@ -1177,7 +1173,6 @@ if (pAC->BoardLevel == SK_INIT_DATA) { /* level 1 init common modules here */ if (SkGeInit(pAC, pAC->IoBase, SK_INIT_IO) != 0) { - module_put(THIS_MODULE); /* decrease usage count */ printk("%s: HWInit (1) failed.\n", pAC->dev[pNet->PortNr]->name); return (-1); } @@ -1193,7 +1188,6 @@ if (pAC->BoardLevel != SK_INIT_RUN) { /* tschilling: Level 2 init modules here, check return value. */ if (SkGeInit(pAC, pAC->IoBase, SK_INIT_RUN) != 0) { - module_put(THIS_MODULE); /* decrease usage count */ printk("%s: HWInit (2) failed.\n", pAC->dev[pNet->PortNr]->name); return (-1); } @@ -1285,7 +1279,6 @@ #ifdef SK_DIAG_SUPPORT if (pAC->DiagModeActive == DIAG_ACTIVE) { if (pAC->DiagFlowCtrl == SK_FALSE) { - module_put(THIS_MODULE); /* ** notify that the interface which has been closed ** by operator interaction must not be started up @@ -1376,7 +1369,6 @@ pAC->MaxPorts--; pNet->Up = 0; - module_put(THIS_MODULE); return (0); } /* SkGeClose */ @@ -4681,20 +4673,11 @@ dev = pAC->dev[devNbr]; - /* - ** Function SkGeClose() uses MOD_DEC_USE_COUNT (2.2/2.4) - ** or module_put() (2.6) to decrease the number of users for - ** a device, but if a device is to be put under control of - ** the DIAG, that count is OK already and does not need to - ** be adapted! Hence the opposite MOD_INC_USE_COUNT or - ** try_module_get() needs to be used again to correct that. + /* On Linux 2.6 the network driver does NOT mess with reference + ** counts. The driver MUST be able to be unloaded at any time + ** due to the possibility of hotplug. */ - if (!try_module_get(THIS_MODULE)) { - return (-1); - } - if (SkGeClose(dev) != 0) { - module_put(THIS_MODULE); return (-1); } return (0); @@ -4723,17 +4706,6 @@ if (SkGeOpen(dev) != 0) { return (-1); - } else { - /* - ** Function SkGeOpen() uses MOD_INC_USE_COUNT (2.2/2.4) - ** or try_module_get() (2.6) to increase the number of - ** users for a device, but if a device was just under - ** control of the DIAG, that count is OK already and - ** does not need to be adapted! Hence the opposite - ** MOD_DEC_USE_COUNT or module_put() needs to be used - ** again to correct that. - */ - module_put(THIS_MODULE); } /* From shemminger@osdl.org Mon Oct 18 15:34:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 15:35:38 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IMY2p0021579 for ; Mon, 18 Oct 2004 15:34:17 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IMXfWL009212 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 15:33:42 -0700 Date: Mon, 18 Oct 2004 13:05:49 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9] 3c505: use module_param and netdev_priv Message-Id: <20041018130549.2cbe9bb8@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10415 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 Content-Length: 6109 Lines: 224 Convert 3c505 to use netdev_priv and module_param Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/3c505.c b/drivers/net/3c505.c --- a/drivers/net/3c505.c 2004-10-18 12:58:31 -07:00 +++ b/drivers/net/3c505.c 2004-10-18 12:58:31 -07:00 @@ -97,6 +97,7 @@ */ #include +#include #include #include #include @@ -217,11 +218,12 @@ static inline void outb_control(unsigned char val, struct net_device *dev) { + elp_device *adapter = netdev_priv(dev); outb(val, dev->base_addr + PORT_CONTROL); - ((elp_device *)(dev->priv))->hcr_val = val; + adapter->hcr_val = val; } -#define HCR_VAL(x) (((elp_device *)((x)->priv))->hcr_val) +#define HCR_VAL(x) (((elp_device *)netdev_priv(x))->hcr_val) static inline void outb_command(unsigned char val, unsigned int base_addr) { @@ -272,7 +274,7 @@ static inline void set_hsf(struct net_device *dev, int hsf) { - elp_device *adapter = dev->priv; + elp_device *adapter = netdev_priv(dev); unsigned long flags; spin_lock_irqsave(&adapter->lock, flags); @@ -285,7 +287,7 @@ inline static void adapter_reset(struct net_device *dev) { unsigned long timeout; - elp_device *adapter = dev->priv; + elp_device *adapter = netdev_priv(dev); unsigned char orig_hcr = adapter->hcr_val; outb_control(0, dev); @@ -318,7 +320,7 @@ */ static inline void check_3c505_dma(struct net_device *dev) { - elp_device *adapter = dev->priv; + elp_device *adapter = netdev_priv(dev); if (adapter->dmaing && time_after(jiffies, adapter->current_dma.start_time + 10)) { unsigned long flags, f; printk(KERN_ERR "%s: DMA %s timed out, %d bytes left\n", dev->name, adapter->current_dma.direction ? "download" : "upload", get_dma_residue(dev->dma)); @@ -365,7 +367,7 @@ /* Check to see if the receiver needs restarting, and kick it if so */ static inline void prime_rx(struct net_device *dev) { - elp_device *adapter = dev->priv; + elp_device *adapter = netdev_priv(dev); while (adapter->rx_active < ELP_RX_PCBS && netif_running(dev)) { if (!start_receive(dev, &adapter->itx_pcb)) break; @@ -400,7 +402,7 @@ { int i; unsigned long timeout; - elp_device *adapter = dev->priv; + elp_device *adapter = netdev_priv(dev); unsigned long flags; check_3c505_dma(dev); @@ -488,7 +490,7 @@ unsigned long timeout; unsigned long flags; - elp_device *adapter = dev->priv; + elp_device *adapter = netdev_priv(dev); set_hsf(dev, 0); @@ -568,7 +570,7 @@ static int start_receive(struct net_device *dev, pcb_struct * tx_pcb) { int status; - elp_device *adapter = dev->priv; + elp_device *adapter = netdev_priv(dev); if (elp_debug >= 3) printk(KERN_DEBUG "%s: restarting receiver\n", dev->name); @@ -596,7 +598,7 @@ static void receive_packet(struct net_device *dev, int len) { int rlen; - elp_device *adapter = dev->priv; + elp_device *adapter = netdev_priv(dev); void *target; struct sk_buff *skb; unsigned long flags; @@ -669,7 +671,7 @@ unsigned long timeout; dev = dev_id; - adapter = (elp_device *) dev->priv; + adapter = netdev_priv(dev); spin_lock(&adapter->lock); @@ -867,7 +869,7 @@ elp_device *adapter; int retval; - adapter = dev->priv; + adapter = netdev_priv(dev); if (elp_debug >= 3) printk(KERN_DEBUG "%s: request to open device\n", dev->name); @@ -997,7 +999,7 @@ static int send_packet(struct net_device *dev, struct sk_buff *skb) { - elp_device *adapter = dev->priv; + elp_device *adapter = netdev_priv(dev); unsigned long target; unsigned long flags; @@ -1067,7 +1069,7 @@ static void elp_timeout(struct net_device *dev) { - elp_device *adapter = dev->priv; + elp_device *adapter = netdev_priv(dev); int stat; stat = inb_status(dev->base_addr); @@ -1089,7 +1091,7 @@ static int elp_start_xmit(struct sk_buff *skb, struct net_device *dev) { unsigned long flags; - elp_device *adapter = dev->priv; + elp_device *adapter = netdev_priv(dev); spin_lock_irqsave(&adapter->lock, flags); check_3c505_dma(dev); @@ -1131,7 +1133,7 @@ static struct net_device_stats *elp_get_stats(struct net_device *dev) { - elp_device *adapter = (elp_device *) dev->priv; + elp_device *adapter = netdev_priv(dev); if (elp_debug >= 3) printk(KERN_DEBUG "%s: request for stats\n", dev->name); @@ -1195,7 +1197,7 @@ { elp_device *adapter; - adapter = dev->priv; + adapter = netdev_priv(dev); if (elp_debug >= 3) printk(KERN_DEBUG "%s: request to close device\n", dev->name); @@ -1236,7 +1238,7 @@ static void elp_set_mc_list(struct net_device *dev) { - elp_device *adapter = (elp_device *) dev->priv; + elp_device *adapter = netdev_priv(dev); struct dev_mc_list *dmi = dev->mc_list; int i; unsigned long flags; @@ -1409,7 +1411,7 @@ static int __init elplus_setup(struct net_device *dev) { - elp_device *adapter = dev->priv; + elp_device *adapter = netdev_priv(dev); int i, tries, tries1, okay; unsigned long timeout; unsigned long cookie = 0; @@ -1638,14 +1640,17 @@ static int io[ELP_MAX_CARDS]; static int irq[ELP_MAX_CARDS]; static int dma[ELP_MAX_CARDS]; -MODULE_PARM(io, "1-" __MODULE_STRING(ELP_MAX_CARDS) "i"); -MODULE_PARM(irq, "1-" __MODULE_STRING(ELP_MAX_CARDS) "i"); -MODULE_PARM(dma, "1-" __MODULE_STRING(ELP_MAX_CARDS) "i"); + +static int num_params; +module_param_array(io, int, num_params, 0); +module_param_array(irq, int, num_params, 0); +module_param_array(dma, int, num_params, 0); + MODULE_PARM_DESC(io, "EtherLink Plus I/O base address(es)"); MODULE_PARM_DESC(irq, "EtherLink Plus IRQ number(s) (assigned)"); MODULE_PARM_DESC(dma, "EtherLink Plus DMA channel(s)"); -int init_module(void) +static __init int elplus_init_module(void) { int this_dev, found = 0; @@ -1681,8 +1686,9 @@ return -ENODEV; return 0; } +module_init(elplus_init_module); -void cleanup_module(void) +static __exit void elplus_cleanup_module(void) { int this_dev; @@ -1695,6 +1701,7 @@ } } } +module_exit(elplus_cleanup_module); #endif /* MODULE */ MODULE_LICENSE("GPL"); From shemminger@osdl.org Mon Oct 18 15:34:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 15:35:38 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IMY9RU021585 for ; Mon, 18 Oct 2004 15:34:14 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IMXnWL009246 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 15:33:49 -0700 Date: Mon, 18 Oct 2004 14:51:10 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9] 3c515: use module_param and netdev_priv Message-Id: <20041018145110.1557c2a2@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i9IMY9RU021585 X-archive-position: 10413 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 Content-Length: 6309 Lines: 203 convert corkscrew to use module_param and netdev_priv Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/3c515.c b/drivers/net/3c515.c --- a/drivers/net/3c515.c 2004-10-18 14:49:08 -07:00 +++ b/drivers/net/3c515.c 2004-10-18 14:49:08 -07:00 @@ -34,7 +34,7 @@ /* "Knobs" that adjust features and parameters. */ /* Set the copy breakpoint for the copy-only-tiny-frames scheme. Setting to > 1512 effectively disables this feature. */ -static const int rx_copybreak = 200; +static int rx_copybreak = 200; /* Allow setting MTU to a larger size, bypassing the normal ethernet setup. */ static const int mtu = 1500; @@ -59,6 +59,7 @@ #include #include +#include #include #include #include @@ -87,15 +88,6 @@ MODULE_DESCRIPTION("3Com 3c515 Corkscrew driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(debug, "i"); -MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i"); -MODULE_PARM(rx_copybreak, "i"); -MODULE_PARM(max_interrupt_work, "i"); -MODULE_PARM_DESC(debug, "3c515 debug level (0-6)"); -MODULE_PARM_DESC(options, "3c515: Bits 0-2: media type, bit 3: full duplex, bit 4: bus mastering"); -MODULE_PARM_DESC(rx_copybreak, "3c515 copy breakpoint for copy-only-tiny-frames"); -MODULE_PARM_DESC(max_interrupt_work, "3c515 maximum events handled per interrupt"); - /* "Knobs" for adjusting internal parameters. */ /* Put out somewhat more debugging messages. (0 - no msg, 1 minimal msgs). */ #define DRIVER_DEBUG 1 @@ -409,11 +401,22 @@ #ifdef MODULE static int debug = -1; + +static int num_param; +module_param(debug, int, 0); +module_param_array(options, int, num_param, 0); +module_param(rx_copybreak, int, 0); +module_param(max_interrupt_work, int, 0); +MODULE_PARM_DESC(debug, "3c515 debug level (0-6)"); +MODULE_PARM_DESC(options, "3c515: Bits 0-2: media type, bit 3: full duplex, bit 4: bus mastering"); +MODULE_PARM_DESC(rx_copybreak, "3c515 copy breakpoint for copy-only-tiny-frames"); +MODULE_PARM_DESC(max_interrupt_work, "3c515 maximum events handled per interrupt"); + /* A list of all installed Vortex devices, for removing the driver module. */ /* we will need locking (and refcounting) if we ever use it for more */ static LIST_HEAD(root_corkscrew_dev); -int init_module(void) +static int __init corkscrew_init_module(void) { int found = 0; if (debug >= 0) @@ -424,6 +427,7 @@ found++; return found ? 0 : -ENODEV; } +module_init(corkscrew_init_module); #else struct net_device *tc515_probe(int unit) @@ -471,7 +475,7 @@ static void cleanup_card(struct net_device *dev) { - struct corkscrew_private *vp = (struct corkscrew_private *) dev->priv; + struct corkscrew_private *vp = netdev_priv(dev); list_del_init(&vp->list); if (dev->dma) free_dma(dev->dma); @@ -569,7 +573,7 @@ static void corkscrew_setup(struct net_device *dev, int ioaddr, struct pnp_dev *idev, int card_number) { - struct corkscrew_private *vp = (struct corkscrew_private *) dev->priv; + struct corkscrew_private *vp = netdev_priv(dev); unsigned int eeprom[0x40], checksum = 0; /* EEPROM contents */ int i; int irq; @@ -695,8 +699,7 @@ static int corkscrew_open(struct net_device *dev) { int ioaddr = dev->base_addr; - struct corkscrew_private *vp = - (struct corkscrew_private *) dev->priv; + struct corkscrew_private *vp = netdev_priv(dev); union wn3_config config; int i; @@ -861,7 +864,7 @@ { #ifdef AUTOMEDIA struct net_device *dev = (struct net_device *) data; - struct corkscrew_private *vp = (struct corkscrew_private *) dev->priv; + struct corkscrew_private *vp = netdev_priv(dev); int ioaddr = dev->base_addr; unsigned long flags; int ok = 0; @@ -953,8 +956,7 @@ static void corkscrew_timeout(struct net_device *dev) { int i; - struct corkscrew_private *vp = - (struct corkscrew_private *) dev->priv; + struct corkscrew_private *vp = netdev_priv(dev); int ioaddr = dev->base_addr; printk(KERN_WARNING @@ -993,8 +995,7 @@ static int corkscrew_start_xmit(struct sk_buff *skb, struct net_device *dev) { - struct corkscrew_private *vp = - (struct corkscrew_private *) dev->priv; + struct corkscrew_private *vp = netdev_priv(dev); int ioaddr = dev->base_addr; /* Block a timer-based transmit from overlapping. */ @@ -1129,7 +1130,7 @@ ioaddr = dev->base_addr; latency = inb(ioaddr + Timer); - lp = (struct corkscrew_private *) dev->priv; + lp = netdev_priv(dev); spin_lock(&lp->lock); @@ -1261,7 +1262,7 @@ static int corkscrew_rx(struct net_device *dev) { - struct corkscrew_private *vp = (struct corkscrew_private *) dev->priv; + struct corkscrew_private *vp = netdev_priv(dev); int ioaddr = dev->base_addr; int i; short rx_status; @@ -1328,8 +1329,7 @@ static int boomerang_rx(struct net_device *dev) { - struct corkscrew_private *vp = - (struct corkscrew_private *) dev->priv; + struct corkscrew_private *vp = netdev_priv(dev); int entry = vp->cur_rx % RX_RING_SIZE; int ioaddr = dev->base_addr; int rx_status; @@ -1419,8 +1419,7 @@ static int corkscrew_close(struct net_device *dev) { - struct corkscrew_private *vp = - (struct corkscrew_private *) dev->priv; + struct corkscrew_private *vp = netdev_priv(dev); int ioaddr = dev->base_addr; int i; @@ -1475,7 +1474,7 @@ static struct net_device_stats *corkscrew_get_stats(struct net_device *dev) { - struct corkscrew_private *vp = (struct corkscrew_private *) dev->priv; + struct corkscrew_private *vp = netdev_priv(dev); unsigned long flags; if (netif_running(dev)) { @@ -1495,8 +1494,7 @@ */ static void update_stats(int ioaddr, struct net_device *dev) { - struct corkscrew_private *vp = - (struct corkscrew_private *) dev->priv; + struct corkscrew_private *vp = netdev_priv(dev); /* Unlike the 3c5x9 we need not turn off stats updates while reading. */ /* Switch to the stats window, and read everything. */ @@ -1574,7 +1572,7 @@ #ifdef MODULE -void cleanup_module(void) +static void __exit corkscrew_cleanup_module(void) { while (!list_empty(&root_corkscrew_dev)) { struct net_device *dev; @@ -1588,6 +1586,7 @@ free_netdev(dev); } } +module_exit(corkscrew_cleanup_module); #endif /* MODULE */ /* From shemminger@osdl.org Mon Oct 18 15:34:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 15:35:38 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IMY42k021581 for ; Mon, 18 Oct 2004 15:34:14 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IMXiWL009220 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 15:33:44 -0700 Date: Mon, 18 Oct 2004 13:07:23 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9] 3c507: convert to use module_param Message-Id: <20041018130723.1e63a9c9@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10414 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 Content-Length: 1124 Lines: 43 Convert to use module_param and module_init Signed-off-by: Stephen Hemminger diff -Nru ua/drivers/net/3c507.c b/drivers/net/3c507.c --- a/drivers/net/3c507.c 2004-10-18 12:59:50 -07:00 +++ b/drivers/net/3c507.c 2004-10-18 12:59:50 -07:00 @@ -916,21 +916,21 @@ #ifdef MODULE static struct net_device *dev_3c507; -MODULE_PARM(io, "i"); -MODULE_PARM(irq, "i"); +module_param(io, int, 0); +module_param(irq, int, 0); MODULE_PARM_DESC(io, "EtherLink16 I/O base address"); MODULE_PARM_DESC(irq, "(ignored)"); -int init_module(void) +static int __init el16_init_module(void) { if (io == 0) printk("3c507: You should not use auto-probing with insmod!\n"); dev_3c507 = el16_probe(-1); return IS_ERR(dev_3c507) ? PTR_ERR(dev_3c507) : 0; } +module_init(el16_init_module); -void -cleanup_module(void) +static void __exit el16_cleanup_module(void) { struct net_device *dev = dev_3c507; unregister_netdev(dev); @@ -938,6 +938,8 @@ release_region(dev->base_addr, EL16_IO_EXTENT); free_netdev(dev); } +module_exit(el16_cleanup_module); + #endif /* MODULE */ MODULE_LICENSE("GPL"); From shemminger@osdl.org Mon Oct 18 15:34:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 15:35:44 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IMYGR9021593 for ; Mon, 18 Oct 2004 15:34:16 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IMXtWL009270 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 15:33:55 -0700 Date: Mon, 18 Oct 2004 15:23:08 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9 3/5] skge: proc code cleanup Message-Id: <20041018152308.4415a461@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10419 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 Content-Length: 10459 Lines: 304 Partial cleanup of skge proc code. * Use SK_ prefix for sk_proc_fops for naming consistency * Add printf attribute to sk_proc_print to force format checks * global "len" was set but never used. * return from sk_proc_print was then always ignored. Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c --- a/drivers/net/sk98lin/skge.c 2004-10-18 15:08:29 -07:00 +++ b/drivers/net/sk98lin/skge.c 2004-10-18 15:08:29 -07:00 @@ -237,7 +237,7 @@ #ifdef CONFIG_PROC_FS static const char SK_Root_Dir_entry[] = "sk98lin"; static struct proc_dir_entry *pSkRootDir; -extern struct file_operations sk_proc_fops; +extern struct file_operations SK_proc_fops; #endif extern void SkDimEnableModerationIfNeeded(SK_AC *pAC); @@ -4977,7 +4977,7 @@ #ifdef CONFIG_PROC_FS pProcFile = create_proc_entry(dev->name, S_IRUGO, pSkRootDir); if (pProcFile) { - pProcFile->proc_fops = &sk_proc_fops; + pProcFile->proc_fops = &SK_proc_fops; pProcFile->data = dev; pProcFile->owner = THIS_MODULE; } @@ -5032,7 +5032,7 @@ pProcFile = create_proc_entry(dev->name, S_IRUGO, pSkRootDir); if (pProcFile) { - pProcFile->proc_fops = &sk_proc_fops; + pProcFile->proc_fops = &SK_proc_fops; pProcFile->data = dev; pProcFile->owner = THIS_MODULE; } diff -Nru a/drivers/net/sk98lin/skproc.c b/drivers/net/sk98lin/skproc.c --- a/drivers/net/sk98lin/skproc.c 2004-10-18 15:08:29 -07:00 +++ b/drivers/net/sk98lin/skproc.c 2004-10-18 15:08:29 -07:00 @@ -32,13 +32,13 @@ #include "h/skversion.h" extern struct SK_NET_DEVICE *SkGeRootDev; -static int sk_proc_print(void *writePtr, char *format, ...); +static void sk_proc_print(void *writePtr, const char *format, ...) + __attribute__ ((format (printf, 2, 3))); static void sk_gen_browse(void *buffer); -int len; static int sk_seq_show(struct seq_file *seq, void *v); static int sk_proc_open(struct inode *inode, struct file *file); -struct file_operations sk_proc_fops = { +struct file_operations SK_proc_fops = { .owner = THIS_MODULE, .open = sk_proc_open, .read = seq_read, @@ -108,35 +108,35 @@ if (strcmp(pAC->dev[t-1]->name, currDev->name) == 0) { pPnmiStat = &pPnmiStruct->Stat[0]; - len = sk_proc_print(buffer, + sk_proc_print(buffer, "\nDetailed statistic for device %s\n", pAC->dev[t-1]->name); - len += sk_proc_print(buffer, + sk_proc_print(buffer, "=======================================\n"); /* Board statistics */ - len += sk_proc_print(buffer, + sk_proc_print(buffer, "\nBoard statistics\n\n"); - len += sk_proc_print(buffer, + sk_proc_print(buffer, "Active Port %c\n", 'A' + pAC->Rlmt.Net[t-1].Port[pAC->Rlmt. Net[t-1].PrefPort]->PortNumber); - len += sk_proc_print(buffer, + sk_proc_print(buffer, "Preferred Port %c\n", 'A' + pAC->Rlmt.Net[t-1].Port[pAC->Rlmt. Net[t-1].PrefPort]->PortNumber); - len += sk_proc_print(buffer, + sk_proc_print(buffer, "Bus speed (MHz) %d\n", pPnmiStruct->BusSpeed); - len += sk_proc_print(buffer, + sk_proc_print(buffer, "Bus width (Bit) %d\n", pPnmiStruct->BusWidth); - len += sk_proc_print(buffer, + sk_proc_print(buffer, "Driver version %s\n", VER_STRING); - len += sk_proc_print(buffer, + sk_proc_print(buffer, "Hardware revision v%d.%d\n", (pAC->GIni.GIPciHwRev >> 4) & 0x0F, pAC->GIni.GIPciHwRev & 0x0F); @@ -148,7 +148,7 @@ case 1: strcpy(sens_msg, pAC->I2c.SenTable[i].SenDesc); strcat(sens_msg, " (C)"); - len += sk_proc_print(buffer, + sk_proc_print(buffer, "%-25s %d.%02d\n", sens_msg, pAC->I2c.SenTable[i].SenValue / 10, @@ -156,7 +156,7 @@ strcpy(sens_msg, pAC->I2c.SenTable[i].SenDesc); strcat(sens_msg, " (F)"); - len += sk_proc_print(buffer, + sk_proc_print(buffer, "%-25s %d.%02d\n", sens_msg, ((((pAC->I2c.SenTable[i].SenValue) @@ -167,7 +167,7 @@ case 2: strcpy(sens_msg, pAC->I2c.SenTable[i].SenDesc); strcat(sens_msg, " (V)"); - len += sk_proc_print(buffer, + sk_proc_print(buffer, "%-25s %d.%03d\n", sens_msg, pAC->I2c.SenTable[i].SenValue / 1000, @@ -176,7 +176,7 @@ case 3: strcpy(sens_msg, pAC->I2c.SenTable[i].SenDesc); strcat(sens_msg, " (rpm)"); - len += sk_proc_print(buffer, + sk_proc_print(buffer, "%-25s %d\n", sens_msg, pAC->I2c.SenTable[i].SenValue); @@ -187,13 +187,13 @@ } /*Receive statistics */ - len += sk_proc_print(buffer, + sk_proc_print(buffer, "\nReceive statistics\n\n"); - len += sk_proc_print(buffer, + sk_proc_print(buffer, "Received bytes %Lu\n", (unsigned long long) pPnmiStat->StatRxOctetsOkCts); - len += sk_proc_print(buffer, + sk_proc_print(buffer, "Received packets %Lu\n", (unsigned long long) pPnmiStat->StatRxOkCts); #if 0 @@ -208,93 +208,93 @@ pPnmiStruct->InErrorsCts = pPnmiStruct->InErrorsCts - pPnmiStat->StatRxTooLongCts; - len += sk_proc_print(buffer, + sk_proc_print(buffer, "Receive errors %Lu\n", (unsigned long long) pPnmiStruct->InErrorsCts); - len += sk_proc_print(buffer, + sk_proc_print(buffer, "Receive dropped %Lu\n", (unsigned long long) pPnmiStruct->RxNoBufCts); - len += sk_proc_print(buffer, + sk_proc_print(buffer, "Received multicast %Lu\n", (unsigned long long) pPnmiStat->StatRxMulticastOkCts); - len += sk_proc_print(buffer, + sk_proc_print(buffer, "Receive error types\n"); - len += sk_proc_print(buffer, + sk_proc_print(buffer, " length %Lu\n", (unsigned long long) pPnmiStat->StatRxRuntCts); - len += sk_proc_print(buffer, + sk_proc_print(buffer, " buffer overflow %Lu\n", (unsigned long long) pPnmiStat->StatRxFifoOverflowCts); - len += sk_proc_print(buffer, + sk_proc_print(buffer, " bad crc %Lu\n", (unsigned long long) pPnmiStat->StatRxFcsCts); - len += sk_proc_print(buffer, + sk_proc_print(buffer, " framing %Lu\n", (unsigned long long) pPnmiStat->StatRxFramingCts); - len += sk_proc_print(buffer, + sk_proc_print(buffer, " missed frames %Lu\n", (unsigned long long) pPnmiStat->StatRxMissedCts); if (pNet->Mtu > 1500) pPnmiStat->StatRxTooLongCts = 0; - len += sk_proc_print(buffer, + sk_proc_print(buffer, " too long %Lu\n", (unsigned long long) pPnmiStat->StatRxTooLongCts); - len += sk_proc_print(buffer, + sk_proc_print(buffer, " carrier extension %Lu\n", (unsigned long long) pPnmiStat->StatRxCextCts); - len += sk_proc_print(buffer, + sk_proc_print(buffer, " too short %Lu\n", (unsigned long long) pPnmiStat->StatRxShortsCts); - len += sk_proc_print(buffer, + sk_proc_print(buffer, " symbol %Lu\n", (unsigned long long) pPnmiStat->StatRxSymbolCts); - len += sk_proc_print(buffer, + sk_proc_print(buffer, " LLC MAC size %Lu\n", (unsigned long long) pPnmiStat->StatRxIRLengthCts); - len += sk_proc_print(buffer, + sk_proc_print(buffer, " carrier event %Lu\n", (unsigned long long) pPnmiStat->StatRxCarrierCts); - len += sk_proc_print(buffer, + sk_proc_print(buffer, " jabber %Lu\n", (unsigned long long) pPnmiStat->StatRxJabberCts); /*Transmit statistics */ - len += sk_proc_print(buffer, + sk_proc_print(buffer, "\nTransmit statistics\n\n"); - len += sk_proc_print(buffer, + sk_proc_print(buffer, "Transmited bytes %Lu\n", (unsigned long long) pPnmiStat->StatTxOctetsOkCts); - len += sk_proc_print(buffer, + sk_proc_print(buffer, "Transmited packets %Lu\n", (unsigned long long) pPnmiStat->StatTxOkCts); - len += sk_proc_print(buffer, + sk_proc_print(buffer, "Transmit errors %Lu\n", (unsigned long long) pPnmiStat->StatTxSingleCollisionCts); - len += sk_proc_print(buffer, + sk_proc_print(buffer, "Transmit dropped %Lu\n", (unsigned long long) pPnmiStruct->TxNoBufCts); - len += sk_proc_print(buffer, + sk_proc_print(buffer, "Transmit collisions %Lu\n", (unsigned long long) pPnmiStat->StatTxSingleCollisionCts); - len += sk_proc_print(buffer, + sk_proc_print(buffer, "Transmit error types\n"); - len += sk_proc_print(buffer, + sk_proc_print(buffer, " excessive collision %ld\n", pAC->stats.tx_aborted_errors); - len += sk_proc_print(buffer, + sk_proc_print(buffer, " carrier %Lu\n", (unsigned long long) pPnmiStat->StatTxCarrierCts); - len += sk_proc_print(buffer, + sk_proc_print(buffer, " fifo underrun %Lu\n", (unsigned long long) pPnmiStat->StatTxFifoUnderrunCts); - len += sk_proc_print(buffer, + sk_proc_print(buffer, " heartbeat %Lu\n", (unsigned long long) pPnmiStat->StatTxCarrierCts); - len += sk_proc_print(buffer, + sk_proc_print(buffer, " window %ld\n", pAC->stats.tx_window_errors); @@ -315,12 +315,11 @@ * Returns: number of bytes written * */ -static int sk_proc_print(void *writePtr, char *format, ...) +static void sk_proc_print(void *writePtr, const char *format, ...) { #define MAX_LEN_SINGLE_LINE 256 char str[MAX_LEN_SINGLE_LINE]; va_list a_start; - int lenght = 0; struct seq_file *seq = (struct seq_file *) writePtr; @@ -330,10 +329,7 @@ vsprintf(str, format, a_start); va_end(a_start); - lenght = strlen(str); - - seq_printf(seq, str); - return lenght; + seq_printf(seq, "%s", str); } /***************************************************************************** From shemminger@osdl.org Mon Oct 18 15:34:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 15:35:49 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IMYEeA021588 for ; Mon, 18 Oct 2004 15:34:14 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IMXqWL009261 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 15:33:53 -0700 Date: Mon, 18 Oct 2004 13:42:11 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9] 3c523: use module_param an netdev_priv Message-Id: <20041018134211.36163604@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10425 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 Content-Length: 4808 Lines: 178 Change 3c523 to use module_param and netdev_priv Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/3c523.c b/drivers/net/3c523.c --- a/drivers/net/3c523.c 2004-10-18 13:39:27 -07:00 +++ b/drivers/net/3c523.c 2004-10-18 13:39:27 -07:00 @@ -94,6 +94,7 @@ #include #include #include +#include #include #include #include @@ -308,7 +309,7 @@ static int __init check586(struct net_device *dev, unsigned long where, unsigned size) { - struct priv *p = (struct priv *) dev->priv; + struct priv *p = netdev_priv(dev); char *iscp_addrs[2]; int i = 0; @@ -349,7 +350,7 @@ void alloc586(struct net_device *dev) { - struct priv *p = (struct priv *) dev->priv; + struct priv *p = netdev_priv(dev); elmc_id_reset586(); DELAY(2); @@ -420,7 +421,7 @@ int i = 0; unsigned int size = 0; int retval; - struct priv *pr = dev->priv; + struct priv *pr = netdev_priv(dev); SET_MODULE_OWNER(dev); if (MCA_bus == 0) { @@ -581,7 +582,8 @@ static void cleanup_card(struct net_device *dev) { - mca_set_adapter_procfn(((struct priv *) (dev->priv))->slot, NULL, NULL); + struct priv *priv = netdev_priv(priv); + mca_set_adapter_procfn(priv->slot, NULL, NULL); release_region(dev->base_addr, ELMC_IO_EXTENT); } @@ -622,7 +624,7 @@ void *ptr; unsigned long s; int i, result = 0; - struct priv *p = (struct priv *) dev->priv; + struct priv *p = netdev_priv(dev); volatile struct configure_cmd_struct *cfg_cmd; volatile struct iasetup_cmd_struct *ias_cmd; volatile struct tdr_cmd_struct *tdr_cmd; @@ -860,7 +862,7 @@ volatile struct rfd_struct *rfd = (struct rfd_struct *) ptr; volatile struct rbd_struct *rbd; int i; - struct priv *p = (struct priv *) dev->priv; + struct priv *p = netdev_priv(dev); memset((char *) rfd, 0, sizeof(struct rfd_struct) * p->num_recv_buffs); p->rfd_first = rfd; @@ -924,7 +926,7 @@ } /* reading ELMC_CTRL also clears the INT bit. */ - p = (struct priv *) dev->priv; + p = netdev_priv(dev); while ((stat = p->scb->status & STAT_MASK)) { @@ -980,7 +982,7 @@ unsigned short totlen; struct sk_buff *skb; struct rbd_struct *rbd; - struct priv *p = (struct priv *) dev->priv; + struct priv *p = netdev_priv(dev); for (; (status = p->rfd_top->status) & STAT_COMPL;) { rbd = (struct rbd_struct *) make32(p->rfd_top->rbd_offset); @@ -1025,7 +1027,7 @@ static void elmc_rnr_int(struct net_device *dev) { - struct priv *p = (struct priv *) dev->priv; + struct priv *p = netdev_priv(dev); p->stats.rx_errors++; @@ -1048,7 +1050,7 @@ static void elmc_xmt_int(struct net_device *dev) { int status; - struct priv *p = (struct priv *) dev->priv; + struct priv *p = netdev_priv(dev); status = p->xmit_cmds[p->xmit_last]->cmd_status; if (!(status & STAT_COMPL)) { @@ -1091,7 +1093,7 @@ static void startrecv586(struct net_device *dev) { - struct priv *p = (struct priv *) dev->priv; + struct priv *p = netdev_priv(dev); p->scb->rfa_offset = make16(p->rfd_first); p->scb->cmd = RUC_START; @@ -1105,7 +1107,7 @@ static void elmc_timeout(struct net_device *dev) { - struct priv *p = (struct priv *) dev->priv; + struct priv *p = netdev_priv(dev); /* COMMAND-UNIT active? */ if (p->scb->status & CU_ACTIVE) { #ifdef DEBUG @@ -1141,7 +1143,7 @@ #ifndef NO_NOPCOMMANDS int next_nop; #endif - struct priv *p = (struct priv *) dev->priv; + struct priv *p = netdev_priv(dev); netif_stop_queue(dev); @@ -1212,7 +1214,7 @@ static struct net_device_stats *elmc_get_stats(struct net_device *dev) { - struct priv *p = (struct priv *) dev->priv; + struct priv *p = netdev_priv(dev); unsigned short crc, aln, rsc, ovrn; crc = p->scb->crc_errs; /* get error-statistic from the ni82586 */ @@ -1271,12 +1273,14 @@ static struct net_device *dev_elmc[MAX_3C523_CARDS]; static int irq[MAX_3C523_CARDS]; static int io[MAX_3C523_CARDS]; -MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_3C523_CARDS) "i"); -MODULE_PARM(io, "1-" __MODULE_STRING(MAX_3C523_CARDS) "i"); + +static int num_params; +module_param_array(irq, int, num_params, 0); +module_param_array(io, int, num_params, 0); MODULE_PARM_DESC(io, "EtherLink/MC I/O base address(es)"); MODULE_PARM_DESC(irq, "EtherLink/MC IRQ number(s)"); -int init_module(void) +static int __init elmc_init_module(void) { int this_dev,found = 0; @@ -1306,8 +1310,9 @@ return -ENXIO; } else return 0; } +module_init(elmc_init_module); -void cleanup_module(void) +static void __exit elmc_cleanup_module(void) { int this_dev; for (this_dev=0; this_dev; Mon, 18 Oct 2004 15:34:16 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IMXjWL009226 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 15:33:45 -0700 Date: Mon, 18 Oct 2004 14:08:09 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9 1/2] via-velocity: use module_param Message-Id: <20041018140809.05bf92ce@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10424 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 Content-Length: 6312 Lines: 205 Use module_param and netdev_priv Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c --- a/drivers/net/via-velocity.c 2004-10-18 13:48:03 -07:00 +++ b/drivers/net/via-velocity.c 2004-10-18 13:48:03 -07:00 @@ -46,6 +46,7 @@ #include +#include #include #include #include @@ -100,8 +101,9 @@ MODULE_DESCRIPTION("VIA Networking Velocity Family Gigabit Ethernet Adapter Driver"); #define VELOCITY_PARAM(N,D) \ - static const int N[MAX_UNITS]=OPTION_DEFAULT;\ - MODULE_PARM(N, "1-" __MODULE_STRING(MAX_UNITS) "i");\ + static int num##N; \ + static int N[MAX_UNITS]=OPTION_DEFAULT;\ + module_param_array(N, int, num##N, 0); \ MODULE_PARM_DESC(N, D); #define RX_DESC_MIN 64 @@ -229,7 +231,7 @@ VELOCITY_PARAM(int_works, "Number of packets per interrupt services"); static int rx_copybreak = 200; -MODULE_PARM(rx_copybreak, "i"); +module_param(rx_copybreak, int, 0); MODULE_PARM_DESC(rx_copybreak, "Copy breakpoint for copy-only-tiny-frames"); static void velocity_init_info(struct pci_dev *pdev, struct velocity_info *vptr, struct velocity_info_tbl *info); @@ -343,7 +345,7 @@ static void __devexit velocity_remove1(struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); - struct velocity_info *vptr = dev->priv; + struct velocity_info *vptr = netdev_priv(dev); #ifdef CONFIG_PM unsigned long flags; @@ -710,7 +712,7 @@ SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); - vptr = dev->priv; + vptr = netdev_priv(dev); if (first) { @@ -1724,7 +1726,7 @@ static int velocity_open(struct net_device *dev) { - struct velocity_info *vptr = dev->priv; + struct velocity_info *vptr = netdev_priv(dev); int ret; vptr->rx_buf_sz = (dev->mtu <= 1504 ? PKT_BUF_SZ : dev->mtu + 32); @@ -1781,7 +1783,7 @@ static int velocity_change_mtu(struct net_device *dev, int new_mtu) { - struct velocity_info *vptr = dev->priv; + struct velocity_info *vptr = netdev_priv(dev); unsigned long flags; int oldmtu = dev->mtu; int ret = 0; @@ -1857,7 +1859,7 @@ static int velocity_close(struct net_device *dev) { - struct velocity_info *vptr = dev->priv; + struct velocity_info *vptr = netdev_priv(dev); netif_stop_queue(dev); velocity_shutdown(vptr); @@ -1890,7 +1892,7 @@ static int velocity_xmit(struct sk_buff *skb, struct net_device *dev) { - struct velocity_info *vptr = dev->priv; + struct velocity_info *vptr = netdev_priv(dev); int qnum = 0; struct tx_desc *td_ptr; struct velocity_td_info *tdinfo; @@ -2041,7 +2043,7 @@ static int velocity_intr(int irq, void *dev_instance, struct pt_regs *regs) { struct net_device *dev = dev_instance; - struct velocity_info *vptr = dev->priv; + struct velocity_info *vptr = netdev_priv(dev); u32 isr_status; int max_count = 0; @@ -2096,7 +2098,7 @@ static void velocity_set_multi(struct net_device *dev) { - struct velocity_info *vptr = dev->priv; + struct velocity_info *vptr = netdev_priv(dev); struct mac_regs * regs = vptr->mac_regs; u8 rx_mode; int i; @@ -2145,7 +2147,7 @@ static struct net_device_stats *velocity_get_stats(struct net_device *dev) { - struct velocity_info *vptr = dev->priv; + struct velocity_info *vptr = netdev_priv(dev); /* If the hardware is down, don't touch MII */ if(!netif_running(dev)) @@ -2188,7 +2190,7 @@ static int velocity_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { - struct velocity_info *vptr = dev->priv; + struct velocity_info *vptr = netdev_priv(dev); int ret; /* If we are asked for information and the device is power @@ -2817,7 +2819,7 @@ static int velocity_ethtool_up(struct net_device *dev) { - struct velocity_info *vptr = dev->priv; + struct velocity_info *vptr = netdev_priv(dev); if(!netif_running(dev)) pci_set_power_state(vptr->pdev, 0); return 0; @@ -2833,14 +2835,14 @@ static void velocity_ethtool_down(struct net_device *dev) { - struct velocity_info *vptr = dev->priv; + struct velocity_info *vptr = netdev_priv(dev); if(!netif_running(dev)) pci_set_power_state(vptr->pdev, 3); } static int velocity_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) { - struct velocity_info *vptr = dev->priv; + struct velocity_info *vptr = netdev_priv(dev); struct mac_regs * regs = vptr->mac_regs; u32 status; status = check_connection_type(vptr->mac_regs); @@ -2865,7 +2867,7 @@ static int velocity_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) { - struct velocity_info *vptr = dev->priv; + struct velocity_info *vptr = netdev_priv(dev); u32 curr_status; u32 new_status = 0; int ret = 0; @@ -2888,14 +2890,14 @@ static u32 velocity_get_link(struct net_device *dev) { - struct velocity_info *vptr = dev->priv; + struct velocity_info *vptr = netdev_priv(dev); struct mac_regs * regs = vptr->mac_regs; return BYTE_REG_BITS_IS_ON(PHYSR0_LINKGD, ®s->PHYSR0) ? 0 : 1; } static void velocity_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { - struct velocity_info *vptr = dev->priv; + struct velocity_info *vptr = netdev_priv(dev); strcpy(info->driver, VELOCITY_NAME); strcpy(info->version, VELOCITY_VERSION); strcpy(info->bus_info, vptr->pdev->slot_name); @@ -2903,7 +2905,7 @@ static void velocity_ethtool_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) { - struct velocity_info *vptr = dev->priv; + struct velocity_info *vptr = netdev_priv(dev); wol->supported = WAKE_PHY | WAKE_MAGIC | WAKE_UCAST | WAKE_ARP; wol->wolopts |= WAKE_MAGIC; /* @@ -2919,7 +2921,7 @@ static int velocity_ethtool_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) { - struct velocity_info *vptr = dev->priv; + struct velocity_info *vptr = netdev_priv(dev); if (!(wol->wolopts & (WAKE_PHY | WAKE_MAGIC | WAKE_UCAST | WAKE_ARP))) return -EFAULT; @@ -2984,7 +2986,7 @@ static int velocity_mii_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { - struct velocity_info *vptr = dev->priv; + struct velocity_info *vptr = netdev_priv(dev); struct mac_regs * regs = vptr->mac_regs; unsigned long flags; struct mii_ioctl_data *miidata = if_mii(ifr); From shemminger@osdl.org Mon Oct 18 15:34:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 15:35:48 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IMXuhq021574 for ; Mon, 18 Oct 2004 15:34:16 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IMXaWL009200 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 15:33:36 -0700 Date: Mon, 18 Oct 2004 13:04:56 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9] 3c503: convert to module_param Message-Id: <20041018130456.4b42baac@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10421 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 Content-Length: 1903 Lines: 66 Convert 3c503 to use module_param Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/3c503.c b/drivers/net/3c503.c --- a/drivers/net/3c503.c 2004-10-18 12:25:17 -07:00 +++ b/drivers/net/3c503.c 2004-10-18 12:25:17 -07:00 @@ -42,6 +42,7 @@ DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " Donald Becker (becker@scyld.com)\n"; #include +#include #include #include #include @@ -666,16 +667,18 @@ .get_drvinfo = netdev_get_drvinfo, }; -#ifdef MODULE #define MAX_EL2_CARDS 4 /* Max number of EL2 cards per module */ +#ifdef MODULE static struct net_device *dev_el2[MAX_EL2_CARDS]; static int io[MAX_EL2_CARDS]; static int irq[MAX_EL2_CARDS]; static int xcvr[MAX_EL2_CARDS]; /* choose int. or ext. xcvr */ -MODULE_PARM(io, "1-" __MODULE_STRING(MAX_EL2_CARDS) "i"); -MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_EL2_CARDS) "i"); -MODULE_PARM(xcvr, "1-" __MODULE_STRING(MAX_EL2_CARDS) "i"); + +static int num_params; +module_param_array(io, int, num_params, 0); +module_param_array(irq, int, num_params, 0); +module_param_array(xcvr, int, num_params, 0); MODULE_PARM_DESC(io, "I/O base address(es)"); MODULE_PARM_DESC(irq, "IRQ number(s) (assigned)"); MODULE_PARM_DESC(xcvr, "transceiver(s) (0=internal, 1=external)"); @@ -684,8 +687,7 @@ /* This is set up so that only a single autoprobe takes place per call. ISA device autoprobes on a running machine are not recommended. */ -int -init_module(void) +static __init int el2_init_module(void) { struct net_device *dev; int this_dev, found = 0; @@ -716,9 +718,9 @@ return 0; return -ENXIO; } +module_init(el2_init_module); -void -cleanup_module(void) +static __exit void el2_cleanup_module(void) { int this_dev; @@ -731,4 +733,5 @@ } } } +module_exit(el2_cleanup_module); #endif /* MODULE */ From shemminger@osdl.org Mon Oct 18 15:58:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 15:58:36 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IMwUmt028262 for ; Mon, 18 Oct 2004 15:58:30 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IMw9WL011652 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 15:58:10 -0700 Date: Mon, 18 Oct 2004 15:59:09 -0700 From: Stephen Hemminger To: davem@redhat.com Cc: netdev@oss.sgi.com Subject: [PATCH] dst: use const in accessors Message-Id: <20041018155909.13e9f3ad@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10427 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 Content-Length: 811 Lines: 30 Trivial, dst cache inline's can use const. Signed-off-by: Stephen Hemminger diff -Nru a/include/net/dst.h b/include/net/dst.h --- a/include/net/dst.h 2004-10-15 10:33:43 -07:00 +++ b/include/net/dst.h 2004-10-15 10:33:43 -07:00 @@ -103,19 +103,19 @@ #ifdef __KERNEL__ static inline u32 -dst_metric(struct dst_entry *dst, int metric) +dst_metric(const struct dst_entry *dst, int metric) { return dst->metrics[metric-1]; } static inline u32 -dst_path_metric(struct dst_entry *dst, int metric) +dst_path_metric(const struct dst_entry *dst, int metric) { return dst->path->metrics[metric-1]; } static inline u32 -dst_pmtu(struct dst_entry *dst) +dst_pmtu(const struct dst_entry *dst) { u32 mtu = dst_path_metric(dst, RTAX_MTU); /* Yes, _exactly_. This is paranoia. */ From shemminger@osdl.org Mon Oct 18 16:00:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 16:00:34 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9IN0S2Z028394 for ; Mon, 18 Oct 2004 16:00:28 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9IN07WL011845 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 18 Oct 2004 16:00:08 -0700 Date: Mon, 18 Oct 2004 16:01:07 -0700 From: Stephen Hemminger To: davem@redhat.com Cc: netdev@oss.sgi.com Subject: [PATCH] tcp: use const in tcp.h Message-Id: <20041018160107.7fde661b@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10428 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 Content-Length: 6513 Lines: 208 More trivial janitor stuff, const usage in accessors. Signed-off-by: Stephen Hemminger diff -Nru a/include/net/tcp.h b/include/net/tcp.h --- a/include/net/tcp.h 2004-10-15 10:34:33 -07:00 +++ b/include/net/tcp.h 2004-10-15 10:34:33 -07:00 @@ -958,8 +958,8 @@ extern void tcp_init_xmit_timers(struct sock *); extern void tcp_clear_xmit_timers(struct sock *); -extern void tcp_delete_keepalive_timer (struct sock *); -extern void tcp_reset_keepalive_timer (struct sock *, unsigned long); +extern void tcp_delete_keepalive_timer(struct sock *); +extern void tcp_reset_keepalive_timer(struct sock *, unsigned long); extern unsigned int tcp_sync_mss(struct sock *sk, u32 pmtu); extern unsigned int tcp_current_mss(struct sock *sk, int large); @@ -1080,7 +1080,7 @@ * Rcv_nxt can be after the window if our peer push more data * than the offered window. */ -static __inline__ u32 tcp_receive_window(struct tcp_opt *tp) +static __inline__ u32 tcp_receive_window(const struct tcp_opt *tp) { s32 win = tp->rcv_wup + tp->rcv_wnd - tp->rcv_nxt; @@ -1158,18 +1158,19 @@ /* Due to TSO, an SKB can be composed of multiple actual * packets. To keep these tracked properly, we use this. */ -static inline int tcp_skb_pcount(struct sk_buff *skb) +static inline int tcp_skb_pcount(const struct sk_buff *skb) { return skb_shinfo(skb)->tso_segs; } /* This is valid iff tcp_skb_pcount() > 1. */ -static inline int tcp_skb_mss(struct sk_buff *skb) +static inline int tcp_skb_mss(const struct sk_buff *skb) { return skb_shinfo(skb)->tso_size; } -static inline void tcp_inc_pcount(tcp_pcount_t *count, struct sk_buff *skb) +static inline void tcp_inc_pcount(tcp_pcount_t *count, + const struct sk_buff *skb) { count->val += tcp_skb_pcount(skb); } @@ -1184,13 +1185,14 @@ count->val -= amt; } -static inline void tcp_dec_pcount(tcp_pcount_t *count, struct sk_buff *skb) +static inline void tcp_dec_pcount(tcp_pcount_t *count, + const struct sk_buff *skb) { count->val -= tcp_skb_pcount(skb); } static inline void tcp_dec_pcount_approx(tcp_pcount_t *count, - struct sk_buff *skb) + const struct sk_buff *skb) { if (count->val) { count->val -= tcp_skb_pcount(skb); @@ -1199,7 +1201,7 @@ } } -static inline __u32 tcp_get_pcount(tcp_pcount_t *count) +static inline __u32 tcp_get_pcount(const tcp_pcount_t *count) { return count->val; } @@ -1209,8 +1211,9 @@ count->val = val; } -static inline void tcp_packets_out_inc(struct sock *sk, struct tcp_opt *tp, - struct sk_buff *skb) +static inline void tcp_packets_out_inc(struct sock *sk, + struct tcp_opt *tp, + const struct sk_buff *skb) { int orig = tcp_get_pcount(&tp->packets_out); @@ -1219,7 +1222,8 @@ tcp_reset_xmit_timer(sk, TCP_TIME_RETRANS, tp->rto); } -static inline void tcp_packets_out_dec(struct tcp_opt *tp, struct sk_buff *skb) +static inline void tcp_packets_out_dec(struct tcp_opt *tp, + const struct sk_buff *skb) { tcp_dec_pcount(&tp->packets_out, skb); } @@ -1238,7 +1242,7 @@ * "Packets left network, but not honestly ACKed yet" PLUS * "Packets fast retransmitted" */ -static __inline__ unsigned int tcp_packets_in_flight(struct tcp_opt *tp) +static __inline__ unsigned int tcp_packets_in_flight(const struct tcp_opt *tp) { return (tcp_get_pcount(&tp->packets_out) - tcp_get_pcount(&tp->left_out) + @@ -1405,18 +1409,19 @@ /* Slow start with delack produces 3 packets of burst, so that * it is safe "de facto". */ -static __inline__ __u32 tcp_max_burst(struct tcp_opt *tp) +static __inline__ __u32 tcp_max_burst(const struct tcp_opt *tp) { return 3; } -static __inline__ int tcp_minshall_check(struct tcp_opt *tp) +static __inline__ int tcp_minshall_check(const struct tcp_opt *tp) { return after(tp->snd_sml,tp->snd_una) && !after(tp->snd_sml, tp->snd_nxt); } -static __inline__ void tcp_minshall_update(struct tcp_opt *tp, int mss, struct sk_buff *skb) +static __inline__ void tcp_minshall_update(struct tcp_opt *tp, int mss, + const struct sk_buff *skb) { if (skb->len < mss) tp->snd_sml = TCP_SKB_CB(skb)->end_seq; @@ -1431,7 +1436,8 @@ */ static __inline__ int -tcp_nagle_check(struct tcp_opt *tp, struct sk_buff *skb, unsigned mss_now, int nonagle) +tcp_nagle_check(const struct tcp_opt *tp, const struct sk_buff *skb, + unsigned mss_now, int nonagle) { return (skb->len < mss_now && !(TCP_SKB_CB(skb)->flags & TCPCB_FLAG_FIN) && @@ -1446,7 +1452,8 @@ /* This checks if the data bearing packet SKB (usually sk->sk_send_head) * should be put on the wire right now. */ -static __inline__ int tcp_snd_test(struct tcp_opt *tp, struct sk_buff *skb, +static __inline__ int tcp_snd_test(const struct tcp_opt *tp, + struct sk_buff *skb, unsigned cur_mss, int nonagle) { int pkts = tcp_skb_pcount(skb); @@ -1493,7 +1500,8 @@ tcp_reset_xmit_timer(sk, TCP_TIME_PROBE0, tp->rto); } -static __inline__ int tcp_skb_is_last(struct sock *sk, struct sk_buff *skb) +static __inline__ int tcp_skb_is_last(const struct sock *sk, + const struct sk_buff *skb) { return skb->next == (struct sk_buff *)&sk->sk_write_queue; } @@ -1544,7 +1552,7 @@ tp->snd_wl1 = seq; } -extern void tcp_destroy_sock(struct sock *sk); +extern void tcp_destroy_sock(struct sock *sk); /* @@ -1618,7 +1626,7 @@ #undef STATE_TRACE #ifdef STATE_TRACE -static char *statename[]={ +static const char *statename[]={ "Unused","Established","Syn Sent","Syn Recv", "Fin Wait 1","Fin Wait 2","Time Wait", "Close", "Close Wait","Last ACK","Listen","Closing" @@ -1889,17 +1897,17 @@ wake_up(&tcp_lhash_wait); } -static inline int keepalive_intvl_when(struct tcp_opt *tp) +static inline int keepalive_intvl_when(const struct tcp_opt *tp) { return tp->keepalive_intvl ? : sysctl_tcp_keepalive_intvl; } -static inline int keepalive_time_when(struct tcp_opt *tp) +static inline int keepalive_time_when(const struct tcp_opt *tp) { return tp->keepalive_time ? : sysctl_tcp_keepalive_time; } -static inline int tcp_fin_time(struct tcp_opt *tp) +static inline int tcp_fin_time(const struct tcp_opt *tp) { int fin_timeout = tp->linger2 ? : sysctl_tcp_fin_timeout; @@ -1909,7 +1917,7 @@ return fin_timeout; } -static inline int tcp_paws_check(struct tcp_opt *tp, int rst) +static inline int tcp_paws_check(const struct tcp_opt *tp, int rst) { if ((s32)(tp->rcv_tsval - tp->ts_recent) >= 0) return 0; From romieu@fr.zoreil.com Mon Oct 18 16:10:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 16:10:21 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9INADBM029031 for ; Mon, 18 Oct 2004 16:10:13 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i9IN9pvr027427; Tue, 19 Oct 2004 01:09:51 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i9IN9of3027426; Tue, 19 Oct 2004 01:09:50 +0200 Date: Tue, 19 Oct 2004 01:09:50 +0200 From: Francois Romieu To: jgarzik@pobox.com Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc4-bk3-netdev3 2/3] r8169: unneeded synchronize_irq() Message-ID: <20041018230948.GA27418@electric-eye.fr.zoreil.com> References: <20041018230823.GB19990@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041018230823.GB19990@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 10430 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 Content-Length: 526 Lines: 17 synchronize_irq() is not needed as it is already issued by free_irq(). Signed-off-by: Francois Romieu diff -puN drivers/net/r8169.c~r8169-230 drivers/net/r8169.c --- linux-2.6.9/drivers/net/r8169.c~r8169-230 2004-10-18 23:37:30.000000000 +0200 +++ linux-2.6.9-fr/drivers/net/r8169.c 2004-10-18 23:37:58.000000000 +0200 @@ -2259,7 +2259,6 @@ rtl8169_close(struct net_device *dev) spin_unlock_irq(&tp->lock); - synchronize_irq(dev->irq); free_irq(dev->irq, dev); netif_poll_disable(dev); _ From romieu@fr.zoreil.com Mon Oct 18 16:10:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 16:10:19 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9INADsm029030 for ; Mon, 18 Oct 2004 16:10:13 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i9IN8Ovr027417; Tue, 19 Oct 2004 01:08:24 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i9IN8OAE027416; Tue, 19 Oct 2004 01:08:24 +0200 Date: Tue, 19 Oct 2004 01:08:23 +0200 From: Francois Romieu To: jgarzik@pobox.com Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc4-bk3-netdev3 1/3] r8169: always clean Tx desc Message-ID: <20041018230823.GB19990@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 10429 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 Content-Length: 827 Lines: 22 rtl8169_unmap_tx_skb() can not assume that a Tx ring descriptor belongs to the host as it can be issued during rtl8169_tx_clear() as a part of a recovery process (during Tx timeout for instance). Simple fix: always clean the relevant descriptor entry. Acked-by: Francois Romieu Signed-off-by: Jon Mason diff -puN drivers/net/r8169.c~r8169-225 drivers/net/r8169.c --- linux-2.6.9/drivers/net/r8169.c~r8169-225 2004-10-18 22:13:54.000000000 +0200 +++ linux-2.6.9-fr/drivers/net/r8169.c 2004-10-18 23:31:21.000000000 +0200 @@ -1679,6 +1679,7 @@ static void rtl8169_unmap_tx_skb(struct unsigned int len = tx_skb->len; pci_unmap_single(pdev, le64_to_cpu(desc->addr), len, PCI_DMA_TODEVICE); + desc->opts1 = 0x00; desc->opts2 = 0x00; desc->addr = 0x00; tx_skb->len = 0; _ From romieu@fr.zoreil.com Mon Oct 18 16:14:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 16:14:19 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9INEDD4029689 for ; Mon, 18 Oct 2004 16:14:13 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i9INB2vr027523; Tue, 19 Oct 2004 01:11:02 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i9INB2pH027522; Tue, 19 Oct 2004 01:11:02 +0200 Date: Tue, 19 Oct 2004 01:11:02 +0200 From: Francois Romieu To: jgarzik@pobox.com Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9-rc4-bk3-netdev3 3/3] r8169: netconsole support Message-ID: <20041018231102.GB27418@electric-eye.fr.zoreil.com> References: <20041018230823.GB19990@electric-eye.fr.zoreil.com> <20041018230948.GA27418@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041018230948.GA27418@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 10431 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 Content-Length: 1252 Lines: 44 netconsole support. Signed-off-by: John W. Linville diff -puN drivers/net/r8169.c~r8169-235 drivers/net/r8169.c --- linux-2.6.9/drivers/net/r8169.c~r8169-235 2004-10-18 23:39:38.000000000 +0200 +++ linux-2.6.9-fr/drivers/net/r8169.c 2004-10-18 23:56:27.000000000 +0200 @@ -1088,6 +1088,23 @@ static inline void rtl8169_request_timer add_timer(timer); } +#ifdef CONFIG_NET_POLL_CONTROLLER +/* + * Polling 'interrupt' - used by things like netconsole to send skbs + * without having to re-enable interrupts. It's not called while + * the interrupt routine is executing. + */ +static void rtl8169_netpoll(struct net_device *dev) +{ + struct rtl8169_private *tp = netdev_priv(dev); + struct pci_dev *pdev = tp->pci_dev; + + disable_irq(pdev->irq); + rtl8169_interrupt(pdev->irq, dev, NULL); + enable_irq(pdev->irq); +} +#endif + static void rtl8169_release_board(struct pci_dev *pdev, struct net_device *dev, void *ioaddr) { @@ -1314,6 +1331,10 @@ rtl8169_init_one(struct pci_dev *pdev, c dev->vlan_rx_kill_vid = rtl8169_vlan_rx_kill_vid; #endif +#ifdef CONFIG_NET_POLL_CONTROLLER + dev->poll_controller = rtl8169_netpoll; +#endif + tp->intr_mask = 0xffff; tp->pci_dev = pdev; tp->mmio_addr = ioaddr; _ From ckjohnson@gwi.net Mon Oct 18 16:18:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 16:18:39 -0700 (PDT) Received: from localhost.localdomain (d-216-195-167-225.gwi.net [216.195.167.225]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9INIBFB030010 for ; Mon, 18 Oct 2004 16:18:32 -0700 Received: from [127.0.0.1] (chris [127.0.0.1]) by localhost.localdomain (8.12.11/8.12.11) with ESMTP id i9INHona032103 for ; Mon, 18 Oct 2004 19:17:51 -0400 Message-ID: <41744F1E.9090103@gwi.net> Date: Mon, 18 Oct 2004 19:17:50 -0400 From: "Christopher K. Johnson" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com Subject: Re: IPsec tunnel mode bug - malformed, misaddressed packets References: <41725CF5.2010606@gwi.net> <20041018010816.GA30059@gondor.apana.org.au> In-Reply-To: <20041018010816.GA30059@gondor.apana.org.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10432 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ckjohnson@gwi.net Precedence: bulk X-list: netdev Content-Length: 689 Lines: 22 Herbert Xu wrote: >On Sun, Oct 17, 2004 at 11:52:21AM +0000, Christopher K. Johnson wrote: > > >>There is an ipsec bug in FC2 kernel 2.6.8-1.521 for ipsec tunnel mode. >>I have proven with a packet trace that some packets are >>misaddressed. Specifically it constructs a packet of the form: >>IP header1 | AH header | IP header2 | ESP >> >> >In this case, racoon needs to be taught that only the inner SA >should be marked as tunnel mode. > > I updated the vpn peers to ipsec-tools-0.3.3-1 from fedora core development and the problem is the same. I captured a packet trace to verify. Any takers for an ipsec-tools bug? I'll gladly provide more details off-list. Thanks. From herbert@gondor.apana.org.au Mon Oct 18 16:48:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 16:48:54 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9INmPcv001435 for ; Mon, 18 Oct 2004 16:48:46 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CJhEW-0002KY-00; Tue, 19 Oct 2004 09:48:08 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CJhER-0001vk-00; Tue, 19 Oct 2004 09:48:03 +1000 From: Herbert Xu To: kaber@trash.net (Patrick McHardy) Subject: Re: [PATCH 2.6]: Fix policy update bug when increasing priority of last policy Cc: davem@redhat.com, netdev@oss.sgi.com Organization: Core In-Reply-To: <41742C24.6070305@trash.net> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) Message-Id: Date: Tue, 19 Oct 2004 09:48:03 +1000 X-archive-position: 10433 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 1611 Lines: 48 Patrick McHardy wrote: > > When the last policy for a direction is replaced by a policy > with equal selector but a higher priority, insertion of the > new policy fails. Well spotted, that's two bugs of my creation in one day :) > This patch checks for *p != NULL before continuing the loop. Unfortunately that doesn't fix it completely. The real bug is the fact that we continue with a bogus p pointing to the deleted element. So what we should do is continue without updating p at all. Signed-off-by: Herbert Xu Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- ===== net/xfrm/xfrm_policy.c 1.54 vs edited ===== --- 1.54/net/xfrm/xfrm_policy.c 2004-09-18 08:16:56 +10:00 +++ edited/net/xfrm/xfrm_policy.c 2004-10-19 09:36:47 +10:00 @@ -332,7 +332,7 @@ struct xfrm_policy **newpos = NULL; write_lock_bh(&xfrm_policy_lock); - for (p = &xfrm_policy_list[dir]; (pol=*p)!=NULL; p = &pol->next) { + for (p = &xfrm_policy_list[dir]; (pol=*p)!=NULL;) { if (!delpol && memcmp(&policy->selector, &pol->selector, sizeof(pol->selector)) == 0) { if (excl) { write_unlock_bh(&xfrm_policy_lock); @@ -342,8 +342,10 @@ delpol = pol; if (policy->priority > pol->priority) continue; - } else if (policy->priority >= pol->priority) + } else if (policy->priority >= pol->priority) { + p = &pol->next; continue; + } if (!newpos) newpos = p; if (delpol) From herbert@gondor.apana.org.au Mon Oct 18 16:49:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 16:50:02 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9INntg0001657 for ; Mon, 18 Oct 2004 16:49:56 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CJhGB-0002LE-00; Tue, 19 Oct 2004 09:49:51 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CJhG9-0001wA-00; Tue, 19 Oct 2004 09:49:49 +1000 From: Herbert Xu To: ckjohnson@gwi.net (Christopher K. Johnson) Subject: Re: IPsec tunnel mode bug - malformed, misaddressed packets Cc: netdev@oss.sgi.com Organization: Core In-Reply-To: <41744F1E.9090103@gwi.net> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) Message-Id: Date: Tue, 19 Oct 2004 09:49:49 +1000 X-archive-position: 10434 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 393 Lines: 10 Christopher K. Johnson wrote: > > verify. Any takers for an ipsec-tools bug? I'll gladly provide more They hang out at ipsec-tools-devel@lists.sourceforge.net -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From garzik@havoc.gtf.org Mon Oct 18 16:57:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 16:57:24 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [69.28.190.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9INuvHg002236 for ; Mon, 18 Oct 2004 16:57:17 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id 554217454; Mon, 18 Oct 2004 19:52:54 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i9INqsT7024513; Mon, 18 Oct 2004 19:52:54 -0400 Date: Mon, 18 Oct 2004 19:52:54 -0400 From: Jeff Garzik To: Andrew Morton , Linus Torvalds Cc: netdev@oss.sgi.com Subject: [BK PATCHES] 2.6.x net driver fixes Message-ID: <20041018235254.GA24493@havoc.gtf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-archive-position: 10435 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: 1629 Lines: 52 Please do a bk pull bk://gkernel.bkbits.net/net-drivers-2.6 This will update the following files: drivers/net/typhoon.c | 1 + drivers/net/wan/cycx_x25.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) through these ChangeSets: (04/10/16 1.2201) [PATCH] 64bit fix in cycx_x25.c comparing u32 with ~0UL is wrong Signed-off-by: Al Viro (04/10/15 1.2200) [PATCH] typhoon.c missing include DMA_32BIT_MASK is declared in linux/dma-mapping.h; not all platforms get it from already included headers, so we need explicit include here (fixes breakage at least on alpha and sparc64). Signed-off-by: Al Viro diff -Nru a/drivers/net/typhoon.c b/drivers/net/typhoon.c --- a/drivers/net/typhoon.c 2004-10-18 19:14:46 -04:00 +++ b/drivers/net/typhoon.c 2004-10-18 19:14:46 -04:00 @@ -114,6 +114,7 @@ #include #include #include +#include #include "typhoon.h" #include "typhoon-firmware.h" diff -Nru a/drivers/net/wan/cycx_x25.c b/drivers/net/wan/cycx_x25.c --- a/drivers/net/wan/cycx_x25.c 2004-10-18 19:14:46 -04:00 +++ b/drivers/net/wan/cycx_x25.c 2004-10-18 19:14:46 -04:00 @@ -1195,7 +1195,7 @@ remotelen = strlen(chan->addr); u8 key; - if (card->u.x.connection_keys == ~0UL) { + if (card->u.x.connection_keys == ~0U) { printk(KERN_INFO "%s: too many simultaneous connection " "requests!\n", card->devname); return -EAGAIN; From tgr@reeler.org Mon Oct 18 17:39:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 18 Oct 2004 17:39:11 -0700 (PDT) Received: from rei.rakuen (217-162-107-144.dclient.hispeed.ch [217.162.107.144]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9J0cgLQ002938 for ; Mon, 18 Oct 2004 17:39:02 -0700 Received: from tgr by rei.rakuen with local (Exim 4.34) id 1CJi12-0007Mj-Ri; Tue, 19 Oct 2004 02:38:16 +0200 Date: Tue, 19 Oct 2004 02:38:16 +0200 From: Thomas Graf To: Stephen Hemminger Cc: Jeff Garzik , netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9 2/3] tlan: inline functions should be static + bogus xor Message-ID: <20041019003816.GG19714@rei.reeler.org> References: <20041018140610.6edf1769@zqx3.pdx.osdl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041018140610.6edf1769@zqx3.pdx.osdl.net> X-archive-position: 10436 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 156 Lines: 5 > - return ( ( a && ! b ) || ( ! a && b ) ); > + return a ^ b; Did you notice that this leads to a different result if a or b is greater than 1. Intended? From kaber@trash.net Tue Oct 19 07:17:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 07:17:33 -0700 (PDT) Received: from gw.localnet ([62.206.217.67]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JEHNaV027793 for ; Tue, 19 Oct 2004 07:17:24 -0700 Received: from [172.16.1.123] (helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1CJuu5-0001Yi-00; Tue, 19 Oct 2004 16:23:57 +0200 Message-ID: <417521A2.4010500@trash.net> Date: Tue, 19 Oct 2004 16:16:02 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 X-Accept-Language: en MIME-Version: 1.0 To: Herbert Xu CC: "David S. Miller" , netdev@oss.sgi.com, ipsec-tools-devel@lists.sourceforge.net Subject: Re: [XFRM] Allow transport SAs even when there is no policy References: <4172943B.8050904@trash.net> <20041017212317.GA28615@gondor.apana.org.au> <4172F1AB.4020305@trash.net> <20041017231258.GA29294@gondor.apana.org.au> <417428CF.2050802@trash.net> <20041018214326.GA6589@gondor.apana.org.au> In-Reply-To: <20041018214326.GA6589@gondor.apana.org.au> Content-Type: multipart/mixed; boundary="------------020002090801030001080100" X-archive-position: 10437 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kaber@trash.net Precedence: bulk X-list: netdev Content-Length: 1882 Lines: 59 This is a multi-part message in MIME format. --------------020002090801030001080100 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Herbert Xu wrote: >What I meant to say is all packets with tunnel mode SAs should be >rejected since we don't allow optional tunnel transforms for security >reasons. > >This patch fixes it. > Looks good. So you agree we should also apply my patch to xfrm_policy_lookup (attached again with less confusing subject) ? It makes packets with a secpath fall through to __xfrm_policy_check when the policy list is empty, so the default policy is always the same. This will break setups with keying daemons that don't add forward policies for tunnel mode SAs. Regards Patrick --------------020002090801030001080100 Content-Type: text/plain; name="x" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="x" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/19 16:04:44+02:00 kaber@coreworks.de # [XFRM]: Apply policy checks to packets with a secpath when the policy list is empty # # Signed-off-by: Patrick McHardy # # include/net/xfrm.h # 2004/10/19 16:04:18+02:00 kaber@coreworks.de +1 -1 # [XFRM]: Apply policy checks to packets with a secpath when the policy list is empty # # Signed-off-by: Patrick McHardy # diff -Nru a/include/net/xfrm.h b/include/net/xfrm.h --- a/include/net/xfrm.h 2004-10-19 16:05:39 +02:00 +++ b/include/net/xfrm.h 2004-10-19 16:05:39 +02:00 @@ -601,7 +601,7 @@ if (sk && sk->sk_policy[XFRM_POLICY_IN]) return __xfrm_policy_check(sk, dir, skb, family); - return !xfrm_policy_list[dir] || + return (!xfrm_policy_list[dir] && !skb->sp) || (skb->dst->flags & DST_NOPOLICY) || __xfrm_policy_check(sk, dir, skb, family); } --------------020002090801030001080100-- From kaber@trash.net Tue Oct 19 07:25:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 07:25:24 -0700 (PDT) Received: from gw.localnet ([62.206.217.67]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JEPJ19029490 for ; Tue, 19 Oct 2004 07:25:20 -0700 Received: from [172.16.1.123] (helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1CJv20-0001ZS-00; Tue, 19 Oct 2004 16:32:08 +0200 Message-ID: <4175238C.7010907@trash.net> Date: Tue, 19 Oct 2004 16:24:12 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 X-Accept-Language: en MIME-Version: 1.0 To: Herbert Xu CC: davem@redhat.com, netdev@oss.sgi.com Subject: Re: [PATCH 2.6]: Fix policy update bug when increasing priority of last policy References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10438 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kaber@trash.net Precedence: bulk X-list: netdev Content-Length: 434 Lines: 20 Herbert Xu wrote: >Patrick McHardy wrote: > >>This patch checks for *p != NULL before continuing the loop. >> >> > >Unfortunately that doesn't fix it completely. The real bug is >the fact that we continue with a bogus p pointing to the deleted >element. So what we should do is continue without updating p >at all. > > You're right, your patch is better. I've tested it and it works fine. Regards Patrick From jgarzik@pobox.com Tue Oct 19 08:29:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 08:29:56 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JFTpfR003210 for ; Tue, 19 Oct 2004 08:29:52 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CJvvb-0005Pe-Vx; Tue, 19 Oct 2004 16:29:36 +0100 Message-ID: <417532D5.1020300@pobox.com> Date: Tue, 19 Oct 2004 11:29:25 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Francois Romieu CC: netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9-rc4-bk3-netdev3 1/3] r8169: always clean Tx desc References: <20041018230823.GB19990@electric-eye.fr.zoreil.com> In-Reply-To: <20041018230823.GB19990@electric-eye.fr.zoreil.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10439 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: 13 Lines: 2 applied 1-3 From a.kasparas@gmc.lt Tue Oct 19 08:31:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 08:31:46 -0700 (PDT) Received: from sizifas.gmc.lt (esc.ortopedija.lt [213.190.36.10]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JFVdAP003468 for ; Tue, 19 Oct 2004 08:31:41 -0700 Received: from [10.0.0.83] ([::ffff:10.0.0.83]) by sizifas.gmc.lt with esmtp; Tue, 19 Oct 2004 18:31:23 +0300 Message-ID: <4175334B.3000504@gmc.lt> Date: Tue, 19 Oct 2004 18:31:23 +0300 From: Aidas Kasparas User-Agent: Mozilla Thunderbird 0.8 (X11/20040918) X-Accept-Language: lt, en, ru, fr MIME-Version: 1.0 To: Herbert Xu CC: Patrick McHardy , "David S. Miller" , netdev@oss.sgi.com, ipsec-tools-devel@lists.sourceforge.net Subject: Re: [Ipsec-tools-devel] Re: [PATCH 2.6]: Check against correct policy list in ip_forward/ip6_forward References: <4172943B.8050904@trash.net> <20041017212317.GA28615@gondor.apana.org.au> <4172F1AB.4020305@trash.net> <20041017231258.GA29294@gondor.apana.org.au> In-Reply-To: <20041017231258.GA29294@gondor.apana.org.au> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10440 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: a.kasparas@gmc.lt Precedence: bulk X-list: netdev Content-Length: 152 Lines: 13 Herbert Xu wrote: > > So let's just fix racoon. > I'm sorry, what is wrong with racoon? -- Aidas Kasparas IT administrator GM Consult Group, UAB From kaber@trash.net Tue Oct 19 08:38:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 08:38:52 -0700 (PDT) Received: from gw.localnet ([62.206.217.67]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JFckZW003990 for ; Tue, 19 Oct 2004 08:38:47 -0700 Received: from [172.16.1.123] (helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1CJwBn-0001h6-00; Tue, 19 Oct 2004 17:46:19 +0200 Message-ID: <417534F1.1010401@trash.net> Date: Tue, 19 Oct 2004 17:38:25 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 X-Accept-Language: en MIME-Version: 1.0 To: Aidas Kasparas CC: netdev@oss.sgi.com, ipsec-tools-devel@lists.sourceforge.net Subject: Re: [Ipsec-tools-devel] Re: [PATCH 2.6]: Check against correct policy list in ip_forward/ip6_forward References: <4172943B.8050904@trash.net> <20041017212317.GA28615@gondor.apana.org.au> <4172F1AB.4020305@trash.net> <20041017231258.GA29294@gondor.apana.org.au> <4175334B.3000504@gmc.lt> In-Reply-To: <4175334B.3000504@gmc.lt> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10441 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kaber@trash.net Precedence: bulk X-list: netdev Content-Length: 313 Lines: 13 Aidas Kasparas wrote: > I'm sorry, what is wrong with racoon? When generate_policy is set to on racoon doesn't generate forward policies for tunnel mode SAs, so traffic forwarded from a tunnel is not subject to policy checks. I have a patch which fixes this, I will post it a couple of days. Regards Patrick From a.kasparas@gmc.lt Tue Oct 19 08:57:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 08:57:41 -0700 (PDT) Received: from sizifas.gmc.lt (esc.ortopedija.lt [213.190.36.10]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JFvYTm004697 for ; Tue, 19 Oct 2004 08:57:35 -0700 Received: from [10.0.0.83] ([::ffff:10.0.0.83]) by sizifas.gmc.lt with esmtp; Tue, 19 Oct 2004 18:57:19 +0300 Message-ID: <4175395F.9050409@gmc.lt> Date: Tue, 19 Oct 2004 18:57:19 +0300 From: Aidas Kasparas User-Agent: Mozilla Thunderbird 0.8 (X11/20040918) X-Accept-Language: lt, en, ru, fr MIME-Version: 1.0 To: Patrick McHardy CC: netdev@oss.sgi.com, ipsec-tools-devel@lists.sourceforge.net Subject: Re: [Ipsec-tools-devel] Re: [PATCH 2.6]: Check against correct policy list in ip_forward/ip6_forward References: <4172943B.8050904@trash.net> <20041017212317.GA28615@gondor.apana.org.au> <4172F1AB.4020305@trash.net> <20041017231258.GA29294@gondor.apana.org.au> <4175334B.3000504@gmc.lt> <417534F1.1010401@trash.net> In-Reply-To: <417534F1.1010401@trash.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10442 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: a.kasparas@gmc.lt Precedence: bulk X-list: netdev Content-Length: 799 Lines: 37 Patrick McHardy wrote: > Aidas Kasparas wrote: > >> I'm sorry, what is wrong with racoon? > > > When generate_policy is set to on racoon doesn't generate forward > policies for tunnel mode SAs, so traffic forwarded from a tunnel > is not subject to policy checks. Patrick, what _forward_ policies should racoon generate. And WHY?! Could you please specify for the case when: - remote host has address A.A.A.A - security gateway have insecure adress B.B.B.B - secured network is C.C.C.0/24, security gateway's address C.C.C.C what policies in your oppinion has to be inserted into SPD for this setup by racoon? Thanks in advance. > > I have a patch which fixes this, I will post it a couple of days. > > Regards > Patrick > -- Aidas Kasparas IT administrator GM Consult Group, UAB From bobwirka@rtcworks.com Tue Oct 19 09:56:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 09:57:05 -0700 (PDT) Received: from smtp804.mail.sc5.yahoo.com (smtp804.mail.sc5.yahoo.com [66.163.168.183]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9JGuxqw009735 for ; Tue, 19 Oct 2004 09:56:59 -0700 Received: from unknown (HELO ?192.168.1.97?) (bobwirka@ameritech.net@68.73.107.68 with plain) by smtp804.mail.sc5.yahoo.com with SMTP; 19 Oct 2004 16:52:39 -0000 Message-ID: <41754656.2060202@rtcworks.com> Date: Tue, 19 Oct 2004 11:52:38 -0500 From: Bob Wirka User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 CC: linux-net@vger.kernel.org, netdev@oss.sgi.com Subject: Re: Network Driver and NFS Root References: <417040C2.6070408@rtcworks.com> In-Reply-To: <417040C2.6070408@rtcworks.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10443 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bobwirka@rtcworks.com Precedence: bulk X-list: netdev Content-Length: 1960 Lines: 55 First, thanks for the responses to my earlier post. I appreciate it. The ethernet driver code is now executing at boot time; adding either '__initcall(init_fcn)' or 'init_module(init_fcn)' will cause the kernel to call 'init_fcn'. That's the good news. The bad news is that the initializatin code causes a kernel oops when accessing the 'net_device' structure that is passed to it by the kernel (as a pointer). When the code either reads or writes to the 'net_device' structure you get: Unable to handle kernel paging request at virtual address 00010f24 Can anyone shed some light on this? I've printed out the value of the 'net_device' pointer, and it's not a null pointer. Thanks, Bob Wirka Realtime Control Works ---------------ORIGINAL POST---------------------------- Bob Wirka wrote: > Hello, > > I'm trying to build a kernel that mounts a NFS root file system. This > is an embedded system; it uses an SMSC LAN91C111 network chip that is > hardwired to I/O addres 0x300 and IRQ 5. I've been using the driver > (as supplied by SMSC) as a module, and it works fine. Now I'm trying > to incorporate it into the kernel build so that I can mount an NFS > file system when the system boots. > > I've added the source code to the kernel tree, and modified the > Makefile(s) and Config.in files so that the driver <> to be > compiled into the kernel. The kernel will load, but the chip is not > initialized and the NFS fails. > > Since I don't know how to pass the io address and irq number to the > kernel, I've hard-coded them into the driver's init function (which I > don't see being called). > > If someone could point me in the right direction, I'd appreciate it. > > Thank you, > > Bob Wirka > Realtime Control Works > - > To unsubscribe from this list: send the line "unsubscribe linux-net" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > From yoshfuji@linux-ipv6.org Tue Oct 19 10:25:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 10:26:05 -0700 (PDT) Received: from yue.st-paulia.net (yue.linux-ipv6.org [203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JHPwnt010628 for ; Tue, 19 Oct 2004 10:25:58 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id BCCEF33CE5; Wed, 20 Oct 2004 02:26:23 +0900 (JST) Date: Wed, 20 Oct 2004 02:26:22 +0900 (JST) Message-Id: <20041020.022622.27982693.yoshfuji@linux-ipv6.org> To: lukasz@trabinski.net Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: unregister_netdevice 2.6.9 From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: References: Organization: USAGI Project X-URL: http://www.yoshifuji.org/%7Ehideaki/ X-Fingerprint: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA X-PGP-Key-URL: http://www.yoshifuji.org/%7Ehideaki/hideaki@yoshifuji.org.asc X-Face: "5$Al-.M>NJ%a'@hhZdQm:."qn~PA^gq4o*>iCFToq*bAi#4FRtx}enhuQKz7fNqQz\BYU] $~O_5m-9'}MIs`XGwIEscw;e5b>n"B_?j/AkL~i/MEaZBLP X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 10444 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: yoshfuji@linux-ipv6.org Precedence: bulk X-list: netdev Content-Length: 615 Lines: 19 In article (at Tue, 19 Oct 2004 17:58:58 +0200 (CEST)), Lukasz Trabinski says: > After shutdown/reboot : > > unregister_netdevice: waiting for xxxx to become free. Usage count = 1 : > whreis xxxx is name of sit device, created via script Is your box acting as router, or host? % sysctl -a |grep ipv6|grep forwarding What is happend if you let the interface down and delete it before becore rebooting? Thanks. -- Hideaki YOSHIFUJI @ USAGI Project GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA From bobwirka@rtcworks.com Tue Oct 19 11:03:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 11:03:47 -0700 (PDT) Received: from smtp805.mail.sc5.yahoo.com (smtp805.mail.sc5.yahoo.com [66.163.168.184]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9JI3fdv011614 for ; Tue, 19 Oct 2004 11:03:42 -0700 Received: from unknown (HELO ?192.168.1.97?) (bobwirka@ameritech.net@68.73.107.68 with plain) by smtp805.mail.sc5.yahoo.com with SMTP; 19 Oct 2004 18:03:17 -0000 Message-ID: <417556E4.4090406@rtcworks.com> Date: Tue, 19 Oct 2004 13:03:16 -0500 From: Bob Wirka User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 CC: netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Re: NFS and Network Driver Question References: <41704198.8000206@rtcworks.com> In-Reply-To: <41704198.8000206@rtcworks.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10445 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bobwirka@rtcworks.com Precedence: bulk X-list: netdev Content-Length: 1652 Lines: 48 Please disregard my last post, I believe the problem is solved. Thanks again to all, especially Thomas Graf. The essential things to learn from this exercise are: 1. A network driver compiled into the kernel must have an initialization function that allocates the 'net_device' structure and passes this to the kernel through the 'register_netdev()' call. You can reuse the module-version initialization function; rename it and prefix it's declaration with 'static __init'. 2. Add the 'module_init( init_fcn )' macro after the initialization function. This will cause the kernel to execute that code when booting. Onward and upward. Bob Wirka Realtime Control Works Bob Wirka wrote: > Hello, > > I'm trying to build a kernel that mounts a NFS root file system. This > is an embedded system; it uses an SMSC LAN91C111 network chip that is > hardwired to I/O addres 0x300 and IRQ 5. I've been using the driver > (as supplied by SMSC) as a module, and it works fine. Now I'm trying > to incorporate it into the kernel build so that I can mount an NFS > file system when the system boots. > > I've added the source code to the kernel tree, and modified the > Makefile(s) and Config.in files so that the driver <> to be > compiled into the kernel. The kernel will load, but the chip is not > initialized and the NFS fails. > > Since I don't know how to pass the io address and irq number to the > kernel, I've hard-coded them into the driver's init function (which I > don't see being called). > > If someone could point me in the right direction, I'd appreciate it. > > Thank you, > > Bob Wirka > Realtime Control Works > > From shemminger@osdl.org Tue Oct 19 11:16:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 11:16:14 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JIGACn012144 for ; Tue, 19 Oct 2004 11:16:10 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9JIFnWL003956 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 19 Oct 2004 11:15:50 -0700 Date: Tue, 19 Oct 2004 11:16:51 -0700 From: Stephen Hemminger To: Thomas Graf Cc: Jeff Garzik , netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9 2/3] tlan: inline functions should be static + bogus xor Message-Id: <20041019111651.10c5f3ec@zqx3.pdx.osdl.net> In-Reply-To: <20041019003816.GG19714@rei.reeler.org> References: <20041018140610.6edf1769@zqx3.pdx.osdl.net> <20041019003816.GG19714@rei.reeler.org> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10446 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 Content-Length: 462 Lines: 13 On Tue, 19 Oct 2004 02:38:16 +0200 Thomas Graf wrote: > > - return ( ( a && ! b ) || ( ! a && b ) ); > > + return a ^ b; > > Did you notice that this leads to a different result if a > or b is greater than 1. Intended? I am redoing the tlan patch series. There is actually a better implementation of the mcast hash already in the code but #ifdef'd out. Tested it and it generates the same values. So the whole old xor code just goes away... From acme@conectiva.com.br Tue Oct 19 11:18:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 11:18:10 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JIHt0u012495 for ; Tue, 19 Oct 2004 11:18:02 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 41FEA47355; Tue, 19 Oct 2004 16:17:39 -0200 (BRST) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id EDBEB47354 for ; Tue, 19 Oct 2004 16:17:38 -0200 (BRST) Received: (qmail 10856 invoked by uid 0); 19 Oct 2004 19:14:16 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 19 Oct 2004 19:14:16 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id 0D44F14639; Tue, 19 Oct 2004 16:21:24 -0200 (BRST) Message-ID: <41755B3F.2040001@conectiva.com.br> Date: Tue, 19 Oct 2004 15:21:51 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Chris Wright Cc: netdev@oss.sgi.com Subject: [PATCH][LSM] remove net related includes from security.h X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary="------------040301020705080300040300" X-Bogosity: No, tests=bogofilter, spamicity=0.499156, version=0.16.3 X-archive-position: 10447 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 Content-Length: 5148 Lines: 160 This is a multi-part message in MIME format. --------------040301020705080300040300 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Chris, As discussed on irc. Best Regards, - Arnaldo --------------040301020705080300040300 Content-Type: text/plain; name="lsm.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="lsm.patch" 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.2119, 2004-10-19 15:00:01-03:00, acme@conectiva.com.br [LSM] remove net related includes from security.h With this we're back to the times when changing skbuff.h only triggers rebuild of _net_ related stuff 8) This uncovered a bug in rmap.h, that was not including mm.h to get the definition of struct vm_area_struct, working by luck. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Chris Wright include/linux/rmap.h | 1 + include/linux/security.h | 20 +++++++------------- security/commoncap.c | 17 +++++++++++++++++ 3 files changed, 25 insertions(+), 13 deletions(-) diff -Nru a/include/linux/rmap.h b/include/linux/rmap.h --- a/include/linux/rmap.h 2004-10-19 15:19:36 -03:00 +++ b/include/linux/rmap.h 2004-10-19 15:19:36 -03:00 @@ -7,6 +7,7 @@ #include #include #include +#include #include /* diff -Nru a/include/linux/security.h b/include/linux/security.h --- a/include/linux/security.h 2004-10-19 15:19:36 -03:00 +++ b/include/linux/security.h 2004-10-19 15:19:36 -03:00 @@ -31,8 +31,6 @@ #include #include #include -#include -#include /* * These functions are in security/capability.c and are used @@ -53,18 +51,14 @@ extern int cap_syslog (int type); extern int cap_vm_enough_memory (long pages); -static inline int cap_netlink_send (struct sock *sk, struct sk_buff *skb) -{ - NETLINK_CB (skb).eff_cap = current->cap_effective; - return 0; -} +struct msghdr; +struct sk_buff; +struct sock; +struct sockaddr; +struct socket; -static inline int cap_netlink_recv (struct sk_buff *skb) -{ - if (!cap_raised (NETLINK_CB (skb).eff_cap, CAP_NET_ADMIN)) - return -EPERM; - return 0; -} +extern int cap_netlink_send(struct sock *sk, struct sk_buff *skb); +extern int cap_netlink_recv(struct sk_buff *skb); /* * Values used in the task_security_ops calls diff -Nru a/security/commoncap.c b/security/commoncap.c --- a/security/commoncap.c 2004-10-19 15:19:36 -03:00 +++ b/security/commoncap.c 2004-10-19 15:19:36 -03:00 @@ -24,6 +24,23 @@ #include #include +int cap_netlink_send(struct sock *sk, struct sk_buff *skb) +{ + NETLINK_CB(skb).eff_cap = current->cap_effective; + return 0; +} + +EXPORT_SYMBOL(cap_netlink_send); + +int cap_netlink_recv(struct sk_buff *skb) +{ + if (!cap_raised(NETLINK_CB(skb).eff_cap, CAP_NET_ADMIN)) + return -EPERM; + return 0; +} + +EXPORT_SYMBOL(cap_netlink_recv); + int cap_capable (struct task_struct *tsk, int cap) { /* Derived from include/linux/sched.h:capable. */ =================================================================== This BitKeeper patch contains the following changesets: 1.2119 ## Wrapped with gzip_uu ## M'XL( +A:=4$ ^U8:V_;-A3];/Z*._3#DBV625&2+;L)\D07-"\D+;JA*PR* MHBS!>@04%3>8]M]W:>?AID[0!-VGUJ]8%'GNX;WW',EY!>]KI8<=(0M%7L$? M56V&'5F52IKL2CBR*IQ(XXGSJL(3/?79:-&SDWO1M%=/QU&3)%W7";IY)45. M<.:9,#*%*Z7K88?\X,W[HYUS0C8W82\5Y41=* .;F\14^DKD M<;TM3)I7I8-QRKI09LZAO9O:NI2Z^/19GU,_:%E O7XK6L- H]8 MAML/M_$EBL1.K&A)=%5 KV>C,7#LI MKL'7A\Q@NM.LAIGZ52N(A)PB.QQ28+("E\U258*TC+)R O745G&^NBKS:S Z MFTRP?A@N:K(\ABJ!,88?W\6O#2Z P?HBWCL;JBDELM1X4D#43) BZ$)<.ND& MQA4&9J*&LC(WU#$L+BP*)[7$)K@U2RY6259F)JM*&[(VNI$&KHJQT$J,%X<; MN&Q6Z:GE'5U#WLBILV!QD4U*%7@@[NL1B5+ G;%72"L'A6.45O%Y9 MQ:VO$?92C?OZ@,E(#;R6]FBV7=5Q[E1ZLD7> @_YP"-G]WU,NL]\$$(%)5LP MT6JR/=652.>]7IZ5S>?>?7D7K=-GH>OZ^&C]( S=5O'(C;#&_;[+?2J# MU6WZ).A""WT_Y&'+>3BPG,3TLKC;[L?;YO[T &=1XSD&HK@N\[GGM;3O,=;Z M-.:)ZBCK%M. M@\!OO83[/E4,_'/+P:9]C/WWNA_2YA?I.H:MG\Q?ZUMG* MCG^!_QUB\Y%7-V#P>H%F\[4UU]4J%5I=_1]&0';*6&>J=G9UUMQ3@<+@;%G"ZS_4V$_I,+FUY$' EO5;"\1F!L ZY.L-( 0 M-OFHL>FX5F6\=I.7NL*J_E9/-VX3=7-?;\>B=?(/Z9PM2M/=LN X/$^%&I&.5J;1)= 1^9?\30[^/#L]?S>^^.MX]_1H M[2&1]1%.>S-W_+KJ\E&&?.K=M\_3]' W8@ W0 MBUCK^E?>Z!2_;] 'QR&%#\ MO$E)44_26(_(E\*_/T:K^N) Q,NS<4"9$=D/7 @0MX\QU&>C4-XO][_18Q"/ =&M3H_M\@,E5R6C?%9A &@P%-./D/)"G3TW$1 --------------040301020705080300040300-- From shemminger@osdl.org Tue Oct 19 11:23:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 11:23:56 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JINkkU012926 for ; Tue, 19 Oct 2004 11:23:47 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9JINQWL004665 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 19 Oct 2004 11:23:26 -0700 Date: Tue, 19 Oct 2004 11:18:18 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9 1/5] tlan: use netdev_priv (rev 2) Message-Id: <20041019111818.3586fc7f@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10448 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 Content-Length: 7672 Lines: 313 Use netdev_priv Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/tlan.c b/drivers/net/tlan.c --- a/drivers/net/tlan.c 2004-10-19 11:03:02 -07:00 +++ b/drivers/net/tlan.c 2004-10-19 11:03:02 -07:00 @@ -382,7 +382,7 @@ static inline void TLan_SetTimer( struct net_device *dev, u32 ticks, u32 type ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); unsigned long flags = 0; if (!in_irq()) @@ -438,7 +438,7 @@ static void __devexit tlan_remove_one( struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata( pdev ); - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); unregister_netdev( dev ); @@ -557,7 +557,7 @@ SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); - priv = dev->priv; + priv = netdev_priv(dev); priv->pciDev = pdev; @@ -693,7 +693,7 @@ while( tlan_have_eisa ) { dev = TLan_Eisa_Devices; - priv = dev->priv; + priv = netdev_priv(dev); if (priv->dmaStorage) { pci_free_consistent(priv->pciDev, priv->dmaSize, priv->dmaStorage, priv->dmaStorageDMA ); } @@ -854,7 +854,7 @@ int i; TLanPrivateInfo *priv; - priv = dev->priv; + priv = netdev_priv(dev); if ( bbuf ) { dma_size = ( TLAN_NUM_RX_LISTS + TLAN_NUM_TX_LISTS ) @@ -937,7 +937,7 @@ static int TLan_Open( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); int err; priv->tlanRev = TLan_DioRead8( dev->base_addr, TLAN_DEF_REVISION ); @@ -983,7 +983,7 @@ static int TLan_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); struct mii_ioctl_data *data = if_mii(rq); u32 phy = priv->phy[priv->phyNum]; @@ -1062,7 +1062,7 @@ static int TLan_StartTx( struct sk_buff *skb, struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); TLanList *tail_list; dma_addr_t tail_list_phys; u8 *tail_buffer; @@ -1170,7 +1170,7 @@ TLanPrivateInfo *priv; dev = dev_id; - priv = dev->priv; + priv = netdev_priv(dev); spin_lock(&priv->lock); @@ -1211,7 +1211,7 @@ static int TLan_Close(struct net_device *dev) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); netif_stop_queue(dev); priv->neg_be_verbose = 0; @@ -1251,7 +1251,7 @@ static struct net_device_stats *TLan_GetStats( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); int i; /* Should only read stats if open ? */ @@ -1270,7 +1270,7 @@ TLan_PrintList( priv->txList + i, "TX", i ); } - return ( &( (TLanPrivateInfo *) dev->priv )->stats ); + return ( &( (TLanPrivateInfo *) netdev_priv(dev) )->stats ); } /* TLan_GetStats */ @@ -1405,7 +1405,7 @@ u32 TLan_HandleTxEOF( struct net_device *dev, u16 host_int ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); int eoc = 0; TLanList *head_list; dma_addr_t head_list_phys; @@ -1527,7 +1527,7 @@ u32 TLan_HandleRxEOF( struct net_device *dev, u16 host_int ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u32 ack = 0; int eoc = 0; u8 *head_buffer; @@ -1694,7 +1694,7 @@ u32 TLan_HandleTxEOC( struct net_device *dev, u16 host_int ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); TLanList *head_list; dma_addr_t head_list_phys; u32 ack = 1; @@ -1742,7 +1742,7 @@ u32 TLan_HandleStatusCheck( struct net_device *dev, u16 host_int ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u32 ack; u32 error; u8 net_sts; @@ -1817,7 +1817,7 @@ u32 TLan_HandleRxEOC( struct net_device *dev, u16 host_int ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); dma_addr_t head_list_phys; u32 ack = 1; @@ -1878,7 +1878,7 @@ void TLan_Timer( unsigned long data ) { struct net_device *dev = (struct net_device *) data; - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u32 elapsed; unsigned long flags = 0; @@ -1958,7 +1958,7 @@ void TLan_ResetLists( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); int i; TLanList *list; dma_addr_t list_phys; @@ -2018,7 +2018,7 @@ void TLan_FreeLists( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); int i; TLanList *list; struct sk_buff *skb; @@ -2138,7 +2138,7 @@ void TLan_ReadAndClearStats( struct net_device *dev, int record ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u32 tx_good, tx_under; u32 rx_good, rx_over; u32 def_tx, crc, code; @@ -2214,7 +2214,7 @@ void TLan_ResetAdapter( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); int i; u32 addr; u32 data; @@ -2300,7 +2300,7 @@ void TLan_FinishReset( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u8 data; u32 phy; u8 sio; @@ -2464,7 +2464,7 @@ void TLan_PhyPrint( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u16 i, data0, data1, data2, data3, phy; phy = priv->phy[priv->phyNum]; @@ -2513,7 +2513,7 @@ void TLan_PhyDetect( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u16 control; u16 hi; u16 lo; @@ -2560,7 +2560,7 @@ void TLan_PhyPowerDown( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u16 value; TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Powering down PHY(s).\n", dev->name ); @@ -2585,7 +2585,7 @@ void TLan_PhyPowerUp( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u16 value; TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Powering up PHY.\n", dev->name ); @@ -2606,7 +2606,7 @@ void TLan_PhyReset( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u16 phy; u16 value; @@ -2634,7 +2634,7 @@ void TLan_PhyStartLink( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u16 ability; u16 control; u16 data; @@ -2721,7 +2721,7 @@ void TLan_PhyFinishAutoNeg( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u16 an_adv; u16 an_lpa; u16 data; @@ -2805,7 +2805,7 @@ void TLan_PhyMonitor( struct net_device *dev ) { - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); u16 phy; u16 phy_status; @@ -2882,7 +2882,7 @@ u32 i; int err; int minten; - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); unsigned long flags = 0; err = FALSE; @@ -3051,7 +3051,7 @@ u16 sio; int minten; unsigned long flags = 0; - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); outw(TLAN_NET_SIO, dev->base_addr + TLAN_DIO_ADR); sio = dev->base_addr + TLAN_DIO_DATA + TLAN_NET_SIO; @@ -3278,7 +3278,7 @@ int TLan_EeReadByte( struct net_device *dev, u8 ee_addr, u8 *data ) { int err; - TLanPrivateInfo *priv = dev->priv; + TLanPrivateInfo *priv = netdev_priv(dev); unsigned long flags = 0; int ret=0; From shemminger@osdl.org Tue Oct 19 11:23:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 11:23:58 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JINmMB012928 for ; Tue, 19 Oct 2004 11:23:49 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9JINSWL004674 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 19 Oct 2004 11:23:29 -0700 Date: Tue, 19 Oct 2004 11:20:31 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9 3/5] tlan: use module_param (rev2) Message-Id: <20041019112031.03f6c011@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10450 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 Content-Length: 1886 Lines: 53 Use module_param Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/tlan.c b/drivers/net/tlan.c --- a/drivers/net/tlan.c 2004-10-19 11:07:22 -07:00 +++ b/drivers/net/tlan.c 2004-10-19 11:07:22 -07:00 @@ -167,6 +167,7 @@ *******************************************************************************/ #include +#include #include #include #include @@ -193,16 +194,21 @@ static int duplex[MAX_TLAN_BOARDS]; static int speed[MAX_TLAN_BOARDS]; static int boards_found; +/* Turn on debugging. See Documentation/networking/tlan.txt for details */ +static int debug; +static int bbuf; MODULE_AUTHOR("Maintainer: Samuel Chessman "); MODULE_DESCRIPTION("Driver for TI ThunderLAN based ethernet PCI adapters"); MODULE_LICENSE("GPL"); -MODULE_PARM(aui, "1-" __MODULE_STRING(MAX_TLAN_BOARDS) "i"); -MODULE_PARM(duplex, "1-" __MODULE_STRING(MAX_TLAN_BOARDS) "i"); -MODULE_PARM(speed, "1-" __MODULE_STRING(MAX_TLAN_BOARDS) "i"); -MODULE_PARM(debug, "i"); -MODULE_PARM(bbuf, "i"); +static int num_boards; +module_param_array(aui, int, num_boards, 0); +module_param_array(duplex, int, num_boards, 0); +module_param_array(speed, int, num_boards, 0); +module_param(debug, int, 0); +module_param(bbuf, int, 0); + MODULE_PARM_DESC(aui, "ThunderLAN use AUI port(s) (0-1)"); MODULE_PARM_DESC(duplex, "ThunderLAN duplex setting(s) (0-default, 1-half, 2-full)"); MODULE_PARM_DESC(speed, "ThunderLAN port speen setting(s) (0,10,100)"); @@ -212,10 +218,6 @@ /* Define this to enable Link beat monitoring */ #undef MONITOR -/* Turn on debugging. See Documentation/networking/tlan.txt for details */ -static int debug; - -static int bbuf; static u8 *TLanPadBuffer; static dma_addr_t TLanPadBufferDMA; static char TLanSignature[] = "TLAN"; From shemminger@osdl.org Tue Oct 19 11:23:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 11:23:59 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JINn32012929 for ; Tue, 19 Oct 2004 11:23:50 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9JINTWL004678 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 19 Oct 2004 11:23:30 -0700 Date: Tue, 19 Oct 2004 11:21:50 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9 4/5] tlan: make inline's static (rev2) Message-Id: <20041019112150.5d59474d@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10451 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 Content-Length: 3262 Lines: 114 Make inline functions static to avoid polluting global namespace. Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/tlan.h b/drivers/net/tlan.h --- a/drivers/net/tlan.h 2004-10-19 11:09:38 -07:00 +++ b/drivers/net/tlan.h 2004-10-19 11:09:38 -07:00 @@ -443,7 +443,7 @@ /* Routines to access internal registers. */ -inline u8 TLan_DioRead8(u16 base_addr, u16 internal_addr) +static inline u8 TLan_DioRead8(u16 base_addr, u16 internal_addr) { outw(internal_addr, base_addr + TLAN_DIO_ADR); return (inb((base_addr + TLAN_DIO_DATA) + (internal_addr & 0x3))); @@ -453,7 +453,7 @@ -inline u16 TLan_DioRead16(u16 base_addr, u16 internal_addr) +static inline u16 TLan_DioRead16(u16 base_addr, u16 internal_addr) { outw(internal_addr, base_addr + TLAN_DIO_ADR); return (inw((base_addr + TLAN_DIO_DATA) + (internal_addr & 0x2))); @@ -463,7 +463,7 @@ -inline u32 TLan_DioRead32(u16 base_addr, u16 internal_addr) +static inline u32 TLan_DioRead32(u16 base_addr, u16 internal_addr) { outw(internal_addr, base_addr + TLAN_DIO_ADR); return (inl(base_addr + TLAN_DIO_DATA)); @@ -473,7 +473,7 @@ -inline void TLan_DioWrite8(u16 base_addr, u16 internal_addr, u8 data) +static inline void TLan_DioWrite8(u16 base_addr, u16 internal_addr, u8 data) { outw(internal_addr, base_addr + TLAN_DIO_ADR); outb(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x3)); @@ -483,7 +483,7 @@ -inline void TLan_DioWrite16(u16 base_addr, u16 internal_addr, u16 data) +static inline void TLan_DioWrite16(u16 base_addr, u16 internal_addr, u16 data) { outw(internal_addr, base_addr + TLAN_DIO_ADR); outw(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x2)); @@ -493,7 +493,7 @@ -inline void TLan_DioWrite32(u16 base_addr, u16 internal_addr, u32 data) +static inline void TLan_DioWrite32(u16 base_addr, u16 internal_addr, u32 data) { outw(internal_addr, base_addr + TLAN_DIO_ADR); outl(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x2)); @@ -503,7 +503,7 @@ #if 0 -inline void TLan_ClearBit(u8 bit, u16 port) +static inline void TLan_ClearBit(u8 bit, u16 port) { outb_p(inb_p(port) & ~bit, port); } @@ -511,7 +511,7 @@ -inline int TLan_GetBit(u8 bit, u16 port) +static inline int TLan_GetBit(u8 bit, u16 port) { return ((int) (inb_p(port) & bit)); } @@ -519,7 +519,7 @@ -inline void TLan_SetBit(u8 bit, u16 port) +static inline void TLan_SetBit(u8 bit, u16 port) { outb_p(inb_p(port) | bit, port); } @@ -532,7 +532,7 @@ #ifdef I_LIKE_A_FAST_HASH_FUNCTION /* given 6 bytes, view them as 8 6-bit numbers and return the XOR of those */ /* the code below is about seven times as fast as the original code */ -inline u32 TLan_HashFunc( u8 *a ) +static inline u32 TLan_HashFunc( u8 *a ) { u8 hash; @@ -548,14 +548,14 @@ #else /* original code */ -inline u32 xor( u32 a, u32 b ) +static inline u32 xor( u32 a, u32 b ) { return ( ( a && ! b ) || ( ! a && b ) ); } #define XOR8( a, b, c, d, e, f, g, h ) xor( a, xor( b, xor( c, xor( d, xor( e, xor( f, xor( g, h ) ) ) ) ) ) ) #define DA( a, bit ) ( ( (u8) a[bit/8] ) & ( (u8) ( 1 << bit%8 ) ) ) -inline u32 TLan_HashFunc( u8 *a ) +static inline u32 TLan_HashFunc( u8 *a ) { u32 hash; From shemminger@osdl.org Tue Oct 19 11:23:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 11:23:57 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JINl5N012927 for ; Tue, 19 Oct 2004 11:23:47 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9JINRWL004669 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 19 Oct 2004 11:23:28 -0700 Date: Tue, 19 Oct 2004 11:19:50 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9 2/5] tlan: get rid of unneeded global vars (rev 2) Message-Id: <20041019111950.546a5c26@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10449 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 Content-Length: 643 Lines: 22 The global variable media_map is never used. And the media table media can be static. Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/tlan.c b/drivers/net/tlan.c --- a/drivers/net/tlan.c 2004-10-19 11:05:01 -07:00 +++ b/drivers/net/tlan.c 2004-10-19 11:05:01 -07:00 @@ -223,12 +223,10 @@ static int tlan_have_pci; static int tlan_have_eisa; -const char *media[] = { +static const char *media[] = { "10BaseT-HD ", "10BaseT-FD ","100baseTx-HD ", "100baseTx-FD", "100baseT4", NULL }; - -int media_map[] = { 0x0020, 0x0040, 0x0080, 0x0100, 0x0200,}; static struct board { const char *deviceLabel; From shemminger@osdl.org Tue Oct 19 11:23:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 11:24:00 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JINps4012932 for ; Tue, 19 Oct 2004 11:23:51 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9JINUWL004682 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 19 Oct 2004 11:23:31 -0700 Date: Tue, 19 Oct 2004 11:24:20 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.9 5/5] tlan: enable faster hash function Message-Id: <20041019112420.1a929633@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10452 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 Content-Length: 3440 Lines: 101 Cleanout dead code, and use better hash function. The faster hash function was already there, but not turned on by default. Tested hash function for 10 million random addresses. Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/tlan.h b/drivers/net/tlan.h --- a/drivers/net/tlan.h 2004-10-19 11:14:54 -07:00 +++ b/drivers/net/tlan.h 2004-10-19 11:14:54 -07:00 @@ -500,39 +500,31 @@ } - - -#if 0 -static inline void TLan_ClearBit(u8 bit, u16 port) -{ - outb_p(inb_p(port) & ~bit, port); -} - - - - -static inline int TLan_GetBit(u8 bit, u16 port) -{ - return ((int) (inb_p(port) & bit)); -} - - - - -static inline void TLan_SetBit(u8 bit, u16 port) -{ - outb_p(inb_p(port) | bit, port); -} -#endif - #define TLan_ClearBit( bit, port ) outb_p(inb_p(port) & ~bit, port) #define TLan_GetBit( bit, port ) ((int) (inb_p(port) & bit)) #define TLan_SetBit( bit, port ) outb_p(inb_p(port) | bit, port) -#ifdef I_LIKE_A_FAST_HASH_FUNCTION -/* given 6 bytes, view them as 8 6-bit numbers and return the XOR of those */ -/* the code below is about seven times as fast as the original code */ -static inline u32 TLan_HashFunc( u8 *a ) +/* + * given 6 bytes, view them as 8 6-bit numbers and return the XOR of those + * the code below is about seven times as fast as the original code + * + * The original code was: + * + * u32 xor( u32 a, u32 b ) { return ( ( a && ! b ) || ( ! a && b ) ); } + * + * #define XOR8( a, b, c, d, e, f, g, h ) \ + * xor( a, xor( b, xor( c, xor( d, xor( e, xor( f, xor( g, h ) ) ) ) ) ) ) + * #define DA( a, bit ) ( ( (u8) a[bit/8] ) & ( (u8) ( 1 << bit%8 ) ) ) + * + * hash = XOR8( DA(a,0), DA(a, 6), DA(a,12), DA(a,18), DA(a,24), DA(a,30), DA(a,36), DA(a,42) ); + * hash |= XOR8( DA(a,1), DA(a, 7), DA(a,13), DA(a,19), DA(a,25), DA(a,31), DA(a,37), DA(a,43) ) << 1; + * hash |= XOR8( DA(a,2), DA(a, 8), DA(a,14), DA(a,20), DA(a,26), DA(a,32), DA(a,38), DA(a,44) ) << 2; + * hash |= XOR8( DA(a,3), DA(a, 9), DA(a,15), DA(a,21), DA(a,27), DA(a,33), DA(a,39), DA(a,45) ) << 3; + * hash |= XOR8( DA(a,4), DA(a,10), DA(a,16), DA(a,22), DA(a,28), DA(a,34), DA(a,40), DA(a,46) ) << 4; + * hash |= XOR8( DA(a,5), DA(a,11), DA(a,17), DA(a,23), DA(a,29), DA(a,35), DA(a,41), DA(a,47) ) << 5; + * + */ +static inline u32 TLan_HashFunc( const u8 *a ) { u8 hash; @@ -545,30 +537,4 @@ return (hash & 077); } - -#else /* original code */ - -static inline u32 xor( u32 a, u32 b ) -{ - return ( ( a && ! b ) || ( ! a && b ) ); -} -#define XOR8( a, b, c, d, e, f, g, h ) xor( a, xor( b, xor( c, xor( d, xor( e, xor( f, xor( g, h ) ) ) ) ) ) ) -#define DA( a, bit ) ( ( (u8) a[bit/8] ) & ( (u8) ( 1 << bit%8 ) ) ) - -static inline u32 TLan_HashFunc( u8 *a ) -{ - u32 hash; - - hash = XOR8( DA(a,0), DA(a, 6), DA(a,12), DA(a,18), DA(a,24), DA(a,30), DA(a,36), DA(a,42) ); - hash |= XOR8( DA(a,1), DA(a, 7), DA(a,13), DA(a,19), DA(a,25), DA(a,31), DA(a,37), DA(a,43) ) << 1; - hash |= XOR8( DA(a,2), DA(a, 8), DA(a,14), DA(a,20), DA(a,26), DA(a,32), DA(a,38), DA(a,44) ) << 2; - hash |= XOR8( DA(a,3), DA(a, 9), DA(a,15), DA(a,21), DA(a,27), DA(a,33), DA(a,39), DA(a,45) ) << 3; - hash |= XOR8( DA(a,4), DA(a,10), DA(a,16), DA(a,22), DA(a,28), DA(a,34), DA(a,40), DA(a,46) ) << 4; - hash |= XOR8( DA(a,5), DA(a,11), DA(a,17), DA(a,23), DA(a,29), DA(a,35), DA(a,41), DA(a,47) ) << 5; - - return hash; - -} - -#endif /* I_LIKE_A_FAST_HASH_FUNCTION */ #endif From rlrevell@joe-job.com Tue Oct 19 11:32:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 11:32:13 -0700 (PDT) Received: from mustang.oldcity.dca.net (mustang.oldcity.dca.net [216.158.38.3]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9JIW78b014605 for ; Tue, 19 Oct 2004 11:32:08 -0700 Received: (qmail 10757 invoked from network); 19 Oct 2004 18:31:52 -0000 Received: from unknown (HELO ?192.168.2.100?) (207.245.115.154) by mustang with SMTP; 19 Oct 2004 18:31:52 -0000 Subject: Re: tun.c patch to fix "smp_processor_id() in preemptible code" From: Lee Revell To: Denis Vlasenko Cc: Linux Network Development , linux-kernel In-Reply-To: <200410172314.38597.vda@port.imtp.ilyichevsk.odessa.ua> References: <1097876587.4170.16.camel@marvin.home.parkautomat.net> <1097879702.6737.7.camel@krustophenia.net> <200410172314.38597.vda@port.imtp.ilyichevsk.odessa.ua> Content-Type: text/plain Message-Id: <1098210711.2148.69.camel@krustophenia.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 19 Oct 2004 14:31:52 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 10453 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rlrevell@joe-job.com Precedence: bulk X-list: netdev Content-Length: 1230 Lines: 39 On Sun, 2004-10-17 at 16:14, Denis Vlasenko wrote: > > Your patch: > > > > + preempt_disable(); > > netif_rx_ni(skb); > > + preempt_enable(); > > > > just wraps this code in preempt_disable/enable: > > > > static inline int netif_rx_ni(struct sk_buff *skb) > > { > > int err = netif_rx(skb); > > if (softirq_pending(smp_processor_id())) > > do_softirq(); > > return err; > > } > > > > Isn't this considered an incorrect use of preempt_disable/enable? My > > reasoning is that if this was correct we would see preempt_dis/enable > > sprinkled all over the code which it isn't. > > > > Why do you have to call do_softirq like that? I was under the > > impression that you raise a softirq and it gets run later. > > There is a possibility that this guy just wanted to fix his > small problem. > Yes, that is what I thought. The question was more directed at the list. I added netdev to the cc:. I looked at Robert Love's book and I am still unclear on the use of do_softirq above. To reiterate the question: why does netif_rx_ni have to manually flush any pending softirqs on the current proccessor after doing the rx? Is this just a performance hack? Lee From nhorman@redhat.com Tue Oct 19 11:32:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 11:32:19 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JIWCT5014614 for ; Tue, 19 Oct 2004 11:32:12 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i9JIVvlS006666; Tue, 19 Oct 2004 14:31:57 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9JIVvr09813; Tue, 19 Oct 2004 14:31:57 -0400 Received: from redhat.com (hmsendeavour.rdu.redhat.com [172.16.57.156]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id i9JIVvja012959; Tue, 19 Oct 2004 14:31:57 -0400 Message-ID: <41755D9D.4080304@redhat.com> Date: Tue, 19 Oct 2004 14:31:57 -0400 From: Neil Horman User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0; hi, Mom) Gecko/20020604 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bob Wirka CC: no To-header on input , linux-net@vger.kernel.org, netdev@oss.sgi.com Subject: Re: Network Driver and NFS Root References: <417040C2.6070408@rtcworks.com> <41754656.2060202@rtcworks.com> In-Reply-To: <41754656.2060202@rtcworks.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10454 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: nhorman@redhat.com Precedence: bulk X-list: netdev Content-Length: 3265 Lines: 87 Bob Wirka wrote: > First, thanks for the responses to my earlier post. I appreciate it. > > The ethernet driver code is now executing at boot time; adding either > '__initcall(init_fcn)' or 'init_module(init_fcn)' will cause the kernel > to call 'init_fcn'. That's the good news. > > The bad news is that the initializatin code causes a kernel oops when > accessing the 'net_device' structure that is passed to it by the kernel > (as a pointer). When the code either reads or writes to the 'net_device' > structure you get: > > Unable to handle kernel paging request at virtual address 00010f24 > > Can anyone shed some light on this? I've printed out the value of the > 'net_device' pointer, and it's not a null pointer. > > Thanks, > > Bob Wirka > Realtime Control Works > Take a look at any of the other working net drivers in the kernel. You can pretty well cut-n-paste the net_device allocation/initalization code from any of those drivers into yours. Look for calls to alloc_etherdev to find places to start looking. Most likely you've forgotten to initalize some part of the structure before passing it to register_netdev, or perhaps you've passed a pointer to a net_device structure that was allocated on the stack rather than from the heap. Its not really possible to tell without looking through the code, but regardless, start comparing what you do in your initalization routine to what any of the other net drivers do in the same area of code, and your problem is likely to jump right out at you. HTH Neil > ---------------ORIGINAL POST---------------------------- > > Bob Wirka wrote: > >> Hello, >> >> I'm trying to build a kernel that mounts a NFS root file system. This >> is an embedded system; it uses an SMSC LAN91C111 network chip that is >> hardwired to I/O addres 0x300 and IRQ 5. I've been using the driver >> (as supplied by SMSC) as a module, and it works fine. Now I'm trying >> to incorporate it into the kernel build so that I can mount an NFS >> file system when the system boots. >> >> I've added the source code to the kernel tree, and modified the >> Makefile(s) and Config.in files so that the driver <> to be >> compiled into the kernel. The kernel will load, but the chip is not >> initialized and the NFS fails. >> >> Since I don't know how to pass the io address and irq number to the >> kernel, I've hard-coded them into the driver's init function (which I >> don't see being called). >> >> If someone could point me in the right direction, I'd appreciate it. >> >> Thank you, >> >> Bob Wirka >> Realtime Control Works >> - >> To unsubscribe from this list: send the line "unsubscribe linux-net" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> > > - > To unsubscribe from this list: send the line "unsubscribe linux-net" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- /*************************************************** *Neil Horman *Software Engineer *Red Hat, Inc. *nhorman@redhat.com *gpg keyid: 1024D / 0x92A74FA1 *http://pgp.mit.edu ***************************************************/ From chrisw@osdl.org Tue Oct 19 11:43:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 11:43:07 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JIh2vV015548 for ; Tue, 19 Oct 2004 11:43:02 -0700 Received: from build.pdx.osdl.net (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9JIgf932067; Tue, 19 Oct 2004 11:42:41 -0700 Received: (from chrisw@localhost) by build.pdx.osdl.net (8.11.6/8.11.6) id i9JIgfM28357; Tue, 19 Oct 2004 11:42:41 -0700 Date: Tue, 19 Oct 2004 11:42:41 -0700 From: Chris Wright To: Arnaldo Carvalho de Melo Cc: Chris Wright , netdev@oss.sgi.com Subject: Re: [PATCH][LSM] remove net related includes from security.h Message-ID: <20041019114241.C2357@build.pdx.osdl.net> References: <41755B3F.2040001@conectiva.com.br> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <41755B3F.2040001@conectiva.com.br>; from acme@conectiva.com.br on Tue, Oct 19, 2004 at 03:21:51PM -0300 X-archive-position: 10455 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chrisw@osdl.org Precedence: bulk X-list: netdev Content-Length: 219 Lines: 9 * Arnaldo Carvalho de Melo (acme@conectiva.com.br) wrote: > Hi Chris, > > As discussed on irc. Thanks Arnaldo, I picked this up. -chris -- Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net From lukasz@trabinski.net Tue Oct 19 11:53:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 11:53:58 -0700 (PDT) Received: from portraits.wsisiz.edu.pl (root@portraits.wsisiz.edu.pl [213.135.44.34]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JIrqIY016177 for ; Tue, 19 Oct 2004 11:53:53 -0700 Received: from portraits.wsisiz.edu.pl (uucp@localhost [127.0.0.1]) by portraits.wsisiz.edu.pl (8.13.0/8.13.0) with ESMTP id i9JIrVEi017345; Tue, 19 Oct 2004 20:53:31 +0200 Received: (from uucp@localhost) by portraits.wsisiz.edu.pl (8.13.0/8.13.0/Submit) with UUCP id i9JIrVlA017344; Tue, 19 Oct 2004 20:53:31 +0200 Received: from lt.wsisiz.edu.pl (IDENT:DvVxXJq/FbVJWGbi1mSDDceFLmQ6/kMt@localhost [127.0.0.1]) by lt.wsisiz.edu.pl (8.12.11/8.12.11) with ESMTP id i9JIrBil004759; Tue, 19 Oct 2004 20:53:11 +0200 Received: from localhost (lukasz@localhost) by lt.wsisiz.edu.pl (8.12.11/8.12.11/Submit) with ESMTP id i9JIr9xD004756; Tue, 19 Oct 2004 20:53:10 +0200 X-Authentication-Warning: lt.wsisiz.edu.pl: lukasz owned process doing -bs Date: Tue, 19 Oct 2004 20:53:09 +0200 (CEST) From: Lukasz Trabinski X-X-Sender: lukasz@lt.wsisiz.edu.pl To: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: unregister_netdevice 2.6.9 In-Reply-To: <20041020.022622.27982693.yoshfuji@linux-ipv6.org> Message-ID: References: <20041020.022622.27982693.yoshfuji@linux-ipv6.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-2 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.4 (portraits.wsisiz.edu.pl [0.0.0.0]); Tue, 19 Oct 2004 20:53:32 +0200 (CEST) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by oss.sgi.com id i9JIrqIY016177 X-archive-position: 10456 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: lukasz@trabinski.net Precedence: bulk X-list: netdev Content-Length: 853 Lines: 33 On Wed, 20 Oct 2004, YOSHIFUJI Hideaki / ???? wrote: > > whreis xxxx is name of sit device, created via script > > Is your box acting as router, or host? > % sysctl -a |grep ipv6|grep forwarding lt:~# sysctl -a |grep ipv6|grep forwarding net.ipv6.conf.atman6.forwarding = 0 net.ipv6.conf.eth1.forwarding = 0 net.ipv6.conf.eth0.forwarding = 0 net.ipv6.conf.lo.forwarding = 0 net.ipv6.conf.default.forwarding = 0 net.ipv6.conf.all.forwarding = 0 atman6 is sit device, ipv6 is loaded as module. > What is happend if you let the interface down and delete it before > becore rebooting? OK, if interface is down, system is rebooting correctly. I had made tests with shutdown interfaces, but i shutdowned wrong sit interface. :( Sorry for that. Anyway, ipip interfaces no need to be shutdown before reboot. Is it problem in sit_cleanup()? -- £T From shemminger@osdl.org Tue Oct 19 11:56:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 11:56:53 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JIumIw016639 for ; Tue, 19 Oct 2004 11:56:48 -0700 Received: from [172.20.1.60] (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9JIuR902657; Tue, 19 Oct 2004 11:56:27 -0700 Message-ID: <4175636E.4050102@osdl.org> Date: Tue, 19 Oct 2004 11:56:46 -0700 From: Stephen Hemminger User-Agent: Mozilla Thunderbird 0.8 (X11/20040923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bob Wirka CC: linux-net@vger.kernel.org, netdev@oss.sgi.com Subject: Re: Network Driver and NFS Root References: <417040C2.6070408@rtcworks.com> <41754656.2060202@rtcworks.com> In-Reply-To: <41754656.2060202@rtcworks.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10457 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 Content-Length: 2088 Lines: 54 Bob Wirka wrote: > First, thanks for the responses to my earlier post. I appreciate it. > > The ethernet driver code is now executing at boot time; adding either > '__initcall(init_fcn)' or 'init_module(init_fcn)' will cause the > kernel to call 'init_fcn'. That's the good news. > > The bad news is that the initializatin code causes a kernel oops when > accessing the 'net_device' structure that is passed to it by the > kernel (as a pointer). When the code either reads or writes to the > 'net_device' structure you get: > > Unable to handle kernel paging request at virtual address 00010f24 > > Can anyone shed some light on this? I've printed out the value of the > 'net_device' pointer, and it's not a null pointer. > > Thanks, > > Bob Wirka > Realtime Control Works > > ---------------ORIGINAL POST---------------------------- > > Bob Wirka wrote: > >> Hello, >> >> I'm trying to build a kernel that mounts a NFS root file system. This >> is an embedded system; it uses an SMSC LAN91C111 network chip that is >> hardwired to I/O addres 0x300 and IRQ 5. I've been using the driver >> (as supplied by SMSC) as a module, and it works fine. Now I'm trying >> to incorporate it into the kernel build so that I can mount an NFS >> file system when the system boots. >> >> I've added the source code to the kernel tree, and modified the >> Makefile(s) and Config.in files so that the driver <> to be >> compiled into the kernel. The kernel will load, but the chip is not >> initialized and the NFS fails. >> >> Since I don't know how to pass the io address and irq number to the >> kernel, I've hard-coded them into the driver's init function (which I >> don't see being called). >> >> If someone could point me in the right direction, I'd appreciate it. > You should just configure the SMSC driver to be built in. The module_init_call will be called correctly on boot after the network core has been initialized. If you use an initcall it will be too early, before networking is ready. You could use a deviceinitcall that would happen at the right time. From shemminger@osdl.org Tue Oct 19 13:59:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 13:59:10 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JKx12Z023466 for ; Tue, 19 Oct 2004 13:59:02 -0700 Received: from [172.20.1.60] (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9JKwe927979; Tue, 19 Oct 2004 13:58:40 -0700 Message-ID: <41758014.4080502@osdl.org> Date: Tue, 19 Oct 2004 13:59:00 -0700 From: Stephen Hemminger User-Agent: Mozilla Thunderbird 0.8 (X11/20040923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: linux-kernel@vger.kernel.org CC: netdev@oss.sgi.com, linux-net@vger.kernel.org, LARTC@mailman.ds9a.nl Subject: [ANNOUNCE] iproute2 2.6.9-041019 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10458 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 Content-Length: 350 Lines: 9 Now that 2.6.9 is final. Here is an update of the iproute2 utilities that contains all the patches in my queue. * lnstat to replace rtstat and ctstat (from Harald Welte) * latest xfrm related changes * several small typo's and build fixes for older systems http://developer.osdl.org/dev/iproute2/download/iproute2-2.6.9-041019.tar.gz From herbert@gondor.apana.org.au Tue Oct 19 14:26:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 14:26:44 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JLQcrZ024471 for ; Tue, 19 Oct 2004 14:26:39 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CK1Ue-0003Cq-00; Wed, 20 Oct 2004 07:26:08 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CK1Uc-0004DU-00; Wed, 20 Oct 2004 07:26:06 +1000 Date: Wed, 20 Oct 2004 07:26:06 +1000 To: Aidas Kasparas Cc: Patrick McHardy , "David S. Miller" , netdev@oss.sgi.com, ipsec-tools-devel@lists.sourceforge.net Subject: Re: [Ipsec-tools-devel] Re: [PATCH 2.6]: Check against correct policy list in ip_forward/ip6_forward Message-ID: <20041019212606.GB16127@gondor.apana.org.au> References: <4172943B.8050904@trash.net> <20041017212317.GA28615@gondor.apana.org.au> <4172F1AB.4020305@trash.net> <20041017231258.GA29294@gondor.apana.org.au> <4175334B.3000504@gmc.lt> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4175334B.3000504@gmc.lt> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10460 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 396 Lines: 11 On Tue, Oct 19, 2004 at 06:31:23PM +0300, Aidas Kasparas wrote: > > I'm sorry, what is wrong with racoon? For tunnel SAs it needs to add forward policies as well as incoming policies. -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From herbert@gondor.apana.org.au Tue Oct 19 14:26:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 14:26:17 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JLQ72R024367 for ; Tue, 19 Oct 2004 14:26:08 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CK1U6-0003CY-00; Wed, 20 Oct 2004 07:25:34 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CK1U1-0004D4-00; Wed, 20 Oct 2004 07:25:29 +1000 Date: Wed, 20 Oct 2004 07:25:29 +1000 To: Patrick McHardy Cc: "David S. Miller" , netdev@oss.sgi.com, ipsec-tools-devel@lists.sourceforge.net Subject: Re: [XFRM] Allow transport SAs even when there is no policy Message-ID: <20041019212529.GA16127@gondor.apana.org.au> References: <4172943B.8050904@trash.net> <20041017212317.GA28615@gondor.apana.org.au> <4172F1AB.4020305@trash.net> <20041017231258.GA29294@gondor.apana.org.au> <417428CF.2050802@trash.net> <20041018214326.GA6589@gondor.apana.org.au> <417521A2.4010500@trash.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <417521A2.4010500@trash.net> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10459 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 668 Lines: 15 On Tue, Oct 19, 2004 at 04:16:02PM +0200, Patrick McHardy wrote: > > Looks good. So you agree we should also apply my patch to > xfrm_policy_lookup (attached again with less confusing subject) ? It makes > packets with a secpath fall through to __xfrm_policy_check when the policy > list is empty, so the default policy is always the same. This will break > setups with keying daemons that don't add forward policies for tunnel mode > SAs. Agreed. Thanks. -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From shemminger@osdl.org Tue Oct 19 14:28:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 14:28:23 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JLSHJT025039 for ; Tue, 19 Oct 2004 14:28:17 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9JLITWL020240 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 19 Oct 2004 14:18:30 -0700 Date: Tue, 19 Oct 2004 14:19:25 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: Jean Tourrilhes , netdev@oss.sgi.com Subject: [PATCH 2.6.9 3/3] hp100: use module_param Message-Id: <20041019141925.054addc4@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10462 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 Content-Length: 1112 Lines: 36 Convert hp100 to use module_param diff -Nru a/drivers/net/hp100.c b/drivers/net/hp100.c --- a/drivers/net/hp100.c 2004-10-18 16:11:05 -07:00 +++ b/drivers/net/hp100.c 2004-10-18 16:11:05 -07:00 @@ -98,6 +98,7 @@ #include #include +#include #include #include #include @@ -224,9 +225,9 @@ static int hp100_priority_tx = HP100_DEFAULT_PRIORITY_TX; static int hp100_mode = 1; -MODULE_PARM(hp100_rx_ratio, "1i"); -MODULE_PARM(hp100_priority_tx, "1i"); -MODULE_PARM(hp100_mode, "1i"); +module_param(hp100_rx_ratio, int, 0); +module_param(hp100_priority_tx, int, 0); +module_param(hp100_mode, int, 0); /* * prototypes @@ -3005,7 +3006,8 @@ #define HP100_DEVICES 5 /* Parameters set by insmod */ static int hp100_port[HP100_DEVICES] = { 0, [1 ... (HP100_DEVICES-1)] = -1 }; -MODULE_PARM(hp100_port, "1-" __MODULE_STRING(HP100_DEVICES) "i"); +static int nports; +module_param_array(hp100_port, int, nports, 0); /* List of devices */ static struct net_device *hp100_devlist[HP100_DEVICES]; From shemminger@osdl.org Tue Oct 19 14:28:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 14:28:23 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JLSHTS025037 for ; Tue, 19 Oct 2004 14:28:17 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9JLISWL020234 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 19 Oct 2004 14:18:29 -0700 Date: Tue, 19 Oct 2004 14:18:18 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: Jean Tourrilhes , netdev@oss.sgi.com Subject: [PATCH 2.6.9 2/3] hp100: use inline for comple usage of dev->priv Message-Id: <20041019141818.10ecb40c@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10461 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 Content-Length: 1142 Lines: 30 Make a separate function for the one more complex usage of netdev_priv. Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/hp100.c b/drivers/net/hp100.c --- a/drivers/net/hp100.c 2004-10-18 15:57:57 -07:00 +++ b/drivers/net/hp100.c 2004-10-18 15:57:57 -07:00 @@ -284,6 +284,12 @@ return ((u_long) ptr) + lp->whatever_offset; } +static inline u_int pdl_map_data(struct hp100_private *lp, void *data) +{ + return pci_map_single(lp->pci_dev, data, + MAX_ETHER_SIZE, PCI_DMA_FROMDEVICE); +} + /* TODO: This function should not really be needed in a good design... */ static void wait(void) { @@ -1273,7 +1279,8 @@ /* Conversion to new PCI API : map skbuf data to PCI bus. * Doc says it's OK for EISA as well - Jean II */ ringptr->pdl[0] = 0x00020000; /* Write PDH */ - ringptr->pdl[3] = ((u_int) pci_map_single(((struct hp100_private *) (dev->priv))->pci_dev, ringptr->skb->data, MAX_ETHER_SIZE, PCI_DMA_FROMDEVICE)); + ringptr->pdl[3] = pdl_map_data(netdev_priv(dev), + ringptr->skb->data); ringptr->pdl[4] = MAX_ETHER_SIZE; /* Length of Data */ #ifdef HP100_DEBUG_BM From shemminger@osdl.org Tue Oct 19 14:28:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 14:28:24 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JLSFL5025035 for ; Tue, 19 Oct 2004 14:28:16 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9JLIQWL020229 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 19 Oct 2004 14:18:27 -0700 Date: Tue, 19 Oct 2004 14:16:22 -0700 From: Stephen Hemminger To: Jeff Garzik Cc: Jean Tourrilhes , netdev@oss.sgi.com Subject: [PATCH 2.6.9 1/3] hp100: use netdev_priv (rev 2) Message-Id: <20041019141622.3d5a7c14@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10463 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 Content-Length: 7452 Lines: 254 Here is a revised version of the hp100 patch sequence. First one just does netdev_priv. Worked with Jean to get these patches tested. Signed-off-by: Stephen Hemminger diff -Nru a/drivers/net/hp100.c b/drivers/net/hp100.c --- a/drivers/net/hp100.c 2004-10-18 15:51:14 -07:00 +++ b/drivers/net/hp100.c 2004-10-18 15:51:14 -07:00 @@ -280,8 +280,8 @@ * address - Jean II */ static inline dma_addr_t virt_to_whatever(struct net_device *dev, u32 * ptr) { - return ((u_long) ptr) + - ((struct hp100_private *) (dev->priv))->whatever_offset; + struct hp100_private *lp = netdev_priv(dev); + return ((u_long) ptr) + lp->whatever_offset; } /* TODO: This function should not really be needed in a good design... */ @@ -631,7 +631,7 @@ } /* Initialise the "private" data structure for this card. */ - lp = (struct hp100_private *) dev->priv; + lp = netdev_priv(dev); spin_lock_init(&lp->lock); strlcpy(lp->id, eid, HP100_SIG_LEN); @@ -781,7 +781,7 @@ static void hp100_hwinit(struct net_device *dev) { int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); #ifdef HP100_DEBUG_B hp100_outw(0x4202, TRACE); @@ -875,7 +875,7 @@ static void hp100_mmuinit(struct net_device *dev) { int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); int i; #ifdef HP100_DEBUG_B @@ -1053,7 +1053,7 @@ static int hp100_open(struct net_device *dev) { - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); #ifdef HP100_DEBUG_B int ioaddr = dev->base_addr; #endif @@ -1093,7 +1093,7 @@ static int hp100_close(struct net_device *dev) { int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); #ifdef HP100_DEBUG_B hp100_outw(0x4205, TRACE); @@ -1126,7 +1126,7 @@ */ static void hp100_init_pdls(struct net_device *dev) { - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); hp100_ring_t *ringptr; u_int *pageptr; /* Warning : increment by 4 - Jean II */ int i; @@ -1310,7 +1310,7 @@ { int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); hp100_ring_t *ringptr; #ifdef HP100_DEBUG_B @@ -1351,7 +1351,7 @@ static void hp100_BM_shutdown(struct net_device *dev) { int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); unsigned long time; #ifdef HP100_DEBUG_B @@ -1432,7 +1432,7 @@ static int hp100_check_lan(struct net_device *dev) { - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); if (lp->lan_type < 0) { /* no LAN type detected yet? */ hp100_stop_interface(dev); @@ -1458,7 +1458,7 @@ unsigned long flags; int i, ok_flag; int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); hp100_ring_t *ringptr; #ifdef HP100_DEBUG_B @@ -1576,7 +1576,7 @@ */ static void hp100_clean_txring(struct net_device *dev) { - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); int ioaddr = dev->base_addr; int donecount; @@ -1615,7 +1615,7 @@ int i, ok_flag; int ioaddr = dev->base_addr; u_short val; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); #ifdef HP100_DEBUG_B hp100_outw(0x4212, TRACE); @@ -1755,7 +1755,7 @@ { int packets, pkt_len; int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); u_int header; struct sk_buff *skb; @@ -1864,7 +1864,7 @@ static void hp100_rx_bm(struct net_device *dev) { int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); hp100_ring_t *ptr; u_int header; int pkt_len; @@ -1973,7 +1973,7 @@ { unsigned long flags; int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); #ifdef HP100_DEBUG_B hp100_outw(0x4215, TRACE); @@ -1991,7 +1991,7 @@ { int ioaddr = dev->base_addr; u_short val; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); #ifdef HP100_DEBUG_B hp100_outw(0x4216, TRACE); @@ -2017,7 +2017,7 @@ #ifdef HP100_DEBUG_B int ioaddr = dev->base_addr; #endif - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); #ifdef HP100_DEBUG_B int ioaddr = dev->base_addr; @@ -2061,7 +2061,7 @@ { unsigned long flags; int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); #ifdef HP100_DEBUG_B hp100_outw(0x4218, TRACE); @@ -2191,7 +2191,7 @@ static irqreturn_t hp100_interrupt(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); int ioaddr; u_int val; @@ -2322,7 +2322,7 @@ { unsigned long flags; int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); #ifdef HP100_DEBUG_B hp100_outw(0x4220, TRACE); @@ -2381,7 +2381,7 @@ static void hp100_stop_interface(struct net_device *dev) { - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); int ioaddr = dev->base_addr; u_int val; @@ -2442,7 +2442,7 @@ { int ioaddr = dev->base_addr; u_short val_VG, val_10; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); #ifdef HP100_DEBUG_B hp100_outw(0x4223, TRACE); @@ -2488,7 +2488,7 @@ static int hp100_down_vg_link(struct net_device *dev) { - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); int ioaddr = dev->base_addr; unsigned long time; long savelan, newlan; @@ -2604,7 +2604,7 @@ static int hp100_login_to_vg_hub(struct net_device *dev, u_short force_relogin) { int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); u_short val = 0; unsigned long time; int startst; @@ -2775,7 +2775,7 @@ static void hp100_cascade_reset(struct net_device *dev, u_short enable) { int ioaddr = dev->base_addr; - struct hp100_private *lp = (struct hp100_private *) dev->priv; + struct hp100_private *lp = netdev_priv(dev); #ifdef HP100_DEBUG_B hp100_outw(0x4226, TRACE); @@ -2836,7 +2836,7 @@ static void cleanup_dev(struct net_device *d) { - struct hp100_private *p = (struct hp100_private *) d->priv; + struct hp100_private *p = netdev_priv(d); unregister_netdev(d); release_region(d->base_addr, HP100_REGION_SIZE); From herbert@gondor.apana.org.au Tue Oct 19 14:36:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 14:36:35 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JLaPVM026093 for ; Tue, 19 Oct 2004 14:36:26 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CK1eD-0003NB-00; Wed, 20 Oct 2004 07:36:01 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CK1e6-0004F3-00; Wed, 20 Oct 2004 07:35:54 +1000 From: Herbert Xu To: rlrevell@joe-job.com (Lee Revell) Subject: Re: tun.c patch to fix "smp_processor_id() in preemptible code" Cc: vda@port.imtp.ilyichevsk.odessa.ua, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Organization: Core In-Reply-To: <1098210711.2148.69.camel@krustophenia.net> X-Newsgroups: apana.lists.os.linux.kernel,apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) Message-Id: Date: Wed, 20 Oct 2004 07:35:54 +1000 X-archive-position: 10464 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 577 Lines: 13 Lee Revell wrote: > > I looked at Robert Love's book and I am still unclear on the use of > do_softirq above. To reiterate the question: why does netif_rx_ni have > to manually flush any pending softirqs on the current proccessor after > doing the rx? Is this just a performance hack? Yes it allows the packet to be processed immediately. -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From rlrevell@joe-job.com Tue Oct 19 14:53:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 14:53:26 -0700 (PDT) Received: from mustang.oldcity.dca.net (mustang.oldcity.dca.net [216.158.38.3]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9JLrLkG026874 for ; Tue, 19 Oct 2004 14:53:21 -0700 Received: (qmail 18028 invoked from network); 19 Oct 2004 21:51:17 -0000 Received: from unknown (HELO ?192.168.2.100?) (207.245.115.154) by mustang with SMTP; 19 Oct 2004 21:51:17 -0000 Subject: Re: tun.c patch to fix "smp_processor_id() in preemptible code" From: Lee Revell To: Herbert Xu Cc: vda@port.imtp.ilyichevsk.odessa.ua, Linux Network Development , linux-kernel In-Reply-To: References: Content-Type: text/plain Message-Id: <1098222676.23367.18.camel@krustophenia.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 19 Oct 2004 17:51:17 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 10465 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rlrevell@joe-job.com Precedence: bulk X-list: netdev Content-Length: 935 Lines: 28 On Tue, 2004-10-19 at 17:35, Herbert Xu wrote: > Lee Revell wrote: > > > > I looked at Robert Love's book and I am still unclear on the use of > > do_softirq above. To reiterate the question: why does netif_rx_ni have > > to manually flush any pending softirqs on the current proccessor after > > doing the rx? Is this just a performance hack? > > Yes it allows the packet to be processed immediately. Ok, here is the correct patch. If this is really just a matter of performance, and not required for correctness, disabling preemption is broken, right? Lee --- include/linux/netdevice.h~ 2004-10-15 20:19:33.000000000 -0400 +++ include/linux/netdevice.h 2004-10-19 17:47:03.000000000 -0400 @@ -697,8 +697,6 @@ static inline int netif_rx_ni(struct sk_buff *skb) { int err = netif_rx(skb); - if (softirq_pending(smp_processor_id())) - do_softirq(); return err; } From herbert@gondor.apana.org.au Tue Oct 19 14:54:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 14:54:38 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JLsSZa027177 for ; Tue, 19 Oct 2004 14:54:29 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CK1vg-0003bk-00; Wed, 20 Oct 2004 07:54:04 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CK1vd-0004HU-00; Wed, 20 Oct 2004 07:54:01 +1000 Date: Wed, 20 Oct 2004 07:54:01 +1000 To: Lee Revell Cc: vda@port.imtp.ilyichevsk.odessa.ua, Linux Network Development , linux-kernel Subject: Re: tun.c patch to fix "smp_processor_id() in preemptible code" Message-ID: <20041019215401.GA16427@gondor.apana.org.au> References: <1098222676.23367.18.camel@krustophenia.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1098222676.23367.18.camel@krustophenia.net> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10466 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 573 Lines: 14 On Tue, Oct 19, 2004 at 05:51:17PM -0400, Lee Revell wrote: > > Ok, here is the correct patch. If this is really just a matter of > performance, and not required for correctness, disabling preemption is > broken, right? No if you're doing this then you should get rid of netif_rx_ni() altogether. But before you do that please ask all the people who call it. -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From xschmi00@stud.feec.vutbr.cz Tue Oct 19 14:59:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 14:59:21 -0700 (PDT) Received: from tron.kn.vutbr.cz (tron.kn.vutbr.cz [147.229.191.152]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JLxFIf028050 for ; Tue, 19 Oct 2004 14:59:15 -0700 Received: from [147.229.222.29] (a05-0930b.kn.vutbr.cz [147.229.222.29]) by tron.kn.vutbr.cz (8.12.9p2/8.12.9) with ESMTP id i9JLwsH3045959; Tue, 19 Oct 2004 23:58:54 +0200 (CEST) (envelope-from xschmi00@stud.feec.vutbr.cz) Message-ID: <41758E11.2040402@stud.feec.vutbr.cz> Date: Tue, 19 Oct 2004 23:58:41 +0200 From: Michal Schmidt User-Agent: Mozilla Thunderbird 0.8 (X11/20041005) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jeff Garzik CC: netdev@oss.sgi.com Subject: [PATCH 2.6.9] skge: netpoll support Content-Type: multipart/mixed; boundary="------------010106020101040906010301" X-Virus-Scanned: clamd / ClamAV version 0.70, clamav-milter version 0.70j X-Scanned-By: milter-spamc/0.19.268 (tron [147.229.191.152]); Tue, 19 Oct 2004 23:58:54 +0200 X-archive-position: 10467 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: xschmi00@stud.feec.vutbr.cz Precedence: bulk X-list: netdev Content-Length: 1812 Lines: 57 This is a multi-part message in MIME format. --------------010106020101040906010301 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, The attached patch adds netconsole support for sk98lin. Signed-off-by: Michal Schmidt --------------010106020101040906010301 Content-Type: text/plain; name="sk98lin-netpoll.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sk98lin-netpoll.diff" diff -Nurp linux-2.6.9/drivers/net/sk98lin/skge.c linux-2.6.9-mich/drivers/net/sk98lin/skge.c --- linux-2.6.9/drivers/net/sk98lin/skge.c 2004-10-18 23:53:22.000000000 +0200 +++ linux-2.6.9-mich/drivers/net/sk98lin/skge.c 2004-10-19 23:53:39.621533536 +0200 @@ -1126,6 +1126,24 @@ SK_U32 IntSrc; /* interrupts source re return SkIsrRetHandled; } /* SkGeIsrOnePort */ +#ifdef CONFIG_NET_POLL_CONTROLLER +/**************************************************************************** + * + * SkGePollController - polling receive, for netconsole + * + * Description: + * Polling receive - used by netconsole and other diagnostic tools + * to allow network i/o with interrupts disabled. + * + * Returns: N/A + */ +static void SkGePollController(struct net_device *dev) +{ + disable_irq(dev->irq); + SkGeIsr(dev->irq, dev, NULL); + enable_irq(dev->irq); +} +#endif /**************************************************************************** * @@ -4960,6 +4978,9 @@ static int __devinit skge_probe_one(stru dev->set_mac_address = &SkGeSetMacAddr; dev->do_ioctl = &SkGeIoctl; dev->change_mtu = &SkGeChangeMtu; +#ifdef CONFIG_NET_POLL_CONTROLLER + dev->poll_controller = &SkGePollController; +#endif dev->flags &= ~IFF_RUNNING; SET_NETDEV_DEV(dev, &pdev->dev); --------------010106020101040906010301-- From kaber@trash.net Tue Oct 19 15:03:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 15:03:06 -0700 (PDT) Received: from gw.localnet ([62.206.217.67]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JM2xk0028436 for ; Tue, 19 Oct 2004 15:03:00 -0700 Received: from [172.16.1.123] (helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1CK2BX-0002rr-00; Wed, 20 Oct 2004 00:10:27 +0200 Message-ID: <41758EF7.6010906@trash.net> Date: Wed, 20 Oct 2004 00:02:31 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: netdev@oss.sgi.com Subject: [PATCH 2.6.9]: Fix inet6_dev reference leak in ndisc_dst_alloc error path Content-Type: multipart/mixed; boundary="------------050200080904090303050100" X-archive-position: 10468 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kaber@trash.net Precedence: bulk X-list: netdev Content-Length: 1323 Lines: 53 This is a multi-part message in MIME format. --------------050200080904090303050100 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit ndisc_dst_alloc leaks a inet6_dev reference when ip6_dst_alloc returns NULL. The bug was introduced somewhere between 2.6.8 and 2.6.9. Regards Patrick --------------050200080904090303050100 Content-Type: text/plain; name="p1" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="p1" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/19 23:13:24+02:00 kaber@coreworks.de # [IPV6]: Fix inet6_dev reference leak in ndisc_dst_alloc error path # # Signed-off-by: Patrick McHardy # # net/ipv6/route.c # 2004/10/19 23:12:48+02:00 kaber@coreworks.de +3 -1 # [IPV6]: Fix inet6_dev reference leak in ndisc_dst_alloc error path # # Signed-off-by: Patrick McHardy # diff -Nru a/net/ipv6/route.c b/net/ipv6/route.c --- a/net/ipv6/route.c 2004-10-19 23:51:11 +02:00 +++ b/net/ipv6/route.c 2004-10-19 23:51:11 +02:00 @@ -647,8 +647,10 @@ return NULL; rt = ip6_dst_alloc(); - if (unlikely(rt == NULL)) + if (unlikely(rt == NULL)) { + in6_dev_put(idev); goto out; + } dev_hold(dev); if (neigh) --------------050200080904090303050100-- From oxymoron@waste.org Tue Oct 19 15:06:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 15:06:38 -0700 (PDT) Received: from waste.org (waste.org [209.173.204.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JM6W3l028824 for ; Tue, 19 Oct 2004 15:06:33 -0700 Received: from waste.org (localhost [127.0.0.1]) by waste.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id i9JM6CWk006500; Tue, 19 Oct 2004 17:06:12 -0500 Received: (from oxymoron@localhost) by waste.org (8.12.3/8.12.3/Debian-7.1) id i9JM6BFc006497; Tue, 19 Oct 2004 17:06:11 -0500 Date: Tue, 19 Oct 2004 17:06:11 -0500 From: Matt Mackall To: Michal Schmidt Cc: Jeff Garzik , netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9] skge: netpoll support Message-ID: <20041019220611.GE28904@waste.org> References: <41758E11.2040402@stud.feec.vutbr.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41758E11.2040402@stud.feec.vutbr.cz> User-Agent: Mutt/1.3.28i X-Virus-Scanned: by amavisd-new X-archive-position: 10469 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mpm@selenic.com Precedence: bulk X-list: netdev Content-Length: 296 Lines: 9 On Tue, Oct 19, 2004 at 11:58:41PM +0200, Michal Schmidt wrote: > Hi, > The attached patch adds netconsole support for sk98lin. Looks good. Would be nice to use actual kernel-doc style documentation blocks for new function comments though. -- Mathematics is the supreme nostalgia of our time. From rlrevell@joe-job.com Tue Oct 19 15:11:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 15:11:18 -0700 (PDT) Received: from mustang.oldcity.dca.net (mustang.oldcity.dca.net [216.158.38.3]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9JMBDg7029211 for ; Tue, 19 Oct 2004 15:11:13 -0700 Received: (qmail 28657 invoked from network); 19 Oct 2004 22:10:58 -0000 Received: from unknown (HELO ?192.168.2.100?) (207.245.115.154) by mustang with SMTP; 19 Oct 2004 22:10:58 -0000 Subject: Re: tun.c patch to fix "smp_processor_id() in preemptible code" From: Lee Revell To: Herbert Xu Cc: vda@port.imtp.ilyichevsk.odessa.ua, Linux Network Development , linux-kernel , maxk@qualcomm.com, irda-users@lists.sourceforge.net In-Reply-To: <20041019215401.GA16427@gondor.apana.org.au> References: <1098222676.23367.18.camel@krustophenia.net> <20041019215401.GA16427@gondor.apana.org.au> Content-Type: text/plain Message-Id: <1098223857.23367.35.camel@krustophenia.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 19 Oct 2004 18:10:58 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 10470 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rlrevell@joe-job.com Precedence: bulk X-list: netdev Content-Length: 1013 Lines: 34 On Tue, 2004-10-19 at 17:54, Herbert Xu wrote: > On Tue, Oct 19, 2004 at 05:51:17PM -0400, Lee Revell wrote: > > > > Ok, here is the correct patch. If this is really just a matter of > > performance, and not required for correctness, disabling preemption is > > broken, right? > > No if you're doing this then you should get rid of netif_rx_ni() > altogether. But before you do that please ask all the people who > call it. There are not a lot of them: drivers/s390/net/ctcmain.c drivers/s390/net/netiucv.c drivers/net/irda/vlsi_ir.c drivers/net/tun.c >From netiuvc.c: /* * Since receiving is always initiated from a tasklet (in iucv.c), * we must use netif_rx_ni() instead of netif_rx() */ This implies that the author thought it was a matter of correctness to use netif_rx_ni vs. netif_rx. But it looks like the only difference is that the former sacrifices preempt-safety for performance. I could not find maintainers for the two s390 drivers, or a specific maintainer for vlsi_ir. Lee From kaber@trash.net Tue Oct 19 15:14:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 15:14:34 -0700 (PDT) Received: from gw.localnet ([62.206.217.67]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JMETss029568 for ; Tue, 19 Oct 2004 15:14:29 -0700 Received: from [172.16.1.123] (helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1CK2Ma-0002us-00; Wed, 20 Oct 2004 00:21:52 +0200 Message-ID: <417591A2.4090201@trash.net> Date: Wed, 20 Oct 2004 00:13:54 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: netdev@oss.sgi.com, YOSHIFUJI Hideaki Subject: [PATCH 2.6.9]: Fix netdevice/inet6_dev reference leaks in ip6_route_add error paths Content-Type: multipart/mixed; boundary="------------040705080908040609060609" X-archive-position: 10471 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kaber@trash.net Precedence: bulk X-list: netdev Content-Length: 1538 Lines: 63 This is a multi-part message in MIME format. --------------040705080908040609060609 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit The recent changes to ip6_route_add added multiple leaks in error paths. This patch should fix them. Regards Patrick --------------040705080908040609060609 Content-Type: text/plain; name="p2" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="p2" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/19 23:46:56+02:00 kaber@coreworks.de # [IPV6]: Fix netdevice/inet6_dev reference leaks in ip6_route_add error paths # # Signed-off-by: Patrick McHardy # # net/ipv6/route.c # 2004/10/19 23:46:17+02:00 kaber@coreworks.de +8 -3 # [IPV6]: Fix netdevice/inet6_dev reference leaks in ip6_route_add error paths # # Signed-off-by: Patrick McHardy # diff -Nru a/net/ipv6/route.c b/net/ipv6/route.c --- a/net/ipv6/route.c 2004-10-19 23:52:23 +02:00 +++ b/net/ipv6/route.c 2004-10-19 23:52:23 +02:00 @@ -798,8 +798,10 @@ rt = ip6_dst_alloc(); - if (rt == NULL) - return -ENOMEM; + if (rt == NULL) { + err = -ENOMEM; + goto out; + } rt->u.dst.obsolete = -1; rt->rt6i_expires = clock_t_to_jiffies(rtmsg->rtmsg_info); @@ -962,7 +964,10 @@ out: if (dev) dev_put(dev); - dst_free((struct dst_entry *) rt); + if (idev) + in6_dev_put(idev); + if (rt) + dst_free((struct dst_entry *) rt); return err; } --------------040705080908040609060609-- From davem@davemloft.net Tue Oct 19 15:38:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 15:38:55 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JMcoOQ030346 for ; Tue, 19 Oct 2004 15:38:50 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CK2XU-0007cl-00; Tue, 19 Oct 2004 15:33:08 -0700 Date: Tue, 19 Oct 2004 15:33:08 -0700 From: "David S. Miller" To: Lee Revell Cc: herbert@gondor.apana.org.au, vda@port.imtp.ilyichevsk.odessa.ua, netdev@oss.sgi.com, linux-kernel@vger.kernel.org, maxk@qualcomm.com, irda-users@lists.sourceforge.net Subject: Re: tun.c patch to fix "smp_processor_id() in preemptible code" Message-Id: <20041019153308.488d34c1.davem@davemloft.net> In-Reply-To: <1098223857.23367.35.camel@krustophenia.net> References: <1098222676.23367.18.camel@krustophenia.net> <20041019215401.GA16427@gondor.apana.org.au> <1098223857.23367.35.camel@krustophenia.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10472 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 580 Lines: 15 On Tue, 19 Oct 2004 18:10:58 -0400 Lee Revell wrote: > /* > * Since receiving is always initiated from a tasklet (in iucv.c), > * we must use netif_rx_ni() instead of netif_rx() > */ > > This implies that the author thought it was a matter of correctness to > use netif_rx_ni vs. netif_rx. But it looks like the only difference is > that the former sacrifices preempt-safety for performance. You can't really delete netif_rx_ni(), so if there is a preemptability issue, just add the necessary preemption protection around the softirq checks. From rlrevell@joe-job.com Tue Oct 19 15:45:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 15:45:44 -0700 (PDT) Received: from mustang.oldcity.dca.net (mustang.oldcity.dca.net [216.158.38.3]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9JMjTbQ030768 for ; Tue, 19 Oct 2004 15:45:30 -0700 Received: (qmail 11491 invoked from network); 19 Oct 2004 22:42:11 -0000 Received: from unknown (HELO ?192.168.2.100?) (207.245.115.154) by mustang with SMTP; 19 Oct 2004 22:42:11 -0000 Subject: Re: tun.c patch to fix "smp_processor_id() in preemptible code" From: Lee Revell To: "David S. Miller" Cc: herbert@gondor.apana.org.au, vda@port.imtp.ilyichevsk.odessa.ua, Linux Network Development , linux-kernel , maxk@qualcomm.com, irda-users@lists.sourceforge.net In-Reply-To: <20041019153308.488d34c1.davem@davemloft.net> References: <1098222676.23367.18.camel@krustophenia.net> <20041019215401.GA16427@gondor.apana.org.au> <1098223857.23367.35.camel@krustophenia.net> <20041019153308.488d34c1.davem@davemloft.net> Content-Type: text/plain Message-Id: <1098225729.23628.2.camel@krustophenia.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 19 Oct 2004 18:42:11 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 10473 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rlrevell@joe-job.com Precedence: bulk X-list: netdev Content-Length: 1017 Lines: 28 On Tue, 2004-10-19 at 18:33, David S. Miller wrote: > On Tue, 19 Oct 2004 18:10:58 -0400 > Lee Revell wrote: > > > /* > > * Since receiving is always initiated from a tasklet (in iucv.c), > > * we must use netif_rx_ni() instead of netif_rx() > > */ > > > > This implies that the author thought it was a matter of correctness to > > use netif_rx_ni vs. netif_rx. But it looks like the only difference is > > that the former sacrifices preempt-safety for performance. > > You can't really delete netif_rx_ni(), so if there is a preemptability > issue, just add the necessary preemption protection around the softirq > checks. > Why not? AIUI the only valid reason to use preempt_disable/enable is in the case of per-CPU data. This is not "real" per-CPU data, it's a performance hack. Therefore it would be incorrect to add the preemption protection, the fix is not to manually call do_softirq but to let the softirq run by the normal mechanism. Am I missing something? Lee From davem@davemloft.net Tue Oct 19 15:48:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 15:48:34 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JMmPgN031152 for ; Tue, 19 Oct 2004 15:48:25 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CK2gr-0007dy-00; Tue, 19 Oct 2004 15:42:49 -0700 Date: Tue, 19 Oct 2004 15:42:49 -0700 From: "David S. Miller" To: Lee Revell Cc: herbert@gondor.apana.org.au, vda@port.imtp.ilyichevsk.odessa.ua, netdev@oss.sgi.com, linux-kernel@vger.kernel.org, maxk@qualcomm.com, irda-users@lists.sourceforge.net Subject: Re: tun.c patch to fix "smp_processor_id() in preemptible code" Message-Id: <20041019154249.6afcaaad.davem@davemloft.net> In-Reply-To: <1098225729.23628.2.camel@krustophenia.net> References: <1098222676.23367.18.camel@krustophenia.net> <20041019215401.GA16427@gondor.apana.org.au> <1098223857.23367.35.camel@krustophenia.net> <20041019153308.488d34c1.davem@davemloft.net> <1098225729.23628.2.camel@krustophenia.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10474 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 1473 Lines: 37 On Tue, 19 Oct 2004 18:42:11 -0400 Lee Revell wrote: > On Tue, 2004-10-19 at 18:33, David S. Miller wrote: > > On Tue, 19 Oct 2004 18:10:58 -0400 > > Lee Revell wrote: > > > > > /* > > > * Since receiving is always initiated from a tasklet (in iucv.c), > > > * we must use netif_rx_ni() instead of netif_rx() > > > */ > > > > > > This implies that the author thought it was a matter of correctness to > > > use netif_rx_ni vs. netif_rx. But it looks like the only difference is > > > that the former sacrifices preempt-safety for performance. > > > > You can't really delete netif_rx_ni(), so if there is a preemptability > > issue, just add the necessary preemption protection around the softirq > > checks. > > > > Why not? AIUI the only valid reason to use preempt_disable/enable is in > the case of per-CPU data. This is not "real" per-CPU data, it's a > performance hack. Therefore it would be incorrect to add the preemption > protection, the fix is not to manually call do_softirq but to let the > softirq run by the normal mechanism. > > Am I missing something? In code paths where netif_rx_ni() is called, there is not a softirq return path check, which is why it is checked here. Theoretically, if you remove the check, softirq processing can be deferred indefinitely. What I'm saying, therefore, is that netif_rx_ni() it not just a performance hack, it is necessary for correctness as well. From ak@suse.de Tue Oct 19 15:48:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 15:49:10 -0700 (PDT) Received: from Cantor.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JMmgSK031187 for ; Tue, 19 Oct 2004 15:48:59 -0700 Received: from hermes.suse.de (hermes-ext.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 CF3C1DD8650; Wed, 20 Oct 2004 00:48:11 +0200 (CEST) Date: Wed, 20 Oct 2004 00:48:10 +0200 From: Andi Kleen To: akpm@osdl.org Cc: netdev@oss.sgi.com, helmut@helios.de Subject: [PATCH] Add appletalk 32bit ioctl emulation Message-Id: <20041020004810.35957a87.ak@suse.de> X-Mailer: Sylpheed version 0.9.11 (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: 10475 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 Content-Length: 1039 Lines: 32 From: Helmut Tschemernjak Add 32bit ioctl conversion for appletalk ioctls Signed-off-by: Andi Kleen Index: linux/fs/compat_ioctl.c =================================================================== --- linux.orig/fs/compat_ioctl.c 2004-10-19 01:55:27.%N +0200 +++ linux/fs/compat_ioctl.c 2004-10-19 17:43:50.%N +0200 @@ -69,6 +69,7 @@ #include #include #include +#include #include /* siocdevprivate_ioctl */ #include @@ -3184,6 +3185,13 @@ HANDLE_IOCTL(SIOCSIFMAP, dev_ifsioc) HANDLE_IOCTL(SIOCGIFADDR, dev_ifsioc) HANDLE_IOCTL(SIOCSIFADDR, dev_ifsioc) + +/* ioctls used by appletalk ddp.c */ +HANDLE_IOCTL(SIOCATALKDIFADDR, dev_ifsioc) +HANDLE_IOCTL(SIOCDIFADDR, dev_ifsioc) +HANDLE_IOCTL(SIOCSARP, dev_ifsioc) +HANDLE_IOCTL(SIOCDARP, dev_ifsioc) + HANDLE_IOCTL(SIOCGIFBRDADDR, dev_ifsioc) HANDLE_IOCTL(SIOCSIFBRDADDR, dev_ifsioc) HANDLE_IOCTL(SIOCGIFDSTADDR, dev_ifsioc) From rlrevell@joe-job.com Tue Oct 19 15:55:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 15:55:38 -0700 (PDT) Received: from mustang.oldcity.dca.net (mustang.oldcity.dca.net [216.158.38.3]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9JMtVIT031973 for ; Tue, 19 Oct 2004 15:55:32 -0700 Received: (qmail 15968 invoked from network); 19 Oct 2004 22:51:29 -0000 Received: from unknown (HELO ?192.168.2.100?) (207.245.115.154) by mustang with SMTP; 19 Oct 2004 22:51:29 -0000 Subject: Re: tun.c patch to fix "smp_processor_id() in preemptible code" From: Lee Revell To: "David S. Miller" Cc: herbert@gondor.apana.org.au, vda@port.imtp.ilyichevsk.odessa.ua, Linux Network Development , linux-kernel , maxk@qualcomm.com, irda-users@lists.sourceforge.net In-Reply-To: <20041019154249.6afcaaad.davem@davemloft.net> References: <1098222676.23367.18.camel@krustophenia.net> <20041019215401.GA16427@gondor.apana.org.au> <1098223857.23367.35.camel@krustophenia.net> <20041019153308.488d34c1.davem@davemloft.net> <1098225729.23628.2.camel@krustophenia.net> <20041019154249.6afcaaad.davem@davemloft.net> Content-Type: text/plain Message-Id: <1098226288.23628.6.camel@krustophenia.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 19 Oct 2004 18:51:28 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 10476 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rlrevell@joe-job.com Precedence: bulk X-list: netdev Content-Length: 1240 Lines: 37 On Tue, 2004-10-19 at 18:42, David S. Miller wrote: > AIUI the only valid reason to use preempt_disable/enable is in > > the case of per-CPU data. This is not "real" per-CPU data, it's a > > performance hack. Therefore it would be incorrect to add the preemption > > protection, the fix is not to manually call do_softirq but to let the > > softirq run by the normal mechanism. > > > > Am I missing something? > > In code paths where netif_rx_ni() is called, there is not a softirq return > path check, which is why it is checked here. > > Theoretically, if you remove the check, softirq processing can be deferred > indefinitely. > > What I'm saying, therefore, is that netif_rx_ni() it not just a performance > hack, it is necessary for correctness as well. > OK, thanks for clarifying. The correct patch is therefore: --- include/linux/netdevice.h~ 2004-10-19 18:50:18.000000000 -0400 +++ include/linux/netdevice.h 2004-10-19 18:51:01.000000000 -0400 @@ -696,9 +696,11 @@ */ static inline int netif_rx_ni(struct sk_buff *skb) { + preempt_disable(); int err = netif_rx(skb); if (softirq_pending(smp_processor_id())) do_softirq(); + preempt_enable(); return err; } Lee From xschmi00@stud.feec.vutbr.cz Tue Oct 19 16:12:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 16:12:28 -0700 (PDT) Received: from tron.kn.vutbr.cz (tron.kn.vutbr.cz [147.229.191.152]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JNCMqv032617 for ; Tue, 19 Oct 2004 16:12:22 -0700 Received: from [147.229.222.29] (a05-0930b.kn.vutbr.cz [147.229.222.29]) by tron.kn.vutbr.cz (8.12.9p2/8.12.9) with ESMTP id i9JNC1H3048229; Wed, 20 Oct 2004 01:12:01 +0200 (CEST) (envelope-from xschmi00@stud.feec.vutbr.cz) Message-ID: <41759F34.4030002@stud.feec.vutbr.cz> Date: Wed, 20 Oct 2004 01:11:48 +0200 From: Michal Schmidt User-Agent: Mozilla Thunderbird 0.8 (X11/20041005) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Matt Mackall CC: Jeff Garzik , netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9] skge: netpoll support References: <41758E11.2040402@stud.feec.vutbr.cz> <20041019220611.GE28904@waste.org> In-Reply-To: <20041019220611.GE28904@waste.org> Content-Type: multipart/mixed; boundary="------------000408040800080107000200" X-Virus-Scanned: clamd / ClamAV version 0.70, clamav-milter version 0.70j X-Scanned-By: milter-spamc/0.19.268 (tron [147.229.191.152]); Wed, 20 Oct 2004 01:12:02 +0200 X-archive-position: 10477 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: xschmi00@stud.feec.vutbr.cz Precedence: bulk X-list: netdev Content-Length: 1963 Lines: 64 This is a multi-part message in MIME format. --------------000408040800080107000200 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Matt Mackall wrote: > On Tue, Oct 19, 2004 at 11:58:41PM +0200, Michal Schmidt wrote: > >>Hi, >>The attached patch adds netconsole support for sk98lin. > > > Looks good. Would be nice to use actual kernel-doc style documentation > blocks for new function comments though. > Like this? (attached) Signed-off-by: Michal Schmidt --------------000408040800080107000200 Content-Type: text/plain; name="sk98lin-netpoll2.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="sk98lin-netpoll2.diff" diff -Nurp linux-2.6.9/drivers/net/sk98lin/skge.c linux-2.6.9-mich/drivers/net/sk98lin/skge.c --- linux-2.6.9/drivers/net/sk98lin/skge.c 2004-10-18 23:53:22.000000000 +0200 +++ linux-2.6.9-mich/drivers/net/sk98lin/skge.c 2004-10-20 01:09:07.566181320 +0200 @@ -1126,6 +1126,21 @@ SK_U32 IntSrc; /* interrupts source re return SkIsrRetHandled; } /* SkGeIsrOnePort */ +#ifdef CONFIG_NET_POLL_CONTROLLER +/** + * SkGePollController - polling receive, for netconsole + * @dev: network device + * + * Polling receive - used by netconsole and other diagnostic tools + * to allow network i/o with interrupts disabled. + */ +static void SkGePollController(struct net_device *dev) +{ + disable_irq(dev->irq); + SkGeIsr(dev->irq, dev, NULL); + enable_irq(dev->irq); +} +#endif /**************************************************************************** * @@ -4960,6 +4975,9 @@ static int __devinit skge_probe_one(stru dev->set_mac_address = &SkGeSetMacAddr; dev->do_ioctl = &SkGeIoctl; dev->change_mtu = &SkGeChangeMtu; +#ifdef CONFIG_NET_POLL_CONTROLLER + dev->poll_controller = &SkGePollController; +#endif dev->flags &= ~IFF_RUNNING; SET_NETDEV_DEV(dev, &pdev->dev); --------------000408040800080107000200-- From oxymoron@waste.org Tue Oct 19 16:22:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 16:22:54 -0700 (PDT) Received: from waste.org (waste.org [209.173.204.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JNMm2X003908 for ; Tue, 19 Oct 2004 16:22:49 -0700 Received: from waste.org (localhost [127.0.0.1]) by waste.org (8.12.3/8.12.3/Debian-7.1) with ESMTP id i9JNMSWk018239; Tue, 19 Oct 2004 18:22:28 -0500 Received: (from oxymoron@localhost) by waste.org (8.12.3/8.12.3/Debian-7.1) id i9JNMOI6018233; Tue, 19 Oct 2004 18:22:24 -0500 Date: Tue, 19 Oct 2004 18:22:23 -0500 From: Matt Mackall To: Michal Schmidt Cc: Jeff Garzik , netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9] skge: netpoll support Message-ID: <20041019232223.GX31237@waste.org> References: <41758E11.2040402@stud.feec.vutbr.cz> <20041019220611.GE28904@waste.org> <41759F34.4030002@stud.feec.vutbr.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41759F34.4030002@stud.feec.vutbr.cz> User-Agent: Mutt/1.3.28i X-Virus-Scanned: by amavisd-new X-archive-position: 10478 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mpm@selenic.com Precedence: bulk X-list: netdev Content-Length: 443 Lines: 18 On Wed, Oct 20, 2004 at 01:11:48AM +0200, Michal Schmidt wrote: > Matt Mackall wrote: > >On Tue, Oct 19, 2004 at 11:58:41PM +0200, Michal Schmidt wrote: > > > >>Hi, > >>The attached patch adds netconsole support for sk98lin. > > > > > >Looks good. Would be nice to use actual kernel-doc style documentation > >blocks for new function comments though. > > > > Like this? (attached) Yep. -- Mathematics is the supreme nostalgia of our time. From jgarzik@pobox.com Tue Oct 19 16:24:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 16:24:38 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9JNOXIs004258 for ; Tue, 19 Oct 2004 16:24:33 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CK3Kz-0003cm-UA; Wed, 20 Oct 2004 00:24:18 +0100 Message-ID: <4175A212.3040909@pobox.com> Date: Tue, 19 Oct 2004 19:24:02 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Netdev CC: Andrew Morton , Al Viro Subject: re-clone netdev-2.6 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10479 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: 294 Lines: 17 If you are a BK user tracking my netdev-2.6 queue, please delete it and re-clone. bk://gkernel.bkbits.net/netdev-2.6 or bk://kernel.bkbits.net/jgarzik/netdev-2.6 (the tree may be locked for a few minutes still after this email is sent, BTW, while the upload completes) Thanks, Jeff From rlrevell@joe-job.com Tue Oct 19 16:56:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 16:56:44 -0700 (PDT) Received: from mustang.oldcity.dca.net (mustang.oldcity.dca.net [216.158.38.3]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9JNudN5005197 for ; Tue, 19 Oct 2004 16:56:39 -0700 Received: (qmail 11163 invoked from network); 19 Oct 2004 23:55:33 -0000 Received: from unknown (HELO ?192.168.2.100?) (207.245.115.154) by mustang with SMTP; 19 Oct 2004 23:55:33 -0000 Subject: [PATCH] Make netif_rx_ni preempt-safe From: Lee Revell To: Andrew Morton Cc: linux-kernel , "David S. Miller" , herbert@gondor.apana.org.au, vda@port.imtp.ilyichevsk.odessa.ua, linux-kernel, maxk@qualcomm.com, irda-users@lists.sourceforge.net, Linux Network Development , Alain Schroeder Content-Type: text/plain Message-Id: <1098230132.23628.28.camel@krustophenia.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 19 Oct 2004 19:55:33 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 10480 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rlrevell@joe-job.com Precedence: bulk X-list: netdev Content-Length: 871 Lines: 30 This patch makes netif_rx_ni() preempt-safe. The problem was reported by Alain Schroeder. Here are the users: drivers/s390/net/ctcmain.c drivers/s390/net/netiucv.c drivers/net/irda/vlsi_ir.c drivers/net/tun.c As David S. Miller explained, the do_softirq (and therefore the preempt dis/enable) is required because there is no softirq check on the return path when netif_rx is called from non-interrupt context. Signed-Off-By: Lee Revell --- include/linux/netdevice.h~ 2004-10-19 18:50:18.000000000 -0400 +++ include/linux/netdevice.h 2004-10-19 18:51:01.000000000 -0400 @@ -696,9 +696,11 @@ */ static inline int netif_rx_ni(struct sk_buff *skb) { + preempt_disable(); int err = netif_rx(skb); if (softirq_pending(smp_processor_id())) do_softirq(); + preempt_enable(); return err; } From herbert@gondor.apana.org.au Tue Oct 19 17:01:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 17:01:10 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K010dq005579 for ; Tue, 19 Oct 2004 17:01:01 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CK3tn-0004ok-00; Wed, 20 Oct 2004 10:00:15 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CK3th-0004UZ-00; Wed, 20 Oct 2004 10:00:09 +1000 Date: Wed, 20 Oct 2004 10:00:09 +1000 To: Lee Revell Cc: Andrew Morton , linux-kernel , "David S. Miller" , vda@port.imtp.ilyichevsk.odessa.ua, linux-kernel@gondor.apana.org.au, maxk@qualcomm.com, irda-users@lists.sourceforge.net, Linux Network Development , Alain Schroeder Subject: Re: [PATCH] Make netif_rx_ni preempt-safe Message-ID: <20041020000009.GA17246@gondor.apana.org.au> References: <1098230132.23628.28.camel@krustophenia.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1098230132.23628.28.camel@krustophenia.net> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10481 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 599 Lines: 17 On Tue, Oct 19, 2004 at 07:55:33PM -0400, Lee Revell wrote: > > --- include/linux/netdevice.h~ 2004-10-19 18:50:18.000000000 -0400 > +++ include/linux/netdevice.h 2004-10-19 18:51:01.000000000 -0400 > @@ -696,9 +696,11 @@ > */ > static inline int netif_rx_ni(struct sk_buff *skb) > { > + preempt_disable(); > int err = netif_rx(skb); This is broken on older compilers. -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From rlrevell@joe-job.com Tue Oct 19 17:24:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 17:24:34 -0700 (PDT) Received: from mustang.oldcity.dca.net (mustang.oldcity.dca.net [216.158.38.3]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9K0OSN3006363 for ; Tue, 19 Oct 2004 17:24:29 -0700 Received: (qmail 24009 invoked from network); 20 Oct 2004 00:22:18 -0000 Received: from unknown (HELO ?192.168.2.100?) (207.245.115.154) by mustang with SMTP; 20 Oct 2004 00:22:18 -0000 Subject: Re: [PATCH] Make netif_rx_ni preempt-safe From: Lee Revell To: Herbert Xu Cc: Andrew Morton , linux-kernel , "David S. Miller" , vda@port.imtp.ilyichevsk.odessa.ua, linux-kernel@gondor.apana.org.au, maxk@qualcomm.com, irda-users@lists.sourceforge.net, Linux Network Development , Alain Schroeder In-Reply-To: <20041020000009.GA17246@gondor.apana.org.au> References: <1098230132.23628.28.camel@krustophenia.net> <20041020000009.GA17246@gondor.apana.org.au> Content-Type: text/plain Message-Id: <1098231737.23628.42.camel@krustophenia.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 19 Oct 2004 20:22:18 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 10482 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rlrevell@joe-job.com Precedence: bulk X-list: netdev Content-Length: 979 Lines: 35 On Tue, 2004-10-19 at 20:00, Herbert Xu wrote: > On Tue, Oct 19, 2004 at 07:55:33PM -0400, Lee Revell wrote: > > > > --- include/linux/netdevice.h~ 2004-10-19 18:50:18.000000000 -0400 > > +++ include/linux/netdevice.h 2004-10-19 18:51:01.000000000 -0400 > > @@ -696,9 +696,11 @@ > > */ > > static inline int netif_rx_ni(struct sk_buff *skb) > > { > > + preempt_disable(); > > int err = netif_rx(skb); > > This is broken on older compilers. How about this: Signed-Off-By: Lee Revell --- include/linux/netdevice.h~ 2004-10-19 20:16:48.000000000 -0400 +++ include/linux/netdevice.h 2004-10-19 20:21:01.000000000 -0400 @@ -696,9 +696,12 @@ */ static inline int netif_rx_ni(struct sk_buff *skb) { - int err = netif_rx(skb); + int err; + preempt_disable(); + err = netif_rx(skb); if (softirq_pending(smp_processor_id())) do_softirq(); + preempt_enable(); return err; } From jeffchua@silk.corp.fedex.com Tue Oct 19 17:24:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 17:25:01 -0700 (PDT) Received: from mx15.sac.fedex.com (mx15.sac.fedex.com [199.81.195.17]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K0OqhV006432 for ; Tue, 19 Oct 2004 17:24:55 -0700 Received: from inet03.prod.fedex.com (inet03.prod.fedex.com [199.81.10.43]) by mx15.sac.fedex.com (8.12.9p2/8.12.9) with ESMTP id i9K0OblJ052302 for ; Tue, 19 Oct 2004 19:24:37 -0500 (CDT) (envelope-from jeffchua@silk.corp.fedex.com) Received: from entpm11.apac.fedex.com (entpm11.apac.fedex.com [155.161.92.11]) by inet03.prod.fedex.com (8.12.11/8.12.11) with ESMTP id i9K0OZq5025178 for ; Tue, 19 Oct 2004 19:24:36 -0500 (CDT) Received: from silk.corp.fedex.com ([155.161.201.173]) by entpm11.apac.fedex.com (Lotus Domino Release 5.0.8) with ESMTP id 2004102008243464:13295 ; Wed, 20 Oct 2004 08:24:34 +0800 Received: from boston.corp.fedex.com ([155.161.156.88]) by silk.corp.fedex.com (8.11.4/8.11.4) with ESMTP id i9K0MiN13246; Wed, 20 Oct 2004 08:22:44 +0800 Date: Wed, 20 Oct 2004 08:21:10 +0800 (SGT) From: Jeff Chua X-X-Sender: root@boston.corp.fedex.com To: Stephen Hemminger cc: Linux Kernel , netdev@oss.sgi.com, linux-net@vger.kernel.org, LARTC@mailman.ds9a.nl Subject: Re: [ANNOUNCE] iproute2 2.6.9-041019 In-Reply-To: <41758014.4080502@osdl.org> Message-ID: References: <41758014.4080502@osdl.org> MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on ENTPM11/FEDEX(Release 5.0.8 |June 18, 2001) at 10/20/2004 08:24:34 AM, Serialize by Router on ENTPM11/FEDEX(Release 5.0.8 |June 18, 2001) at 10/20/2004 08:24:36 AM, Serialize complete at 10/20/2004 08:24:36 AM Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-archive-position: 10483 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jeffchua@silk.corp.fedex.com Precedence: bulk X-list: netdev Content-Length: 922 Lines: 32 On Tue, 19 Oct 2004, Stephen Hemminger wrote: > Now that 2.6.9 is final. Here is an update of the iproute2 utilities that can't compile Got the following error. Linux is 2.6.9. Gcc is 2.95.3. make[1]: Entering directory `/usr/src/net/iproute2-2.6.9/misc' gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g -I../include -DRESOLVE_HOSTNAMES -c -o ss.o ss.c In file included from /usr/include/asm/byteorder.h:57, from ss.c:36: /usr/include/linux/byteorder/little_endian.h:43: parse error before `__cpu_to_le64p' /usr/include/linux/byteorder/little_endian.h: In function `__cpu_to_le64p': /usr/include/linux/byteorder/little_endian.h:45: `__le64' undeclared (first use in this function) /usr/include/linux/byteorder/little_endian.h:45: (Each undeclared identifier is reported only once ... a lot of these errors. These errors went away if linux-2.4.28pre4 is used to compile. Thanks, Jeff. From bobwirka@rtcworks.com Tue Oct 19 17:38:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 17:38:44 -0700 (PDT) Received: from smtp812.mail.sc5.yahoo.com (smtp812.mail.sc5.yahoo.com [66.163.170.82]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9K0cdXO007332 for ; Tue, 19 Oct 2004 17:38:39 -0700 Received: from unknown (HELO ?192.168.1.97?) (bobwirka@ameritech.net@68.73.107.68 with plain) by smtp812.mail.sc5.yahoo.com with SMTP; 20 Oct 2004 00:19:10 -0000 Message-ID: <4175AEFE.7090002@rtcworks.com> Date: Tue, 19 Oct 2004 19:19:10 -0500 From: Bob Wirka User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 CC: netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Re: NFS and Network Driver Question References: <41704198.8000206@rtcworks.com> In-Reply-To: <41704198.8000206@rtcworks.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10484 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bobwirka@rtcworks.com Precedence: bulk X-list: netdev Content-Length: 1721 Lines: 52 Ok, now I feel like I'm taking crazy pills... The embedded system boots up and mounts the root file system on my host laptop. The 'rc.sysinit' startup script executes the command 'mount -a' which should mount /proc, /dev/pts, and /dev/shm, as listed in /etc/fstab. When executed, that command returns "mount: only root can do that". When I get to the bash prompt, 'whoami' reports that I am, indeed, root. A 'mount -a' from the command prompt gives the same result; it doesn't think I'm root for the mount command. I can chown a file owned by root to some other user, and I can create a file or directory in a directory owned by root; so it doesn't always think I'm not root. Any ideas??? Thanks, Bob Wirka Realtime Control Works Bob Wirka wrote: > Hello, > > I'm trying to build a kernel that mounts a NFS root file system. This > is an embedded system; it uses an SMSC LAN91C111 network chip that is > hardwired to I/O addres 0x300 and IRQ 5. I've been using the driver > (as supplied by SMSC) as a module, and it works fine. Now I'm trying > to incorporate it into the kernel build so that I can mount an NFS > file system when the system boots. > > I've added the source code to the kernel tree, and modified the > Makefile(s) and Config.in files so that the driver <> to be > compiled into the kernel. The kernel will load, but the chip is not > initialized and the NFS fails. > > Since I don't know how to pass the io address and irq number to the > kernel, I've hard-coded them into the driver's init function (which I > don't see being called). > > If someone could point me in the right direction, I'd appreciate it. > > Thank you, > > Bob Wirka > Realtime Control Works > > From davem@davemloft.net Tue Oct 19 17:50:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 17:50:27 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K0oE8l007827 for ; Tue, 19 Oct 2004 17:50:14 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CK4af-0007nx-00; Tue, 19 Oct 2004 17:44:33 -0700 Date: Tue, 19 Oct 2004 17:44:32 -0700 From: "David S. Miller" To: Lee Revell Cc: herbert@gondor.apana.org.au, vda@port.imtp.ilyichevsk.odessa.ua, netdev@oss.sgi.com, linux-kernel@vger.kernel.org, maxk@qualcomm.com, irda-users@lists.sourceforge.net Subject: Re: tun.c patch to fix "smp_processor_id() in preemptible code" Message-Id: <20041019174432.41fcdc17.davem@davemloft.net> In-Reply-To: <1098226288.23628.6.camel@krustophenia.net> References: <1098222676.23367.18.camel@krustophenia.net> <20041019215401.GA16427@gondor.apana.org.au> <1098223857.23367.35.camel@krustophenia.net> <20041019153308.488d34c1.davem@davemloft.net> <1098225729.23628.2.camel@krustophenia.net> <20041019154249.6afcaaad.davem@davemloft.net> <1098226288.23628.6.camel@krustophenia.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10485 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 339 Lines: 12 On Tue, 19 Oct 2004 18:51:28 -0400 Lee Revell wrote: > OK, thanks for clarifying. The correct patch is therefore: ... > static inline int netif_rx_ni(struct sk_buff *skb) > { > + preempt_disable(); > int err = netif_rx(skb); You need to put statements after local function variable declarations. From mcr@sandelman.ottawa.on.ca Tue Oct 19 17:56:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 17:56:34 -0700 (PDT) Received: from noxmail.sandelman.ottawa.on.ca (cyphermail.sandelman.ottawa.on.ca [205.150.200.161]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K0uSjw008337 for ; Tue, 19 Oct 2004 17:56:28 -0700 Received: from lox.sandelman.ottawa.on.ca (IDENT:root@lox.sandelman.ottawa.on.ca [205.150.200.178]) by noxmail.sandelman.ottawa.on.ca (8.11.6p3/8.11.6) with ESMTP id i9K0u6H15594; Tue, 19 Oct 2004 20:56:06 -0400 (EDT) Received: from road.marajade.sandelman.ca (desk.marajade.sandelman.ca [205.150.200.247]) by lox.sandelman.ottawa.on.ca (8.11.6p3/8.11.6) with ESMTP id i9K12Jo07425; Tue, 19 Oct 2004 21:02:19 -0400 (EDT) Received: from sandelman.ottawa.on.ca (marajade [127.0.0.1]) by road.marajade.sandelman.ca (8.12.11/8.12.3/Debian-6.6) with ESMTP id i9K0s2VJ007131 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 19 Oct 2004 20:54:02 -0400 Received: from marajade.sandelman.ottawa.on.ca (mcr@localhost) by sandelman.ottawa.on.ca (8.12.11/8.12.3/Debian-6.6) with ESMTP id i9K0s1hq007127; Tue, 19 Oct 2004 20:54:01 -0400 To: Bob Wirka cc: netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Re: NFS and Network Driver Question In-Reply-To: Message from Bob Wirka of "Tue, 19 Oct 2004 19:19:10 CDT." <4175AEFE.7090002@rtcworks.com> References: <41704198.8000206@rtcworks.com> <4175AEFE.7090002@rtcworks.com> X-Mailer: MH-E 7.4.2; nmh 1.0.4+dev; XEmacs 21.4 (patch 15) Mime-Version: 1.0 (generated by tm-edit 1.8) Content-Type: text/plain; charset=US-ASCII Date: Tue, 19 Oct 2004 20:54:01 -0400 Message-ID: <7126.1098233641@marajade.sandelman.ottawa.on.ca> From: Michael Richardson X-archive-position: 10486 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mcr@sandelman.ottawa.on.ca Precedence: bulk X-list: netdev Content-Length: 1571 Lines: 35 -----BEGIN PGP SIGNED MESSAGE----- >>>>> "Bob" == Bob Wirka writes: Bob> Ok, now I feel like I'm taking crazy pills... Bob> The embedded system boots up and mounts the root file system on Bob> my host laptop. The 'rc.sysinit' startup script executes the Bob> command 'mount -a' which should mount /proc, /dev/pts, and Bob> /dev/shm, as listed in /etc/fstab. When executed, that command Bob> returns "mount: only root can do that". Bob> When I get to the bash prompt, 'whoami' reports that I am, Bob> indeed, root. A 'mount -a' from the command prompt gives the Bob> same result; it doesn't think I'm root for the mount command. The mount command is perhaps setuid root, but you aren't mounting the root file system in a way that permits it to be identified as such. Or, the file is in fact not owned by root, and is in fact setuid not-root. - -- ] "Elmo went to the wrong fundraiser" - The Simpson | firewalls [ ] Michael Richardson, Xelerance Corporation, Ottawa, ON |net architect[ ] mcr@xelerance.com http://www.sandelman.ottawa.on.ca/mcr/ |device driver[ ] panic("Just another Debian GNU/Linux using, kernel hacking, security guy"); [ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) Comment: Finger me for keys iQCVAwUBQXW3KIqHRg3pndX9AQFERwQAhUpzaFDzVch+W2TEU2SFDtSJZObQ5yZ3 7hhVtiDI5igzO/MHkipXm89LrNnfwSg+6jfMIo8MlWU+nuqHFWiHkrPeWj8jaFmd QQ+aHhryTn06fyU4UQg1OjEpcHHvo4pLr8lqPwebMjL2JKgk8CM/X2d1N6m9xT+2 Nx8H0Rq84sM= =Dso2 -----END PGP SIGNATURE----- From davem@davemloft.net Tue Oct 19 18:24:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 18:25:01 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K1Or9w009125 for ; Tue, 19 Oct 2004 18:24:54 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CK58I-0007s8-00; Tue, 19 Oct 2004 18:19:18 -0700 Date: Tue, 19 Oct 2004 18:19:18 -0700 From: "David S. Miller" To: Thomas Graf Cc: hadi@cyberus.ca, netdev@oss.sgi.com Subject: Re: [PATCH 0/5] PKT_SCHED: Convert Qdiscs to use generic network statistics/estimator Message-Id: <20041019181918.358ee531.davem@davemloft.net> In-Reply-To: <20041007010146.GA18621@postel.suug.ch> References: <20041007010146.GA18621@postel.suug.ch> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10487 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 624 Lines: 15 On Thu, 7 Oct 2004 03:01:46 +0200 Thomas Graf wrote: > This patchset converts Qdiscs to use the generic network > statistics/estimator. A new TLV type TCA_STATS2 is introduced > carrying the new statistics while the old TLV type TCA_STATS > is still provided for backward compatibility. > > Patch 1: Replace tc_stats with new gnet_stats in struct Qdisc > Patch 2: Use gnet_stats API to copy statistics into netlink message > Patch 3: Introduce gen_replace_estimator > Patch 4: Use generic rate estimator > Patch 5: Qdisc are not supposed to dump TCA_STATS themselves All 5 patches applied, thanks Thomas. From rusty@rustcorp.com.au Tue Oct 19 19:59:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 19:59:22 -0700 (PDT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K2xEQM013991 for ; Tue, 19 Oct 2004 19:59:15 -0700 Received: from localhost.localdomain (localhost [127.0.0.1]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id A452F2BDA0; Wed, 20 Oct 2004 12:58:53 +1000 (EST) Subject: [PATCH] Change masquerade code to use first IP address of interface. From: Rusty Russell To: "David S. Miller" , netdev@oss.sgi.com Cc: Netfilter development mailing list Content-Type: text/plain Message-Id: <1098241135.10571.19.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 20 Oct 2004 12:58:56 +1000 Content-Transfer-Encoding: 7bit X-archive-position: 10488 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rusty@rustcorp.com.au Precedence: bulk X-list: netdev Content-Length: 3105 Lines: 97 As discussed previously, let's try this in 2.6.10, and see who screams. Cheers, Rusty. Name: Change MASQUERADE to Use Device Address Directly Status: Untested Signed-off-by: Rusty Russell (created) Instead of doing a dubious route lookup, just use the first IP address of the (dynamic) interface. Also, reset assured bit so after a device goes down, masq connections can be cleaned up if memory pressure. diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .2156-linux-2.6.9-rc1-bk12/net/ipv4/netfilter/ipt_MASQUERADE.c .2156-linux-2.6.9-rc1-bk12.updated/net/ipv4/netfilter/ipt_MASQUERADE.c --- .2156-linux-2.6.9-rc1-bk12/net/ipv4/netfilter/ipt_MASQUERADE.c 2004-08-25 09:54:25.000000000 +1000 +++ .2156-linux-2.6.9-rc1-bk12.updated/net/ipv4/netfilter/ipt_MASQUERADE.c 2004-09-08 00:15:05.000000000 +1000 @@ -82,7 +82,6 @@ masquerade_target(struct sk_buff **pskb, const struct ip_nat_multi_range *mr; struct ip_nat_multi_range newrange; u_int32_t newsrc; - struct rtable *rt; IP_NF_ASSERT(hooknum == NF_IP_POST_ROUTING); @@ -96,36 +95,12 @@ masquerade_target(struct sk_buff **pskb, || ctinfo == IP_CT_RELATED + IP_CT_IS_REPLY)); mr = targinfo; - - { - struct flowi fl = { .nl_u = { .ip4_u = - { .daddr = (*pskb)->nh.iph->daddr, - .tos = (RT_TOS((*pskb)->nh.iph->tos) | - RTO_CONN), -#ifdef CONFIG_IP_ROUTE_FWMARK - .fwmark = (*pskb)->nfmark -#endif - } } }; - if (ip_route_output_key(&rt, &fl) != 0) { - /* Funky routing can do this. */ - if (net_ratelimit()) - printk("MASQUERADE:" - " No route: Rusty's brain broke!\n"); - return NF_DROP; - } - if (rt->u.dst.dev != out) { - if (net_ratelimit()) - printk("MASQUERADE:" - " Route sent us somewhere else.\n"); - ip_rt_put(rt); - return NF_DROP; - } + newsrc = inet_select_addr(out, 0, RT_SCOPE_UNIVERSE); + if (!newsrc) { + printk("MASQUERADE: %s ate my IP address\n", out->name); + return NF_DROP; } - newsrc = rt->rt_src; - DEBUGP("newsrc = %u.%u.%u.%u\n", NIPQUAD(newsrc)); - ip_rt_put(rt); - WRITE_LOCK(&masq_lock); ct->nat.masq_index = out->ifindex; WRITE_UNLOCK(&masq_lock); @@ -157,6 +132,18 @@ device_cmp(const struct ip_conntrack *i, return ret; } +static inline int +connect_unassure(const struct ip_conntrack *i, void *_ina) +{ + struct in_ifaddr *ina = _ina; + + /* We reset the ASSURED bit on all connections, so they will + * get reaped under memory pressure. */ + if (i->nat.masq_index == ina->ifa_dev->dev->ifindex) + clear_bit(IPS_ASSURED_BIT, (unsigned long *)&i->status); + return 0; +} + static int masq_inet_event(struct notifier_block *this, unsigned long event, void *ptr) @@ -166,6 +153,8 @@ static int masq_inet_event(struct notifi * entries. */ if (event == NETDEV_UP) ip_ct_selective_cleanup(device_cmp, ptr); + else if (event == NETDEV_DOWN) + ip_ct_selective_cleanup(connect_unassure, ptr); return NOTIFY_DONE; } -- Anyone who quotes me in their signature is an idiot -- Rusty Russell From rddunlap@osdl.org Tue Oct 19 21:32:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 21:32:33 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K4WO4f019730 for ; Tue, 19 Oct 2004 21:32:25 -0700 Received: from [127.0.0.1] (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9K4W4913328; Tue, 19 Oct 2004 21:32:04 -0700 Message-ID: <4175E955.6070807@osdl.org> Date: Tue, 19 Oct 2004 21:28:05 -0700 From: "Randy.Dunlap" User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev , davem@davemloft.net, jgarzik Subject: [PATCH] tg3: reading eeprom via ethtool: not __init Content-Type: multipart/mixed; boundary="------------030104020507020302040509" X-archive-position: 10489 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rddunlap@osdl.org Precedence: bulk X-list: netdev Content-Length: 2002 Lines: 58 This is a multi-part message in MIME format. --------------030104020507020302040509 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit -- ~Randy --------------030104020507020302040509 Content-Type: text/x-patch; name="tg3_init.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="tg3_init.patch" tg3_get_eeprom calls: tg3_nvram_read_using_eeprom __init: but the latter cannot be __init if it can be called (via ethtool) after driver-init: Error: ./drivers/net/tg3.o .text refers to 0000000000007220 R_X86_64_PC32 .init.text+0xfffffffffffffffc Error: ./drivers/net/tg3.o .text refers to 000000000000725d R_X86_64_PC32 .init.text+0xfffffffffffffffc Error: ./drivers/net/tg3.o .text refers to 00000000000072a7 R_X86_64_PC32 .init.text+0xfffffffffffffffc Error: ./drivers/net/tg3.o .text refers to 00000000000072e8 R_X86_64_PC32 .init.text+0xfffffffffffffffc Signed-off-by: Randy Dunlap diffstat:= drivers/net/tg3.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff -Naurp ./drivers/net/tg3.c~tg3_init ./drivers/net/tg3.c --- ./drivers/net/tg3.c~tg3_init 2004-10-18 14:54:31.000000000 -0700 +++ ./drivers/net/tg3.c 2004-10-19 20:43:44.510473240 -0700 @@ -6319,8 +6319,8 @@ static int tg3_get_eeprom_len(struct net return EEPROM_CHIP_SIZE; } -static int __devinit tg3_nvram_read_using_eeprom(struct tg3 *tp, - u32 offset, u32 *val); +static int tg3_nvram_read_using_eeprom(struct tg3 *tp, + u32 offset, u32 *val); static int tg3_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, u8 *data) { struct tg3 *tp = dev->priv; @@ -6851,8 +6851,8 @@ static void __devinit tg3_nvram_init(str } } -static int __devinit tg3_nvram_read_using_eeprom(struct tg3 *tp, - u32 offset, u32 *val) +static int tg3_nvram_read_using_eeprom(struct tg3 *tp, + u32 offset, u32 *val) { u32 tmp; int i; --------------030104020507020302040509-- From davem@davemloft.net Tue Oct 19 21:44:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 21:44:46 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K4ieYp020399 for ; Tue, 19 Oct 2004 21:44:40 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CK8Fe-0008Go-00; Tue, 19 Oct 2004 21:39:06 -0700 Date: Tue, 19 Oct 2004 21:39:06 -0700 From: "David S. Miller" To: Thomas Graf Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6] CBQ: Destroy filters before destroying classes Message-Id: <20041019213906.2aced91d.davem@davemloft.net> In-Reply-To: <20041007175313.GA19628@postel.suug.ch> References: <20041007175313.GA19628@postel.suug.ch> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10490 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 2181 Lines: 67 On Thu, 7 Oct 2004 19:53:13 +0200 Thomas Graf wrote: > CBQ destroys its classes by traversing the hashtable and thus classes > are not destroyed from root to leafs which means that class Y being > a subclass of class X may be destroyed before X. This is a problem > if a filter is attached to class X (parent) classifying into class Y > (result). In case Y gets deleted before X the filter references an > already deleted class while trying to unbind (cbq_unbind_filter). > Therefore all filters must be destroyed before destroying classes. An > additional BUG_TRAP has been added to document this not so obvious case. Applied, thanks a lot Thomas. > Patch is relative to "Convert Qdiscs to use generic network > statistics/estimator" patchset. BTW, that patch set forgot to handle sch_atm.c, I'm beginning to believe that I'm the only developer with this packet scheduler enabled in his test builds :-) Most people don't have it enabled because it requires CONFIG_ATM to be on. Anyways, I fixed that up as follows. # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/19 21:11:02-07:00 davem@nuts.davemloft.net # [PKT_SCHED]: Fix sch_atm build. # # Move it over to use qstats/bstats. # # Signed-off-by: David S. Miller # # net/sched/sch_atm.c # 2004/10/19 21:10:26-07:00 davem@nuts.davemloft.net +4 -4 # [PKT_SCHED]: Fix sch_atm build. # diff -Nru a/net/sched/sch_atm.c b/net/sched/sch_atm.c --- a/net/sched/sch_atm.c 2004-10-19 21:21:59 -07:00 +++ b/net/sched/sch_atm.c 2004-10-19 21:21:59 -07:00 @@ -449,12 +449,12 @@ result == TC_POLICE_SHOT || #endif (ret = flow->q->enqueue(skb,flow->q)) != 0) { - sch->stats.drops++; + sch->qstats.drops++; if (flow) flow->stats.drops++; return ret; } - sch->stats.bytes += skb->len; - sch->stats.packets++; + sch->bstats.bytes += skb->len; + sch->bstats.packets++; flow->stats.bytes += skb->len; flow->stats.packets++; /* @@ -547,7 +547,7 @@ ret = p->link.q->ops->requeue(skb,p->link.q); if (!ret) sch->q.qlen++; else { - sch->stats.drops++; + sch->qstats.drops++; p->link.stats.drops++; } return ret; From jgarzik@pobox.com Tue Oct 19 21:46:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 21:46:18 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K4kDII020746 for ; Tue, 19 Oct 2004 21:46:13 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CK8MH-0000qr-JF; Wed, 20 Oct 2004 05:45:57 +0100 Message-ID: <4175ED73.1000209@pobox.com> Date: Wed, 20 Oct 2004 00:45:39 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ganesh Venkatesan CC: netdev Subject: Re: [PATCH 2.5 0/3] e100: driver update References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10491 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: 221 Lines: 8 Ganesh Venkatesan wrote: > 1. Fix loss of connectivity to BMC when interface is brought down > 2. Fix set ringparam for ethtool returning error code on bad input > 3. Driver version number update applied all 3 patches From jgarzik@pobox.com Tue Oct 19 21:48:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 21:48:11 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K4m6Y8021107 for ; Tue, 19 Oct 2004 21:48:07 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CK8O7-0000vm-Nj; Wed, 20 Oct 2004 05:47:51 +0100 Message-ID: <4175EDEC.2070000@pobox.com> Date: Wed, 20 Oct 2004 00:47:40 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ganesh Venkatesan CC: netdev Subject: Re: [Patch 2.5 0/3] e100/e1000/ixgb: Configuration and user guide updates References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10492 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: 180 Lines: 8 Ganesh Venkatesan wrote: > 1. Configuration and user guide for e1000 > 2. Configuration and user guide for e100 > 3. Configuration and user guide for ixgb applied all 3 patches From davem@davemloft.net Tue Oct 19 22:07:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 22:07:52 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K57lRb021931 for ; Tue, 19 Oct 2004 22:07:47 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CK8c1-0008KZ-00; Tue, 19 Oct 2004 22:02:13 -0700 Date: Tue, 19 Oct 2004 22:02:13 -0700 From: "David S. Miller" To: hadi@cyberus.ca Cc: netdev@oss.sgi.com Subject: Re: patch: Mirred action Message-Id: <20041019220213.0eeee916.davem@davemloft.net> In-Reply-To: <1097498972.15075.7.camel@jzny.localdomain> References: <1097498972.15075.7.camel@jzny.localdomain> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10493 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 174 Lines: 8 On 11 Oct 2004 08:49:32 -0400 jamal wrote: > I am gonna start trickling these actions/driver patches to you. > > signed off by me Applied, thanks Jamal. From davem@davemloft.net Tue Oct 19 22:12:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 22:12:40 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K5CZFU022343 for ; Tue, 19 Oct 2004 22:12:35 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CK8gg-0008LL-00; Tue, 19 Oct 2004 22:07:02 -0700 Date: Tue, 19 Oct 2004 22:07:02 -0700 From: "David S. Miller" To: Andi Kleen Cc: netdev@oss.sgi.com Subject: Re: [PATCH] Remove bogus #ifdef CONFIG_SYSCTL in TCP Message-Id: <20041019220702.052aa0a4.davem@davemloft.net> In-Reply-To: <20041012163806.GA4223@wotan.suse.de> References: <20041012163806.GA4223@wotan.suse.de> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10494 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 231 Lines: 9 On Tue, 12 Oct 2004 18:38:06 +0200 Andi Kleen wrote: > Modular IPv6 needs these variables always exported, even when > CONFIG_SYSCTL is not enabled. > > Signed-off-by: Andi Kleen Applied, thanks Andi. From davem@davemloft.net Tue Oct 19 22:14:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 22:14:48 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K5EhgG022728 for ; Tue, 19 Oct 2004 22:14:43 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CK8iW-0008Ln-00; Tue, 19 Oct 2004 22:08:56 -0700 Date: Tue, 19 Oct 2004 22:08:55 -0700 From: "David S. Miller" To: Herbert Xu Cc: dada1@cosmosbay.com, netdev@oss.sgi.com Subject: Re: [1/3] [TCP] Create tcpdiag_dump_sock Message-Id: <20041019220855.06a54af9.davem@davemloft.net> In-Reply-To: <20041014213030.GA18433@gondor.apana.org.au> References: <4164F60C.6080807@cosmosbay.com> <20041014213030.GA18433@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10495 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 273 Lines: 9 On Fri, 15 Oct 2004 07:30:30 +1000 Herbert Xu wrote: > The first one move tcpdiag_bc_run calls into one place so that we can > change its parameters next. > > Signed-off-by: Herbert Xu Applied, thanks Herbert. From davem@davemloft.net Tue Oct 19 22:15:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 22:15:43 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K5FcPe022941 for ; Tue, 19 Oct 2004 22:15:38 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CK8jY-0008MB-00; Tue, 19 Oct 2004 22:10:00 -0700 Date: Tue, 19 Oct 2004 22:09:59 -0700 From: "David S. Miller" To: Herbert Xu Cc: dada1@cosmosbay.com, netdev@oss.sgi.com Subject: Re: [2/3] [TCP] Make tcpdiag_bc_run take tcpdiag_entry Message-Id: <20041019220959.69919679.davem@davemloft.net> In-Reply-To: <20041014213347.GB18433@gondor.apana.org.au> References: <4164F60C.6080807@cosmosbay.com> <20041014213030.GA18433@gondor.apana.org.au> <20041014213347.GB18433@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10496 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 535 Lines: 14 On Fri, 15 Oct 2004 07:33:47 +1000 Herbert Xu wrote: > This patch adds a tcpdiag_entry struct and makes tcpdiag_bc_run use it > instead of a struct sock. This will allow us to use tcpdiag_bc_run on > struct open_request in the next patch. > > Please note that I've left the CONFIG_IPV6 defines in as to support > ipv6 modules we'll need to modularise tcpdiag itself. I'll probably > do that after this is all fixed. > > Signed-off-by: Herbert Xu Also applied, thanks. From davem@davemloft.net Tue Oct 19 22:16:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 22:16:49 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K5Gj9h023396 for ; Tue, 19 Oct 2004 22:16:45 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CK8kb-0008Mt-00; Tue, 19 Oct 2004 22:11:05 -0700 Date: Tue, 19 Oct 2004 22:11:05 -0700 From: "David S. Miller" To: Herbert Xu Cc: dada1@cosmosbay.com, netdev@oss.sgi.com Subject: Re: [3/3] [TCP] Dump SYN_RECV sockets in tcpdiag Message-Id: <20041019221105.53e68281.davem@davemloft.net> In-Reply-To: <20041014213517.GC18433@gondor.apana.org.au> References: <4164F60C.6080807@cosmosbay.com> <20041014213030.GA18433@gondor.apana.org.au> <20041014213347.GB18433@gondor.apana.org.au> <20041014213517.GC18433@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10497 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 390 Lines: 11 On Fri, 15 Oct 2004 07:35:17 +1000 Herbert Xu wrote: > Finally this patch adds the code to list SYN_RECV sockets. A future > enhancement would be to do this for the GET operation as well. > > Signed-off-by: Herbert Xu Also applied, thanks for fixing all of this Herbert. Feel free to make the mentioned GET enhancement :-) From davem@davemloft.net Tue Oct 19 22:18:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 22:18:49 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K5Ii6E023739 for ; Tue, 19 Oct 2004 22:18:44 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CK8mU-0008NA-00; Tue, 19 Oct 2004 22:13:02 -0700 Date: Tue, 19 Oct 2004 22:13:01 -0700 From: "David S. Miller" To: Herbert Xu Cc: 7atbggg02@sneakemail.com, netdev@oss.sgi.com Subject: Re: 2.6.9-rc4 tcp_transmit_skb: BUG_ON(!tcp_skb_pcount(skb)) Message-Id: <20041019221301.1490c1f6.davem@davemloft.net> In-Reply-To: References: <20041013231006.GA14742@m.safari.iki.fi> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10498 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 450 Lines: 18 On Fri, 15 Oct 2004 16:47:34 +1000 Herbert Xu wrote: > Sami Farin <7atbggg02@sneakemail.com> wrote: > > > > tcp_output.c:277 > > Invalid operand 0 > > tcp_transmit_skb > > tcp_send_synack > > tcp_rcv_synsent_state_process > > OK, this patch should fix it. > > We weren't copying the TSO fields in skb_copy(). > > Signed-off-by: Herbert Xu Great catch Herbert. Patch applied, thanks. From davem@davemloft.net Tue Oct 19 22:33:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 22:33:55 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K5XoCE024394 for ; Tue, 19 Oct 2004 22:33:51 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CK915-0008PI-00; Tue, 19 Oct 2004 22:28:07 -0700 Date: Tue, 19 Oct 2004 22:28:07 -0700 From: "David S. Miller" To: Herbert Xu Cc: pablo@eurodev.net, hadi@cyberus.ca, netdev@oss.sgi.com Subject: Re: [RFC] Yield in netlink_broadcast when congested Message-Id: <20041019222807.6b1e8454.davem@davemloft.net> In-Reply-To: <20041016113006.GA12843@gondor.apana.org.au> References: <20041016113006.GA12843@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10499 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 509 Lines: 16 On Sat, 16 Oct 2004 21:30:06 +1000 Herbert Xu wrote: > So here is my proposal: if we detect signs of impending congestion > in netlink_broadcast(), and that we're in a sleepable context, then > we yield(). > > This gives the receivers a chance to pull down the messages without > having the sender spinning indefinitely. I've tested it on my UP > machine and it does resolve the problem for ip monitor. > > Comments anyone? This looks great, patch applied. Thanks Herbert. From davem@davemloft.net Tue Oct 19 22:36:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 22:36:22 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K5aInC024768 for ; Tue, 19 Oct 2004 22:36:18 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CK93O-0008QD-00; Tue, 19 Oct 2004 22:30:30 -0700 Date: Tue, 19 Oct 2004 22:30:29 -0700 From: "David S. Miller" To: Herbert Xu Cc: romieu@fr.zoreil.com, jkillius@arcor.de, netdev@oss.sgi.com, jgarzik@pobox.com Subject: Re: r8169: page allocation failure Message-Id: <20041019223029.35be700b.davem@davemloft.net> In-Reply-To: <20041017090837.GA24362@gondor.apana.org.au> References: <20041016204848.GB21849@electric-eye.fr.zoreil.com> <20041017090837.GA24362@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10500 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 591 Lines: 16 On Sun, 17 Oct 2004 19:08:37 +1000 Herbert Xu wrote: > On Sun, Oct 17, 2004 at 05:47:52PM +1000, Herbert Xu wrote: > > > > It should instead allocate a new skb of 1 mss. I'll work on it. > > In fact it was allocating space that it wasn't even using :) > > The following patch makes it allocate skb_headlen(skb) - len instead > of skb->len - len. When skb is linear there is no difference. When > it's non-linear we only ever copy the bytes in the header. > > Please let me know whether this fixes your problem. Looks great, good catch. Patch applied. From davem@davemloft.net Tue Oct 19 23:18:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 23:18:49 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K6Iifo026253 for ; Tue, 19 Oct 2004 23:18:44 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CK9iS-0008W5-00; Tue, 19 Oct 2004 23:12:56 -0700 Date: Tue, 19 Oct 2004 23:12:56 -0700 From: "David S. Miller" To: Herbert Xu Cc: laforge@gnumonks.org, netdev@oss.sgi.com Subject: Re: [PATCH 2.6] Re: xfrm_user.c doesn't use NLMSG_F_MULTI Message-Id: <20041019231256.1e4b039e.davem@davemloft.net> In-Reply-To: <20041016094553.GA6546@gondor.apana.org.au> References: <20041013080705.GB3387@obroa-skai.de.gnumonks.org> <20041014105757.GB12694@obroa-skai.de.gnumonks.org> <20041014110742.GA7910@gondor.apana.org.au> <20041015191444.GM17516@obroa-skai.de.gnumonks.org> <20041016094553.GA6546@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10501 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 927 Lines: 23 On Sat, 16 Oct 2004 19:45:53 +1000 Herbert Xu wrote: > > --- linux-2.6.9-rc3-bk9-test/net/ipv4/tcp_diag.c 2004-10-10 14:01:47.000000000 +0200 > > +++ linux-2.6.9-rc3-bk9-test-xfrm_netlink/net/ipv4/tcp_diag.c 2004-10-15 21:02:19.000000000 +0200 > > @@ -97,7 +97,7 @@ > > } > > > > static int tcpdiag_fill(struct sk_buff *skb, struct sock *sk, > > - int ext, u32 pid, u32 seq) > > + int ext, u32 pid, u32 seq, u16 nlmsg_flags) > > The patch looks OK. But I have some pending patches in this area (see > http://oss.sgi.com/projects/netdev/archive/2004-10/msg00456.html). > Could you please hold off on it for a while? I just installed Herbert's patches from that thread. Harald, you can redo your patch against that thread's patches or just wait until it hits Linus's tree tonight or tomorrow. Please also take care of the issue Herbert pointed out in the xfrm_user.c case wrt. dumping. From davem@davemloft.net Tue Oct 19 23:21:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 23:21:17 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K6LDSp026618 for ; Tue, 19 Oct 2004 23:21:13 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CK9l3-00005B-00; Tue, 19 Oct 2004 23:15:37 -0700 Date: Tue, 19 Oct 2004 23:15:37 -0700 From: "David S. Miller" To: Jeff Garzik Cc: jbarnes@sgi.com, netdev@oss.sgi.com, davem@redhat.com Subject: Re: [PATCH] work around 5701 misalignment Message-Id: <20041019231537.57e8ad10.davem@davemloft.net> In-Reply-To: <416D96B8.5090204@pobox.com> References: <200410131554.19845.jbarnes@sgi.com> <416D96B8.5090204@pobox.com> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10502 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 286 Lines: 9 On Wed, 13 Oct 2004 16:57:28 -0400 Jeff Garzik wrote: > DaveM might squirm a bit but IMHO RX_COPY_THRESHOLD really is > platform-dependent. I'm not totally against such an idea. We have something similar already in the form of NET_IP_ALIGN which ppc64 overrides. From yoshfuji@linux-ipv6.org Tue Oct 19 23:35:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 23:35:31 -0700 (PDT) Received: from yue.st-paulia.net (yue.linux-ipv6.org [203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K6ZPF4027130 for ; Tue, 19 Oct 2004 23:35:26 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 07FF133CE5; Wed, 20 Oct 2004 15:35:52 +0900 (JST) Date: Wed, 20 Oct 2004 15:35:25 +0900 (JST) Message-Id: <20041020.153525.50629727.yoshfuji@linux-ipv6.org> To: kaber@trash.net, davem@davemloft.net Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9]: Fix netdevice/inet6_dev reference leaks in ip6_route_add error paths From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <417591A2.4090201@trash.net> References: <417591A2.4090201@trash.net> Organization: USAGI Project X-URL: http://www.yoshifuji.org/%7Ehideaki/ X-Fingerprint: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA X-PGP-Key-URL: http://www.yoshifuji.org/%7Ehideaki/hideaki@yoshifuji.org.asc X-Face: "5$Al-.M>NJ%a'@hhZdQm:."qn~PA^gq4o*>iCFToq*bAi#4FRtx}enhuQKz7fNqQz\BYU] $~O_5m-9'}MIs`XGwIEscw;e5b>n"B_?j/AkL~i/MEaZBLP X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Wed_Oct_20_15:35:25_2004_849)--" Content-Transfer-Encoding: 7bit X-archive-position: 10503 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: yoshfuji@linux-ipv6.org Precedence: bulk X-list: netdev Content-Length: 3702 Lines: 115 ----Next_Part(Wed_Oct_20_15:35:25_2004_849)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit In article <417591A2.4090201@trash.net> (at Wed, 20 Oct 2004 00:13:54 +0200), Patrick McHardy says: > The recent changes to ip6_route_add added multiple leaks in > error paths. This patch should fix them. Agreed. David, please apply. Signed-off-by: Hideaki YOSHIFUJI --yoshfuji ----Next_Part(Wed_Oct_20_15:35:25_2004_849)-- Content-Type: Message/Rfc822 Content-Transfer-Encoding: 7bit Content-Disposition: inline Return-Path: Delivered-To: yoshfuji@yue.st-paulia.net Received: from sapphire.st-paulia.net (sapphire.linux-ipv6.org [203.178.140.14]) by yue.st-paulia.net (Postfix) with ESMTP id 64A1433CE5 for ; Wed, 20 Oct 2004 07:15:11 +0900 (JST) Received: by sapphire.st-paulia.net (Postfix) id 5B3A223CF9; Wed, 20 Oct 2004 07:34:58 +0900 (JST) Delivered-To: yoshfuji@sapphire.st-paulia.net Received: from nezu.linux-ipv6.org (linux6.nezu.wide.ad.jp [203.178.142.218]) by sapphire.st-paulia.net (Postfix) with ESMTP id 703B023CF8 for ; Wed, 20 Oct 2004 07:34:55 +0900 (JST) Received: from gw.localnet ([62.206.217.67]) by nezu.linux-ipv6.org (8.13.1/8.13.1/Debian-13) with ESMTP id i9JMEMii001727 for ; Wed, 20 Oct 2004 07:14:25 +0900 Received: from [172.16.1.123] (helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1CK2Ma-0002us-00; Wed, 20 Oct 2004 00:21:52 +0200 Message-ID: <417591A2.4090201@trash.net> Date: Wed, 20 Oct 2004 00:13:54 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" Cc: netdev@oss.sgi.com, YOSHIFUJI Hideaki Subject: [PATCH 2.6.9]: Fix netdevice/inet6_dev reference leaks in ip6_route_add error paths Content-Type: multipart/mixed; boundary="------------040705080908040609060609" This is a multi-part message in MIME format. --------------040705080908040609060609 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit The recent changes to ip6_route_add added multiple leaks in error paths. This patch should fix them. Regards Patrick --------------040705080908040609060609 Content-Type: text/plain; name="p2" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="p2" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/19 23:46:56+02:00 kaber@coreworks.de # [IPV6]: Fix netdevice/inet6_dev reference leaks in ip6_route_add error paths # # Signed-off-by: Patrick McHardy # # net/ipv6/route.c # 2004/10/19 23:46:17+02:00 kaber@coreworks.de +8 -3 # [IPV6]: Fix netdevice/inet6_dev reference leaks in ip6_route_add error paths # # Signed-off-by: Patrick McHardy # diff -Nru a/net/ipv6/route.c b/net/ipv6/route.c --- a/net/ipv6/route.c 2004-10-19 23:52:23 +02:00 +++ b/net/ipv6/route.c 2004-10-19 23:52:23 +02:00 @@ -798,8 +798,10 @@ rt = ip6_dst_alloc(); - if (rt == NULL) - return -ENOMEM; + if (rt == NULL) { + err = -ENOMEM; + goto out; + } rt->u.dst.obsolete = -1; rt->rt6i_expires = clock_t_to_jiffies(rtmsg->rtmsg_info); @@ -962,7 +964,10 @@ out: if (dev) dev_put(dev); - dst_free((struct dst_entry *) rt); + if (idev) + in6_dev_put(idev); + if (rt) + dst_free((struct dst_entry *) rt); return err; } --------------040705080908040609060609-- ----Next_Part(Wed_Oct_20_15:35:25_2004_849)---- From laforge@gnumonks.org Tue Oct 19 23:38:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 23:38:49 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K6chLk027540 for ; Tue, 19 Oct 2004 23:38:44 -0700 Received: from dsl-082-083-227-219.arcor-ip.net ([82.83.227.219] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1CKA5J-0003Wu-NS; Wed, 20 Oct 2004 08:36:33 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1CKA3U-000598-58; Wed, 20 Oct 2004 08:34:40 +0200 Date: Wed, 20 Oct 2004 08:34:40 +0200 From: Harald Welte To: "David S. Miller" Cc: Herbert Xu , netdev@oss.sgi.com Subject: Re: [PATCH 2.6] Re: xfrm_user.c doesn't use NLMSG_F_MULTI Message-ID: <20041020063440.GV21927@sunbeam.de.gnumonks.org> References: <20041013080705.GB3387@obroa-skai.de.gnumonks.org> <20041014105757.GB12694@obroa-skai.de.gnumonks.org> <20041014110742.GA7910@gondor.apana.org.au> <20041015191444.GM17516@obroa-skai.de.gnumonks.org> <20041016094553.GA6546@gondor.apana.org.au> <20041019231256.1e4b039e.davem@davemloft.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lA2zPjnDULdUXMNN" Content-Disposition: inline In-Reply-To: <20041019231256.1e4b039e.davem@davemloft.net> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10504 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@gnumonks.org Precedence: bulk X-list: netdev Content-Length: 1376 Lines: 44 --lA2zPjnDULdUXMNN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 19, 2004 at 11:12:56PM -0700, David S. Miller wrote: > I just installed Herbert's patches from that thread. > Harald, you can redo your patch against that thread's > patches or just wait until it hits Linus's tree tonight > or tomorrow. I'd rather wait, more convenient ;) > Please also take care of the issue Herbert pointed out > in the xfrm_user.c case wrt. dumping. yes, I'll do so. I didn't fix it right now (and repost) since Herbert asked me to hold back. --=20 - Harald Welte http://www.gnumonks.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D Programming is like sex: One mistake and you have to support it your lifeti= me --lA2zPjnDULdUXMNN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBdgcAXaXGVTD0i/8RAsYFAJ4mlhPDbYXm8JBB8+Zqzve6TS5UWwCdF44w zDJEJ9WMcbFAbXT1m/daxaY= =amLv -----END PGP SIGNATURE----- --lA2zPjnDULdUXMNN-- From tgraf@suug.ch Tue Oct 19 23:40:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 23:40:12 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K6e6cS027889 for ; Tue, 19 Oct 2004 23:40:06 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 6A2E9F; Wed, 20 Oct 2004 08:39:23 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 20D501C0E9; Wed, 20 Oct 2004 08:40:05 +0200 (CEST) Date: Wed, 20 Oct 2004 08:40:05 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6] CBQ: Destroy filters before destroying classes Message-ID: <20041020064004.GC21977@postel.suug.ch> References: <20041007175313.GA19628@postel.suug.ch> <20041019213906.2aced91d.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041019213906.2aced91d.davem@davemloft.net> X-archive-position: 10505 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 469 Lines: 9 * David S. Miller <20041019213906.2aced91d.davem@davemloft.net> 2004-10-19 21:39 > BTW, that patch set forgot to handle sch_atm.c, I'm beginning to > believe that I'm the only developer with this packet scheduler > enabled in his test builds :-) Most people don't have it enabled > because it requires CONFIG_ATM to be on. My apologies and thanks for fixing it. I have put it on now :-> I will submit patches to convert the class part of classful qdiscs later today. From yoshfuji@linux-ipv6.org Tue Oct 19 23:40:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 23:40:29 -0700 (PDT) Received: from yue.st-paulia.net (yue.linux-ipv6.org [203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K6eKc9027950 for ; Tue, 19 Oct 2004 23:40:21 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 6E02133CE5; Wed, 20 Oct 2004 15:40:47 +0900 (JST) Date: Wed, 20 Oct 2004 15:40:45 +0900 (JST) Message-Id: <20041020.154045.128392519.yoshfuji@linux-ipv6.org> To: lukasz@trabinski.net Cc: netdev@oss.sgi.com, yoshfuji@linux-ipv6.org Subject: Re: unregister_netdevice 2.6.9 From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: References: Organization: USAGI Project X-URL: http://www.yoshifuji.org/%7Ehideaki/ X-Fingerprint: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA X-PGP-Key-URL: http://www.yoshifuji.org/%7Ehideaki/hideaki@yoshifuji.org.asc X-Face: "5$Al-.M>NJ%a'@hhZdQm:."qn~PA^gq4o*>iCFToq*bAi#4FRtx}enhuQKz7fNqQz\BYU] $~O_5m-9'}MIs`XGwIEscw;e5b>n"B_?j/AkL~i/MEaZBLP X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Wed_Oct_20_15:40:45_2004_629)--" Content-Transfer-Encoding: 7bit X-archive-position: 10506 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: yoshfuji@linux-ipv6.org Precedence: bulk X-list: netdev Content-Length: 6944 Lines: 189 ----Next_Part(Wed_Oct_20_15:40:45_2004_629)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit In article (at Tue, 19 Oct 2004 17:58:58 +0200 (CEST)), Lukasz Trabinski says: > After shutdown/reboot : > > unregister_netdevice: waiting for xxxx to become free. Usage count = 1 > > and still wait. Does this fix your problem? ----Next_Part(Wed_Oct_20_15:40:45_2004_629)-- Content-Type: Message/Rfc822 Content-Transfer-Encoding: 7bit Content-Disposition: inline Return-Path: Delivered-To: yoshfuji@yue.st-paulia.net Received: from sapphire.st-paulia.net (sapphire.linux-ipv6.org [203.178.140.14]) by yue.st-paulia.net (Postfix) with ESMTP id 823DC33CE5 for ; Wed, 20 Oct 2004 15:37:38 +0900 (JST) Received: by sapphire.st-paulia.net (Postfix) id 1692923CF9; Wed, 20 Oct 2004 15:57:29 +0900 (JST) Delivered-To: yoshfuji@sapphire.st-paulia.net Received: from nezu.linux-ipv6.org (linux6.nezu.wide.ad.jp [203.178.142.218]) by sapphire.st-paulia.net (Postfix) with ESMTP id 164B223CF8 for ; Wed, 20 Oct 2004 15:57:26 +0900 (JST) Received: from oss.sgi.com (oss.sgi.com [192.48.159.27]) by nezu.linux-ipv6.org (8.13.1/8.13.1/Debian-13) with ESMTP id i9K6arBC014211 for ; Wed, 20 Oct 2004 15:36:53 +0900 Received: from oss.sgi.com (localhost [127.0.0.1]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K6b4gC027433; Tue, 19 Oct 2004 23:37:04 -0700 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 23:35:31 -0700 (PDT) Received: from yue.st-paulia.net (yue.linux-ipv6.org [203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K6ZPF4027130 for ; Tue, 19 Oct 2004 23:35:26 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 07FF133CE5; Wed, 20 Oct 2004 15:35:52 +0900 (JST) Date: Wed, 20 Oct 2004 15:35:25 +0900 (JST) Message-Id: <20041020.153525.50629727.yoshfuji@linux-ipv6.org> To: kaber@trash.net, davem@davemloft.net Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9]: Fix netdevice/inet6_dev reference leaks in ip6_route_add error paths From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <417591A2.4090201@trash.net> References: <417591A2.4090201@trash.net> Organization: USAGI Project X-URL: http://www.yoshifuji.org/%7Ehideaki/ X-Fingerprint: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA X-PGP-Key-URL: http://www.yoshifuji.org/%7Ehideaki/hideaki@yoshifuji.org.asc X-Face: "5$Al-.M>NJ%a'@hhZdQm:."qn~PA^gq4o*>iCFToq*bAi#4FRtx}enhuQKz7fNqQz\BYU] $~O_5m-9'}MIs`XGwIEscw;e5b>n"B_?j/AkL~i/MEaZBLP X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Wed_Oct_20_15:35:25_2004_849)--" Content-Transfer-Encoding: 7bit X-archive-position: 10503 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-To: netdev-bounce@oss.sgi.com X-original-sender: yoshfuji@linux-ipv6.org Precedence: bulk X-list: netdev ----Next_Part(Wed_Oct_20_15:35:25_2004_849)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit In article <417591A2.4090201@trash.net> (at Wed, 20 Oct 2004 00:13:54 +0200), Patrick McHardy says: > The recent changes to ip6_route_add added multiple leaks in > error paths. This patch should fix them. Agreed. David, please apply. Signed-off-by: Hideaki YOSHIFUJI --yoshfuji ----Next_Part(Wed_Oct_20_15:35:25_2004_849)-- Content-Type: Message/Rfc822 Content-Transfer-Encoding: 7bit Content-Disposition: inline Return-Path: Delivered-To: yoshfuji@yue.st-paulia.net Received: from sapphire.st-paulia.net (sapphire.linux-ipv6.org [203.178.140.14]) by yue.st-paulia.net (Postfix) with ESMTP id 64A1433CE5 for ; Wed, 20 Oct 2004 07:15:11 +0900 (JST) Received: by sapphire.st-paulia.net (Postfix) id 5B3A223CF9; Wed, 20 Oct 2004 07:34:58 +0900 (JST) Delivered-To: yoshfuji@sapphire.st-paulia.net Received: from nezu.linux-ipv6.org (linux6.nezu.wide.ad.jp [203.178.142.218]) by sapphire.st-paulia.net (Postfix) with ESMTP id 703B023CF8 for ; Wed, 20 Oct 2004 07:34:55 +0900 (JST) Received: from gw.localnet ([62.206.217.67]) by nezu.linux-ipv6.org (8.13.1/8.13.1/Debian-13) with ESMTP id i9JMEMii001727 for ; Wed, 20 Oct 2004 07:14:25 +0900 Received: from [172.16.1.123] (helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1CK2Ma-0002us-00; Wed, 20 Oct 2004 00:21:52 +0200 Message-ID: <417591A2.4090201@trash.net> Date: Wed, 20 Oct 2004 00:13:54 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" Cc: netdev@oss.sgi.com, YOSHIFUJI Hideaki Subject: [PATCH 2.6.9]: Fix netdevice/inet6_dev reference leaks in ip6_route_add error paths Content-Type: multipart/mixed; boundary="------------040705080908040609060609" This is a multi-part message in MIME format. --------------040705080908040609060609 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit The recent changes to ip6_route_add added multiple leaks in error paths. This patch should fix them. Regards Patrick --------------040705080908040609060609 Content-Type: text/plain; name="p2" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="p2" # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/19 23:46:56+02:00 kaber@coreworks.de # [IPV6]: Fix netdevice/inet6_dev reference leaks in ip6_route_add error paths # # Signed-off-by: Patrick McHardy # # net/ipv6/route.c # 2004/10/19 23:46:17+02:00 kaber@coreworks.de +8 -3 # [IPV6]: Fix netdevice/inet6_dev reference leaks in ip6_route_add error paths # # Signed-off-by: Patrick McHardy # diff -Nru a/net/ipv6/route.c b/net/ipv6/route.c --- a/net/ipv6/route.c 2004-10-19 23:52:23 +02:00 +++ b/net/ipv6/route.c 2004-10-19 23:52:23 +02:00 @@ -798,8 +798,10 @@ rt = ip6_dst_alloc(); - if (rt == NULL) - return -ENOMEM; + if (rt == NULL) { + err = -ENOMEM; + goto out; + } rt->u.dst.obsolete = -1; rt->rt6i_expires = clock_t_to_jiffies(rtmsg->rtmsg_info); @@ -962,7 +964,10 @@ out: if (dev) dev_put(dev); - dst_free((struct dst_entry *) rt); + if (idev) + in6_dev_put(idev); + if (rt) + dst_free((struct dst_entry *) rt); return err; } --------------040705080908040609060609-- ----Next_Part(Wed_Oct_20_15:35:25_2004_849)---- ----Next_Part(Wed_Oct_20_15:40:45_2004_629)---- From davem@redhat.com Tue Oct 19 23:41:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 19 Oct 2004 23:42:00 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K6fslm028544 for ; Tue, 19 Oct 2004 23:41:55 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i9K6fbTw017723; Wed, 20 Oct 2004 02:41:37 -0400 Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9K6fbr28140; Wed, 20 Oct 2004 02:41:37 -0400 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.11/8.12.10) with SMTP id i9K6fAtR000513; Wed, 20 Oct 2004 02:41:11 -0400 Date: Tue, 19 Oct 2004 23:36:18 -0700 From: "David S. Miller" To: Ben Greear Cc: vlan@candelatech.com, pavlic@de.ibm.com, netdev@oss.sgi.com Subject: Re: FWD: setting skb->dev to vlan device in vlan_hwaccel_rx is wrong ... Message-Id: <20041019233618.6fdcb01d.davem@redhat.com> In-Reply-To: <41705CF2.9050303@candelatech.com> References: <41705CF2.9050303@candelatech.com> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10507 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: 299 Lines: 9 On Fri, 15 Oct 2004 16:27:46 -0700 Ben Greear wrote: > Dave, since you did the hw-accel work, what do you think of this patch? I see no mention of what specific part of the "receive path" depends upon the skb->dev being set to the real_dev and not the true VLAN device. From laforge@gnumonks.org Wed Oct 20 00:00:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 00:00:45 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K70e94029394 for ; Wed, 20 Oct 2004 00:00:40 -0700 Received: from dsl-082-083-227-219.arcor-ip.net ([82.83.227.219] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1CKASO-0004GL-1Q; Wed, 20 Oct 2004 09:00:24 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1CKASH-0005Bv-Jk; Wed, 20 Oct 2004 09:00:17 +0200 Date: Wed, 20 Oct 2004 09:00:17 +0200 From: Harald Welte To: Jeff Chua Cc: Stephen Hemminger , Linux Kernel , netdev@oss.sgi.com, linux-net@vger.kernel.org, LARTC@mailman.ds9a.nl Subject: Re: [ANNOUNCE] iproute2 2.6.9-041019 Message-ID: <20041020070017.GA19899@sunbeam.de.gnumonks.org> References: <41758014.4080502@osdl.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+QahgC5+KEYLbs62" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10508 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@gnumonks.org Precedence: bulk X-list: netdev Content-Length: 1245 Lines: 43 --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 20, 2004 at 08:21:10AM +0800, Jeff Chua wrote: >=20 > On Tue, 19 Oct 2004, Stephen Hemminger wrote: >=20 > >Now that 2.6.9 is final. Here is an update of the iproute2 utilities that >=20 >=20 > can't compile Got the following error. Linux is 2.6.9. Gcc is 2.95.3. I'll take care of this. sorry fort he inconvenience. > Thanks, > Jeff. --=20 - Harald Welte http://www.gnumonks.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D Programming is like sex: One mistake and you have to support it your lifeti= me --+QahgC5+KEYLbs62 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBdg0BXaXGVTD0i/8RAglWAJ9cCOmYHE7pY2yG8wLtL+BH6Ps+vACaA9s3 nEBgFCfKmTLjtgm+Dk5/X0I= =Scj1 -----END PGP SIGNATURE----- --+QahgC5+KEYLbs62-- From PAVLIC@de.ibm.com Wed Oct 20 01:09:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 01:09:12 -0700 (PDT) Received: from mtagate4.de.ibm.com (mtagate4.de.ibm.com [195.212.29.153]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K896dw002161 for ; Wed, 20 Oct 2004 01:09:07 -0700 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate4.de.ibm.com (8.12.10/8.12.10) with ESMTP id i9K88ixX064620; Wed, 20 Oct 2004 08:08:44 GMT Received: from d12ml068.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i9K88ikJ172408; Wed, 20 Oct 2004 10:08:44 +0200 In-Reply-To: <20041019233618.6fdcb01d.davem@redhat.com> To: Ben Greear Cc: netdev@oss.sgi.com, vlan@candelatech.com MIME-Version: 1.0 Subject: Re: FWD: setting skb->dev to vlan device in vlan_hwaccel_rx is wrong ... X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 From: Frank Pavlic Message-ID: Date: Wed, 20 Oct 2004 10:08:42 +0200 X-MIMETrack: Serialize by Router on D12ML068/12/M/IBM(Release 6.0.2CF2HF259 | March 11, 2004) at 20/10/2004 10:08:44, Serialize complete at 20/10/2004 10:08:44 Content-Type: text/plain; charset="US-ASCII" X-archive-position: 10509 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: PAVLIC@de.ibm.com Precedence: bulk X-list: netdev Content-Length: 683 Lines: 35 oh , I'm sorry for confusing you guys , I finally get the point on how the hw_accel_rx stuff is working ... Frank "David S. Miller" 20.10.2004 08:36 To Ben Greear cc vlan@candelatech.com, Frank Pavlic/Germany/IBM@IBMDE, netdev@oss.sgi.com Subject Re: FWD: setting skb->dev to vlan device in vlan_hwaccel_rx is wrong ... On Fri, 15 Oct 2004 16:27:46 -0700 Ben Greear wrote: > Dave, since you did the hw-accel work, what do you think of this patch? I see no mention of what specific part of the "receive path" depends upon the skb->dev being set to the real_dev and not the true VLAN device. From herbert@gondor.apana.org.au Wed Oct 20 01:29:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 01:29:38 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K8TTKm002801 for ; Wed, 20 Oct 2004 01:29:30 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CKBq8-0007jp-00; Wed, 20 Oct 2004 18:29:00 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CKBq1-0005EG-00; Wed, 20 Oct 2004 18:28:53 +1000 From: Herbert Xu To: rusty@rustcorp.com.au (Rusty Russell) Subject: Re: [PATCH] Change masquerade code to use first IP address of interface. Cc: davem@davemloft.net, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Organization: Core In-Reply-To: <1098241135.10571.19.camel@localhost.localdomain> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) Message-Id: Date: Wed, 20 Oct 2004 18:28:53 +1000 X-archive-position: 10510 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 379 Lines: 9 Rusty Russell wrote: > As discussed previously, let's try this in 2.6.10, and see who screams. Rather than screaming, I'm going to thank you :) -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From herbert@gondor.apana.org.au Wed Oct 20 01:33:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 01:33:19 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K8XCX5003217 for ; Wed, 20 Oct 2004 01:33:13 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CKBtr-0007kr-00; Wed, 20 Oct 2004 18:32:51 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CKBtq-0005FC-00; Wed, 20 Oct 2004 18:32:50 +1000 From: Herbert Xu To: rusty@rustcorp.com.au (Rusty Russell) Subject: Re: [PATCH] Change masquerade code to use first IP address of interface. Cc: davem@davemloft.net, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Organization: Core In-Reply-To: <1098241135.10571.19.camel@localhost.localdomain> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) Message-Id: Date: Wed, 20 Oct 2004 18:32:50 +1000 X-archive-position: 10511 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 553 Lines: 16 Rusty Russell wrote: > > + newsrc = inet_select_addr(out, 0, RT_SCOPE_UNIVERSE); > + if (!newsrc) { > + printk("MASQUERADE: %s ate my IP address\n", out->name); > + return NF_DROP; Wouldn't it be better to select the address for the gateway that we're sending towards? Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From hno@marasystems.com Wed Oct 20 02:25:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 02:25:10 -0700 (PDT) Received: from filer.marasystems.com (marasystems.com [83.241.133.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K9P3XD004768 for ; Wed, 20 Oct 2004 02:25:04 -0700 Received: from localhost (henrik@localhost) by filer.marasystems.com (8.11.6/8.11.6) with ESMTP id i9K9OHi25639; Wed, 20 Oct 2004 11:24:17 +0200 Date: Wed, 20 Oct 2004 11:24:17 +0200 (CEST) From: Henrik Nordstrom To: Herbert Xu cc: Rusty Russell , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH] Change masquerade code to use first IP address of interface. In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-archive-position: 10512 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hno@marasystems.com Precedence: bulk X-list: netdev Content-Length: 501 Lines: 19 On Wed, 20 Oct 2004, Herbert Xu wrote: > Rusty Russell wrote: >> >> + newsrc = inet_select_addr(out, 0, RT_SCOPE_UNIVERSE); >> + if (!newsrc) { >> + printk("MASQUERADE: %s ate my IP address\n", out->name); >> + return NF_DROP; > > Wouldn't it be better to select the address for the gateway that we're > sending towards? What you mean? It would surely not be sane to masquerade as the gateway we are sending towards. Regards Henrik From laforge@gnumonks.org Wed Oct 20 02:41:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 02:41:48 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9K9ffCr007294 for ; Wed, 20 Oct 2004 02:41:42 -0700 Received: from dsl-082-083-227-219.arcor-ip.net ([82.83.227.219] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1CKCyD-0000Bo-Qg; Wed, 20 Oct 2004 11:41:26 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1CKCyB-0005QV-RZ; Wed, 20 Oct 2004 11:41:23 +0200 Date: Wed, 20 Oct 2004 11:41:23 +0200 From: Harald Welte To: Jeff Chua Cc: Stephen Hemminger , Linux Kernel , netdev@oss.sgi.com, linux-net@vger.kernel.org, LARTC@mailman.ds9a.nl Subject: iproute2 and 2.6.9 kernel headers (was Re: [ANNOUNCE] iproute2 2.6.9-041019) Message-ID: <20041020094123.GF19899@sunbeam.de.gnumonks.org> References: <41758014.4080502@osdl.org> <20041020070017.GA19899@sunbeam.de.gnumonks.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="dWYAkE0V1FpFQHQ3" Content-Disposition: inline In-Reply-To: <20041020070017.GA19899@sunbeam.de.gnumonks.org> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10513 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@gnumonks.org Precedence: bulk X-list: netdev Content-Length: 3325 Lines: 97 --dWYAkE0V1FpFQHQ3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 20, 2004 at 09:00:17AM +0200, Harald Welte wrote: > I'll take care of this. sorry fort he inconvenience. I should actually read mails befor replying ;) I thought the bug was in lnstat - but apparently it wasn't. The include bug seems non-trivial to fix. (how do I hate kernel include =66rom userspace issues): apparently __KERNEL_STRICT_NAMES is definde somewhere (glibc?) which prevents __le16, __le64 and others from being defined in linux/types.h. Just reietting it like this doesn't help much: diff -Nru iproute2-2.6.9-041019/ip/iptunnel.c iproute2-2.6.9-laf/ip/iptunne= l.c --- iproute2-2.6.9-041019/ip/iptunnel.c 2004-10-19 22:49:02.000000000 +0200 +++ iproute2-2.6.9-laf/ip/iptunnel.c 2004-10-20 11:26:24.489444052 +0200 @@ -26,6 +26,7 @@ #include #include #include +#undef __KERNEL_STRICT_NAMES #include #include #include Since now we have conflicting definitions gcc -D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g -I../include -DRESOLVE_H= OSTNAMES -c -o iptunnel.o iptunnel.c In file included from /usr/include/linux/byteorder/big_endian.h:11, from /usr/include/asm/byteorder.h:74, from iptunnel.c:30: /usr/include/linux/types.h:20: error: conflicting types for `fd_set' /usr/include/sys/select.h:78: error: previous declaration of `fd_set' /usr/include/linux/types.h:21: error: conflicting types for `dev_t' /usr/include/sys/types.h:62: error: previous declaration of `dev_t' /usr/include/linux/types.h:24: error: conflicting types for `nlink_t' /usr/include/sys/types.h:77: error: previous declaration of `nlink_t' I'm done with this, maybe somebody with more clue about kernel include magic will take on from this. Additional issue: the iproute2 makefile didn't stop the build process in the event of an error. Stephen, plase consider this patch to fix it: diff -Nru iproute2-2.6.9-041019/Makefile iproute2-2.6.9-laf/Makefile --- iproute2-2.6.9-041019/Makefile 2004-10-19 22:49:02.000000000 +0200 +++ iproute2-2.6.9-laf/Makefile 2004-10-20 11:33:33.223545024 +0200 @@ -29,10 +29,12 @@ =20 LIBNETLINK=3D../lib/libnetlink.a ../lib/libutil.a =20 -all: Config - @for i in $(SUBDIRS); \ - do $(MAKE) $(MFLAGS) -C $$i; done +all: Config $(SUBDIRS) =20 +.PHONY: $(SUBDIRS) +$(SUBDIRS): + $(MAKE) $(MFLAGS) -C $@; +=09 Config: ./configure $(KERNEL_INCLUDE) =20 --=20 - Harald Welte http://www.gnumonks.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D Programming is like sex: One mistake and you have to support it your lifeti= me --dWYAkE0V1FpFQHQ3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBdjLDXaXGVTD0i/8RAkXvAKCKOmfiHlj2IA9ibkC7yeBMxNkctwCgodsT Hb+mk8qh2WufqP4gX7oLKKY= =lLyY -----END PGP SIGNATURE----- --dWYAkE0V1FpFQHQ3-- From SRS0+61db73f8d912b0350b73+423+infradead.org+dwmw2@baythorne.srs.infradead.org Wed Oct 20 03:43:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 03:43:11 -0700 (PDT) Received: from baythorne.infradead.org (baythorne.infradead.org [81.187.226.107]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KAh5Os009080 for ; Wed, 20 Oct 2004 03:43:06 -0700 Received: from localhost ([127.0.0.1]) by baythorne.infradead.org with esmtpsa (Exim 4.42 #1 (Red Hat Linux)) id 1CKDuI-0006FV-6x; Wed, 20 Oct 2004 11:41:26 +0100 Subject: Re: iproute2 and 2.6.9 kernel headers (was Re: [ANNOUNCE] iproute2 2.6.9-041019) From: David Woodhouse To: Harald Welte Cc: Jeff Chua , Stephen Hemminger , Linux Kernel , netdev@oss.sgi.com, linux-net@vger.kernel.org, LARTC@mailman.ds9a.nl In-Reply-To: <20041020094123.GF19899@sunbeam.de.gnumonks.org> References: <41758014.4080502@osdl.org> <20041020070017.GA19899@sunbeam.de.gnumonks.org> <20041020094123.GF19899@sunbeam.de.gnumonks.org> Content-Type: text/plain Message-Id: <1098268885.3872.81.camel@baythorne.infradead.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2.dwmw2.1) Date: Wed, 20 Oct 2004 11:41:25 +0100 Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by baythorne.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 10514 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dwmw2@infradead.org Precedence: bulk X-list: netdev Content-Length: 1082 Lines: 29 On Wed, 2004-10-20 at 11:41 +0200, Harald Welte wrote: > On Wed, Oct 20, 2004 at 09:00:17AM +0200, Harald Welte wrote: > > I'll take care of this. sorry fort he inconvenience. > > I should actually read mails befor replying ;) I thought the bug was in > lnstat - but apparently it wasn't. > > The include bug seems non-trivial to fix. (how do I hate kernel include > from userspace issues): > > apparently __KERNEL_STRICT_NAMES is definde somewhere (glibc?) which > prevents __le16, __le64 and others from being defined in linux/types.h. > > Just reietting it like this doesn't help much: No, it wouldn't. The time has come to fix it properly instead. Anything which these tools actually need from the kernel headers should be moved into a separate header file (still in the kernel source) which is usable from _both_ kernel and userspace. It should use standard types (like uint16_t etc) instead of kernel-private types, and shouldn't have any #if{n,}def __KERNEL__ in it. Ideally, it would be in a different directory too -- but we can worry about that later. -- dwmw2 From herbert@gondor.apana.org.au Wed Oct 20 03:47:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 03:47:41 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KAlUNN009479 for ; Wed, 20 Oct 2004 03:47:32 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CKDzi-00008L-00; Wed, 20 Oct 2004 20:47:02 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CKDzX-0005R7-00; Wed, 20 Oct 2004 20:46:51 +1000 Date: Wed, 20 Oct 2004 20:46:50 +1000 To: Henrik Nordstrom Cc: Rusty Russell , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH] Change masquerade code to use first IP address of interface. Message-ID: <20041020104650.GA20868@gondor.apana.org.au> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10515 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 820 Lines: 26 On Wed, Oct 20, 2004 at 11:24:17AM +0200, Henrik Nordstrom wrote: > On Wed, 20 Oct 2004, Herbert Xu wrote: > > >Rusty Russell wrote: > >> > >>+ newsrc = inet_select_addr(out, 0, RT_SCOPE_UNIVERSE); > >>+ if (!newsrc) { > >>+ printk("MASQUERADE: %s ate my IP address\n", out->name); > >>+ return NF_DROP; > > > >Wouldn't it be better to select the address for the gateway that we're > >sending towards? > > What you mean? I mean rt = (struct rtable *)(*pskb)->dst; newsrc = inet_select_addr(out, rt->rt_gateway, RT_SCOPE_UNIVERSE); Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From hno@marasystems.com Wed Oct 20 04:05:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 04:05:29 -0700 (PDT) Received: from filer.marasystems.com (marasystems.com [83.241.133.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KB5L7k010487 for ; Wed, 20 Oct 2004 04:05:22 -0700 Received: from localhost (henrik@localhost) by filer.marasystems.com (8.11.6/8.11.6) with ESMTP id i9KB4pu29042; Wed, 20 Oct 2004 13:04:51 +0200 Date: Wed, 20 Oct 2004 13:04:51 +0200 (CEST) From: Henrik Nordstrom To: Herbert Xu cc: Rusty Russell , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH] Change masquerade code to use first IP address of interface. In-Reply-To: <20041020104650.GA20868@gondor.apana.org.au> Message-ID: References: <20041020104650.GA20868@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-archive-position: 10516 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hno@marasystems.com Precedence: bulk X-list: netdev Content-Length: 411 Lines: 14 On Wed, 20 Oct 2004, Herbert Xu wrote: > I mean > > rt = (struct rtable *)(*pskb)->dst; > newsrc = inet_select_addr(out, rt->rt_gateway, RT_SCOPE_UNIVERSE); IIRC we are not allowed to access this here, but I may be wrong.. If we are allowe to access the rtable like this then this is obviously better, and should also solve most policy routing setups (and allow the others to be solved). Regards Henrik From herbert@gondor.apana.org.au Wed Oct 20 04:13:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 04:13:34 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KBDCv2011126 for ; Wed, 20 Oct 2004 04:13:13 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CKEOf-0000TB-00; Wed, 20 Oct 2004 21:12:49 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CKEOb-0005ux-00; Wed, 20 Oct 2004 21:12:45 +1000 Date: Wed, 20 Oct 2004 21:12:45 +1000 To: Henrik Nordstrom Cc: Rusty Russell , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH] Change masquerade code to use first IP address of interface. Message-ID: <20041020111245.GA22703@gondor.apana.org.au> References: <20041020104650.GA20868@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10517 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 968 Lines: 27 On Wed, Oct 20, 2004 at 01:04:51PM +0200, Henrik Nordstrom wrote: > On Wed, 20 Oct 2004, Herbert Xu wrote: > > >I mean > > > > rt = (struct rtable *)(*pskb)->dst; > > newsrc = inet_select_addr(out, rt->rt_gateway, RT_SCOPE_UNIVERSE); > > IIRC we are not allowed to access this here, but I may be wrong.. If we Why? POST_ROUTING is called in three places in ip_output.c and they all give a valid dst. In fact ip_refrag in ip_conntrack_standalone.c is also accessing skb->dst. > are allowe to access the rtable like this then this is obviously better, > and should also solve most policy routing setups (and allow the others to > be solved). Well it isn't really equivalent to full policy routing since we've lost the preferred source field. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From dvrabel@arcom.com Wed Oct 20 04:54:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 04:54:25 -0700 (PDT) Received: from webapps.arcom.com (webapps.arcom.com [194.200.159.168]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KBsITD015247 for ; Wed, 20 Oct 2004 04:54:19 -0700 Received: from [10.2.2.14] ([10.2.2.14]) by webapps.arcom.com with Microsoft SMTPSVC(6.0.3790.0); Wed, 20 Oct 2004 12:52:41 +0100 Message-ID: <4176517C.4090504@arcom.com> Date: Wed, 20 Oct 2004 12:52:28 +0100 From: David Vrabel User-Agent: Mozilla Thunderbird 0.8 (X11/20040926) X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Woodhouse CC: Harald Welte , Jeff Chua , Stephen Hemminger , Linux Kernel , netdev@oss.sgi.com, linux-net@vger.kernel.org, LARTC@mailman.ds9a.nl Subject: Re: iproute2 and 2.6.9 kernel headers (was Re: [ANNOUNCE] iproute2 2.6.9-041019) References: <41758014.4080502@osdl.org> <20041020070017.GA19899@sunbeam.de.gnumonks.org> <20041020094123.GF19899@sunbeam.de.gnumonks.org> <1098268885.3872.81.camel@baythorne.infradead.org> In-Reply-To: <1098268885.3872.81.camel@baythorne.infradead.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 20 Oct 2004 11:52:41.0234 (UTC) FILETIME=[4DA93F20:01C4B69B] X-archive-position: 10518 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dvrabel@arcom.com Precedence: bulk X-list: netdev Content-Length: 588 Lines: 19 David Woodhouse wrote: > > The time has come to fix it properly instead. Anything which these tools > actually need from the kernel headers should be moved into a separate > header file (still in the kernel source) which is usable from _both_ > kernel and userspace. Isn't this what linux-libc-headers is for? > It should use standard types (like uint16_t etc) Why doesn't the kernel use these standard types also? David Vrabel -- David Vrabel, Design Engineer Arcom, Clifton Road Tel: +44 (0)1223 411200 ext. 3233 Cambridge CB1 7EA, UK Web: http://www.arcom.com/ From SRS0+61db73f8d912b0350b73+423+infradead.org+dwmw2@baythorne.srs.infradead.org Wed Oct 20 05:21:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 05:21:32 -0700 (PDT) Received: from baythorne.infradead.org (baythorne.infradead.org [81.187.226.107]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KCLQMc016280 for ; Wed, 20 Oct 2004 05:21:27 -0700 Received: from localhost ([127.0.0.1]) by baythorne.infradead.org with esmtpsa (Exim 4.42 #1 (Red Hat Linux)) id 1CKFRU-0006S3-NC; Wed, 20 Oct 2004 13:19:48 +0100 Subject: Re: iproute2 and 2.6.9 kernel headers (was Re: [ANNOUNCE] iproute2 2.6.9-041019) From: David Woodhouse To: David Vrabel Cc: Harald Welte , Jeff Chua , Stephen Hemminger , Linux Kernel , netdev@oss.sgi.com, linux-net@vger.kernel.org, LARTC@mailman.ds9a.nl In-Reply-To: <4176517C.4090504@arcom.com> References: <41758014.4080502@osdl.org> <20041020070017.GA19899@sunbeam.de.gnumonks.org> <20041020094123.GF19899@sunbeam.de.gnumonks.org> <1098268885.3872.81.camel@baythorne.infradead.org> <4176517C.4090504@arcom.com> Content-Type: text/plain Message-Id: <1098274788.3872.90.camel@baythorne.infradead.org> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2.dwmw2.1) Date: Wed, 20 Oct 2004 13:19:48 +0100 Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by baythorne.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 10519 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dwmw2@infradead.org Precedence: bulk X-list: netdev Content-Length: 753 Lines: 24 On Wed, 2004-10-20 at 12:52 +0100, David Vrabel wrote: > David Woodhouse wrote: > > > > The time has come to fix it properly instead. Anything which these tools > > actually need from the kernel headers should be moved into a separate > > header file (still in the kernel source) which is usable from _both_ > > kernel and userspace. > > Isn't this what linux-libc-headers is for? The separate linux-libc-headers is a hack, which will be able to die once we properly clean up the kernel headers into those which are 'exported' and those which are private. > > It should use standard types (like uint16_t etc) > > Why doesn't the kernel use these standard types also? Archaic personal preference. Inside the kernel that's fair enough. -- dwmw2 From buytenh@wantstofly.org Wed Oct 20 06:01:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 06:01:55 -0700 (PDT) Received: from xi.wantstofly.org (alephnull.demon.nl [212.238.201.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KD1nxD017943 for ; Wed, 20 Oct 2004 06:01:50 -0700 Received: by xi.wantstofly.org (Postfix, from userid 500) id 606DE2B0ED; Wed, 20 Oct 2004 15:01:34 +0200 (MEST) Date: Wed, 20 Oct 2004 15:01:34 +0200 From: Lennert Buytenhek To: netdev@oss.sgi.com Subject: way of figuring out total number of retransmitted packets on a TCP socket? Message-ID: <20041020130134.GC24757@xi.wantstofly.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-archive-position: 10520 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: buytenh@wantstofly.org Precedence: bulk X-list: netdev Content-Length: 284 Lines: 11 Hi, I'm looking for a way of counting the total number of retransmitted packets sent on a TCP connection. I tried querying TCP_INFO:tcpi_retransmits, but that seems to be not the metric I'm looking for. Anyone got any ideas? (Apart from using tcpdump+tcptrace.) cheers, Lennert From baruch@ev-en.org Wed Oct 20 06:25:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 06:25:31 -0700 (PDT) Received: from galon.ev-en.org (rrcs-24-123-59-149.central.biz.rr.com [24.123.59.149]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KDPOuR019792 for ; Wed, 20 Oct 2004 06:25:24 -0700 Received: from baruch.hamilton.local (hamilton.may.ie [149.157.192.252]) (using SSLv3 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by galon.ev-en.org (Postfix) with ESMTP id 9FAAE11A6E9; Wed, 20 Oct 2004 15:22:55 +0200 (IST) Subject: Re: way of figuring out total number of retransmitted packets on a TCP socket? From: Baruch Even To: Lennert Buytenhek Cc: netdev@oss.sgi.com In-Reply-To: <20041020130134.GC24757@xi.wantstofly.org> References: <20041020130134.GC24757@xi.wantstofly.org> Content-Type: text/plain Message-Id: <1098278702.16002.7.camel@baruch.hamilton.local> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 20 Oct 2004 14:25:02 +0100 Content-Transfer-Encoding: 7bit X-archive-position: 10521 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: baruch@ev-en.org Precedence: bulk X-list: netdev Content-Length: 512 Lines: 15 On Wed, 2004-10-20 at 14:01, Lennert Buytenhek wrote: > Hi, > > I'm looking for a way of counting the total number of retransmitted packets > sent on a TCP connection. I tried querying TCP_INFO:tcpi_retransmits, but > that seems to be not the metric I'm looking for. > > Anyone got any ideas? (Apart from using tcpdump+tcptrace.) The web100 patch gives you that, but it's not part of the basic kernel. You can find it in web100.org and you also need the user mode utilities to get the information. Baruch From vda@port.imtp.ilyichevsk.odessa.ua Wed Oct 20 08:12:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 08:12:15 -0700 (PDT) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9KFC59K004355 for ; Wed, 20 Oct 2004 08:12:07 -0700 Received: (qmail 17929 invoked by alias); 20 Oct 2004 15:11:48 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 20 Oct 2004 15:11:48 -0000 From: Denis Vlasenko To: Lee Revell , Herbert Xu Subject: Re: [PATCH] Make netif_rx_ni preempt-safe Date: Wed, 20 Oct 2004 18:11:44 +0300 User-Agent: KMail/1.5.4 Cc: Andrew Morton , linux-kernel , "David S. Miller" , linux-kernel@gondor.apana.org.au, maxk@qualcomm.com, irda-users@lists.sourceforge.net, Linux Network Development , Alain Schroeder References: <1098230132.23628.28.camel@krustophenia.net> <20041020000009.GA17246@gondor.apana.org.au> <1098231737.23628.42.camel@krustophenia.net> In-Reply-To: <1098231737.23628.42.camel@krustophenia.net> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410201811.44419.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 10522 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: vda@port.imtp.ilyichevsk.odessa.ua Precedence: bulk X-list: netdev Content-Length: 2589 Lines: 73 > How about this: > > Signed-Off-By: Lee Revell > > --- include/linux/netdevice.h~ 2004-10-19 20:16:48.000000000 -0400 > +++ include/linux/netdevice.h 2004-10-19 20:21:01.000000000 -0400 > @@ -696,9 +696,12 @@ > */ > static inline int netif_rx_ni(struct sk_buff *skb) > { > - int err = netif_rx(skb); > + int err; > + preempt_disable(); > + err = netif_rx(skb); > if (softirq_pending(smp_processor_id())) > do_softirq(); > + preempt_enable(); > return err; > } #include int netif_rx_ni_(struct sk_buff *skb) { int err; preempt_disable(); err = netif_rx(skb); if (softirq_pending(smp_processor_id())) do_softirq(); preempt_enable(); return err; } objdump -d: 00000000 : 0: 55 push %ebp 1: 89 e5 mov %esp,%ebp 3: 56 push %esi 4: 53 push %ebx 5: bb 00 f0 ff ff mov $0xfffff000,%ebx a: 21 e3 and %esp,%ebx c: ff 43 14 incl 0x14(%ebx) f: 8b 4d 08 mov 0x8(%ebp),%ecx 12: 51 push %ecx 13: e8 fc ff ff ff call 14 18: 89 c6 mov %eax,%esi 1a: 8b 43 10 mov 0x10(%ebx),%eax 1d: c1 e0 07 shl $0x7,%eax 20: 8b 80 00 00 00 00 mov 0x0(%eax),%eax 26: 85 c0 test %eax,%eax 28: 5a pop %edx 29: 75 25 jne 50 2b: 8b 43 08 mov 0x8(%ebx),%eax 2e: ff 4b 14 decl 0x14(%ebx) 31: a8 08 test $0x8,%al 33: 75 09 jne 3e 35: 8d 65 f8 lea 0xfffffff8(%ebp),%esp 38: 5b pop %ebx 39: 89 f0 mov %esi,%eax 3b: 5e pop %esi 3c: 5d pop %ebp 3d: c3 ret 3e: e8 fc ff ff ff call 3f 43: eb f0 jmp 35 45: 8d 74 26 00 lea 0x0(%esi,1),%esi 49: 8d bc 27 00 00 00 00 lea 0x0(%edi,1),%edi 50: e8 fc ff ff ff call 51 55: eb d4 jmp 2b 0x57 == 87 bytes is too big for inline. -- vda From bobwirka@rtcworks.com Wed Oct 20 08:47:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 08:47:59 -0700 (PDT) Received: from smtp816.mail.sc5.yahoo.com (smtp816.mail.sc5.yahoo.com [66.163.170.2]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9KFlrDR009300 for ; Wed, 20 Oct 2004 08:47:54 -0700 Received: from unknown (HELO ?192.168.1.97?) (bobwirka@ameritech.net@68.73.107.68 with plain) by smtp816.mail.sc5.yahoo.com with SMTP; 20 Oct 2004 15:47:10 -0000 Message-ID: <4176887F.3030406@rtcworks.com> Date: Wed, 20 Oct 2004 10:47:11 -0500 From: Bob Wirka User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michael Richardson CC: netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Re: NFS and Network Driver Question References: <41704198.8000206@rtcworks.com> <4175AEFE.7090002@rtcworks.com> <7126.1098233641@marajade.sandelman.ottawa.on.ca> In-Reply-To: <7126.1098233641@marajade.sandelman.ottawa.on.ca> Content-Type: multipart/alternative; boundary="------------060600040306010000040906" X-archive-position: 10523 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bobwirka@rtcworks.com Precedence: bulk X-list: netdev Content-Length: 5663 Lines: 159 This is a multi-part message in MIME format. --------------060600040306010000040906 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Yes, you are correct; thank you. So now I've got an embedded x86 system that boots from a (detachable) floppy drive to the root file system on my laptop host. Syslinux works very well for the boot disk function. This system is very cool; it will be used to initialize new units in production, and for providing a platform for easy debugging of applications. The lessons learned here will also be used on the embedded ARM projects. Thanks again to all who have helped. Best regards, Bob Wirka Realtime Control Works Michael Richardson wrote: >-----BEGIN PGP SIGNED MESSAGE----- > > > > >>>>>>"Bob" == Bob Wirka writes: >>>>>> >>>>>> > Bob> Ok, now I feel like I'm taking crazy pills... > > Bob> The embedded system boots up and mounts the root file system on > Bob> my host laptop. The 'rc.sysinit' startup script executes the > Bob> command 'mount -a' which should mount /proc, /dev/pts, and > Bob> /dev/shm, as listed in /etc/fstab. When executed, that command > Bob> returns "mount: only root can do that". > > Bob> When I get to the bash prompt, 'whoami' reports that I am, > Bob> indeed, root. A 'mount -a' from the command prompt gives the > Bob> same result; it doesn't think I'm root for the mount command. > > The mount command is perhaps setuid root, but you aren't mounting the >root file system in a way that permits it to be identified as such. > Or, the file is in fact not owned by root, and is in fact setuid not-root. > >- -- >] "Elmo went to the wrong fundraiser" - The Simpson | firewalls [ >] Michael Richardson, Xelerance Corporation, Ottawa, ON |net architect[ >] mcr@xelerance.com http://www.sandelman.ottawa.on.ca/mcr/ |device driver[ >] panic("Just another Debian GNU/Linux using, kernel hacking, security guy"); [ >-----BEGIN PGP SIGNATURE----- >Version: GnuPG v1.2.2 (GNU/Linux) >Comment: Finger me for keys > >iQCVAwUBQXW3KIqHRg3pndX9AQFERwQAhUpzaFDzVch+W2TEU2SFDtSJZObQ5yZ3 >7hhVtiDI5igzO/MHkipXm89LrNnfwSg+6jfMIo8MlWU+nuqHFWiHkrPeWj8jaFmd >QQ+aHhryTn06fyU4UQg1OjEpcHHvo4pLr8lqPwebMjL2JKgk8CM/X2d1N6m9xT+2 >Nx8H0Rq84sM= >=Dso2 >-----END PGP SIGNATURE----- > > > > --------------060600040306010000040906 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Yes, you are correct; thank you.

So now I've got an embedded x86 system that boots from a (detachable) floppy drive to the root file system on my laptop host. Syslinux works very well for the boot disk function.

This system is very cool; it will be used to initialize new units in production, and for providing a platform for easy debugging of applications.

The lessons learned here will also be used on the embedded ARM projects.

Thanks again to all who have helped.

Best regards,

Bob Wirka
Realtime Control Works

Michael Richardson wrote:
-----BEGIN PGP SIGNED MESSAGE-----


  
"Bob" == Bob Wirka <bobwirka@rtcworks.com> writes:
            
    Bob> Ok, now I feel like I'm taking crazy pills...

    Bob> The embedded system boots up and mounts the root file system on
    Bob> my host laptop. The 'rc.sysinit' startup script executes the
    Bob> command 'mount -a' which should mount /proc, /dev/pts, and
    Bob> /dev/shm, as listed in /etc/fstab. When executed, that command
    Bob> returns "mount: only root can do that".

    Bob> When I get to the bash prompt, 'whoami' reports that I am,
    Bob> indeed, root. A 'mount -a' from the command prompt gives the
    Bob> same result; it doesn't think I'm root for the mount command.

  The mount command is perhaps setuid root, but you aren't mounting the
root file system in a way that permits it to be identified as such.
  Or, the file is in fact not owned by root, and is in fact setuid not-root.

- --
]     "Elmo went to the wrong fundraiser" - The Simpson         |  firewalls  [
]   Michael Richardson,    Xelerance Corporation, Ottawa, ON    |net architect[
] mcr@xelerance.com      http://www.sandelman.ottawa.on.ca/mcr/ |device driver[
] panic("Just another Debian GNU/Linux using, kernel hacking, security guy"); [
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Finger me for keys

iQCVAwUBQXW3KIqHRg3pndX9AQFERwQAhUpzaFDzVch+W2TEU2SFDtSJZObQ5yZ3
7hhVtiDI5igzO/MHkipXm89LrNnfwSg+6jfMIo8MlWU+nuqHFWiHkrPeWj8jaFmd
QQ+aHhryTn06fyU4UQg1OjEpcHHvo4pLr8lqPwebMjL2JKgk8CM/X2d1N6m9xT+2
Nx8H0Rq84sM=
=Dso2
-----END PGP SIGNATURE-----


  

--------------060600040306010000040906-- From shemminger@osdl.org Wed Oct 20 08:58:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 08:58:18 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KFwEv5010083 for ; Wed, 20 Oct 2004 08:58:14 -0700 Received: from [172.20.1.60] (dell_ss3.pdx.osdl.net [172.20.1.60]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9KFvr930497; Wed, 20 Oct 2004 08:57:53 -0700 Message-ID: <41768B15.1090402@osdl.org> Date: Wed, 20 Oct 2004 08:58:13 -0700 From: Stephen Hemminger User-Agent: Mozilla Thunderbird 0.8 (X11/20040923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bob Wirka CC: no To-header on input , netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Re: NFS and Network Driver Question References: <41704198.8000206@rtcworks.com> <4175AEFE.7090002@rtcworks.com> In-Reply-To: <4175AEFE.7090002@rtcworks.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10524 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 Content-Length: 853 Lines: 21 Bob Wirka wrote: > Ok, now I feel like I'm taking crazy pills... > > The embedded system boots up and mounts the root file system on my > host laptop. The 'rc.sysinit' startup script executes the command > 'mount -a' which should mount /proc, /dev/pts, and /dev/shm, as listed > in /etc/fstab. When executed, that command returns "mount: only root > can do that". > > When I get to the bash prompt, 'whoami' reports that I am, indeed, > root. A 'mount -a' from the command prompt gives the same result; it > doesn't think I'm root for the mount command. > > I can chown a file owned by root to some other user, and I can create > a file or directory in a directory owned by root; so it doesn't always > think I'm not root. > Are you getting bit by the nfs uid mapping on the server. Is it mapping your local "root" to "nobody" on the server? From bobwirka@rtcworks.com Wed Oct 20 09:04:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 09:04:36 -0700 (PDT) Received: from smtp818.mail.sc5.yahoo.com (smtp818.mail.sc5.yahoo.com [66.163.170.4]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9KG4W1G010834 for ; Wed, 20 Oct 2004 09:04:32 -0700 Received: from unknown (HELO ?192.168.1.97?) (bobwirka@ameritech.net@68.73.107.68 with plain) by smtp818.mail.sc5.yahoo.com with SMTP; 20 Oct 2004 16:03:55 -0000 Message-ID: <41768C6C.6040102@rtcworks.com> Date: Wed, 20 Oct 2004 11:03:56 -0500 From: Bob Wirka User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephen Hemminger CC: netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Re: NFS and Network Driver Question References: <41704198.8000206@rtcworks.com> <4175AEFE.7090002@rtcworks.com> <41768B15.1090402@osdl.org> In-Reply-To: <41768B15.1090402@osdl.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10525 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bobwirka@rtcworks.com Precedence: bulk X-list: netdev Content-Length: 1255 Lines: 37 No, I was actually taking stupid pills. I had the setuid bit set on 'mount', and it was owned by 'admin'. I had a number of files and directories owned by 'admin' so that I could ftp files in and out of the original target system (as admin). It bit me. Everything seems to be working well now. Best regards, Bob Wirka Realtime Control Works Stephen Hemminger wrote: > Bob Wirka wrote: > >> Ok, now I feel like I'm taking crazy pills... >> >> The embedded system boots up and mounts the root file system on my >> host laptop. The 'rc.sysinit' startup script executes the command >> 'mount -a' which should mount /proc, /dev/pts, and /dev/shm, as >> listed in /etc/fstab. When executed, that command returns "mount: >> only root can do that". >> >> When I get to the bash prompt, 'whoami' reports that I am, indeed, >> root. A 'mount -a' from the command prompt gives the same result; it >> doesn't think I'm root for the mount command. >> >> I can chown a file owned by root to some other user, and I can create >> a file or directory in a directory owned by root; so it doesn't >> always think I'm not root. >> > Are you getting bit by the nfs uid mapping on the server. Is it > mapping your local "root" to "nobody" > on the server? > From shemminger@osdl.org Wed Oct 20 09:15:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 09:15:19 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KGFEwB011688 for ; Wed, 20 Oct 2004 09:15:15 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9KGEoWL002039 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 20 Oct 2004 09:14:50 -0700 Date: Wed, 20 Oct 2004 09:15:54 -0700 From: Stephen Hemminger To: Jeff Chua Cc: Linux Kernel , netdev@oss.sgi.com, linux-net@vger.kernel.org, LARTC@mailman.ds9a.nl Subject: Re: [ANNOUNCE] iproute2 2.6.9-041019 Message-Id: <20041020091554.57e60936@zqx3.pdx.osdl.net> In-Reply-To: References: <41758014.4080502@osdl.org> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10526 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 Content-Length: 336 Lines: 13 Try this, ss was dragging in byteorder.h and it didn't need to. diff -Nru a/misc/ss.c b/misc/ss.c --- a/misc/ss.c 2004-10-20 09:13:56 -07:00 +++ b/misc/ss.c 2004-10-20 09:13:56 -07:00 @@ -33,7 +33,6 @@ #include "libnetlink.h" #include "SNAPSHOT.h" -#include #include #include From shemminger@osdl.org Wed Oct 20 09:18:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 09:18:07 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KGI3T2012116 for ; Wed, 20 Oct 2004 09:18:03 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9KGHfWL002386 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 20 Oct 2004 09:17:42 -0700 Date: Wed, 20 Oct 2004 09:18:46 -0700 From: Stephen Hemminger To: Jeff Chua Cc: Linux Kernel , netdev@oss.sgi.com, linux-net@vger.kernel.org, LARTC@mailman.ds9a.nl Subject: Re: [ANNOUNCE] iproute2 2.6.9-041019 Message-Id: <20041020091846.5151604e@zqx3.pdx.osdl.net> In-Reply-To: References: <41758014.4080502@osdl.org> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10527 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 Content-Length: 437 Lines: 14 Similar problem to ss in iptunnel. It was including asm/byteorder.h a kernel header that it didn't need to. diff -Nru a/ip/iptunnel.c b/ip/iptunnel.c --- a/ip/iptunnel.c 2004-10-20 09:18:36 -07:00 +++ b/ip/iptunnel.c 2004-10-20 09:18:36 -07:00 @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include From rlrevell@joe-job.com Wed Oct 20 09:49:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 09:49:33 -0700 (PDT) Received: from viper.oldcity.dca.net (viper.oldcity.dca.net [216.158.38.4]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9KGnS3c014053 for ; Wed, 20 Oct 2004 09:49:28 -0700 Received: (qmail 1831 invoked from network); 20 Oct 2004 16:47:39 -0000 Received: from unknown (HELO ?192.168.2.100?) (207.245.115.154) by viper with SMTP; 20 Oct 2004 16:47:39 -0000 Subject: Re: [PATCH] Make netif_rx_ni preempt-safe From: Lee Revell To: Denis Vlasenko Cc: Herbert Xu , Andrew Morton , linux-kernel , "David S. Miller" , linux-kernel@gondor.apana.org.au, maxk@qualcomm.com, irda-users@lists.sourceforge.net, Linux Network Development , Alain Schroeder In-Reply-To: <200410201811.44419.vda@port.imtp.ilyichevsk.odessa.ua> References: <1098230132.23628.28.camel@krustophenia.net> <20041020000009.GA17246@gondor.apana.org.au> <1098231737.23628.42.camel@krustophenia.net> <200410201811.44419.vda@port.imtp.ilyichevsk.odessa.ua> Content-Type: text/plain Message-Id: <1098290858.1429.70.camel@krustophenia.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 20 Oct 2004 12:47:39 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 10528 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rlrevell@joe-job.com Precedence: bulk X-list: netdev Content-Length: 143 Lines: 7 On Wed, 2004-10-20 at 11:11, Denis Vlasenko wrote: > 0x57 == 87 bytes is too big for inline. Ugh. So the only fix is not to inline it? Lee From kaber@trash.net Wed Oct 20 10:43:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 10:44:04 -0700 (PDT) Received: from gw.localnet ([62.206.217.67]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KHhtmP015428 for ; Wed, 20 Oct 2004 10:43:56 -0700 Received: from [172.16.1.123] (helo=trash.net ident=kaber) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1CKKbJ-0005Rl-00; Wed, 20 Oct 2004 19:50:17 +0200 Message-ID: <4176A377.8@trash.net> Date: Wed, 20 Oct 2004 19:42:15 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5 X-Accept-Language: en MIME-Version: 1.0 To: Herbert Xu CC: Rusty Russell , netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH] Change masquerade code to use first IP address of interface. References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10529 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kaber@trash.net Precedence: bulk X-list: netdev Content-Length: 508 Lines: 23 Herbert Xu wrote: >Rusty Russell wrote: > > >>+ newsrc = inet_select_addr(out, 0, RT_SCOPE_UNIVERSE); >>+ if (!newsrc) { >>+ printk("MASQUERADE: %s ate my IP address\n", out->name); >>+ return NF_DROP; >> >> > >Wouldn't it be better to select the address for the gateway that we're >sending towards? > > I agree. Rusty, I already have your patch queued in a post-2.6.9 tree, I'm going to add Herbert's patch on top. Regards Patrick From hch@lst.de Wed Oct 20 10:49:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 10:49:43 -0700 (PDT) Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KHnbl8015899 for ; Wed, 20 Oct 2004 10:49:38 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-6.6) with ESMTP id i9KHn5la012761 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 20 Oct 2004 19:49:05 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id i9KHn5LL012759; Wed, 20 Oct 2004 19:49:05 +0200 Date: Wed, 20 Oct 2004 19:49:05 +0200 From: Christoph Hellwig To: Tom Rini Cc: linux-mips@linux-mips.org, netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9] Export phys_cpu_present_map Message-ID: <20041020174905.GA12697@lst.de> References: <20041020171626.GG12544@smtp.west.cox.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041020171626.GG12544@smtp.west.cox.net> User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 10530 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 Content-Length: 422 Lines: 9 On Wed, Oct 20, 2004 at 10:16:26AM -0700, Tom Rini wrote: > In net/ipv6/icmp.c::icmpv6_init() there is a call to cpu_possible() > which preprocesses down to "test_bit(((i)), (phys_cpu_present_map).bits)" > If ipv6 is a module, phys_cpu_present_map (or cpu_possible_map which is > defined t phys_cpu_present_map) needs to be exported. The loop in there should be rewritten as for_each_cpu which doesn't need this export. From olh@suse.de Wed Oct 20 10:50:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 10:50:43 -0700 (PDT) Received: from Cantor.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KHoZJu016095 for ; Wed, 20 Oct 2004 10:50:36 -0700 Received: from hermes.suse.de (hermes-ext.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 2EBC6DEEDBE; Wed, 20 Oct 2004 19:48:56 +0200 (CEST) Date: Wed, 20 Oct 2004 19:48:53 +0200 From: Olaf Hering To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: Re: netdev-2.6 queue updated Message-ID: <20041020174853.GA11659@suse.de> References: <20041016010036.GA32213@havoc.gtf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20041016010036.GA32213@havoc.gtf.org> X-DOS: I got your 640K Real Mode Right Here Buddy! X-Homeland-Security: You are not supposed to read this line! You are a terrorist! User-Agent: Mutt und vi sind doch schneller als Notes (und GroupWise) X-archive-position: 10531 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: olh@suse.de Precedence: bulk X-list: netdev Content-Length: 1143 Lines: 31 On Fri, Oct 15, Jeff Garzik wrote: > drivers/net/typhoon.c | 232 +++---- > Jeff Garzik: > o Hand-merge typhoon conflicts > o [netdrvr eepro100] fix pci_iomap() args and info msg that follows > o [netdrvr b44] update MODULE_AUTHORS > o [netdrvr 8139cp] TSO support > o [netdev] Remove no-op in-driver implementations of ->set_config() Current Linus tree does not compile. diff -purN linux-2.6.9-bk4.orig/drivers/net/typhoon.c linux-2.6.9-bk4/drivers/net/typhoon.c --- linux-2.6.9-bk4.orig/drivers/net/typhoon.c 2004-10-20 13:57:29.000000000 +0200 +++ linux-2.6.9-bk4/drivers/net/typhoon.c 2004-10-20 14:32:17.000000000 +0200 @@ -2476,7 +2476,7 @@ typhoon_init_one(struct pci_dev *pdev, c dev->set_mac_address = typhoon_set_mac_address; dev->vlan_rx_register = typhoon_vlan_rx_register; dev->vlan_rx_kill_vid = typhoon_vlan_rx_kill_vid; - SET_ETHTOOL_OPS(dev, &ops); + SET_ETHTOOL_OPS(dev, &typhoon_ethtool_ops); /* We can handle scatter gather, up to 16 entries, and * we can do IP checksumming (only version 4, doh...) -- USB is for mice, FireWire is for men! sUse lINUX ag, nÜRNBERG From trini@kernel.crashing.org Wed Oct 20 11:16:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 11:16:52 -0700 (PDT) Received: from fed1rmmtao11.cox.net (fed1rmmtao11.cox.net [68.230.241.28]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KIGksZ017233 for ; Wed, 20 Oct 2004 11:16:46 -0700 Received: from opus ([68.107.143.141]) by fed1rmmtao11.cox.net (InterMail vM.6.01.03.04 201-2131-111-106-20040729) with ESMTP id <20041020181626.ZZKF17415.fed1rmmtao11.cox.net@opus>; Wed, 20 Oct 2004 14:16:26 -0400 Date: Wed, 20 Oct 2004 11:16:26 -0700 From: Tom Rini To: Christoph Hellwig Cc: linux-mips@linux-mips.org, netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9] Export phys_cpu_present_map Message-ID: <20041020181626.GH12544@smtp.west.cox.net> References: <20041020171626.GG12544@smtp.west.cox.net> <20041020174905.GA12697@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041020174905.GA12697@lst.de> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10532 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: trini@kernel.crashing.org Precedence: bulk X-list: netdev Content-Length: 1016 Lines: 30 [ Note that XFS has a similar problem, with cpu_possible() calls ] On Wed, Oct 20, 2004 at 07:49:05PM +0200, Christoph Hellwig wrote: > On Wed, Oct 20, 2004 at 10:16:26AM -0700, Tom Rini wrote: > > In net/ipv6/icmp.c::icmpv6_init() there is a call to cpu_possible() > > which preprocesses down to "test_bit(((i)), (phys_cpu_present_map).bits)" > > If ipv6 is a module, phys_cpu_present_map (or cpu_possible_map which is > > defined t phys_cpu_present_map) needs to be exported. > > The loop in there should be rewritten as for_each_cpu which doesn't need > this export. Here's what I did: --- linux-2.6.9.orig/net/ipv6/icmp.c +++ linux-2.6.9/net/ipv6/icmp.c @@ -691,10 +691,7 @@ int __init icmpv6_init(struct net_proto_ struct sock *sk; int err, i, j; - for (i = 0; i < NR_CPUS; i++) { - if (!cpu_possible(i)) - continue; - + for_each_cpu(i) { But I still get the problem. Further, on i386 cpu_possible() becomes cpu_callout_map which is exported as well. -- Tom Rini http://gate.crashing.org/~trini/ From vda@port.imtp.ilyichevsk.odessa.ua Wed Oct 20 12:15:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 12:15:10 -0700 (PDT) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9KJEw72019001 for ; Wed, 20 Oct 2004 12:15:04 -0700 Received: (qmail 26169 invoked by alias); 20 Oct 2004 19:14:36 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 20 Oct 2004 19:14:36 -0000 From: Denis Vlasenko To: Lee Revell Subject: Re: [PATCH] Make netif_rx_ni preempt-safe Date: Wed, 20 Oct 2004 22:14:31 +0300 User-Agent: KMail/1.5.4 Cc: Herbert Xu , Andrew Morton , linux-kernel , "David S. Miller" , linux-kernel@gondor.apana.org.au, maxk@qualcomm.com, irda-users@lists.sourceforge.net, Linux Network Development , Alain Schroeder References: <1098230132.23628.28.camel@krustophenia.net> <200410201811.44419.vda@port.imtp.ilyichevsk.odessa.ua> <1098290858.1429.70.camel@krustophenia.net> In-Reply-To: <1098290858.1429.70.camel@krustophenia.net> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410202214.31791.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 10533 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: vda@port.imtp.ilyichevsk.odessa.ua Precedence: bulk X-list: netdev Content-Length: 396 Lines: 16 On Wednesday 20 October 2004 19:47, Lee Revell wrote: > On Wed, 2004-10-20 at 11:11, Denis Vlasenko wrote: > > 0x57 == 87 bytes is too big for inline. > > Ugh. So the only fix is not to inline it? Yes. You can make it conditionally inline/non-inline depending on SMP/preempt if you feel masochistic today :), but last time I asked davem thought that it is over the top. Deinline it. -- vda From linville@ra.tuxdriver.com Wed Oct 20 12:16:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 12:16:52 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KJGkIP019226 for ; Wed, 20 Oct 2004 12:16:46 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i9KIBkf14276; Wed, 20 Oct 2004 14:11:46 -0400 Date: Wed, 20 Oct 2004 14:11:46 -0400 From: "John W. Linville" To: netdev@oss.sgi.com Cc: linux-kernel@vger.kernel.org, jgarzik@pobox.com, davem@davemloft.net, john.ronciak@intel.com, ganesh.venkatesan@intel.com, akpm@osdl.org, romieu@fr.zoreil.com, ctindel@users.sourceforge.net, fubar@us.ibm.com, greearb@candelatech.com Subject: [patch 2.6.9 0/11] Add MODULE_VERSION to several network drivers Message-ID: <20041020141146.C8775@tuxdriver.com> Mail-Followup-To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, davem@davemloft.net, john.ronciak@intel.com, ganesh.venkatesan@intel.com, akpm@osdl.org, romieu@fr.zoreil.com, ctindel@users.sourceforge.net, fubar@us.ibm.com, greearb@candelatech.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i X-archive-position: 10534 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 246 Lines: 22 Patches to add MODULE_VERSION lines to several network drivers... Here is the list: tg3 e100 e1000 b44 tulip 3c59x 8139too ns83820 r8169 bonding vlan Individual patches to follow... John -- John W. Linville linville@tuxdriver.com From linville@ra.tuxdriver.com Wed Oct 20 12:19:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 12:19:44 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KJJdg5022913 for ; Wed, 20 Oct 2004 12:19:39 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i9KIEeZ14354; Wed, 20 Oct 2004 14:14:40 -0400 Date: Wed, 20 Oct 2004 14:14:40 -0400 From: "John W. Linville" To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, davem@davemloft.net Subject: [patch 2.6.9 1/11] tg3: Add MODULE_VERSION Message-ID: <20041020141440.D8775@tuxdriver.com> Mail-Followup-To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, davem@davemloft.net References: <20041020141146.C8775@tuxdriver.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: <20041020141146.C8775@tuxdriver.com>; from linville@tuxdriver.com on Wed, Oct 20, 2004 at 02:11:46PM -0400 X-archive-position: 10535 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 479 Lines: 15 Add MODULE_VERSION to tg3 driver. drivers/net/tg3.c | 1 + 1 files changed, 1 insertion(+) --- linux-2.6.9/drivers/net/tg3.c.orig +++ linux-2.6.9/drivers/net/tg3.c @@ -143,6 +143,7 @@ MODULE_DESCRIPTION("Broadcom Tigon3 ethe MODULE_LICENSE("GPL"); MODULE_PARM(tg3_debug, "i"); MODULE_PARM_DESC(tg3_debug, "Tigon3 bitmapped debugging message enable value"); +MODULE_VERSION(DRV_MODULE_VERSION); static int tg3_debug = -1; /* -1 == use TG3_DEF_MSG_ENABLE as value */ From linville@ra.tuxdriver.com Wed Oct 20 12:20:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 12:20:55 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KJKoxg023146 for ; Wed, 20 Oct 2004 12:20:51 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i9KIFqk14434; Wed, 20 Oct 2004 14:15:52 -0400 Date: Wed, 20 Oct 2004 14:15:52 -0400 From: "John W. Linville" To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, john.ronciak@intel.com, ganesh.venkatesan@intel.com Subject: [patch 2.6.9 2/11] e100: Add MODULE_VERSION Message-ID: <20041020141552.E8775@tuxdriver.com> Mail-Followup-To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, john.ronciak@intel.com, ganesh.venkatesan@intel.com References: <20041020141146.C8775@tuxdriver.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: <20041020141146.C8775@tuxdriver.com>; from linville@tuxdriver.com on Wed, Oct 20, 2004 at 02:11:46PM -0400 X-archive-position: 10536 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 372 Lines: 15 Add MODULE_VERSION to e100 driver. drivers/net/e100.c | 1 + 1 files changed, 1 insertion(+) --- linux-2.6.9/drivers/net/e100.c.orig +++ linux-2.6.9/drivers/net/e100.c @@ -166,6 +166,7 @@ MODULE_DESCRIPTION(DRV_DESCRIPTION); MODULE_AUTHOR(DRV_COPYRIGHT); MODULE_LICENSE("GPL"); +MODULE_VERSION(DRV_VERSION); static int debug = 3; module_param(debug, int, 0); From linville@ra.tuxdriver.com Wed Oct 20 12:21:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 12:22:01 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KJLtTd023418 for ; Wed, 20 Oct 2004 12:21:55 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i9KIGvG14455; Wed, 20 Oct 2004 14:16:57 -0400 Date: Wed, 20 Oct 2004 14:16:57 -0400 From: "John W. Linville" To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, john.ronciak@intel.com, ganesh.venkatesan@intel.com Subject: [patch 2.6.9 3/11] e1000: Add MODULE_VERSION Message-ID: <20041020141657.F8775@tuxdriver.com> Mail-Followup-To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, john.ronciak@intel.com, ganesh.venkatesan@intel.com References: <20041020141146.C8775@tuxdriver.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: <20041020141146.C8775@tuxdriver.com>; from linville@tuxdriver.com on Wed, Oct 20, 2004 at 02:11:46PM -0400 X-archive-position: 10537 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 905 Lines: 25 Add MODULE_VERSION to e1000 driver. drivers/net/e1000/e1000_main.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) --- linux-2.6.9/drivers/net/e1000/e1000_main.c.orig +++ linux-2.6.9/drivers/net/e1000/e1000_main.c @@ -48,7 +48,8 @@ char e1000_driver_string[] = "Intel(R) P #else #define DRIVERNAPI "-NAPI" #endif -char e1000_driver_version[] = "5.3.19-k2"DRIVERNAPI; +#define DRV_VERSION "5.3.19-k2"DRIVERNAPI +char e1000_driver_version[] = DRV_VERSION; char e1000_copyright[] = "Copyright (c) 1999-2004 Intel Corporation."; /* e1000_pci_tbl - PCI Device ID Table @@ -196,6 +197,7 @@ static struct pci_driver e1000_driver = MODULE_AUTHOR("Intel Corporation, "); MODULE_DESCRIPTION("Intel(R) PRO/1000 Network Driver"); MODULE_LICENSE("GPL"); +MODULE_VERSION(DRV_VERSION); static int debug = NETIF_MSG_DRV | NETIF_MSG_PROBE; module_param(debug, int, 0); From linville@ra.tuxdriver.com Wed Oct 20 12:22:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 12:22:56 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KJMpFV023739 for ; Wed, 20 Oct 2004 12:22:51 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i9KIHrn14461; Wed, 20 Oct 2004 14:17:53 -0400 Date: Wed, 20 Oct 2004 14:17:53 -0400 From: "John W. Linville" To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, davem@davemloft.net Subject: [patch 2.6.9 4/11] b44: Add MODULE_VERSION Message-ID: <20041020141753.G8775@tuxdriver.com> Mail-Followup-To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, davem@davemloft.net References: <20041020141146.C8775@tuxdriver.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: <20041020141146.C8775@tuxdriver.com>; from linville@tuxdriver.com on Wed, Oct 20, 2004 at 02:11:46PM -0400 X-archive-position: 10538 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 474 Lines: 15 Add MODULE_VERSION to b44 driver. drivers/net/b44.c | 1 + 1 files changed, 1 insertion(+) --- linux-2.6.9/drivers/net/b44.c.orig +++ linux-2.6.9/drivers/net/b44.c @@ -79,6 +79,7 @@ MODULE_DESCRIPTION("Broadcom 4400 10/100 MODULE_LICENSE("GPL"); MODULE_PARM(b44_debug, "i"); MODULE_PARM_DESC(b44_debug, "B44 bitmapped debugging message enable value"); +MODULE_VERSION(DRV_MODULE_VERSION); static int b44_debug = -1; /* -1 == use B44_DEF_MSG_ENABLE as value */ From linville@ra.tuxdriver.com Wed Oct 20 12:25:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 12:25:12 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KJP5ow024228 for ; Wed, 20 Oct 2004 12:25:06 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i9KIK8n14514; Wed, 20 Oct 2004 14:20:08 -0400 Date: Wed, 20 Oct 2004 14:20:07 -0400 From: "John W. Linville" To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com Subject: [patch 2.6.9 5/11] tulip: Add MODULE_VERSION Message-ID: <20041020142007.H8775@tuxdriver.com> Mail-Followup-To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com References: <20041020141146.C8775@tuxdriver.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: <20041020141146.C8775@tuxdriver.com>; from linville@tuxdriver.com on Wed, Oct 20, 2004 at 02:11:46PM -0400 X-archive-position: 10539 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 2337 Lines: 61 Add MODULE_VERSION to the tulip-based drivers Signed-off-by: John W. Linville --- drivers/net/tulip/de2104x.c | 1 + drivers/net/tulip/dmfe.c | 1 + drivers/net/tulip/tulip_core.c | 1 + drivers/net/tulip/winbond-840.c | 1 + drivers/net/tulip/xircom_tulip_cb.c | 1 + 5 files changed, 5 insertions(+) --- linux-2.6.9/drivers/net/tulip/de2104x.c.orig +++ linux-2.6.9/drivers/net/tulip/de2104x.c @@ -56,6 +56,7 @@ KERN_INFO DRV_NAME " PCI Ethernet driver MODULE_AUTHOR("Jeff Garzik "); MODULE_DESCRIPTION("Intel/Digital 21040/1 series PCI Ethernet driver"); MODULE_LICENSE("GPL"); +MODULE_VERSION(DRV_VERSION); static int debug = -1; MODULE_PARM (debug, "i"); --- linux-2.6.9/drivers/net/tulip/tulip_core.c.orig +++ linux-2.6.9/drivers/net/tulip/tulip_core.c @@ -115,6 +115,7 @@ static int csr0 = 0x00A00000 | 0x4800; MODULE_AUTHOR("The Linux Kernel Team"); MODULE_DESCRIPTION("Digital 21*4* Tulip ethernet driver"); MODULE_LICENSE("GPL"); +MODULE_VERSION(DRV_VERSION); MODULE_PARM(tulip_debug, "i"); MODULE_PARM(max_interrupt_work, "i"); MODULE_PARM(rx_copybreak, "i"); --- linux-2.6.9/drivers/net/tulip/xircom_tulip_cb.c.orig +++ linux-2.6.9/drivers/net/tulip/xircom_tulip_cb.c @@ -116,6 +116,7 @@ KERN_INFO " unofficial 2.4.x kernel port MODULE_AUTHOR("Donald Becker "); MODULE_DESCRIPTION("Xircom CBE-100 ethernet driver"); MODULE_LICENSE("GPL v2"); +MODULE_VERSION(DRV_VERSION); MODULE_PARM(debug, "i"); MODULE_PARM(max_interrupt_work, "i"); --- linux-2.6.9/drivers/net/tulip/dmfe.c.orig +++ linux-2.6.9/drivers/net/tulip/dmfe.c @@ -1986,6 +1986,7 @@ static struct pci_driver dmfe_driver = { MODULE_AUTHOR("Sten Wang, sten_wang@davicom.com.tw"); MODULE_DESCRIPTION("Davicom DM910X fast ethernet driver"); MODULE_LICENSE("GPL"); +MODULE_VERSION(DRV_VERSION); MODULE_PARM(debug, "i"); MODULE_PARM(mode, "i"); --- linux-2.6.9/drivers/net/tulip/winbond-840.c.orig +++ linux-2.6.9/drivers/net/tulip/winbond-840.c @@ -144,6 +144,7 @@ KERN_INFO " http://www.scyld.com/networ MODULE_AUTHOR("Donald Becker "); MODULE_DESCRIPTION("Winbond W89c840 Ethernet driver"); MODULE_LICENSE("GPL"); +MODULE_VERSION(DRV_VERSION); MODULE_PARM(max_interrupt_work, "i"); MODULE_PARM(debug, "i"); From linville@ra.tuxdriver.com Wed Oct 20 12:26:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 12:26:35 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KJQU9d024526 for ; Wed, 20 Oct 2004 12:26:30 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i9KILWs14547; Wed, 20 Oct 2004 14:21:32 -0400 Date: Wed, 20 Oct 2004 14:21:32 -0400 From: "John W. Linville" To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, akpm@osdl.org Subject: [patch 2.6.9 6/11] 3c59x: Add MODULE_VERSION Message-ID: <20041020142132.I8775@tuxdriver.com> Mail-Followup-To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, akpm@osdl.org References: <20041020141146.C8775@tuxdriver.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: <20041020141146.C8775@tuxdriver.com>; from linville@tuxdriver.com on Wed, Oct 20, 2004 at 02:11:46PM -0400 X-archive-position: 10540 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 510 Lines: 18 Add MODULE_VERSION to 3c59x driver. Signed-off-by: John W. Linville --- drivers/net/3c59x.c | 1 + 1 files changed, 1 insertion(+) --- linux-2.6.9/drivers/net/3c59x.c.orig +++ linux-2.6.9/drivers/net/3c59x.c @@ -277,6 +277,7 @@ MODULE_AUTHOR("Donald Becker ; Wed, 20 Oct 2004 12:28:55 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i9KINve14572; Wed, 20 Oct 2004 14:23:57 -0400 Date: Wed, 20 Oct 2004 14:23:57 -0400 From: "John W. Linville" To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com Subject: [patch 2.6.9 7/11] 8139too: Add MODULE_VERSION Message-ID: <20041020142357.J8775@tuxdriver.com> Mail-Followup-To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com References: <20041020141146.C8775@tuxdriver.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: <20041020141146.C8775@tuxdriver.com>; from linville@tuxdriver.com on Wed, Oct 20, 2004 at 02:11:46PM -0400 X-archive-position: 10541 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 570 Lines: 18 Add MODULE_VERSION to 8139too driver. Signed-off-by: John W. Linville --- drivers/net/8139too.c | 1 + 1 files changed, 1 insertion(+) --- linux-2.6.9/drivers/net/8139too.c.8139too +++ linux-2.6.9/drivers/net/8139too.c @@ -598,6 +598,7 @@ struct rtl8139_private { MODULE_AUTHOR ("Jeff Garzik "); MODULE_DESCRIPTION ("RealTek RTL-8139 Fast Ethernet driver"); MODULE_LICENSE("GPL"); +MODULE_VERSION(DRV_VERSION); MODULE_PARM (multicast_filter_limit, "i"); MODULE_PARM (media, "1-" __MODULE_STRING(MAX_UNITS) "i"); From linville@ra.tuxdriver.com Wed Oct 20 12:32:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 12:33:01 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KJWswP025286 for ; Wed, 20 Oct 2004 12:32:54 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i9KIRuT14652; Wed, 20 Oct 2004 14:27:56 -0400 Date: Wed, 20 Oct 2004 14:27:56 -0400 From: "John W. Linville" To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com Subject: [patch 2.6.9 8/11] ns83820: Add MODULE_VERSION Message-ID: <20041020142756.K8775@tuxdriver.com> Mail-Followup-To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com References: <20041020141146.C8775@tuxdriver.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: <20041020141146.C8775@tuxdriver.com>; from linville@tuxdriver.com on Wed, Oct 20, 2004 at 02:11:46PM -0400 X-archive-position: 10542 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 537 Lines: 18 Add MODULE_VERSION to ns83820 driver. Signed-off-by: John W. Linville --- drivers/net/ns83820.c | 1 + 1 files changed, 1 insertion(+) --- linux-2.6.9/drivers/net/ns83820.c.ns83820 +++ linux-2.6.9/drivers/net/ns83820.c @@ -2106,6 +2106,7 @@ static void __exit ns83820_exit(void) MODULE_AUTHOR("Benjamin LaHaise "); MODULE_DESCRIPTION("National Semiconductor DP83820 10/100/1000 driver"); MODULE_LICENSE("GPL"); +MODULE_VERSION(VERSION); MODULE_DEVICE_TABLE(pci, ns83820_pci_tbl); From linville@ra.tuxdriver.com Wed Oct 20 12:33:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 12:34:02 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KJXusY025442 for ; Wed, 20 Oct 2004 12:33:56 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i9KISw414658; Wed, 20 Oct 2004 14:28:58 -0400 Date: Wed, 20 Oct 2004 14:28:58 -0400 From: "John W. Linville" To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, romieu@fr.zoreil.com Subject: [patch 2.6.9 9/11] r8169: Add MODULE_VERSION Message-ID: <20041020142858.L8775@tuxdriver.com> Mail-Followup-To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, romieu@fr.zoreil.com References: <20041020141146.C8775@tuxdriver.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: <20041020141146.C8775@tuxdriver.com>; from linville@tuxdriver.com on Wed, Oct 20, 2004 at 02:11:46PM -0400 X-archive-position: 10543 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 581 Lines: 18 Add MODULE_VERSION to r8169 driver. Signed-off-by: John W. Linville --- drivers/net/r8169.c | 1 + 1 files changed, 1 insertion(+) --- linux-2.6.9/drivers/net/r8169.c.orig +++ linux-2.6.9/drivers/net/r8169.c @@ -362,6 +362,7 @@ MODULE_PARM(rx_copybreak, "i"); MODULE_PARM(use_dac, "i"); MODULE_PARM_DESC(use_dac, "Enable PCI DAC. Unsafe on 32 bit PCI slot."); MODULE_LICENSE("GPL"); +MODULE_VERSION(RTL8169_VERSION); static int rtl8169_open(struct net_device *dev); static int rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev); From linville@ra.tuxdriver.com Wed Oct 20 12:34:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 12:34:59 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KJYqJU025712 for ; Wed, 20 Oct 2004 12:34:53 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i9KITsX14694; Wed, 20 Oct 2004 14:29:54 -0400 Date: Wed, 20 Oct 2004 14:29:54 -0400 From: "John W. Linville" To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, ctindel@users.sourceforge.net, fubar@us.ibm.com Subject: [patch 2.6.9 10/11] bonding: Add MODULE_VERSION Message-ID: <20041020142954.M8775@tuxdriver.com> Mail-Followup-To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, ctindel@users.sourceforge.net, fubar@us.ibm.com References: <20041020141146.C8775@tuxdriver.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: <20041020141146.C8775@tuxdriver.com>; from linville@tuxdriver.com on Wed, Oct 20, 2004 at 02:11:46PM -0400 X-archive-position: 10544 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 620 Lines: 18 Add MODULE_VERSION to bonding driver. Signed-off-by: John W. Linville --- drivers/net/bonding/bond_main.c | 1 + 1 files changed, 1 insertion(+) --- linux-2.6.9/drivers/net/bonding/bond_main.c.orig +++ linux-2.6.9/drivers/net/bonding/bond_main.c @@ -4700,6 +4700,7 @@ static void __exit bonding_exit(void) module_init(bonding_init); module_exit(bonding_exit); MODULE_LICENSE("GPL"); +MODULE_VERSION(DRV_VERSION); MODULE_DESCRIPTION(DRV_DESCRIPTION ", v" DRV_VERSION); MODULE_AUTHOR("Thomas Davis, tadavis@lbl.gov and many others"); MODULE_SUPPORTED_DEVICE("most ethernet devices"); From linville@ra.tuxdriver.com Wed Oct 20 12:37:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 12:37:56 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KJboPA026361 for ; Wed, 20 Oct 2004 12:37:50 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i9KIWq814732; Wed, 20 Oct 2004 14:32:52 -0400 Date: Wed, 20 Oct 2004 14:32:52 -0400 From: "John W. Linville" To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, greearb@candelatech.com Subject: [patch 2.6.9 11/11] vlan: Add MODULE_VERSION Message-ID: <20041020143252.N8775@tuxdriver.com> Mail-Followup-To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, greearb@candelatech.com References: <20041020141146.C8775@tuxdriver.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: <20041020141146.C8775@tuxdriver.com>; from linville@tuxdriver.com on Wed, Oct 20, 2004 at 02:11:46PM -0400 X-archive-position: 10545 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 1349 Lines: 45 Add MODULE_VERSION to vlan driver. Signed-off-by: John W. Linville --- net/8021q/vlan.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) --- linux-2.6.9/net/8021q/vlan.c.orig +++ linux-2.6.9/net/8021q/vlan.c @@ -35,6 +35,8 @@ #include "vlan.h" #include "vlanproc.h" +#define DRV_VERSION "1.8" + /* Global VLAN variables */ /* Our listing of VLAN group(s) */ @@ -42,8 +44,7 @@ struct hlist_head vlan_group_hash[VLAN_G #define vlan_grp_hashfn(IDX) ((((IDX) >> VLAN_GRP_HASH_SHIFT) ^ (IDX)) & VLAN_GRP_HASH_MASK) static char vlan_fullname[] = "802.1Q VLAN Support"; -static unsigned int vlan_version = 1; -static unsigned int vlan_release = 8; +static char vlan_version[] = DRV_VERSION; static char vlan_copyright[] = "Ben Greear "; static char vlan_buggyright[] = "David S. Miller "; @@ -84,8 +85,8 @@ static int __init vlan_proto_init(void) { int err; - printk(VLAN_INF "%s v%u.%u %s\n", - vlan_fullname, vlan_version, vlan_release, vlan_copyright); + printk(VLAN_INF "%s v%s %s\n", + vlan_fullname, vlan_version, vlan_copyright); printk(VLAN_INF "All bugs added by %s\n", vlan_buggyright); @@ -735,3 +736,4 @@ static int vlan_ioctl_handler(void __use } MODULE_LICENSE("GPL"); +MODULE_VERSION(DRV_VERSION); From linville@ra.tuxdriver.com Wed Oct 20 12:38:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 12:39:01 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KJcuTD026530 for ; Wed, 20 Oct 2004 12:38:57 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i9KIXwU14751; Wed, 20 Oct 2004 14:33:58 -0400 Date: Wed, 20 Oct 2004 14:33:58 -0400 From: "John W. Linville" To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, davem@davemloft.net Subject: [patch 2.6.9 1/11] tg3: Add MODULE_VERSION Message-ID: <20041020143358.O8775@tuxdriver.com> Mail-Followup-To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, davem@davemloft.net References: <20041020141146.C8775@tuxdriver.com> <20041020141440.D8775@tuxdriver.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: <20041020141440.D8775@tuxdriver.com>; from linville@tuxdriver.com on Wed, Oct 20, 2004 at 02:14:40PM -0400 X-archive-position: 10546 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 582 Lines: 20 Add MODULE_VERSION to tg3 driver. Signed-off-by: John W. Linville --- drivers/net/tg3.c | 1 + 1 files changed, 1 insertion(+) Re-send -- forgot Signed-off-by line... --- linux-2.6.9/drivers/net/tg3.c.orig +++ linux-2.6.9/drivers/net/tg3.c @@ -143,6 +143,7 @@ MODULE_DESCRIPTION("Broadcom Tigon3 ethe MODULE_LICENSE("GPL"); MODULE_PARM(tg3_debug, "i"); MODULE_PARM_DESC(tg3_debug, "Tigon3 bitmapped debugging message enable value"); +MODULE_VERSION(DRV_MODULE_VERSION); static int tg3_debug = -1; /* -1 == use TG3_DEF_MSG_ENABLE as value */ From linville@ra.tuxdriver.com Wed Oct 20 12:39:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 12:39:48 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KJdh4Z026848 for ; Wed, 20 Oct 2004 12:39:43 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i9KIYie14772; Wed, 20 Oct 2004 14:34:44 -0400 Date: Wed, 20 Oct 2004 14:34:44 -0400 From: "John W. Linville" To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, john.ronciak@intel.com, ganesh.venkatesan@intel.com Subject: [patch 2.6.9 2/11] e100: Add MODULE_VERSION Message-ID: <20041020143444.P8775@tuxdriver.com> Mail-Followup-To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, john.ronciak@intel.com, ganesh.venkatesan@intel.com References: <20041020141146.C8775@tuxdriver.com> <20041020141552.E8775@tuxdriver.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: <20041020141552.E8775@tuxdriver.com>; from linville@tuxdriver.com on Wed, Oct 20, 2004 at 02:15:52PM -0400 X-archive-position: 10547 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 475 Lines: 20 Add MODULE_VERSION to e100 driver. Signed-off-by: John W. Linville --- drivers/net/e100.c | 1 + 1 files changed, 1 insertion(+) Re-send -- forgot Signed-off-by line... --- linux-2.6.9/drivers/net/e100.c.orig +++ linux-2.6.9/drivers/net/e100.c @@ -166,6 +166,7 @@ MODULE_DESCRIPTION(DRV_DESCRIPTION); MODULE_AUTHOR(DRV_COPYRIGHT); MODULE_LICENSE("GPL"); +MODULE_VERSION(DRV_VERSION); static int debug = 3; module_param(debug, int, 0); From linville@ra.tuxdriver.com Wed Oct 20 12:40:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 12:40:27 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KJeLHH027068 for ; Wed, 20 Oct 2004 12:40:21 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i9KIZNM14828; Wed, 20 Oct 2004 14:35:23 -0400 Date: Wed, 20 Oct 2004 14:35:23 -0400 From: "John W. Linville" To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, john.ronciak@intel.com, ganesh.venkatesan@intel.com Subject: Re: [patch 2.6.9 3/11] e1000: Add MODULE_VERSION Message-ID: <20041020143523.Q8775@tuxdriver.com> Mail-Followup-To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, john.ronciak@intel.com, ganesh.venkatesan@intel.com References: <20041020141146.C8775@tuxdriver.com> <20041020141657.F8775@tuxdriver.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: <20041020141657.F8775@tuxdriver.com>; from linville@tuxdriver.com on Wed, Oct 20, 2004 at 02:16:57PM -0400 X-archive-position: 10548 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 1008 Lines: 30 Add MODULE_VERSION to e1000 driver. Signed-off-by: John W. Linville --- drivers/net/e1000/e1000_main.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Re-send -- forgot Signed-off-by line... --- linux-2.6.9/drivers/net/e1000/e1000_main.c.orig +++ linux-2.6.9/drivers/net/e1000/e1000_main.c @@ -48,7 +48,8 @@ char e1000_driver_string[] = "Intel(R) P #else #define DRIVERNAPI "-NAPI" #endif -char e1000_driver_version[] = "5.3.19-k2"DRIVERNAPI; +#define DRV_VERSION "5.3.19-k2"DRIVERNAPI +char e1000_driver_version[] = DRV_VERSION; char e1000_copyright[] = "Copyright (c) 1999-2004 Intel Corporation."; /* e1000_pci_tbl - PCI Device ID Table @@ -196,6 +197,7 @@ static struct pci_driver e1000_driver = MODULE_AUTHOR("Intel Corporation, "); MODULE_DESCRIPTION("Intel(R) PRO/1000 Network Driver"); MODULE_LICENSE("GPL"); +MODULE_VERSION(DRV_VERSION); static int debug = NETIF_MSG_DRV | NETIF_MSG_PROBE; module_param(debug, int, 0); From linville@ra.tuxdriver.com Wed Oct 20 12:41:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 12:41:42 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KJfbhS027590 for ; Wed, 20 Oct 2004 12:41:37 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i9KIad714903; Wed, 20 Oct 2004 14:36:39 -0400 Date: Wed, 20 Oct 2004 14:36:39 -0400 From: "John W. Linville" To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, davem@davemloft.net Subject: [patch 2.6.9 4/11] b44: Add MODULE_VERSION Message-ID: <20041020143639.R8775@tuxdriver.com> Mail-Followup-To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, davem@davemloft.net References: <20041020141146.C8775@tuxdriver.com> <20041020141753.G8775@tuxdriver.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: <20041020141753.G8775@tuxdriver.com>; from linville@tuxdriver.com on Wed, Oct 20, 2004 at 02:17:53PM -0400 X-archive-position: 10549 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 577 Lines: 20 Add MODULE_VERSION to b44 driver. Signed-off-by: John W. Linville --- drivers/net/b44.c | 1 + 1 files changed, 1 insertion(+) Re-send -- forgot Signed-off-by line... --- linux-2.6.9/drivers/net/b44.c.orig +++ linux-2.6.9/drivers/net/b44.c @@ -79,6 +79,7 @@ MODULE_DESCRIPTION("Broadcom 4400 10/100 MODULE_LICENSE("GPL"); MODULE_PARM(b44_debug, "i"); MODULE_PARM_DESC(b44_debug, "B44 bitmapped debugging message enable value"); +MODULE_VERSION(DRV_MODULE_VERSION); static int b44_debug = -1; /* -1 == use B44_DEF_MSG_ENABLE as value */ From rlrevell@joe-job.com Wed Oct 20 12:53:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 12:53:49 -0700 (PDT) Received: from viper.oldcity.dca.net (viper.oldcity.dca.net [216.158.38.4]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9KJrgE1028216 for ; Wed, 20 Oct 2004 12:53:43 -0700 Received: (qmail 22587 invoked from network); 20 Oct 2004 19:53:22 -0000 Received: from unknown (HELO ?192.168.2.100?) (207.245.115.154) by viper with SMTP; 20 Oct 2004 19:53:22 -0000 Subject: Re: [PATCH] Make netif_rx_ni preempt-safe From: Lee Revell To: Denis Vlasenko Cc: Herbert Xu , Andrew Morton , linux-kernel , "David S. Miller" , linux-kernel@gondor.apana.org.au, maxk@qualcomm.com, irda-users@lists.sourceforge.net, Linux Network Development , Alain Schroeder In-Reply-To: <200410202214.31791.vda@port.imtp.ilyichevsk.odessa.ua> References: <1098230132.23628.28.camel@krustophenia.net> <200410201811.44419.vda@port.imtp.ilyichevsk.odessa.ua> <1098290858.1429.70.camel@krustophenia.net> <200410202214.31791.vda@port.imtp.ilyichevsk.odessa.ua> Content-Type: text/plain Message-Id: <1098302001.2268.5.camel@krustophenia.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 20 Oct 2004 15:53:21 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 10550 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rlrevell@joe-job.com Precedence: bulk X-list: netdev Content-Length: 1217 Lines: 41 On Wed, 2004-10-20 at 15:14, Denis Vlasenko wrote: > On Wednesday 20 October 2004 19:47, Lee Revell wrote: > > On Wed, 2004-10-20 at 11:11, Denis Vlasenko wrote: > > > 0x57 == 87 bytes is too big for inline. > > > > Ugh. So the only fix is not to inline it? > > Yes. > > You can make it conditionally inline/non-inline > depending on SMP/preempt if you feel masochistic today :), > but last time I asked davem thought that it is over the top. I agree, not worth the trouble. This would actually depend only on PREEMPT and not SMP. OK, third try. Signed-Off-By: Lee Revell --- include/linux/netdevice.h~ 2004-10-20 15:51:00.000000000 -0400 +++ include/linux/netdevice.h 2004-10-20 15:51:54.000000000 -0400 @@ -694,11 +694,14 @@ /* Post buffer to the network code from _non interrupt_ context. * see net/core/dev.c for netif_rx description. */ -static inline int netif_rx_ni(struct sk_buff *skb) +static int netif_rx_ni(struct sk_buff *skb) { - int err = netif_rx(skb); + int err; + preempt_disable(); + err = netif_rx(skb); if (softirq_pending(smp_processor_id())) do_softirq(); + preempt_enable(); return err; } From vda@port.imtp.ilyichevsk.odessa.ua Wed Oct 20 12:57:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 12:57:22 -0700 (PDT) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9KJvGUu028703 for ; Wed, 20 Oct 2004 12:57:17 -0700 Received: (qmail 26444 invoked by alias); 20 Oct 2004 19:57:00 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 20 Oct 2004 19:57:00 -0000 From: Denis Vlasenko To: Lee Revell Subject: Re: [PATCH] Make netif_rx_ni preempt-safe Date: Wed, 20 Oct 2004 22:56:56 +0300 User-Agent: KMail/1.5.4 Cc: Herbert Xu , Andrew Morton , linux-kernel , "David S. Miller" , linux-kernel@gondor.apana.org.au, maxk@qualcomm.com, irda-users@lists.sourceforge.net, Linux Network Development , Alain Schroeder References: <1098230132.23628.28.camel@krustophenia.net> <200410202214.31791.vda@port.imtp.ilyichevsk.odessa.ua> <1098302001.2268.5.camel@krustophenia.net> In-Reply-To: <1098302001.2268.5.camel@krustophenia.net> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410202256.56636.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 10551 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: vda@port.imtp.ilyichevsk.odessa.ua Precedence: bulk X-list: netdev Content-Length: 518 Lines: 17 > OK, third try. > > Signed-Off-By: Lee Revell > > --- include/linux/netdevice.h~ 2004-10-20 15:51:00.000000000 -0400 > +++ include/linux/netdevice.h 2004-10-20 15:51:54.000000000 -0400 > @@ -694,11 +694,14 @@ > /* Post buffer to the network code from _non interrupt_ context. > * see net/core/dev.c for netif_rx description. > */ > -static inline int netif_rx_ni(struct sk_buff *skb) > +static int netif_rx_ni(struct sk_buff *skb) non-inline functions must not live in .h files -- vda From rlrevell@joe-job.com Wed Oct 20 13:27:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 13:27:24 -0700 (PDT) Received: from viper.oldcity.dca.net (viper.oldcity.dca.net [216.158.38.4]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9KKRIbr029754 for ; Wed, 20 Oct 2004 13:27:18 -0700 Received: (qmail 714 invoked from network); 20 Oct 2004 20:25:53 -0000 Received: from unknown (HELO ?192.168.2.100?) (207.245.115.154) by viper with SMTP; 20 Oct 2004 20:25:53 -0000 Subject: Re: [PATCH] Make netif_rx_ni preempt-safe From: Lee Revell To: Denis Vlasenko Cc: Herbert Xu , Andrew Morton , linux-kernel , "David S. Miller" , linux-kernel@gondor.apana.org.au, maxk@qualcomm.com, irda-users@lists.sourceforge.net, Linux Network Development , Alain Schroeder In-Reply-To: <200410202256.56636.vda@port.imtp.ilyichevsk.odessa.ua> References: <1098230132.23628.28.camel@krustophenia.net> <200410202214.31791.vda@port.imtp.ilyichevsk.odessa.ua> <1098302001.2268.5.camel@krustophenia.net> <200410202256.56636.vda@port.imtp.ilyichevsk.odessa.ua> Content-Type: text/plain Message-Id: <1098303951.2268.8.camel@krustophenia.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 20 Oct 2004 16:25:52 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 10552 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rlrevell@joe-job.com Precedence: bulk X-list: netdev Content-Length: 628 Lines: 20 On Wed, 2004-10-20 at 15:56, Denis Vlasenko wrote: > > OK, third try. > > > > Signed-Off-By: Lee Revell > > > > --- include/linux/netdevice.h~ 2004-10-20 15:51:00.000000000 -0400 > > +++ include/linux/netdevice.h 2004-10-20 15:51:54.000000000 -0400 > > @@ -694,11 +694,14 @@ > > /* Post buffer to the network code from _non interrupt_ context. > > * see net/core/dev.c for netif_rx description. > > */ > > -static inline int netif_rx_ni(struct sk_buff *skb) > > +static int netif_rx_ni(struct sk_buff *skb) > > non-inline functions must not live in .h files Where do you suggest we put it? Lee From vda@port.imtp.ilyichevsk.odessa.ua Wed Oct 20 13:32:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 13:33:01 -0700 (PDT) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9KKWsZX030160 for ; Wed, 20 Oct 2004 13:32:55 -0700 Received: (qmail 26624 invoked by alias); 20 Oct 2004 20:32:37 -0000 Received: from unknown (1.0.3.9) by 0 (195.66.192.168) with ESMTP; 20 Oct 2004 20:32:37 -0000 From: Denis Vlasenko To: Lee Revell Subject: Re: [PATCH] Make netif_rx_ni preempt-safe Date: Wed, 20 Oct 2004 23:32:33 +0300 User-Agent: KMail/1.5.4 Cc: Herbert Xu , Andrew Morton , linux-kernel , "David S. Miller" , linux-kernel@gondor.apana.org.au, maxk@qualcomm.com, irda-users@lists.sourceforge.net, Linux Network Development , Alain Schroeder References: <1098230132.23628.28.camel@krustophenia.net> <200410202256.56636.vda@port.imtp.ilyichevsk.odessa.ua> <1098303951.2268.8.camel@krustophenia.net> In-Reply-To: <1098303951.2268.8.camel@krustophenia.net> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410202332.33583.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 10553 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: vda@port.imtp.ilyichevsk.odessa.ua Precedence: bulk X-list: netdev Content-Length: 662 Lines: 20 On Wednesday 20 October 2004 23:25, Lee Revell wrote: > > > --- include/linux/netdevice.h~ 2004-10-20 15:51:00.000000000 -0400 > > > +++ include/linux/netdevice.h 2004-10-20 15:51:54.000000000 -0400 > > > @@ -694,11 +694,14 @@ > > > /* Post buffer to the network code from _non interrupt_ context. > > > * see net/core/dev.c for netif_rx description. > > > */ > > > -static inline int netif_rx_ni(struct sk_buff *skb) > > > +static int netif_rx_ni(struct sk_buff *skb) > > > > non-inline functions must not live in .h files > > Where do you suggest we put it? Somewhere near this place: http://lxr.linux.no/source/net/core/dev.c?v=2.6.8.1#L1555 -- vda From root@chaos.analogic.com Wed Oct 20 13:35:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 13:35:18 -0700 (PDT) Received: from chaos.analogic.com (chaos.analogic.com [204.178.40.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KKZBV2030532 for ; Wed, 20 Oct 2004 13:35:12 -0700 Received: from chaos.analogic.com (localhost.localdomain [127.0.0.1]) by chaos.analogic.com (8.12.11/8.12.11) with ESMTP id i9KKYjwV007089; Wed, 20 Oct 2004 16:34:45 -0400 Received: (from root@localhost) by chaos.analogic.com (8.12.11/8.12.11/Submit) id i9KKYjxY007088; Wed, 20 Oct 2004 16:34:45 -0400 Date: Wed, 20 Oct 2004 16:34:45 -0400 (EDT) From: "Richard B. Johnson" Reply-To: root@chaos.analogic.com To: "John W. Linville" cc: netdev@oss.sgi.com, Linux kernel , jgarzik@pobox.com, romieu@fr.zoreil.com Subject: Re: [patch 2.6.9 9/11] r8169: Add MODULE_VERSION In-Reply-To: <20041020142858.L8775@tuxdriver.com> Message-ID: References: <20041020141146.C8775@tuxdriver.com> <20041020142858.L8775@tuxdriver.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-archive-position: 10554 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: root@chaos.analogic.com Precedence: bulk X-list: netdev Content-Length: 1326 Lines: 41 This makes warning error about : Warning: could not find versions for .tmp_versions/r8169.mod Do I have to enable something in .config (like CONFIG_MODVERSIONS)? If so, how does one make this transparent, to get rid of the warning if CONFIG_MODVERSIONS is not set? On Wed, 20 Oct 2004, John W. Linville wrote: > Add MODULE_VERSION to r8169 driver. > > Signed-off-by: John W. Linville > --- > > drivers/net/r8169.c | 1 + > 1 files changed, 1 insertion(+) > > --- linux-2.6.9/drivers/net/r8169.c.orig > +++ linux-2.6.9/drivers/net/r8169.c > @@ -362,6 +362,7 @@ MODULE_PARM(rx_copybreak, "i"); > MODULE_PARM(use_dac, "i"); > MODULE_PARM_DESC(use_dac, "Enable PCI DAC. Unsafe on 32 bit PCI slot."); > MODULE_LICENSE("GPL"); > +MODULE_VERSION(RTL8169_VERSION); > > static int rtl8169_open(struct net_device *dev); > static int rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev); > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > Cheers, Dick Johnson Penguin : Linux version 2.6.9 on an i686 machine (5537.79 GrumpyMips). 98.36% of all statistics are fiction. From linville@ra.tuxdriver.com Wed Oct 20 14:04:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 14:04:45 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KL4dO0031501 for ; Wed, 20 Oct 2004 14:04:39 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i9KJxci15970; Wed, 20 Oct 2004 15:59:38 -0400 Date: Wed, 20 Oct 2004 15:59:38 -0400 From: "John W. Linville" To: "Richard B. Johnson" Cc: netdev@oss.sgi.com, Linux kernel , jgarzik@pobox.com, romieu@fr.zoreil.com Subject: Re: [patch 2.6.9 9/11] r8169: Add MODULE_VERSION Message-ID: <20041020155938.T8775@tuxdriver.com> Mail-Followup-To: "Richard B. Johnson" , netdev@oss.sgi.com, Linux kernel , jgarzik@pobox.com, romieu@fr.zoreil.com References: <20041020141146.C8775@tuxdriver.com> <20041020142858.L8775@tuxdriver.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: ; from root@chaos.analogic.com on Wed, Oct 20, 2004 at 04:34:45PM -0400 X-archive-position: 10555 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 647 Lines: 24 On Wed, Oct 20, 2004 at 04:34:45PM -0400, Richard B. Johnson wrote: > > This makes warning error about : > > Warning: could not find versions for .tmp_versions/r8169.mod > > Do I have to enable something in .config (like CONFIG_MODVERSIONS)? > If so, how does one make this transparent, to get rid of the > warning if CONFIG_MODVERSIONS is not set? Odd...I don't get any such warning, with or without CONFIG_MODVERSIONS... MODULE_VERSION is used elsewhere -- do you get that warning from any other modules? Was this from a clean build? Send me your .config, and I'll look into it. Thanks, John -- John W. Linville linville@tuxdriver.com From romieu@fr.zoreil.com Wed Oct 20 14:06:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 14:06:31 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KL6H0e031751 for ; Wed, 20 Oct 2004 14:06:18 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i9KL3ovr016190; Wed, 20 Oct 2004 23:03:50 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i9KL3oQ5016189; Wed, 20 Oct 2004 23:03:50 +0200 Date: Wed, 20 Oct 2004 23:03:50 +0200 From: Francois Romieu To: netdev@oss.sgi.com Cc: linux-kernel@vger.kernel.org Subject: [mini-RFT] r8169 and amd64 Message-ID: <20041020210350.GA12577@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 10556 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 Content-Length: 562 Lines: 17 Could someone with an amd64 system test the r8169 driver in Jeff's -netdev with PCI DAC enabled and send me the values of the command and status registers which are displayed when the PCI error happen ? One just need to give an "use_dac=1" option to the r8169 module. Apparently the 8169 does not hesitate to issue harmless PCI error. They could be identified and thus ignored. Alternate location for the relevant patch against 2.6.9: http://www.fr.zoreil.com/people/francois/misc/20041020-2.6.9-r8169.c-test.patch Thank you for your attention. -- Ueimor From herbert@gondor.apana.org.au Wed Oct 20 15:03:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 15:03:31 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KM3IRv001019 for ; Wed, 20 Oct 2004 15:03:19 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CKOXk-0006E6-00; Thu, 21 Oct 2004 08:02:52 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CKOXc-0002Kq-00; Thu, 21 Oct 2004 08:02:44 +1000 From: Herbert Xu To: mailing-lists@gmx.ch (Eric Marchionni) Subject: Re: [Openswan Users] DPD Problem - message from kernel malformed: unknown address family Cc: users@openswan.org, netdev@oss.sgi.com, davem@davemloft.net Organization: Core In-Reply-To: <417675C6.3040704@gmx.ch> X-Newsgroups: apana.lists.net.openswan.users User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) Message-Id: Date: Thu, 21 Oct 2004 08:02:44 +1000 X-archive-position: 10557 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 2160 Lines: 63 Eric Marchionni wrote: > > the ping times out and this occurs in the log: > Oct 20 10:36:11 localhost pluto[12528]: XFRM_MSG_ACQUIRE message from > kernel malformed: unknown address family Looks like nobody has tested shunt routes for a while. It's a kernel bug. We're not setting the family field in the selector. This patch fixes it. Signed-off-by: Herbert Xu Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- ===== net/ipv4/xfrm4_state.c 1.10 vs edited ===== --- 1.10/net/ipv4/xfrm4_state.c 2004-08-01 16:28:12 +10:00 +++ edited/net/ipv4/xfrm4_state.c 2004-10-21 07:58:54 +10:00 @@ -18,6 +18,7 @@ struct xfrm_tmpl *tmpl, xfrm_address_t *daddr, xfrm_address_t *saddr) { + x->sel.family = AF_INET; x->sel.daddr.a4 = fl->fl4_dst; x->sel.saddr.a4 = fl->fl4_src; x->sel.dport = fl->fl_ip_dport; @@ -85,11 +86,11 @@ x0->sel.saddr.a4 = saddr->a4; x0->sel.prefixlen_d = 32; x0->sel.prefixlen_s = 32; + x0->sel.family = AF_INET; x0->props.saddr.a4 = saddr->a4; x0->km.state = XFRM_STATE_ACQ; x0->id.daddr.a4 = daddr->a4; x0->id.proto = proto; - x0->props.family = AF_INET; x0->props.mode = mode; x0->props.reqid = reqid; x0->props.family = AF_INET; ===== net/ipv6/xfrm6_state.c 1.12 vs edited ===== --- 1.12/net/ipv6/xfrm6_state.c 2004-08-01 16:28:12 +10:00 +++ edited/net/ipv6/xfrm6_state.c 2004-10-21 07:59:23 +10:00 @@ -25,6 +25,7 @@ { /* Initialize temporary selector matching only * to current session. */ + x->sel.family = AF_INET6; ipv6_addr_copy((struct in6_addr *)&x->sel.daddr, &fl->fl6_dst); ipv6_addr_copy((struct in6_addr *)&x->sel.saddr, &fl->fl6_src); x->sel.dport = fl->fl_ip_dport; @@ -88,6 +89,7 @@ } } if (!x0 && create && (x0 = xfrm_state_alloc()) != NULL) { + x0->sel.family = AF_INET6; ipv6_addr_copy((struct in6_addr *)x0->sel.daddr.a6, (struct in6_addr *)daddr); ipv6_addr_copy((struct in6_addr *)x0->sel.saddr.a6, From davem@davemloft.net Wed Oct 20 15:20:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 15:20:48 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KMKeix001684 for ; Wed, 20 Oct 2004 15:20:41 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKOjI-0001bS-00; Wed, 20 Oct 2004 15:14:48 -0700 Date: Wed, 20 Oct 2004 15:14:48 -0700 From: "David S. Miller" To: Lennert Buytenhek Cc: netdev@oss.sgi.com Subject: Re: way of figuring out total number of retransmitted packets on a TCP socket? Message-Id: <20041020151448.51209278.davem@davemloft.net> In-Reply-To: <20041020130134.GC24757@xi.wantstofly.org> References: <20041020130134.GC24757@xi.wantstofly.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10558 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 724 Lines: 18 On Wed, 20 Oct 2004 15:01:34 +0200 Lennert Buytenhek wrote: > I'm looking for a way of counting the total number of retransmitted packets > sent on a TCP connection. I tried querying TCP_INFO:tcpi_retransmits, but > that seems to be not the metric I'm looking for. > > Anyone got any ideas? (Apart from using tcpdump+tcptrace.) tcpi_retransmits only accounts for timeout based retransmits. Retransmits which occur dynamically due to fast-retransmit and other non-timeout based decisions are accounted for in "tcpi_retrans", so that is probably the value you are looking for. Unlike another person's response to this thread, you don't need the huge web100 patch to get at this information :-) From laforge@netfilter.org Wed Oct 20 15:21:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 15:21:29 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KMLJsO001829 for ; Wed, 20 Oct 2004 15:21:20 -0700 Received: from dsl-213-023-154-242.arcor-ip.net ([213.23.154.242] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1CKOpL-0002Y5-Qy; Thu, 21 Oct 2004 00:21:04 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1CKOpK-00070T-Qn; Thu, 21 Oct 2004 00:21:02 +0200 Date: Thu, 21 Oct 2004 00:21:02 +0200 From: Harald Welte To: David Miller Cc: Linux Netdev List , Netfilter Development Mailinglist , hno@marasystems.com Subject: [PATCH 2.6] iptables CONNMARK match+target Message-ID: <20041020222102.GO19899@sunbeam.de.gnumonks.org> Mail-Followup-To: Harald Welte , David Miller , Linux Netdev List , Netfilter Development Mailinglist , hno@marasystems.com Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Pk/CTwBz1VvfPIDp" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10559 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@netfilter.org Precedence: bulk X-list: netdev Content-Length: 16181 Lines: 472 --Pk/CTwBz1VvfPIDp Content-Type: multipart/mixed; boundary="HxQt9wRz9wbL5Edg" Content-Disposition: inline --HxQt9wRz9wbL5Edg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Dave! Since 2.6.9 is out, I'll be pushing new feature patches again. This is the first patch, adding something similar like nfmark, but on a per-conntrack (as opposed to per-skb) level. Very useful especially for asymmatric routing in combination with MASQUERADE, as often found on home DSL setups with dymamic IP address that also have e.g. a tunnel device with static IP. Signed-off-by: Henrik Nordstrom Signed-off-by: Harald Welte --=20 - Harald Welte http://www.netfilter.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie --HxQt9wRz9wbL5Edg Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="2.6.9-connmark.patch" Content-Transfer-Encoding: quoted-printable diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-test/include/linux/netfilter_ipv4/ip_conntrack.h linux-2.6.9-connmark/= include/linux/netfilter_ipv4/ip_conntrack.h --- linux-2.6.9-test/include/linux/netfilter_ipv4/ip_conntrack.h 2004-10-18= 23:55:21.000000000 +0200 +++ linux-2.6.9-connmark/include/linux/netfilter_ipv4/ip_conntrack.h 2004-1= 0-20 23:59:36.354104294 +0200 @@ -212,6 +212,10 @@ } nat; #endif /* CONFIG_IP_NF_NAT_NEEDED */ =20 +#if defined(CONFIG_IP_NF_CONNTRACK_MARK) + unsigned long mark; +#endif + /* Traversed often, so hopefully in different cacheline to top */ /* These are my tuples; original and reply */ struct ip_conntrack_tuple_hash tuplehash[IP_CT_DIR_MAX]; diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-test/include/linux/netfilter_ipv4/ipt_CONNMARK.h linux-2.6.9-connmark/= include/linux/netfilter_ipv4/ipt_CONNMARK.h --- linux-2.6.9-test/include/linux/netfilter_ipv4/ipt_CONNMARK.h 1970-01-01= 01:00:00.000000000 +0100 +++ linux-2.6.9-connmark/include/linux/netfilter_ipv4/ipt_CONNMARK.h 2004-1= 0-20 23:59:36.343104676 +0200 @@ -0,0 +1,25 @@ +#ifndef _IPT_CONNMARK_H_target +#define _IPT_CONNMARK_H_target + +/* Copyright (C) 2002,2004 MARA Systems AB + * by Henrik Nordstrom + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +enum { + IPT_CONNMARK_SET =3D 0, + IPT_CONNMARK_SAVE, + IPT_CONNMARK_RESTORE +}; + +struct ipt_connmark_target_info { + unsigned long mark; + unsigned long mask; + u_int8_t mode; +}; + +#endif /*_IPT_CONNMARK_H_target*/ diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-test/include/linux/netfilter_ipv4/ipt_connmark.h linux-2.6.9-connmark/= include/linux/netfilter_ipv4/ipt_connmark.h --- linux-2.6.9-test/include/linux/netfilter_ipv4/ipt_connmark.h 1970-01-01= 01:00:00.000000000 +0100 +++ linux-2.6.9-connmark/include/linux/netfilter_ipv4/ipt_connmark.h 2004-1= 0-20 23:59:36.345104606 +0200 @@ -0,0 +1,18 @@ +#ifndef _IPT_CONNMARK_H +#define _IPT_CONNMARK_H + +/* Copyright (C) 2002,2004 MARA Systems AB + * by Henrik Nordstrom + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +struct ipt_connmark_info { + unsigned long mark, mask; + u_int8_t invert; +}; + +#endif /*_IPT_CONNMARK_H*/ diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-test/net/ipv4/netfilter/Kconfig linux-2.6.9-connmark/net/ipv4/netfilte= r/Kconfig --- linux-2.6.9-test/net/ipv4/netfilter/Kconfig 2004-10-18 23:54:55.0000000= 00 +0200 +++ linux-2.6.9-connmark/net/ipv4/netfilter/Kconfig 2004-10-21 00:16:30.830= 850002 +0200 @@ -32,6 +32,14 @@ =20 If unsure, say `N'. =20 +config IP_NF_CONNTRACK_MARK + bool 'Connection mark tracking support' + help + This option enables support for connection marks, used by the + `CONNMARK' target and `connmark' match. Similar to the mark value + of packets, but this mark value is kept in the conntrack session + instead of the individual packets. +=09 config IP_NF_CT_PROTO_SCTP tristate 'SCTP protocol connection tracking support (EXPERIMENTAL)' depends on IP_NF_CONNTRACK && EXPERIMENTAL @@ -342,6 +350,17 @@ If you want to compile it as a module, say M here and read Documentation/modules.txt. If unsure, say `N'. =20 +config IP_NF_MATCH_CONNMARK + tristate 'Connection mark match support' + depends on IP_NF_CONNTRACK_MARK && IP_NF_IPTABLES + help + This option adds a `connmark' match, which allows you to match the + connection mark value previously set for the session by `CONNMARK'.=20 +=09 + If you want to compile it as a module, say M here and read + Documentation/modules.txt. The module will be called + ipt_connmark.o. If unsure, say `N'. + # `filter', generic and specific targets config IP_NF_FILTER tristate "Packet filtering" @@ -597,6 +616,18 @@ =20 To compile it as a module, choose M here. If unsure, say N. =20 +config IP_NF_TARGET_CONNMARK + tristate 'CONNMARK target support' + depends on IP_NF_CONNTRACK_MARK && IP_NF_MANGLE + help + This option adds a `CONNMARK' target, which allows one to manipulate + the connection mark value. Similar to the MARK target, but + affects the connection mark value rather than the packet mark value. +=09 + If you want to compile it as a module, say M here and read + Documentation/modules.txt. The module will be called + ipt_CONNMARK.o. If unsure, say `N'. + # raw + specific targets config IP_NF_RAW tristate 'raw table support (required for NOTRACK/TRACE)' diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-test/net/ipv4/netfilter/Makefile linux-2.6.9-connmark/net/ipv4/netfilt= er/Makefile --- linux-2.6.9-test/net/ipv4/netfilter/Makefile 2004-10-18 23:53:43.000000= 000 +0200 +++ linux-2.6.9-connmark/net/ipv4/netfilter/Makefile 2004-10-20 23:59:36.36= 8103807 +0200 @@ -61,6 +61,7 @@ obj-$(CONFIG_IP_NF_MATCH_LENGTH) +=3D ipt_length.o obj-$(CONFIG_IP_NF_MATCH_TTL) +=3D ipt_ttl.o obj-$(CONFIG_IP_NF_MATCH_STATE) +=3D ipt_state.o +obj-$(CONFIG_IP_NF_MATCH_CONNMARK) +=3D ipt_connmark.o obj-$(CONFIG_IP_NF_MATCH_CONNTRACK) +=3D ipt_conntrack.o obj-$(CONFIG_IP_NF_MATCH_TCPMSS) +=3D ipt_tcpmss.o obj-$(CONFIG_IP_NF_MATCH_REALM) +=3D ipt_realm.o @@ -81,6 +82,7 @@ obj-$(CONFIG_IP_NF_TARGET_CLASSIFY) +=3D ipt_CLASSIFY.o obj-$(CONFIG_IP_NF_NAT_SNMP_BASIC) +=3D ip_nat_snmp_basic.o obj-$(CONFIG_IP_NF_TARGET_LOG) +=3D ipt_LOG.o +obj-$(CONFIG_IP_NF_TARGET_CONNMARK) +=3D ipt_CONNMARK.o obj-$(CONFIG_IP_NF_TARGET_ULOG) +=3D ipt_ULOG.o obj-$(CONFIG_IP_NF_TARGET_TCPMSS) +=3D ipt_TCPMSS.o obj-$(CONFIG_IP_NF_TARGET_NOTRACK) +=3D ipt_NOTRACK.o diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-test/net/ipv4/netfilter/ip_conntrack_core.c linux-2.6.9-connmark/net/i= pv4/netfilter/ip_conntrack_core.c --- linux-2.6.9-test/net/ipv4/netfilter/ip_conntrack_core.c 2004-10-18 23:5= 3:05.000000000 +0200 +++ linux-2.6.9-connmark/net/ipv4/netfilter/ip_conntrack_core.c 2004-10-20 = 23:59:36.402102626 +0200 @@ -595,6 +595,9 @@ __set_bit(IPS_EXPECTED_BIT, &conntrack->status); conntrack->master =3D expected; expected->sibling =3D conntrack; +#if CONFIG_IP_NF_CONNTRACK_MARK + conntrack->mark =3D expected->expectant->mark; +#endif LIST_DELETE(&ip_conntrack_expect_list, expected); expected->expectant->expecting--; nf_conntrack_get(&master_ct(conntrack)->ct_general); diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-test/net/ipv4/netfilter/ip_conntrack_standalone.c linux-2.6.9-connmark= /net/ipv4/netfilter/ip_conntrack_standalone.c --- linux-2.6.9-test/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-10-1= 8 23:54:07.000000000 +0200 +++ linux-2.6.9-connmark/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-= 10-21 00:01:55.101282662 +0200 @@ -146,6 +146,11 @@ if (seq_printf(s, "[ASSURED] ")) return 1; =20 +#if defined(CONFIG_IP_NF_CONNTRACK_MARK) + if (seq_printf(s, "mark=3D%ld ", conntrack->mark)) + return 1; +#endif + if (seq_printf(s, "use=3D%u\n", atomic_read(&conntrack->ct_general.use))) return 1; =20 diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-test/net/ipv4/netfilter/ipt_CONNMARK.c linux-2.6.9-connmark/net/ipv4/n= etfilter/ipt_CONNMARK.c --- linux-2.6.9-test/net/ipv4/netfilter/ipt_CONNMARK.c 1970-01-01 01:00:00.= 000000000 +0100 +++ linux-2.6.9-connmark/net/ipv4/netfilter/ipt_CONNMARK.c 2004-10-20 23:59= :36.347104537 +0200 @@ -0,0 +1,118 @@ +/* This kernel module is used to modify the connection mark values, or + * to optionally restore the skb nfmark from the connection mark + * + * Copyright (C) 2002,2004 MARA Systems AB + * by Henrik Nordstrom + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 U= SA + */ +#include +#include +#include +#include + +MODULE_AUTHOR("Henrik Nordstrom "); +MODULE_DESCRIPTION("IP tables CONNMARK matching module"); +MODULE_LICENSE("GPL"); + +#include +#include +#include + +static unsigned int +target(struct sk_buff **pskb, + const struct net_device *in, + const struct net_device *out, + unsigned int hooknum, + const void *targinfo, + void *userinfo) +{ + const struct ipt_connmark_target_info *markinfo =3D targinfo; + unsigned long diff; + unsigned long nfmark; + unsigned long newmark; + + enum ip_conntrack_info ctinfo; + struct ip_conntrack *ct =3D ip_conntrack_get((*pskb), &ctinfo); + if (ct) { + switch(markinfo->mode) { + case IPT_CONNMARK_SET: + newmark =3D (ct->mark & ~markinfo->mask) | markinfo->mark; + if (newmark !=3D ct->mark) + ct->mark =3D newmark; + break; + case IPT_CONNMARK_SAVE: + newmark =3D (ct->mark & ~markinfo->mask) | ((*pskb)->nfmark & markinfo->= mask); + if (ct->mark !=3D newmark) + ct->mark =3D newmark; + break; + case IPT_CONNMARK_RESTORE: + nfmark =3D (*pskb)->nfmark; + diff =3D (ct->mark ^ nfmark & markinfo->mask); + if (diff !=3D 0) { + (*pskb)->nfmark =3D nfmark ^ diff; + (*pskb)->nfcache |=3D NFC_ALTERED; + } + break; + } + } + + return IPT_CONTINUE; +} + +static int +checkentry(const char *tablename, + const struct ipt_entry *e, + void *targinfo, + unsigned int targinfosize, + unsigned int hook_mask) +{ + struct ipt_connmark_target_info *matchinfo =3D targinfo; + if (targinfosize !=3D IPT_ALIGN(sizeof(struct ipt_connmark_target_info)))= { + printk(KERN_WARNING "CONNMARK: targinfosize %u !=3D %Zu\n", + targinfosize, + IPT_ALIGN(sizeof(struct ipt_connmark_target_info))); + return 0; + } + + if (matchinfo->mode =3D=3D IPT_CONNMARK_RESTORE) { + if (strcmp(tablename, "mangle") !=3D 0) { + printk(KERN_WARNING "CONNMARK: restore can only be called from \"man= gle\" table, not \"%s\"\n", tablename); + return 0; + } + } + + return 1; +} + +static struct ipt_target ipt_connmark_reg =3D { + .name =3D "CONNMARK", + .target =3D &target, + .checkentry =3D &checkentry, + .me =3D THIS_MODULE +}; + +static int __init init(void) +{ + return ipt_register_target(&ipt_connmark_reg); +} + +static void __exit fini(void) +{ + ipt_unregister_target(&ipt_connmark_reg); +} + +module_init(init); +module_exit(fini); diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-test/net/ipv4/netfilter/ipt_connmark.c linux-2.6.9-connmark/net/ipv4/n= etfilter/ipt_connmark.c --- linux-2.6.9-test/net/ipv4/netfilter/ipt_connmark.c 1970-01-01 01:00:00.= 000000000 +0100 +++ linux-2.6.9-connmark/net/ipv4/netfilter/ipt_connmark.c 2004-10-20 23:59= :36.349104467 +0200 @@ -0,0 +1,81 @@ +/* This kernel module matches connection mark values set by the + * CONNMARK target + * + * Copyright (C) 2002,2004 MARA Systems AB + * by Henrik Nordstrom + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 U= SA + */ + +#include +#include + +MODULE_AUTHOR("Henrik Nordstrom "); +MODULE_DESCRIPTION("IP tables connmark match module"); +MODULE_LICENSE("GPL"); + +#include +#include +#include + +static int +match(const struct sk_buff *skb, + const struct net_device *in, + const struct net_device *out, + const void *matchinfo, + int offset, + int *hotdrop) +{ + const struct ipt_connmark_info *info =3D matchinfo; + enum ip_conntrack_info ctinfo; + struct ip_conntrack *ct =3D ip_conntrack_get((struct sk_buff *)skb, &ctin= fo); + if (!ct) + return 0; + + return ((ct->mark & info->mask) =3D=3D info->mark) ^ info->invert; +} + +static int +checkentry(const char *tablename, + const struct ipt_ip *ip, + void *matchinfo, + unsigned int matchsize, + unsigned int hook_mask) +{ + if (matchsize !=3D IPT_ALIGN(sizeof(struct ipt_connmark_info))) + return 0; + + return 1; +} + +static struct ipt_match connmark_match =3D { + .name =3D "connmark", + .match =3D &match, + .checkentry =3D &checkentry, + .me =3D THIS_MODULE +}; + +static int __init init(void) +{ + return ipt_register_match(&connmark_match); +} + +static void __exit fini(void) +{ + ipt_unregister_match(&connmark_match); +} + +module_init(init); +module_exit(fini); --HxQt9wRz9wbL5Edg-- --Pk/CTwBz1VvfPIDp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBduTOXaXGVTD0i/8RAlVJAJ4tNUu0NhWF6wREt8FhXoV4ULgYzACgqXZP 6BVDb9ucy1qYrIuC8cuAeU0= =GFDy -----END PGP SIGNATURE----- --Pk/CTwBz1VvfPIDp-- From davem@davemloft.net Wed Oct 20 15:21:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 15:21:56 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KMLpCu002001 for ; Wed, 20 Oct 2004 15:21:51 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKOkT-0001c3-00; Wed, 20 Oct 2004 15:16:01 -0700 Date: Wed, 20 Oct 2004 15:16:01 -0700 From: "David S. Miller" To: Baruch Even Cc: buytenh@wantstofly.org, netdev@oss.sgi.com Subject: Re: way of figuring out total number of retransmitted packets on a TCP socket? Message-Id: <20041020151601.41b6fcbd.davem@davemloft.net> In-Reply-To: <1098278702.16002.7.camel@baruch.hamilton.local> References: <20041020130134.GC24757@xi.wantstofly.org> <1098278702.16002.7.camel@baruch.hamilton.local> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10560 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 441 Lines: 12 On Wed, 20 Oct 2004 14:25:02 +0100 Baruch Even wrote: > The web100 patch gives you that, but it's not part of the basic kernel. You don't need web100 for this simple statistic, see "tcpi_retrans" We also provide nearly all of the lost packet tracking stats in the form of "tcpi_unacked", "tcpi_sacked", "tcpi_lost", and "tcpi_fackets". In fact, web100 duplicates a lot of functionality provided already by tcp_diag :-) From jgarzik@pobox.com Wed Oct 20 15:34:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 15:34:10 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KMY4Ux002976 for ; Wed, 20 Oct 2004 15:34:05 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CKP1g-0001vK-QY; Wed, 20 Oct 2004 23:33:49 +0100 Message-ID: <4176E7BE.5020409@pobox.com> Date: Wed, 20 Oct 2004 18:33:34 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Olaf Hering CC: netdev@oss.sgi.com Subject: Re: netdev-2.6 queue updated References: <20041016010036.GA32213@havoc.gtf.org> <20041020174853.GA11659@suse.de> In-Reply-To: <20041020174853.GA11659@suse.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10561 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: 514 Lines: 23 Olaf Hering wrote: > On Fri, Oct 15, Jeff Garzik wrote: > > >> drivers/net/typhoon.c | 232 +++---- > > >>Jeff Garzik: >> o Hand-merge typhoon conflicts >> o [netdrvr eepro100] fix pci_iomap() args and info msg that follows >> o [netdrvr b44] update MODULE_AUTHORS >> o [netdrvr 8139cp] TSO support >> o [netdev] Remove no-op in-driver implementations of ->set_config() > > > Current Linus tree does not compile. Andrew already fixed. Thanks for reporting though... Jeff From buytenh@wantstofly.org Wed Oct 20 15:36:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 15:36:18 -0700 (PDT) Received: from xi.wantstofly.org (alephnull.demon.nl [212.238.201.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KMa22U003284 for ; Wed, 20 Oct 2004 15:36:03 -0700 Received: by xi.wantstofly.org (Postfix, from userid 500) id 7FA2C2B0ED; Thu, 21 Oct 2004 00:35:47 +0200 (MEST) Date: Thu, 21 Oct 2004 00:35:47 +0200 From: Lennert Buytenhek To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: way of figuring out total number of retransmitted packets on a TCP socket? Message-ID: <20041020223547.GJ29583@xi.wantstofly.org> References: <20041020130134.GC24757@xi.wantstofly.org> <20041020151448.51209278.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041020151448.51209278.davem@davemloft.net> User-Agent: Mutt/1.4.1i X-archive-position: 10562 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: buytenh@wantstofly.org Precedence: bulk X-list: netdev Content-Length: 2846 Lines: 75 On Wed, Oct 20, 2004 at 03:14:48PM -0700, David S. Miller wrote: > > I'm looking for a way of counting the total number of retransmitted packets > > sent on a TCP connection. I tried querying TCP_INFO:tcpi_retransmits, but > > that seems to be not the metric I'm looking for. > > > > Anyone got any ideas? (Apart from using tcpdump+tcptrace.) > > tcpi_retransmits only accounts for timeout based retransmits. Some places in the TCP stack reset tp->retransmits to zero, or to one. Is it supposed to reflect the current number of retransmitted packets in the network? > Retransmits which occur dynamically due to fast-retransmit > and other non-timeout based decisions are accounted for > in "tcpi_retrans", so that is probably the value you are > looking for. tcpi_retrans is taken from tp->retrans_out (looking at 2.6.8 here.) But that value gets set to zero in a lot of places in the networking as well, so it's probably not what I'm looking for either. This is what TCP_INFO looks like after a sample run where 1GB is pumped into the socket buffer, sleep(1) is done to let the dust settle and then stats are dumped (2.6.8 SMP sender and 2.6.8 UP receiver, gigabit ethernet over a cross cable): tcpi_state 1, ESTABLISHED tcpi_ca_state 0, CA_Open tcpi_retransmits 0 tcpi_probes 0 tcpi_backoff 0 tcpi_options 7 [TIMESTAMPS SACK WSCALE ] tcpi_snd_wscale 7 tcpi_rcv_wscale 7 tcpi_rto 208000 tcpi_ato 0 tcpi_snd_mss 1448 tcpi_rcv_mss 536 tcpi_unacked 0 tcpi_sacked 0 tcpi_lost 0 tcpi_retrans 0 tcpi_fackets 0 tcpi_last_data_sent 999 tcpi_last_ack_sent 0 tcpi_last_data_recv 3040239 tcpi_last_ack_recv 994 tcpi_pmtu 1500 tcpi_rcv_sstresh 5840 tcpi_rtt 8000 tcpi_rttvar 750 tcpi_snd_sstresh 64 tcpi_snd_cwnd 73 tcpi_advmss 1448 tcpi_reordering 3 But I'm sure that packets were retransmitted during this run, because I had a DROP rule in there for a few seconds: 00:27:09.904020 IP 10.10.10.3.60983 > 10.10.10.4.9999: . 18905849:18907297(1448) ack 1 win 46 00:27:10.327942 IP 10.10.10.3.60983 > 10.10.10.4.9999: . 18905849:18907297(1448) ack 1 win 46 00:27:11.175790 IP 10.10.10.3.60983 > 10.10.10.4.9999: . 18905849:18907297(1448) ack 1 win 46 00:27:12.871486 IP 10.10.10.3.60983 > 10.10.10.4.9999: . 18905849:18907297(1448) ack 1 win 46 00:27:16.262863 IP 10.10.10.3.60983 > 10.10.10.4.9999: . 18905849:18907297(1448) ack 1 win 46 cheers, Lennert From laforge@netfilter.org Wed Oct 20 15:38:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 15:38:54 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KMcjM1003720 for ; Wed, 20 Oct 2004 15:38:46 -0700 Received: from dsl-213-023-154-242.arcor-ip.net ([213.23.154.242] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1CKP6D-000368-8E; Thu, 21 Oct 2004 00:38:29 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1CKP6C-00072t-BT; Thu, 21 Oct 2004 00:38:28 +0200 Date: Thu, 21 Oct 2004 00:38:28 +0200 From: Harald Welte To: David Miller Cc: Linux Netdev List , Netfilter Development Mailinglist , lmb@suse.de Subject: [PATCH 2.6] iptables CLUSTERIP target Message-ID: <20041020223828.GP19899@sunbeam.de.gnumonks.org> Mail-Followup-To: Harald Welte , David Miller , Linux Netdev List , Netfilter Development Mailinglist , lmb@suse.de Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="p6hDAtPN9q+ZnUca" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10563 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@netfilter.org Precedence: bulk X-list: netdev Content-Length: 26189 Lines: 911 --p6hDAtPN9q+ZnUca Content-Type: multipart/mixed; boundary="OwXh6gFRjCd3qPCM" Content-Disposition: inline --OwXh6gFRjCd3qPCM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Dave! This is the second patch, adding the 'CLUSTERIP' target to iptables. It depends on the first 'CONNMARK' patch. This enables you to build a static load sharing cluster between multiple nodes - without the requirement to have a load balancer. It uses a series of [evil] tricks like replying with linklayer multicast addresses to ARP requests, and using CONNMARK for stateful blocking all traffic not intended for the local node. Apart from the usual netfilter-specific file additions and Kconfig/Makefile patches, this needs to export proc_file_operations in order to get the reference counting of certain data objects right. I hope this change is acceptable. Signed-off-by: Harald Welte --=20 - Harald Welte http://www.netfilter.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie --OwXh6gFRjCd3qPCM Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="2.6.9-clusterip.patch" Content-Transfer-Encoding: quoted-printable diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-connmark/fs/proc/generic.c linux-2.6.9-connmark-clusterip/fs/proc/gene= ric.c --- linux-2.6.9-connmark/fs/proc/generic.c 2004-10-18 23:55:29.000000000 +0= 200 +++ linux-2.6.9-connmark-clusterip/fs/proc/generic.c 2004-10-21 00:22:29.12= 3398903 +0200 @@ -34,7 +34,7 @@ return !memcmp(name, de->name, len); } =20 -static struct file_operations proc_file_operations =3D { +struct file_operations proc_file_operations =3D { .llseek =3D proc_file_lseek, .read =3D proc_file_read, .write =3D proc_file_write, diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-connmark/fs/proc/root.c linux-2.6.9-connmark-clusterip/fs/proc/root.c --- linux-2.6.9-connmark/fs/proc/root.c 2004-10-18 23:54:55.000000000 +0200 +++ linux-2.6.9-connmark-clusterip/fs/proc/root.c 2004-10-21 00:22:29.12439= 8868 +0200 @@ -162,3 +162,4 @@ EXPORT_SYMBOL(proc_net_stat); EXPORT_SYMBOL(proc_bus); EXPORT_SYMBOL(proc_root_driver); +EXPORT_SYMBOL(proc_file_operations); diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-connmark/include/linux/proc_fs.h linux-2.6.9-connmark-clusterip/includ= e/linux/proc_fs.h --- linux-2.6.9-connmark/include/linux/proc_fs.h 2004-10-18 23:55:36.000000= 000 +0200 +++ linux-2.6.9-connmark-clusterip/include/linux/proc_fs.h 2004-10-21 00:22= :29.125398833 +0200 @@ -117,6 +117,7 @@ extern int proc_readdir(struct file *, void *, filldir_t); extern struct dentry *proc_lookup(struct inode *, struct dentry *, struct = nameidata *); =20 +extern struct file_operations proc_file_operations; extern struct file_operations proc_kcore_operations; extern struct file_operations proc_kmsg_operations; extern struct file_operations ppc_htab_operations; diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-connmark/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h linux-2.6.9-conn= mark-clusterip/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h --- linux-2.6.9-connmark/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h 1970-= 01-01 01:00:00.000000000 +0100 +++ linux-2.6.9-connmark-clusterip/include/linux/netfilter_ipv4/ipt_CLUSTER= IP.h 2004-10-21 00:22:29.094399911 +0200 @@ -0,0 +1,32 @@ +#ifndef _IPT_CLUSTERIP_H_target +#define _IPT_CLUSTERIP_H_target + +enum clusterip_hashmode { + CLUSTERIP_HASHMODE_SIP =3D 0, + CLUSTERIP_HASHMODE_SIP_SPT, + CLUSTERIP_HASHMODE_SIP_SPT_DPT, +}; + +#define CLUSTERIP_HASHMODE_MAX CLUSTERIP_HASHMODE_SIP_SPT_DPT + +#define CLUSTERIP_MAX_NODES 8 + +#define CLUSTERIP_FLAG_NEW 0x00000001 + +struct clusterip_config; + +struct ipt_clusterip_tgt_info { + + u_int32_t flags; + struct clusterip_config *config; +=09 + /* only relevant for new ones */ + u_int8_t clustermac[6]; + u_int16_t num_total_nodes; + u_int16_t num_local_nodes; + u_int16_t local_nodes[CLUSTERIP_MAX_NODES]; + enum clusterip_hashmode hash_mode; + u_int32_t hash_initval; +}; + +#endif /*_IPT_CLUSTERIP_H_target*/ diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-connmark/net/ipv4/netfilter/Kconfig linux-2.6.9-connmark-clusterip/net= /ipv4/netfilter/Kconfig --- linux-2.6.9-connmark/net/ipv4/netfilter/Kconfig 2004-10-21 00:16:30.830= 850002 +0200 +++ linux-2.6.9-connmark-clusterip/net/ipv4/netfilter/Kconfig 2004-10-21 00= :30:17.802111752 +0200 @@ -628,6 +628,16 @@ Documentation/modules.txt. The module will be called ipt_CONNMARK.o. If unsure, say `N'. =20 +config IP_NF_TARGET_CLUSTERIP + tristate "CLUSTERIP target support (EXPERIMENTAL)" + depends on IP_NF_CONNTRACK_MARK && IP_NF_IPTABLES && EXPERIMENTAL + help + The CLUSTERIP target allows you to build load-balancing clusters of + network servers without having a dedicated load-balancing + router/server/switch. +=09 + To compile it as a module, choose M here. If unsure, say N. + # raw + specific targets config IP_NF_RAW tristate 'raw table support (required for NOTRACK/TRACE)' diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-connmark/net/ipv4/netfilter/Makefile linux-2.6.9-connmark-clusterip/ne= t/ipv4/netfilter/Makefile --- linux-2.6.9-connmark/net/ipv4/netfilter/Makefile 2004-10-20 23:59:36.36= 8103807 +0200 +++ linux-2.6.9-connmark-clusterip/net/ipv4/netfilter/Makefile 2004-10-21 0= 0:23:57.927312860 +0200 @@ -86,6 +86,7 @@ obj-$(CONFIG_IP_NF_TARGET_ULOG) +=3D ipt_ULOG.o obj-$(CONFIG_IP_NF_TARGET_TCPMSS) +=3D ipt_TCPMSS.o obj-$(CONFIG_IP_NF_TARGET_NOTRACK) +=3D ipt_NOTRACK.o +obj-$(CONFIG_IP_NF_TARGET_CLUSTERIP) +=3D ipt_CLUSTERIP.o =20 # generic ARP tables obj-$(CONFIG_IP_NF_ARPTABLES) +=3D arp_tables.o diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-connmark/net/ipv4/netfilter/ipt_CLUSTERIP.c linux-2.6.9-connmark-clust= erip/net/ipv4/netfilter/ipt_CLUSTERIP.c --- linux-2.6.9-connmark/net/ipv4/netfilter/ipt_CLUSTERIP.c 1970-01-01 01:0= 0:00.000000000 +0100 +++ linux-2.6.9-connmark-clusterip/net/ipv4/netfilter/ipt_CLUSTERIP.c 2004-= 10-21 00:35:03.690176796 +0200 @@ -0,0 +1,712 @@ +/* Cluster IP hashmark target=20 + * (C) 2003-2004 by Harald Welte + * based on ideas of Fabio Olive Leite + * + * Development of this code funded by SuSE Linux AG, http://www.suse.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include +#include + +#define CLUSTERIP_VERSION "0.5" + +#define DEBUG_CLUSTERIP + +#ifdef DEBUG_CLUSTERIP +#define DEBUGP printk +#else +#define DEBUGP +#endif + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Harald Welte "); +MODULE_DESCRIPTION("iptables target for CLUSTERIP"); + +struct clusterip_config { + struct list_head list; /* list of all configs */ + atomic_t refcount; /* reference count */ + + u_int32_t clusterip; /* the IP address */ + u_int8_t clustermac[ETH_ALEN]; /* the MAC address */ + struct net_device *dev; /* device */ + u_int16_t num_total_nodes; /* total number of nodes */ + u_int16_t num_local_nodes; /* number of local nodes */ + u_int16_t local_nodes[CLUSTERIP_MAX_NODES]; /* node number array */ + +#ifdef CONFIG_PROC_FS + struct proc_dir_entry *pde; /* proc dir entry */ +#endif + enum clusterip_hashmode hash_mode; /* which hashing mode */ + u_int32_t hash_initval; /* hash initialization */ +}; + +static LIST_HEAD(clusterip_configs); + +/* clusterip_lock protects the clusterip_configs list _AND_ the configurab= le + * data within all structurses (num_local_nodes, local_nodes[]) */ +DECLARE_RWLOCK(clusterip_lock); + +#ifdef CONFIG_PROC_FS +static struct file_operations clusterip_proc_fops; +static struct proc_dir_entry *clusterip_procdir; +static int clusterip_proc_open(struct inode *inode, struct file *file); +static int clusterip_proc_release(struct inode *inode, struct file *file); +static int clusterip_proc_read(char *buffer, char **start, off_t offset,= =20 + int length, int *eof, void *data); +static int clusterip_proc_write(struct file *file, const char *input,=20 + unsigned long size, void *data); + +#endif + +static inline void +clusterip_config_get(struct clusterip_config *c) { + atomic_inc(&c->refcount); +} + +static inline void +clusterip_config_put(struct clusterip_config *c) { + if (atomic_dec_and_test(&c->refcount)) { + WRITE_LOCK(&clusterip_lock); + list_del(&c->list); + WRITE_UNLOCK(&clusterip_lock); + dev_mc_delete(c->dev, c->clustermac, ETH_ALEN, 0); + dev_put(c->dev); + kfree(c); + } +} + + +static struct clusterip_config * +__clusterip_config_find(u_int32_t clusterip) +{ + struct list_head *pos; + + MUST_BE_READ_LOCKED(&clusterip_lock); + list_for_each(pos, &clusterip_configs) { + struct clusterip_config *c =3D list_entry(pos,=20 + struct clusterip_config, list); + if (c->clusterip =3D=3D clusterip) { + return c; + } + } + + return NULL; +} + +static inline struct clusterip_config * +clusterip_config_find_get(u_int32_t clusterip) +{ + struct clusterip_config *c; + + READ_LOCK(&clusterip_lock); + c =3D __clusterip_config_find(clusterip); + if (!c) { + READ_UNLOCK(&clusterip_lock); + return NULL; + } + atomic_inc(&c->refcount); + READ_UNLOCK(&clusterip_lock); + + return c; +} + +static struct clusterip_config * +clusterip_config_init(struct ipt_clusterip_tgt_info *i, u_int32_t ip, + struct net_device *dev) +{ + struct clusterip_config *c; + char buffer[16]; + + c =3D kmalloc(sizeof(*c), GFP_ATOMIC); + if (!c) + return NULL; + + memset(c, 0, sizeof(*c)); + c->dev =3D dev; + c->clusterip =3D ip; + memcpy(&c->clustermac, &i->clustermac, ETH_ALEN); + c->num_total_nodes =3D i->num_total_nodes; + c->num_local_nodes =3D i->num_local_nodes; + memcpy(&c->local_nodes, &i->local_nodes, sizeof(&c->local_nodes)); + c->hash_mode =3D i->hash_mode; + c->hash_initval =3D i->hash_initval; + atomic_set(&c->refcount, 1); + +#ifdef CONFIG_PROC_FS + /* create proc dir entry */ + sprintf(buffer, "%u.%u.%u.%u", NIPQUAD(ip)); + c->pde =3D create_proc_entry(buffer, 0, clusterip_procdir); + if (!c->pde) { + kfree(c); + return NULL; + } + c->pde->owner =3D THIS_MODULE; + c->pde->data =3D c; + c->pde->read_proc =3D clusterip_proc_read; + c->pde->write_proc =3D clusterip_proc_write; + c->pde->proc_fops =3D &clusterip_proc_fops; +#endif + + WRITE_LOCK(&clusterip_lock); + list_add(&c->list, &clusterip_configs); + WRITE_UNLOCK(&clusterip_lock); + + return c; +} + +static int +clusterip_add_node(struct clusterip_config *c, u_int16_t nodenum) +{ + int i; + + WRITE_LOCK(&clusterip_lock); + + if (c->num_local_nodes >=3D CLUSTERIP_MAX_NODES + || nodenum > CLUSTERIP_MAX_NODES) { + WRITE_UNLOCK(&clusterip_lock); + return 1; + } + + /* check if we alrady have this number in our array */ + for (i =3D 0; i < c->num_local_nodes; i++) { + if (c->local_nodes[i] =3D=3D nodenum) { + WRITE_UNLOCK(&clusterip_lock); + return 1; + } + } + + c->local_nodes[c->num_local_nodes++] =3D nodenum; + + WRITE_UNLOCK(&clusterip_lock); + return 0; +} + +static int +clusterip_del_node(struct clusterip_config *c, u_int16_t nodenum) +{ + int i; + + WRITE_LOCK(&clusterip_lock); + + if (c->num_local_nodes <=3D 1 || nodenum > CLUSTERIP_MAX_NODES) { + WRITE_UNLOCK(&clusterip_lock); + return 1; + } + =09 + for (i =3D 0; i < c->num_local_nodes; i++) { + if (c->local_nodes[i] =3D=3D nodenum) { + int size =3D sizeof(u_int16_t)*(c->num_local_nodes-(i+1)); + memmove(&c->local_nodes[i], &c->local_nodes[i+1], size); + c->num_local_nodes--; + WRITE_UNLOCK(&clusterip_lock); + return 0; + } + } + + WRITE_UNLOCK(&clusterip_lock); + return 1; +} + +static inline u_int32_t +clusterip_hashfn(struct sk_buff *skb, struct clusterip_config *config) +{ + struct iphdr *iph =3D skb->nh.iph; + unsigned long hashval; + u_int16_t sport, dport; + struct tcphdr *th; + struct udphdr *uh; + struct icmphdr *ih; + + switch (iph->protocol) { + case IPPROTO_TCP: + th =3D (void *)iph+iph->ihl*4; + sport =3D ntohs(th->source); + dport =3D ntohs(th->dest); + break; + case IPPROTO_UDP: + uh =3D (void *)iph+iph->ihl*4; + sport =3D ntohs(uh->source); + dport =3D ntohs(uh->dest); + break; + case IPPROTO_ICMP: + ih =3D (void *)iph+iph->ihl*4; + sport =3D ntohs(ih->un.echo.id); + dport =3D (ih->type<<8)|ih->code; + break; + default: + if (net_ratelimit()) { + printk(KERN_NOTICE "CLUSTERIP: unknown protocol `%u'\n", + iph->protocol); + } + sport =3D dport =3D 0; + } + + switch (config->hash_mode) { + case CLUSTERIP_HASHMODE_SIP: + hashval =3D jhash_1word(ntohl(iph->saddr), + config->hash_initval); + break; + case CLUSTERIP_HASHMODE_SIP_SPT: + hashval =3D jhash_2words(ntohl(iph->saddr), sport,=20 + config->hash_initval); + break; + case CLUSTERIP_HASHMODE_SIP_SPT_DPT: + hashval =3D jhash_3words(ntohl(iph->saddr), sport, dport, + config->hash_initval); + break; + default: + /* to make gcc happy */ + hashval =3D 0; + /* This cannot happen, unless the check function wasn't called + * at rule load time */ + printk("CLUSTERIP: unknown mode `%u'\n", config->hash_mode); + BUG(); + break; + } + + /* node numbers are 1..n, not 0..n */ + return ((hashval % config->num_total_nodes)+1); +} + +static inline int +clusterip_responsible(struct clusterip_config *config, u_int32_t hash) +{ + int i; + + READ_LOCK(&clusterip_lock); + + if (config->num_local_nodes =3D=3D 0) { + READ_UNLOCK(&clusterip_lock); + return 0; + } + + for (i =3D 0; i < config->num_local_nodes; i++) { + if (config->local_nodes[i] =3D=3D hash) { + READ_UNLOCK(&clusterip_lock); + return 1; + } + } + + READ_UNLOCK(&clusterip_lock); + + return 0; +} + +/***********************************************************************= =20 + * IPTABLES TARGET=20 + ***********************************************************************/ + +static unsigned int +target(struct sk_buff **pskb, + const struct net_device *in, + const struct net_device *out, + unsigned int hooknum, + const void *targinfo, + void *userinfo) +{ + const struct ipt_clusterip_tgt_info *cipinfo =3D targinfo; + enum ip_conntrack_info ctinfo; + struct ip_conntrack *ct =3D ip_conntrack_get((*pskb), &ctinfo); + u_int32_t hash; + + /* don't need to clusterip_config_get() here, since refcount + * is only decremented by destroy() - and ip_tables guarantees + * that the ->target() function isn't called after ->destroy() */ + + if (!ct) { + printk(KERN_ERR "CLUSTERIP: no conntrack!\n"); + /* FIXME: need to drop invalid ones, since replies + * to outgoing connections of other nodes will be=20 + * marked as INVALID */ + return NF_DROP; + } + + /* special case: ICMP error handling. conntrack distinguishes between + * error messages (RELATED) and information requests (see below) */ + if ((*pskb)->nh.iph->protocol =3D=3D IPPROTO_ICMP + && (ctinfo =3D=3D IP_CT_RELATED=20 + || ctinfo =3D=3D IP_CT_IS_REPLY+IP_CT_IS_REPLY)) + return IPT_CONTINUE; + + /* ip_conntrack_icmp guarantees us that we only have ICMP_ECHO,=20 + * TIMESTAMP, INFO_REQUEST or ADDRESS type icmp packets from here + * on, which all have an ID field [relevant for hashing]. */ + + hash =3D clusterip_hashfn(*pskb, cipinfo->config); + + switch (ctinfo) { + case IP_CT_NEW: + ct->mark =3D hash; + break; + case IP_CT_RELATED: + case IP_CT_RELATED+IP_CT_IS_REPLY: + /* FIXME: we don't handle expectations at the + * moment. they can arrive on a different node than + * the master connection (e.g. FTP passive mode) */ + case IP_CT_ESTABLISHED: + case IP_CT_ESTABLISHED+IP_CT_IS_REPLY: + break; + default: + break; + } + +#ifdef DEBUG_CLUSTERP + DUMP_TUPLE(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple); +#endif + DEBUGP("hash=3D%u ct_hash=3D%lu ", hash, ct->mark); + if (!clusterip_responsible(cipinfo->config, hash)) { + DEBUGP("not responsible\n"); + return NF_DROP; + } + DEBUGP("responsible\n"); + + /* despite being received via linklayer multicast, this is + * actually a unicast IP packet. TCP doesn't like PACKET_MULTICAST */ + (*pskb)->pkt_type =3D PACKET_HOST; + + return IPT_CONTINUE; +} + +static int +checkentry(const char *tablename, + const struct ipt_entry *e, + void *targinfo, + unsigned int targinfosize, + unsigned int hook_mask) +{ + struct ipt_clusterip_tgt_info *cipinfo =3D targinfo; + + struct clusterip_config *config; + + if (targinfosize !=3D IPT_ALIGN(sizeof(struct ipt_clusterip_tgt_info))) { + printk(KERN_WARNING "CLUSTERIP: targinfosize %u !=3D %Zu\n", + targinfosize, + IPT_ALIGN(sizeof(struct ipt_clusterip_tgt_info))); + return 0; + } + + if (cipinfo->hash_mode !=3D CLUSTERIP_HASHMODE_SIP && + cipinfo->hash_mode !=3D CLUSTERIP_HASHMODE_SIP_SPT && + cipinfo->hash_mode !=3D CLUSTERIP_HASHMODE_SIP_SPT_DPT) { + printk(KERN_WARNING "CLUSTERIP: unknown mode `%u'\n", + cipinfo->hash_mode); + return 0; + + } + if (e->ip.dmsk.s_addr !=3D 0xffffffff + || e->ip.dst.s_addr =3D=3D 0) { + printk(KERN_ERR "CLUSTERIP: Please specify destination IP\n"); + return 0; + } + + /* FIXME: further sanity checks */ + + config =3D clusterip_config_find_get(e->ip.dst.s_addr); + if (!config) { + if (!(cipinfo->flags & CLUSTERIP_FLAG_NEW)) { + printk(KERN_WARNING "CLUSTERIP: no config found for %u.%u.%u.%u, need '= new'\n", NIPQUAD(e->ip.dst.s_addr)); + return 0; + } else { + struct net_device *dev; + + if (e->ip.iniface[0] =3D=3D '\0') { + printk(KERN_WARNING "CLUSTERIP: Please specify an interface name\n"); + return 0; + } + + dev =3D dev_get_by_name(e->ip.iniface); + if (!dev) { + printk(KERN_WARNING "CLUSTERIP: no such interface %s\n", e->ip.iniface= ); + return 0; + } + + config =3D clusterip_config_init(cipinfo,=20 + e->ip.dst.s_addr, dev); + if (!config) { + printk(KERN_WARNING "CLUSTERIP: cannot allocate config\n"); + dev_put(dev); + return 0; + } + dev_mc_add(config->dev,config->clustermac, ETH_ALEN, 0); + } + } + + cipinfo->config =3D config; + + return 1; +} + +/* drop reference count of cluster config when rule is deleted */ +static void destroy(void *matchinfo, unsigned int matchinfosize) +{ + struct ipt_clusterip_tgt_info *cipinfo =3D matchinfo; + + /* we first remove the proc entry and then drop the reference + * count. In case anyone still accesses the file, the open/close + * functions are also incrementing the refcount on their own */ +#ifdef CONFIG_PROC_FS + remove_proc_entry(cipinfo->config->pde->name, + cipinfo->config->pde->parent); +#endif + clusterip_config_put(cipinfo->config); +} + +static struct ipt_target clusterip_tgt =3D {=20 + .name =3D "CLUSTERIP", + .target =3D &target,=20 + .checkentry =3D &checkentry,=20 + .destroy =3D &destroy, + .me =3D THIS_MODULE +}; + + +/***********************************************************************= =20 + * ARP MANGLING CODE=20 + ***********************************************************************/ + +/* hardcoded for 48bit ethernet and 32bit ipv4 addresses */ +struct arp_payload { + u_int8_t src_hw[ETH_ALEN]; + u_int32_t src_ip; + u_int8_t dst_hw[ETH_ALEN]; + u_int32_t dst_ip; +} __attribute__ ((packed)); + +#ifdef CLUSTERIP_DEBUG +static void arp_print(struct arp_payload *payload)=20 +{ +#define HBUFFERLEN 30 + char hbuffer[HBUFFERLEN]; + int j,k; + const char hexbuf[]=3D "0123456789abcdef"; + + for (k=3D0, j=3D0; k < HBUFFERLEN-3 && j < ETH_ALEN; j++) { + hbuffer[k++]=3Dhexbuf[(payload->src_hw[j]>>4)&15]; + hbuffer[k++]=3Dhexbuf[payload->src_hw[j]&15]; + hbuffer[k++]=3D':'; + } + hbuffer[--k]=3D'\0'; + + printk("src %u.%u.%u.%u@%s, dst %u.%u.%u.%u\n",=20 + NIPQUAD(payload->src_ip), hbuffer, + NIPQUAD(payload->dst_ip)); +} +#endif + +static unsigned int +arp_mangle(unsigned int hook, + struct sk_buff **pskb, + const struct net_device *in, + const struct net_device *out, + int (*okfn)(struct sk_buff *)) +{ + struct arphdr *arp =3D (*pskb)->nh.arph; + struct arp_payload *payload; + struct clusterip_config *c; + + /* we don't care about non-ethernet and non-ipv4 ARP */ + if (arp->ar_hrd !=3D htons(ARPHRD_ETHER) + || arp->ar_pro !=3D htons(ETH_P_IP) + || arp->ar_pln !=3D 4 || arp->ar_hln !=3D ETH_ALEN) + return NF_ACCEPT; + + /* we only want to mangle arp replies */ + if (arp->ar_op !=3D htons(ARPOP_REPLY)) + return NF_ACCEPT; + + payload =3D (void *)(arp+1); + + /* if there is no clusterip configuration for the arp reply's=20 + * source ip, we don't want to mangle it */ + c =3D clusterip_config_find_get(payload->src_ip); + if (!c) + return NF_ACCEPT; + + /* normally the linux kernel always replies to arp queries of=20 + * addresses on different interfacs. However, in the CLUSTERIP case + * this wouldn't work, since we didn't subscribe the mcast group on + * other interfaces */ + if (c->dev !=3D out) { + DEBUGP("CLUSTERIP: not mangling arp reply on different " + "interface: cip'%s'-skb'%s'\n", c->dev->name, out->name); + clusterip_config_put(c); + return NF_ACCEPT; + } + + /* mangle reply hardware address */ + memcpy(payload->src_hw, c->clustermac, arp->ar_hln); + +#ifdef CLUSTERIP_DEBUG + DEBUGP(KERN_DEBUG "CLUSTERIP mangled arp reply: "); + arp_print(payload); +#endif + + clusterip_config_put(c); + + return NF_ACCEPT; +} + +static struct nf_hook_ops cip_arp_ops =3D { + .hook =3D arp_mangle, + .pf =3D NF_ARP, + .hooknum =3D NF_ARP_OUT, + .priority =3D -1 +}; + +/***********************************************************************= =20 + * PROC DIR HANDLING=20 + ***********************************************************************/ + +#ifdef CONFIG_PROC_FS + +static int clusterip_proc_open(struct inode *inode, struct file *file) +{ + struct proc_dir_entry *pde =3D PDE(inode); + struct clusterip_config *c =3D pde->data; + + clusterip_config_get(c); + + return 0; +} + +static int clusterip_proc_release(struct inode *inode, struct file *file) +{ + struct proc_dir_entry *pde =3D PDE(inode); + struct clusterip_config *c =3D pde->data; + + clusterip_config_put(c); + + return 0; +} + +static int=20 +clusterip_proc_read(char *buffer, char **start, off_t offset, int length,= =20 + int *eof, void *data) +{ + struct clusterip_config *c =3D data; + int i, len =3D 0; + + READ_LOCK(&clusterip_lock); + for (i =3D 0; i < c->num_local_nodes; i++) { + len +=3D sprintf(buffer+len, "%u,", c->local_nodes[i]); + } + READ_UNLOCK(&clusterip_lock); + + if (len >=3D 1) + *(buffer+len-1) =3D '\n'; +=09 + if (length >=3D len) + *eof =3D 1; + + return len; +} + +static int=20 +clusterip_proc_write(struct file *file, const char *input,=20 + unsigned long size, void *data) +{ + #define PROC_WRITELEN 10 + char buffer[PROC_WRITELEN+1]; + struct clusterip_config *c =3D data; + unsigned long nodenum; + + if (copy_from_user(buffer, input, PROC_WRITELEN)) + return -EFAULT; + + if (*buffer =3D=3D '+') { + nodenum =3D simple_strtoul(buffer+1, NULL, 10); + if (clusterip_add_node(c, nodenum)) + return -ENOMEM; + } else if (*buffer =3D=3D '-') { + nodenum =3D simple_strtoul(buffer+1, NULL, 10); + if (clusterip_del_node(c, nodenum)) + return -ENOENT; + } else + return -EIO; + + return size; +} +#endif /* CONFIG_PROC_FS */ + +static int init_or_cleanup(int fini) +{ + int ret; + + if (fini) + goto cleanup; + + if (ipt_register_target(&clusterip_tgt)) { + ret =3D -EINVAL; + goto cleanup_none; + } + + if (nf_register_hook(&cip_arp_ops) < 0) { + ret =3D -EINVAL; + goto cleanup_target; + } + +#ifdef CONFIG_PROC_FS + memcpy(&clusterip_proc_fops, &proc_file_operations, sizeof(clusterip_proc= _fops)); + clusterip_proc_fops.owner =3D THIS_MODULE; + clusterip_proc_fops.open =3D clusterip_proc_open; + clusterip_proc_fops.release =3D clusterip_proc_release; + clusterip_procdir =3D proc_mkdir("ipt_CLUSTERIP", proc_net); + if (!clusterip_procdir) { + printk(KERN_ERR "CLUSTERIP: Unable to proc dir entry\n"); + ret =3D -ENOMEM; + goto cleanup_hook; + } +#endif /* CONFIG_PROC_FS */ + + printk(KERN_NOTICE "ClusterIP Version %s loaded successfully\n", + CLUSTERIP_VERSION); + + return 0; + +cleanup: + printk(KERN_NOTICE "ClusterIP Version %s unloading\n", + CLUSTERIP_VERSION); +#ifdef CONFIG_PROC_FS + remove_proc_entry(clusterip_procdir->name, clusterip_procdir->parent); +#endif +cleanup_hook: + nf_unregister_hook(&cip_arp_ops); +cleanup_target: + ipt_unregister_target(&clusterip_tgt); +cleanup_none: + return -EINVAL; +} + +static int __init init(void) +{ + return init_or_cleanup(0); +} + +static void __exit fini(void) +{ + init_or_cleanup(1); +} + +module_init(init); +module_exit(fini); --OwXh6gFRjCd3qPCM-- --p6hDAtPN9q+ZnUca Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBdujkXaXGVTD0i/8RAnjYAKCMLgEkH3elU5FsxlIZO4IQvGJNvACeK8aw IR9pK46UUs3HAGbg03KmkBI= =Lp0Y -----END PGP SIGNATURE----- --p6hDAtPN9q+ZnUca-- From laforge@netfilter.org Wed Oct 20 15:45:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 15:45:37 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KMjQv3004163 for ; Wed, 20 Oct 2004 15:45:28 -0700 Received: from dsl-213-023-154-242.arcor-ip.net ([213.23.154.242] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1CKPCf-0003K8-Lp; Thu, 21 Oct 2004 00:45:09 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1CKPCc-00073d-M8; Thu, 21 Oct 2004 00:45:06 +0200 Date: Thu, 21 Oct 2004 00:45:06 +0200 From: Harald Welte To: David Miller Cc: Linux Netdev List , Netfilter Development Mailinglist , Markus Hennig , Gert Hansen Subject: [PATCH 2.6] iptables hashlimit match Message-ID: <20041020224506.GQ19899@sunbeam.de.gnumonks.org> Mail-Followup-To: Harald Welte , David Miller , Linux Netdev List , Netfilter Development Mailinglist , Markus Hennig , Gert Hansen Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="v6YRErhBvjoBjrPV" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10564 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@netfilter.org Precedence: bulk X-list: netdev Content-Length: 25170 Lines: 881 --v6YRErhBvjoBjrPV Content-Type: multipart/mixed; boundary="nHJAUhyIZkPvF01C" Content-Disposition: inline --nHJAUhyIZkPvF01C Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Dave! This is the third (and last, for now) patch, adding the 'hashlimit' match to iptables. It was previously known as 'dstlimit', but has now been generalized one step further. Please apply, thanks. Signed-off-by: Harald Welte --=20 - Harald Welte http://www.netfilter.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie --nHJAUhyIZkPvF01C Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="2.6.9-hashlimit.patch" Content-Transfer-Encoding: quoted-printable diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-connmark-clusterip/include/linux/netfilter_ipv4/ipt_hashlimit.h linux-= 2.6.9-connmark-clusterip-hashlimit/include/linux/netfilter_ipv4/ipt_hashlim= it.h --- linux-2.6.9-connmark-clusterip/include/linux/netfilter_ipv4/ipt_hashlim= it.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.9-connmark-clusterip-hashlimit/include/linux/netfilter_ipv4/i= pt_hashlimit.h 2004-10-21 00:40:01.746818968 +0200 @@ -0,0 +1,40 @@ +#ifndef _IPT_HASHLIMIT_H +#define _IPT_HASHLIMIT_H + +/* timings are in milliseconds. */ +#define IPT_HASHLIMIT_SCALE 10000 +/* 1/10,000 sec period =3D> max of 10,000/sec. Min rate is then 429490 + seconds, or one every 59 hours. */ + +/* details of this structure hidden by the implementation */ +struct ipt_hashlimit_htable; + +#define IPT_HASHLIMIT_HASH_DIP 0x0001 +#define IPT_HASHLIMIT_HASH_DPT 0x0002 +#define IPT_HASHLIMIT_HASH_SIP 0x0004 +#define IPT_HASHLIMIT_HASH_SPT 0x0008 + +struct hashlimit_cfg { + u_int32_t mode; /* bitmask of IPT_HASHLIMIT_HASH_* */ + u_int32_t avg; /* Average secs between packets * scale */ + u_int32_t burst; /* Period multiplier for upper limit. */ + + /* user specified */ + u_int32_t size; /* how many buckets */ + u_int32_t max; /* max number of entries */ + u_int32_t gc_interval; /* gc interval */ + u_int32_t expire; /* when do entries expire? */ +}; + +struct ipt_hashlimit_info { + char name [IFNAMSIZ]; /* name */ + struct hashlimit_cfg cfg; + struct ipt_hashlimit_htable *hinfo; + + /* Used internally by the kernel */ + union { + void *ptr; + struct ipt_hashlimit_info *master; + } u; +}; +#endif /*_IPT_HASHLIMIT_H*/ diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-connmark-clusterip/net/ipv4/netfilter/Kconfig linux-2.6.9-connmark-clu= sterip-hashlimit/net/ipv4/netfilter/Kconfig --- linux-2.6.9-connmark-clusterip/net/ipv4/netfilter/Kconfig 2004-10-21 00= :30:17.802111752 +0200 +++ linux-2.6.9-connmark-clusterip-hashlimit/net/ipv4/netfilter/Kconfig 200= 4-10-21 00:41:00.931762220 +0200 @@ -361,6 +361,20 @@ Documentation/modules.txt. The module will be called ipt_connmark.o. If unsure, say `N'. =20 +config IP_NF_MATCH_HASHLIMIT + tristate 'hashlimit match support' + depends on IP_NF_IPTABLES + help + This option adds a new iptables `hashlimit' match. =20 + + As opposed to `limit', this match dynamically crates a hash table + of limit buckets, based on your selection of source/destination + ip addresses and/or ports. + + It enables you to express policies like `10kpps for any given + destination IP' or `500pps from any given source IP' with a single + IPtables rule. + # `filter', generic and specific targets config IP_NF_FILTER tristate "Packet filtering" diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-connmark-clusterip/net/ipv4/netfilter/Makefile linux-2.6.9-connmark-cl= usterip-hashlimit/net/ipv4/netfilter/Makefile --- linux-2.6.9-connmark-clusterip/net/ipv4/netfilter/Makefile 2004-10-21 0= 0:23:57.927312860 +0200 +++ linux-2.6.9-connmark-clusterip-hashlimit/net/ipv4/netfilter/Makefile 20= 04-10-21 00:40:01.760818481 +0200 @@ -46,6 +46,7 @@ # matches obj-$(CONFIG_IP_NF_MATCH_HELPER) +=3D ipt_helper.o obj-$(CONFIG_IP_NF_MATCH_LIMIT) +=3D ipt_limit.o +obj-$(CONFIG_IP_NF_MATCH_HASHLIMIT) +=3D ipt_hashlimit.o obj-$(CONFIG_IP_NF_MATCH_SCTP) +=3D ipt_sctp.o obj-$(CONFIG_IP_NF_MATCH_MARK) +=3D ipt_mark.o obj-$(CONFIG_IP_NF_MATCH_MAC) +=3D ipt_mac.o diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-connmark-clusterip/net/ipv4/netfilter/ipt_hashlimit.c linux-2.6.9-conn= mark-clusterip-hashlimit/net/ipv4/netfilter/ipt_hashlimit.c --- linux-2.6.9-connmark-clusterip/net/ipv4/netfilter/ipt_hashlimit.c 1970-= 01-01 01:00:00.000000000 +0100 +++ linux-2.6.9-connmark-clusterip-hashlimit/net/ipv4/netfilter/ipt_hashlim= it.c 2004-10-21 00:41:45.689206844 +0200 @@ -0,0 +1,716 @@ +/* iptables match extension to limit the number of packets per second + * seperately for each hashbucket (sourceip/sourceport/dstip/dstport) + * + * (C) 2003-2004 by Harald Welte + * + * $Id: ipt_hashlimit.c 3244 2004-10-20 16:24:29Z laforge@netfilter.org $ + * + * Development of this code was funded by Astaro AG, http://www.astaro.com/ + * + * based on ipt_limit.c by: + * J=E9r=F4me de Vivie + * Herv=E9 Eychenne + * Rusty Russell + * + * The general idea is to create a hash table for every dstip and have a + * seperate limit counter per tuple. This way you can do something like '= limit + * the number of syn packets for each of my internal addresses. + * + * Ideally this would just be implemented as a general 'hash' match, which= would + * allow us to attach any iptables target to it's hash buckets. But this = is + * not possible in the current iptables architecture. As always, pkttable= s for + * 2.7.x will help ;) + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define ASSERT_READ_LOCK(x)=20 +#define ASSERT_WRITE_LOCK(x)=20 +#include +#include + +#include +#include + +/* FIXME: this is just for IP_NF_ASSERRT */ +#include + +#define MS2JIFFIES(x) ((x*HZ)/1000) + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Harald Welte "); +MODULE_DESCRIPTION("iptables match for limiting per hash-bucket"); + +/* need to declare this at the top */ +static struct proc_dir_entry *hashlimit_procdir; +static struct file_operations dl_file_ops; + +/* hash table crap */ + +struct dsthash_dst { + u_int32_t src_ip; + u_int32_t dst_ip; + /* ports have to be consecutive !!! */ + u_int16_t src_port; + u_int16_t dst_port; +}; + +struct dsthash_ent { + /* static / read-only parts in the beginning */ + struct list_head list; + struct dsthash_dst dst; + + /* modified structure members in the end */ + unsigned long expires; /* precalculated expiry time */ + struct { + unsigned long prev; /* last modification */ + u_int32_t credit; + u_int32_t credit_cap, cost; + } rateinfo; +}; + +struct ipt_hashlimit_htable { + struct list_head list; /* global list of all htables */ + atomic_t use; + + struct hashlimit_cfg cfg; /* config */ + + /* used internally */ + spinlock_t lock; /* lock for list_head */ + u_int32_t rnd; /* random seed for hash */ + struct timer_list timer; /* timer for gc */ + atomic_t count; /* number entries in table */ + + /* seq_file stuff */ + struct proc_dir_entry *pde; + + struct list_head hash[0]; /* hashtable itself */ +}; + +DECLARE_RWLOCK(hashlimit_lock); /* protects htables list */ +static LIST_HEAD(hashlimit_htables); +static kmem_cache_t *hashlimit_cachep; + +static inline int dst_cmp(const struct dsthash_ent *ent, struct dsthash_ds= t *b) +{ + return (ent->dst.dst_ip =3D=3D b->dst_ip=20 + && ent->dst.dst_port =3D=3D b->dst_port + && ent->dst.src_port =3D=3D b->src_port + && ent->dst.src_ip =3D=3D b->src_ip); +} + +static inline u_int32_t +hash_dst(const struct ipt_hashlimit_htable *ht, const struct dsthash_dst *= dst) +{ + return (jhash_3words(dst->dst_ip, (dst->dst_port<<16 & dst->src_port),=20 + dst->src_ip, ht->rnd) % ht->cfg.size); +} + +static inline struct dsthash_ent * +__dsthash_find(const struct ipt_hashlimit_htable *ht, struct dsthash_dst *= dst) +{ + struct dsthash_ent *ent; + u_int32_t hash =3D hash_dst(ht, dst); + MUST_BE_LOCKED(&ht->lock); + ent =3D LIST_FIND(&ht->hash[hash], dst_cmp, struct dsthash_ent *, dst); + return ent; +} + +/* allocate dsthash_ent, initialize dst, put in htable and lock it */ +static struct dsthash_ent * +__dsthash_alloc_init(struct ipt_hashlimit_htable *ht, struct dsthash_dst *= dst) +{ + struct dsthash_ent *ent; + + /* initialize hash with random val at the time we allocate + * the first hashtable entry */ + if (!ht->rnd) + get_random_bytes(&ht->rnd, 4); + + if (ht->cfg.max && + atomic_read(&ht->count) >=3D ht->cfg.max) { + /* FIXME: do something. question is what.. */ + if (net_ratelimit()) + printk(KERN_WARNING=20 + "ipt_hashlimit: max count of %u reached\n",=20 + ht->cfg.max); + return NULL; + } + + ent =3D kmem_cache_alloc(hashlimit_cachep, GFP_ATOMIC); + if (!ent) { + if (net_ratelimit()) + printk(KERN_ERR=20 + "ipt_hashlimit: can't allocate dsthash_ent\n"); + return NULL; + } + + atomic_inc(&ht->count); + + ent->dst.dst_ip =3D dst->dst_ip; + ent->dst.dst_port =3D dst->dst_port; + ent->dst.src_ip =3D dst->src_ip; + ent->dst.src_port =3D dst->src_port; + + list_add(&ent->list, &ht->hash[hash_dst(ht, dst)]); + + return ent; +} + +static inline void=20 +__dsthash_free(struct ipt_hashlimit_htable *ht, struct dsthash_ent *ent) +{ + MUST_BE_LOCKED(&ht->lock); + + list_del(&ent->list); + kmem_cache_free(hashlimit_cachep, ent); + atomic_dec(&ht->count); +} +static void htable_gc(unsigned long htlong); + +static int htable_create(struct ipt_hashlimit_info *minfo) +{ + int i; + unsigned int size; + struct ipt_hashlimit_htable *hinfo; + + if (minfo->cfg.size) + size =3D minfo->cfg.size; + else { + size =3D (((num_physpages << PAGE_SHIFT) / 16384) + / sizeof(struct list_head)); + if (num_physpages > (1024 * 1024 * 1024 / PAGE_SIZE)) + size =3D 8192; + if (size < 16) + size =3D 16; + } + /* FIXME: don't use vmalloc() here or anywhere else -HW */ + hinfo =3D vmalloc(sizeof(struct ipt_hashlimit_htable) + + (sizeof(struct list_head) * size)); + if (!hinfo) { + printk(KERN_ERR "ipt_hashlimit: Unable to create hashtable\n"); + return -1; + } + minfo->hinfo =3D hinfo; + + /* copy match config into hashtable config */ + memcpy(&hinfo->cfg, &minfo->cfg, sizeof(hinfo->cfg)); + hinfo->cfg.size =3D size; + if (!hinfo->cfg.max) + hinfo->cfg.max =3D 8 * hinfo->cfg.size; + else if (hinfo->cfg.max < hinfo->cfg.size) + hinfo->cfg.max =3D hinfo->cfg.size; + + for (i =3D 0; i < hinfo->cfg.size; i++) + INIT_LIST_HEAD(&hinfo->hash[i]); + + atomic_set(&hinfo->count, 0); + atomic_set(&hinfo->use, 1); + hinfo->rnd =3D 0; + hinfo->lock =3D SPIN_LOCK_UNLOCKED; + hinfo->pde =3D create_proc_entry(minfo->name, 0, hashlimit_procdir); + if (!hinfo->pde) { + vfree(hinfo); + return -1; + } + hinfo->pde->proc_fops =3D &dl_file_ops; + hinfo->pde->data =3D hinfo; + + init_timer(&hinfo->timer); + hinfo->timer.expires =3D jiffies + MS2JIFFIES(hinfo->cfg.gc_interval); + hinfo->timer.data =3D (unsigned long )hinfo; + hinfo->timer.function =3D htable_gc; + add_timer(&hinfo->timer); + + WRITE_LOCK(&hashlimit_lock); + list_add(&hinfo->list, &hashlimit_htables); + WRITE_UNLOCK(&hashlimit_lock); + + return 0; +} + +static int select_all(struct ipt_hashlimit_htable *ht, struct dsthash_ent = *he) +{ + return 1; +} + +static int select_gc(struct ipt_hashlimit_htable *ht, struct dsthash_ent *= he) +{ + return (jiffies >=3D he->expires); +} + +static void htable_selective_cleanup(struct ipt_hashlimit_htable *ht, + int (*select)(struct ipt_hashlimit_htable *ht,=20 + struct dsthash_ent *he)) +{ + int i; + + IP_NF_ASSERT(ht->cfg.size && ht->cfg.max); + + /* lock hash table and iterate over it */ + LOCK_BH(&ht->lock); + for (i =3D 0; i < ht->cfg.size; i++) { + struct dsthash_ent *dh, *n; + list_for_each_entry_safe(dh, n, &ht->hash[i], list) { + if ((*select)(ht, dh)) + __dsthash_free(ht, dh); + } + } + UNLOCK_BH(&ht->lock); +} + +/* hash table garbage collector, run by timer */ +static void htable_gc(unsigned long htlong) +{ + struct ipt_hashlimit_htable *ht =3D (struct ipt_hashlimit_htable *)htlong; + + htable_selective_cleanup(ht, select_gc); + + /* re-add the timer accordingly */ + ht->timer.expires =3D jiffies + MS2JIFFIES(ht->cfg.gc_interval); + add_timer(&ht->timer); +} + +static void htable_destroy(struct ipt_hashlimit_htable *hinfo) +{ + /* remove timer, if it is pending */ + if (timer_pending(&hinfo->timer)) + del_timer(&hinfo->timer); + + /* remove proc entry */ + remove_proc_entry(hinfo->pde->name, hashlimit_procdir); + + htable_selective_cleanup(hinfo, select_all); + vfree(hinfo); +} + +static struct ipt_hashlimit_htable *htable_find_get(char *name) +{ + struct ipt_hashlimit_htable *hinfo; + + READ_LOCK(&hashlimit_lock); + list_for_each_entry(hinfo, &hashlimit_htables, list) { + if (!strcmp(name, hinfo->pde->name)) { + atomic_inc(&hinfo->use); + READ_UNLOCK(&hashlimit_lock); + return hinfo; + } + } + READ_UNLOCK(&hashlimit_lock); + + return NULL; +} + +static void htable_put(struct ipt_hashlimit_htable *hinfo) +{ + if (atomic_dec_and_test(&hinfo->use)) { + WRITE_LOCK(&hashlimit_lock); + list_del(&hinfo->list); + WRITE_UNLOCK(&hashlimit_lock); + htable_destroy(hinfo); + } +} + + +/* The algorithm used is the Simple Token Bucket Filter (TBF) + * see net/sched/sch_tbf.c in the linux source tree + */ + +/* Rusty: This is my (non-mathematically-inclined) understanding of + this algorithm. The `average rate' in jiffies becomes your initial + amount of credit `credit' and the most credit you can ever have + `credit_cap'. The `peak rate' becomes the cost of passing the + test, `cost'. + + `prev' tracks the last packet hit: you gain one credit per jiffy. + If you get credit balance more than this, the extra credit is + discarded. Every time the match passes, you lose `cost' credits; + if you don't have that many, the test fails. + + See Alexey's formal explanation in net/sched/sch_tbf.c. + + To get the maximum range, we multiply by this factor (ie. you get N + credits per jiffy). We want to allow a rate as low as 1 per day + (slowest userspace tool allows), which means + CREDITS_PER_JIFFY*HZ*60*60*24 < 2^32 ie. +*/ +#define MAX_CPJ (0xFFFFFFFF / (HZ*60*60*24)) + +/* Repeated shift and or gives us all 1s, final shift and add 1 gives + * us the power of 2 below the theoretical max, so GCC simply does a + * shift. */ +#define _POW2_BELOW2(x) ((x)|((x)>>1)) +#define _POW2_BELOW4(x) (_POW2_BELOW2(x)|_POW2_BELOW2((x)>>2)) +#define _POW2_BELOW8(x) (_POW2_BELOW4(x)|_POW2_BELOW4((x)>>4)) +#define _POW2_BELOW16(x) (_POW2_BELOW8(x)|_POW2_BELOW8((x)>>8)) +#define _POW2_BELOW32(x) (_POW2_BELOW16(x)|_POW2_BELOW16((x)>>16)) +#define POW2_BELOW32(x) ((_POW2_BELOW32(x)>>1) + 1) + +#define CREDITS_PER_JIFFY POW2_BELOW32(MAX_CPJ) + +/* Precision saver. */ +static inline u_int32_t +user2credits(u_int32_t user) +{ + /* If multiplying would overflow... */ + if (user > 0xFFFFFFFF / (HZ*CREDITS_PER_JIFFY)) + /* Divide first. */ + return (user / IPT_HASHLIMIT_SCALE) * HZ * CREDITS_PER_JIFFY; + + return (user * HZ * CREDITS_PER_JIFFY) / IPT_HASHLIMIT_SCALE; +} + +static inline void rateinfo_recalc(struct dsthash_ent *dh, unsigned long n= ow) +{ + dh->rateinfo.credit +=3D (now - xchg(&dh->rateinfo.prev, now))=20 + * CREDITS_PER_JIFFY; + if (dh->rateinfo.credit > dh->rateinfo.credit_cap) + dh->rateinfo.credit =3D dh->rateinfo.credit_cap; +} + +static inline int get_ports(const struct sk_buff *skb, int offset,=20 + u16 ports[2]) +{ + union { + struct tcphdr th; + struct udphdr uh; + sctp_sctphdr_t sctph; + } hdr_u, *ptr_u; + + /* Must not be a fragment. */ + if (offset) + return 1; + + /* Must be big enough to read ports (both UDP and TCP have + them at the start). */ + ptr_u =3D skb_header_pointer(skb, skb->nh.iph->ihl*4, 8, &hdr_u);=20 + if (!ptr_u) + return 1; + + switch (skb->nh.iph->protocol) { + case IPPROTO_TCP: + ports[0] =3D ptr_u->th.source; + ports[1] =3D ptr_u->th.dest; + break; + case IPPROTO_UDP: + ports[0] =3D ptr_u->uh.source; + ports[1] =3D ptr_u->uh.dest; + break; + case IPPROTO_SCTP: + ports[0] =3D ptr_u->sctph.source; + ports[1] =3D ptr_u->sctph.dest; + break; + default: + /* all other protocols don't supprot per-port hash + * buckets */ + ports[0] =3D ports[1] =3D 0; + break; + } + + return 0; +} + + +static int +hashlimit_match(const struct sk_buff *skb, + const struct net_device *in, + const struct net_device *out, + const void *matchinfo, + int offset, + int *hotdrop) +{ + struct ipt_hashlimit_info *r =3D=20 + ((struct ipt_hashlimit_info *)matchinfo)->u.master; + struct ipt_hashlimit_htable *hinfo =3D r->hinfo; + unsigned long now =3D jiffies; + struct dsthash_ent *dh; + struct dsthash_dst dst; + + /* build 'dst' according to hinfo->cfg and current packet */ + memset(&dst, 0, sizeof(dst)); + if (hinfo->cfg.mode & IPT_HASHLIMIT_HASH_DIP) + dst.dst_ip =3D skb->nh.iph->daddr; + if (hinfo->cfg.mode & IPT_HASHLIMIT_HASH_SIP) + dst.src_ip =3D skb->nh.iph->saddr; + if (hinfo->cfg.mode & IPT_HASHLIMIT_HASH_DPT + ||hinfo->cfg.mode & IPT_HASHLIMIT_HASH_SPT) { + u_int16_t ports[2]; + if (get_ports(skb, offset, ports)) { + /* We've been asked to examine this packet, and we + can't. Hence, no choice but to drop. */ + *hotdrop =3D 1; + return 0; + } + if (hinfo->cfg.mode & IPT_HASHLIMIT_HASH_SPT) + dst.src_port =3D ports[0]; + if (hinfo->cfg.mode & IPT_HASHLIMIT_HASH_DPT) + dst.dst_port =3D ports[1]; + }=20 + + LOCK_BH(&hinfo->lock); + dh =3D __dsthash_find(hinfo, &dst); + if (!dh) { + dh =3D __dsthash_alloc_init(hinfo, &dst); + + if (!dh) { + /* enomem... don't match =3D=3D DROP */ + if (net_ratelimit()) + printk(KERN_ERR "%s: ENOMEM\n", __FUNCTION__); + UNLOCK_BH(&hinfo->lock); + return 0; + } + + dh->expires =3D jiffies + MS2JIFFIES(hinfo->cfg.expire); + + dh->rateinfo.prev =3D jiffies; + dh->rateinfo.credit =3D user2credits(hinfo->cfg.avg *=20 + hinfo->cfg.burst); + dh->rateinfo.credit_cap =3D user2credits(hinfo->cfg.avg *=20 + hinfo->cfg.burst); + dh->rateinfo.cost =3D user2credits(hinfo->cfg.avg); + + UNLOCK_BH(&hinfo->lock); + return 1; + } + + /* update expiration timeout */ + dh->expires =3D now + MS2JIFFIES(hinfo->cfg.expire); + + rateinfo_recalc(dh, now); + if (dh->rateinfo.credit >=3D dh->rateinfo.cost) { + /* We're underlimit. */ + dh->rateinfo.credit -=3D dh->rateinfo.cost; + UNLOCK_BH(&hinfo->lock); + return 1; + } + + UNLOCK_BH(&hinfo->lock); + + /* default case: we're overlimit, thus don't match */ + return 0; +} + +static int +hashlimit_checkentry(const char *tablename, + const struct ipt_ip *ip, + void *matchinfo, + unsigned int matchsize, + unsigned int hook_mask) +{ + struct ipt_hashlimit_info *r =3D matchinfo; + + if (matchsize !=3D IPT_ALIGN(sizeof(struct ipt_hashlimit_info))) + return 0; + + /* Check for overflow. */ + if (r->cfg.burst =3D=3D 0 + || user2credits(r->cfg.avg * r->cfg.burst) <=20 + user2credits(r->cfg.avg)) { + printk(KERN_ERR "ipt_hashlimit: Overflow, try lower: %u/%u\n", + r->cfg.avg, r->cfg.burst); + return 0; + } + + if (r->cfg.mode =3D=3D 0=20 + || r->cfg.mode > (IPT_HASHLIMIT_HASH_DPT + |IPT_HASHLIMIT_HASH_DIP + |IPT_HASHLIMIT_HASH_SIP + |IPT_HASHLIMIT_HASH_SPT)) + return 0; + + if (!r->cfg.gc_interval) + return 0; +=09 + if (!r->cfg.expire) + return 0; + + r->hinfo =3D htable_find_get(r->name); + if (!r->hinfo && (htable_create(r) !=3D 0)) { + return 0; + } + + /* Ugly hack: For SMP, we only want to use one set */ + r->u.master =3D r; + + return 1; +} + +static void +hashlimit_destroy(void *matchinfo, unsigned int matchsize) +{ + struct ipt_hashlimit_info *r =3D (struct ipt_hashlimit_info *) matchinfo; + + htable_put(r->hinfo); +} + +static struct ipt_match ipt_hashlimit =3D {=20 + .name =3D "hashlimit",=20 + .match =3D hashlimit_match,=20 + .checkentry =3D hashlimit_checkentry,=20 + .destroy =3D hashlimit_destroy, + .me =3D THIS_MODULE=20 +}; + +/* PROC stuff */ + +static void *dl_seq_start(struct seq_file *s, loff_t *pos) +{ + struct proc_dir_entry *pde =3D s->private; + struct ipt_hashlimit_htable *htable =3D pde->data; + unsigned int *bucket; + + LOCK_BH(&htable->lock); + if (*pos >=3D htable->cfg.size) + return NULL; + + bucket =3D kmalloc(sizeof(unsigned int), GFP_KERNEL); + if (!bucket) + return ERR_PTR(-ENOMEM); + + *bucket =3D *pos; + return bucket; +} + +static void *dl_seq_next(struct seq_file *s, void *v, loff_t *pos) +{ + struct proc_dir_entry *pde =3D s->private; + struct ipt_hashlimit_htable *htable =3D pde->data; + unsigned int *bucket =3D (unsigned int *)v; + + *pos =3D ++(*bucket); + if (*pos >=3D htable->cfg.size) { + kfree(v); + return NULL; + } + return bucket; +} + +static void dl_seq_stop(struct seq_file *s, void *v) +{ + struct proc_dir_entry *pde =3D s->private; + struct ipt_hashlimit_htable *htable =3D pde->data; + unsigned int *bucket =3D (unsigned int *)v; + + kfree(bucket); + + UNLOCK_BH(&htable->lock); +} + +static inline int dl_seq_real_show(struct dsthash_ent *ent, struct seq_fil= e *s) +{ + /* recalculate to show accurate numbers */ + rateinfo_recalc(ent, jiffies); + + return seq_printf(s, "%ld %u.%u.%u.%u:%u->%u.%u.%u.%u:%u %u %u %u\n", + (ent->expires - jiffies)/HZ, + NIPQUAD(ent->dst.src_ip), ntohs(ent->dst.src_port), + NIPQUAD(ent->dst.dst_ip), ntohs(ent->dst.dst_port), + ent->rateinfo.credit, ent->rateinfo.credit_cap, + ent->rateinfo.cost); +} + +static int dl_seq_show(struct seq_file *s, void *v) +{ + struct proc_dir_entry *pde =3D s->private; + struct ipt_hashlimit_htable *htable =3D pde->data; + unsigned int *bucket =3D (unsigned int *)v; + + if (LIST_FIND_W(&htable->hash[*bucket], dl_seq_real_show, + struct dsthash_ent *, s)) { + /* buffer was filled and unable to print that tuple */ + return 1; + } + return 0; +} + +static struct seq_operations dl_seq_ops =3D { + .start =3D dl_seq_start, + .next =3D dl_seq_next, + .stop =3D dl_seq_stop, + .show =3D dl_seq_show +}; + +static int dl_proc_open(struct inode *inode, struct file *file) +{ + int ret =3D seq_open(file, &dl_seq_ops); + + if (!ret) { + struct seq_file *sf =3D file->private_data; + sf->private =3D PDE(inode); + } + return ret; +} + +static struct file_operations dl_file_ops =3D { + .owner =3D THIS_MODULE, + .open =3D dl_proc_open, + .read =3D seq_read, + .llseek =3D seq_lseek, + .release =3D seq_release +}; + +static int init_or_fini(int fini) +{ + int ret =3D 0; + + if (fini) + goto cleanup; + + if (ipt_register_match(&ipt_hashlimit)) { + ret =3D -EINVAL; + goto cleanup_nothing; + } + + /* FIXME: do we really want HWCACHE_ALIGN since our objects are + * quite small ? */ + hashlimit_cachep =3D kmem_cache_create("ipt_hashlimit", + sizeof(struct dsthash_ent), 0, + SLAB_HWCACHE_ALIGN, NULL, NULL); + if (!hashlimit_cachep) { + printk(KERN_ERR "Unable to create ipt_hashlimit slab cache\n"); + ret =3D -ENOMEM; + goto cleanup_unreg_match; + } + + hashlimit_procdir =3D proc_mkdir("ipt_hashlimit", proc_net); + if (!hashlimit_procdir) { + printk(KERN_ERR "Unable to create proc dir entry\n"); + ret =3D -ENOMEM; + goto cleanup_free_slab; + } + + return ret; + +cleanup: + remove_proc_entry("ipt_hashlimit", proc_net); +cleanup_free_slab: + kmem_cache_destroy(hashlimit_cachep); +cleanup_unreg_match: + ipt_unregister_match(&ipt_hashlimit); +cleanup_nothing: + return ret; +=09 +} + +static int __init init(void) +{ + return init_or_fini(0); +} + +static void __exit fini(void) +{ + init_or_fini(1); +} + +module_init(init); +module_exit(fini); --nHJAUhyIZkPvF01C-- --v6YRErhBvjoBjrPV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBdupyXaXGVTD0i/8RAigZAJ92jVUs/QqL+pQOB9DnUINnVs0cpwCgkMuY +ThDszo03iEfrcYkIn++OOs= =p5c7 -----END PGP SIGNATURE----- --v6YRErhBvjoBjrPV-- From davem@davemloft.net Wed Oct 20 15:59:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 15:59:46 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KMxeb7004802 for ; Wed, 20 Oct 2004 15:59:40 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKPL6-0001hE-00; Wed, 20 Oct 2004 15:53:52 -0700 Date: Wed, 20 Oct 2004 15:53:52 -0700 From: "David S. Miller" To: Lennert Buytenhek Cc: netdev@oss.sgi.com Subject: Re: way of figuring out total number of retransmitted packets on a TCP socket? Message-Id: <20041020155352.1c9b70f6.davem@davemloft.net> In-Reply-To: <20041020223547.GJ29583@xi.wantstofly.org> References: <20041020130134.GC24757@xi.wantstofly.org> <20041020151448.51209278.davem@davemloft.net> <20041020223547.GJ29583@xi.wantstofly.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10565 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 1114 Lines: 30 On Thu, 21 Oct 2004 00:35:47 +0200 Lennert Buytenhek wrote: > Some places in the TCP stack reset tp->retransmits to zero, or to > one. Is it supposed to reflect the current number of retransmitted > packets in the network? Yes, timeout based retransmits in the network. It is reset typically when the connection is healthy again and making forward progress on the lost packets. > > Retransmits which occur dynamically due to fast-retransmit > > and other non-timeout based decisions are accounted for > > in "tcpi_retrans", so that is probably the value you are > > looking for. > > tcpi_retrans is taken from tp->retrans_out (looking at 2.6.8 here.) > But that value gets set to zero in a lot of places in the networking > as well, so it's probably not what I'm looking for either. I agree. We could easily add the thing you are looking for. It's just another statistic, zero'd at socket creation time and incremented right under the line which reads: /* Update global TCP statistics. */ TCP_INC_STATS(TCP_MIB_RETRANSSEGS); in tcp_retransmit_skb(). I'll add this for you. From ak@suse.de Wed Oct 20 16:04:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 16:04:31 -0700 (PDT) Received: from Cantor.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KN4QWO005189 for ; Wed, 20 Oct 2004 16:04:27 -0700 Received: from hermes.suse.de (hermes-ext.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 36924DF2980; Thu, 21 Oct 2004 01:04:06 +0200 (CEST) Date: Thu, 21 Oct 2004 01:04:05 +0200 From: Andi Kleen To: "David S. Miller" Cc: Lennert Buytenhek , netdev@oss.sgi.com Subject: Re: way of figuring out total number of retransmitted packets on a TCP socket? Message-ID: <20041020230405.GE995@wotan.suse.de> References: <20041020130134.GC24757@xi.wantstofly.org> <20041020151448.51209278.davem@davemloft.net> <20041020223547.GJ29583@xi.wantstofly.org> <20041020155352.1c9b70f6.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041020155352.1c9b70f6.davem@davemloft.net> X-archive-position: 10566 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 Content-Length: 498 Lines: 16 > I agree. We could easily add the thing you are looking for. It's > just another statistic, zero'd at socket creation time and incremented > right under the line which reads: > > /* Update global TCP statistics. */ > TCP_INC_STATS(TCP_MIB_RETRANSSEGS); > > in tcp_retransmit_skb(). > > I'll add this for you. Is it really necessary? Our struct sock is already bloated enough as is ... If Lennert needs it for some obscure purpose it's probably better if he just does it locally. -Andi From herbert@gondor.apana.org.au Wed Oct 20 16:10:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 16:10:17 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KNA8kG005670 for ; Wed, 20 Oct 2004 16:10:09 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CKPaI-0006mE-00; Thu, 21 Oct 2004 09:09:34 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CKPaD-0002Ri-00; Thu, 21 Oct 2004 09:09:29 +1000 Date: Thu, 21 Oct 2004 09:09:29 +1000 To: Eric Marchionni Cc: users@openswan.org, netdev@oss.sgi.com, davem@davemloft.net Subject: Re: [Openswan Users] DPD Problem - message from kernel malformed: unknown address family Message-ID: <20041020230929.GA9390@gondor.apana.org.au> References: <417675C6.3040704@gmx.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10567 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 574 Lines: 15 On Thu, Oct 21, 2004 at 08:02:44AM +1000, Herbert Xu wrote: > > Looks like nobody has tested shunt routes for a while. > > It's a kernel bug. We're not setting the family field in the selector. > This patch fixes it. Dave, please scratch that patch. The family is already being set elsewhere. Until we have real cross-family transforms this won't be needed. -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From davem@davemloft.net Wed Oct 20 16:13:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 16:13:24 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KNDIRX006047 for ; Wed, 20 Oct 2004 16:13:18 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKPYH-0001jl-00; Wed, 20 Oct 2004 16:07:29 -0700 Date: Wed, 20 Oct 2004 16:07:28 -0700 From: "David S. Miller" To: Andi Kleen Cc: buytenh@wantstofly.org, netdev@oss.sgi.com Subject: Re: way of figuring out total number of retransmitted packets on a TCP socket? Message-Id: <20041020160728.1d5a337e.davem@davemloft.net> In-Reply-To: <20041020230405.GE995@wotan.suse.de> References: <20041020130134.GC24757@xi.wantstofly.org> <20041020151448.51209278.davem@davemloft.net> <20041020223547.GJ29583@xi.wantstofly.org> <20041020155352.1c9b70f6.davem@davemloft.net> <20041020230405.GE995@wotan.suse.de> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10568 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 536 Lines: 14 On Thu, 21 Oct 2004 01:04:05 +0200 Andi Kleen wrote: > Is it really necessary? Our struct sock is already bloated enough > as is ... If Lennert needs it for some obscure purpose it's probably > better if he just does it locally. There are a couple of "__u32" holes before pointers in tcp_opt which is the space I was going to use for this new item. tcp_opt will be getting smaller some time soon as well, since we can consolidate most of the congestion control knobs into a single set of datums or some kind of union. From davem@davemloft.net Wed Oct 20 16:15:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 16:15:04 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KNF0F5006391 for ; Wed, 20 Oct 2004 16:15:00 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKPZZ-0001k4-00; Wed, 20 Oct 2004 16:08:49 -0700 Date: Wed, 20 Oct 2004 16:08:49 -0700 From: "David S. Miller" To: Herbert Xu Cc: mailing-lists@gmx.ch, users@openswan.org, netdev@oss.sgi.com Subject: Re: [Openswan Users] DPD Problem - message from kernel malformed: unknown address family Message-Id: <20041020160849.085bb075.davem@davemloft.net> In-Reply-To: <20041020230929.GA9390@gondor.apana.org.au> References: <417675C6.3040704@gmx.ch> <20041020230929.GA9390@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10569 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 590 Lines: 16 On Thu, 21 Oct 2004 09:09:29 +1000 Herbert Xu wrote: > On Thu, Oct 21, 2004 at 08:02:44AM +1000, Herbert Xu wrote: > > > > Looks like nobody has tested shunt routes for a while. > > > > It's a kernel bug. We're not setting the family field in the selector. > > This patch fixes it. > > Dave, please scratch that patch. The family is already being set > elsewhere. Until we have real cross-family transforms this won't > be needed. So why is the unknown address error occuring for this case? Is it just a case we don't need to worry about at this time? From herbert@gondor.apana.org.au Wed Oct 20 16:16:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 16:16:29 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KNGKlO006743 for ; Wed, 20 Oct 2004 16:16:21 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CKPgA-0006q6-00; Thu, 21 Oct 2004 09:15:38 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CKPg7-0002T4-00; Thu, 21 Oct 2004 09:15:35 +1000 Date: Thu, 21 Oct 2004 09:15:35 +1000 To: "David S. Miller" Cc: mailing-lists@gmx.ch, users@openswan.org, netdev@oss.sgi.com Subject: Re: [Openswan Users] DPD Problem - message from kernel malformed: unknown address family Message-ID: <20041020231535.GA9469@gondor.apana.org.au> References: <417675C6.3040704@gmx.ch> <20041020230929.GA9390@gondor.apana.org.au> <20041020160849.085bb075.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041020160849.085bb075.davem@davemloft.net> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10570 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 391 Lines: 10 On Wed, Oct 20, 2004 at 04:08:49PM -0700, David S. Miller wrote: > > So why is the unknown address error occuring for this case? That's what I'm trying to figure out right now :) -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From yoshfuji@linux-ipv6.org Wed Oct 20 16:18:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 16:18:20 -0700 (PDT) Received: from yue.st-paulia.net (yue.linux-ipv6.org [203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KNIERB007087 for ; Wed, 20 Oct 2004 16:18:15 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 1A9BC33CE5; Thu, 21 Oct 2004 08:18:41 +0900 (JST) Date: Thu, 21 Oct 2004 08:18:37 +0900 (JST) Message-Id: <20041021.081837.99226422.yoshfuji@linux-ipv6.org> To: laforge@netfilter.org Cc: davem@davemloft.net, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org, lmb@suse.de, yoshfuji@linux-ipv6.org Subject: Re: [PATCH 2.6] iptables CLUSTERIP target From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <20041020223828.GP19899@sunbeam.de.gnumonks.org> References: <20041020223828.GP19899@sunbeam.de.gnumonks.org> Organization: USAGI Project X-URL: http://www.yoshifuji.org/%7Ehideaki/ X-Fingerprint: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA X-PGP-Key-URL: http://www.yoshifuji.org/%7Ehideaki/hideaki@yoshifuji.org.asc X-Face: "5$Al-.M>NJ%a'@hhZdQm:."qn~PA^gq4o*>iCFToq*bAi#4FRtx}enhuQKz7fNqQz\BYU] $~O_5m-9'}MIs`XGwIEscw;e5b>n"B_?j/AkL~i/MEaZBLP X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 10571 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: yoshfuji@linux-ipv6.org Precedence: bulk X-list: netdev Content-Length: 433 Lines: 10 In article <20041020223828.GP19899@sunbeam.de.gnumonks.org> (at Thu, 21 Oct 2004 00:38:28 +0200), Harald Welte says: > Apart from the usual netfilter-specific file additions and > Kconfig/Makefile patches, this needs to export proc_file_operations in > order to get the reference counting of certain data objects right. I > hope this change is acceptable. Please use seq_file instead. Thanks. --yoshfuji From herbert@gondor.apana.org.au Wed Oct 20 16:25:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 16:25:31 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KNPLQW010761 for ; Wed, 20 Oct 2004 16:25:22 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CKPpA-0006x1-00; Thu, 21 Oct 2004 09:24:56 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CKPp6-0002YZ-00; Thu, 21 Oct 2004 09:24:52 +1000 Date: Thu, 21 Oct 2004 09:24:52 +1000 To: Eric Marchionni Cc: users@openswan.org, netdev@oss.sgi.com, davem@davemloft.net Subject: Re: [Openswan Users] DPD Problem - message from kernel malformed: unknown address family Message-ID: <20041020232452.GA9803@gondor.apana.org.au> References: <417675C6.3040704@gmx.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10572 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 784 Lines: 19 On Thu, Oct 21, 2004 at 08:02:44AM +1000, Herbert Xu wrote: > Eric Marchionni wrote: > > > > the ping times out and this occurs in the log: > > Oct 20 10:36:11 localhost pluto[12528]: XFRM_MSG_ACQUIRE message from > > kernel malformed: unknown address family > > Looks like nobody has tested shunt routes for a while. Alright I just tested it with 2.6.9 with the latest openswan and I can't reproduce this problem. I brought the connection up with auto --route and initiated the connection by a ping packet. Which kernel/openswan are you using? -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From ak@suse.de Wed Oct 20 16:31:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 16:31:38 -0700 (PDT) Received: from Cantor.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KNVUHh011149 for ; Wed, 20 Oct 2004 16:31:30 -0700 Received: from hermes.suse.de (hermes-ext.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 6B945DF1167; Thu, 21 Oct 2004 01:27:21 +0200 (CEST) Date: Thu, 21 Oct 2004 01:27:19 +0200 From: Andi Kleen To: "David S. Miller" Cc: Andi Kleen , buytenh@wantstofly.org, netdev@oss.sgi.com Subject: Re: way of figuring out total number of retransmitted packets on a TCP socket? Message-ID: <20041020232719.GG995@wotan.suse.de> References: <20041020130134.GC24757@xi.wantstofly.org> <20041020151448.51209278.davem@davemloft.net> <20041020223547.GJ29583@xi.wantstofly.org> <20041020155352.1c9b70f6.davem@davemloft.net> <20041020230405.GE995@wotan.suse.de> <20041020160728.1d5a337e.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041020160728.1d5a337e.davem@davemloft.net> X-archive-position: 10573 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 Content-Length: 880 Lines: 23 On Wed, Oct 20, 2004 at 04:07:28PM -0700, David S. Miller wrote: > On Thu, 21 Oct 2004 01:04:05 +0200 > Andi Kleen wrote: > > > Is it really necessary? Our struct sock is already bloated enough > > as is ... If Lennert needs it for some obscure purpose it's probably > > better if he just does it locally. > > There are a couple of "__u32" holes before pointers in tcp_opt > which is the space I was going to use for this new item. On 64bit you mean? That doesn't help the 32bit challenged users. > > tcp_opt will be getting smaller some time soon as well, since > we can consolidate most of the congestion control knobs into > a single set of datums or some kind of union. ok. good. I remember the times when you made jokes about the size of TCBs in some other OSes. I bet we beat them all now in bloat, but it's good that things are shrinking again. -Andi From buytenh@wantstofly.org Wed Oct 20 16:44:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 16:44:44 -0700 (PDT) Received: from xi.wantstofly.org (alephnull.demon.nl [212.238.201.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KNidCb011719 for ; Wed, 20 Oct 2004 16:44:39 -0700 Received: by xi.wantstofly.org (Postfix, from userid 500) id C85542B0ED; Thu, 21 Oct 2004 01:44:23 +0200 (MEST) Date: Thu, 21 Oct 2004 01:44:23 +0200 From: Lennert Buytenhek To: Andi Kleen Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: way of figuring out total number of retransmitted packets on a TCP socket? Message-ID: <20041020234423.GB31265@xi.wantstofly.org> References: <20041020130134.GC24757@xi.wantstofly.org> <20041020151448.51209278.davem@davemloft.net> <20041020223547.GJ29583@xi.wantstofly.org> <20041020155352.1c9b70f6.davem@davemloft.net> <20041020230405.GE995@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041020230405.GE995@wotan.suse.de> User-Agent: Mutt/1.4.1i X-archive-position: 10574 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: buytenh@wantstofly.org Precedence: bulk X-list: netdev Content-Length: 758 Lines: 18 On Thu, Oct 21, 2004 at 01:04:05AM +0200, Andi Kleen wrote: > Is it really necessary? Our struct sock is already bloated enough > as is ... If Lennert needs it for some obscure purpose it's probably > better if he just does it locally. My application is a large-ish streaming video and file download service, where I want to be able to automatically report on netblocks that are seeing unusual packet loss, and then use that data to alert our NOC and subsequently kick my transit providers with. Determining optimal routing within the internet is a somewhat of random process, and a lot of ISPs just always use the route with the shortest AS-path even though a lot of times that turns out not to be the best path at all (in terms of latency/loss.) --L From davem@davemloft.net Wed Oct 20 16:48:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 16:48:36 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KNmVQQ012119 for ; Wed, 20 Oct 2004 16:48:31 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKQ6L-0001pW-00; Wed, 20 Oct 2004 16:42:41 -0700 Date: Wed, 20 Oct 2004 16:42:41 -0700 From: "David S. Miller" To: Andi Kleen Cc: ak@suse.de, buytenh@wantstofly.org, netdev@oss.sgi.com Subject: Re: way of figuring out total number of retransmitted packets on a TCP socket? Message-Id: <20041020164241.5f29cea5.davem@davemloft.net> In-Reply-To: <20041020232719.GG995@wotan.suse.de> References: <20041020130134.GC24757@xi.wantstofly.org> <20041020151448.51209278.davem@davemloft.net> <20041020223547.GJ29583@xi.wantstofly.org> <20041020155352.1c9b70f6.davem@davemloft.net> <20041020230405.GE995@wotan.suse.de> <20041020160728.1d5a337e.davem@davemloft.net> <20041020232719.GG995@wotan.suse.de> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10575 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 415 Lines: 11 On Thu, 21 Oct 2004 01:27:19 +0200 Andi Kleen wrote: > ok. good. I remember the times when you made jokes about the size > of TCBs in some other OSes. I bet we beat them all now in bloat, but it's > good that things are shrinking again. Nope, Solaris's TCB is still 3 times the size of ours. BSD's is about the same size, yet they lack most of the congestion control and ECN functionality we have. From davem@davemloft.net Wed Oct 20 16:50:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 16:50:47 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9KNoerJ012481 for ; Wed, 20 Oct 2004 16:50:41 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKQ8R-0001pm-00; Wed, 20 Oct 2004 16:44:51 -0700 Date: Wed, 20 Oct 2004 16:44:51 -0700 From: "David S. Miller" To: Lennert Buytenhek Cc: ak@suse.de, netdev@oss.sgi.com Subject: Re: way of figuring out total number of retransmitted packets on a TCP socket? Message-Id: <20041020164451.7746b595.davem@davemloft.net> In-Reply-To: <20041020234423.GB31265@xi.wantstofly.org> References: <20041020130134.GC24757@xi.wantstofly.org> <20041020151448.51209278.davem@davemloft.net> <20041020223547.GJ29583@xi.wantstofly.org> <20041020155352.1c9b70f6.davem@davemloft.net> <20041020230405.GE995@wotan.suse.de> <20041020234423.GB31265@xi.wantstofly.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10576 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 750 Lines: 15 On Thu, 21 Oct 2004 01:44:23 +0200 Lennert Buytenhek wrote: > My application is a large-ish streaming video and file download service, > where I want to be able to automatically report on netblocks that are > seeing unusual packet loss, and then use that data to alert our NOC > and subsequently kick my transit providers with. Isn't this what RSVP is for? I realize that you may not be in a position to use RSVP end-to-end as necessary, but watching for retransmits by hand seems like simply a hackish way to do RSVP. Furthermore, non-timeout based retransmits are actually normal even on local subnets when a gigabit switch drops a packet to prevent internal deadlocks and stuff like that. I've seen this quite a bit. From davem@davemloft.net Wed Oct 20 17:21:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 17:21:33 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L0LQXT013457 for ; Wed, 20 Oct 2004 17:21:26 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKQbk-0001w9-00; Wed, 20 Oct 2004 17:15:08 -0700 Date: Wed, 20 Oct 2004 17:15:08 -0700 From: "David S. Miller" To: Denis Vlasenko Cc: rlrevell@joe-job.com, herbert@gondor.apana.org.au, akpm@osdl.org, linux-kernel@vger.kernel.org, linux-kernel@gondor.apana.org.au, maxk@qualcomm.com, irda-users@lists.sourceforge.net, netdev@oss.sgi.com, alain@parkautomat.net Subject: Re: [PATCH] Make netif_rx_ni preempt-safe Message-Id: <20041020171508.0e947d08.davem@davemloft.net> In-Reply-To: <200410202332.33583.vda@port.imtp.ilyichevsk.odessa.ua> References: <1098230132.23628.28.camel@krustophenia.net> <200410202256.56636.vda@port.imtp.ilyichevsk.odessa.ua> <1098303951.2268.8.camel@krustophenia.net> <200410202332.33583.vda@port.imtp.ilyichevsk.odessa.ua> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10577 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 2907 Lines: 99 On Wed, 20 Oct 2004 23:32:33 +0300 Denis Vlasenko wrote: > On Wednesday 20 October 2004 23:25, Lee Revell wrote: > > > > --- include/linux/netdevice.h~ 2004-10-20 15:51:00.000000000 -0400 > > > > +++ include/linux/netdevice.h 2004-10-20 15:51:54.000000000 -0400 > > > > @@ -694,11 +694,14 @@ > > > > /* Post buffer to the network code from _non interrupt_ context. > > > > * see net/core/dev.c for netif_rx description. > > > > */ > > > > -static inline int netif_rx_ni(struct sk_buff *skb) > > > > +static int netif_rx_ni(struct sk_buff *skb) > > > > > > non-inline functions must not live in .h files > > > > Where do you suggest we put it? > > Somewhere near this place: > > http://lxr.linux.no/source/net/core/dev.c?v=2.6.8.1#L1555 I've done this as follows, thanks. # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/20 16:57:53-07:00 davem@nuts.davemloft.net # [NET]: Uninline netif_rx_ni(). # # It expands to a lot of code when SMP or PREEMPT is # enabled. # # Signed-off-by: David S. Miller # # net/core/dev.c # 2004/10/20 16:57:03-07:00 davem@nuts.davemloft.net +14 -0 # [NET]: Uninline netif_rx_ni(). # # include/linux/netdevice.h # 2004/10/20 16:57:03-07:00 davem@nuts.davemloft.net +1 -15 # [NET]: Uninline netif_rx_ni(). # diff -Nru a/include/linux/netdevice.h b/include/linux/netdevice.h --- a/include/linux/netdevice.h 2004-10-20 16:58:28 -07:00 +++ b/include/linux/netdevice.h 2004-10-20 16:58:28 -07:00 @@ -677,6 +677,7 @@ #define HAVE_NETIF_RX 1 extern int netif_rx(struct sk_buff *skb); +extern int netif_rx_ni(struct sk_buff *skb); #define HAVE_NETIF_RECEIVE_SKB 1 extern int netif_receive_skb(struct sk_buff *skb); extern int dev_ioctl(unsigned int cmd, void __user *); @@ -690,21 +691,6 @@ extern void dev_init(void); extern int netdev_nit; - -/* Post buffer to the network code from _non interrupt_ context. - * see net/core/dev.c for netif_rx description. - */ -static inline int netif_rx_ni(struct sk_buff *skb) -{ - int err = netif_rx(skb); - - preempt_disable(); - if (softirq_pending(smp_processor_id())) - do_softirq(); - preempt_enable(); - - return err; -} /* Called by rtnetlink.c:rtnl_unlock() */ extern void netdev_run_todo(void); diff -Nru a/net/core/dev.c b/net/core/dev.c --- a/net/core/dev.c 2004-10-20 16:58:28 -07:00 +++ b/net/core/dev.c 2004-10-20 16:58:28 -07:00 @@ -1587,6 +1587,20 @@ return NET_RX_DROP; } +int netif_rx_ni(struct sk_buff *skb) +{ + int err = netif_rx(skb); + + preempt_disable(); + if (softirq_pending(smp_processor_id())) + do_softirq(); + preempt_enable(); + + return err; +} + +EXPORT_SYMBOL(netif_rx_ni); + static __inline__ void skb_bond(struct sk_buff *skb) { struct net_device *dev = skb->dev; From herbert@gondor.apana.org.au Wed Oct 20 17:36:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 17:36:11 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L0a2R9013972 for ; Wed, 20 Oct 2004 17:36:03 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CKQvB-0007Uz-00; Thu, 21 Oct 2004 10:35:13 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CKQv2-0002ht-00; Thu, 21 Oct 2004 10:35:04 +1000 Date: Thu, 21 Oct 2004 10:35:03 +1000 To: "David S. Miller" Cc: Denis Vlasenko , rlrevell@joe-job.com, akpm@osdl.org, linux-kernel@vger.kernel.org, linux-kernel@gondor.apana.org.au, maxk@qualcomm.com, irda-users@lists.sourceforge.net, netdev@oss.sgi.com, alain@parkautomat.net Subject: Re: [PATCH] Make netif_rx_ni preempt-safe Message-ID: <20041021003503.GA10391@gondor.apana.org.au> References: <1098230132.23628.28.camel@krustophenia.net> <200410202256.56636.vda@port.imtp.ilyichevsk.odessa.ua> <1098303951.2268.8.camel@krustophenia.net> <200410202332.33583.vda@port.imtp.ilyichevsk.odessa.ua> <20041020171508.0e947d08.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041020171508.0e947d08.davem@davemloft.net> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10578 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 609 Lines: 19 On Wed, Oct 20, 2004 at 05:15:08PM -0700, David S. Miller wrote: > > +int netif_rx_ni(struct sk_buff *skb) > +{ > + int err = netif_rx(skb); > + > + preempt_disable(); > + if (softirq_pending(smp_processor_id())) > + do_softirq(); You need to move the netif_rx call inside the disable as otherwise you might be checking the pending flag on the wrong CPU. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From rusty@rustcorp.com.au Wed Oct 20 17:51:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 17:51:13 -0700 (PDT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L0p7gx014478 for ; Wed, 20 Oct 2004 17:51:08 -0700 Received: from localhost.localdomain (localhost [127.0.0.1]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id D50322BC0F; Thu, 21 Oct 2004 10:50:46 +1000 (EST) Subject: Re: [PATCH] Change masquerade code to use first IP address of interface. From: Rusty Russell To: Herbert Xu Cc: Henrik Nordstrom , netdev@oss.sgi.com, Netfilter development mailing list In-Reply-To: <20041020111245.GA22703@gondor.apana.org.au> References: <20041020104650.GA20868@gondor.apana.org.au> <20041020111245.GA22703@gondor.apana.org.au> Content-Type: text/plain Message-Id: <1098319849.10571.155.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Thu, 21 Oct 2004 10:50:49 +1000 Content-Transfer-Encoding: 7bit X-archive-position: 10579 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rusty@rustcorp.com.au Precedence: bulk X-list: netdev Content-Length: 725 Lines: 22 On Wed, 2004-10-20 at 21:12, Herbert Xu wrote: > On Wed, Oct 20, 2004 at 01:04:51PM +0200, Henrik Nordstrom wrote: > > On Wed, 20 Oct 2004, Herbert Xu wrote: > > > > >I mean > > > > > > rt = (struct rtable *)(*pskb)->dst; > > > newsrc = inet_select_addr(out, rt->rt_gateway, RT_SCOPE_UNIVERSE); > > > > IIRC we are not allowed to access this here, but I may be wrong.. If we > > Why? POST_ROUTING is called in three places in ip_output.c and they all > give a valid dst. In fact ip_refrag in ip_conntrack_standalone.c is also > accessing skb->dst. Yeah, I like it. Please send patch on top of mine to Dave, and we'll see what blows up. Rusty. -- Anyone who quotes me in their signature is an idiot -- Rusty Russell From sriharivijayaraghavan@yahoo.com.au Wed Oct 20 18:09:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 18:09:41 -0700 (PDT) Received: from smtp205.mail.sc5.yahoo.com (smtp205.mail.sc5.yahoo.com [216.136.129.95]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9L19Ya2015183 for ; Wed, 20 Oct 2004 18:09:35 -0700 Received: from unknown (HELO ?192.168.0.5?) (sriharivijayaraghavan@150.101.167.87 with plain) by smtp205.mail.sc5.yahoo.com with SMTP; 21 Oct 2004 01:09:19 -0000 From: Srihari Vijayaraghavan To: Francois Romieu Subject: r8169 - dac testing (was: [mini-RFT] r8169 and amd64) Date: Fri, 22 Oct 2004 11:12:18 +1000 User-Agent: KMail/1.6.2 Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200410221112.18575.sriharivijayaraghavan@yahoo.com.au> X-archive-position: 10580 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sriharivijayaraghavan@yahoo.com.au Precedence: bulk X-list: netdev Content-Length: 989 Lines: 27 Hello Francois, I read your email with a subject "[mini-RFT] r8169 and amd64" at LKML (archive). Since I am not subscribed to LKML I am unable to answer to that thread. Sorry. Anyway, I have applied your patch at http://www.fr.zoreil.com/people/francois/misc/20041020-2.6.9-r8169.c-test.patch to vanilla 2.6.9, and tested it on my AMD64. In its default configuration, ie, without use_dac=1 parameter, it works great. But OTOH with that parameter kernel displays these messages: eth0: Identified chip type is 'RTL8169s/8110s'. eth0: RTL8169 at 0xffffff0000040000, 00:0d:61:15:23:e6, IRQ 18 r8169: eth0: PCI error (cmd = 0x0017, status = 0x22b0). eth1: link up, 100Mbps, full-duplex, lpa 0x45E1 And the network card does not work, as I cannot ping another host (DSL modem/router) on the network. (Once I load the module with that parameter, unloading and reloading it without that parameter does not bring the network card back to its working configuration.) Thank you. Hari. From acme@conectiva.com.br Wed Oct 20 18:13:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 18:14:03 -0700 (PDT) Received: from perninha.conectiva.com.br (perninha.conectiva.com.br [200.140.247.100]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L1DvnX015623 for ; Wed, 20 Oct 2004 18:13:58 -0700 Received: by perninha.conectiva.com.br (Postfix, from userid 568) id 45E744734D; Wed, 20 Oct 2004 23:13:39 -0200 (BRST) Received: from burns.conectiva (burns.conectiva [10.0.0.4]) by perninha.conectiva.com.br (Postfix) with SMTP id BFA67472F5 for ; Wed, 20 Oct 2004 23:13:38 -0200 (BRST) Received: (qmail 3403 invoked by uid 0); 21 Oct 2004 02:10:17 -0000 Received: from mapi8.distro.conectiva (HELO oops.ghostprotocols.net) (10.0.16.10) by burns.conectiva with SMTP; 21 Oct 2004 02:10:17 -0000 Received: from [192.168.1.6] (amd64.kerneljanitors.org [192.168.1.6]) by oops.ghostprotocols.net (Postfix) with ESMTP id 50B7C14639; Wed, 20 Oct 2004 23:17:26 -0200 (BRST) Message-ID: <41770E4B.1040906@conectiva.com.br> Date: Wed, 20 Oct 2004 22:18:03 -0300 From: Arnaldo Carvalho de Melo Organization: Conectiva S.A. User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" Cc: Andi Kleen , buytenh@wantstofly.org, netdev@oss.sgi.com Subject: Re: way of figuring out total number of retransmitted packets on a TCP socket? References: <20041020130134.GC24757@xi.wantstofly.org> <20041020151448.51209278.davem@davemloft.net> <20041020223547.GJ29583@xi.wantstofly.org> <20041020155352.1c9b70f6.davem@davemloft.net> <20041020230405.GE995@wotan.suse.de> <20041020160728.1d5a337e.davem@davemloft.net> <20041020232719.GG995@wotan.suse.de> <20041020164241.5f29cea5.davem@davemloft.net> In-Reply-To: <20041020164241.5f29cea5.davem@davemloft.net> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Bogosity: No, tests=bogofilter, spamicity=0.496664, version=0.16.3 X-archive-position: 10581 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 Content-Length: 626 Lines: 24 David S. Miller wrote: > On Thu, 21 Oct 2004 01:27:19 +0200 > Andi Kleen wrote: > > >>ok. good. I remember the times when you made jokes about the size >>of TCBs in some other OSes. I bet we beat them all now in bloat, but it's >>good that things are shrinking again. > > > Nope, Solaris's TCB is still 3 times the size of ours. > > BSD's is about the same size, yet they lack most of the > congestion control and ECN functionality we have. That doesn't mean we should keep trying to get to their level ;) /me goes back to his pile of sk_buff layer header pointers patches :-) - Arnaldo From jeffchua@silk.corp.fedex.com Wed Oct 20 19:56:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 19:57:05 -0700 (PDT) Received: from mx13.sac.fedex.com (mx13.sac.fedex.com [199.81.197.53]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L2uvcu018397 for ; Wed, 20 Oct 2004 19:56:57 -0700 Received: from inet04.prod.fedex.com (inet04.prod.fedex.com [199.81.10.44]) by mx13.sac.fedex.com (8.12.9p2/8.12.9) with ESMTP id i9L2udvt059072 for ; Wed, 20 Oct 2004 21:56:40 -0500 (CDT) (envelope-from jeffchua@silk.corp.fedex.com) Received: from entpm11.apac.fedex.com (entpm11.apac.fedex.com [155.161.92.11]) by inet04.prod.fedex.com (8.12.11/8.12.11) with ESMTP id i9L2ubpW002370; Wed, 20 Oct 2004 21:56:38 -0500 (CDT) Received: from silk.corp.fedex.com ([155.161.201.173]) by entpm11.apac.fedex.com (Lotus Domino Release 5.0.8) with ESMTP id 2004102110563590:1617 ; Thu, 21 Oct 2004 10:56:35 +0800 Received: from boston.corp.fedex.com ([155.161.156.88]) by silk.corp.fedex.com (8.11.4/8.11.4) with ESMTP id i9L2skN24337; Thu, 21 Oct 2004 10:54:46 +0800 Date: Thu, 21 Oct 2004 10:53:12 +0800 (SGT) From: Jeff Chua X-X-Sender: root@boston.corp.fedex.com To: Stephen Hemminger cc: Jeff Chua , Linux Kernel , netdev@oss.sgi.com, linux-net@vger.kernel.org, LARTC@mailman.ds9a.nl Subject: Re: [ANNOUNCE] iproute2 2.6.9-041019 In-Reply-To: <20041020091554.57e60936@zqx3.pdx.osdl.net> Message-ID: References: <41758014.4080502@osdl.org> <20041020091554.57e60936@zqx3.pdx.osdl.net> MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on ENTPM11/FEDEX(Release 5.0.8 |June 18, 2001) at 10/21/2004 10:56:36 AM, Serialize by Router on ENTPM11/FEDEX(Release 5.0.8 |June 18, 2001) at 10/21/2004 10:56:38 AM, Serialize complete at 10/21/2004 10:56:38 AM Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-archive-position: 10582 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jeffchua@silk.corp.fedex.com Precedence: bulk X-list: netdev Content-Length: 604 Lines: 27 On Wed, 20 Oct 2004, Stephen Hemminger wrote: > Try this, ss was dragging in byteorder.h and it didn't need to. > > diff -Nru a/misc/ss.c b/misc/ss.c > --- a/misc/ss.c 2004-10-20 09:13:56 -07:00 > +++ b/misc/ss.c 2004-10-20 09:13:56 -07:00 > @@ -33,7 +33,6 @@ > #include "libnetlink.h" > #include "SNAPSHOT.h" > > -#include > #include > #include same problem. "#include " is dragging in "#include ". Same thing goes for . All these kernel headers need cleanup, and I don't know enough to fix it. Jeff. From davem@davemloft.net Wed Oct 20 21:25:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 21:25:37 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L4PVa3024071 for ; Wed, 20 Oct 2004 21:25:31 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKUQI-0002x7-00; Wed, 20 Oct 2004 21:19:34 -0700 Date: Wed, 20 Oct 2004 21:19:34 -0700 From: "David S. Miller" To: "Randy.Dunlap" Cc: netdev@oss.sgi.com, jgarzik@pobox.com Subject: Re: [PATCH] tg3: reading eeprom via ethtool: not __init Message-Id: <20041020211934.7127a47b.davem@davemloft.net> In-Reply-To: <4175E955.6070807@osdl.org> References: <4175E955.6070807@osdl.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10583 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 35 Lines: 2 Works for me, thanks a lot Randy. From davem@davemloft.net Wed Oct 20 21:28:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 21:28:25 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L4SJq6024426 for ; Wed, 20 Oct 2004 21:28:19 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKUSr-0002xo-00; Wed, 20 Oct 2004 21:22:13 -0700 Date: Wed, 20 Oct 2004 21:22:13 -0700 From: "David S. Miller" To: yoshfuji@linux-ipv6.org Cc: kaber@trash.net, netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9]: Fix netdevice/inet6_dev reference leaks in ip6_route_add error paths Message-Id: <20041020212213.3ff8fc1f.davem@davemloft.net> In-Reply-To: <20041020.153525.50629727.yoshfuji@linux-ipv6.org> References: <417591A2.4090201@trash.net> <20041020.153525.50629727.yoshfuji@linux-ipv6.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i9L4SJq6024426 X-archive-position: 10584 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 469 Lines: 15 On Wed, 20 Oct 2004 15:35:25 +0900 (JST) YOSHIFUJI Hideaki / $B5HF#1QL@(B wrote: > In article <417591A2.4090201@trash.net> (at Wed, 20 Oct 2004 00:13:54 +0200), Patrick McHardy says: > > > The recent changes to ip6_route_add added multiple leaks in > > error paths. This patch should fix them. > > Agreed. David, please apply. > > Signed-off-by: Hideaki YOSHIFUJI Applied, thanks everyone. From davem@davemloft.net Wed Oct 20 21:30:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 21:30:28 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L4UN8E024786 for ; Wed, 20 Oct 2004 21:30:23 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKUUy-0002yR-00; Wed, 20 Oct 2004 21:24:24 -0700 Date: Wed, 20 Oct 2004 21:24:23 -0700 From: "David S. Miller" To: "John W. Linville" Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com Subject: Re: [patch 2.6.9 1/11] tg3: Add MODULE_VERSION Message-Id: <20041020212423.1649b486.davem@davemloft.net> In-Reply-To: <20041020143358.O8775@tuxdriver.com> References: <20041020141146.C8775@tuxdriver.com> <20041020141440.D8775@tuxdriver.com> <20041020143358.O8775@tuxdriver.com> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10585 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 208 Lines: 8 On Wed, 20 Oct 2004 14:33:58 -0400 "John W. Linville" wrote: > Add MODULE_VERSION to tg3 driver. > > Signed-off-by: John W. Linville Applied, thanks John. From davem@davemloft.net Wed Oct 20 21:31:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 21:31:44 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L4Vdet025119 for ; Wed, 20 Oct 2004 21:31:39 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKUWD-0002yn-00; Wed, 20 Oct 2004 21:25:41 -0700 Date: Wed, 20 Oct 2004 21:25:38 -0700 From: "David S. Miller" To: "John W. Linville" Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com Subject: Re: [patch 2.6.9 4/11] b44: Add MODULE_VERSION Message-Id: <20041020212538.19eb607c.davem@davemloft.net> In-Reply-To: <20041020143639.R8775@tuxdriver.com> References: <20041020141146.C8775@tuxdriver.com> <20041020141753.G8775@tuxdriver.com> <20041020143639.R8775@tuxdriver.com> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10586 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 213 Lines: 8 On Wed, 20 Oct 2004 14:36:39 -0400 "John W. Linville" wrote: > Add MODULE_VERSION to b44 driver. > > Signed-off-by: John W. Linville Also applied, thanks John. From davem@davemloft.net Wed Oct 20 21:36:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 21:36:57 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L4areT025480 for ; Wed, 20 Oct 2004 21:36:53 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKUb3-00030I-00; Wed, 20 Oct 2004 21:30:41 -0700 Date: Wed, 20 Oct 2004 21:30:40 -0700 From: "David S. Miller" To: Harald Welte Cc: netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org, hno@marasystems.com Subject: Re: [PATCH 2.6] iptables CONNMARK match+target Message-Id: <20041020213040.6b38df65.davem@davemloft.net> In-Reply-To: <20041020222102.GO19899@sunbeam.de.gnumonks.org> References: <20041020222102.GO19899@sunbeam.de.gnumonks.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10587 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 31 Lines: 2 Applied, thanks a lot Harald. From davem@davemloft.net Wed Oct 20 21:43:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 21:43:40 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L4hWZx025842 for ; Wed, 20 Oct 2004 21:43:33 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKUhn-00031J-00; Wed, 20 Oct 2004 21:37:39 -0700 Date: Wed, 20 Oct 2004 21:37:39 -0700 From: "David S. Miller" To: Lennert Buytenhek Cc: netdev@oss.sgi.com Subject: Re: way of figuring out total number of retransmitted packets on a TCP socket? Message-Id: <20041020213739.6e669fdd.davem@davemloft.net> In-Reply-To: <20041020223547.GJ29583@xi.wantstofly.org> References: <20041020130134.GC24757@xi.wantstofly.org> <20041020151448.51209278.davem@davemloft.net> <20041020223547.GJ29583@xi.wantstofly.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10588 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 2136 Lines: 68 Please give this 2.6.x patch a spin: # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/20 21:21:01-07:00 davem@nuts.davemloft.net # [TCP]: Add total num retransmits accounting. # # Signed-off-by: David S. Miller # # net/ipv4/tcp_output.c # 2004/10/20 21:20:29-07:00 davem@nuts.davemloft.net +2 -0 # [TCP]: Add total num retransmits accounting. # # net/ipv4/tcp_diag.c # 2004/10/20 21:20:29-07:00 davem@nuts.davemloft.net +2 -0 # [TCP]: Add total num retransmits accounting. # # include/linux/tcp.h # 2004/10/20 21:20:29-07:00 davem@nuts.davemloft.net +4 -0 # [TCP]: Add total num retransmits accounting. # diff -Nru a/include/linux/tcp.h b/include/linux/tcp.h --- a/include/linux/tcp.h 2004-10-20 21:21:21 -07:00 +++ b/include/linux/tcp.h 2004-10-20 21:21:21 -07:00 @@ -186,6 +186,8 @@ __u32 tcpi_rcv_rtt; __u32 tcpi_rcv_space; + + __u32 tcpi_total_retrans; }; #ifdef __KERNEL__ @@ -363,6 +365,8 @@ __u8 pending; /* Scheduled timer event */ __u8 urg_mode; /* In urgent mode */ __u32 snd_up; /* Urgent pointer */ + + __u32 total_retrans; /* Total retransmits for entire connection */ /* The syn_wait_lock is necessary only to avoid proc interface having * to grab the main lock sock while browsing the listening hash diff -Nru a/net/ipv4/tcp_diag.c b/net/ipv4/tcp_diag.c --- a/net/ipv4/tcp_diag.c 2004-10-20 21:21:21 -07:00 +++ b/net/ipv4/tcp_diag.c 2004-10-20 21:21:21 -07:00 @@ -105,6 +105,8 @@ info->tcpi_rcv_rtt = jiffies_to_usecs(tp->rcv_rtt_est.rtt)>>3; info->tcpi_rcv_space = tp->rcvq_space.space; + + info->tcpi_total_retrans = tp->total_retrans; } static int tcpdiag_fill(struct sk_buff *skb, struct sock *sk, diff -Nru a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c --- a/net/ipv4/tcp_output.c 2004-10-20 21:21:21 -07:00 +++ b/net/ipv4/tcp_output.c 2004-10-20 21:21:22 -07:00 @@ -1106,6 +1106,8 @@ /* Update global TCP statistics. */ TCP_INC_STATS(TCP_MIB_RETRANSSEGS); + tp->total_retrans++; + #if FASTRETRANS_DEBUG > 0 if (TCP_SKB_CB(skb)->sacked&TCPCB_SACKED_RETRANS) { if (net_ratelimit()) From davem@davemloft.net Wed Oct 20 21:46:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 21:46:12 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L4k7OS026180 for ; Wed, 20 Oct 2004 21:46:07 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKUk4-000328-00; Wed, 20 Oct 2004 21:40:00 -0700 Date: Wed, 20 Oct 2004 21:40:00 -0700 From: "David S. Miller" To: yoshfuji@linux-ipv6.org Cc: laforge@netfilter.org, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org, lmb@suse.de, yoshfuji@linux-ipv6.org Subject: Re: [PATCH 2.6] iptables CLUSTERIP target Message-Id: <20041020214000.22757cf9.davem@davemloft.net> In-Reply-To: <20041021.081837.99226422.yoshfuji@linux-ipv6.org> References: <20041020223828.GP19899@sunbeam.de.gnumonks.org> <20041021.081837.99226422.yoshfuji@linux-ipv6.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i9L4k7OS026180 X-archive-position: 10589 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 877 Lines: 24 On Thu, 21 Oct 2004 08:18:37 +0900 (JST) YOSHIFUJI Hideaki / $B5HF#1QL@(B wrote: > In article <20041020223828.GP19899@sunbeam.de.gnumonks.org> (at Thu, 21 Oct 2004 00:38:28 +0200), Harald Welte says: > > > Apart from the usual netfilter-specific file additions and > > Kconfig/Makefile patches, this needs to export proc_file_operations in > > order to get the reference counting of certain data objects right. I > > hope this change is acceptable. > > Please use seq_file instead. Thanks. Also, if not, we need to get upstream approval for exporting proc_file_operations. Harald, if it is not possible to use seq_file here for some reason, please post the proc_file_operations exporting patch (with a suitable description of course) to linux-kernel Meanwhile this patch is on hold until this is resolved. Thanks. From davem@davemloft.net Wed Oct 20 21:48:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 21:48:44 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L4mdFk026510 for ; Wed, 20 Oct 2004 21:48:39 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKUmW-00032j-00; Wed, 20 Oct 2004 21:42:32 -0700 Date: Wed, 20 Oct 2004 21:42:31 -0700 From: "David S. Miller" To: Harald Welte Cc: netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org, mhennig@astaro.com, ghansen@astaro.com Subject: Re: [PATCH 2.6] iptables hashlimit match Message-Id: <20041020214231.769459eb.davem@davemloft.net> In-Reply-To: <20041020224506.GQ19899@sunbeam.de.gnumonks.org> References: <20041020224506.GQ19899@sunbeam.de.gnumonks.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10590 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 369 Lines: 12 On Thu, 21 Oct 2004 00:45:06 +0200 Harald Welte wrote: > This is the third (and last, for now) patch, adding the 'hashlimit' > match to iptables. It was previously known as 'dstlimit', but has now > been generalized one step further. > > Please apply, thanks. > > Signed-off-by: Harald Welte Applied, thanks Harald. From davem@davemloft.net Wed Oct 20 22:04:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 22:04:57 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L54qPA027112 for ; Wed, 20 Oct 2004 22:04:52 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKV28-00034i-00; Wed, 20 Oct 2004 21:58:40 -0700 Date: Wed, 20 Oct 2004 21:58:40 -0700 From: "David S. Miller" To: Herbert Xu Cc: vda@port.imtp.ilyichevsk.odessa.ua, rlrevell@joe-job.com, akpm@osdl.org, linux-kernel@vger.kernel.org, linux-kernel@gondor.apana.org.au, maxk@qualcomm.com, irda-users@lists.sourceforge.net, netdev@oss.sgi.com, alain@parkautomat.net Subject: Re: [PATCH] Make netif_rx_ni preempt-safe Message-Id: <20041020215840.40f0bacc.davem@davemloft.net> In-Reply-To: <20041021003503.GA10391@gondor.apana.org.au> References: <1098230132.23628.28.camel@krustophenia.net> <200410202256.56636.vda@port.imtp.ilyichevsk.odessa.ua> <1098303951.2268.8.camel@krustophenia.net> <200410202332.33583.vda@port.imtp.ilyichevsk.odessa.ua> <20041020171508.0e947d08.davem@davemloft.net> <20041021003503.GA10391@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10591 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 551 Lines: 19 On Thu, 21 Oct 2004 10:35:03 +1000 Herbert Xu wrote: > On Wed, Oct 20, 2004 at 05:15:08PM -0700, David S. Miller wrote: > > > > +int netif_rx_ni(struct sk_buff *skb) > > +{ > > + int err = netif_rx(skb); > > + > > + preempt_disable(); > > + if (softirq_pending(smp_processor_id())) > > + do_softirq(); > > You need to move the netif_rx call inside the disable as otherwise > you might be checking the pending flag on the wrong CPU. Good catch, I've made that fix in my tree. Thanks. From davem@davemloft.net Wed Oct 20 22:09:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 22:09:20 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L59Fpk027521 for ; Wed, 20 Oct 2004 22:09:15 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKV6F-00035H-00; Wed, 20 Oct 2004 22:02:55 -0700 Date: Wed, 20 Oct 2004 22:02:55 -0700 From: "David S. Miller" To: Herbert Xu Cc: kaber@trash.net, davem@redhat.com, netdev@oss.sgi.com, ipsec-tools-devel@lists.sourceforge.net Subject: Re: [XFRM] Allow transport SAs even when there is no policy Message-Id: <20041020220255.0d2c6014.davem@davemloft.net> In-Reply-To: <20041018214326.GA6589@gondor.apana.org.au> References: <4172943B.8050904@trash.net> <20041017212317.GA28615@gondor.apana.org.au> <4172F1AB.4020305@trash.net> <20041017231258.GA29294@gondor.apana.org.au> <417428CF.2050802@trash.net> <20041018214326.GA6589@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10592 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 849 Lines: 25 On Tue, 19 Oct 2004 07:43:26 +1000 Herbert Xu wrote: > On Mon, Oct 18, 2004 at 10:34:23PM +0200, Patrick McHardy wrote: > > > > > More importantly that it'll stick out like a sore thumb in terms of > > > > > > its semantics. > > > > __xfrm_policy_check already rejects packets without a matching policy > > and skb->sp set, but it is skipped while the policy list is empty. > > What, from a semantics point of view, would be wrong with making > > xfrm_policy_check behave the same way ? > > Good catch. That was a bug introduced by yours truly :) > > What I meant to say is all packets with tunnel mode SAs should be > rejected since we don't allow optional tunnel transforms for security > reasons. > > This patch fixes it. > > Signed-off-by: Herbert Xu Applied, thanks Herbert. From davem@davemloft.net Wed Oct 20 22:10:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 22:10:35 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L5AN5v027852 for ; Wed, 20 Oct 2004 22:10:23 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKV7Z-00035l-00; Wed, 20 Oct 2004 22:04:17 -0700 Date: Wed, 20 Oct 2004 22:04:17 -0700 From: "David S. Miller" To: Herbert Xu Cc: kaber@trash.net, davem@redhat.com, netdev@oss.sgi.com, ipsec-tools-devel@lists.sourceforge.net Subject: Re: [XFRM] Allow transport SAs even when there is no policy Message-Id: <20041020220417.58f9ccb2.davem@davemloft.net> In-Reply-To: <20041019212529.GA16127@gondor.apana.org.au> References: <4172943B.8050904@trash.net> <20041017212317.GA28615@gondor.apana.org.au> <4172F1AB.4020305@trash.net> <20041017231258.GA29294@gondor.apana.org.au> <417428CF.2050802@trash.net> <20041018214326.GA6589@gondor.apana.org.au> <417521A2.4010500@trash.net> <20041019212529.GA16127@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10593 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 683 Lines: 18 On Wed, 20 Oct 2004 07:25:29 +1000 Herbert Xu wrote: > On Tue, Oct 19, 2004 at 04:16:02PM +0200, Patrick McHardy wrote: > > > > Looks good. So you agree we should also apply my patch to > > xfrm_policy_lookup (attached again with less confusing subject) ? It makes > > packets with a secpath fall through to __xfrm_policy_check when the policy > > list is empty, so the default policy is always the same. This will break > > setups with keying daemons that don't add forward policies for tunnel mode > > SAs. > > Agreed. Thanks. Also applied. Thanks Patrick and Herbert. BTW, Herbert, you can use a signed-off-by: line as an "ACK" if you want :-) From davem@davemloft.net Wed Oct 20 22:12:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 22:12:08 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L5C3N6028179 for ; Wed, 20 Oct 2004 22:12:03 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKV9C-00036D-00; Wed, 20 Oct 2004 22:05:58 -0700 Date: Wed, 20 Oct 2004 22:05:58 -0700 From: "David S. Miller" To: Patrick McHardy Cc: herbert@gondor.apana.org.au, davem@redhat.com, netdev@oss.sgi.com Subject: Re: [PATCH 2.6]: Fix policy update bug when increasing priority of last policy Message-Id: <20041020220558.36427a06.davem@davemloft.net> In-Reply-To: <4175238C.7010907@trash.net> References: <4175238C.7010907@trash.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10594 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 579 Lines: 21 On Tue, 19 Oct 2004 16:24:12 +0200 Patrick McHardy wrote: > Herbert Xu wrote: > > >Patrick McHardy wrote: > > > >>This patch checks for *p != NULL before continuing the loop. > >> > >> > > > >Unfortunately that doesn't fix it completely. The real bug is > >the fact that we continue with a bogus p pointing to the deleted > >element. So what we should do is continue without updating p > >at all. > > > > > You're right, your patch is better. I've tested > it and it works fine. I applied Herbert's version of the fix, thanks guys. From davem@davemloft.net Wed Oct 20 22:13:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 22:13:31 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L5DNPs028512 for ; Wed, 20 Oct 2004 22:13:23 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKVAT-00036W-00; Wed, 20 Oct 2004 22:07:17 -0700 Date: Wed, 20 Oct 2004 22:07:16 -0700 From: "David S. Miller" To: chas3@users.sourceforge.net Cc: chas@cmf.nrl.navy.mil, netdev@oss.sgi.com, davem@redhat.com Subject: Re: [PATCH][ATM]: use RCV_SHUTDOWN to exit skb_recv_datagram() Message-Id: <20041020220716.29c7d10b.davem@davemloft.net> In-Reply-To: <200410182056.i9IKuL2s022173@ginger.cmf.nrl.navy.mil> References: <200410182056.i9IKuL2s022173@ginger.cmf.nrl.navy.mil> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10595 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 342 Lines: 12 On Mon, 18 Oct 2004 16:56:22 -0400 "chas williams (contractor)" wrote: > this patch makes the svc socket protocol act a little more like > a connection oriented protocol. please apply to 2.6. Applied, thanks Chas. Feel free to provide "Signed-off-by: Chas Williams " lines in the future. Thanks again. From davem@davemloft.net Wed Oct 20 22:14:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 22:14:22 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L5EIlT028871 for ; Wed, 20 Oct 2004 22:14:18 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKVBQ-000372-00; Wed, 20 Oct 2004 22:08:16 -0700 Date: Wed, 20 Oct 2004 22:08:16 -0700 From: "David S. Miller" To: chas3@users.sourceforge.net Cc: chas@cmf.nrl.navy.mil, netdev@oss.sgi.com, davem@redhat.com Subject: Re: [PATCH][ATM]: point to multipoint signalling (from ekinzie@cmf.nrl.navy.mil) Message-Id: <20041020220816.620df3bd.davem@davemloft.net> In-Reply-To: <200410182121.i9ILLfxC022524@ginger.cmf.nrl.navy.mil> References: <200410182121.i9ILLfxC022524@ginger.cmf.nrl.navy.mil> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10596 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 231 Lines: 7 On Mon, 18 Oct 2004 17:21:42 -0400 "chas williams (contractor)" wrote: > this patch adds the kernel support necessary for point to > multipoint signalling. please apply to 2.6. Also applied, thanks Chas. From davem@davemloft.net Wed Oct 20 22:20:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 22:20:21 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L5KGSC029242 for ; Wed, 20 Oct 2004 22:20:16 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKVHI-00038K-00; Wed, 20 Oct 2004 22:14:20 -0700 Date: Wed, 20 Oct 2004 22:14:20 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: netdev@oss.sgi.com Subject: Re: [PATCH] dst: use const in accessors Message-Id: <20041020221420.4f21dd84.davem@davemloft.net> In-Reply-To: <20041018155909.13e9f3ad@zqx3.pdx.osdl.net> References: <20041018155909.13e9f3ad@zqx3.pdx.osdl.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10597 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 214 Lines: 8 On Mon, 18 Oct 2004 15:59:09 -0700 Stephen Hemminger wrote: > Trivial, dst cache inline's can use const. > > Signed-off-by: Stephen Hemminger Applied, thanks Stephen. From davem@davemloft.net Wed Oct 20 22:21:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 22:21:08 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L5L3r8029448 for ; Wed, 20 Oct 2004 22:21:03 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKVI6-00038v-00; Wed, 20 Oct 2004 22:15:10 -0700 Date: Wed, 20 Oct 2004 22:15:10 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: netdev@oss.sgi.com Subject: Re: [PATCH] tcp: use const in tcp.h Message-Id: <20041020221510.07f49883.davem@davemloft.net> In-Reply-To: <20041018160107.7fde661b@zqx3.pdx.osdl.net> References: <20041018160107.7fde661b@zqx3.pdx.osdl.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10598 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 230 Lines: 8 On Mon, 18 Oct 2004 16:01:07 -0700 Stephen Hemminger wrote: > More trivial janitor stuff, const usage in accessors. > > Signed-off-by: Stephen Hemminger Also applied, thanks Stephen. From davem@davemloft.net Wed Oct 20 22:22:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 22:22:19 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L5MFxY029897 for ; Wed, 20 Oct 2004 22:22:15 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKVJC-000399-00; Wed, 20 Oct 2004 22:16:18 -0700 Date: Wed, 20 Oct 2004 22:16:18 -0700 From: "David S. Miller" To: Patrick McHardy Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9]: Fix inet6_dev reference leak in ndisc_dst_alloc error path Message-Id: <20041020221618.114d5026.davem@davemloft.net> In-Reply-To: <41758EF7.6010906@trash.net> References: <41758EF7.6010906@trash.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10599 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 244 Lines: 8 On Wed, 20 Oct 2004 00:02:31 +0200 Patrick McHardy wrote: > ndisc_dst_alloc leaks a inet6_dev reference when ip6_dst_alloc > returns NULL. The bug was introduced somewhere between 2.6.8 > and 2.6.9. Applied, thanks Patrick. From davem@davemloft.net Wed Oct 20 22:23:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 22:23:06 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L5N1xP030221 for ; Wed, 20 Oct 2004 22:23:01 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKVK0-00039M-00; Wed, 20 Oct 2004 22:17:08 -0700 Date: Wed, 20 Oct 2004 22:17:08 -0700 From: "David S. Miller" To: Patrick McHardy Cc: netdev@oss.sgi.com, yoshfuji@linux-ipv6.org Subject: Re: [PATCH 2.6.9]: Fix netdevice/inet6_dev reference leaks in ip6_route_add error paths Message-Id: <20041020221708.46689319.davem@davemloft.net> In-Reply-To: <417591A2.4090201@trash.net> References: <417591A2.4090201@trash.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10600 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 266 Lines: 8 On Wed, 20 Oct 2004 00:13:54 +0200 Patrick McHardy wrote: > The recent changes to ip6_route_add added multiple leaks in > error paths. This patch should fix them. Applied already, as mentioned in my response to Yoshifuji-san's ACK of this patch. From davem@davemloft.net Wed Oct 20 22:24:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 22:24:37 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L5OWjp030551 for ; Wed, 20 Oct 2004 22:24:32 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKVLS-00039g-00; Wed, 20 Oct 2004 22:18:38 -0700 Date: Wed, 20 Oct 2004 22:18:38 -0700 From: "David S. Miller" To: Andi Kleen Cc: akpm@osdl.org, netdev@oss.sgi.com, helmut@helios.de Subject: Re: [PATCH] Add appletalk 32bit ioctl emulation Message-Id: <20041020221838.7b573fa3.davem@davemloft.net> In-Reply-To: <20041020004810.35957a87.ak@suse.de> References: <20041020004810.35957a87.ak@suse.de> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10601 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 240 Lines: 10 On Wed, 20 Oct 2004 00:48:10 +0200 Andi Kleen wrote: > From: Helmut Tschemernjak > > Add 32bit ioctl conversion for appletalk ioctls > > Signed-off-by: Andi Kleen Applied, thanks a lot Andi. From davem@davemloft.net Wed Oct 20 22:35:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 20 Oct 2004 22:35:48 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L5ZhuH030972 for ; Wed, 20 Oct 2004 22:35:43 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKVW7-0003CB-00; Wed, 20 Oct 2004 22:29:39 -0700 Date: Wed, 20 Oct 2004 22:29:38 -0700 From: "David S. Miller" To: Rusty Russell Cc: herbert@gondor.apana.org.au, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org, hno@marasystems.com Subject: Re: [PATCH] Change masquerade code to use first IP address of interface. Message-Id: <20041020222938.0dee0d5b.davem@davemloft.net> In-Reply-To: <1098319849.10571.155.camel@localhost.localdomain> References: <20041020104650.GA20868@gondor.apana.org.au> <20041020111245.GA22703@gondor.apana.org.au> <1098319849.10571.155.camel@localhost.localdomain> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10602 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 821 Lines: 22 On Thu, 21 Oct 2004 10:50:49 +1000 Rusty Russell wrote: > On Wed, 2004-10-20 at 21:12, Herbert Xu wrote: > > On Wed, Oct 20, 2004 at 01:04:51PM +0200, Henrik Nordstrom wrote: > > > On Wed, 20 Oct 2004, Herbert Xu wrote: > > > > > > >I mean > > > > > > > > rt = (struct rtable *)(*pskb)->dst; > > > > newsrc = inet_select_addr(out, rt->rt_gateway, RT_SCOPE_UNIVERSE); > > > > > > IIRC we are not allowed to access this here, but I may be wrong.. If we > > > > Why? POST_ROUTING is called in three places in ip_output.c and they all > > give a valid dst. In fact ip_refrag in ip_conntrack_standalone.c is also > > accessing skb->dst. > > Yeah, I like it. Please send patch on top of mine to Dave, and we'll > see what blows up. Patrick feel free to send this along to me whenever you like. From hno@marasystems.com Thu Oct 21 00:13:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 00:13:44 -0700 (PDT) Received: from filer.marasystems.com (marasystems.com [83.241.133.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L7DRGF000663 for ; Thu, 21 Oct 2004 00:13:28 -0700 Received: from localhost (henrik@localhost) by filer.marasystems.com (8.11.6/8.11.6) with ESMTP id i9L7CmO18327; Thu, 21 Oct 2004 09:12:50 +0200 Date: Thu, 21 Oct 2004 09:12:48 +0200 (CEST) From: Henrik Nordstrom To: Harald Welte cc: David Miller , Linux Netdev List , Netfilter Development Mailinglist Subject: Re: [PATCH 2.6] iptables CONNMARK match+target In-Reply-To: <20041020222102.GO19899@sunbeam.de.gnumonks.org> Message-ID: References: <20041020222102.GO19899@sunbeam.de.gnumonks.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-archive-position: 10603 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hno@marasystems.com Precedence: bulk X-list: netdev Content-Length: 420 Lines: 12 On Thu, 21 Oct 2004, Harald Welte wrote: > This is the first patch, adding something similar like nfmark, but on a > per-conntrack (as opposed to per-skb) level. Very useful especially for > asymmatric routing in combination with MASQUERADE, as often found on > home DSL setups with dymamic IP address that also have e.g. a tunnel > device with static IP. Is this with or without the mark operations? Regards Henrik From romieu@fr.zoreil.com Thu Oct 21 00:34:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 00:34:41 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L7YUac005907 for ; Thu, 21 Oct 2004 00:34:31 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i9L7XYvr029520; Thu, 21 Oct 2004 09:33:34 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i9L7XXX1029519; Thu, 21 Oct 2004 09:33:33 +0200 Date: Thu, 21 Oct 2004 09:33:33 +0200 From: Francois Romieu To: Srihari Vijayaraghavan Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: r8169 - dac testing (was: [mini-RFT] r8169 and amd64) Message-ID: <20041021073333.GA29423@electric-eye.fr.zoreil.com> References: <200410221112.18575.sriharivijayaraghavan@yahoo.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410221112.18575.sriharivijayaraghavan@yahoo.com.au> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 10604 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 Content-Length: 622 Lines: 22 Srihari Vijayaraghavan : [...] > r8169: eth0: PCI error (cmd = 0x0017, status = 0x22b0). > eth1: link up, 100Mbps, full-duplex, lpa 0x45E1 > > And the network card does not work, as I cannot ping another host (DSL > modem/router) on the network. > > (Once I load the module with that parameter, unloading and reloading it > without that parameter does not bring the network card back to its working > configuration.) Thanks a lot. - it does not crash but it did not recover; - no difference with the newly reported PCI error under load on a 32bit host. Bad mojo. -- Ueimor > From SRS0+2892982dac649fd8a8d0+424+infradead.org+hch@phoenix.srs.infradead.org Thu Oct 21 00:45:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 00:45:17 -0700 (PDT) Received: from phoenix.infradead.org (phoenix.infradead.org [81.187.226.98]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L7j9WA009456 for ; Thu, 21 Oct 2004 00:45:10 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.42 #1 (Red Hat Linux)) id 1CKXcw-0000Iq-A0; Thu, 21 Oct 2004 08:44:50 +0100 Date: Thu, 21 Oct 2004 08:44:50 +0100 From: Christoph Hellwig To: Harald Welte , David Miller , Linux Netdev List , Netfilter Development Mailinglist , lmb@suse.de Subject: Re: [PATCH 2.6] iptables CLUSTERIP target Message-ID: <20041021074450.GA1093@infradead.org> References: <20041020223828.GP19899@sunbeam.de.gnumonks.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041020223828.GP19899@sunbeam.de.gnumonks.org> User-Agent: Mutt/1.4.1i X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 10605 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: netdev Content-Length: 910 Lines: 20 On Thu, Oct 21, 2004 at 12:38:28AM +0200, Harald Welte wrote: > Hi Dave! > > This is the second patch, adding the 'CLUSTERIP' target to iptables. It > depends on the first 'CONNMARK' patch. > > This enables you to build a static load sharing cluster between multiple > nodes - without the requirement to have a load balancer. It uses a > series of [evil] tricks like replying with linklayer multicast addresses > to ARP requests, and using CONNMARK for stateful blocking all traffic > not intended for the local node. > > Apart from the usual netfilter-specific file additions and > Kconfig/Makefile patches, this needs to export proc_file_operations in > order to get the reference counting of certain data objects right. I > hope this change is acceptable. The export is totally bogus. If you need to do fancy things procfs is the wrong interface. Care to explain why exactly you think you need it? From SRS0+2892982dac649fd8a8d0+424+infradead.org+hch@phoenix.srs.infradead.org Thu Oct 21 00:55:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 00:55:53 -0700 (PDT) Received: from phoenix.infradead.org (phoenix.infradead.org [81.187.226.98]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L7tj9b010045 for ; Thu, 21 Oct 2004 00:55:45 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.42 #1 (Red Hat Linux)) id 1CKXnG-0000Kk-KN; Thu, 21 Oct 2004 08:55:30 +0100 Date: Thu, 21 Oct 2004 08:55:30 +0100 From: Christoph Hellwig To: Harald Welte , Linux Netdev List , Netfilter Development Mailinglist Subject: Re: [PATCH 2.6] iptables CLUSTERIP target Message-ID: <20041021075530.GA1278@infradead.org> References: <20041020223828.GP19899@sunbeam.de.gnumonks.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041020223828.GP19899@sunbeam.de.gnumonks.org> User-Agent: Mutt/1.4.1i X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 10606 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: netdev Content-Length: 160 Lines: 4 btw, please stop crossposting to public and private lists, or even better allow posting to netfiler-devel without subscription like every sane list allows to. From mroos@linux.ee Thu Oct 21 01:12:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 01:12:59 -0700 (PDT) Received: from math.ut.ee (root@math.ut.ee [193.40.5.125]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L8Cngj010651 for ; Thu, 21 Oct 2004 01:12:51 -0700 Received: from math.ut.ee (mroos@localhost [IPv6:::1]) by math.ut.ee (8.12.8+Sun/8.12.8/math-1.2) with ESMTP id i9L8CX7E013560 for ; Thu, 21 Oct 2004 11:12:33 +0300 (EEST) Received: from localhost (mroos@localhost) by math.ut.ee (8.12.8+Sun/8.12.2/Submit) with ESMTP id i9L8CXNb013557 for ; Thu, 21 Oct 2004 11:12:33 +0300 (EEST) X-Authentication-Warning: math.ut.ee: mroos owned process doing -bs Date: Thu, 21 Oct 2004 11:12:33 +0300 (EEST) From: Meelis Roos To: netdev@oss.sgi.com Subject: ipv6: no link-local address in 2.6.9 Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 10607 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mroos@linux.ee Precedence: bulk X-list: netdev Content-Length: 322 Lines: 10 Hi, since upgrading to 2.6.9 (actually yesterdays and todyas BK snapshots), my e100 NIC does not get a link-local ipv6 address. ipv6 module is loaded and lo has a ::1 address. Currently I have no ipv6 router in this network but it still should get a link-local address? Or not anymore? -- Meelis Roos (mroos@linux.ee) From buytenh@wantstofly.org Thu Oct 21 02:01:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 02:01:25 -0700 (PDT) Received: from xi.wantstofly.org (alephnull.demon.nl [212.238.201.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L91HQW012202 for ; Thu, 21 Oct 2004 02:01:18 -0700 Received: by xi.wantstofly.org (Postfix, from userid 500) id 040B62B0ED; Thu, 21 Oct 2004 11:01:01 +0200 (MEST) Date: Thu, 21 Oct 2004 11:01:01 +0200 From: Lennert Buytenhek To: "David S. Miller" Cc: ak@suse.de, netdev@oss.sgi.com Subject: Re: way of figuring out total number of retransmitted packets on a TCP socket? Message-ID: <20041021090101.GD31265@xi.wantstofly.org> References: <20041020130134.GC24757@xi.wantstofly.org> <20041020151448.51209278.davem@davemloft.net> <20041020223547.GJ29583@xi.wantstofly.org> <20041020155352.1c9b70f6.davem@davemloft.net> <20041020230405.GE995@wotan.suse.de> <20041020234423.GB31265@xi.wantstofly.org> <20041020164451.7746b595.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041020164451.7746b595.davem@davemloft.net> User-Agent: Mutt/1.4.1i X-archive-position: 10608 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: buytenh@wantstofly.org Precedence: bulk X-list: netdev Content-Length: 2946 Lines: 56 On Wed, Oct 20, 2004 at 04:44:51PM -0700, David S. Miller wrote: > > My application is a large-ish streaming video and file download service, > > where I want to be able to automatically report on netblocks that are > > seeing unusual packet loss, and then use that data to alert our NOC > > and subsequently kick my transit providers with. > > Isn't this what RSVP is for? I realize that you may not be in > a position to use RSVP end-to-end as necessary, but watching for > retransmits by hand seems like simply a hackish way to do RSVP. I'm approaching this from the other side. There is no such thing as an honest internet transit provider, and an often-seen trick is to give ICMP packets a higher loss priority so that when you ping it all looks okay even though say 0.5% of all non-ICMP traffic is actually not making it to the other side because they're trying to stuff >10gbps of traffic down a 10gbps pipe and don't want to invest more money in their infrastructure to keep margins low. They can then claim that their 99.9% or 99.99% or 99.999% (depending on the crappiness level of the provider) packet arrival guarantee is met because "ping from my workstation doesn't show anything wrong" (actual words of someone we've done business with.) Regarding RSVP, at least in Europe people seem to prefer the 'lots of bandwidth'-approach. In edge networks, people'd rather throw an extra gig at the problem than to implement QoS. And transit providers will never implement it if it will allow people to find out that their network really is underprovisioned. I don't know of any provider that uses or advertises QoS-related stuff such as RSVP. RSVP is nice for stuff like research networks (Internet2, etc), but in the actual internet you typically have to cross two or three other providers to get to your destination and I really don't see each and every one of those cooperating to provide RSVP end-to-end. I don't see end-to-end RSVP happening in the actual internet any time soon to be honest. If it ever will, I'm sure someone will find a way to make their RSVP implementation lie to other providers about the true capacity of their network (and then say "Sorry, we misconfigured it." if you find out), at which point it becomes totally useless. > Furthermore, non-timeout based retransmits are actually normal even > on local subnets when a gigabit switch drops a packet to prevent > internal deadlocks and stuff like that. I've seen this quite a bit. My crappy gigabit switch at home does this as well, but I've yet to see this happen on the more 'serious' network gear. A typical Amsterdam->LA single stream TCP test sees less than one in a million lost packets over a good provider, and anywhere between ~100 and ~3000 per million over a crappy one. The corresponding difference in price is a factor of about 5-10. (For example, $30-$40 per mbps per month versus $5 assuming a reasonable traffic volume.) --L From laforge@netfilter.org Thu Oct 21 02:12:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 02:13:01 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L9CraI012758 for ; Thu, 21 Oct 2004 02:12:54 -0700 Received: from dsl-213-023-154-242.arcor-ip.net ([213.23.154.242] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1CKYzq-0002fW-TP; Thu, 21 Oct 2004 11:12:35 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1CKYzl-0000xn-Hh; Thu, 21 Oct 2004 11:12:29 +0200 Date: Thu, 21 Oct 2004 11:12:29 +0200 From: Harald Welte To: Christoph Hellwig Cc: Linux Netdev List , Netfilter Development Mailinglist Subject: Re: [PATCH 2.6] iptables CLUSTERIP target Message-ID: <20041021091229.GA3551@sunbeam.de.gnumonks.org> Mail-Followup-To: Harald Welte , Christoph Hellwig , Linux Netdev List , Netfilter Development Mailinglist References: <20041020223828.GP19899@sunbeam.de.gnumonks.org> <20041021075530.GA1278@infradead.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3V7upXqbjpZ4EhLz" Content-Disposition: inline In-Reply-To: <20041021075530.GA1278@infradead.org> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10609 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@netfilter.org Precedence: bulk X-list: netdev Content-Length: 1657 Lines: 45 --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 21, 2004 at 08:55:30AM +0100, Christoph Hellwig wrote: > btw, please stop crossposting to public and private lists, or even better > allow posting to netfiler-devel without subscription like every sane list > allows to. We allow posting, your posting will just await moderator approval. Our listmaster usuall checks more than once per day. =20 Developers who happen to post more often (like davem) will be added to an explicit sender filter. Unfortunately wi didn't find any other reliable way to catch all the spam we receive, sorry. And yes, we already run spamassassin, as well as mimetype-based and HTML filters. --=20 - Harald Welte http://www.netfilter.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie --3V7upXqbjpZ4EhLz Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBd319XaXGVTD0i/8RAuZcAKCK1CJSlFGCJ09DsY7bOLpFbfvSlACgmajt uL86f+THZ5QD+MT+xEFwIZw= =dIGC -----END PGP SIGNATURE----- --3V7upXqbjpZ4EhLz-- From laforge@netfilter.org Thu Oct 21 02:16:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 02:17:03 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L9GnuK013099 for ; Thu, 21 Oct 2004 02:16:50 -0700 Received: from dsl-213-023-154-242.arcor-ip.net ([213.23.154.242] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1CKZ3h-0002ie-Ny; Thu, 21 Oct 2004 11:16:33 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1CKZ3g-0000z3-EZ; Thu, 21 Oct 2004 11:16:32 +0200 Date: Thu, 21 Oct 2004 11:16:32 +0200 From: Harald Welte To: Henrik Nordstrom Cc: Linux Netdev List , Netfilter Development Mailinglist Subject: Re: [PATCH 2.6] iptables CONNMARK match+target Message-ID: <20041021091632.GB3551@sunbeam.de.gnumonks.org> Mail-Followup-To: Harald Welte , Henrik Nordstrom , Linux Netdev List , Netfilter Development Mailinglist References: <20041020222102.GO19899@sunbeam.de.gnumonks.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="MW5yreqqjyrRcusr" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10610 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@netfilter.org Precedence: bulk X-list: netdev Content-Length: 1859 Lines: 50 --MW5yreqqjyrRcusr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 21, 2004 at 09:12:48AM +0200, Henrik Nordstrom wrote: > On Thu, 21 Oct 2004, Harald Welte wrote: >=20 > >This is the first patch, adding something similar like nfmark, but on a > >per-conntrack (as opposed to per-skb) level. Very useful especially for > >asymmatric routing in combination with MASQUERADE, as often found on > >home DSL setups with dymamic IP address that also have e.g. a tunnel > >device with static IP. >=20 > Is this with or without the mark operations? What is 'this' you are referring to?=20 'patch'? Well you should know your patch ;) 'very useful'? Yes, indeed. I think it is already very useful, even without MARK bit-wise operations (which AFAIK are not implemented with the required compatibility issues we discussed at the netfilter workshop, but which will be submitted once this is done). --=20 - Harald Welte http://www.netfilter.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie --MW5yreqqjyrRcusr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBd35wXaXGVTD0i/8RAijmAJ4oHZSAHJ3wSN9eODFhVoqibYEkbQCfdP/Q oORpoVyrPojTod4DV94OR58= =UZ31 -----END PGP SIGNATURE----- --MW5yreqqjyrRcusr-- From arjan@fenrus.demon.nl Thu Oct 21 02:18:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 02:18:46 -0700 (PDT) Received: from laptop.fenrus.com (i31207.upc-i.chello.nl [62.195.31.207]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L9Ie79013445 for ; Thu, 21 Oct 2004 02:18:41 -0700 Received: from laptop.fenrus.com (laptop.fenrus.com [127.0.0.1]) by laptop.fenrus.com (8.12.11/8.12.11) with ESMTP id i9L9Hrf4005607; Thu, 21 Oct 2004 11:17:53 +0200 Received: (from arjan@localhost) by laptop.fenrus.com (8.12.11/8.12.11/Submit) id i9L9HneC005606; Thu, 21 Oct 2004 11:17:49 +0200 X-Authentication-Warning: laptop.fenrus.com: arjan set sender to arjan@fenrus.demon.nl using -f Subject: Re: [patch 2.6.9 0/11] Add MODULE_VERSION to several network drivers From: Arjan van de Ven To: "John W. Linville" Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, davem@davemloft.net, john.ronciak@intel.com, ganesh.venkatesan@intel.com, akpm@osdl.org, romieu@fr.zoreil.com, ctindel@users.sourceforge.net, fubar@us.ibm.com, greearb@candelatech.com In-Reply-To: <20041020141146.C8775@tuxdriver.com> References: <20041020141146.C8775@tuxdriver.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1098350269.2810.17.camel@laptop.fenrus.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Thu, 21 Oct 2004 11:17:49 +0200 X-archive-position: 10611 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: arjan@fenrus.demon.nl Precedence: bulk X-list: netdev Content-Length: 328 Lines: 8 On Wed, 2004-10-20 at 20:11, John W. Linville wrote: > Patches to add MODULE_VERSION lines to several network drivers... > > Here is the list: have you checked if the version of these drivers is actually useful? (eg updated when the driver changes) If it's not I'd say adding a MODULE_VERSION to it makes no sense whatsoever. From EAMONN.HAMILTON@saic.com Thu Oct 21 02:26:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 02:26:26 -0700 (PDT) Received: from cpmx.mail.saic.com (cpmx.mail.saic.com [139.121.17.160]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L9QLT5013914 for ; Thu, 21 Oct 2004 02:26:21 -0700 Received: from cp-its-ieg01.mail.saic.com by cpmx.mail.saic.com; Thu, 21 Oct 2004 02:25:50 -0700 Received: from cpmx2.mail.saic.com ([139.121.17.172]) by cp-its-ieg01.mail.saic.com (SAVSMTP 3.1.6.45) with SMTP id M2004102102254918486 ; Thu, 21 Oct 2004 02:25:49 -0700 Received: from ukabzc383.uk.saic.com by cpmx2.mail.saic.com with ESMTP; Thu, 21 Oct 2004 02:25:50 -0700 Received: from localhost (localhost [127.0.0.1]) by ukabzc383.uk.saic.com (Postfix) with ESMTP id D0CA12B027; Thu, 21 Oct 2004 10:25:44 +0100 (BST) Received: from ukabzc383.uk.saic.com ([127.0.0.1]) by localhost (ukabzc383.uk.saic.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 21718-04; Thu, 21 Oct 2004 10:25:44 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by ukabzc383.uk.saic.com (Postfix) with ESMTP id 2BC5A2B026; Thu, 21 Oct 2004 10:25:44 +0100 (BST) Subject: Re: linux 2.6.9: r8169: eth0: PCI error (status: 0x8404). Device disabled. From: Eamonn Hamilton To: Francois Romieu Cc: netdev@oss.sgi.com In-Reply-To: <20041020201010.GA13023@electric-eye.fr.zoreil.com> References: <1098269117.6631.5.camel@ukabzc383.uk.saic.com> <20041020121520.GA4004@electric-eye.fr.zoreil.com> <1098282567.6631.10.camel@ukabzc383.uk.saic.com> <20041020201010.GA13023@electric-eye.fr.zoreil.com> Content-Type: text/plain Date: Thu, 21 Oct 2004 10:25:43 +0100 Message-Id: <1098350743.15528.40.camel@ukabzc383.uk.saic.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at saic.com X-archive-position: 10612 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: EAMONN.HAMILTON@saic.com Precedence: bulk X-list: netdev Content-Length: 893 Lines: 27 Hi Francois, Many apologies for the top posting, I'm in an Outlook land and it's given me bad habits :( ( mea culpa, mea culpa, mea maxima culpa, je m'apologie :) As you surmised, the card seems to work OK under moderate load, but under havy transmit load the error occurs. It hasn't been seen under Anyway, I now have 2.6.9 patched with the patch you sent with NAPI enabled, 2.6.7 and 2.6.8 installed. I'm also going to install another kernel with the code you mentioned commented out as follows, yes ? if (unlikely(status & SYSErr)) { /* rtl8169_pcierr_interrupt(dev); */ break; You also mentioned being able to enable TX checksum and segmentation offload - how do I enable this, is it through ethtool or something more esoteric? Thanks again for the help, hopefully I'll be able to get this lot tested over the next couple of days and let you know how it went. Cheers, Eamonn From herbert@gondor.apana.org.au Thu Oct 21 02:41:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 02:42:00 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9L9fouD016261 for ; Thu, 21 Oct 2004 02:41:51 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CKZRM-0003Gc-00; Thu, 21 Oct 2004 19:41:00 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CKZRI-00040A-00; Thu, 21 Oct 2004 19:40:56 +1000 From: Herbert Xu To: laforge@netfilter.org (Harald Welte) Subject: Re: [PATCH 2.6] iptables CLUSTERIP target Cc: hch@infradead.org, netdev@oss.sgi.com Organization: Core In-Reply-To: <20041021091229.GA3551@sunbeam.de.gnumonks.org> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) Message-Id: Date: Thu, 21 Oct 2004 19:40:56 +1000 X-archive-position: 10613 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 632 Lines: 15 Harald Welte wrote: > > We allow posting, your posting will just await moderator approval. Our > listmaster usuall checks more than once per day. Could you at least turn off the notification sent to the poster? It seems ironic that in an attempt to prevent spam from entering your list that you're spamming the posters instead. As it is I'll be taking your list off any CC list that I'm on. -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From hno@marasystems.com Thu Oct 21 03:26:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 03:26:14 -0700 (PDT) Received: from filer.marasystems.com (marasystems.com [83.241.133.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LAQ8wJ031269 for ; Thu, 21 Oct 2004 03:26:08 -0700 Received: from localhost (henrik@localhost) by filer.marasystems.com (8.11.6/8.11.6) with ESMTP id i9LAPZC19654; Thu, 21 Oct 2004 12:25:37 +0200 Date: Thu, 21 Oct 2004 12:25:35 +0200 (CEST) From: Henrik Nordstrom To: Harald Welte cc: Linux Netdev List , Netfilter Development Mailinglist Subject: Re: [PATCH 2.6] iptables CONNMARK match+target In-Reply-To: <20041021091632.GB3551@sunbeam.de.gnumonks.org> Message-ID: References: <20041020222102.GO19899@sunbeam.de.gnumonks.org> <20041021091632.GB3551@sunbeam.de.gnumonks.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-archive-position: 10614 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hno@marasystems.com Precedence: bulk X-list: netdev Content-Length: 1070 Lines: 29 On Thu, 21 Oct 2004, Harald Welte wrote: >> Is this with or without the mark operations? > > What is 'this' you are referring to? The CONNMARK patch. > 'very useful'? Yes, indeed. I think it is already very useful, even > without MARK bit-wise operations (which AFAIK are not implemented with > the required compatibility issues we discussed at the netfilter > workshop, but which will be submitted once this is done). This is what I am talking about, and answers my question. The MARK bit-wise operations is also available for CONNMARK and could in theory be included in CONNMARK when submitted to the kernel as this won't break compatibility with existing kernels (only patched kernels), but probably not worth it unless the same functionality is also available in MARK which we currently can't do due to the compatibility issue.. Once the compatibility issue is solved for MARK there should not be a problem to use the same to extend CONNMARK with mark bitwise operations if not included in the initial submission. I am fine either way. Regards Henrik From michal@rokos.info Thu Oct 21 03:44:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 03:45:07 -0700 (PDT) Received: from smtp4.vol.cz (smtp4.vol.cz [195.250.128.79]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LAiv1P032001 for ; Thu, 21 Oct 2004 03:44:59 -0700 Received: from [83.148.10.36] (a6prg-36.dialup.vol.cz [83.148.10.36]) by smtp4.vol.cz (8.12.11/8.12.9) with ESMTP id i9LAiaSR028181; Thu, 21 Oct 2004 12:44:37 +0200 (CEST) (envelope-from michal@rokos.info) Message-ID: <41779315.7080306@rokos.info> Date: Thu, 21 Oct 2004 12:44:37 +0200 From: Michal Rokos User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Linux Netdev List CC: linux-kernel@vger.kernel.org Subject: [Patch 2.6] Natsemi - add missing pci_disable_device() call Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10615 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: michal@rokos.info Precedence: bulk X-list: netdev Content-Length: 1355 Lines: 61 Hello, natsemi doesn't call pci_disable_device() during exit or error in init. So this patch does it. Michal # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/21 10:56:57+02:00 michal@rokos.ack-prg.csas.cz # [NATSEMI] Add missing pci_disable_device(). # # drivers/net/natsemi.c # 2004/10/21 10:56:45+02:00 michal@rokos.ack-prg.csas.cz +9 -3 # Add missing pci_disable_device(). # diff -Nru a/drivers/net/natsemi.c b/drivers/net/natsemi.c --- a/drivers/net/natsemi.c 2004-10-21 10:58:06 +02:00 +++ b/drivers/net/natsemi.c 2004-10-21 10:58:06 +02:00 @@ -821,7 +821,7 @@ #endif i = pci_enable_device(pdev); - if (i) return i; + if (i) goto out; /* natsemi has a non-standard PM control register * in PCI config space. Some boards apparently need @@ -843,8 +843,10 @@ pci_set_master(pdev); dev = alloc_etherdev(sizeof (struct netdev_private)); - if (!dev) - return -ENOMEM; + if (!dev) { + i = -ENOMEM; + goto err_alloc_etherdev; + } SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); @@ -1001,6 +1003,9 @@ err_pci_request_regions: free_netdev(dev); + err_alloc_etherdev: + pci_disable_device(pdev); + out: return i; } @@ -3133,6 +3138,7 @@ iounmap(ioaddr); free_netdev (dev); pci_set_drvdata(pdev, NULL); + pci_disable_device(pdev); } #ifdef CONFIG_PM From ahu@outpost.ds9a.nl Thu Oct 21 04:05:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 04:05:35 -0700 (PDT) Received: from outpost.ds9a.nl (postfix@outpost.ds9a.nl [213.244.168.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LB5TDk000785 for ; Thu, 21 Oct 2004 04:05:30 -0700 Received: by outpost.ds9a.nl (Postfix, from userid 1000) id A3FF34516; Thu, 21 Oct 2004 13:05:13 +0200 (CEST) Date: Thu, 21 Oct 2004 13:05:13 +0200 From: bert hubert To: Harald Welte , Christoph Hellwig , Linux Netdev List Subject: Re: [PATCH 2.6] iptables CLUSTERIP target Message-ID: <20041021110513.GA21579@outpost.ds9a.nl> Mail-Followup-To: bert hubert , Harald Welte , Christoph Hellwig , Linux Netdev List References: <20041020223828.GP19899@sunbeam.de.gnumonks.org> <20041021075530.GA1278@infradead.org> <20041021091229.GA3551@sunbeam.de.gnumonks.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021091229.GA3551@sunbeam.de.gnumonks.org> User-Agent: Mutt/1.3.28i X-archive-position: 10616 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ahu@ds9a.nl Precedence: bulk X-list: netdev Content-Length: 437 Lines: 13 Is the CLUSTERIP target going anywhere after the (needlessly harsh) rebukes posted here? I note with glee that CLUSTERIP implements (and improves) the evil ideas of http://lartc.org/autoloadbalance.php3 And yes, I've received hate mail over this from switch engineers :-) Good luck! -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From chas@cmf.nrl.navy.mil Thu Oct 21 04:27:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 04:27:07 -0700 (PDT) Received: from ginger.cmf.nrl.navy.mil (ginger.cmf.nrl.navy.mil [134.207.10.161]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LBQxux004860 for ; Thu, 21 Oct 2004 04:27:00 -0700 Received: from cmf.nrl.navy.mil (thirdoffive.cmf.nrl.navy.mil [134.207.10.180]) by ginger.cmf.nrl.navy.mil (8.12.11/8.12.11) with ESMTP id i9LBQbFT008844; Thu, 21 Oct 2004 07:26:37 -0400 (EDT) Message-Id: <200410211126.i9LBQbFT008844@ginger.cmf.nrl.navy.mil> To: netdev@oss.sgi.com Cc: davem@redhat.com Subject: [PATCH][ATM]: [ambassador] eliminate pci_find_device() Date: Thu, 21 Oct 2004 07:26:39 -0400 From: "chas williams (contractor)" X-Virus-Scanned: NAI Completed X-Scanned-By: MIMEDefang 2.30 (www . roaringpenguin . com / mimedefang) X-archive-position: 10617 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chas@cmf.nrl.navy.mil Precedence: bulk X-list: netdev Content-Length: 6959 Lines: 268 please apply to 2.6. thanks! Signed-off-by: Chas Williams # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/18 16:39:40-04:00 chas@relax.cmf.nrl.navy.mil # [ATM]: [ambassador] eliminate pci_find_device() # # drivers/atm/ambassador.h # 2004/10/18 16:39:25-04:00 chas@relax.cmf.nrl.navy.mil +1 -1 # [ATM]: [ambassador] eliminate pci_find_device() # # drivers/atm/ambassador.c # 2004/10/18 16:39:25-04:00 chas@relax.cmf.nrl.navy.mil +65 -67 # [ATM]: [ambassador] eliminate pci_find_device() # diff -Nru a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c --- a/drivers/atm/ambassador.c 2004-10-18 16:52:28 -04:00 +++ b/drivers/atm/ambassador.c 2004-10-18 16:52:28 -04:00 @@ -313,7 +313,7 @@ static void do_housekeeping (unsigned long arg); /********** globals **********/ -static amb_dev * amb_devs = NULL; +static LIST_HEAD(amb_devs); static struct timer_list housekeeping = TIMER_INITIALIZER(do_housekeeping, 0, 1); static unsigned short debug = 0; @@ -870,7 +870,8 @@ static irqreturn_t interrupt_handler(int irq, void *dev_id, struct pt_regs *pt_regs) { - amb_dev * dev = amb_devs; + amb_dev * dev = NULL; + struct list_head *p; (void) pt_regs; PRINTD (DBG_IRQ|DBG_FLOW, "interrupt_handler: %p", dev_id); @@ -880,10 +881,11 @@ return IRQ_NONE; } // Did one of our cards generate the interrupt? - while (dev) { + list_for_each(p, &amb_devs) { + dev = list_entry(p, struct amb_dev, entry); if (dev == dev_id) break; - dev = dev->prev; + dev = NULL; } // impossible - unless we add the device to our list after both // registering the IRQ handler for it and enabling interrupts, AND @@ -1554,19 +1556,19 @@ /********** housekeeping **********/ static void do_housekeeping (unsigned long arg) { - amb_dev * dev = amb_devs; + amb_dev * dev; + struct list_head *p; // data is set to zero at module unload (void) arg; if (housekeeping.data) { - while (dev) { + list_for_each(p, &amb_devs) { + dev = list_entry(p, struct amb_dev, entry); // could collect device-specific (not driver/atm-linux) stats here // last resort refill once every ten seconds fill_rx_pools (dev); - - dev = dev->prev; } mod_timer(&housekeeping, jiffies + 10*HZ); } @@ -2225,6 +2227,7 @@ // set up known dev items straight away dev->pci_dev = pci_dev; + pci_set_drvdata(pci_dev, dev); dev->iobase = pci_resource_start (pci_dev, 1); dev->irq = pci_dev->irq; @@ -2284,7 +2287,7 @@ return ret; } -static int __init do_pci_device(struct pci_dev *pci_dev) +static int __devinit amb_probe(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent) { amb_dev * dev; int err; @@ -2292,6 +2295,12 @@ // read resources from PCI configuration space u8 irq = pci_dev->irq; + if (pci_dev->device == PCI_DEVICE_ID_MADGE_AMBASSADOR_BAD) { + PRINTK (KERN_ERR, "skipped broken (PLX rev 2) card"); + err = -EINVAL; + goto out; + } + PRINTD (DBG_INFO, "found Madge ATM adapter (amb) at" " IO %x, IRQ %u, MEM %p", pci_resource_start(pci_dev, 1), irq, bus_to_virt(pci_resource_start(pci_dev, 0))); @@ -2348,8 +2357,7 @@ dev->atm_dev->ci_range.vci_bits = NUM_VCI_BITS; // update linked list - dev->prev = amb_devs; - amb_devs = dev; + list_add_tail(&dev->entry, &amb_devs); // enable host interrupts interrupts_on (dev); @@ -2370,29 +2378,26 @@ goto out; } -static int __init amb_probe (void) { - struct pci_dev * pci_dev; - int devs; - - PRINTD (DBG_FLOW, "amb_probe"); - - devs = 0; - pci_dev = NULL; - while ((pci_dev = pci_find_device - (PCI_VENDOR_ID_MADGE, PCI_DEVICE_ID_MADGE_AMBASSADOR, pci_dev) - )) { - if (do_pci_device(pci_dev) == 0) - devs++; - } - - pci_dev = NULL; - while ((pci_dev = pci_find_device - (PCI_VENDOR_ID_MADGE, PCI_DEVICE_ID_MADGE_AMBASSADOR_BAD, pci_dev) - )) - PRINTK (KERN_ERR, "skipped broken (PLX rev 2) card"); - - return devs; +static void __devexit amb_remove_one(struct pci_dev *pci_dev) +{ + struct amb_dev *dev; + + dev = pci_get_drvdata(pci_dev); + + list_del(&dev->entry); + + PRINTD(DBG_INFO|DBG_INIT, "closing %p (atm_dev = %p)", dev, dev->atm_dev); + // the drain should not be necessary + drain_rx_pools(dev); + interrupts_off(dev); + amb_reset(dev, 0); + free_irq(dev->irq, dev); + pci_disable_device(pci_dev); + destroy_queues(dev); + atm_dev_deregister(dev->atm_dev); + kfree(dev); + pci_release_region(pci_dev, 1); } static void __init amb_check_args (void) { @@ -2457,9 +2462,25 @@ /********** module entry **********/ -static int __init amb_module_init (void) { - int devs; - +static struct pci_device_id amb_pci_tbl[] = { + { PCI_VENDOR_ID_MADGE, PCI_DEVICE_ID_MADGE_AMBASSADOR, PCI_ANY_ID, PCI_ANY_ID, + 0, 0, 0 }, + { PCI_VENDOR_ID_MADGE, PCI_DEVICE_ID_MADGE_AMBASSADOR_BAD, PCI_ANY_ID, PCI_ANY_ID, + 0, 0, 0 }, + { 0, } +}; + +static struct pci_driver amb_driver = { + .name = "amb", + .probe = amb_probe, + .remove = __devexit_p(amb_remove_one), + .id_table = amb_pci_tbl, +}; + +static int __init amb_module_init (void) +{ + int err; + PRINTD (DBG_FLOW|DBG_INIT, "init_module"); // sanity check - cast needed as printk does not support %Zu @@ -2474,49 +2495,26 @@ amb_check_args(); // get the juice - devs = amb_probe(); - - if (devs) { + err = pci_module_init(&amb_driver); + if (err == 0) mod_timer (&housekeeping, jiffies); - } else { + else PRINTK (KERN_INFO, "no (usable) adapters found"); - } - - return devs ? 0 : -ENODEV; + + return err; } /********** module exit **********/ -static void __exit amb_module_exit (void) { - amb_dev * dev; - +static void __exit amb_module_exit (void) +{ PRINTD (DBG_FLOW|DBG_INIT, "cleanup_module"); // paranoia housekeeping.data = 0; del_timer_sync(&housekeeping); - while (amb_devs) { - struct pci_dev *pdev; - - dev = amb_devs; - pdev = dev->pci_dev; - amb_devs = dev->prev; - - PRINTD (DBG_INFO|DBG_INIT, "closing %p (atm_dev = %p)", dev, dev->atm_dev); - // the drain should not be necessary - drain_rx_pools (dev); - interrupts_off (dev); - amb_reset (dev, 0); - free_irq (dev->irq, dev); - pci_disable_device (pdev); - destroy_queues (dev); - atm_dev_deregister (dev->atm_dev); - kfree (dev); - pci_release_region (pdev, 1); - } - - return; + return pci_unregister_driver(&amb_driver); } module_init(amb_module_init); diff -Nru a/drivers/atm/ambassador.h b/drivers/atm/ambassador.h --- a/drivers/atm/ambassador.h 2004-10-18 16:52:28 -04:00 +++ b/drivers/atm/ambassador.h 2004-10-18 16:52:28 -04:00 @@ -649,7 +649,7 @@ struct atm_dev * atm_dev; struct pci_dev * pci_dev; - struct amb_dev * prev; + struct list_head entry; }; typedef struct amb_dev amb_dev; From chas@cmf.nrl.navy.mil Thu Oct 21 04:28:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 04:28:46 -0700 (PDT) Received: from ginger.cmf.nrl.navy.mil (ginger.cmf.nrl.navy.mil [134.207.10.161]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LBSeJu005118 for ; Thu, 21 Oct 2004 04:28:40 -0700 Received: from cmf.nrl.navy.mil (thirdoffive.cmf.nrl.navy.mil [134.207.10.180]) by ginger.cmf.nrl.navy.mil (8.12.11/8.12.11) with ESMTP id i9LBSHjK008875; Thu, 21 Oct 2004 07:28:17 -0400 (EDT) Message-Id: <200410211128.i9LBSHjK008875@ginger.cmf.nrl.navy.mil> To: netdev@oss.sgi.com Cc: davem@redhat.com Subject: [PATCH][ATM]: [horizon] eliminate pci_find_device() Reply-To: chas3@users.sourceforge.net Date: Thu, 21 Oct 2004 07:28:18 -0400 From: "chas williams (contractor)" X-Virus-Scanned: NAI Completed X-Scanned-By: MIMEDefang 2.30 (www . roaringpenguin . com / mimedefang) X-archive-position: 10618 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chas@cmf.nrl.navy.mil Precedence: bulk X-list: netdev Content-Length: 12394 Lines: 457 please apply to 2.6 thanks! Signed-off-by: Chas Williams # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/18 16:47:48-04:00 chas@relax.cmf.nrl.navy.mil # [ATM]: [horizon] eliminate pci_find_device() # # drivers/atm/horizon.h # 2004/10/18 16:47:33-04:00 chas@relax.cmf.nrl.navy.mil +1 -1 # [ATM]: [horizon] eliminate pci_find_device() # # drivers/atm/horizon.c # 2004/10/18 16:47:33-04:00 chas@relax.cmf.nrl.navy.mil +161 -145 # [ATM]: [horizon] eliminate pci_find_device() # diff -Nru a/drivers/atm/horizon.c b/drivers/atm/horizon.c --- a/drivers/atm/horizon.c 2004-10-18 16:52:44 -04:00 +++ b/drivers/atm/horizon.c 2004-10-18 16:52:44 -04:00 @@ -354,8 +354,9 @@ /********** globals **********/ -static hrz_dev * hrz_devs = NULL; -static struct timer_list housekeeping; +LIST_HEAD(hrz_devs); +static void do_housekeeping (unsigned long arg); +static struct timer_list housekeeping = TIMER_INITIALIZER(do_housekeeping, 0, 1); static unsigned short debug = 0; static unsigned short vpi_bits = 0; @@ -1386,7 +1387,8 @@ static irqreturn_t interrupt_handler(int irq, void *dev_id, struct pt_regs *pt_regs) { - hrz_dev * dev = hrz_devs; + hrz_dev * dev = NULL; + struct list_head *p; u32 int_source; unsigned int irq_ok; (void) pt_regs; @@ -1398,10 +1400,11 @@ return IRQ_NONE; } // Did one of our cards generate the interrupt? - while (dev) { + list_for_each(p, &hrz_devs) { + dev = list_entry(p, struct hrz_dev, entry); if (dev == dev_id) break; - dev = dev->prev; + dev = NULL; } if (!dev) { PRINTD (DBG_IRQ, "irq not for me: %d", irq); @@ -1470,17 +1473,18 @@ static void do_housekeeping (unsigned long arg) { // just stats at the moment - hrz_dev * dev = hrz_devs; + hrz_dev * dev; + struct list_head *p; (void) arg; // data is set to zero at module unload if (housekeeping.data) { - while (dev) { + list_for_each(p, &hrz_devs) { + dev = list_entry(p, struct hrz_dev, entry); // collect device-specific (not driver/atm-linux) stats here dev->tx_cell_count += rd_regw (dev, TX_CELL_COUNT_OFF); dev->rx_cell_count += rd_regw (dev, RX_CELL_COUNT_OFF); dev->hec_error_count += rd_regw (dev, HEC_ERROR_COUNT_OFF); dev->unassigned_cell_count += rd_regw (dev, UNASSIGNED_CELL_COUNT_OFF); - dev = dev->prev; } set_timer (&housekeeping, HZ/10); } @@ -2719,157 +2723,175 @@ .owner = THIS_MODULE, }; -static int __init hrz_probe (void) { - struct pci_dev * pci_dev; - int devs; - - PRINTD (DBG_FLOW, "hrz_probe"); - - devs = 0; - pci_dev = NULL; - while ((pci_dev = pci_find_device - (PCI_VENDOR_ID_MADGE, PCI_DEVICE_ID_MADGE_HORIZON, pci_dev) - )) { - hrz_dev * dev; - - // adapter slot free, read resources from PCI configuration space - u32 iobase = pci_resource_start (pci_dev, 0); - u32 * membase = bus_to_virt (pci_resource_start (pci_dev, 1)); - u8 irq = pci_dev->irq; - - /* XXX DEV_LABEL is a guess */ - if (!request_region (iobase, HRZ_IO_EXTENT, DEV_LABEL)) - continue; - - if (pci_enable_device (pci_dev)) - continue; - - dev = kmalloc (sizeof(hrz_dev), GFP_KERNEL); - if (!dev) { - // perhaps we should be nice: deregister all adapters and abort? - PRINTD (DBG_ERR, "out of memory"); - continue; - } - - memset (dev, 0, sizeof(hrz_dev)); - - // grab IRQ and install handler - move this someplace more sensible - if (request_irq (irq, - interrupt_handler, - SA_SHIRQ, /* irqflags guess */ - DEV_LABEL, /* name guess */ - dev)) { - PRINTD (DBG_WARN, "request IRQ failed!"); - // free_irq is at "endif" - } else { - - PRINTD (DBG_INFO, "found Madge ATM adapter (hrz) at: IO %x, IRQ %u, MEM %p", - iobase, irq, membase); - - dev->atm_dev = atm_dev_register (DEV_LABEL, &hrz_ops, -1, NULL); - if (!(dev->atm_dev)) { - PRINTD (DBG_ERR, "failed to register Madge ATM adapter"); - } else { +static int __devinit hrz_probe(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent) +{ + hrz_dev * dev; + int err = 0; + + // adapter slot free, read resources from PCI configuration space + u32 iobase = pci_resource_start (pci_dev, 0); + u32 * membase = bus_to_virt (pci_resource_start (pci_dev, 1)); + u8 irq = pci_dev->irq; unsigned char lat; - - PRINTD (DBG_INFO, "registered Madge ATM adapter (no. %d) (%p) at %p", - dev->atm_dev->number, dev, dev->atm_dev); + + PRINTD (DBG_FLOW, "hrz_probe"); + + /* XXX DEV_LABEL is a guess */ + if (!request_region(iobase, HRZ_IO_EXTENT, DEV_LABEL)) + return -EINVAL; + + if (pci_enable_device(pci_dev)) { + err = -EINVAL; + goto out_release; + } + + dev = kmalloc(sizeof(hrz_dev), GFP_KERNEL); + if (!dev) { + // perhaps we should be nice: deregister all adapters and abort? + PRINTD(DBG_ERR, "out of memory"); + err = -ENOMEM; + goto out_disable; + } + + memset(dev, 0, sizeof(hrz_dev)); + + pci_set_drvdata(pci_dev, dev); + + // grab IRQ and install handler - move this someplace more sensible + if (request_irq(irq, + interrupt_handler, + SA_SHIRQ, /* irqflags guess */ + DEV_LABEL, /* name guess */ + dev)) { + PRINTD(DBG_WARN, "request IRQ failed!"); + err = -EINVAL; + goto out_free; + } + + PRINTD(DBG_INFO, "found Madge ATM adapter (hrz) at: IO %x, IRQ %u, MEM %p", + iobase, irq, membase); + + dev->atm_dev = atm_dev_register(DEV_LABEL, &hrz_ops, -1, NULL); + if (!(dev->atm_dev)) { + PRINTD(DBG_ERR, "failed to register Madge ATM adapter"); + err = -EINVAL; + goto out_free_irq; + } + + PRINTD(DBG_INFO, "registered Madge ATM adapter (no. %d) (%p) at %p", + dev->atm_dev->number, dev, dev->atm_dev); dev->atm_dev->dev_data = (void *) dev; dev->pci_dev = pci_dev; - + // enable bus master accesses - pci_set_master (pci_dev); - + pci_set_master(pci_dev); + // frobnicate latency (upwards, usually) - pci_read_config_byte (pci_dev, PCI_LATENCY_TIMER, &lat); + pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER, &lat); if (pci_lat) { - PRINTD (DBG_INFO, "%s PCI latency timer from %hu to %hu", - "changing", lat, pci_lat); - pci_write_config_byte (pci_dev, PCI_LATENCY_TIMER, pci_lat); + PRINTD(DBG_INFO, "%s PCI latency timer from %hu to %hu", + "changing", lat, pci_lat); + pci_write_config_byte(pci_dev, PCI_LATENCY_TIMER, pci_lat); } else if (lat < MIN_PCI_LATENCY) { - PRINTK (KERN_INFO, "%s PCI latency timer from %hu to %hu", - "increasing", lat, MIN_PCI_LATENCY); - pci_write_config_byte (pci_dev, PCI_LATENCY_TIMER, MIN_PCI_LATENCY); + PRINTK(KERN_INFO, "%s PCI latency timer from %hu to %hu", + "increasing", lat, MIN_PCI_LATENCY); + pci_write_config_byte(pci_dev, PCI_LATENCY_TIMER, MIN_PCI_LATENCY); } - + dev->iobase = iobase; dev->irq = irq; dev->membase = membase; - + dev->rx_q_entry = dev->rx_q_reset = &memmap->rx_q_entries[0]; dev->rx_q_wrap = &memmap->rx_q_entries[RX_CHANS-1]; - + // these next three are performance hacks dev->last_vc = -1; dev->tx_last = -1; dev->tx_idle = 0; - + dev->tx_regions = 0; dev->tx_bytes = 0; dev->tx_skb = NULL; dev->tx_iovec = NULL; - + dev->tx_cell_count = 0; dev->rx_cell_count = 0; dev->hec_error_count = 0; dev->unassigned_cell_count = 0; - + dev->noof_spare_buffers = 0; - + { - unsigned int i; - for (i = 0; i < TX_CHANS; ++i) - dev->tx_channel_record[i] = -1; + unsigned int i; + for (i = 0; i < TX_CHANS; ++i) + dev->tx_channel_record[i] = -1; } - + dev->flags = 0; - + // Allocate cell rates and remember ASIC version // Fibre: ATM_OC3_PCR = 1555200000/8/270*260/53 - 29/53 // Copper: (WRONG) we want 6 into the above, close to 25Mb/s // Copper: (plagarise!) 25600000/8/270*260/53 - n/53 - - if (hrz_init (dev)) { - // to be really pedantic, this should be ATM_OC3c_PCR - dev->tx_avail = ATM_OC3_PCR; - dev->rx_avail = ATM_OC3_PCR; - set_bit (ultra, &dev->flags); // NOT "|= ultra" ! + + if (hrz_init(dev)) { + // to be really pedantic, this should be ATM_OC3c_PCR + dev->tx_avail = ATM_OC3_PCR; + dev->rx_avail = ATM_OC3_PCR; + set_bit(ultra, &dev->flags); // NOT "|= ultra" ! } else { - dev->tx_avail = ((25600000/8)*26)/(27*53); - dev->rx_avail = ((25600000/8)*26)/(27*53); - PRINTD (DBG_WARN, "Buggy ASIC: no TX bus-mastering."); + dev->tx_avail = ((25600000/8)*26)/(27*53); + dev->rx_avail = ((25600000/8)*26)/(27*53); + PRINTD(DBG_WARN, "Buggy ASIC: no TX bus-mastering."); } - + // rate changes spinlock - spin_lock_init (&dev->rate_lock); - + spin_lock_init(&dev->rate_lock); + // on-board memory access spinlock; we want atomic reads and // writes to adapter memory (handles IRQ and SMP) - spin_lock_init (&dev->mem_lock); - - init_waitqueue_head (&dev->tx_queue); - + spin_lock_init(&dev->mem_lock); + + init_waitqueue_head(&dev->tx_queue); + // vpi in 0..4, vci in 6..10 dev->atm_dev->ci_range.vpi_bits = vpi_bits; dev->atm_dev->ci_range.vci_bits = 10-vpi_bits; - - // update count and linked list - ++devs; - dev->prev = hrz_devs; - hrz_devs = dev; - // success - continue; - - /* not currently reached */ - atm_dev_deregister (dev->atm_dev); - } /* atm_dev_register */ - free_irq (irq, dev); - - } /* request_irq */ - kfree (dev); - release_region(iobase, HRZ_IO_EXTENT); - } /* kmalloc and while */ - return devs; + + // update linked list + list_add_tail(&dev->entry, &hrz_devs); + +out: + return err; + +out_free_irq: + free_irq(dev->irq, dev); +out_free: + kfree(dev); +out_disable: + pci_disable_device(pci_dev); +out_release: + release_region(iobase, HRZ_IO_EXTENT); + goto out; +} + +static void __devexit hrz_remove_one(struct pci_dev *pci_dev) +{ + hrz_dev *dev; + + dev = pci_get_drvdata(pci_dev); + + list_del(&dev->entry); + + PRINTD(DBG_INFO, "closing %p (atm_dev = %p)", dev, dev->atm_dev); + hrz_reset(dev); + atm_dev_deregister(dev->atm_dev); + free_irq(dev->irq, dev); + release_region(dev->iobase, HRZ_IO_EXTENT); + kfree(dev); + + pci_disable_device(pci_dev); } static void __init hrz_check_args (void) { @@ -2909,11 +2931,24 @@ MODULE_PARM_DESC(max_rx_size, "maximum size of RX AAL5 frames"); MODULE_PARM_DESC(pci_lat, "PCI latency in bus cycles"); +static struct pci_device_id hrz_pci_tbl[] = { + { PCI_VENDOR_ID_MADGE, PCI_DEVICE_ID_MADGE_HORIZON, PCI_ANY_ID, PCI_ANY_ID, + 0, 0, 0 }, + { 0, } +}; + +static struct pci_driver hrz_driver = { + .name = "horizon", + .probe = hrz_probe, + .remove = __devexit_p(hrz_remove_one), + .id_table = hrz_pci_tbl, +}; + /********** module entry **********/ static int __init hrz_module_init (void) { - int devs; - + int err; + // sanity check - cast is needed since printk does not support %Zu if (sizeof(struct MEMMAP) != 128*1024/4) { PRINTK (KERN_ERR, "Fix struct MEMMAP (is %lu fakewords).", @@ -2927,44 +2962,25 @@ hrz_check_args(); // get the juice - devs = hrz_probe(); - - if (devs) { - init_timer (&housekeeping); - housekeeping.function = do_housekeeping; - // paranoia - housekeeping.data = 1; + err = pci_module_init(&hrz_driver); + if (err == 0) set_timer (&housekeeping, 0); - } else { + else PRINTK (KERN_ERR, "no (usable) adapters found"); - } - - return devs ? 0 : -ENODEV; + + return err; } /********** module exit **********/ static void __exit hrz_module_exit (void) { - hrz_dev * dev; PRINTD (DBG_FLOW, "cleanup_module"); // paranoia housekeeping.data = 0; del_timer (&housekeeping); - while (hrz_devs) { - dev = hrz_devs; - hrz_devs = dev->prev; - - PRINTD (DBG_INFO, "closing %p (atm_dev = %p)", dev, dev->atm_dev); - hrz_reset (dev); - atm_dev_deregister (dev->atm_dev); - free_irq (dev->irq, dev); - release_region (dev->iobase, HRZ_IO_EXTENT); - kfree (dev); - } - - return; + return pci_unregister_driver(&hrz_driver); } module_init(hrz_module_init); diff -Nru a/drivers/atm/horizon.h b/drivers/atm/horizon.h --- a/drivers/atm/horizon.h 2004-10-18 16:52:44 -04:00 +++ b/drivers/atm/horizon.h 2004-10-18 16:52:44 -04:00 @@ -457,7 +457,7 @@ unsigned long unassigned_cell_count; struct pci_dev * pci_dev; - struct hrz_dev * prev; + struct list_head entry; }; typedef struct hrz_dev hrz_dev; From chas@cmf.nrl.navy.mil Thu Oct 21 04:28:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 04:28:52 -0700 (PDT) Received: from ginger.cmf.nrl.navy.mil (ginger.cmf.nrl.navy.mil [134.207.10.161]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LBSk0B005127 for ; Thu, 21 Oct 2004 04:28:46 -0700 Received: from cmf.nrl.navy.mil (thirdoffive.cmf.nrl.navy.mil [134.207.10.180]) by ginger.cmf.nrl.navy.mil (8.12.11/8.12.11) with ESMTP id i9LBReF3008853; Thu, 21 Oct 2004 07:27:40 -0400 (EDT) Message-Id: <200410211127.i9LBReF3008853@ginger.cmf.nrl.navy.mil> To: netdev@oss.sgi.com Cc: davem@redhat.com, romieu@fr.zoreil.com Subject: [PATCH][ATM]: [firestream] remove dead code (from Francois Romieu ) Date: Thu, 21 Oct 2004 07:27:41 -0400 From: "chas williams (contractor)" X-Virus-Scanned: NAI Completed X-Scanned-By: MIMEDefang 2.30 (www . roaringpenguin . com / mimedefang) X-archive-position: 10619 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chas@cmf.nrl.navy.mil Precedence: bulk X-list: netdev Content-Length: 2027 Lines: 85 please apply to 2.6 thanks! Signed-off-by: Chas Williams # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/18 16:33:47-04:00 chas@relax.cmf.nrl.navy.mil # [ATM]: [firestream] remove dead code (from Francois Romieu ) # # drivers/atm/firestream.c # 2004/10/18 16:33:31-04:00 chas@relax.cmf.nrl.navy.mil +0 -59 # [ATM]: [firestream] remove dead code (from Francois Romieu ) # diff -Nru a/drivers/atm/firestream.c b/drivers/atm/firestream.c --- a/drivers/atm/firestream.c 2004-10-18 16:52:17 -04:00 +++ b/drivers/atm/firestream.c 2004-10-18 16:52:17 -04:00 @@ -2013,65 +2013,6 @@ } -#if 0 -int __init fs_detect(void) -{ - struct pci_dev *pci_dev; - int devs = 0; - - func_enter (); - pci_dev = NULL; - while ((pci_dev = pci_find_device(PCI_VENDOR_ID_FUJITSU_ME, - PCI_DEVICE_ID_FUJITSU_FS50, - pci_dev))) { - if (fs_register_and_init (pci_dev, &fs_pci_tbl[0])) - break; - devs++; - } - - while ((pci_dev = pci_find_device(PCI_VENDOR_ID_FUJITSU_ME, - PCI_DEVICE_ID_FUJITSU_FS155, - pci_dev))) { - if (fs_register_and_init (pci_dev, FS_IS155)) - break; - devs++; - } - func_exit (); - return devs; -} -#else - -#if 0 -int __init init_PCI (void) -{ /* Begin init_PCI */ - - int pci_count; - printk ("init_PCI\n"); - /* - memset (&firestream_driver, 0, sizeof (firestream_driver)); - firestream_driver.name = "firestream"; - firestream_driver.id_table = firestream_pci_tbl; - firestream_driver.probe = fs_register_and_init; - */ - pci_count = pci_register_driver (&firestream_driver); - - if (pci_count <= 0) { - pci_unregister_driver (&firestream_driver); - pci_count = 0; - } - - return(pci_count); - -} /* End init_PCI */ -#endif -#endif - -/* -#ifdef MODULE -#define firestream_init init_module -#endif -*/ - static struct pci_device_id firestream_pci_tbl[] = { { PCI_VENDOR_ID_FUJITSU_ME, PCI_DEVICE_ID_FUJITSU_FS50, PCI_ANY_ID, PCI_ANY_ID, 0, 0, FS_IS50}, From chas@cmf.nrl.navy.mil Thu Oct 21 04:29:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 04:30:03 -0700 (PDT) Received: from ginger.cmf.nrl.navy.mil (ginger.cmf.nrl.navy.mil [134.207.10.161]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LBTv6a005833 for ; Thu, 21 Oct 2004 04:29:58 -0700 Received: from cmf.nrl.navy.mil (thirdoffive.cmf.nrl.navy.mil [134.207.10.180]) by ginger.cmf.nrl.navy.mil (8.12.11/8.12.11) with ESMTP id i9LBSt4W008894; Thu, 21 Oct 2004 07:28:55 -0400 (EDT) Message-Id: <200410211128.i9LBSt4W008894@ginger.cmf.nrl.navy.mil> To: netdev@oss.sgi.com Cc: davem@redhat.com, romieu@fr.zoreil.com Subject: [PATCH][ATM]: [zatm] eliminate pci_find_device() (from Francois Romieu ) Date: Thu, 21 Oct 2004 07:28:57 -0400 From: "chas williams (contractor)" X-Virus-Scanned: NAI Completed X-Scanned-By: MIMEDefang 2.30 (www . roaringpenguin . com / mimedefang) X-archive-position: 10620 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chas@cmf.nrl.navy.mil Precedence: bulk X-list: netdev Content-Length: 3618 Lines: 143 please apply to 2.6 thanks! Signed-off-by: Chas Williams # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/18 16:30:49-04:00 chas@relax.cmf.nrl.navy.mil # [ATM]: [zatm] eliminate pci_find_device() (from Francois Romieu ) # # drivers/atm/zatm.c # 2004/10/18 16:30:32-04:00 chas@relax.cmf.nrl.navy.mil +65 -37 # [ATM]: [zatm] eliminate pci_find_device() (from Francois Romieu ) # diff -Nru a/drivers/atm/zatm.c b/drivers/atm/zatm.c --- a/drivers/atm/zatm.c 2004-10-18 16:52:06 -04:00 +++ b/drivers/atm/zatm.c 2004-10-18 16:52:06 -04:00 @@ -46,6 +46,8 @@ * - OAM */ +#define ZATM_COPPER 1 + #if 0 #define DPRINTK(format,args...) printk(KERN_DEBUG format,##args) #else @@ -1577,51 +1579,77 @@ .change_qos = zatm_change_qos, }; -static int __init zatm_module_init(void) +static int __devinit zatm_init_one(struct pci_dev *pci_dev, + const struct pci_device_id *ent) { struct atm_dev *dev; struct zatm_dev *zatm_dev; - int devs,type; + int ret = -ENOMEM; - zatm_dev = (struct zatm_dev *) kmalloc(sizeof(struct zatm_dev), - GFP_KERNEL); - if (!zatm_dev) return -ENOMEM; - devs = 0; - for (type = 0; type < 2; type++) { - struct pci_dev *pci_dev; - - pci_dev = NULL; - while ((pci_dev = pci_find_device(PCI_VENDOR_ID_ZEITNET,type ? - PCI_DEVICE_ID_ZEITNET_1225 : PCI_DEVICE_ID_ZEITNET_1221, - pci_dev))) { - if (pci_enable_device(pci_dev)) break; - dev = atm_dev_register(DEV_LABEL,&ops,-1,NULL); - if (!dev) break; - zatm_dev->pci_dev = pci_dev; - dev->dev_data = zatm_dev; - zatm_dev->copper = type; - if (zatm_init(dev) || zatm_start(dev)) { - atm_dev_deregister(dev); - break; - } - zatm_dev->more = zatm_boards; - zatm_boards = dev; - devs++; - zatm_dev = (struct zatm_dev *) kmalloc(sizeof(struct - zatm_dev),GFP_KERNEL); - if (!zatm_dev) { - printk(KERN_EMERG "zatm.c: memory shortage\n"); - goto out; - } - } - } + zatm_dev = (struct zatm_dev *) kmalloc(sizeof(*zatm_dev), GFP_KERNEL); + if (!zatm_dev) { + printk(KERN_EMERG "%s: memory shortage\n", DEV_LABEL); + goto out; + } + + dev = atm_dev_register(DEV_LABEL, &ops, -1, NULL); + if (!dev) + goto out_free; + + ret = pci_enable_device(pci_dev); + if (ret < 0) + goto out_deregister; + + ret = pci_request_regions(pci_dev, DEV_LABEL); + if (ret < 0) + goto out_disable; + + zatm_dev->pci_dev = pci_dev; + ZATM_DEV(dev) = zatm_dev; + zatm_dev->copper = (int)ent->driver_data; + if ((ret = zatm_init(dev)) || (ret = zatm_start(dev))) + goto out_release; + + pci_set_drvdata(pci_dev, dev); + zatm_dev->more = zatm_boards; + zatm_boards = dev; + ret = 0; out: - kfree(zatm_dev); + return ret; - return 0; +out_release: + pci_release_regions(pci_dev); +out_disable: + pci_disable_device(pci_dev); +out_deregister: + atm_dev_deregister(dev); +out_free: + kfree(zatm_dev); + goto out; } + MODULE_LICENSE("GPL"); -module_init(zatm_module_init); +static struct pci_device_id zatm_pci_tbl[] __devinitdata = { + { PCI_VENDOR_ID_ZEITNET, PCI_DEVICE_ID_ZEITNET_1221, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, ZATM_COPPER }, + { PCI_VENDOR_ID_ZEITNET, PCI_DEVICE_ID_ZEITNET_1225, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, + { 0, } +}; +MODULE_DEVICE_TABLE(pci, zatm_pci_tbl); + +static struct pci_driver zatm_driver = { + .name = DEV_LABEL, + .id_table = zatm_pci_tbl, + .probe = zatm_init_one, +}; + +static int __init zatm_init_module(void) +{ + return pci_module_init(&zatm_driver); +} + +module_init(zatm_init_module); /* module_exit not defined so not unloadable */ From SRS0+2892982dac649fd8a8d0+424+infradead.org+hch@phoenix.srs.infradead.org Thu Oct 21 04:39:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 04:39:14 -0700 (PDT) Received: from phoenix.infradead.org (phoenix.infradead.org [81.187.226.98]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LBd7I9006332 for ; Thu, 21 Oct 2004 04:39:08 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.42 #1 (Red Hat Linux)) id 1CKbHF-0000ye-JJ; Thu, 21 Oct 2004 12:38:41 +0100 Date: Thu, 21 Oct 2004 12:38:41 +0100 From: Christoph Hellwig To: "chas williams (contractor)" Cc: netdev@oss.sgi.com, davem@redhat.com Subject: Re: [PATCH][ATM]: [ambassador] eliminate pci_find_device() Message-ID: <20041021113841.GA3720@infradead.org> References: <200410211126.i9LBQbFT008844@ginger.cmf.nrl.navy.mil> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410211126.i9LBQbFT008844@ginger.cmf.nrl.navy.mil> User-Agent: Mutt/1.4.1i X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 10621 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: netdev Content-Length: 1804 Lines: 57 > // Did one of our cards generate the interrupt? > - while (dev) { > + list_for_each(p, &amb_devs) { > + dev = list_entry(p, struct amb_dev, entry); > if (dev == dev_id) > break; > - dev = dev->prev; > + dev = NULL; > } > // impossible - unless we add the device to our list after both > // registering the IRQ handler for it and enabling interrupts, AND this debug check is superflous. > > @@ -1554,19 +1556,19 @@ > > /********** housekeeping **********/ > static void do_housekeeping (unsigned long arg) { > - amb_dev * dev = amb_devs; > + amb_dev * dev; > + struct list_head *p; > // data is set to zero at module unload > (void) arg; > > if (housekeeping.data) { > - while (dev) { > + list_for_each(p, &amb_devs) { > + dev = list_entry(p, struct amb_dev, entry); this really should be a per-device timer - or even better using schedule_delayed_work() With these two changes you could get rid of amb_devs easily. If you still want to keep it for some reason at least use list_for_each_entry. > + list_del(&dev->entry); > + > + PRINTD(DBG_INFO|DBG_INIT, "closing %p (atm_dev = %p)", dev, dev->atm_dev); > + // the drain should not be necessary > + drain_rx_pools(dev); > + interrupts_off(dev); > + amb_reset(dev, 0); > + free_irq(dev->irq, dev); > + pci_disable_device(pci_dev); > + destroy_queues(dev); > + atm_dev_deregister(dev->atm_dev); > + kfree(dev); > + pci_release_region(pci_dev, 1); this doesn't look correct (without knowing the atm subsystem in detail), in general you need to unregister from the subsystem first so you don't get new work, and then you can start tearing the hardware down. Also disabling the device before releasing the regions doesn't make too much sense to me, even if it may be valid. From SRS0+2892982dac649fd8a8d0+424+infradead.org+hch@phoenix.srs.infradead.org Thu Oct 21 04:40:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 04:40:09 -0700 (PDT) Received: from phoenix.infradead.org (phoenix.infradead.org [81.187.226.98]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LBe4xV006495 for ; Thu, 21 Oct 2004 04:40:05 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.42 #1 (Red Hat Linux)) id 1CKbIL-0000zD-VO; Thu, 21 Oct 2004 12:39:50 +0100 Date: Thu, 21 Oct 2004 12:39:49 +0100 From: Christoph Hellwig To: chas3@users.sourceforge.net Cc: netdev@oss.sgi.com, davem@redhat.com Subject: Re: [PATCH][ATM]: [horizon] eliminate pci_find_device() Message-ID: <20041021113949.GB3720@infradead.org> References: <200410211128.i9LBSHjK008875@ginger.cmf.nrl.navy.mil> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410211128.i9LBSHjK008875@ginger.cmf.nrl.navy.mil> User-Agent: Mutt/1.4.1i X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 10622 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: netdev Content-Length: 167 Lines: 5 On Thu, Oct 21, 2004 at 07:28:18AM -0400, chas williams (contractor) wrote: > please apply to 2.6 The same device list comments as for ambassador apply here aswell. From chas@cmf.nrl.navy.mil Thu Oct 21 04:51:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 04:51:55 -0700 (PDT) Received: from ginger.cmf.nrl.navy.mil (ginger.cmf.nrl.navy.mil [134.207.10.161]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LBpnjo007257 for ; Thu, 21 Oct 2004 04:51:50 -0700 Received: from cmf.nrl.navy.mil (thirdoffive.cmf.nrl.navy.mil [134.207.10.180]) by ginger.cmf.nrl.navy.mil (8.12.11/8.12.11) with ESMTP id i9LBpCS8009194; Thu, 21 Oct 2004 07:51:12 -0400 (EDT) Message-Id: <200410211151.i9LBpCS8009194@ginger.cmf.nrl.navy.mil> To: Christoph Hellwig cc: netdev@oss.sgi.com, davem@redhat.com Subject: Re: [PATCH][ATM]: [ambassador] eliminate pci_find_device() In-reply-to: Your message of "Thu, 21 Oct 2004 12:38:41 BST." <20041021113841.GA3720@infradead.org> Date: Thu, 21 Oct 2004 07:51:13 -0400 From: "chas williams (contractor)" X-Virus-Scanned: NAI Completed X-Scanned-By: MIMEDefang 2.30 (www . roaringpenguin . com / mimedefang) X-archive-position: 10623 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chas@cmf.nrl.navy.mil Precedence: bulk X-list: netdev Content-Length: 1871 Lines: 46 In message <20041021113841.GA3720@infradead.org>,Christoph Hellwig writes: >> // Did one of our cards generate the interrupt? >this debug check is superflous. i know that. however, i didnt want to change the original more than necessary. dropping this check doesnt bother me. >> @@ -1554,19 +1556,19 @@ >> if (housekeeping.data) { >> - while (dev) { >> + list_for_each(p, &amb_devs) { >> + dev = list_entry(p, struct amb_dev, entry); > >this really should be a per-device timer - or even better using >schedule_delayed_work() > >With these two changes you could get rid of amb_devs easily. If you still >want to keep it for some reason at least use list_for_each_entry. my primary reason for keeping it is that i cant easily test the changes to the driver. i have a programmable card that i set to the correct vendor/device id. it doesnt do any 'real' work. i dont really know anyone with a real ambassador (or horizon) card. this driver is essentially "reference only" as far as i can tell. i can change to list_for_each_entry. >> + list_del(&dev->entry); >> + >> + PRINTD(DBG_INFO|DBG_INIT, "closing %p (atm_dev = %p)", dev, dev->atm_dev); >> + // the drain should not be necessary >> + drain_rx_pools(dev); >> + interrupts_off(dev); >> + amb_reset(dev, 0); >> + free_irq(dev->irq, dev); >> + pci_disable_device(pci_dev); >> + destroy_queues(dev); >> + atm_dev_deregister(dev->atm_dev); >> + kfree(dev); >> + pci_release_region(pci_dev, 1); > >this doesn't look correct (without knowing the atm subsystem in detail), in >general you need to unregister from the subsystem first so you don't get >new work, and then you can start tearing the hardware down. still that what was the order in the original driver. i am sure it races with housekeeping as well if that makes you feel any better. (yes, i know, seperate timers wouldnt race.) From romieu@fr.zoreil.com Thu Oct 21 05:02:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 05:02:38 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LC2U5I007936 for ; Thu, 21 Oct 2004 05:02:31 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i9LC28vr001720; Thu, 21 Oct 2004 14:02:08 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i9LC28m7001719; Thu, 21 Oct 2004 14:02:08 +0200 Date: Thu, 21 Oct 2004 14:02:08 +0200 From: Francois Romieu To: Eamonn Hamilton Cc: netdev@oss.sgi.com Subject: Re: linux 2.6.9: r8169: eth0: PCI error (status: 0x8404). Device disabled. Message-ID: <20041021120208.GA752@electric-eye.fr.zoreil.com> References: <1098269117.6631.5.camel@ukabzc383.uk.saic.com> <20041020121520.GA4004@electric-eye.fr.zoreil.com> <1098282567.6631.10.camel@ukabzc383.uk.saic.com> <20041020201010.GA13023@electric-eye.fr.zoreil.com> <1098350743.15528.40.camel@ukabzc383.uk.saic.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1098350743.15528.40.camel@ukabzc383.uk.saic.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 10624 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 Content-Length: 1373 Lines: 35 Eamonn Hamilton : [...] > As you surmised, the card seems to work OK under moderate load, but > under havy transmit load the error occurs. It hasn't been seen under > Anyway, I now have 2.6.9 patched with the patch you sent with NAPI > enabled, 2.6.7 and 2.6.8 installed. I'm also going to install another > kernel with the code you mentioned commented out as follows, yes ? > > if (unlikely(status & SYSErr)) { > /* rtl8169_pcierr_interrupt(dev); */ > break; Yep. This is a gross hack but it is the first time that an unexpected PCI error is reported on x86 (they are expected when I do fancy testing :o) ). So I wonder if it really harms. > You also mentioned being able to enable TX checksum and segmentation > offload - how do I enable this, is it through ethtool or something more > esoteric? ethtool -K ethX tx on sg on tso on You'll need the patch for TSO that M. Xu posted a few days ago. It is in the vanilla tree and will appear in the upcoming -bk snapshot. > Thanks again for the help, hopefully I'll be able to get this lot tested > over the next couple of days and let you know how it went. Apparently there is a Master Abort which exhibits zero difference with the amd64 DAC error. The current code is only enough for my home system to recover from PCI error issued by the 8169. It will have to be tweaked. -- Ueimor From tgraf@suug.ch Thu Oct 21 05:32:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 05:32:15 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LCW5ce008876 for ; Thu, 21 Oct 2004 05:32:06 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 0EA87F; Thu, 21 Oct 2004 14:31:26 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 356F81C0E9; Thu, 21 Oct 2004 14:32:09 +0200 (CEST) Date: Thu, 21 Oct 2004 14:32:09 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCHSET 0/16] More gnet_stats conversions Message-ID: <20041021123209.GE21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 10625 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 723 Lines: 20 Dave, This patchset contains requeues statistics, TLV type max cleanups, and more conversions to the new generic statistic interface. It converts all qdiscs to dump their xstats via gnet_stats_copy_app and converts all class statistics in classful qdiscs to the new API. The following patches must be applied as a group to not break anything: 7-9, 10-12, 13-15. All other patches should keep the tree in a working state. Like the previous qdisc changes, full backward compatibility is given and all existing applications will continue to work. All patches except patch 16 have been tested for 1.5 weeks. The ATM patch was modified today and only compile tested. I will provide iproute2 patches for this soon. Cheers. From tgraf@suug.ch Thu Oct 21 05:33:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 05:33:40 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LCXYbQ009095 for ; Thu, 21 Oct 2004 05:33:34 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id CF9EFF; Thu, 21 Oct 2004 14:32:56 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 1B2DA1C0E9; Thu, 21 Oct 2004 14:33:40 +0200 (CEST) Date: Thu, 21 Oct 2004 14:33:40 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 1/16] PKT_SCHED: Requeues statistics Message-ID: <20041021123340.GF21977@postel.suug.ch> References: <20041021123209.GE21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021123209.GE21977@postel.suug.ch> X-archive-position: 10626 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 5220 Lines: 171 Introduces requeue statistics for qdiscs. Patch is based on a patch of Jamal Hadi Salim and adapted to new statistic API. Signed-off-by: Thomas Graf --- linux-2.6.9-rc5.orig/net/sched/sch_atm.c 2004-10-21 10:45:08.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_atm.c 2004-10-21 11:01:21.000000000 +0200 @@ -545,8 +545,10 @@ D2PRINTK("atm_tc_requeue(skb %p,sch %p,[qdisc %p])\n",skb,sch,p); ret = p->link.q->ops->requeue(skb,p->link.q); - if (!ret) sch->q.qlen++; - else { + if (!ret) { + sch->q.qlen++; + sch->qstats.requeues++; + } else { sch->qstats.drops++; p->link.stats.drops++; } --- linux-2.6.9-rc5.orig/net/sched/sch_cbq.c 2004-10-21 10:45:08.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_cbq.c 2004-10-21 10:52:50.000000000 +0200 @@ -485,6 +485,7 @@ #endif if ((ret = cl->q->ops->requeue(skb, cl->q)) == 0) { sch->q.qlen++; + sch->qstats.requeues++; if (!cl->next_alive) cbq_activate_class(cl); return 0; --- linux-2.6.9-rc5.orig/net/sched/sch_dsmark.c 2004-10-21 10:45:08.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_dsmark.c 2004-10-21 10:52:50.000000000 +0200 @@ -297,6 +297,7 @@ D2PRINTK("dsmark_requeue(skb %p,sch %p,[qdisc %p])\n",skb,sch,p); if ((ret = p->q->ops->requeue(skb, p->q)) == 0) { sch->q.qlen++; + sch->qstats.requeues++; return 0; } sch->qstats.drops++; --- linux-2.6.9-rc5.orig/net/sched/sch_fifo.c 2004-10-21 10:45:08.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_fifo.c 2004-10-21 10:52:50.000000000 +0200 @@ -67,6 +67,7 @@ { __skb_queue_head(&sch->q, skb); sch->qstats.backlog += skb->len; + sch->qstats.requeues++; return 0; } @@ -126,6 +127,7 @@ pfifo_requeue(struct sk_buff *skb, struct Qdisc* sch) { __skb_queue_head(&sch->q, skb); + sch->qstats.requeues++; return 0; } --- linux-2.6.9-rc5.orig/net/sched/sch_generic.c 2004-10-21 10:45:08.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_generic.c 2004-10-21 10:52:50.000000000 +0200 @@ -353,6 +353,7 @@ __skb_queue_head(list, skb); qdisc->q.qlen++; + qdisc->qstats.requeues++; return 0; } --- linux-2.6.9-rc5.orig/net/sched/sch_gred.c 2004-10-21 10:45:08.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_gred.c 2004-10-21 10:52:50.000000000 +0200 @@ -222,6 +222,7 @@ __skb_queue_head(&sch->q, skb); sch->qstats.backlog += skb->len; + sch->qstats.requeues++; q->backlog += skb->len; return 0; } --- linux-2.6.9-rc5.orig/net/sched/sch_hfsc.c 2004-10-21 10:45:08.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_hfsc.c 2004-10-21 10:52:50.000000000 +0200 @@ -1779,6 +1779,7 @@ __skb_queue_head(&q->requeue, skb); sch->q.qlen++; + sch->qstats.requeues++; return NET_XMIT_SUCCESS; } --- linux-2.6.9-rc5.orig/net/sched/sch_htb.c 2004-10-21 10:45:08.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_htb.c 2004-10-21 10:52:50.000000000 +0200 @@ -794,6 +794,7 @@ htb_activate (q,cl); sch->q.qlen++; + sch->qstats.requeues++; HTB_DBG(1,1,"htb_req_ok cl=%X skb=%p\n",(cl && cl != HTB_DIRECT)?cl->classid:0,skb); return NET_XMIT_SUCCESS; } --- linux-2.6.9-rc5.orig/net/sched/sch_netem.c 2004-10-21 10:45:08.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_netem.c 2004-10-21 10:52:50.000000000 +0200 @@ -211,8 +211,10 @@ struct netem_sched_data *q = qdisc_priv(sch); int ret; - if ((ret = q->qdisc->ops->requeue(skb, q->qdisc)) == 0) + if ((ret = q->qdisc->ops->requeue(skb, q->qdisc)) == 0) { sch->q.qlen++; + sch->qstats.requeues++; + } return ret; } --- linux-2.6.9-rc5.orig/net/sched/sch_prio.c 2004-10-21 10:45:08.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_prio.c 2004-10-21 10:52:50.000000000 +0200 @@ -139,6 +139,7 @@ if ((ret = qdisc->ops->requeue(skb, qdisc)) == 0) { sch->q.qlen++; + sch->qstats.requeues++; return 0; } dropped: --- linux-2.6.9-rc5.orig/net/sched/sch_red.c 2004-10-21 10:45:08.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_red.c 2004-10-21 10:52:50.000000000 +0200 @@ -309,6 +309,7 @@ __skb_queue_head(&sch->q, skb); sch->qstats.backlog += skb->len; + sch->qstats.requeues++; return 0; } --- linux-2.6.9-rc5.orig/net/sched/sch_sfq.c 2004-10-21 10:45:08.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_sfq.c 2004-10-21 10:52:50.000000000 +0200 @@ -310,8 +310,10 @@ q->tail = x; } } - if (++sch->q.qlen < q->limit - 1) + if (++sch->q.qlen < q->limit - 1) { + sch->qstats.requeues++; return 0; + } sch->qstats.drops++; sfq_drop(sch); --- linux-2.6.9-rc5.orig/net/sched/sch_tbf.c 2004-10-21 10:45:08.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_tbf.c 2004-10-21 10:52:50.000000000 +0200 @@ -166,8 +166,10 @@ struct tbf_sched_data *q = qdisc_priv(sch); int ret; - if ((ret = q->qdisc->ops->requeue(skb, q->qdisc)) == 0) + if ((ret = q->qdisc->ops->requeue(skb, q->qdisc)) == 0) { sch->q.qlen++; + sch->qstats.requeues++; + } return ret; } --- linux-2.6.9-rc5.orig/net/sched/sch_teql.c 2004-10-21 10:45:08.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_teql.c 2004-10-21 10:52:50.000000000 +0200 @@ -113,6 +113,7 @@ struct teql_sched_data *q = qdisc_priv(sch); __skb_queue_head(&q->q, skb); + sch->qstats.requeues++; return 0; } From root@chaos.analogic.com Thu Oct 21 05:34:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 05:34:25 -0700 (PDT) Received: from chaos.analogic.com (chaos.analogic.com [204.178.40.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LCYJEx009432 for ; Thu, 21 Oct 2004 05:34:20 -0700 Received: from chaos.analogic.com (localhost.localdomain [127.0.0.1]) by chaos.analogic.com (8.12.11/8.12.11) with ESMTP id i9LCXqre011297; Thu, 21 Oct 2004 08:33:52 -0400 Received: (from root@localhost) by chaos.analogic.com (8.12.11/8.12.11/Submit) id i9LCXp5r011296; Thu, 21 Oct 2004 08:33:51 -0400 Date: Thu, 21 Oct 2004 08:33:51 -0400 (EDT) From: "Richard B. Johnson" Reply-To: root@chaos.analogic.com To: "John W. Linville" cc: netdev@oss.sgi.com, Linux kernel , jgarzik@pobox.com, romieu@fr.zoreil.com Subject: Re: [patch 2.6.9 9/11] r8169: Add MODULE_VERSION In-Reply-To: <20041020155938.T8775@tuxdriver.com> Message-ID: References: <20041020141146.C8775@tuxdriver.com> <20041020142858.L8775@tuxdriver.com> <20041020155938.T8775@tuxdriver.com> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="1678434306-544832866-1098362031=:10982" X-archive-position: 10627 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: root@chaos.analogic.com Precedence: bulk X-list: netdev Content-Length: 3848 Lines: 87 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1678434306-544832866-1098362031=:10982 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed On Wed, 20 Oct 2004, John W. Linville wrote: > On Wed, Oct 20, 2004 at 04:34:45PM -0400, Richard B. Johnson wrote: >> >> This makes warning error about : >> >> Warning: could not find versions for .tmp_versions/r8169.mod >> >> Do I have to enable something in .config (like CONFIG_MODVERSIONS)? >> If so, how does one make this transparent, to get rid of the >> warning if CONFIG_MODVERSIONS is not set? > > Odd...I don't get any such warning, with or without > CONFIG_MODVERSIONS... > > MODULE_VERSION is used elsewhere -- do you get that warning > from any other modules? Was this from a clean build? > > Send me your .config, and I'll look into it. > > Thanks, > > John It's a generic problem with compiling modules outside of the kernel. The attached module, complete with its Makefile shows the problem. We really need to fix such problems because, to use the same kernel for a development effort means that the kernel sources are on some NFS server, not writable by developers. They have write permissions only for their own workstations. Therefore, one can't copy their sources to the kernel tree, modify .config and then develop their modules. Cheers, Dick Johnson Penguin : Linux version 2.6.9 on an i686 machine (5537.79 GrumpyMips). 98.36% of all statistics are fiction. --1678434306-544832866-1098362031=:10982 Content-Type: APPLICATION/x-gzip; name="demo.tar.gz" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="demo.tar.gz" H4sIAPqpd0EAA+0Xa2/bNjBfrV9xcJBONmxZcuIGS5phiet0bpM4cJJuQxM4 tETZqiXSI6WkxtD/viMlP+OmWAEXK6YDbEl3x3vzjvRoxGtbmwXb3rP3Gw18 alh96nfHdnYb+/W9/T1ny3bshmNvQWPDdmlIZEwEwJbgPH6O72v0HxQ8lf9z MqJ+ENIN6cB82i/39r6Yf0Wb5d9GPqfuNDD/9obsWYL/ef63je3CpeAfqRvD tAzA5wJGVDAawgMVMuBMAsc3eAnI3hSUxNQDu1HtNK+rddzehW7gDonw4MSC t3zIJGfGtmEYJAwPCgV3OBp6QsLr1vt2s2UUCr9atQyHHxFqhWoTaokUNSnc Whiw5FP1PmEkQoK4h6ubk9ft7tXR/fjRu4eIe0l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zHsb7Qlf3xfNECoadOGzoH EnxyaBjnndc3Z63eGV5ILq5aZvHN5ZkaOxn6fat71e5cmEWnvrvXUASjVltd khWGx9U5ojhX66KSOD05qKPAh7ujYseNBWEDNLDJGb72k5DEXJhxVCqi7G9w MjufLA2eeVinZCURWVBFdoww8QuOsMIFHWDFU9Fzh8KjD+Y0PxVtc6kEr+zV E4aexCPzXat70Ts+a3WvizsSDqBJ2E/xgkS9AzwSMXxRQ93c8Up67irBFWXO wlhN7V8cpYta2hennVRJF7v3A/Vmckra4TVl88RzfYggFn9kaBqg79e/ta96 aS7n1DFloKk6/jN8dkxYxs/D+HwQK/DCJ/8+kl+I46Lry9Gb+/lcBNtYlHj5 X47hagmlnaGnDzuqkJAlQ6kgm1mQ1XbITzk55JBDDjnkkEMOOeSQQw455JBD Djn8p+AfppqmCwAoAAA= --1678434306-544832866-1098362031=:10982-- From tgraf@suug.ch Thu Oct 21 05:34:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 05:34:51 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LCYkTi009682 for ; Thu, 21 Oct 2004 05:34:46 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 662B2F; Thu, 21 Oct 2004 14:34:09 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id AA1471C0E9; Thu, 21 Oct 2004 14:34:52 +0200 (CEST) Date: Thu, 21 Oct 2004 14:34:52 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 2/16] PKT_SCHED: Max TLV types cleanup Message-ID: <20041021123452.GG21977@postel.suug.ch> References: <20041021123209.GE21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021123209.GE21977@postel.suug.ch> X-archive-position: 10628 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 2425 Lines: 122 Cleans up maximum TLV type of existing definitions and adds missing definitions for TBF, RED, GRED, and HTB. Signed-off-by: Thomas Graf --- linux-2.6.9-rc5.orig/include/linux/pkt_sched.h 2004-10-21 10:44:39.000000000 +0200 +++ linux-2.6.9-rc5/include/linux/pkt_sched.h 2004-10-21 11:09:53.000000000 +0200 @@ -117,8 +117,11 @@ TCA_TBF_PARMS, TCA_TBF_RTAB, TCA_TBF_PTAB, + __TCA_TBF_MAX, }; +#define TCA_TBF_MAX (__TCA_TBF_MAX - 1) + /* TEQL section */ @@ -151,8 +154,11 @@ TCA_RED_UNSPEC, TCA_RED_PARMS, TCA_RED_STAB, + __TCA_RED_MAX, }; +#define TCA_RED_MAX (__TCA_RED_MAX - 1) + struct tc_red_qopt { __u32 limit; /* HARD maximal queue length (bytes) */ @@ -183,8 +189,11 @@ TCA_GRED_PARMS, TCA_GRED_STAB, TCA_GRED_DPS, + __TCA_GRED_MAX, }; +#define TCA_GRED_MAX (__TCA_GRED_MAX - 1) + #define TCA_SET_OFF TCA_GRED_PARMS struct tc_gred_qopt { @@ -249,7 +258,11 @@ TCA_HTB_INIT, TCA_HTB_CTAB, TCA_HTB_RTAB, + __TCA_HTB_MAX, }; + +#define TCA_HTB_MAX (__TCA_HTB_MAX - 1) + struct tc_htb_xstats { __u32 lends; @@ -287,9 +300,12 @@ TCA_HFSC_RSC, TCA_HFSC_FSC, TCA_HFSC_USC, - TCA_HFSC_MAX = TCA_HFSC_USC + __TCA_HFSC_MAX, }; +#define TCA_HFSC_MAX (__TCA_HFSC_MAX - 1) + + /* CBQ section */ #define TC_CBQ_MAXPRIO 8 @@ -370,9 +386,10 @@ TCA_CBQ_RATE, TCA_CBQ_RTAB, TCA_CBQ_POLICE, + __TCA_CBQ_MAX, }; -#define TCA_CBQ_MAX TCA_CBQ_POLICE +#define TCA_CBQ_MAX (__TCA_CBQ_MAX - 1) /* dsmark section */ @@ -382,10 +399,11 @@ TCA_DSMARK_DEFAULT_INDEX, TCA_DSMARK_SET_TC_INDEX, TCA_DSMARK_MASK, - TCA_DSMARK_VALUE + TCA_DSMARK_VALUE, + __TCA_DSMARK_MAX, }; -#define TCA_DSMARK_MAX TCA_DSMARK_VALUE +#define TCA_DSMARK_MAX (__TCA_DSMARK_MAX - 1) /* ATM section */ @@ -396,10 +414,11 @@ TCA_ATM_HDR, /* LL header */ TCA_ATM_EXCESS, /* excess traffic class (0 for CLP) */ TCA_ATM_ADDR, /* PVC address (for output only) */ - TCA_ATM_STATE /* VC state (ATM_VS_*; for output only) */ + TCA_ATM_STATE, /* VC state (ATM_VS_*; for output only) */ + __TCA_ATM_MAX, }; -#define TCA_ATM_MAX TCA_ATM_STATE +#define TCA_ATM_MAX (__TCA_ATM_MAX - 1) /* Network emulator */ @@ -408,9 +427,10 @@ TCA_NETEM_UNSPEC, TCA_NETEM_CORR, TCA_NETEM_DELAY_DIST, + __TCA_NETEM_MAX, }; -#define TCA_NETEM_MAX TCA_NETEM_DELAY_DIST +#define TCA_NETEM_MAX (__TCA_NETEM_MAX - 1) struct tc_netem_qopt { From tgraf@suug.ch Thu Oct 21 05:36:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 05:36:27 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LCaKbq010147 for ; Thu, 21 Oct 2004 05:36:20 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 91550F; Thu, 21 Oct 2004 14:35:43 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id DEC8C1C0E9; Thu, 21 Oct 2004 14:36:26 +0200 (CEST) Date: Thu, 21 Oct 2004 14:36:26 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 3/16] PKT_SCHED: Add dump_stats qdisc op Message-ID: <20041021123626.GH21977@postel.suug.ch> References: <20041021123209.GE21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021123209.GE21977@postel.suug.ch> X-archive-position: 10629 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 1178 Lines: 30 Adds a new qdisc operation dump_stats which qdiscs can use to dump statistics. The op is invoked between gnet_stats_start_copy and gnet_stats_finish_copy and therefore stats_lock is already held. This is required to ensure proper locking throughout the whole statistic dumping procedure. Signed-off-by: Thomas Graf --- linux-2.6.9-rc5.orig/include/net/pkt_sched.h 2004-10-21 10:44:44.000000000 +0200 +++ linux-2.6.9-rc5/include/net/pkt_sched.h 2004-10-21 11:11:45.000000000 +0200 @@ -64,6 +64,7 @@ int (*change)(struct Qdisc *, struct rtattr *arg); int (*dump)(struct Qdisc *, struct sk_buff *); + int (*dump_stats)(struct Qdisc *, struct gnet_dump *); struct module *owner; }; --- linux-2.6.9-rc5.orig/net/sched/sch_api.c 2004-10-21 10:45:08.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_api.c 2004-10-21 11:11:45.000000000 +0200 @@ -767,6 +767,9 @@ TCA_XSTATS, q->stats_lock, &d) < 0) goto rtattr_failure; + if (q->ops->dump_stats && q->ops->dump_stats(q, &d) < 0) + goto rtattr_failure; + if (gnet_stats_copy_basic(&d, &q->bstats) < 0 || #ifdef CONFIG_NET_ESTIMATOR gnet_stats_copy_rate_est(&d, &q->rate_est) < 0 || From tgraf@suug.ch Thu Oct 21 05:37:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 05:37:24 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LCbICV010417 for ; Thu, 21 Oct 2004 05:37:18 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 26C8BF; Thu, 21 Oct 2004 14:36:41 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 76F971C0E9; Thu, 21 Oct 2004 14:37:24 +0200 (CEST) Date: Thu, 21 Oct 2004 14:37:24 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 4/16] CBQ: use dump_stats Message-ID: <20041021123724.GI21977@postel.suug.ch> References: <20041021123209.GE21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021123209.GE21977@postel.suug.ch> X-archive-position: 10630 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 1192 Lines: 44 Makes CBQ use dump_stats qdisc op to provide xstats. Signed-off-by: Thomas Graf --- linux-2.6.9-rc5.orig/net/sched/sch_cbq.c 2004-10-21 11:07:46.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_cbq.c 2004-10-21 11:20:06.000000000 +0200 @@ -1633,13 +1633,6 @@ if (cbq_dump_attr(skb, &q->link) < 0) goto rtattr_failure; rta->rta_len = skb->tail - b; - spin_lock_bh(&sch->dev->queue_lock); - q->link.xstats.avgidle = q->link.avgidle; - if (cbq_copy_xstats(skb, &q->link.xstats)) { - spin_unlock_bh(&sch->dev->queue_lock); - goto rtattr_failure; - } - spin_unlock_bh(&sch->dev->queue_lock); return skb->len; rtattr_failure: @@ -1648,6 +1641,15 @@ } static int +cbq_dump_stats(struct Qdisc *sch, struct gnet_dump *d) +{ + struct cbq_sched_data *q = qdisc_priv(sch); + + q->link.xstats.avgidle = q->link.avgidle; + return gnet_stats_copy_app(d, &q->link.xstats, sizeof(q->link.xstats)); +} + +static int cbq_dump_class(struct Qdisc *sch, unsigned long arg, struct sk_buff *skb, struct tcmsg *tcm) { @@ -2133,6 +2135,7 @@ .destroy = cbq_destroy, .change = NULL, .dump = cbq_dump, + .dump_stats = cbq_dump_stats, .owner = THIS_MODULE, }; From tgraf@suug.ch Thu Oct 21 05:38:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 05:38:27 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LCcL20010815 for ; Thu, 21 Oct 2004 05:38:21 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 2D379F; Thu, 21 Oct 2004 14:37:44 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 742841C0E9; Thu, 21 Oct 2004 14:38:27 +0200 (CEST) Date: Thu, 21 Oct 2004 14:38:27 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 5/16] RED: use dump_stats Message-ID: <20041021123827.GJ21977@postel.suug.ch> References: <20041021123209.GE21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021123209.GE21977@postel.suug.ch> X-archive-position: 10631 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 1244 Lines: 55 Makes RED use dump_stats qdisc op. Signed-off-by: Thomas Graf --- linux-2.6.9-rc5.orig/net/sched/sch_red.c 2004-10-21 11:07:46.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_red.c 2004-10-21 12:49:10.000000000 +0200 @@ -396,16 +396,6 @@ return red_change(sch, opt); } - -int red_copy_xstats(struct sk_buff *skb, struct tc_red_xstats *st) -{ - RTA_PUT(skb, TCA_XSTATS, sizeof(*st), st); - return 0; - -rtattr_failure: - return 1; -} - static int red_dump(struct Qdisc *sch, struct sk_buff *skb) { struct red_sched_data *q = qdisc_priv(sch); @@ -425,9 +415,6 @@ RTA_PUT(skb, TCA_RED_PARMS, sizeof(opt), &opt); rta->rta_len = skb->tail - b; - if (red_copy_xstats(skb, &q->st)) - goto rtattr_failure; - return skb->len; rtattr_failure: @@ -435,6 +422,13 @@ return -1; } +static int red_dump_stats(struct Qdisc *sch, struct gnet_dump *d) +{ + struct red_sched_data *q = qdisc_priv(sch); + + return gnet_stats_copy_app(d, &q->st, sizeof(q->st)); +} + static struct Qdisc_ops red_qdisc_ops = { .next = NULL, .cl_ops = NULL, @@ -448,6 +442,7 @@ .reset = red_reset, .change = red_change, .dump = red_dump, + .dump_stats = red_dump_stats, .owner = THIS_MODULE, }; From tgraf@suug.ch Thu Oct 21 05:39:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 05:39:25 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LCdJnR011055 for ; Thu, 21 Oct 2004 05:39:20 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id ED763F; Thu, 21 Oct 2004 14:38:42 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 475921C0E9; Thu, 21 Oct 2004 14:39:26 +0200 (CEST) Date: Thu, 21 Oct 2004 14:39:26 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 6/16] PKT_SCHED: Add dump_stats class op Message-ID: <20041021123926.GK21977@postel.suug.ch> References: <20041021123209.GE21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021123209.GE21977@postel.suug.ch> X-archive-position: 10632 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 1699 Lines: 49 Adds a new class operation dump_stats which classes can use to dump statistics. Unlike in qdiscs, there are no common statistics therefore classes must dump all statistics on their own. The qdisc stats_lock is being used for locking. Signed-off-by: Thomas Graf --- linux-2.6.9-rc5.orig/include/net/pkt_sched.h 2004-10-21 11:13:03.000000000 +0200 +++ linux-2.6.9-rc5/include/net/pkt_sched.h 2004-10-21 12:52:11.000000000 +0200 @@ -42,6 +42,7 @@ /* rtnetlink specific */ int (*dump)(struct Qdisc *, unsigned long, struct sk_buff *skb, struct tcmsg*); + int (*dump_stats)(struct Qdisc *, unsigned long, struct gnet_dump *); }; struct module; --- linux-2.6.9-rc5.orig/net/sched/sch_api.c 2004-10-21 11:13:03.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_api.c 2004-10-21 12:52:11.000000000 +0200 @@ -985,6 +985,8 @@ struct tcmsg *tcm; struct nlmsghdr *nlh; unsigned char *b = skb->tail; + struct gnet_dump d; + struct Qdisc_class_ops *cl_ops = q->ops->cl_ops; nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(*tcm)); nlh->nlmsg_flags = flags; @@ -995,8 +997,19 @@ tcm->tcm_handle = q->handle; tcm->tcm_info = 0; RTA_PUT(skb, TCA_KIND, IFNAMSIZ, q->ops->id); - if (q->ops->cl_ops->dump && q->ops->cl_ops->dump(q, cl, skb, tcm) < 0) + if (cl_ops->dump && cl_ops->dump(q, cl, skb, tcm) < 0) goto rtattr_failure; + + if (gnet_stats_start_copy_compat(skb, TCA_STATS2, TCA_STATS, + TCA_XSTATS, q->stats_lock, &d) < 0) + goto rtattr_failure; + + if (cl_ops->dump_stats && cl_ops->dump_stats(q, cl, &d) < 0) + goto rtattr_failure; + + if (gnet_stats_finish_copy(&d) < 0) + goto rtattr_failure; + nlh->nlmsg_len = skb->tail - b; return skb->len; From tgraf@suug.ch Thu Oct 21 05:40:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 05:40:38 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LCeX49011519 for ; Thu, 21 Oct 2004 05:40:33 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 1004EF; Thu, 21 Oct 2004 14:39:56 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 56D711C0E9; Thu, 21 Oct 2004 14:40:39 +0200 (CEST) Date: Thu, 21 Oct 2004 14:40:39 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 7/16] CBQ: Use gnet_stats for class statistics Message-ID: <20041021124039.GL21977@postel.suug.ch> References: <20041021123209.GE21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021123209.GE21977@postel.suug.ch> X-archive-position: 10633 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 1459 Lines: 65 Converts CBQ class statistics counters to gnet_stats structures. Signed-off-by: Thomas Graf --- linux-2.6.9-rc5.orig/net/sched/sch_cbq.c 2004-10-21 12:45:47.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_cbq.c 2004-10-21 12:57:37.000000000 +0200 @@ -146,7 +146,9 @@ long avgidle; long deficit; /* Saved deficit for WRR */ unsigned long penalized; - struct tc_stats stats; + struct gnet_stats_basic bstats; + struct gnet_stats_queue qstats; + struct gnet_stats_rate_est rate_est; spinlock_t *stats_lock; struct tc_cbq_xstats xstats; @@ -448,7 +450,7 @@ kfree_skb(skb); else { cbq_mark_toplevel(q, cl); - cl->stats.drops++; + cl->qstats.drops++; } #else if ( NET_XMIT_DROP == ret) { @@ -457,7 +459,7 @@ if (cl != NULL) { cbq_mark_toplevel(q, cl); - cl->stats.drops++; + cl->qstats.drops++; } #endif return ret; @@ -491,7 +493,7 @@ return 0; } sch->qstats.drops++; - cl->stats.drops++; + cl->qstats.drops++; return ret; } @@ -789,8 +791,8 @@ long avgidle = cl->avgidle; long idle; - cl->stats.packets++; - cl->stats.bytes += len; + cl->bstats.packets++; + cl->bstats.bytes += len; /* (now - last) is total time between packet right edges. @@ -888,7 +890,7 @@ no another solution exists. */ if ((cl = cl->borrow) == NULL) { - this_cl->stats.overlimits++; + this_cl->qstats.overlimits++; this_cl->overlimit(this_cl); return NULL; } From tgraf@suug.ch Thu Oct 21 05:43:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 05:43:29 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LChNRl011895 for ; Thu, 21 Oct 2004 05:43:24 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 7220AF; Thu, 21 Oct 2004 14:42:46 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 682971C0E9; Thu, 21 Oct 2004 14:43:29 +0200 (CEST) Date: Thu, 21 Oct 2004 14:43:29 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 8/16] CBQ: Use dump_stats for class statistics dumping Message-ID: <20041021124329.GM21977@postel.suug.ch> References: <20041021123209.GE21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021123209.GE21977@postel.suug.ch> X-archive-position: 10634 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 2486 Lines: 90 Makes CBQ use dump_stats to dump class statistics, i.e. moves the statistic dump code from cbq_dump_class to cbq_dump_class_stats. Signed-off-by: Thomas Graf --- linux-2.6.9-rc5.orig/net/sched/sch_cbq.c 2004-10-21 12:59:00.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_cbq.c 2004-10-21 12:59:32.000000000 +0200 @@ -1614,16 +1614,6 @@ return 0; } -int cbq_copy_xstats(struct sk_buff *skb, struct tc_cbq_xstats *st) -{ - RTA_PUT(skb, TCA_XSTATS, sizeof(*st), st); - return 0; - -rtattr_failure: - return -1; -} - - static int cbq_dump(struct Qdisc *sch, struct sk_buff *skb) { struct cbq_sched_data *q = qdisc_priv(sch); @@ -1655,7 +1645,6 @@ cbq_dump_class(struct Qdisc *sch, unsigned long arg, struct sk_buff *skb, struct tcmsg *tcm) { - struct cbq_sched_data *q = qdisc_priv(sch); struct cbq_class *cl = (struct cbq_class*)arg; unsigned char *b = skb->tail; struct rtattr *rta; @@ -1672,25 +1661,35 @@ if (cbq_dump_attr(skb, cl) < 0) goto rtattr_failure; rta->rta_len = skb->tail - b; - cl->stats.qlen = cl->q->q.qlen; - if (qdisc_copy_stats(skb, &cl->stats, cl->stats_lock)) - goto rtattr_failure; - spin_lock_bh(&sch->dev->queue_lock); + return skb->len; + +rtattr_failure: + skb_trim(skb, b - skb->data); + return -1; +} + +static int +cbq_dump_class_stats(struct Qdisc *sch, unsigned long arg, + struct gnet_dump *d) +{ + struct cbq_sched_data *q = qdisc_priv(sch); + struct cbq_class *cl = (struct cbq_class*)arg; + + cl->qstats.qlen = cl->q->q.qlen; cl->xstats.avgidle = cl->avgidle; cl->xstats.undertime = 0; + if (!PSCHED_IS_PASTPERFECT(cl->undertime)) cl->xstats.undertime = PSCHED_TDIFF(cl->undertime, q->now); - if (cbq_copy_xstats(skb, &cl->xstats)) { - spin_unlock_bh(&sch->dev->queue_lock); - goto rtattr_failure; - } - spin_unlock_bh(&sch->dev->queue_lock); - return skb->len; + if (gnet_stats_copy_basic(d, &cl->bstats) < 0 || +#ifdef CONFIG_NET_ESTIMATOR + gnet_stats_copy_rate_est(d, &cl->rate_est) < 0 || +#endif + gnet_stats_copy_queue(d, &cl->qstats) < 0) + return -1; -rtattr_failure: - skb_trim(skb, b - skb->data); - return -1; + return gnet_stats_copy_app(d, &cl->xstats, sizeof(cl->xstats)); } static int cbq_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, @@ -2121,6 +2120,7 @@ .bind_tcf = cbq_bind_filter, .unbind_tcf = cbq_unbind_filter, .dump = cbq_dump_class, + .dump_stats = cbq_dump_class_stats, }; static struct Qdisc_ops cbq_qdisc_ops = { From tgraf@suug.ch Thu Oct 21 05:44:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 05:44:26 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LCiKFA012174 for ; Thu, 21 Oct 2004 05:44:21 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id C9CBBF; Thu, 21 Oct 2004 14:43:43 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 0CA631C0E9; Thu, 21 Oct 2004 14:44:27 +0200 (CEST) Date: Thu, 21 Oct 2004 14:44:26 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 9/16] CBQ: Use generic rate estimator Message-ID: <20041021124426.GN21977@postel.suug.ch> References: <20041021123209.GE21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021123209.GE21977@postel.suug.ch> X-archive-position: 10635 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 1127 Lines: 41 Makes CBQ use the generic rate estimator. Signed-off-by: Thomas Graf --- linux-2.6.9-rc5.orig/net/sched/sch_cbq.c 2004-10-21 13:00:53.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_cbq.c 2004-10-21 13:01:20.000000000 +0200 @@ -1759,7 +1759,7 @@ qdisc_destroy(cl->q); qdisc_put_rtab(cl->R_tab); #ifdef CONFIG_NET_ESTIMATOR - qdisc_kill_estimator(&cl->stats); + gen_kill_estimator(&cl->bstats, &cl->rate_est); #endif if (cl != &q->link) kfree(cl); @@ -1905,11 +1905,9 @@ sch_tree_unlock(sch); #ifdef CONFIG_NET_ESTIMATOR - if (tca[TCA_RATE-1]) { - qdisc_kill_estimator(&cl->stats); - qdisc_new_estimator(&cl->stats, cl->stats_lock, - tca[TCA_RATE-1]); - } + if (tca[TCA_RATE-1]) + gen_replace_estimator(&cl->bstats, &cl->rate_est, + cl->stats_lock, tca[TCA_RATE-1]); #endif return 0; } @@ -1999,8 +1997,8 @@ #ifdef CONFIG_NET_ESTIMATOR if (tca[TCA_RATE-1]) - qdisc_new_estimator(&cl->stats, cl->stats_lock, - tca[TCA_RATE-1]); + gen_new_estimator(&cl->bstats, &cl->rate_est, + cl->stats_lock, tca[TCA_RATE-1]); #endif *arg = (unsigned long)cl; From tgraf@suug.ch Thu Oct 21 05:45:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 05:45:17 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LCjAWR012454 for ; Thu, 21 Oct 2004 05:45:11 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id F17EBF; Thu, 21 Oct 2004 14:44:33 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 2D3571C0E9; Thu, 21 Oct 2004 14:45:17 +0200 (CEST) Date: Thu, 21 Oct 2004 14:45:17 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 10/16] HTB: Use gnet_stats for class statistics Message-ID: <20041021124517.GO21977@postel.suug.ch> References: <20041021123209.GE21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021123209.GE21977@postel.suug.ch> X-archive-position: 10636 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 1497 Lines: 51 Converts HTB class statistic counters to gnet_stats structures. Signed-off-by: Thomas Graf --- linux-2.6.9-rc5.orig/net/sched/sch_htb.c 2004-10-21 11:07:46.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_htb.c 2004-10-21 13:03:29.000000000 +0200 @@ -142,7 +142,9 @@ #endif /* general class parameters */ u32 classid; - struct tc_stats stats; /* generic stats */ + struct gnet_stats_basic bstats; + struct gnet_stats_queue qstats; + struct gnet_stats_rate_est rate_est; spinlock_t *stats_lock; struct tc_htb_xstats xstats;/* our special stats */ int refcnt; /* usage count of this class */ @@ -754,10 +756,10 @@ #endif else if (cl->un.leaf.q->enqueue(skb, cl->un.leaf.q) != NET_XMIT_SUCCESS) { sch->qstats.drops++; - cl->stats.drops++; + cl->qstats.drops++; return NET_XMIT_DROP; } else { - cl->stats.packets++; cl->stats.bytes += skb->len; + cl->bstats.packets++; cl->bstats.bytes += skb->len; htb_activate (q,cl); } @@ -788,7 +790,7 @@ } } else if (cl->un.leaf.q->ops->requeue(skb, cl->un.leaf.q) != NET_XMIT_SUCCESS) { sch->qstats.drops++; - cl->stats.drops++; + cl->qstats.drops++; return NET_XMIT_DROP; } else htb_activate (q,cl); @@ -906,8 +908,8 @@ /* update byte stats except for leaves which are already updated */ if (cl->level) { - cl->stats.bytes += bytes; - cl->stats.packets++; + cl->bstats.bytes += bytes; + cl->bstats.packets++; } cl = cl->parent; } From tgraf@suug.ch Thu Oct 21 05:46:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 05:46:14 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LCk9GC012819 for ; Thu, 21 Oct 2004 05:46:09 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 58751F; Thu, 21 Oct 2004 14:45:32 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id A2D8B1C0E9; Thu, 21 Oct 2004 14:46:15 +0200 (CEST) Date: Thu, 21 Oct 2004 14:46:15 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 11/16] HTB: Use dump_stats for class statistics dumping Message-ID: <20041021124615.GP21977@postel.suug.ch> References: <20041021123209.GE21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021123209.GE21977@postel.suug.ch> X-archive-position: 10637 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 2467 Lines: 84 Makes HTB use dump_stats to dump class statistics, i.e. moves the statistics dump code from htb_dump_class to htb_dump_class_stats. Signed-off-by: Thomas Graf --- linux-2.6.9-rc5.orig/net/sched/sch_htb.c 2004-10-21 13:05:35.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_htb.c 2004-10-21 13:06:07.000000000 +0200 @@ -1319,7 +1319,6 @@ struct rtattr *rta; struct tc_htb_glob gopt; HTB_DBG(0,1,"htb_dump sch=%p, handle=%X\n",sch,sch->handle); - /* stats */ HTB_QLOCK(sch); gopt.direct_pkts = q->direct_pkts; @@ -1359,10 +1358,8 @@ HTB_QLOCK(sch); tcm->tcm_parent = cl->parent ? cl->parent->classid : TC_H_ROOT; tcm->tcm_handle = cl->classid; - if (!cl->level && cl->un.leaf.q) { + if (!cl->level && cl->un.leaf.q) tcm->tcm_info = cl->un.leaf.q->handle; - cl->stats.qlen = cl->un.leaf.q->q.qlen; - } rta = (struct rtattr*)b; RTA_PUT(skb, TCA_OPTIONS, 0, NULL); @@ -1375,16 +1372,6 @@ opt.level = cl->level; RTA_PUT(skb, TCA_HTB_PARMS, sizeof(opt), &opt); rta->rta_len = skb->tail - b; - -#ifdef HTB_RATECM - cl->stats.bps = cl->rate_bytes/(HTB_EWMAC*HTB_HSIZE); - cl->stats.pps = cl->rate_packets/(HTB_EWMAC*HTB_HSIZE); -#endif - - cl->xstats.tokens = cl->tokens; - cl->xstats.ctokens = cl->ctokens; - RTA_PUT(skb, TCA_STATS, sizeof(cl->stats), &cl->stats); - RTA_PUT(skb, TCA_XSTATS, sizeof(cl->xstats), &cl->xstats); HTB_QUNLOCK(sch); return skb->len; rtattr_failure: @@ -1393,6 +1380,30 @@ return -1; } +static int +htb_dump_class_stats(struct Qdisc *sch, unsigned long arg, + struct gnet_dump *d) +{ + struct htb_class *cl = (struct htb_class*)arg; + +#ifdef HTB_RATECM + cl->rate_est.bps = cl->rate_bytes/(HTB_EWMAC*HTB_HSIZE); + cl->rate_est.pps = cl->rate_packets/(HTB_EWMAC*HTB_HSIZE); +#endif + + if (!cl->level && cl->un.leaf.q) + cl->qstats.qlen = cl->un.leaf.q->q.qlen; + cl->xstats.tokens = cl->tokens; + cl->xstats.ctokens = cl->ctokens; + + if (gnet_stats_copy_basic(d, &cl->bstats) < 0 || + gnet_stats_copy_rate_est(d, &cl->rate_est) < 0 || + gnet_stats_copy_queue(d, &cl->qstats) < 0) + return -1; + + return gnet_stats_copy_app(d, &cl->xstats, sizeof(cl->xstats)); +} + static int htb_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, struct Qdisc **old) { @@ -1747,6 +1758,7 @@ .bind_tcf = htb_bind_filter, .unbind_tcf = htb_unbind_filter, .dump = htb_dump_class, + .dump_stats = htb_dump_class_stats, }; static struct Qdisc_ops htb_qdisc_ops = { From tgraf@suug.ch Thu Oct 21 05:47:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 05:47:22 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LClHSY013208 for ; Thu, 21 Oct 2004 05:47:17 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 17AFFF; Thu, 21 Oct 2004 14:46:40 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 597621C0E9; Thu, 21 Oct 2004 14:47:23 +0200 (CEST) Date: Thu, 21 Oct 2004 14:47:23 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 12/16] HTB: Remove unneeded rate estimator bits Message-ID: <20041021124723.GQ21977@postel.suug.ch> References: <20041021123209.GE21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021123209.GE21977@postel.suug.ch> X-archive-position: 10638 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 965 Lines: 27 Removes old generic unused rate estimator bits. HTB has its own rate estimator routines and therefore no rate estimator is created so there is no need to try and delete one. We might want to convert it to the generic rate estimator at a later point. Signed-off-by: Thomas Graf --- linux-2.6.9-rc5.orig/net/sched/sch_htb.c 2004-10-21 13:08:24.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_htb.c 2004-10-21 13:08:54.000000000 +0200 @@ -145,7 +145,6 @@ struct gnet_stats_basic bstats; struct gnet_stats_queue qstats; struct gnet_stats_rate_est rate_est; - spinlock_t *stats_lock; struct tc_htb_xstats xstats;/* our special stats */ int refcnt; /* usage count of this class */ @@ -1468,9 +1467,6 @@ qdisc_put_rtab(cl->rate); qdisc_put_rtab(cl->ceil); -#ifdef CONFIG_NET_ESTIMATOR - qdisc_kill_estimator(&cl->stats); -#endif htb_destroy_filters (&cl->filter_list); while (!list_empty(&cl->children)) From tgraf@suug.ch Thu Oct 21 05:48:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 05:48:23 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LCmIZ2013514 for ; Thu, 21 Oct 2004 05:48:18 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 15074F; Thu, 21 Oct 2004 14:47:41 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 50D191C0E9; Thu, 21 Oct 2004 14:48:24 +0200 (CEST) Date: Thu, 21 Oct 2004 14:48:24 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 13/16] HFSC: Use gnet_stats for class statistics Message-ID: <20041021124824.GR21977@postel.suug.ch> References: <20041021123209.GE21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021123209.GE21977@postel.suug.ch> X-archive-position: 10639 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 1294 Lines: 47 Converts HTB class statistic counters to gnet_stats structures. Signed-off-by: Thomas Graf --- linux-2.6.9-rc5.orig/net/sched/sch_hfsc.c 2004-10-21 11:07:46.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_hfsc.c 2004-10-21 13:11:06.000000000 +0200 @@ -122,7 +122,9 @@ u32 classid; /* class id */ unsigned int refcnt; /* usage count */ - struct tc_stats stats; /* generic statistics */ + struct gnet_stats_basic bstats; + struct gnet_stats_queue qstats; + struct gnet_stats_rate_est rate_est; spinlock_t *stats_lock; unsigned int level; /* class level in hierarchy */ struct tcf_proto *filter_list; /* filter list */ @@ -1686,7 +1688,7 @@ err = cl->qdisc->enqueue(skb, cl->qdisc); if (unlikely(err != NET_XMIT_SUCCESS)) { - cl->stats.drops++; + cl->qstats.drops++; sch->qstats.drops++; return err; } @@ -1694,8 +1696,8 @@ if (cl->qdisc->q.qlen == 1) set_active(cl, len); - cl->stats.packets++; - cl->stats.bytes += len; + cl->bstats.packets++; + cl->bstats.bytes += len; sch->bstats.packets++; sch->bstats.bytes += len; sch->q.qlen++; @@ -1799,7 +1801,7 @@ } else { list_move_tail(&cl->dlist, &q->droplist); } - cl->stats.drops++; + cl->qstats.drops++; sch->qstats.drops++; sch->q.qlen--; return len; From tgraf@suug.ch Thu Oct 21 05:49:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 05:49:24 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LCnIqO013798 for ; Thu, 21 Oct 2004 05:49:19 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 6CAA0F; Thu, 21 Oct 2004 14:48:41 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id AA02C1C0E9; Thu, 21 Oct 2004 14:49:24 +0200 (CEST) Date: Thu, 21 Oct 2004 14:49:24 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 14/16] HFSC: Use generic rate estimator Message-ID: <20041021124924.GS21977@postel.suug.ch> References: <20041021123209.GE21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021123209.GE21977@postel.suug.ch> X-archive-position: 10640 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 1157 Lines: 41 Makes HFSC use the generic rate estimator. Signed-off-by: Thomas Graf --- linux-2.6.9-rc5.orig/net/sched/sch_hfsc.c 2004-10-21 13:12:24.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_hfsc.c 2004-10-21 13:12:53.000000000 +0200 @@ -1100,11 +1100,9 @@ sch_tree_unlock(sch); #ifdef CONFIG_NET_ESTIMATOR - if (tca[TCA_RATE-1]) { - qdisc_kill_estimator(&cl->stats); - qdisc_new_estimator(&cl->stats, cl->stats_lock, - tca[TCA_RATE-1]); - } + if (tca[TCA_RATE-1]) + gen_replace_estimator(&cl->bstats, &cl->rate_est, + cl->stats_lock, tca[TCA_RATE-1]); #endif return 0; } @@ -1162,8 +1160,8 @@ #ifdef CONFIG_NET_ESTIMATOR if (tca[TCA_RATE-1]) - qdisc_new_estimator(&cl->stats, cl->stats_lock, - tca[TCA_RATE-1]); + gen_new_estimator(&cl->bstats, &cl->rate_est, + cl->stats_lock, tca[TCA_RATE-1]); #endif *arg = (unsigned long)cl; return 0; @@ -1188,7 +1186,7 @@ hfsc_destroy_filters(&cl->filter_list); qdisc_destroy(cl->qdisc); #ifdef CONFIG_NET_ESTIMATOR - qdisc_kill_estimator(&cl->stats); + gen_kill_estimator(&cl->bstats, &cl->rate_est); #endif if (cl != &q->root) kfree(cl); From tgraf@suug.ch Thu Oct 21 05:51:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 05:51:11 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LCp6T9014212 for ; Thu, 21 Oct 2004 05:51:06 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 2D217F; Thu, 21 Oct 2004 14:50:29 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id BFBAF1C0E9; Thu, 21 Oct 2004 14:51:11 +0200 (CEST) Date: Thu, 21 Oct 2004 14:51:11 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 15/16] HFSC: Use dump_stats for class statistics dumping Message-ID: <20041021125111.GT21977@postel.suug.ch> References: <20041021123209.GE21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021123209.GE21977@postel.suug.ch> X-archive-position: 10641 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 2314 Lines: 97 Makes HFSC use dump_stats to dump class statistics, i.e. moves the statistics dump code from hfsc_dump_class to hfsc_dump_class_stats. Signed-off-by: Thomas Graf --- linux-2.6.9-rc5.orig/net/sched/sch_hfsc.c 2004-10-21 13:13:16.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_hfsc.c 2004-10-21 13:13:46.000000000 +0200 @@ -1404,36 +1404,6 @@ return -1; } -static inline int -hfsc_dump_stats(struct sk_buff *skb, struct hfsc_class *cl) -{ - cl->stats.qlen = cl->qdisc->q.qlen; - if (qdisc_copy_stats(skb, &cl->stats, cl->stats_lock) < 0) - goto rtattr_failure; - - return skb->len; - - rtattr_failure: - return -1; -} - -static inline int -hfsc_dump_xstats(struct sk_buff *skb, struct hfsc_class *cl) -{ - struct tc_hfsc_stats xstats; - - xstats.level = cl->level; - xstats.period = cl->cl_vtperiod; - xstats.work = cl->cl_total; - xstats.rtwork = cl->cl_cumul; - RTA_PUT(skb, TCA_XSTATS, sizeof(xstats), &xstats); - - return skb->len; - - rtattr_failure: - return -1; -} - static int hfsc_dump_class(struct Qdisc *sch, unsigned long arg, struct sk_buff *skb, struct tcmsg *tcm) @@ -1451,11 +1421,6 @@ if (hfsc_dump_curves(skb, cl) < 0) goto rtattr_failure; rta->rta_len = skb->tail - b; - - if ((hfsc_dump_stats(skb, cl) < 0) || - (hfsc_dump_xstats(skb, cl) < 0)) - goto rtattr_failure; - return skb->len; rtattr_failure: @@ -1463,6 +1428,31 @@ return -1; } +static int +hfsc_dump_class_stats(struct Qdisc *sch, unsigned long arg, + struct gnet_dump *d) +{ + struct hfsc_class *cl = (struct hfsc_class *)arg; + struct tc_hfsc_stats xstats; + + cl->qstats.qlen = cl->qdisc->q.qlen; + xstats.level = cl->level; + xstats.period = cl->cl_vtperiod; + xstats.work = cl->cl_total; + xstats.rtwork = cl->cl_cumul; + + if (gnet_stats_copy_basic(d, &cl->bstats) < 0 || +#ifdef CONFIG_NET_ESTIMATOR + gnet_stats_copy_rate_est(d, &cl->rate_est) < 0 || +#endif + gnet_stats_copy_queue(d, &cl->qstats) < 0) + return -1; + + return gnet_stats_copy_app(d, &xstats, sizeof(xstats)); +} + + + static void hfsc_walk(struct Qdisc *sch, struct qdisc_walker *arg) { @@ -1819,6 +1809,7 @@ .unbind_tcf = hfsc_unbind_tcf, .tcf_chain = hfsc_tcf_chain, .dump = hfsc_dump_class, + .dump_stats = hfsc_dump_class_stats, .walk = hfsc_walk }; From tgraf@suug.ch Thu Oct 21 05:51:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 05:52:01 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LCpt7L014460 for ; Thu, 21 Oct 2004 05:51:55 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 63D62F; Thu, 21 Oct 2004 14:51:18 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id AAF421C0E9; Thu, 21 Oct 2004 14:52:01 +0200 (CEST) Date: Thu, 21 Oct 2004 14:52:01 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 16/16] ATM: Use gnet_stats for class statistics and dump them Message-ID: <20041021125201.GU21977@postel.suug.ch> References: <20041021123209.GE21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021123209.GE21977@postel.suug.ch> X-archive-position: 10642 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 2117 Lines: 74 Makes ATM qdisc use gnet_stats for class statistic counters and adds dumping bits to actually dump those. Althought the counters were updated they never got dumped to userspace. Signed-off-by: Thomas Graf --- linux-2.6.9-rc5.orig/net/sched/sch_atm.c 2004-10-21 11:07:46.000000000 +0200 +++ linux-2.6.9-rc5/net/sched/sch_atm.c 2004-10-21 13:26:05.000000000 +0200 @@ -69,7 +69,8 @@ struct socket *sock; /* for closing */ u32 classid; /* x:y type ID */ int ref; /* reference count */ - struct tc_stats stats; + struct gnet_stats_basic bstats; + struct gnet_stats_queue qstats; spinlock_t *stats_lock; struct atm_flow_data *next; struct atm_flow_data *excess; /* flow for excess traffic; @@ -450,13 +451,13 @@ #endif (ret = flow->q->enqueue(skb,flow->q)) != 0) { sch->qstats.drops++; - if (flow) flow->stats.drops++; + if (flow) flow->qstats.drops++; return ret; } sch->bstats.bytes += skb->len; sch->bstats.packets++; - flow->stats.bytes += skb->len; - flow->stats.packets++; + flow->bstats.bytes += skb->len; + flow->bstats.packets++; /* * Okay, this may seem weird. We pretend we've dropped the packet if * it goes via ATM. The reason for this is that the outer qdisc @@ -550,7 +551,7 @@ sch->qstats.requeues++; } else { sch->qstats.drops++; - p->link.stats.drops++; + p->link.qstats.drops++; } return ret; } @@ -666,6 +667,21 @@ skb_trim(skb,b-skb->data); return -1; } +static int +atm_tc_dump_class_stats(struct Qdisc *sch, unsigned long arg, + struct gnet_dump *d) +{ + struct atm_qdisc_data *p = PRIV(sch); + struct atm_flow_data *flow = (struct atm_flow_data *) arg; + + flow->qstats.qlen = flow->q->q.qlen; + + if (gnet_stats_copy_basic(d, &flow->bstats) < 0 || + gnet_stats_copy_queue(d, &flow->qstats) < 0) + return -1; + + return 0; +} static int atm_tc_dump(struct Qdisc *sch, struct sk_buff *skb) { @@ -684,6 +700,7 @@ .bind_tcf = atm_tc_bind_filter, .unbind_tcf = atm_tc_put, .dump = atm_tc_dump_class, + .dump_stats = atm_tc_dump_class_stats, }; static struct Qdisc_ops atm_qdisc_ops = { From laforge@netfilter.org Thu Oct 21 06:03:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 06:03:55 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LD3mNb015100 for ; Thu, 21 Oct 2004 06:03:49 -0700 Received: from dsl-213-023-154-242.arcor-ip.net ([213.23.154.242] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1CKcbJ-0000Iy-11; Thu, 21 Oct 2004 15:03:29 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1CKcbH-0001oL-T5; Thu, 21 Oct 2004 15:03:27 +0200 Date: Thu, 21 Oct 2004 15:03:27 +0200 From: Harald Welte To: bert hubert , Christoph Hellwig , Linux Netdev List , lmb@suse.de Subject: Re: [PATCH 2.6] iptables CLUSTERIP target Message-ID: <20041021130327.GD3551@sunbeam.de.gnumonks.org> References: <20041020223828.GP19899@sunbeam.de.gnumonks.org> <20041021075530.GA1278@infradead.org> <20041021091229.GA3551@sunbeam.de.gnumonks.org> <20041021110513.GA21579@outpost.ds9a.nl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="E13BgyNx05feLLmH" Content-Disposition: inline In-Reply-To: <20041021110513.GA21579@outpost.ds9a.nl> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10643 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@netfilter.org Precedence: bulk X-list: netdev Content-Length: 2344 Lines: 64 --E13BgyNx05feLLmH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 21, 2004 at 01:05:13PM +0200, bert hubert wrote: > Is the CLUSTERIP target going anywhere after the (needlessly harsh) rebuk= es > posted here? Yes, I think so. I'm in the process of investigating why I didn't use seq_file at the time I implemented it (some 1.5 years ago, IIRC). Unfortunately I don't really remember all the issues involved :( If I'm not mistaken, I even posted some questions in this regard to lkml. > I note with glee that CLUSTERIP implements (and improves) the evil ideas = of > http://lartc.org/autoloadbalance.php3 I didn't know about that page, but yes, indeed. I first was informed about this approach by Fabio Olive Leite, who was one of my colleagues at Conectiva (where I was 2001). He presented this approach at the Linux Kongress 2002: http://www.linux-kongress.org/2002/papers/lk2002-leite.html Later SuSE approached me if I was interested in implementing that idea, and that's how CLUSTERIP happened. If I'm not mistaken SuSE is already shipping this (at least in some beta version?) - I don't really know but maybe lmb can shed some light on this issue. > And yes, I've received hate mail over this from switch engineers :-) Why is that? They have to deal with multicast traffic, too... and I don't really see how this is any different. > Good luck! Thanks ;) --=20 - Harald Welte http://www.netfilter.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie --E13BgyNx05feLLmH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBd7OfXaXGVTD0i/8RAhULAKCbEQOzqKpOR7hgFhmS+Fyk3NrBmwCdFFNF TYuiW0FOhUACwSintzs+BZk= =umYQ -----END PGP SIGNATURE----- --E13BgyNx05feLLmH-- From laforge@netfilter.org Thu Oct 21 06:08:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 06:08:59 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LD8s0t015505 for ; Thu, 21 Oct 2004 06:08:54 -0700 Received: from dsl-213-023-154-242.arcor-ip.net ([213.23.154.242] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1CKcgI-0000TC-IH; Thu, 21 Oct 2004 15:08:38 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1CKcgH-0001pH-Io; Thu, 21 Oct 2004 15:08:37 +0200 Date: Thu, 21 Oct 2004 15:08:37 +0200 From: Harald Welte To: Henrik Nordstrom Cc: Linux Netdev List , Netfilter Development Mailinglist Subject: Re: [PATCH 2.6] iptables CONNMARK match+target Message-ID: <20041021130837.GE3551@sunbeam.de.gnumonks.org> Mail-Followup-To: Harald Welte , Henrik Nordstrom , Linux Netdev List , Netfilter Development Mailinglist References: <20041020222102.GO19899@sunbeam.de.gnumonks.org> <20041021091632.GB3551@sunbeam.de.gnumonks.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k4f25fnPtRuIRUb3" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10644 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@netfilter.org Precedence: bulk X-list: netdev Content-Length: 1606 Lines: 48 --k4f25fnPtRuIRUb3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 21, 2004 at 12:25:35PM +0200, Henrik Nordstrom wrote: > The MARK bit-wise operations is also available for CONNMARK and could in= =20 > theory be included in CONNMARK when submitted to the kernel=20 Yes, but doesn't the patch I just submitted to DaveM include all the required functionality? both ipt_connmark and ipt_CONNMARK have a 'mask' parameter in ther {match,targ}info struct. > I am fine either way. If you think there's something (in the kernel) missing for bit-wise operations of CONNMARK, please let me know and send a patch. Thanks. > Regards > Henrik --=20 - Harald Welte http://www.netfilter.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie --k4f25fnPtRuIRUb3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBd7TVXaXGVTD0i/8RAhooAKCEo2GbrJfSJdd5vZ+r41oDqNb8yQCfThBa hBF/5WrzzHKDx/CiZxa0tN4= =qV0h -----END PGP SIGNATURE----- --k4f25fnPtRuIRUb3-- From hno@marasystems.com Thu Oct 21 06:19:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 06:19:53 -0700 (PDT) Received: from filer.marasystems.com (marasystems.com [83.241.133.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LDJcZa015953 for ; Thu, 21 Oct 2004 06:19:41 -0700 Received: from localhost (henrik@localhost) by filer.marasystems.com (8.11.6/8.11.6) with ESMTP id i9LDJC421250; Thu, 21 Oct 2004 15:19:12 +0200 Date: Thu, 21 Oct 2004 15:19:12 +0200 (CEST) From: Henrik Nordstrom To: Harald Welte cc: Linux Netdev List , Netfilter Development Mailinglist Subject: Re: [PATCH 2.6] iptables CONNMARK match+target In-Reply-To: <20041021130837.GE3551@sunbeam.de.gnumonks.org> Message-ID: References: <20041020222102.GO19899@sunbeam.de.gnumonks.org> <20041021091632.GB3551@sunbeam.de.gnumonks.org> <20041021130837.GE3551@sunbeam.de.gnumonks.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-archive-position: 10645 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hno@marasystems.com Precedence: bulk X-list: netdev Content-Length: 1039 Lines: 27 On Thu, 21 Oct 2004, Harald Welte wrote: > On Thu, Oct 21, 2004 at 12:25:35PM +0200, Henrik Nordstrom wrote: > >> The MARK bit-wise operations is also available for CONNMARK and could in >> theory be included in CONNMARK when submitted to the kernel > > Yes, but doesn't the patch I just submitted to DaveM include all the > required functionality? both ipt_connmark and ipt_CONNMARK have a > 'mask' parameter in ther {match,targ}info struct. It includes the miminimal required functionality (which is already more than MARK), but it does not include the full bitwise operations allowing for xor etc, and not the same level of user friendliness in specifying the operation as the bitwise mark operations. >> I am fine either way. > > If you think there's something (in the kernel) missing for bit-wise > operations of CONNMARK, please let me know and send a patch. Thanks. The bitwise mark operations patch for CONNMARK is around somewhere.. looking. Found it and bounced to the netfilter-devel list separately. Regards Henrik From linville@ra.tuxdriver.com Thu Oct 21 06:27:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 06:27:26 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LDRJEe016371 for ; Thu, 21 Oct 2004 06:27:19 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i9LCM5w30497; Thu, 21 Oct 2004 08:22:05 -0400 Date: Thu, 21 Oct 2004 08:22:05 -0400 From: "John W. Linville" To: Arjan van de Ven Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, davem@davemloft.net, john.ronciak@intel.com, ganesh.venkatesan@intel.com, akpm@osdl.org, romieu@fr.zoreil.com, ctindel@users.sourceforge.net, fubar@us.ibm.com, greearb@candelatech.com Subject: Re: [patch 2.6.9 0/11] Add MODULE_VERSION to several network drivers Message-ID: <20041021082205.A29340@tuxdriver.com> Mail-Followup-To: Arjan van de Ven , netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, davem@davemloft.net, john.ronciak@intel.com, ganesh.venkatesan@intel.com, akpm@osdl.org, romieu@fr.zoreil.com, ctindel@users.sourceforge.net, fubar@us.ibm.com, greearb@candelatech.com References: <20041020141146.C8775@tuxdriver.com> <1098350269.2810.17.camel@laptop.fenrus.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: <1098350269.2810.17.camel@laptop.fenrus.com>; from arjan@fenrus.demon.nl on Thu, Oct 21, 2004 at 11:17:49AM +0200 X-archive-position: 10646 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 874 Lines: 24 On Thu, Oct 21, 2004 at 11:17:49AM +0200, Arjan van de Ven wrote: > On Wed, 2004-10-20 at 20:11, John W. Linville wrote: > > Patches to add MODULE_VERSION lines to several network drivers... > > > > Here is the list: > > have you checked if the version of these drivers is actually useful? (eg > updated when the driver changes) If it's not I'd say adding a > MODULE_VERSION to it makes no sense whatsoever. Why do I feel like I'm being baited...? :-) I would have to suspect that if a version string exists, that it has at least some meaning to the primary developers/maintainters. It certainly is beyond my control to force the maintainers to give meaning to their version strings. Is this a political statement against the MODULE_VERSION macro and/or its purpose? I'm not overly interested in debating that one... John -- John W. Linville linville@tuxdriver.com From lmb@suse.de Thu Oct 21 06:38:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 06:38:25 -0700 (PDT) Received: from mx.in-addr.de (postfix@gate.in-addr.de [212.8.193.158]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LDcJ9T016869 for ; Thu, 21 Oct 2004 06:38:20 -0700 Received: by mx.in-addr.de (mx.in-addr.de, from userid 10) id 7132A1191; Thu, 21 Oct 2004 15:38:03 +0200 (CEST) Received: by hermes.in-addr.de (Postfix, from userid 500) id C968C6D9; Thu, 21 Oct 2004 15:33:46 +0200 (CEST) Date: Thu, 21 Oct 2004 15:33:46 +0200 From: Lars Marowsky-Bree To: Harald Welte , bert hubert , Christoph Hellwig , Linux Netdev List Subject: Re: [PATCH 2.6] iptables CLUSTERIP target Message-ID: <20041021133346.GL3911@marowsky-bree.de> References: <20041020223828.GP19899@sunbeam.de.gnumonks.org> <20041021075530.GA1278@infradead.org> <20041021091229.GA3551@sunbeam.de.gnumonks.org> <20041021110513.GA21579@outpost.ds9a.nl> <20041021130327.GD3551@sunbeam.de.gnumonks.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20041021130327.GD3551@sunbeam.de.gnumonks.org> X-Ctuhulu: HASTUR User-Agent: Mutt/1.5.6i X-archive-position: 10647 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: lmb@suse.de Precedence: bulk X-list: netdev Content-Length: 1658 Lines: 42 On 2004-10-21T15:03:27, Harald Welte wrote: > > I note with glee that CLUSTERIP implements (and improves) the evil ideas of > > http://lartc.org/autoloadbalance.php3 > > I didn't know about that page, but yes, indeed. I first was informed > about this approach by Fabio Olive Leite, who was one of my colleagues > at Conectiva (where I was 2001). He presented this approach at the > Linux Kongress 2002: > http://www.linux-kongress.org/2002/papers/lk2002-leite.html > > Later SuSE approached me if I was interested in implementing that idea, > and that's how CLUSTERIP happened. If I'm not mistaken SuSE is already > shipping this (at least in some beta version?) - I don't really know but > maybe lmb can shed some light on this issue. Yeah, I learned about it from Fabio, thought it would be a cool idea, and eventually we sponsored Harald to make it happen. It's shipping in SLES9, and we're adding full support for it in the 2.0 heartbeat cluster resource manager. It's meant to complement the LVS / mod_backhand based approaches. If the proc file IO for communicating with the module goes away in favour of a commandline based add/list/remove/etc interface, that would just help to tidy up our code, so it's OK with me. > > And yes, I've received hate mail over this from switch engineers :-) > Why is that? They have to deal with multicast traffic, too... and I > don't really see how this is any different. Yeah, but with this they get a whole lot more ;-) Sincerely, Lars Marowsky-Brée -- High Availability & Clustering SUSE Labs, Research and Development SUSE LINUX AG - A Novell company From arjan@fenrus.demon.nl Thu Oct 21 06:47:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 06:47:21 -0700 (PDT) Received: from laptop.fenrus.com (i31207.upc-i.chello.nl [62.195.31.207]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LDlFcx017324 for ; Thu, 21 Oct 2004 06:47:16 -0700 Received: from laptop.fenrus.com (laptop.fenrus.com [127.0.0.1]) by laptop.fenrus.com (8.12.11/8.12.11) with ESMTP id i9LDkL09009200; Thu, 21 Oct 2004 15:46:22 +0200 Received: (from arjan@localhost) by laptop.fenrus.com (8.12.11/8.12.11/Submit) id i9LDkCuu009199; Thu, 21 Oct 2004 15:46:12 +0200 X-Authentication-Warning: laptop.fenrus.com: arjan set sender to arjan@fenrus.demon.nl using -f Subject: Re: [patch 2.6.9 0/11] Add MODULE_VERSION to several network drivers From: Arjan van de Ven To: "John W. Linville" Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, davem@davemloft.net, john.ronciak@intel.com, ganesh.venkatesan@intel.com, akpm@osdl.org, romieu@fr.zoreil.com, ctindel@users.sourceforge.net, fubar@us.ibm.com, greearb@candelatech.com In-Reply-To: <20041021082205.A29340@tuxdriver.com> References: <20041020141146.C8775@tuxdriver.com> <1098350269.2810.17.camel@laptop.fenrus.com> <20041021082205.A29340@tuxdriver.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1098366370.2810.31.camel@laptop.fenrus.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Thu, 21 Oct 2004 15:46:11 +0200 X-archive-position: 10648 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: arjan@fenrus.demon.nl Precedence: bulk X-list: netdev Content-Length: 1166 Lines: 26 On Thu, 2004-10-21 at 14:22, John W. Linville wrote: > > > have you checked if the version of these drivers is actually useful? (eg > > updated when the driver changes) If it's not I'd say adding a > > MODULE_VERSION to it makes no sense whatsoever. > > Why do I feel like I'm being baited...? :-) > > I would have to suspect that if a version string exists, that it has at > least some meaning to the primary developers/maintainters. It certainly > is beyond my control to force the maintainers to give meaning to their > version strings. Since the skeleton driver includes a define for that, I suspect your assumption is a bit overly optimistic. > Is this a political statement against the MODULE_VERSION macro and/or > its purpose? I'm not overly interested in debating that one... Not really. I have absolutely no problem with a MODULE_VERSION macro *IF* the version it advertises means something. However if the version it advertises has no meaning whatsoever (eg the version number never gets updated) then imo it's better to NOT advertise anything so that other tools (like dkms) don't make assumptions and decisions based on nothing-meaning data. From linville@ra.tuxdriver.com Thu Oct 21 07:00:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 07:00:28 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LE0LXN017963 for ; Thu, 21 Oct 2004 07:00:22 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i9LCtAJ31082; Thu, 21 Oct 2004 08:55:10 -0400 Date: Thu, 21 Oct 2004 08:55:09 -0400 From: "John W. Linville" To: Arjan van de Ven Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, davem@davemloft.net, john.ronciak@intel.com, ganesh.venkatesan@intel.com, akpm@osdl.org, romieu@fr.zoreil.com, ctindel@users.sourceforge.net, fubar@us.ibm.com, greearb@candelatech.com Subject: Re: [patch 2.6.9 0/11] Add MODULE_VERSION to several network drivers Message-ID: <20041021085509.B29340@tuxdriver.com> Mail-Followup-To: Arjan van de Ven , netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, davem@davemloft.net, john.ronciak@intel.com, ganesh.venkatesan@intel.com, akpm@osdl.org, romieu@fr.zoreil.com, ctindel@users.sourceforge.net, fubar@us.ibm.com, greearb@candelatech.com References: <20041020141146.C8775@tuxdriver.com> <1098350269.2810.17.camel@laptop.fenrus.com> <20041021082205.A29340@tuxdriver.com> <1098366370.2810.31.camel@laptop.fenrus.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: <1098366370.2810.31.camel@laptop.fenrus.com>; from arjan@fenrus.demon.nl on Thu, Oct 21, 2004 at 03:46:11PM +0200 X-archive-position: 10649 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 1211 Lines: 29 On Thu, Oct 21, 2004 at 03:46:11PM +0200, Arjan van de Ven wrote: > On Thu, 2004-10-21 at 14:22, John W. Linville wrote: > > I would have to suspect that if a version string exists, that it has at > > least some meaning to the primary developers/maintainters. It certainly > Since the skeleton driver includes a define for that, I suspect your > assumption is a bit overly optimistic. Perhaps...still, at least the drivers I touched w/ these patches seem to have version numbers that are at least somewhat meaningful. > > Is this a political statement against the MODULE_VERSION macro and/or > > its purpose? I'm not overly interested in debating that one... > > Not really. I have absolutely no problem with a MODULE_VERSION macro > *IF* the version it advertises means something. However if the version > it advertises has no meaning whatsoever (eg the version number never > gets updated) then imo it's better to NOT advertise anything so that > other tools (like dkms) don't make assumptions and decisions based on > nothing-meaning data. Again, I think it would have to be the maintainer's responsibility to make the version numbers meaningful. John -- John W. Linville linville@tuxdriver.com From arjan@fenrus.demon.nl Thu Oct 21 07:12:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 07:12:15 -0700 (PDT) Received: from laptop.fenrus.com (i31207.upc-i.chello.nl [62.195.31.207]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LEC4Ag018501 for ; Thu, 21 Oct 2004 07:12:05 -0700 Received: from laptop.fenrus.com (laptop.fenrus.com [127.0.0.1]) by laptop.fenrus.com (8.12.11/8.12.11) with ESMTP id i9LEBKpv009399; Thu, 21 Oct 2004 16:11:21 +0200 Received: (from arjan@localhost) by laptop.fenrus.com (8.12.11/8.12.11/Submit) id i9LEBH99009398; Thu, 21 Oct 2004 16:11:17 +0200 X-Authentication-Warning: laptop.fenrus.com: arjan set sender to arjan@fenrus.demon.nl using -f Subject: Re: [patch 2.6.9 0/11] Add MODULE_VERSION to several network drivers From: Arjan van de Ven To: "John W. Linville" Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, davem@davemloft.net, john.ronciak@intel.com, ganesh.venkatesan@intel.com, akpm@osdl.org, romieu@fr.zoreil.com, ctindel@users.sourceforge.net, fubar@us.ibm.com, greearb@candelatech.com In-Reply-To: <20041021085509.B29340@tuxdriver.com> References: <20041020141146.C8775@tuxdriver.com> <1098350269.2810.17.camel@laptop.fenrus.com> <20041021082205.A29340@tuxdriver.com> <1098366370.2810.31.camel@laptop.fenrus.com> <20041021085509.B29340@tuxdriver.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1098367875.2810.36.camel@laptop.fenrus.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Thu, 21 Oct 2004 16:11:17 +0200 X-archive-position: 10650 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: arjan@fenrus.demon.nl Precedence: bulk X-list: netdev Content-Length: 754 Lines: 14 On Thu, 2004-10-21 at 14:55, John W. Linville wrote: > > Not really. I have absolutely no problem with a MODULE_VERSION macro > > *IF* the version it advertises means something. However if the version > > it advertises has no meaning whatsoever (eg the version number never > > gets updated) then imo it's better to NOT advertise anything so that > > other tools (like dkms) don't make assumptions and decisions based on > > nothing-meaning data. > > Again, I think it would have to be the maintainer's responsibility > to make the version numbers meaningful. absolutely; however you're not the maintainer of all of the ones you patched... and I still argue that until the number is meaningful exporting it as meaning something is more harm than good. From laforge@netfilter.org Thu Oct 21 07:25:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 07:25:58 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LEPmgg019103 for ; Thu, 21 Oct 2004 07:25:49 -0700 Received: from dsl-213-023-154-242.arcor-ip.net ([213.23.154.242] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1CKdsi-00025U-HN; Thu, 21 Oct 2004 16:25:33 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1CKdsd-000243-6S; Thu, 21 Oct 2004 16:25:27 +0200 Date: Thu, 21 Oct 2004 16:25:27 +0200 From: Harald Welte To: Lars Marowsky-Bree Cc: bert hubert , Christoph Hellwig , Linux Netdev List Subject: Re: [PATCH 2.6] iptables CLUSTERIP target Message-ID: <20041021142527.GG3551@sunbeam.de.gnumonks.org> References: <20041020223828.GP19899@sunbeam.de.gnumonks.org> <20041021075530.GA1278@infradead.org> <20041021091229.GA3551@sunbeam.de.gnumonks.org> <20041021110513.GA21579@outpost.ds9a.nl> <20041021130327.GD3551@sunbeam.de.gnumonks.org> <20041021133346.GL3911@marowsky-bree.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Wb5NtZlyOqqy58h0" Content-Disposition: inline In-Reply-To: <20041021133346.GL3911@marowsky-bree.de> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10651 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@netfilter.org Precedence: bulk X-list: netdev Content-Length: 2658 Lines: 72 --Wb5NtZlyOqqy58h0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 21, 2004 at 03:33:46PM +0200, Lars Marowsky-Bree wrote: > If the proc file IO for communicating with the module goes away in > favour of a commandline based add/list/remove/etc interface, that would > just help to tidy up our code, so it's OK with me. I'm not a big fan of inventing new kernel/userspace interfaces. We don't have any associated device, so we don't have any ioctl()s or stuff like that. For supporting two primitive operation, adding a new netlink address family also isn't worthwhile, especially since we're short of netlink families. Using the iptables getsockopt/setsockopt interface also is not possible, since it cannot be extended. So instead of introducing a new syscall, I think /proc is just the right way to deal with this :) I've now converted it to use seq_file, still need to do some testing. The initial reason not to use seq_file was that=20 1) I thought seq_file files cannot be writeable. =20 2) We don't actually need to dump a table with dozesn of entries, just a small number of integer numbers, thus seq_file seemed a bit like overkill. This assumption '1' seems to be wrong, I now provide my own write function to struct file_operations. Let me give it some testing, I'll re-submit it later today or tomorrow. > > > And yes, I've received hate mail over this from switch engineers :-) > > Why is that? They have to deal with multicast traffic, too... and I > > don't really see how this is any different. >=20 > Yeah, but with this they get a whole lot more ;-) I didn't read any ethernet-related specification that said it is safe to assume nobody uses multicast. --=20 - Harald Welte http://www.netfilter.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie --Wb5NtZlyOqqy58h0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBd8bXXaXGVTD0i/8RAsbVAKCXVzfPHHyfqUvjtP/Eo47v74mFBgCfcNZa WMm8ZZBDgAHoMjoxbCb/C0s= =InmV -----END PGP SIGNATURE----- --Wb5NtZlyOqqy58h0-- From margitsw@t-online.de Thu Oct 21 07:32:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 07:33:05 -0700 (PDT) Received: from mailout11.sul.t-online.com (mailout11.sul.t-online.com [194.25.134.85]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LEWwIW019520 for ; Thu, 21 Oct 2004 07:32:59 -0700 Received: from fwd10.aul.t-online.de by mailout11.sul.t-online.com with smtp id 1CKdzd-00007y-02; Thu, 21 Oct 2004 16:32:41 +0200 Received: from margit.t-online.de (bjeS5iZOQeA1uXopxld+QAimw3Ntq2SALeI6pBW8cYHinpDiBN5Irx@[217.224.22.87]) by fwd10.sul.t-online.com with esmtp id 1CKdzR-0jg2hE0; Thu, 21 Oct 2004 16:32:29 +0200 Message-Id: <5.1.0.14.2.20041021162128.02585048@pop.t-online.de> X-Sender: margitsw@pop.t-online.de X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Thu, 21 Oct 2004 16:33:27 +0200 To: jgarzik@pobox.com From: margitsw@t-online.de (Margit Schubert-While) Subject: 2.6 prism54 patches Cc: netdev@oss.sgi.com, mcgrof@studorgs.rutgers.edu Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-ID: bjeS5iZOQeA1uXopxld+QAimw3Ntq2SALeI6pBW8cYHinpDiBN5Irx X-TOI-MSGID: a2405ef4-fc83-4edb-87b9-8bb724342f3e X-archive-position: 10652 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: margitsw@t-online.de Precedence: bulk X-list: netdev Content-Length: 378 Lines: 13 Jeff, Where/what is the status of the 2.6 prism54 patches acked by you on October 4 ? -> http://prism54.org/pipermail/prism54-devel/2004-October/002037.html They got included in 2.4.28-pre4 but no sign of them in 2.6.9(-anything). They do include critical bug resolution changes. (And, of course, the following patches dated October 17 with an important resume fix) Margit From linville@ra.tuxdriver.com Thu Oct 21 07:38:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 07:38:44 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LEcWAs019930 for ; Thu, 21 Oct 2004 07:38:33 -0700 Received: (from linville@localhost) by ra.tuxdriver.com (8.11.6/8.11.6) id i9LDXMv31746; Thu, 21 Oct 2004 09:33:22 -0400 Date: Thu, 21 Oct 2004 09:33:22 -0400 From: "John W. Linville" To: Arjan van de Ven Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, davem@davemloft.net, john.ronciak@intel.com, ganesh.venkatesan@intel.com, akpm@osdl.org, romieu@fr.zoreil.com, ctindel@users.sourceforge.net, fubar@us.ibm.com, greearb@candelatech.com Subject: Re: [patch 2.6.9 0/11] Add MODULE_VERSION to several network drivers Message-ID: <20041021093322.E29340@tuxdriver.com> Mail-Followup-To: Arjan van de Ven , netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, davem@davemloft.net, john.ronciak@intel.com, ganesh.venkatesan@intel.com, akpm@osdl.org, romieu@fr.zoreil.com, ctindel@users.sourceforge.net, fubar@us.ibm.com, greearb@candelatech.com References: <20041020141146.C8775@tuxdriver.com> <1098350269.2810.17.camel@laptop.fenrus.com> <20041021082205.A29340@tuxdriver.com> <1098366370.2810.31.camel@laptop.fenrus.com> <20041021085509.B29340@tuxdriver.com> <1098367875.2810.36.camel@laptop.fenrus.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: <1098367875.2810.36.camel@laptop.fenrus.com>; from arjan@fenrus.demon.nl on Thu, Oct 21, 2004 at 04:11:17PM +0200 X-archive-position: 10653 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 760 Lines: 20 On Thu, Oct 21, 2004 at 04:11:17PM +0200, Arjan van de Ven wrote: > On Thu, 2004-10-21 at 14:55, John W. Linville wrote: > > Again, I think it would have to be the maintainer's responsibility > > to make the version numbers meaningful. > > absolutely; however you're not the maintainer of all of the ones you > patched... and I still argue that until the number is meaningful > exporting it as meaning something is more harm than good. As you say, I'm not the maintainer. I just proposed the patches. It seems you are not really talking to me. Instead, you are telling the maintainers that by applying these patches, they should be committing themselves to making/keeping the version numbers meaningful? John -- John W. Linville linville@tuxdriver.com From bobwirka@rtcworks.com Thu Oct 21 08:09:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 08:09:26 -0700 (PDT) Received: from smtp802.mail.sc5.yahoo.com (smtp802.mail.sc5.yahoo.com [66.163.168.181]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9LF9MlZ021066 for ; Thu, 21 Oct 2004 08:09:22 -0700 Received: from unknown (HELO ?192.168.1.97?) (bobwirka@ameritech.net@68.73.107.68 with plain) by smtp802.mail.sc5.yahoo.com with SMTP; 21 Oct 2004 15:09:07 -0000 Message-ID: <4177D115.5070205@rtcworks.com> Date: Thu, 21 Oct 2004 10:09:09 -0500 From: Bob Wirka User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephen Hemminger CC: netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Re: NFS and Network Driver Question References: <41704198.8000206@rtcworks.com> <4175AEFE.7090002@rtcworks.com> <41768B15.1090402@osdl.org> In-Reply-To: <41768B15.1090402@osdl.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10655 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bobwirka@rtcworks.com Precedence: bulk X-list: netdev Content-Length: 1637 Lines: 44 Here is another wrinkle: The program on my embedded system cannot send UDP broadcast messages when NFS mounted. When the system is booted without NFS (using the DiskOnChip for root file system) I can send UDP broadcasts. When the system is booted with NFS (using my laptop for root file system) UDP broadcasts result in "Network unreachable" errors, though it CAN send directed UDP messages and TCP messages. The kernel configuration is identical, except for kernel IP autoconfiguration, root over nfs, and compiled-in network driver. The NFS configuration on the host has 'no_root_squash', and <> all the files on the host root file system are owned by root. Any ideas? Thanks, Bob Wirka Realtime Control Works Stephen Hemminger wrote: > Bob Wirka wrote: > >> Ok, now I feel like I'm taking crazy pills... >> >> The embedded system boots up and mounts the root file system on my >> host laptop. The 'rc.sysinit' startup script executes the command >> 'mount -a' which should mount /proc, /dev/pts, and /dev/shm, as >> listed in /etc/fstab. When executed, that command returns "mount: >> only root can do that". >> >> When I get to the bash prompt, 'whoami' reports that I am, indeed, >> root. A 'mount -a' from the command prompt gives the same result; it >> doesn't think I'm root for the mount command. >> >> I can chown a file owned by root to some other user, and I can create >> a file or directory in a directory owned by root; so it doesn't >> always think I'm not root. >> > Are you getting bit by the nfs uid mapping on the server. Is it > mapping your local "root" to "nobody" > on the server? > From ahu@outpost.ds9a.nl Thu Oct 21 08:09:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 08:09:18 -0700 (PDT) Received: from outpost.ds9a.nl (postfix@outpost.ds9a.nl [213.244.168.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LF9CBg021040 for ; Thu, 21 Oct 2004 08:09:12 -0700 Received: by outpost.ds9a.nl (Postfix, from userid 1000) id F12D4442D; Thu, 21 Oct 2004 17:08:56 +0200 (CEST) Date: Thu, 21 Oct 2004 17:08:56 +0200 From: bert hubert To: Harald Welte Cc: Lars Marowsky-Bree , Christoph Hellwig , Linux Netdev List Subject: Re: [PATCH 2.6] iptables CLUSTERIP target Message-ID: <20041021150856.GA27191@outpost.ds9a.nl> Mail-Followup-To: bert hubert , Harald Welte , Lars Marowsky-Bree , Christoph Hellwig , Linux Netdev List References: <20041020223828.GP19899@sunbeam.de.gnumonks.org> <20041021075530.GA1278@infradead.org> <20041021091229.GA3551@sunbeam.de.gnumonks.org> <20041021110513.GA21579@outpost.ds9a.nl> <20041021130327.GD3551@sunbeam.de.gnumonks.org> <20041021133346.GL3911@marowsky-bree.de> <20041021142527.GG3551@sunbeam.de.gnumonks.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021142527.GG3551@sunbeam.de.gnumonks.org> User-Agent: Mutt/1.3.28i X-archive-position: 10654 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ahu@ds9a.nl Precedence: bulk X-list: netdev Content-Length: 854 Lines: 27 On Thu, Oct 21, 2004 at 04:25:27PM +0200, Harald Welte wrote: > I'm not a big fan of inventing new kernel/userspace interfaces. We > don't have any associated device, so we don't have any ioctl()s or stuff > like that. Or use netlink. > So instead of introducing a new syscall, I think /proc is just the right > way to deal with this :) Or even more modern, clusteripfs. > Let me give it some testing, I'll re-submit it later today or tomorrow. I'll test it at home to see if it does the right thing too. > > > > And yes, I've received hate mail over this from switch engineers :-) The hate mail originated from a large telco, I think the innovation just offended their sensitive minds. Bert -- http://www.PowerDNS.com Open source, database driven DNS Software http://lartc.org Linux Advanced Routing & Traffic Control HOWTO From tgraf@suug.ch Thu Oct 21 08:41:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 08:42:04 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LFfuHH025488 for ; Thu, 21 Oct 2004 08:41:57 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 54443F; Thu, 21 Oct 2004 17:41:19 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 717DE1C0E9; Thu, 21 Oct 2004 17:42:00 +0200 (CEST) Date: Thu, 21 Oct 2004 17:42:00 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [RESEND 16/16] ATM: Use gnet_stats for class statistics and dump them Message-ID: <20041021154200.GV21977@postel.suug.ch> References: <20041021123209.GE21977@postel.suug.ch> <20041021125201.GU21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021125201.GU21977@postel.suug.ch> X-archive-position: 10656 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 2235 Lines: 77 Braindead as I am, I forgot to tell my text editor to write the file before diffing it. This way an unused variable made it into the patch, revised version: Makes ATM qdisc use gnet_stats for class statistic counters and adds dumping bits to actually dump those. Althought the counters were updated they never got dumped to userspace. Signed-off-by: Thomas Graf --- linux-2.6.9-bk6.orig/net/sched/sch_atm.c 2004-10-21 17:30:11.000000000 +0200 +++ linux-2.6.9-bk6/net/sched/sch_atm.c 2004-10-21 17:29:28.000000000 +0200 @@ -69,7 +69,8 @@ struct socket *sock; /* for closing */ u32 classid; /* x:y type ID */ int ref; /* reference count */ - struct tc_stats stats; + struct gnet_stats_basic bstats; + struct gnet_stats_queue qstats; spinlock_t *stats_lock; struct atm_flow_data *next; struct atm_flow_data *excess; /* flow for excess traffic; @@ -450,13 +451,13 @@ #endif (ret = flow->q->enqueue(skb,flow->q)) != 0) { sch->qstats.drops++; - if (flow) flow->stats.drops++; + if (flow) flow->qstats.drops++; return ret; } sch->bstats.bytes += skb->len; sch->bstats.packets++; - flow->stats.bytes += skb->len; - flow->stats.packets++; + flow->bstats.bytes += skb->len; + flow->bstats.packets++; /* * Okay, this may seem weird. We pretend we've dropped the packet if * it goes via ATM. The reason for this is that the outer qdisc @@ -550,7 +551,7 @@ sch->qstats.requeues++; } else { sch->qstats.drops++; - p->link.stats.drops++; + p->link.qstats.drops++; } return ret; } @@ -666,6 +667,20 @@ skb_trim(skb,b-skb->data); return -1; } +static int +atm_tc_dump_class_stats(struct Qdisc *sch, unsigned long arg, + struct gnet_dump *d) +{ + struct atm_flow_data *flow = (struct atm_flow_data *) arg; + + flow->qstats.qlen = flow->q->q.qlen; + + if (gnet_stats_copy_basic(d, &flow->bstats) < 0 || + gnet_stats_copy_queue(d, &flow->qstats) < 0) + return -1; + + return 0; +} static int atm_tc_dump(struct Qdisc *sch, struct sk_buff *skb) { @@ -684,6 +699,7 @@ .bind_tcf = atm_tc_bind_filter, .unbind_tcf = atm_tc_put, .dump = atm_tc_dump_class, + .dump_stats = atm_tc_dump_class_stats, }; static struct Qdisc_ops atm_qdisc_ops = { From bobwirka@rtcworks.com Thu Oct 21 08:51:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 08:51:12 -0700 (PDT) Received: from smtp810.mail.sc5.yahoo.com (smtp810.mail.sc5.yahoo.com [66.163.170.80]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9LFp7p6025950 for ; Thu, 21 Oct 2004 08:51:08 -0700 Received: from unknown (HELO ?192.168.1.97?) (bobwirka@ameritech.net@68.73.107.68 with plain) by smtp810.mail.sc5.yahoo.com with SMTP; 21 Oct 2004 15:50:52 -0000 Message-ID: <4177DADF.7020006@rtcworks.com> Date: Thu, 21 Oct 2004 10:50:55 -0500 From: Bob Wirka User-Agent: Mozilla Thunderbird 0.7.3 (Windows/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 CC: Stephen Hemminger , netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Re: NFS and Network Driver Question References: <41704198.8000206@rtcworks.com> <4175AEFE.7090002@rtcworks.com> <41768B15.1090402@osdl.org> <4177D115.5070205@rtcworks.com> In-Reply-To: <4177D115.5070205@rtcworks.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10657 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bobwirka@rtcworks.com Precedence: bulk X-list: netdev Content-Length: 1888 Lines: 58 Once again I beg forgiveness for mailing list clutter... My problem was that I hadn't added a default route. My bad. Thanks anyway. Bob Wirka Realtime Control Works Bob Wirka wrote: > Here is another wrinkle: The program on my embedded system cannot send > UDP broadcast messages when NFS mounted. When the system is booted > without NFS (using the DiskOnChip for root file system) I can send UDP > broadcasts. When the system is booted with NFS (using my laptop for > root file system) UDP broadcasts result in "Network unreachable" > errors, though it CAN send directed UDP messages and TCP messages. > > The kernel configuration is identical, except for kernel IP > autoconfiguration, root over nfs, and compiled-in network driver. The > NFS configuration on the host has 'no_root_squash', and <> all > the files on the host root file system are owned by root. > > Any ideas? > > Thanks, > > Bob Wirka > Realtime Control Works > > Stephen Hemminger wrote: > >> Bob Wirka wrote: >> >>> Ok, now I feel like I'm taking crazy pills... >>> >>> The embedded system boots up and mounts the root file system on my >>> host laptop. The 'rc.sysinit' startup script executes the command >>> 'mount -a' which should mount /proc, /dev/pts, and /dev/shm, as >>> listed in /etc/fstab. When executed, that command returns "mount: >>> only root can do that". >>> >>> When I get to the bash prompt, 'whoami' reports that I am, indeed, >>> root. A 'mount -a' from the command prompt gives the same result; it >>> doesn't think I'm root for the mount command. >>> >>> I can chown a file owned by root to some other user, and I can >>> create a file or directory in a directory owned by root; so it >>> doesn't always think I'm not root. >>> >> Are you getting bit by the nfs uid mapping on the server. Is it >> mapping your local "root" to "nobody" >> on the server? >> > > > From hno@marasystems.com Thu Oct 21 09:17:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 09:17:54 -0700 (PDT) Received: from filer.marasystems.com (marasystems.com [83.241.133.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LGHmOg027013 for ; Thu, 21 Oct 2004 09:17:49 -0700 Received: from localhost (henrik@localhost) by filer.marasystems.com (8.11.6/8.11.6) with ESMTP id i9LGHHF26137; Thu, 21 Oct 2004 18:17:17 +0200 Date: Thu, 21 Oct 2004 18:17:17 +0200 (CEST) From: Henrik Nordstrom To: Bob Wirka cc: Stephen Hemminger , netdev@oss.sgi.com, linux-net@vger.kernel.org Subject: Re: NFS and Network Driver Question In-Reply-To: <4177D115.5070205@rtcworks.com> Message-ID: References: <41704198.8000206@rtcworks.com> <4175AEFE.7090002@rtcworks.com> <41768B15.1090402@osdl.org> <4177D115.5070205@rtcworks.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-archive-position: 10658 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hno@marasystems.com Precedence: bulk X-list: netdev Content-Length: 401 Lines: 15 On Thu, 21 Oct 2004, Bob Wirka wrote: > The kernel configuration is identical, except for kernel IP > autoconfiguration, root over nfs, and compiled-in network driver. The NFS > configuration on the host has 'no_root_squash', and <> all the files on > the host root file system are owned by root. Double check the routing tables ip ro ls table 0 give you all of them... Regards Henrik From laforge@netfilter.org Thu Oct 21 09:37:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 09:37:26 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LGbG4U028110 for ; Thu, 21 Oct 2004 09:37:17 -0700 Received: from dsl-213-023-154-242.arcor-ip.net ([213.23.154.242] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1CKfvt-0004xS-9K; Thu, 21 Oct 2004 18:36:57 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1CKfvr-0002lv-RH; Thu, 21 Oct 2004 18:36:55 +0200 Date: Thu, 21 Oct 2004 18:36:55 +0200 From: Harald Welte To: David Miller , Linux Netdev List , Netfilter Development Mailinglist , lmb@suse.de Subject: [PATCH 2.6] iptables CLUSTERIP target, seq_file version Message-ID: <20041021163655.GK3551@sunbeam.de.gnumonks.org> Mail-Followup-To: Harald Welte , David Miller , Linux Netdev List , Netfilter Development Mailinglist , lmb@suse.de References: <20041020223828.GP19899@sunbeam.de.gnumonks.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oYAXToTM8kn9Ra/9" Content-Disposition: inline In-Reply-To: <20041020223828.GP19899@sunbeam.de.gnumonks.org> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10659 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@netfilter.org Precedence: bulk X-list: netdev Content-Length: 25215 Lines: 915 --oYAXToTM8kn9Ra/9 Content-Type: multipart/mixed; boundary="ZrCu0B0FMx3UnjE2" Content-Disposition: inline --ZrCu0B0FMx3UnjE2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 21, 2004 at 12:38:28AM +0200, Harald Welte wrote: Hi Dave! This is the 'CLUSTERIP' target for iptables, this time no core kernel changes required, please apply. This enables you to build a static load sharing cluster between multiple nodes - without the requirement to have a load balancer. It uses a series of [evil] tricks like replying with linklayer multicast addresses to ARP requests, and using CONNMARK for stateful blocking all traffic not intended for the local node. Apart from the usual netfilter-specific file additions and Kconfig/Makefile patches, this needs to export proc_file_operations in order to get the reference counting of certain data objects right. I hope this change is acceptable. Signed-off-by: Harald Welte --=20 - Harald Welte http://www.netfilter.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie --ZrCu0B0FMx3UnjE2 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="2.6.9-clusterip.patch" Content-Transfer-Encoding: quoted-printable diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-connmark/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h linux-2.6.9-conn= mark-clusterip/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h --- linux-2.6.9-connmark/include/linux/netfilter_ipv4/ipt_CLUSTERIP.h 1970-= 01-01 01:00:00.000000000 +0100 +++ linux-2.6.9-connmark-clusterip/include/linux/netfilter_ipv4/ipt_CLUSTER= IP.h 2004-10-21 00:22:29.000000000 +0200 @@ -0,0 +1,32 @@ +#ifndef _IPT_CLUSTERIP_H_target +#define _IPT_CLUSTERIP_H_target + +enum clusterip_hashmode { + CLUSTERIP_HASHMODE_SIP =3D 0, + CLUSTERIP_HASHMODE_SIP_SPT, + CLUSTERIP_HASHMODE_SIP_SPT_DPT, +}; + +#define CLUSTERIP_HASHMODE_MAX CLUSTERIP_HASHMODE_SIP_SPT_DPT + +#define CLUSTERIP_MAX_NODES 16 + +#define CLUSTERIP_FLAG_NEW 0x00000001 + +struct clusterip_config; + +struct ipt_clusterip_tgt_info { + + u_int32_t flags; + struct clusterip_config *config; +=09 + /* only relevant for new ones */ + u_int8_t clustermac[6]; + u_int16_t num_total_nodes; + u_int16_t num_local_nodes; + u_int16_t local_nodes[CLUSTERIP_MAX_NODES]; + enum clusterip_hashmode hash_mode; + u_int32_t hash_initval; +}; + +#endif /*_IPT_CLUSTERIP_H_target*/ diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-connmark/net/ipv4/netfilter/Kconfig linux-2.6.9-connmark-clusterip/net= /ipv4/netfilter/Kconfig --- linux-2.6.9-connmark/net/ipv4/netfilter/Kconfig 2004-10-21 00:16:30.000= 000000 +0200 +++ linux-2.6.9-connmark-clusterip/net/ipv4/netfilter/Kconfig 2004-10-21 00= :30:17.000000000 +0200 @@ -628,6 +628,16 @@ Documentation/modules.txt. The module will be called ipt_CONNMARK.o. If unsure, say `N'. =20 +config IP_NF_TARGET_CLUSTERIP + tristate "CLUSTERIP target support (EXPERIMENTAL)" + depends on IP_NF_CONNTRACK_MARK && IP_NF_IPTABLES && EXPERIMENTAL + help + The CLUSTERIP target allows you to build load-balancing clusters of + network servers without having a dedicated load-balancing + router/server/switch. +=09 + To compile it as a module, choose M here. If unsure, say N. + # raw + specific targets config IP_NF_RAW tristate 'raw table support (required for NOTRACK/TRACE)' diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-connmark/net/ipv4/netfilter/Makefile linux-2.6.9-connmark-clusterip/ne= t/ipv4/netfilter/Makefile --- linux-2.6.9-connmark/net/ipv4/netfilter/Makefile 2004-10-20 23:59:36.00= 0000000 +0200 +++ linux-2.6.9-connmark-clusterip/net/ipv4/netfilter/Makefile 2004-10-21 0= 0:23:57.000000000 +0200 @@ -86,6 +86,7 @@ obj-$(CONFIG_IP_NF_TARGET_ULOG) +=3D ipt_ULOG.o obj-$(CONFIG_IP_NF_TARGET_TCPMSS) +=3D ipt_TCPMSS.o obj-$(CONFIG_IP_NF_TARGET_NOTRACK) +=3D ipt_NOTRACK.o +obj-$(CONFIG_IP_NF_TARGET_CLUSTERIP) +=3D ipt_CLUSTERIP.o =20 # generic ARP tables obj-$(CONFIG_IP_NF_ARPTABLES) +=3D arp_tables.o diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-connmark/net/ipv4/netfilter/ipt_CLUSTERIP.c linux-2.6.9-connmark-clust= erip/net/ipv4/netfilter/ipt_CLUSTERIP.c --- linux-2.6.9-connmark/net/ipv4/netfilter/ipt_CLUSTERIP.c 1970-01-01 01:0= 0:00.000000000 +0100 +++ linux-2.6.9-connmark-clusterip/net/ipv4/netfilter/ipt_CLUSTERIP.c 2004-= 10-21 18:28:30.195525212 +0200 @@ -0,0 +1,760 @@ +/* Cluster IP hashmark target=20 + * (C) 2003-2004 by Harald Welte + * based on ideas of Fabio Olive Leite + * + * Development of this code funded by SuSE Linux AG, http://www.suse.com/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include +#include +#include + +#define CLUSTERIP_VERSION "0.6" + +#define DEBUG_CLUSTERIP + +#ifdef DEBUG_CLUSTERIP +#define DEBUGP printk +#else +#define DEBUGP +#endif + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Harald Welte "); +MODULE_DESCRIPTION("iptables target for CLUSTERIP"); + +struct clusterip_config { + struct list_head list; /* list of all configs */ + atomic_t refcount; /* reference count */ + + u_int32_t clusterip; /* the IP address */ + u_int8_t clustermac[ETH_ALEN]; /* the MAC address */ + struct net_device *dev; /* device */ + u_int16_t num_total_nodes; /* total number of nodes */ + u_int16_t num_local_nodes; /* number of local nodes */ + u_int16_t local_nodes[CLUSTERIP_MAX_NODES]; /* node number array */ + +#ifdef CONFIG_PROC_FS + struct proc_dir_entry *pde; /* proc dir entry */ +#endif + enum clusterip_hashmode hash_mode; /* which hashing mode */ + u_int32_t hash_initval; /* hash initialization */ +}; + +static LIST_HEAD(clusterip_configs); + +/* clusterip_lock protects the clusterip_configs list _AND_ the configurab= le + * data within all structurses (num_local_nodes, local_nodes[]) */ +DECLARE_RWLOCK(clusterip_lock); + +#ifdef CONFIG_PROC_FS +static struct file_operations clusterip_proc_fops; +static struct proc_dir_entry *clusterip_procdir; +#endif + +static inline void +clusterip_config_get(struct clusterip_config *c) { + atomic_inc(&c->refcount); +} + +static inline void +clusterip_config_put(struct clusterip_config *c) { + if (atomic_dec_and_test(&c->refcount)) { + WRITE_LOCK(&clusterip_lock); + list_del(&c->list); + WRITE_UNLOCK(&clusterip_lock); + dev_mc_delete(c->dev, c->clustermac, ETH_ALEN, 0); + dev_put(c->dev); + kfree(c); + } +} + + +static struct clusterip_config * +__clusterip_config_find(u_int32_t clusterip) +{ + struct list_head *pos; + + MUST_BE_READ_LOCKED(&clusterip_lock); + list_for_each(pos, &clusterip_configs) { + struct clusterip_config *c =3D list_entry(pos,=20 + struct clusterip_config, list); + if (c->clusterip =3D=3D clusterip) { + return c; + } + } + + return NULL; +} + +static inline struct clusterip_config * +clusterip_config_find_get(u_int32_t clusterip) +{ + struct clusterip_config *c; + + READ_LOCK(&clusterip_lock); + c =3D __clusterip_config_find(clusterip); + if (!c) { + READ_UNLOCK(&clusterip_lock); + return NULL; + } + atomic_inc(&c->refcount); + READ_UNLOCK(&clusterip_lock); + + return c; +} + +static struct clusterip_config * +clusterip_config_init(struct ipt_clusterip_tgt_info *i, u_int32_t ip, + struct net_device *dev) +{ + struct clusterip_config *c; + char buffer[16]; + + c =3D kmalloc(sizeof(*c), GFP_ATOMIC); + if (!c) + return NULL; + + memset(c, 0, sizeof(*c)); + c->dev =3D dev; + c->clusterip =3D ip; + memcpy(&c->clustermac, &i->clustermac, ETH_ALEN); + c->num_total_nodes =3D i->num_total_nodes; + c->num_local_nodes =3D i->num_local_nodes; + memcpy(&c->local_nodes, &i->local_nodes, sizeof(&c->local_nodes)); + c->hash_mode =3D i->hash_mode; + c->hash_initval =3D i->hash_initval; + atomic_set(&c->refcount, 1); + +#ifdef CONFIG_PROC_FS + /* create proc dir entry */ + sprintf(buffer, "%u.%u.%u.%u", NIPQUAD(ip)); + c->pde =3D create_proc_entry(buffer, S_IWUSR|S_IRUSR, clusterip_procdir); + if (!c->pde) { + kfree(c); + return NULL; + } + c->pde->proc_fops =3D &clusterip_proc_fops; + c->pde->data =3D c; +#endif + + WRITE_LOCK(&clusterip_lock); + list_add(&c->list, &clusterip_configs); + WRITE_UNLOCK(&clusterip_lock); + + return c; +} + +static int +clusterip_add_node(struct clusterip_config *c, u_int16_t nodenum) +{ + int i; + + WRITE_LOCK(&clusterip_lock); + + if (c->num_local_nodes >=3D CLUSTERIP_MAX_NODES + || nodenum > CLUSTERIP_MAX_NODES) { + WRITE_UNLOCK(&clusterip_lock); + return 1; + } + + /* check if we alrady have this number in our array */ + for (i =3D 0; i < c->num_local_nodes; i++) { + if (c->local_nodes[i] =3D=3D nodenum) { + WRITE_UNLOCK(&clusterip_lock); + return 1; + } + } + + c->local_nodes[c->num_local_nodes++] =3D nodenum; + + WRITE_UNLOCK(&clusterip_lock); + return 0; +} + +static int +clusterip_del_node(struct clusterip_config *c, u_int16_t nodenum) +{ + int i; + + WRITE_LOCK(&clusterip_lock); + + if (c->num_local_nodes <=3D 1 || nodenum > CLUSTERIP_MAX_NODES) { + WRITE_UNLOCK(&clusterip_lock); + return 1; + } + =09 + for (i =3D 0; i < c->num_local_nodes; i++) { + if (c->local_nodes[i] =3D=3D nodenum) { + int size =3D sizeof(u_int16_t)*(c->num_local_nodes-(i+1)); + memmove(&c->local_nodes[i], &c->local_nodes[i+1], size); + c->num_local_nodes--; + WRITE_UNLOCK(&clusterip_lock); + return 0; + } + } + + WRITE_UNLOCK(&clusterip_lock); + return 1; +} + +static inline u_int32_t +clusterip_hashfn(struct sk_buff *skb, struct clusterip_config *config) +{ + struct iphdr *iph =3D skb->nh.iph; + unsigned long hashval; + u_int16_t sport, dport; + struct tcphdr *th; + struct udphdr *uh; + struct icmphdr *ih; + + switch (iph->protocol) { + case IPPROTO_TCP: + th =3D (void *)iph+iph->ihl*4; + sport =3D ntohs(th->source); + dport =3D ntohs(th->dest); + break; + case IPPROTO_UDP: + uh =3D (void *)iph+iph->ihl*4; + sport =3D ntohs(uh->source); + dport =3D ntohs(uh->dest); + break; + case IPPROTO_ICMP: + ih =3D (void *)iph+iph->ihl*4; + sport =3D ntohs(ih->un.echo.id); + dport =3D (ih->type<<8)|ih->code; + break; + default: + if (net_ratelimit()) { + printk(KERN_NOTICE "CLUSTERIP: unknown protocol `%u'\n", + iph->protocol); + } + sport =3D dport =3D 0; + } + + switch (config->hash_mode) { + case CLUSTERIP_HASHMODE_SIP: + hashval =3D jhash_1word(ntohl(iph->saddr), + config->hash_initval); + break; + case CLUSTERIP_HASHMODE_SIP_SPT: + hashval =3D jhash_2words(ntohl(iph->saddr), sport,=20 + config->hash_initval); + break; + case CLUSTERIP_HASHMODE_SIP_SPT_DPT: + hashval =3D jhash_3words(ntohl(iph->saddr), sport, dport, + config->hash_initval); + break; + default: + /* to make gcc happy */ + hashval =3D 0; + /* This cannot happen, unless the check function wasn't called + * at rule load time */ + printk("CLUSTERIP: unknown mode `%u'\n", config->hash_mode); + BUG(); + break; + } + + /* node numbers are 1..n, not 0..n */ + return ((hashval % config->num_total_nodes)+1); +} + +static inline int +clusterip_responsible(struct clusterip_config *config, u_int32_t hash) +{ + int i; + + READ_LOCK(&clusterip_lock); + + if (config->num_local_nodes =3D=3D 0) { + READ_UNLOCK(&clusterip_lock); + return 0; + } + + for (i =3D 0; i < config->num_local_nodes; i++) { + if (config->local_nodes[i] =3D=3D hash) { + READ_UNLOCK(&clusterip_lock); + return 1; + } + } + + READ_UNLOCK(&clusterip_lock); + + return 0; +} + +/***********************************************************************= =20 + * IPTABLES TARGET=20 + ***********************************************************************/ + +static unsigned int +target(struct sk_buff **pskb, + const struct net_device *in, + const struct net_device *out, + unsigned int hooknum, + const void *targinfo, + void *userinfo) +{ + const struct ipt_clusterip_tgt_info *cipinfo =3D targinfo; + enum ip_conntrack_info ctinfo; + struct ip_conntrack *ct =3D ip_conntrack_get((*pskb), &ctinfo); + u_int32_t hash; + + /* don't need to clusterip_config_get() here, since refcount + * is only decremented by destroy() - and ip_tables guarantees + * that the ->target() function isn't called after ->destroy() */ + + if (!ct) { + printk(KERN_ERR "CLUSTERIP: no conntrack!\n"); + /* FIXME: need to drop invalid ones, since replies + * to outgoing connections of other nodes will be=20 + * marked as INVALID */ + return NF_DROP; + } + + /* special case: ICMP error handling. conntrack distinguishes between + * error messages (RELATED) and information requests (see below) */ + if ((*pskb)->nh.iph->protocol =3D=3D IPPROTO_ICMP + && (ctinfo =3D=3D IP_CT_RELATED=20 + || ctinfo =3D=3D IP_CT_IS_REPLY+IP_CT_IS_REPLY)) + return IPT_CONTINUE; + + /* ip_conntrack_icmp guarantees us that we only have ICMP_ECHO,=20 + * TIMESTAMP, INFO_REQUEST or ADDRESS type icmp packets from here + * on, which all have an ID field [relevant for hashing]. */ + + hash =3D clusterip_hashfn(*pskb, cipinfo->config); + + switch (ctinfo) { + case IP_CT_NEW: + ct->mark =3D hash; + break; + case IP_CT_RELATED: + case IP_CT_RELATED+IP_CT_IS_REPLY: + /* FIXME: we don't handle expectations at the + * moment. they can arrive on a different node than + * the master connection (e.g. FTP passive mode) */ + case IP_CT_ESTABLISHED: + case IP_CT_ESTABLISHED+IP_CT_IS_REPLY: + break; + default: + break; + } + +#ifdef DEBUG_CLUSTERP + DUMP_TUPLE(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple); +#endif + DEBUGP("hash=3D%u ct_hash=3D%lu ", hash, ct->mark); + if (!clusterip_responsible(cipinfo->config, hash)) { + DEBUGP("not responsible\n"); + return NF_DROP; + } + DEBUGP("responsible\n"); + + /* despite being received via linklayer multicast, this is + * actually a unicast IP packet. TCP doesn't like PACKET_MULTICAST */ + (*pskb)->pkt_type =3D PACKET_HOST; + + return IPT_CONTINUE; +} + +static int +checkentry(const char *tablename, + const struct ipt_entry *e, + void *targinfo, + unsigned int targinfosize, + unsigned int hook_mask) +{ + struct ipt_clusterip_tgt_info *cipinfo =3D targinfo; + + struct clusterip_config *config; + + if (targinfosize !=3D IPT_ALIGN(sizeof(struct ipt_clusterip_tgt_info))) { + printk(KERN_WARNING "CLUSTERIP: targinfosize %u !=3D %Zu\n", + targinfosize, + IPT_ALIGN(sizeof(struct ipt_clusterip_tgt_info))); + return 0; + } + + if (cipinfo->hash_mode !=3D CLUSTERIP_HASHMODE_SIP && + cipinfo->hash_mode !=3D CLUSTERIP_HASHMODE_SIP_SPT && + cipinfo->hash_mode !=3D CLUSTERIP_HASHMODE_SIP_SPT_DPT) { + printk(KERN_WARNING "CLUSTERIP: unknown mode `%u'\n", + cipinfo->hash_mode); + return 0; + + } + if (e->ip.dmsk.s_addr !=3D 0xffffffff + || e->ip.dst.s_addr =3D=3D 0) { + printk(KERN_ERR "CLUSTERIP: Please specify destination IP\n"); + return 0; + } + + /* FIXME: further sanity checks */ + + config =3D clusterip_config_find_get(e->ip.dst.s_addr); + if (!config) { + if (!(cipinfo->flags & CLUSTERIP_FLAG_NEW)) { + printk(KERN_WARNING "CLUSTERIP: no config found for %u.%u.%u.%u, need '= new'\n", NIPQUAD(e->ip.dst.s_addr)); + return 0; + } else { + struct net_device *dev; + + if (e->ip.iniface[0] =3D=3D '\0') { + printk(KERN_WARNING "CLUSTERIP: Please specify an interface name\n"); + return 0; + } + + dev =3D dev_get_by_name(e->ip.iniface); + if (!dev) { + printk(KERN_WARNING "CLUSTERIP: no such interface %s\n", e->ip.iniface= ); + return 0; + } + + config =3D clusterip_config_init(cipinfo,=20 + e->ip.dst.s_addr, dev); + if (!config) { + printk(KERN_WARNING "CLUSTERIP: cannot allocate config\n"); + dev_put(dev); + return 0; + } + dev_mc_add(config->dev,config->clustermac, ETH_ALEN, 0); + } + } + + cipinfo->config =3D config; + + return 1; +} + +/* drop reference count of cluster config when rule is deleted */ +static void destroy(void *matchinfo, unsigned int matchinfosize) +{ + struct ipt_clusterip_tgt_info *cipinfo =3D matchinfo; + + /* we first remove the proc entry and then drop the reference + * count. In case anyone still accesses the file, the open/close + * functions are also incrementing the refcount on their own */ +#ifdef CONFIG_PROC_FS + remove_proc_entry(cipinfo->config->pde->name, + cipinfo->config->pde->parent); +#endif + clusterip_config_put(cipinfo->config); +} + +static struct ipt_target clusterip_tgt =3D {=20 + .name =3D "CLUSTERIP", + .target =3D &target,=20 + .checkentry =3D &checkentry,=20 + .destroy =3D &destroy, + .me =3D THIS_MODULE +}; + + +/***********************************************************************= =20 + * ARP MANGLING CODE=20 + ***********************************************************************/ + +/* hardcoded for 48bit ethernet and 32bit ipv4 addresses */ +struct arp_payload { + u_int8_t src_hw[ETH_ALEN]; + u_int32_t src_ip; + u_int8_t dst_hw[ETH_ALEN]; + u_int32_t dst_ip; +} __attribute__ ((packed)); + +#ifdef CLUSTERIP_DEBUG +static void arp_print(struct arp_payload *payload)=20 +{ +#define HBUFFERLEN 30 + char hbuffer[HBUFFERLEN]; + int j,k; + const char hexbuf[]=3D "0123456789abcdef"; + + for (k=3D0, j=3D0; k < HBUFFERLEN-3 && j < ETH_ALEN; j++) { + hbuffer[k++]=3Dhexbuf[(payload->src_hw[j]>>4)&15]; + hbuffer[k++]=3Dhexbuf[payload->src_hw[j]&15]; + hbuffer[k++]=3D':'; + } + hbuffer[--k]=3D'\0'; + + printk("src %u.%u.%u.%u@%s, dst %u.%u.%u.%u\n",=20 + NIPQUAD(payload->src_ip), hbuffer, + NIPQUAD(payload->dst_ip)); +} +#endif + +static unsigned int +arp_mangle(unsigned int hook, + struct sk_buff **pskb, + const struct net_device *in, + const struct net_device *out, + int (*okfn)(struct sk_buff *)) +{ + struct arphdr *arp =3D (*pskb)->nh.arph; + struct arp_payload *payload; + struct clusterip_config *c; + + /* we don't care about non-ethernet and non-ipv4 ARP */ + if (arp->ar_hrd !=3D htons(ARPHRD_ETHER) + || arp->ar_pro !=3D htons(ETH_P_IP) + || arp->ar_pln !=3D 4 || arp->ar_hln !=3D ETH_ALEN) + return NF_ACCEPT; + + /* we only want to mangle arp replies */ + if (arp->ar_op !=3D htons(ARPOP_REPLY)) + return NF_ACCEPT; + + payload =3D (void *)(arp+1); + + /* if there is no clusterip configuration for the arp reply's=20 + * source ip, we don't want to mangle it */ + c =3D clusterip_config_find_get(payload->src_ip); + if (!c) + return NF_ACCEPT; + + /* normally the linux kernel always replies to arp queries of=20 + * addresses on different interfacs. However, in the CLUSTERIP case + * this wouldn't work, since we didn't subscribe the mcast group on + * other interfaces */ + if (c->dev !=3D out) { + DEBUGP("CLUSTERIP: not mangling arp reply on different " + "interface: cip'%s'-skb'%s'\n", c->dev->name, out->name); + clusterip_config_put(c); + return NF_ACCEPT; + } + + /* mangle reply hardware address */ + memcpy(payload->src_hw, c->clustermac, arp->ar_hln); + +#ifdef CLUSTERIP_DEBUG + DEBUGP(KERN_DEBUG "CLUSTERIP mangled arp reply: "); + arp_print(payload); +#endif + + clusterip_config_put(c); + + return NF_ACCEPT; +} + +static struct nf_hook_ops cip_arp_ops =3D { + .hook =3D arp_mangle, + .pf =3D NF_ARP, + .hooknum =3D NF_ARP_OUT, + .priority =3D -1 +}; + +/***********************************************************************= =20 + * PROC DIR HANDLING=20 + ***********************************************************************/ + +#ifdef CONFIG_PROC_FS + +static void *clusterip_seq_start(struct seq_file *s, loff_t *pos) +{ + struct proc_dir_entry *pde =3D s->private; + struct clusterip_config *c =3D pde->data; + unsigned int *nodeidx; + + READ_LOCK(&clusterip_lock); + if (*pos >=3D c->num_local_nodes) + return NULL; + + nodeidx =3D kmalloc(sizeof(unsigned int), GFP_KERNEL); + if (!nodeidx) + return ERR_PTR(-ENOMEM); + + *nodeidx =3D *pos; + return nodeidx; +} + +static void *clusterip_seq_next(struct seq_file *s, void *v, loff_t *pos) +{ + struct proc_dir_entry *pde =3D s->private; + struct clusterip_config *c =3D pde->data; + unsigned int *nodeidx =3D (unsigned int *)v; + + *pos =3D ++(*nodeidx); + if (*pos >=3D c->num_local_nodes) { + kfree(v); + return NULL; + } + return nodeidx; +} + +static void clusterip_seq_stop(struct seq_file *s, void *v) +{ + kfree(v); + + READ_UNLOCK(&clusterip_lock); +} + +static int clusterip_seq_show(struct seq_file *s, void *v) +{ + struct proc_dir_entry *pde =3D s->private; + struct clusterip_config *c =3D pde->data; + unsigned int *nodeidx =3D (unsigned int *)v; + + if (*nodeidx !=3D 0)=20 + seq_putc(s, ','); + seq_printf(s, "%u", c->local_nodes[*nodeidx]); + + if (*nodeidx =3D=3D c->num_local_nodes-1) + seq_putc(s, '\n'); + + return 0; +} + +static struct seq_operations clusterip_seq_ops =3D { + .start =3D clusterip_seq_start, + .next =3D clusterip_seq_next, + .stop =3D clusterip_seq_stop, + .show =3D clusterip_seq_show, +}; + +static int clusterip_proc_open(struct inode *inode, struct file *file) +{ + int ret =3D seq_open(file, &clusterip_seq_ops); + + if (!ret) { + struct seq_file *sf =3D file->private_data; + struct proc_dir_entry *pde =3D PDE(inode); + struct clusterip_config *c =3D pde->data; + + sf->private =3D pde; + + clusterip_config_get(c); + } + + return ret; +} + +static int clusterip_proc_release(struct inode *inode, struct file *file) +{ + struct proc_dir_entry *pde =3D PDE(inode); + struct clusterip_config *c =3D pde->data; + int ret; + + ret =3D seq_release(inode, file); + + if (!ret) + clusterip_config_put(c); + + return ret; +} + +static ssize_t clusterip_proc_write(struct file *file, const char *input, + size_t size, loff_t *ofs) +{ +#define PROC_WRITELEN 10 + char buffer[PROC_WRITELEN+1]; + struct proc_dir_entry *pde =3D PDE(file->f_dentry->d_inode); + struct clusterip_config *c =3D pde->data; + unsigned long nodenum; + + if (copy_from_user(buffer, input, PROC_WRITELEN)) + return -EFAULT; + + if (*buffer =3D=3D '+') { + nodenum =3D simple_strtoul(buffer+1, NULL, 10); + if (clusterip_add_node(c, nodenum)) + return -ENOMEM; + } else if (*buffer =3D=3D '-') { + nodenum =3D simple_strtoul(buffer+1, NULL,10); + if (clusterip_del_node(c, nodenum)) + return -ENOENT; + } else + return -EIO; + + return size; +} + +static struct file_operations clusterip_proc_fops =3D { + .owner =3D THIS_MODULE, + .open =3D clusterip_proc_open, + .read =3D seq_read, + .write =3D clusterip_proc_write, + .llseek =3D seq_lseek, + .release =3D clusterip_proc_release, +}; + +#endif /* CONFIG_PROC_FS */ + +static int init_or_cleanup(int fini) +{ + int ret; + + if (fini) + goto cleanup; + + if (ipt_register_target(&clusterip_tgt)) { + ret =3D -EINVAL; + goto cleanup_none; + } + + if (nf_register_hook(&cip_arp_ops) < 0) { + ret =3D -EINVAL; + goto cleanup_target; + } + +#ifdef CONFIG_PROC_FS + clusterip_procdir =3D proc_mkdir("ipt_CLUSTERIP", proc_net); + if (!clusterip_procdir) { + printk(KERN_ERR "CLUSTERIP: Unable to proc dir entry\n"); + ret =3D -ENOMEM; + goto cleanup_hook; + } +#endif /* CONFIG_PROC_FS */ + + printk(KERN_NOTICE "ClusterIP Version %s loaded successfully\n", + CLUSTERIP_VERSION); + + return 0; + +cleanup: + printk(KERN_NOTICE "ClusterIP Version %s unloading\n", + CLUSTERIP_VERSION); +#ifdef CONFIG_PROC_FS + remove_proc_entry(clusterip_procdir->name, clusterip_procdir->parent); +#endif +cleanup_hook: + nf_unregister_hook(&cip_arp_ops); +cleanup_target: + ipt_unregister_target(&clusterip_tgt); +cleanup_none: + return -EINVAL; +} + +static int __init init(void) +{ + return init_or_cleanup(0); +} + +static void __exit fini(void) +{ + init_or_cleanup(1); +} + +module_init(init); +module_exit(fini); --ZrCu0B0FMx3UnjE2-- --oYAXToTM8kn9Ra/9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBd+WnXaXGVTD0i/8RAg+fAKCB0pXIwdakIKjK81MdvCjVCitVEgCfU26B Kq9Z7KFrBn7pkorc7YfPhOc= =7ZlP -----END PGP SIGNATURE----- --oYAXToTM8kn9Ra/9-- From serue@us.ibm.com Thu Oct 21 09:41:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 09:41:13 -0700 (PDT) Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.131]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LGf6eg028523 for ; Thu, 21 Oct 2004 09:41:07 -0700 Received: from westrelay04.boulder.ibm.com (westrelay04.boulder.ibm.com [9.17.193.32]) by e33.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id i9LGefL4597900 for ; Thu, 21 Oct 2004 12:40:41 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i9LGeeAm071052 for ; Thu, 21 Oct 2004 10:40:40 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id i9LGeeiS003780 for ; Thu, 21 Oct 2004 10:40:40 -0600 Received: from IBM-BWN8ZTBWAO1.austin.ibm.com (IBM-BWN8ZTBWAO1.austin.ibm.com [9.41.222.60]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with SMTP id i9LGed8d003766 for ; Thu, 21 Oct 2004 10:40:39 -0600 Received: by IBM-BWN8ZTBWAO1.austin.ibm.com (sSMTP sendmail emulation); Thu, 21 Oct 2004 11:40:39 -0500 Date: Thu, 21 Oct 2004 11:40:39 -0500 From: "Serge E. Hallyn" To: netdev@oss.sgi.com Subject: [RFC] Per-process network namespaces Message-ID: <20041021164039.GA3632@IBM-BWN8ZTBWA01.austin.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-archive-position: 10660 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: serue@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 21337 Lines: 688 Hi, I've been looking at how (and whether :) to implement network namespaces. The particular use I have for this is to provide a more general method of doing the network controls for bsdjail (sourceforge.net/projects/linuxjail). I would greatly appreciate comments on the approach pursued in the attached patch. The task_struct is augmented with a network namespace (network_ns). This is just an hlist of wrappers which point to struct net_devices. By default, all processes have the root network namespace, which contains all network devices. On clone(2), specifying the CLONE_NETNS flag will cause you to receive a copy of this hlist. Under /sys/class/net/ there is a new file called hide. Doing 'echo 1 > /sys/class/net/eth1/hide' will cause eth1 to be taken out of the current network namespace. sigconf and /proc/net/dev will no longer show this device within this namespace. It still shows under /sys/class/net/, though. The intent is not exactly to prevent the process from knowing the interface exists, but rather to prevent it using the interface, and give "useful" info, ie ifconfig -a should show only useful interfaces. For actual network controls, I've given only a single example, which is the inet_bind(). This checks whether the address to be bound is on a device which is in the network namespace. These checks would of course need to be done for ipv6/etc, and for connect, sock_rcv_skb, and send. This becomes more invasive than I'd like, but I'm not sure of a cleaner way to do it. Comments are greatly appreciated. thanks, -serge diff -Nrup linux-2.6.9/include/linux/netdevice.h linux-2.6.9-netns/include/linux/netdevice.h --- linux-2.6.9/include/linux/netdevice.h 2004-10-18 16:55:27.000000000 -0500 +++ linux-2.6.9-netns/include/linux/netdevice.h 2004-10-20 12:38:58.000000000 -0500 @@ -488,6 +488,28 @@ struct net_device int padded; }; +struct netdev_wrap { + struct hlist_node next; + struct hlist_node name_hlist; + struct hlist_node index_hlist; + struct net_device *dev; +}; + +#define NETDEV_HASHBITS 8 +struct network_ns { + struct list_head namespaces; + struct hlist_head dev_base; /* list of netdev_wrap's */ + struct hlist_head dev_name_head[1<0 stopped */ @@ -584,6 +587,8 @@ struct task_struct { struct mempolicy *mempolicy; short il_next; /* could be shared with used_math */ #endif + + struct network_ns *network_ns; }; static inline pid_t process_group(struct task_struct *tsk) diff -Nrup linux-2.6.9/include/net/route.h linux-2.6.9-netns/include/net/route.h --- linux-2.6.9/include/net/route.h 2004-10-18 16:53:06.000000000 -0500 +++ linux-2.6.9-netns/include/net/route.h 2004-10-20 11:42:03.000000000 -0500 @@ -122,6 +122,7 @@ extern int ip_route_input(struct sk_buf extern unsigned short ip_rt_frag_needed(struct iphdr *iph, unsigned short new_mtu); extern void ip_rt_send_redirect(struct sk_buff *skb); +extern int netns_contains_local_addr(struct task_struct *tsk, u32 s_addr); extern unsigned inet_addr_type(u32 addr); extern void ip_rt_multicast_event(struct in_device *); extern int ip_rt_ioctl(unsigned int cmd, void __user *arg); diff -Nrup linux-2.6.9/kernel/fork.c linux-2.6.9-netns/kernel/fork.c --- linux-2.6.9/kernel/fork.c 2004-10-18 16:53:13.000000000 -0500 +++ linux-2.6.9-netns/kernel/fork.c 2004-10-19 12:10:13.000000000 -0500 @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -93,6 +94,7 @@ void __put_task_struct(struct task_struc if (unlikely(tsk->audit_context)) audit_free(tsk); security_task_free(tsk); + kref_put(&tsk->network_ns->kref, release_task_network_ns); free_uid(tsk->user); put_group_info(tsk->group_info); @@ -275,6 +277,8 @@ static struct task_struct *dup_task_stru tsk->thread_info = ti; ti->task = tsk; + tsk->network_ns = orig->network_ns; + /* One for us, one for whoever does the "release_task()" (usually parent) */ atomic_set(&tsk->usage,2); return tsk; @@ -1025,9 +1029,11 @@ static task_t *copy_process(unsigned lon goto bad_fork_cleanup_signal; if ((retval = copy_namespace(clone_flags, p))) goto bad_fork_cleanup_mm; + if ((retval = copy_netdev_namespace(clone_flags, p))) + goto bad_fork_cleanup_namespace; retval = copy_thread(0, clone_flags, stack_start, stack_size, p, regs); if (retval) - goto bad_fork_cleanup_namespace; + goto bad_fork_cleanup_netns; p->set_child_tid = (clone_flags & CLONE_CHILD_SETTID) ? child_tidptr : NULL; /* @@ -1082,7 +1088,7 @@ static task_t *copy_process(unsigned lon if (sigismember(¤t->pending.signal, SIGKILL)) { write_unlock_irq(&tasklist_lock); retval = -EINTR; - goto bad_fork_cleanup_namespace; + goto bad_fork_cleanup_netns; } /* CLONE_PARENT re-uses the old parent */ @@ -1103,7 +1109,7 @@ static task_t *copy_process(unsigned lon spin_unlock(¤t->sighand->siglock); write_unlock_irq(&tasklist_lock); retval = -EAGAIN; - goto bad_fork_cleanup_namespace; + goto bad_fork_cleanup_netns; } p->tgid = current->tgid; p->group_leader = current->group_leader; @@ -1143,6 +1149,8 @@ fork_out: return ERR_PTR(retval); return p; +bad_fork_cleanup_netns: + kref_put(&p->network_ns->kref, release_task_network_ns); bad_fork_cleanup_namespace: exit_namespace(p); bad_fork_cleanup_mm: diff -Nrup linux-2.6.9/net/core/dev.c linux-2.6.9-netns/net/core/dev.c --- linux-2.6.9/net/core/dev.c 2004-10-18 16:54:08.000000000 -0500 +++ linux-2.6.9-netns/net/core/dev.c 2004-10-20 12:44:16.000000000 -0500 @@ -108,6 +108,7 @@ #include #include #include +#include #ifdef CONFIG_NET_RADIO #include /* Note : will define WIRELESS_EXT */ #include @@ -163,6 +164,8 @@ static void sample_queue(unsigned long d static struct timer_list samp_timer = TIMER_INITIALIZER(sample_queue, 0, 0); #endif +static struct list_head network_namespaces; + /* * The @dev_base list is protected by @dev_base_lock and the rtln * semaphore. @@ -189,19 +192,28 @@ rwlock_t dev_base_lock = RW_LOCK_UNLOCKE EXPORT_SYMBOL(dev_base); EXPORT_SYMBOL(dev_base_lock); -#define NETDEV_HASHBITS 8 -static struct hlist_head dev_name_head[1<network_ns->dev_name_head[hash & ((1<network_ns->dev_index_head[ifindex & ((1<network_ns->dev_base) { + devw = hlist_entry(tmp, struct netdev_wrap, next); + dev = devw->dev; + if (i >= pos) + break; + i++; + } - for (i = 0, dev = dev_base; dev && i < pos; ++i, dev = dev->next); return i == pos ? dev : NULL; } @@ -2049,8 +2070,27 @@ void *dev_seq_start(struct seq_file *seq void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos) { + struct netdev_wrap *devw; + struct net_device *dev = NULL; + struct hlist_node *tmp; + int found = 0; + ++*pos; - return v == SEQ_START_TOKEN ? dev_base : ((struct net_device *)v)->next; + if (v == SEQ_START_TOKEN) { + tmp = current->network_ns->dev_base.first; + devw = hlist_entry(tmp, struct netdev_wrap, next); + return devw->dev; + } + + hlist_for_each(tmp, ¤t->network_ns->dev_base) { + devw = hlist_entry(tmp, struct netdev_wrap, next); + dev = devw->dev; + if (found) + return dev; + if (dev == v) + found = 1; + } + return dev; } void dev_seq_stop(struct seq_file *seq, void *v) @@ -2810,6 +2850,7 @@ int register_netdevice(struct net_device { struct hlist_head *head; struct hlist_node *p; + struct netdev_wrap *devw; int ret; BUG_ON(dev_boot_phase); @@ -2893,6 +2934,16 @@ int register_netdevice(struct net_device dev_tail = &dev->next; hlist_add_head(&dev->name_hlist, head); hlist_add_head(&dev->index_hlist, dev_index_hash(dev->ifindex)); + /* add to root ns */ + devw = kmalloc(sizeof(struct netdev_wrap), GFP_KERNEL); + INIT_HLIST_NODE(&devw->next); + INIT_HLIST_NODE(&devw->name_hlist); + INIT_HLIST_NODE(&devw->index_hlist); + devw->dev = dev; + hlist_add_head(&devw->next, &root_ns.dev_base); + hlist_add_head(&dev->name_hlist, dev_name_hash(dev->name)); + hlist_add_head(&dev->index_hlist, dev_index_hash(dev->ifindex)); + dev_hold(dev); dev->reg_state = NETREG_REGISTERING; write_unlock_bh(&dev_base_lock); @@ -3087,6 +3138,56 @@ void synchronize_net(void) synchronize_kernel(); } +static struct net_device *delete_from_all_namespaces(struct net_device *dev) +{ + struct net_device *d, **dp, *found; + struct list_head *tmp_ns; + struct hlist_node *tmp; + + /* + * delete from dev_base + * this will go away once we move to fully using namespaces + */ + for (dp = &dev_base; (d = *dp) != NULL; dp = &d->next) { + if (d == dev) { + write_lock_bh(&dev_base_lock); + hlist_del(&dev->name_hlist); + hlist_del(&dev->index_hlist); + if (dev_tail == &dev->next) + dev_tail = dp; + *dp = d->next; + write_unlock_bh(&dev_base_lock); + break; + } + } + + if (d) + found = d; + else + return NULL; + + list_for_each(tmp_ns, &network_namespaces) { + struct network_ns *ns = list_entry(tmp_ns, struct network_ns, + namespaces); + + hlist_for_each(tmp, &ns->dev_base) { + struct netdev_wrap *devw = + hlist_entry(tmp, struct netdev_wrap, next); + if (devw->dev == dev) { + write_lock_bh(&dev_base_lock); + hlist_del(&devw->name_hlist); + hlist_del(&devw->index_hlist); + hlist_del(&devw->next); + kfree(devw); + write_unlock_bh(&dev_base_lock); + break; + } + } + } + + return found; +} + /** * unregister_netdevice - remove device from the kernel * @dev: device @@ -3102,7 +3203,7 @@ void synchronize_net(void) int unregister_netdevice(struct net_device *dev) { - struct net_device *d, **dp; + struct net_device *d; BUG_ON(dev_boot_phase); ASSERT_RTNL(); @@ -3121,18 +3222,7 @@ int unregister_netdevice(struct net_devi dev_close(dev); /* And unlink it from device chain. */ - for (dp = &dev_base; (d = *dp) != NULL; dp = &d->next) { - if (d == dev) { - write_lock_bh(&dev_base_lock); - hlist_del(&dev->name_hlist); - hlist_del(&dev->index_hlist); - if (dev_tail == &dev->next) - dev_tail = dp; - *dp = d->next; - write_unlock_bh(&dev_base_lock); - break; - } - } + d = delete_from_all_namespaces(dev); if (!d) { printk(KERN_ERR "unregister net_device: '%s' not found\n", dev->name); @@ -3250,12 +3340,6 @@ static int __init net_dev_init(void) for (i = 0; i < 16; i++) INIT_LIST_HEAD(&ptype_base[i]); - for (i = 0; i < ARRAY_SIZE(dev_name_head); i++) - INIT_HLIST_HEAD(&dev_name_head[i]); - - for (i = 0; i < ARRAY_SIZE(dev_index_head); i++) - INIT_HLIST_HEAD(&dev_index_head[i]); - /* * Initialise the packet receive queues. */ @@ -3294,6 +3378,179 @@ out: return rc; } +void release_task_network_ns(struct kref *kref) +{ + struct network_ns *ns; + + if (!kref) { + printk(KERN_ERR "%s: called with NULL\n", __FUNCTION__); + return; + } + + ns = container_of(kref, struct network_ns, kref); + if (!ns) + BUG(); /* can't be! */ + + while (!hlist_empty(&ns->dev_base)) { + struct hlist_node *tmp = ns->dev_base.first; + struct netdev_wrap *devw = + hlist_entry(tmp, struct netdev_wrap, next); + hlist_del(&devw->next); + hlist_del(&devw->name_hlist); + hlist_del(&devw->index_hlist); + kfree(devw); + } + + list_del(&ns->namespaces); + kfree(ns); +} + +/* XXX NO NO NO - we're only setting the wrappers and hashes now! */ +/* don't copy the whole dev_base/dev_tail crap. */ +int copy_netdev_namespace(int flags, struct task_struct *tsk) +{ + struct network_ns *ns = tsk->network_ns; + struct network_ns *new_ns; + struct hlist_node *tmp; + int i; + + + if (!ns) { + INIT_LIST_HEAD(&network_namespaces); + ns = kmalloc(sizeof(struct network_ns), GFP_KERNEL); + INIT_LIST_HEAD(&ns->namespaces); + list_add(&ns->namespaces, &network_namespaces); + tsk->network_ns = ns; + init_task.network_ns = ns; + if (!ns) + BUG(); + INIT_HLIST_HEAD(&ns->dev_base); + kref_init(&ns->kref); + kref_get(&ns->kref); /* this one's for init_task's instance */ + + for (i = 0; i < ARRAY_SIZE(ns->dev_name_head); i++) + INIT_HLIST_HEAD(&ns->dev_name_head[i]); + + for (i = 0; i < ARRAY_SIZE(ns->dev_index_head); i++) + INIT_HLIST_HEAD(&ns->dev_index_head[i]); + + /* If devices already existed in dev_base, we would have to copy them + into ns->dev_base */ + } + kref_get(&ns->kref); + + if (!(flags & CLONE_NETNS)) + return 0; + + if (!capable(CAP_SYS_ADMIN)) { + kref_put(&ns->kref, release_task_network_ns); + return -EPERM; + } + + new_ns = kmalloc(sizeof(struct network_ns), GFP_KERNEL); + if (!new_ns) + goto out; + + INIT_LIST_HEAD(&new_ns->namespaces); + list_add(&new_ns->namespaces, &network_namespaces); + + write_lock(&dev_base_lock); + + kref_init(&new_ns->kref); + INIT_HLIST_HEAD(&new_ns->dev_base); + for (i = 0; i < ARRAY_SIZE(new_ns->dev_name_head); i++) + INIT_HLIST_HEAD(&new_ns->dev_name_head[i]); + for (i = 0; i < ARRAY_SIZE(new_ns->dev_index_head); i++) + INIT_HLIST_HEAD(&new_ns->dev_index_head[i]); + + /* Copy in the network devices */ + hlist_for_each(tmp, &ns->dev_base) { + struct netdev_wrap *devw, *neww; + struct net_device *dev; + unsigned hash; + + devw = hlist_entry(tmp, struct netdev_wrap, next); + dev = devw->dev; + neww = kmalloc(sizeof(struct netdev_wrap), GFP_KERNEL); + INIT_HLIST_NODE(&neww->next); + INIT_HLIST_NODE(&neww->name_hlist); + INIT_HLIST_NODE(&neww->index_hlist); + neww->dev = dev; + hlist_add_head(&neww->next, &new_ns->dev_base); + hash = full_name_hash(dev->name, strnlen(dev->name, IFNAMSIZ)); + hlist_add_head(&neww->name_hlist, + &new_ns->dev_name_head[hash & ((1<index_hlist, + &new_ns->dev_index_head[dev->ifindex]); + } + + write_unlock(&dev_base_lock); + tsk->network_ns = new_ns; + kref_put(&ns->kref, release_task_network_ns); + return 0; + +out: + kref_put(&ns->kref, release_task_network_ns); + return -ENOMEM; +} + +/* XXX fix for new layout */ +void ns_remove_dev(struct network_ns *ns, struct net_device *dev) +{ + struct hlist_node *tmp; + + printk(KERN_NOTICE "%s: called\n", __FUNCTION__); + + hlist_for_each(tmp, &ns->dev_base) { + struct netdev_wrap *devw = + hlist_entry(tmp, struct netdev_wrap, next); + if (devw->dev == dev) { + printk(KERN_NOTICE "%s: found device\n", __FUNCTION__); + write_lock_bh(&dev_base_lock); + + hlist_del(&devw->name_hlist); + hlist_del(&devw->index_hlist); + hlist_del(&devw->next); + kfree(devw); + + write_unlock_bh(&dev_base_lock); + return; + } + } + printk(KERN_NOTICE "%s: did not find device\n", __FUNCTION__); +} + +int is_root_netns(struct task_struct *tsk) +{ + if (tsk->network_ns == init_task.network_ns) + return 1; + return 0; +} + +int netns_contains_dev(struct task_struct *tsk, struct net_device *dev) +{ + struct hlist_node *tmp; + + /* + * suppose a simple check for tsk->network_ns->dev_index_hash[dev] + * should work? + */ + hlist_for_each(tmp, &tsk->network_ns->dev_base) { + struct netdev_wrap *devw = + hlist_entry(tmp, struct netdev_wrap, next); + if (devw->dev == dev) + return 1; + } + + return 0; +} + +EXPORT_SYMBOL(release_task_network_ns); +EXPORT_SYMBOL(copy_netdev_namespace); +EXPORT_SYMBOL(ns_remove_dev); +EXPORT_SYMBOL(is_root_netns); +EXPORT_SYMBOL(netns_contains_dev); + subsys_initcall(net_dev_init); EXPORT_SYMBOL(__dev_get); diff -Nrup linux-2.6.9/net/core/net-sysfs.c linux-2.6.9-netns/net/core/net-sysfs.c --- linux-2.6.9/net/core/net-sysfs.c 2004-10-18 16:55:07.000000000 -0500 +++ linux-2.6.9-netns/net/core/net-sysfs.c 2004-10-20 12:24:19.000000000 -0500 @@ -174,6 +174,33 @@ static ssize_t store_tx_queue_len(struct static CLASS_DEVICE_ATTR(tx_queue_len, S_IRUGO | S_IWUSR, show_tx_queue_len, store_tx_queue_len); +extern void ns_remove_dev(struct network_ns *ns, struct net_device *dev); + +static ssize_t hide_net_dev(struct class_device *dev, const char *buf, size_t len) +{ + struct net_device *net = to_net_dev(dev); + + printk(KERN_NOTICE "%s: asked to del device %s\n", + __FUNCTION__, net->name); + + if (current->network_ns == init_task.network_ns) + return -EINVAL; + + printk(KERN_NOTICE "%s: checking perms to del device %s\n", + __FUNCTION__, net->name); + if (!capable(CAP_NET_ADMIN)) + return -EPERM; + + printk(KERN_NOTICE "%s: deleting device %s\n", + __FUNCTION__, net->name); + ns_remove_dev(current->network_ns, net); + + return len; +} + +/* sysfs file to hide a network device from a namespace */ +static CLASS_DEVICE_ATTR(hide, S_IWUGO, NULL, hide_net_dev); + static struct class_device_attribute *net_class_attributes[] = { &class_device_attr_ifindex, @@ -186,6 +213,7 @@ static struct class_device_attribute *ne &class_device_attr_type, &class_device_attr_address, &class_device_attr_broadcast, + &class_device_attr_hide, NULL }; diff -Nrup linux-2.6.9/net/ipv4/af_inet.c linux-2.6.9-netns/net/ipv4/af_inet.c --- linux-2.6.9/net/ipv4/af_inet.c 2004-10-18 16:53:21.000000000 -0500 +++ linux-2.6.9-netns/net/ipv4/af_inet.c 2004-10-19 15:42:26.000000000 -0500 @@ -421,6 +421,10 @@ int inet_bind(struct socket *sock, struc chk_addr_ret != RTN_BROADCAST) goto out; + if (!is_root_netns(current) && !netns_contains_local_addr(current, + addr->sin_addr.s_addr)) + goto out; + snum = ntohs(addr->sin_port); err = -EACCES; if (snum && snum < PROT_SOCK && !capable(CAP_NET_BIND_SERVICE)) diff -Nrup linux-2.6.9/net/ipv4/devinet.c linux-2.6.9-netns/net/ipv4/devinet.c --- linux-2.6.9/net/ipv4/devinet.c 2004-10-18 16:53:43.000000000 -0500 +++ linux-2.6.9-netns/net/ipv4/devinet.c 2004-10-20 12:38:16.000000000 -0500 @@ -736,6 +736,9 @@ static int inet_gifconf(struct net_devic struct ifreq ifr; int done = 0; + if (!netns_contains_dev(current, dev)) + goto out; + if (!in_dev || (ifa = in_dev->ifa_list) == NULL) goto out; diff -Nrup linux-2.6.9/net/ipv4/fib_frontend.c linux-2.6.9-netns/net/ipv4/fib_frontend.c --- linux-2.6.9/net/ipv4/fib_frontend.c 2004-10-18 16:55:29.000000000 -0500 +++ linux-2.6.9-netns/net/ipv4/fib_frontend.c 2004-10-20 12:05:32.000000000 -0500 @@ -524,6 +524,26 @@ static void fib_disable_ip(struct net_de arp_ifdown(dev); } +int netns_contains_local_addr(struct task_struct *tsk, u32 s_addr) +{ + struct hlist_node *tmp; + struct netdev_wrap *devw; + struct net_device *dev; + + dev = ip_dev_find(s_addr); + if (!dev) + return 0; + + hlist_for_each(tmp, &tsk->network_ns->dev_base) { + devw = hlist_entry(tmp, struct netdev_wrap, next); + if (devw->dev == dev) + return 1; + } + return 0; +} + +EXPORT_SYMBOL(netns_contains_local_addr); + static int fib_inetaddr_event(struct notifier_block *this, unsigned long event, void *ptr) { struct in_ifaddr *ifa = (struct in_ifaddr*)ptr; From yoshfuji@linux-ipv6.org Thu Oct 21 09:46:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 09:46:39 -0700 (PDT) Received: from yue.st-paulia.net (yue.linux-ipv6.org [203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LGkMSG029023 for ; Thu, 21 Oct 2004 09:46:23 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 1861033CE5; Fri, 22 Oct 2004 01:46:50 +0900 (JST) Date: Fri, 22 Oct 2004 01:46:49 +0900 (JST) Message-Id: <20041022.014649.13041500.yoshfuji@linux-ipv6.org> To: mroos@linux.ee Cc: netdev@oss.sgi.com, yoshfuji@linux-ipv6.org Subject: Re: ipv6: no link-local address in 2.6.9 From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: References: Organization: USAGI Project X-URL: http://www.yoshifuji.org/%7Ehideaki/ X-Fingerprint: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA X-PGP-Key-URL: http://www.yoshifuji.org/%7Ehideaki/hideaki@yoshifuji.org.asc X-Face: "5$Al-.M>NJ%a'@hhZdQm:."qn~PA^gq4o*>iCFToq*bAi#4FRtx}enhuQKz7fNqQz\BYU] $~O_5m-9'}MIs`XGwIEscw;e5b>n"B_?j/AkL~i/MEaZBLP X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 10662 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: yoshfuji@linux-ipv6.org Precedence: bulk X-list: netdev Content-Length: 470 Lines: 10 In article (at Thu, 21 Oct 2004 11:12:33 +0300 (EEST)), Meelis Roos says: > since upgrading to 2.6.9 (actually yesterdays and todyas BK snapshots), > my e100 NIC does not get a link-local ipv6 address. ipv6 module is > loaded and lo has a ::1 address. Currently I have no ipv6 router in this > network but it still should get a link-local address? Or not anymore? Yes, it still should. --yoshfuji From jleu@mindspring.com Thu Oct 21 09:45:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 09:46:06 -0700 (PDT) Received: from argus.dangermen.com (mdsnwi16-vlan463-209.dsl.tds.net [216.170.241.209]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LGjvU6028936 for ; Thu, 21 Oct 2004 09:45:58 -0700 Received: from argus.dangermen.com (localhost [127.0.0.1]) by argus.dangermen.com (8.12.10/8.12.4) with ESMTP id i9LGoEW9011035; Thu, 21 Oct 2004 11:50:14 -0500 Received: (from jleu@localhost) by argus.dangermen.com (8.12.10/8.12.4/Submit) id i9LGoEIQ011034; Thu, 21 Oct 2004 11:50:14 -0500 X-Authentication-Warning: argus.dangermen.com: jleu set sender to jleu@mindspring.com using -f Date: Thu, 21 Oct 2004 11:50:14 -0500 From: "James R. Leu" To: "Serge E. Hallyn" Cc: netdev@oss.sgi.com Subject: Re: [RFC] Per-process network namespaces Message-ID: <20041021165014.GC5216@mindspring.com> Reply-To: jleu@mindspring.com References: <20041021164039.GA3632@IBM-BWN8ZTBWA01.austin.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021164039.GA3632@IBM-BWN8ZTBWA01.austin.ibm.com> User-Agent: Mutt/1.4i X-archive-position: 10661 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jleu@mindspring.com Precedence: bulk X-list: netdev Content-Length: 23147 Lines: 699 Please look at my linux-vrf project which adds virtual routing and forwarding for IPv4 and IPv6 to the 2.6 kernel. In particular it may fit your needs because it allows a process and all of the sockets it creates to be assigned to a VRF. Look at the code for the 'chvrf' utility to see how a process gets associated with a VRF. On Thu, Oct 21, 2004 at 11:40:39AM -0500, Serge E. Hallyn wrote: > Hi, > > I've been looking at how (and whether :) to implement network > namespaces. The particular use I have for this is to provide > a more general method of doing the network controls for bsdjail > (sourceforge.net/projects/linuxjail). I would greatly appreciate > comments on the approach pursued in the attached patch. > > The task_struct is augmented with a network namespace (network_ns). > This is just an hlist of wrappers which point to struct net_devices. > By default, all processes have the root network namespace, which > contains all network devices. On clone(2), specifying the CLONE_NETNS > flag will cause you to receive a copy of this hlist. > > Under /sys/class/net/ there is a new file called hide. Doing 'echo > 1 > /sys/class/net/eth1/hide' will cause eth1 to be taken out of the > current network namespace. sigconf and /proc/net/dev will no longer > show this device within this namespace. It still shows under > /sys/class/net/, though. The intent is not exactly to prevent the > process from knowing the interface exists, but rather to prevent it > using the interface, and give "useful" info, ie ifconfig -a should > show only useful interfaces. > > For actual network controls, I've given only a single example, which > is the inet_bind(). This checks whether the address to be bound is > on a device which is in the network namespace. These checks would > of course need to be done for ipv6/etc, and for connect, sock_rcv_skb, > and send. > > This becomes more invasive than I'd like, but I'm not sure of a > cleaner way to do it. Comments are greatly appreciated. > > thanks, > -serge > > > diff -Nrup linux-2.6.9/include/linux/netdevice.h linux-2.6.9-netns/include/linux/netdevice.h > --- linux-2.6.9/include/linux/netdevice.h 2004-10-18 16:55:27.000000000 -0500 > +++ linux-2.6.9-netns/include/linux/netdevice.h 2004-10-20 12:38:58.000000000 -0500 > @@ -488,6 +488,28 @@ struct net_device > int padded; > }; > > +struct netdev_wrap { > + struct hlist_node next; > + struct hlist_node name_hlist; > + struct hlist_node index_hlist; > + struct net_device *dev; > +}; > + > +#define NETDEV_HASHBITS 8 > +struct network_ns { > + struct list_head namespaces; > + struct hlist_head dev_base; /* list of netdev_wrap's */ > + struct hlist_head dev_name_head[1< + struct hlist_head dev_index_head[1< + > + struct kref kref; > +}; > + > +extern void release_task_network_ns(struct kref *kref); > +extern int copy_netdev_namespace(int flags, struct task_struct *tsk); > +extern int is_root_netns(struct task_struct *tsk); > +extern int netns_contains_dev(struct task_struct *tsk, struct net_device *dev); > + > #define NETDEV_ALIGN 32 > #define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) > > diff -Nrup linux-2.6.9/include/linux/sched.h linux-2.6.9-netns/include/linux/sched.h > --- linux-2.6.9/include/linux/sched.h 2004-10-18 16:53:13.000000000 -0500 > +++ linux-2.6.9-netns/include/linux/sched.h 2004-10-19 12:04:53.000000000 -0500 > @@ -53,6 +53,8 @@ struct exec_domain; > #define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */ > #define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */ > #define CLONE_STOPPED 0x02000000 /* Start in stopped state */ > +#define CLONE_NETNS 0x04000000 /* New network namespace group? */ > + > > /* > * List of flags we want to share for kernel threads, > @@ -433,6 +435,7 @@ int set_current_groups(struct group_info > > struct audit_context; /* See audit.c */ > struct mempolicy; > +struct network_ns; /* See netdevice.h */ > > struct task_struct { > volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ > @@ -584,6 +587,8 @@ struct task_struct { > struct mempolicy *mempolicy; > short il_next; /* could be shared with used_math */ > #endif > + > + struct network_ns *network_ns; > }; > > static inline pid_t process_group(struct task_struct *tsk) > diff -Nrup linux-2.6.9/include/net/route.h linux-2.6.9-netns/include/net/route.h > --- linux-2.6.9/include/net/route.h 2004-10-18 16:53:06.000000000 -0500 > +++ linux-2.6.9-netns/include/net/route.h 2004-10-20 11:42:03.000000000 -0500 > @@ -122,6 +122,7 @@ extern int ip_route_input(struct sk_buf > extern unsigned short ip_rt_frag_needed(struct iphdr *iph, unsigned short new_mtu); > extern void ip_rt_send_redirect(struct sk_buff *skb); > > +extern int netns_contains_local_addr(struct task_struct *tsk, u32 s_addr); > extern unsigned inet_addr_type(u32 addr); > extern void ip_rt_multicast_event(struct in_device *); > extern int ip_rt_ioctl(unsigned int cmd, void __user *arg); > diff -Nrup linux-2.6.9/kernel/fork.c linux-2.6.9-netns/kernel/fork.c > --- linux-2.6.9/kernel/fork.c 2004-10-18 16:53:13.000000000 -0500 > +++ linux-2.6.9-netns/kernel/fork.c 2004-10-19 12:10:13.000000000 -0500 > @@ -38,6 +38,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -93,6 +94,7 @@ void __put_task_struct(struct task_struc > if (unlikely(tsk->audit_context)) > audit_free(tsk); > security_task_free(tsk); > + kref_put(&tsk->network_ns->kref, release_task_network_ns); > free_uid(tsk->user); > put_group_info(tsk->group_info); > > @@ -275,6 +277,8 @@ static struct task_struct *dup_task_stru > tsk->thread_info = ti; > ti->task = tsk; > > + tsk->network_ns = orig->network_ns; > + > /* One for us, one for whoever does the "release_task()" (usually parent) */ > atomic_set(&tsk->usage,2); > return tsk; > @@ -1025,9 +1029,11 @@ static task_t *copy_process(unsigned lon > goto bad_fork_cleanup_signal; > if ((retval = copy_namespace(clone_flags, p))) > goto bad_fork_cleanup_mm; > + if ((retval = copy_netdev_namespace(clone_flags, p))) > + goto bad_fork_cleanup_namespace; > retval = copy_thread(0, clone_flags, stack_start, stack_size, p, regs); > if (retval) > - goto bad_fork_cleanup_namespace; > + goto bad_fork_cleanup_netns; > > p->set_child_tid = (clone_flags & CLONE_CHILD_SETTID) ? child_tidptr : NULL; > /* > @@ -1082,7 +1088,7 @@ static task_t *copy_process(unsigned lon > if (sigismember(¤t->pending.signal, SIGKILL)) { > write_unlock_irq(&tasklist_lock); > retval = -EINTR; > - goto bad_fork_cleanup_namespace; > + goto bad_fork_cleanup_netns; > } > > /* CLONE_PARENT re-uses the old parent */ > @@ -1103,7 +1109,7 @@ static task_t *copy_process(unsigned lon > spin_unlock(¤t->sighand->siglock); > write_unlock_irq(&tasklist_lock); > retval = -EAGAIN; > - goto bad_fork_cleanup_namespace; > + goto bad_fork_cleanup_netns; > } > p->tgid = current->tgid; > p->group_leader = current->group_leader; > @@ -1143,6 +1149,8 @@ fork_out: > return ERR_PTR(retval); > return p; > > +bad_fork_cleanup_netns: > + kref_put(&p->network_ns->kref, release_task_network_ns); > bad_fork_cleanup_namespace: > exit_namespace(p); > bad_fork_cleanup_mm: > diff -Nrup linux-2.6.9/net/core/dev.c linux-2.6.9-netns/net/core/dev.c > --- linux-2.6.9/net/core/dev.c 2004-10-18 16:54:08.000000000 -0500 > +++ linux-2.6.9-netns/net/core/dev.c 2004-10-20 12:44:16.000000000 -0500 > @@ -108,6 +108,7 @@ > #include > #include > #include > +#include > #ifdef CONFIG_NET_RADIO > #include /* Note : will define WIRELESS_EXT */ > #include > @@ -163,6 +164,8 @@ static void sample_queue(unsigned long d > static struct timer_list samp_timer = TIMER_INITIALIZER(sample_queue, 0, 0); > #endif > > +static struct list_head network_namespaces; > + > /* > * The @dev_base list is protected by @dev_base_lock and the rtln > * semaphore. > @@ -189,19 +192,28 @@ rwlock_t dev_base_lock = RW_LOCK_UNLOCKE > EXPORT_SYMBOL(dev_base); > EXPORT_SYMBOL(dev_base_lock); > > -#define NETDEV_HASHBITS 8 > -static struct hlist_head dev_name_head[1< -static struct hlist_head dev_index_head[1< +#define root_ns (*init_task.network_ns) > + > +static inline struct hlist_head *curns_dev_name_hash(const char *name) > +{ > + unsigned hash = full_name_hash(name, strnlen(name, IFNAMSIZ)); > + return ¤t->network_ns->dev_name_head[hash & ((1< +} > + > +static inline struct hlist_head *curns_dev_index_hash(int ifindex) > +{ > + return ¤t->network_ns->dev_index_head[ifindex & ((1< +} > > static inline struct hlist_head *dev_name_hash(const char *name) > { > unsigned hash = full_name_hash(name, strnlen(name, IFNAMSIZ)); > - return &dev_name_head[hash & ((1< + return &root_ns.dev_name_head[hash & ((1< } > > static inline struct hlist_head *dev_index_hash(int ifindex) > { > - return &dev_index_head[ifindex & ((1< + return &root_ns.dev_index_head[ifindex & ((1< } > > /* > @@ -2033,10 +2045,19 @@ static int dev_ifconf(char __user *arg) > */ > static __inline__ struct net_device *dev_get_idx(loff_t pos) > { > - struct net_device *dev; > - loff_t i; > + struct net_device *dev = NULL; > + struct netdev_wrap *devw; > + struct hlist_node *tmp; > + loff_t i = 0; > + > + hlist_for_each(tmp, ¤t->network_ns->dev_base) { > + devw = hlist_entry(tmp, struct netdev_wrap, next); > + dev = devw->dev; > + if (i >= pos) > + break; > + i++; > + } > > - for (i = 0, dev = dev_base; dev && i < pos; ++i, dev = dev->next); > > return i == pos ? dev : NULL; > } > @@ -2049,8 +2070,27 @@ void *dev_seq_start(struct seq_file *seq > > void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos) > { > + struct netdev_wrap *devw; > + struct net_device *dev = NULL; > + struct hlist_node *tmp; > + int found = 0; > + > ++*pos; > - return v == SEQ_START_TOKEN ? dev_base : ((struct net_device *)v)->next; > + if (v == SEQ_START_TOKEN) { > + tmp = current->network_ns->dev_base.first; > + devw = hlist_entry(tmp, struct netdev_wrap, next); > + return devw->dev; > + } > + > + hlist_for_each(tmp, ¤t->network_ns->dev_base) { > + devw = hlist_entry(tmp, struct netdev_wrap, next); > + dev = devw->dev; > + if (found) > + return dev; > + if (dev == v) > + found = 1; > + } > + return dev; > } > > void dev_seq_stop(struct seq_file *seq, void *v) > @@ -2810,6 +2850,7 @@ int register_netdevice(struct net_device > { > struct hlist_head *head; > struct hlist_node *p; > + struct netdev_wrap *devw; > int ret; > > BUG_ON(dev_boot_phase); > @@ -2893,6 +2934,16 @@ int register_netdevice(struct net_device > dev_tail = &dev->next; > hlist_add_head(&dev->name_hlist, head); > hlist_add_head(&dev->index_hlist, dev_index_hash(dev->ifindex)); > + /* add to root ns */ > + devw = kmalloc(sizeof(struct netdev_wrap), GFP_KERNEL); > + INIT_HLIST_NODE(&devw->next); > + INIT_HLIST_NODE(&devw->name_hlist); > + INIT_HLIST_NODE(&devw->index_hlist); > + devw->dev = dev; > + hlist_add_head(&devw->next, &root_ns.dev_base); > + hlist_add_head(&dev->name_hlist, dev_name_hash(dev->name)); > + hlist_add_head(&dev->index_hlist, dev_index_hash(dev->ifindex)); > + > dev_hold(dev); > dev->reg_state = NETREG_REGISTERING; > write_unlock_bh(&dev_base_lock); > @@ -3087,6 +3138,56 @@ void synchronize_net(void) > synchronize_kernel(); > } > > +static struct net_device *delete_from_all_namespaces(struct net_device *dev) > +{ > + struct net_device *d, **dp, *found; > + struct list_head *tmp_ns; > + struct hlist_node *tmp; > + > + /* > + * delete from dev_base > + * this will go away once we move to fully using namespaces > + */ > + for (dp = &dev_base; (d = *dp) != NULL; dp = &d->next) { > + if (d == dev) { > + write_lock_bh(&dev_base_lock); > + hlist_del(&dev->name_hlist); > + hlist_del(&dev->index_hlist); > + if (dev_tail == &dev->next) > + dev_tail = dp; > + *dp = d->next; > + write_unlock_bh(&dev_base_lock); > + break; > + } > + } > + > + if (d) > + found = d; > + else > + return NULL; > + > + list_for_each(tmp_ns, &network_namespaces) { > + struct network_ns *ns = list_entry(tmp_ns, struct network_ns, > + namespaces); > + > + hlist_for_each(tmp, &ns->dev_base) { > + struct netdev_wrap *devw = > + hlist_entry(tmp, struct netdev_wrap, next); > + if (devw->dev == dev) { > + write_lock_bh(&dev_base_lock); > + hlist_del(&devw->name_hlist); > + hlist_del(&devw->index_hlist); > + hlist_del(&devw->next); > + kfree(devw); > + write_unlock_bh(&dev_base_lock); > + break; > + } > + } > + } > + > + return found; > +} > + > /** > * unregister_netdevice - remove device from the kernel > * @dev: device > @@ -3102,7 +3203,7 @@ void synchronize_net(void) > > int unregister_netdevice(struct net_device *dev) > { > - struct net_device *d, **dp; > + struct net_device *d; > > BUG_ON(dev_boot_phase); > ASSERT_RTNL(); > @@ -3121,18 +3222,7 @@ int unregister_netdevice(struct net_devi > dev_close(dev); > > /* And unlink it from device chain. */ > - for (dp = &dev_base; (d = *dp) != NULL; dp = &d->next) { > - if (d == dev) { > - write_lock_bh(&dev_base_lock); > - hlist_del(&dev->name_hlist); > - hlist_del(&dev->index_hlist); > - if (dev_tail == &dev->next) > - dev_tail = dp; > - *dp = d->next; > - write_unlock_bh(&dev_base_lock); > - break; > - } > - } > + d = delete_from_all_namespaces(dev); > if (!d) { > printk(KERN_ERR "unregister net_device: '%s' not found\n", > dev->name); > @@ -3250,12 +3340,6 @@ static int __init net_dev_init(void) > for (i = 0; i < 16; i++) > INIT_LIST_HEAD(&ptype_base[i]); > > - for (i = 0; i < ARRAY_SIZE(dev_name_head); i++) > - INIT_HLIST_HEAD(&dev_name_head[i]); > - > - for (i = 0; i < ARRAY_SIZE(dev_index_head); i++) > - INIT_HLIST_HEAD(&dev_index_head[i]); > - > /* > * Initialise the packet receive queues. > */ > @@ -3294,6 +3378,179 @@ out: > return rc; > } > > +void release_task_network_ns(struct kref *kref) > +{ > + struct network_ns *ns; > + > + if (!kref) { > + printk(KERN_ERR "%s: called with NULL\n", __FUNCTION__); > + return; > + } > + > + ns = container_of(kref, struct network_ns, kref); > + if (!ns) > + BUG(); /* can't be! */ > + > + while (!hlist_empty(&ns->dev_base)) { > + struct hlist_node *tmp = ns->dev_base.first; > + struct netdev_wrap *devw = > + hlist_entry(tmp, struct netdev_wrap, next); > + hlist_del(&devw->next); > + hlist_del(&devw->name_hlist); > + hlist_del(&devw->index_hlist); > + kfree(devw); > + } > + > + list_del(&ns->namespaces); > + kfree(ns); > +} > + > +/* XXX NO NO NO - we're only setting the wrappers and hashes now! */ > +/* don't copy the whole dev_base/dev_tail crap. */ > +int copy_netdev_namespace(int flags, struct task_struct *tsk) > +{ > + struct network_ns *ns = tsk->network_ns; > + struct network_ns *new_ns; > + struct hlist_node *tmp; > + int i; > + > + > + if (!ns) { > + INIT_LIST_HEAD(&network_namespaces); > + ns = kmalloc(sizeof(struct network_ns), GFP_KERNEL); > + INIT_LIST_HEAD(&ns->namespaces); > + list_add(&ns->namespaces, &network_namespaces); > + tsk->network_ns = ns; > + init_task.network_ns = ns; > + if (!ns) > + BUG(); > + INIT_HLIST_HEAD(&ns->dev_base); > + kref_init(&ns->kref); > + kref_get(&ns->kref); /* this one's for init_task's instance */ > + > + for (i = 0; i < ARRAY_SIZE(ns->dev_name_head); i++) > + INIT_HLIST_HEAD(&ns->dev_name_head[i]); > + > + for (i = 0; i < ARRAY_SIZE(ns->dev_index_head); i++) > + INIT_HLIST_HEAD(&ns->dev_index_head[i]); > + > + /* If devices already existed in dev_base, we would have to copy them > + into ns->dev_base */ > + } > + kref_get(&ns->kref); > + > + if (!(flags & CLONE_NETNS)) > + return 0; > + > + if (!capable(CAP_SYS_ADMIN)) { > + kref_put(&ns->kref, release_task_network_ns); > + return -EPERM; > + } > + > + new_ns = kmalloc(sizeof(struct network_ns), GFP_KERNEL); > + if (!new_ns) > + goto out; > + > + INIT_LIST_HEAD(&new_ns->namespaces); > + list_add(&new_ns->namespaces, &network_namespaces); > + > + write_lock(&dev_base_lock); > + > + kref_init(&new_ns->kref); > + INIT_HLIST_HEAD(&new_ns->dev_base); > + for (i = 0; i < ARRAY_SIZE(new_ns->dev_name_head); i++) > + INIT_HLIST_HEAD(&new_ns->dev_name_head[i]); > + for (i = 0; i < ARRAY_SIZE(new_ns->dev_index_head); i++) > + INIT_HLIST_HEAD(&new_ns->dev_index_head[i]); > + > + /* Copy in the network devices */ > + hlist_for_each(tmp, &ns->dev_base) { > + struct netdev_wrap *devw, *neww; > + struct net_device *dev; > + unsigned hash; > + > + devw = hlist_entry(tmp, struct netdev_wrap, next); > + dev = devw->dev; > + neww = kmalloc(sizeof(struct netdev_wrap), GFP_KERNEL); > + INIT_HLIST_NODE(&neww->next); > + INIT_HLIST_NODE(&neww->name_hlist); > + INIT_HLIST_NODE(&neww->index_hlist); > + neww->dev = dev; > + hlist_add_head(&neww->next, &new_ns->dev_base); > + hash = full_name_hash(dev->name, strnlen(dev->name, IFNAMSIZ)); > + hlist_add_head(&neww->name_hlist, > + &new_ns->dev_name_head[hash & ((1< + hlist_add_head(&neww->index_hlist, > + &new_ns->dev_index_head[dev->ifindex]); > + } > + > + write_unlock(&dev_base_lock); > + tsk->network_ns = new_ns; > + kref_put(&ns->kref, release_task_network_ns); > + return 0; > + > +out: > + kref_put(&ns->kref, release_task_network_ns); > + return -ENOMEM; > +} > + > +/* XXX fix for new layout */ > +void ns_remove_dev(struct network_ns *ns, struct net_device *dev) > +{ > + struct hlist_node *tmp; > + > + printk(KERN_NOTICE "%s: called\n", __FUNCTION__); > + > + hlist_for_each(tmp, &ns->dev_base) { > + struct netdev_wrap *devw = > + hlist_entry(tmp, struct netdev_wrap, next); > + if (devw->dev == dev) { > + printk(KERN_NOTICE "%s: found device\n", __FUNCTION__); > + write_lock_bh(&dev_base_lock); > + > + hlist_del(&devw->name_hlist); > + hlist_del(&devw->index_hlist); > + hlist_del(&devw->next); > + kfree(devw); > + > + write_unlock_bh(&dev_base_lock); > + return; > + } > + } > + printk(KERN_NOTICE "%s: did not find device\n", __FUNCTION__); > +} > + > +int is_root_netns(struct task_struct *tsk) > +{ > + if (tsk->network_ns == init_task.network_ns) > + return 1; > + return 0; > +} > + > +int netns_contains_dev(struct task_struct *tsk, struct net_device *dev) > +{ > + struct hlist_node *tmp; > + > + /* > + * suppose a simple check for tsk->network_ns->dev_index_hash[dev] > + * should work? > + */ > + hlist_for_each(tmp, &tsk->network_ns->dev_base) { > + struct netdev_wrap *devw = > + hlist_entry(tmp, struct netdev_wrap, next); > + if (devw->dev == dev) > + return 1; > + } > + > + return 0; > +} > + > +EXPORT_SYMBOL(release_task_network_ns); > +EXPORT_SYMBOL(copy_netdev_namespace); > +EXPORT_SYMBOL(ns_remove_dev); > +EXPORT_SYMBOL(is_root_netns); > +EXPORT_SYMBOL(netns_contains_dev); > + > subsys_initcall(net_dev_init); > > EXPORT_SYMBOL(__dev_get); > diff -Nrup linux-2.6.9/net/core/net-sysfs.c linux-2.6.9-netns/net/core/net-sysfs.c > --- linux-2.6.9/net/core/net-sysfs.c 2004-10-18 16:55:07.000000000 -0500 > +++ linux-2.6.9-netns/net/core/net-sysfs.c 2004-10-20 12:24:19.000000000 -0500 > @@ -174,6 +174,33 @@ static ssize_t store_tx_queue_len(struct > static CLASS_DEVICE_ATTR(tx_queue_len, S_IRUGO | S_IWUSR, show_tx_queue_len, > store_tx_queue_len); > > +extern void ns_remove_dev(struct network_ns *ns, struct net_device *dev); > + > +static ssize_t hide_net_dev(struct class_device *dev, const char *buf, size_t len) > +{ > + struct net_device *net = to_net_dev(dev); > + > + printk(KERN_NOTICE "%s: asked to del device %s\n", > + __FUNCTION__, net->name); > + > + if (current->network_ns == init_task.network_ns) > + return -EINVAL; > + > + printk(KERN_NOTICE "%s: checking perms to del device %s\n", > + __FUNCTION__, net->name); > + if (!capable(CAP_NET_ADMIN)) > + return -EPERM; > + > + printk(KERN_NOTICE "%s: deleting device %s\n", > + __FUNCTION__, net->name); > + ns_remove_dev(current->network_ns, net); > + > + return len; > +} > + > +/* sysfs file to hide a network device from a namespace */ > +static CLASS_DEVICE_ATTR(hide, S_IWUGO, NULL, hide_net_dev); > + > > static struct class_device_attribute *net_class_attributes[] = { > &class_device_attr_ifindex, > @@ -186,6 +213,7 @@ static struct class_device_attribute *ne > &class_device_attr_type, > &class_device_attr_address, > &class_device_attr_broadcast, > + &class_device_attr_hide, > NULL > }; > > diff -Nrup linux-2.6.9/net/ipv4/af_inet.c linux-2.6.9-netns/net/ipv4/af_inet.c > --- linux-2.6.9/net/ipv4/af_inet.c 2004-10-18 16:53:21.000000000 -0500 > +++ linux-2.6.9-netns/net/ipv4/af_inet.c 2004-10-19 15:42:26.000000000 -0500 > @@ -421,6 +421,10 @@ int inet_bind(struct socket *sock, struc > chk_addr_ret != RTN_BROADCAST) > goto out; > > + if (!is_root_netns(current) && !netns_contains_local_addr(current, > + addr->sin_addr.s_addr)) > + goto out; > + > snum = ntohs(addr->sin_port); > err = -EACCES; > if (snum && snum < PROT_SOCK && !capable(CAP_NET_BIND_SERVICE)) > diff -Nrup linux-2.6.9/net/ipv4/devinet.c linux-2.6.9-netns/net/ipv4/devinet.c > --- linux-2.6.9/net/ipv4/devinet.c 2004-10-18 16:53:43.000000000 -0500 > +++ linux-2.6.9-netns/net/ipv4/devinet.c 2004-10-20 12:38:16.000000000 -0500 > @@ -736,6 +736,9 @@ static int inet_gifconf(struct net_devic > struct ifreq ifr; > int done = 0; > > + if (!netns_contains_dev(current, dev)) > + goto out; > + > if (!in_dev || (ifa = in_dev->ifa_list) == NULL) > goto out; > > diff -Nrup linux-2.6.9/net/ipv4/fib_frontend.c linux-2.6.9-netns/net/ipv4/fib_frontend.c > --- linux-2.6.9/net/ipv4/fib_frontend.c 2004-10-18 16:55:29.000000000 -0500 > +++ linux-2.6.9-netns/net/ipv4/fib_frontend.c 2004-10-20 12:05:32.000000000 -0500 > @@ -524,6 +524,26 @@ static void fib_disable_ip(struct net_de > arp_ifdown(dev); > } > > +int netns_contains_local_addr(struct task_struct *tsk, u32 s_addr) > +{ > + struct hlist_node *tmp; > + struct netdev_wrap *devw; > + struct net_device *dev; > + > + dev = ip_dev_find(s_addr); > + if (!dev) > + return 0; > + > + hlist_for_each(tmp, &tsk->network_ns->dev_base) { > + devw = hlist_entry(tmp, struct netdev_wrap, next); > + if (devw->dev == dev) > + return 1; > + } > + return 0; > +} > + > +EXPORT_SYMBOL(netns_contains_local_addr); > + > static int fib_inetaddr_event(struct notifier_block *this, unsigned long event, void *ptr) > { > struct in_ifaddr *ifa = (struct in_ifaddr*)ptr; -- James R. Leu jleu@mindspring.com From jleu@mindspring.com Thu Oct 21 09:47:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 09:47:29 -0700 (PDT) Received: from argus.dangermen.com (mdsnwi16-vlan463-209.dsl.tds.net [216.170.241.209]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LGlLjY029453 for ; Thu, 21 Oct 2004 09:47:21 -0700 Received: from argus.dangermen.com (localhost [127.0.0.1]) by argus.dangermen.com (8.12.10/8.12.4) with ESMTP id i9LGpcW9011058; Thu, 21 Oct 2004 11:51:38 -0500 Received: (from jleu@localhost) by argus.dangermen.com (8.12.10/8.12.4/Submit) id i9LGpcA6011057; Thu, 21 Oct 2004 11:51:38 -0500 X-Authentication-Warning: argus.dangermen.com: jleu set sender to jleu@mindspring.com using -f Date: Thu, 21 Oct 2004 11:51:38 -0500 From: "James R. Leu" To: "Serge E. Hallyn" Cc: netdev@oss.sgi.com Subject: Re: [RFC] Per-process network namespaces Message-ID: <20041021165138.GD5216@mindspring.com> Reply-To: jleu@mindspring.com References: <20041021164039.GA3632@IBM-BWN8ZTBWA01.austin.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021164039.GA3632@IBM-BWN8ZTBWA01.austin.ibm.com> User-Agent: Mutt/1.4i X-archive-position: 10663 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jleu@mindspring.com Precedence: bulk X-list: netdev Content-Length: 22869 Lines: 697 Opps. I forgot the link. http://linux-vrf.sf.net/ On Thu, Oct 21, 2004 at 11:40:39AM -0500, Serge E. Hallyn wrote: > Hi, > > I've been looking at how (and whether :) to implement network > namespaces. The particular use I have for this is to provide > a more general method of doing the network controls for bsdjail > (sourceforge.net/projects/linuxjail). I would greatly appreciate > comments on the approach pursued in the attached patch. > > The task_struct is augmented with a network namespace (network_ns). > This is just an hlist of wrappers which point to struct net_devices. > By default, all processes have the root network namespace, which > contains all network devices. On clone(2), specifying the CLONE_NETNS > flag will cause you to receive a copy of this hlist. > > Under /sys/class/net/ there is a new file called hide. Doing 'echo > 1 > /sys/class/net/eth1/hide' will cause eth1 to be taken out of the > current network namespace. sigconf and /proc/net/dev will no longer > show this device within this namespace. It still shows under > /sys/class/net/, though. The intent is not exactly to prevent the > process from knowing the interface exists, but rather to prevent it > using the interface, and give "useful" info, ie ifconfig -a should > show only useful interfaces. > > For actual network controls, I've given only a single example, which > is the inet_bind(). This checks whether the address to be bound is > on a device which is in the network namespace. These checks would > of course need to be done for ipv6/etc, and for connect, sock_rcv_skb, > and send. > > This becomes more invasive than I'd like, but I'm not sure of a > cleaner way to do it. Comments are greatly appreciated. > > thanks, > -serge > > > diff -Nrup linux-2.6.9/include/linux/netdevice.h linux-2.6.9-netns/include/linux/netdevice.h > --- linux-2.6.9/include/linux/netdevice.h 2004-10-18 16:55:27.000000000 -0500 > +++ linux-2.6.9-netns/include/linux/netdevice.h 2004-10-20 12:38:58.000000000 -0500 > @@ -488,6 +488,28 @@ struct net_device > int padded; > }; > > +struct netdev_wrap { > + struct hlist_node next; > + struct hlist_node name_hlist; > + struct hlist_node index_hlist; > + struct net_device *dev; > +}; > + > +#define NETDEV_HASHBITS 8 > +struct network_ns { > + struct list_head namespaces; > + struct hlist_head dev_base; /* list of netdev_wrap's */ > + struct hlist_head dev_name_head[1< + struct hlist_head dev_index_head[1< + > + struct kref kref; > +}; > + > +extern void release_task_network_ns(struct kref *kref); > +extern int copy_netdev_namespace(int flags, struct task_struct *tsk); > +extern int is_root_netns(struct task_struct *tsk); > +extern int netns_contains_dev(struct task_struct *tsk, struct net_device *dev); > + > #define NETDEV_ALIGN 32 > #define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) > > diff -Nrup linux-2.6.9/include/linux/sched.h linux-2.6.9-netns/include/linux/sched.h > --- linux-2.6.9/include/linux/sched.h 2004-10-18 16:53:13.000000000 -0500 > +++ linux-2.6.9-netns/include/linux/sched.h 2004-10-19 12:04:53.000000000 -0500 > @@ -53,6 +53,8 @@ struct exec_domain; > #define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */ > #define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */ > #define CLONE_STOPPED 0x02000000 /* Start in stopped state */ > +#define CLONE_NETNS 0x04000000 /* New network namespace group? */ > + > > /* > * List of flags we want to share for kernel threads, > @@ -433,6 +435,7 @@ int set_current_groups(struct group_info > > struct audit_context; /* See audit.c */ > struct mempolicy; > +struct network_ns; /* See netdevice.h */ > > struct task_struct { > volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ > @@ -584,6 +587,8 @@ struct task_struct { > struct mempolicy *mempolicy; > short il_next; /* could be shared with used_math */ > #endif > + > + struct network_ns *network_ns; > }; > > static inline pid_t process_group(struct task_struct *tsk) > diff -Nrup linux-2.6.9/include/net/route.h linux-2.6.9-netns/include/net/route.h > --- linux-2.6.9/include/net/route.h 2004-10-18 16:53:06.000000000 -0500 > +++ linux-2.6.9-netns/include/net/route.h 2004-10-20 11:42:03.000000000 -0500 > @@ -122,6 +122,7 @@ extern int ip_route_input(struct sk_buf > extern unsigned short ip_rt_frag_needed(struct iphdr *iph, unsigned short new_mtu); > extern void ip_rt_send_redirect(struct sk_buff *skb); > > +extern int netns_contains_local_addr(struct task_struct *tsk, u32 s_addr); > extern unsigned inet_addr_type(u32 addr); > extern void ip_rt_multicast_event(struct in_device *); > extern int ip_rt_ioctl(unsigned int cmd, void __user *arg); > diff -Nrup linux-2.6.9/kernel/fork.c linux-2.6.9-netns/kernel/fork.c > --- linux-2.6.9/kernel/fork.c 2004-10-18 16:53:13.000000000 -0500 > +++ linux-2.6.9-netns/kernel/fork.c 2004-10-19 12:10:13.000000000 -0500 > @@ -38,6 +38,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -93,6 +94,7 @@ void __put_task_struct(struct task_struc > if (unlikely(tsk->audit_context)) > audit_free(tsk); > security_task_free(tsk); > + kref_put(&tsk->network_ns->kref, release_task_network_ns); > free_uid(tsk->user); > put_group_info(tsk->group_info); > > @@ -275,6 +277,8 @@ static struct task_struct *dup_task_stru > tsk->thread_info = ti; > ti->task = tsk; > > + tsk->network_ns = orig->network_ns; > + > /* One for us, one for whoever does the "release_task()" (usually parent) */ > atomic_set(&tsk->usage,2); > return tsk; > @@ -1025,9 +1029,11 @@ static task_t *copy_process(unsigned lon > goto bad_fork_cleanup_signal; > if ((retval = copy_namespace(clone_flags, p))) > goto bad_fork_cleanup_mm; > + if ((retval = copy_netdev_namespace(clone_flags, p))) > + goto bad_fork_cleanup_namespace; > retval = copy_thread(0, clone_flags, stack_start, stack_size, p, regs); > if (retval) > - goto bad_fork_cleanup_namespace; > + goto bad_fork_cleanup_netns; > > p->set_child_tid = (clone_flags & CLONE_CHILD_SETTID) ? child_tidptr : NULL; > /* > @@ -1082,7 +1088,7 @@ static task_t *copy_process(unsigned lon > if (sigismember(¤t->pending.signal, SIGKILL)) { > write_unlock_irq(&tasklist_lock); > retval = -EINTR; > - goto bad_fork_cleanup_namespace; > + goto bad_fork_cleanup_netns; > } > > /* CLONE_PARENT re-uses the old parent */ > @@ -1103,7 +1109,7 @@ static task_t *copy_process(unsigned lon > spin_unlock(¤t->sighand->siglock); > write_unlock_irq(&tasklist_lock); > retval = -EAGAIN; > - goto bad_fork_cleanup_namespace; > + goto bad_fork_cleanup_netns; > } > p->tgid = current->tgid; > p->group_leader = current->group_leader; > @@ -1143,6 +1149,8 @@ fork_out: > return ERR_PTR(retval); > return p; > > +bad_fork_cleanup_netns: > + kref_put(&p->network_ns->kref, release_task_network_ns); > bad_fork_cleanup_namespace: > exit_namespace(p); > bad_fork_cleanup_mm: > diff -Nrup linux-2.6.9/net/core/dev.c linux-2.6.9-netns/net/core/dev.c > --- linux-2.6.9/net/core/dev.c 2004-10-18 16:54:08.000000000 -0500 > +++ linux-2.6.9-netns/net/core/dev.c 2004-10-20 12:44:16.000000000 -0500 > @@ -108,6 +108,7 @@ > #include > #include > #include > +#include > #ifdef CONFIG_NET_RADIO > #include /* Note : will define WIRELESS_EXT */ > #include > @@ -163,6 +164,8 @@ static void sample_queue(unsigned long d > static struct timer_list samp_timer = TIMER_INITIALIZER(sample_queue, 0, 0); > #endif > > +static struct list_head network_namespaces; > + > /* > * The @dev_base list is protected by @dev_base_lock and the rtln > * semaphore. > @@ -189,19 +192,28 @@ rwlock_t dev_base_lock = RW_LOCK_UNLOCKE > EXPORT_SYMBOL(dev_base); > EXPORT_SYMBOL(dev_base_lock); > > -#define NETDEV_HASHBITS 8 > -static struct hlist_head dev_name_head[1< -static struct hlist_head dev_index_head[1< +#define root_ns (*init_task.network_ns) > + > +static inline struct hlist_head *curns_dev_name_hash(const char *name) > +{ > + unsigned hash = full_name_hash(name, strnlen(name, IFNAMSIZ)); > + return ¤t->network_ns->dev_name_head[hash & ((1< +} > + > +static inline struct hlist_head *curns_dev_index_hash(int ifindex) > +{ > + return ¤t->network_ns->dev_index_head[ifindex & ((1< +} > > static inline struct hlist_head *dev_name_hash(const char *name) > { > unsigned hash = full_name_hash(name, strnlen(name, IFNAMSIZ)); > - return &dev_name_head[hash & ((1< + return &root_ns.dev_name_head[hash & ((1< } > > static inline struct hlist_head *dev_index_hash(int ifindex) > { > - return &dev_index_head[ifindex & ((1< + return &root_ns.dev_index_head[ifindex & ((1< } > > /* > @@ -2033,10 +2045,19 @@ static int dev_ifconf(char __user *arg) > */ > static __inline__ struct net_device *dev_get_idx(loff_t pos) > { > - struct net_device *dev; > - loff_t i; > + struct net_device *dev = NULL; > + struct netdev_wrap *devw; > + struct hlist_node *tmp; > + loff_t i = 0; > + > + hlist_for_each(tmp, ¤t->network_ns->dev_base) { > + devw = hlist_entry(tmp, struct netdev_wrap, next); > + dev = devw->dev; > + if (i >= pos) > + break; > + i++; > + } > > - for (i = 0, dev = dev_base; dev && i < pos; ++i, dev = dev->next); > > return i == pos ? dev : NULL; > } > @@ -2049,8 +2070,27 @@ void *dev_seq_start(struct seq_file *seq > > void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos) > { > + struct netdev_wrap *devw; > + struct net_device *dev = NULL; > + struct hlist_node *tmp; > + int found = 0; > + > ++*pos; > - return v == SEQ_START_TOKEN ? dev_base : ((struct net_device *)v)->next; > + if (v == SEQ_START_TOKEN) { > + tmp = current->network_ns->dev_base.first; > + devw = hlist_entry(tmp, struct netdev_wrap, next); > + return devw->dev; > + } > + > + hlist_for_each(tmp, ¤t->network_ns->dev_base) { > + devw = hlist_entry(tmp, struct netdev_wrap, next); > + dev = devw->dev; > + if (found) > + return dev; > + if (dev == v) > + found = 1; > + } > + return dev; > } > > void dev_seq_stop(struct seq_file *seq, void *v) > @@ -2810,6 +2850,7 @@ int register_netdevice(struct net_device > { > struct hlist_head *head; > struct hlist_node *p; > + struct netdev_wrap *devw; > int ret; > > BUG_ON(dev_boot_phase); > @@ -2893,6 +2934,16 @@ int register_netdevice(struct net_device > dev_tail = &dev->next; > hlist_add_head(&dev->name_hlist, head); > hlist_add_head(&dev->index_hlist, dev_index_hash(dev->ifindex)); > + /* add to root ns */ > + devw = kmalloc(sizeof(struct netdev_wrap), GFP_KERNEL); > + INIT_HLIST_NODE(&devw->next); > + INIT_HLIST_NODE(&devw->name_hlist); > + INIT_HLIST_NODE(&devw->index_hlist); > + devw->dev = dev; > + hlist_add_head(&devw->next, &root_ns.dev_base); > + hlist_add_head(&dev->name_hlist, dev_name_hash(dev->name)); > + hlist_add_head(&dev->index_hlist, dev_index_hash(dev->ifindex)); > + > dev_hold(dev); > dev->reg_state = NETREG_REGISTERING; > write_unlock_bh(&dev_base_lock); > @@ -3087,6 +3138,56 @@ void synchronize_net(void) > synchronize_kernel(); > } > > +static struct net_device *delete_from_all_namespaces(struct net_device *dev) > +{ > + struct net_device *d, **dp, *found; > + struct list_head *tmp_ns; > + struct hlist_node *tmp; > + > + /* > + * delete from dev_base > + * this will go away once we move to fully using namespaces > + */ > + for (dp = &dev_base; (d = *dp) != NULL; dp = &d->next) { > + if (d == dev) { > + write_lock_bh(&dev_base_lock); > + hlist_del(&dev->name_hlist); > + hlist_del(&dev->index_hlist); > + if (dev_tail == &dev->next) > + dev_tail = dp; > + *dp = d->next; > + write_unlock_bh(&dev_base_lock); > + break; > + } > + } > + > + if (d) > + found = d; > + else > + return NULL; > + > + list_for_each(tmp_ns, &network_namespaces) { > + struct network_ns *ns = list_entry(tmp_ns, struct network_ns, > + namespaces); > + > + hlist_for_each(tmp, &ns->dev_base) { > + struct netdev_wrap *devw = > + hlist_entry(tmp, struct netdev_wrap, next); > + if (devw->dev == dev) { > + write_lock_bh(&dev_base_lock); > + hlist_del(&devw->name_hlist); > + hlist_del(&devw->index_hlist); > + hlist_del(&devw->next); > + kfree(devw); > + write_unlock_bh(&dev_base_lock); > + break; > + } > + } > + } > + > + return found; > +} > + > /** > * unregister_netdevice - remove device from the kernel > * @dev: device > @@ -3102,7 +3203,7 @@ void synchronize_net(void) > > int unregister_netdevice(struct net_device *dev) > { > - struct net_device *d, **dp; > + struct net_device *d; > > BUG_ON(dev_boot_phase); > ASSERT_RTNL(); > @@ -3121,18 +3222,7 @@ int unregister_netdevice(struct net_devi > dev_close(dev); > > /* And unlink it from device chain. */ > - for (dp = &dev_base; (d = *dp) != NULL; dp = &d->next) { > - if (d == dev) { > - write_lock_bh(&dev_base_lock); > - hlist_del(&dev->name_hlist); > - hlist_del(&dev->index_hlist); > - if (dev_tail == &dev->next) > - dev_tail = dp; > - *dp = d->next; > - write_unlock_bh(&dev_base_lock); > - break; > - } > - } > + d = delete_from_all_namespaces(dev); > if (!d) { > printk(KERN_ERR "unregister net_device: '%s' not found\n", > dev->name); > @@ -3250,12 +3340,6 @@ static int __init net_dev_init(void) > for (i = 0; i < 16; i++) > INIT_LIST_HEAD(&ptype_base[i]); > > - for (i = 0; i < ARRAY_SIZE(dev_name_head); i++) > - INIT_HLIST_HEAD(&dev_name_head[i]); > - > - for (i = 0; i < ARRAY_SIZE(dev_index_head); i++) > - INIT_HLIST_HEAD(&dev_index_head[i]); > - > /* > * Initialise the packet receive queues. > */ > @@ -3294,6 +3378,179 @@ out: > return rc; > } > > +void release_task_network_ns(struct kref *kref) > +{ > + struct network_ns *ns; > + > + if (!kref) { > + printk(KERN_ERR "%s: called with NULL\n", __FUNCTION__); > + return; > + } > + > + ns = container_of(kref, struct network_ns, kref); > + if (!ns) > + BUG(); /* can't be! */ > + > + while (!hlist_empty(&ns->dev_base)) { > + struct hlist_node *tmp = ns->dev_base.first; > + struct netdev_wrap *devw = > + hlist_entry(tmp, struct netdev_wrap, next); > + hlist_del(&devw->next); > + hlist_del(&devw->name_hlist); > + hlist_del(&devw->index_hlist); > + kfree(devw); > + } > + > + list_del(&ns->namespaces); > + kfree(ns); > +} > + > +/* XXX NO NO NO - we're only setting the wrappers and hashes now! */ > +/* don't copy the whole dev_base/dev_tail crap. */ > +int copy_netdev_namespace(int flags, struct task_struct *tsk) > +{ > + struct network_ns *ns = tsk->network_ns; > + struct network_ns *new_ns; > + struct hlist_node *tmp; > + int i; > + > + > + if (!ns) { > + INIT_LIST_HEAD(&network_namespaces); > + ns = kmalloc(sizeof(struct network_ns), GFP_KERNEL); > + INIT_LIST_HEAD(&ns->namespaces); > + list_add(&ns->namespaces, &network_namespaces); > + tsk->network_ns = ns; > + init_task.network_ns = ns; > + if (!ns) > + BUG(); > + INIT_HLIST_HEAD(&ns->dev_base); > + kref_init(&ns->kref); > + kref_get(&ns->kref); /* this one's for init_task's instance */ > + > + for (i = 0; i < ARRAY_SIZE(ns->dev_name_head); i++) > + INIT_HLIST_HEAD(&ns->dev_name_head[i]); > + > + for (i = 0; i < ARRAY_SIZE(ns->dev_index_head); i++) > + INIT_HLIST_HEAD(&ns->dev_index_head[i]); > + > + /* If devices already existed in dev_base, we would have to copy them > + into ns->dev_base */ > + } > + kref_get(&ns->kref); > + > + if (!(flags & CLONE_NETNS)) > + return 0; > + > + if (!capable(CAP_SYS_ADMIN)) { > + kref_put(&ns->kref, release_task_network_ns); > + return -EPERM; > + } > + > + new_ns = kmalloc(sizeof(struct network_ns), GFP_KERNEL); > + if (!new_ns) > + goto out; > + > + INIT_LIST_HEAD(&new_ns->namespaces); > + list_add(&new_ns->namespaces, &network_namespaces); > + > + write_lock(&dev_base_lock); > + > + kref_init(&new_ns->kref); > + INIT_HLIST_HEAD(&new_ns->dev_base); > + for (i = 0; i < ARRAY_SIZE(new_ns->dev_name_head); i++) > + INIT_HLIST_HEAD(&new_ns->dev_name_head[i]); > + for (i = 0; i < ARRAY_SIZE(new_ns->dev_index_head); i++) > + INIT_HLIST_HEAD(&new_ns->dev_index_head[i]); > + > + /* Copy in the network devices */ > + hlist_for_each(tmp, &ns->dev_base) { > + struct netdev_wrap *devw, *neww; > + struct net_device *dev; > + unsigned hash; > + > + devw = hlist_entry(tmp, struct netdev_wrap, next); > + dev = devw->dev; > + neww = kmalloc(sizeof(struct netdev_wrap), GFP_KERNEL); > + INIT_HLIST_NODE(&neww->next); > + INIT_HLIST_NODE(&neww->name_hlist); > + INIT_HLIST_NODE(&neww->index_hlist); > + neww->dev = dev; > + hlist_add_head(&neww->next, &new_ns->dev_base); > + hash = full_name_hash(dev->name, strnlen(dev->name, IFNAMSIZ)); > + hlist_add_head(&neww->name_hlist, > + &new_ns->dev_name_head[hash & ((1< + hlist_add_head(&neww->index_hlist, > + &new_ns->dev_index_head[dev->ifindex]); > + } > + > + write_unlock(&dev_base_lock); > + tsk->network_ns = new_ns; > + kref_put(&ns->kref, release_task_network_ns); > + return 0; > + > +out: > + kref_put(&ns->kref, release_task_network_ns); > + return -ENOMEM; > +} > + > +/* XXX fix for new layout */ > +void ns_remove_dev(struct network_ns *ns, struct net_device *dev) > +{ > + struct hlist_node *tmp; > + > + printk(KERN_NOTICE "%s: called\n", __FUNCTION__); > + > + hlist_for_each(tmp, &ns->dev_base) { > + struct netdev_wrap *devw = > + hlist_entry(tmp, struct netdev_wrap, next); > + if (devw->dev == dev) { > + printk(KERN_NOTICE "%s: found device\n", __FUNCTION__); > + write_lock_bh(&dev_base_lock); > + > + hlist_del(&devw->name_hlist); > + hlist_del(&devw->index_hlist); > + hlist_del(&devw->next); > + kfree(devw); > + > + write_unlock_bh(&dev_base_lock); > + return; > + } > + } > + printk(KERN_NOTICE "%s: did not find device\n", __FUNCTION__); > +} > + > +int is_root_netns(struct task_struct *tsk) > +{ > + if (tsk->network_ns == init_task.network_ns) > + return 1; > + return 0; > +} > + > +int netns_contains_dev(struct task_struct *tsk, struct net_device *dev) > +{ > + struct hlist_node *tmp; > + > + /* > + * suppose a simple check for tsk->network_ns->dev_index_hash[dev] > + * should work? > + */ > + hlist_for_each(tmp, &tsk->network_ns->dev_base) { > + struct netdev_wrap *devw = > + hlist_entry(tmp, struct netdev_wrap, next); > + if (devw->dev == dev) > + return 1; > + } > + > + return 0; > +} > + > +EXPORT_SYMBOL(release_task_network_ns); > +EXPORT_SYMBOL(copy_netdev_namespace); > +EXPORT_SYMBOL(ns_remove_dev); > +EXPORT_SYMBOL(is_root_netns); > +EXPORT_SYMBOL(netns_contains_dev); > + > subsys_initcall(net_dev_init); > > EXPORT_SYMBOL(__dev_get); > diff -Nrup linux-2.6.9/net/core/net-sysfs.c linux-2.6.9-netns/net/core/net-sysfs.c > --- linux-2.6.9/net/core/net-sysfs.c 2004-10-18 16:55:07.000000000 -0500 > +++ linux-2.6.9-netns/net/core/net-sysfs.c 2004-10-20 12:24:19.000000000 -0500 > @@ -174,6 +174,33 @@ static ssize_t store_tx_queue_len(struct > static CLASS_DEVICE_ATTR(tx_queue_len, S_IRUGO | S_IWUSR, show_tx_queue_len, > store_tx_queue_len); > > +extern void ns_remove_dev(struct network_ns *ns, struct net_device *dev); > + > +static ssize_t hide_net_dev(struct class_device *dev, const char *buf, size_t len) > +{ > + struct net_device *net = to_net_dev(dev); > + > + printk(KERN_NOTICE "%s: asked to del device %s\n", > + __FUNCTION__, net->name); > + > + if (current->network_ns == init_task.network_ns) > + return -EINVAL; > + > + printk(KERN_NOTICE "%s: checking perms to del device %s\n", > + __FUNCTION__, net->name); > + if (!capable(CAP_NET_ADMIN)) > + return -EPERM; > + > + printk(KERN_NOTICE "%s: deleting device %s\n", > + __FUNCTION__, net->name); > + ns_remove_dev(current->network_ns, net); > + > + return len; > +} > + > +/* sysfs file to hide a network device from a namespace */ > +static CLASS_DEVICE_ATTR(hide, S_IWUGO, NULL, hide_net_dev); > + > > static struct class_device_attribute *net_class_attributes[] = { > &class_device_attr_ifindex, > @@ -186,6 +213,7 @@ static struct class_device_attribute *ne > &class_device_attr_type, > &class_device_attr_address, > &class_device_attr_broadcast, > + &class_device_attr_hide, > NULL > }; > > diff -Nrup linux-2.6.9/net/ipv4/af_inet.c linux-2.6.9-netns/net/ipv4/af_inet.c > --- linux-2.6.9/net/ipv4/af_inet.c 2004-10-18 16:53:21.000000000 -0500 > +++ linux-2.6.9-netns/net/ipv4/af_inet.c 2004-10-19 15:42:26.000000000 -0500 > @@ -421,6 +421,10 @@ int inet_bind(struct socket *sock, struc > chk_addr_ret != RTN_BROADCAST) > goto out; > > + if (!is_root_netns(current) && !netns_contains_local_addr(current, > + addr->sin_addr.s_addr)) > + goto out; > + > snum = ntohs(addr->sin_port); > err = -EACCES; > if (snum && snum < PROT_SOCK && !capable(CAP_NET_BIND_SERVICE)) > diff -Nrup linux-2.6.9/net/ipv4/devinet.c linux-2.6.9-netns/net/ipv4/devinet.c > --- linux-2.6.9/net/ipv4/devinet.c 2004-10-18 16:53:43.000000000 -0500 > +++ linux-2.6.9-netns/net/ipv4/devinet.c 2004-10-20 12:38:16.000000000 -0500 > @@ -736,6 +736,9 @@ static int inet_gifconf(struct net_devic > struct ifreq ifr; > int done = 0; > > + if (!netns_contains_dev(current, dev)) > + goto out; > + > if (!in_dev || (ifa = in_dev->ifa_list) == NULL) > goto out; > > diff -Nrup linux-2.6.9/net/ipv4/fib_frontend.c linux-2.6.9-netns/net/ipv4/fib_frontend.c > --- linux-2.6.9/net/ipv4/fib_frontend.c 2004-10-18 16:55:29.000000000 -0500 > +++ linux-2.6.9-netns/net/ipv4/fib_frontend.c 2004-10-20 12:05:32.000000000 -0500 > @@ -524,6 +524,26 @@ static void fib_disable_ip(struct net_de > arp_ifdown(dev); > } > > +int netns_contains_local_addr(struct task_struct *tsk, u32 s_addr) > +{ > + struct hlist_node *tmp; > + struct netdev_wrap *devw; > + struct net_device *dev; > + > + dev = ip_dev_find(s_addr); > + if (!dev) > + return 0; > + > + hlist_for_each(tmp, &tsk->network_ns->dev_base) { > + devw = hlist_entry(tmp, struct netdev_wrap, next); > + if (devw->dev == dev) > + return 1; > + } > + return 0; > +} > + > +EXPORT_SYMBOL(netns_contains_local_addr); > + > static int fib_inetaddr_event(struct notifier_block *this, unsigned long event, void *ptr) > { > struct in_ifaddr *ifa = (struct in_ifaddr*)ptr; -- James R. Leu jleu@mindspring.com From colin@colino.net Thu Oct 21 10:27:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 10:27:27 -0700 (PDT) Received: from paperstreet.colino.net (colino.net [213.41.131.56]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LHRLti031057 for ; Thu, 21 Oct 2004 10:27:22 -0700 Received: by paperstreet.colino.net (Postfix, from userid 1015) id 3026173EC; Thu, 21 Oct 2004 19:26:58 +0200 (CEST) Received: from jack.colino.net (jack.colino.net [192.168.0.11]) by paperstreet.colino.net (Postfix) with ESMTP id 1F61E73E9; Thu, 21 Oct 2004 19:26:46 +0200 (CEST) Date: Thu, 21 Oct 2004 18:36:10 +0200 From: Colin Leroy To: Eric Lemoine Cc: netdev@oss.sgi.com Subject: Re: [PATCH] Prevent netpoll hanging when link is down Message-ID: <20041021183610.23c5121c.colin@colino.net> In-Reply-To: <5cac192f0410200848179ccc81@mail.gmail.com> References: <20041007214505.GB31558@wotan.suse.de> <20041011162224.GL31237@waste.org> <20041011163226.GG26350@wotan.suse.de> <20041011163601.GM31237@waste.org> <20041011164315.GH26350@wotan.suse.de> <20041011165851.GN31237@waste.org> <20041011224542.5bdc93aa@jack.colino.net> <5cac192f0410181443303379e2@mail.gmail.com> <5cac192f041018145824acce5a@mail.gmail.com> <20041020161119.6e30efe5@pirandello> <5cac192f0410200848179ccc81@mail.gmail.com> X-Mailer: Sylpheed-Claws 0.9.12cvs130.1 (GTK+ 2.4.9; powerpc-unknown-linux-gnu) X-Face: Fy:*XpRna1/tz}cJ@O'0^:qYs:8b[Rg`*8,+o^[fI?<%5LeB,Xz8ZJK[r7V0hBs8G)*&C+XA0qHoR=LoTohe@7X5K$A-@cN6n~~J/]+{[)E4h'lK$13WQf$.R+Pi;E09tk&{t|;~dakRD%CLHrk6m!?gA,5|Sb=fJ=>[9#n1Bu8?VngkVM4{'^'V_qgdA.8yn3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-archive-position: 10664 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: colin@colino.net Precedence: bulk X-list: netdev Content-Length: 726 Lines: 22 On 20 Oct 2004 at 17h10, Eric Lemoine wrote: Hi Eric, > > > > > [deadlock with sungem & netconsole when no carrier] > > > > Sorry I'm catching up on that problem... Do you have your > > > > problem solved? If not, did you try removing all printk calls > > > > from within gem_poll(), as suggested by Matt Mackall? > > > > Ok. Keep me posted. If removing the printk's indeed helps I'll cook up > a proper fix. Ok, it tried... It doesn't help. I tried the wild way too: #define printk(...) do {} while (0); It didn't help either. I'll give a look to other net drivers, to see if they do stuff differently, but I fear that I won't find it easily... -- Colin "If you can't beat your computer at chess, try kickboxing." From hadi@cyberus.ca Thu Oct 21 10:44:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 10:44:43 -0700 (PDT) Received: from mx01.cybersurf.com (mx01.cybersurf.com [209.197.145.104]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LHiZjr031739 for ; Thu, 21 Oct 2004 10:44:36 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx01.cybersurf.com with esmtp (Exim 4.30) id 1CKgz5-0006xY-3c for netdev@oss.sgi.com; Thu, 21 Oct 2004 13:44:19 -0400 Received: from [216.209.86.2] (helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CKgz0-0005zv-LU; Thu, 21 Oct 2004 13:44:14 -0400 Subject: Re: [PATCH 2.6] iptables CLUSTERIP target, seq_file version From: jamal Reply-To: hadi@cyberus.ca To: Harald Welte Cc: "David S. Miller" , Linux Netdev List , Netfilter Development Mailinglist , lmb@suse.de In-Reply-To: <20041021163655.GK3551@sunbeam.de.gnumonks.org> References: <20041020223828.GP19899@sunbeam.de.gnumonks.org> <20041021163655.GK3551@sunbeam.de.gnumonks.org> Content-Type: text/plain Organization: jamalopolous Message-Id: <1098380650.1031.82.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 21 Oct 2004 13:44:11 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 10665 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev Content-Length: 1873 Lines: 47 Sorry, couldnt resist - so out of hiding for just a few seconds; should be able to achieve this much simpler with gact. Example: Consider two machines with allowed to receive only packets for 10.0.0.3. A simple balance scheme is to have even src IPs being processed by one and odd by another. #add ingress qdisc to eth2 # Accept arps destined for 10.0.0.3 but sourced from even numbered # src addresses tc filter add dev eth2 parent ffff: protocol arp prio 6 u32 match u32 0xa000003 0xffffffff at 24 match u8 0x0 0x1 at 17 flowid 1:2 action ok # drop any other arps for 10.0.0.3 tc filter add dev eth2 parent ffff: protocol arp prio 7 u32 match u32 0xa000003 0xffffffff at 24 flowid 1:2 action drop On a second machine which is doing odd just change the u8 to 0x1 0x1. No need to send fake ARPs using multicast with this. But if you wanted to be funky you could use pedit to create a virtual MAC address. We use this well with a lot more complex static rules and failover. cheers, jamal (Back to work) On Thu, 2004-10-21 at 12:36, Harald Welte wrote: > On Thu, Oct 21, 2004 at 12:38:28AM +0200, Harald Welte wrote: > Hi Dave! > > This is the 'CLUSTERIP' target for iptables, this time no core kernel > changes required, please apply. > > This enables you to build a static load sharing cluster between multiple > nodes - without the requirement to have a load balancer. It uses a > series of [evil] tricks like replying with linklayer multicast addresses > to ARP requests, and using CONNMARK for stateful blocking all traffic > not intended for the local node. > > Apart from the usual netfilter-specific file additions and > Kconfig/Makefile patches, this needs to export proc_file_operations in > order to get the reference counting of certain data objects right. I > hope this change is acceptable. > > Signed-off-by: Harald Welte From laforge@netfilter.org Thu Oct 21 11:03:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 11:03:57 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LI3oC6000424 for ; Thu, 21 Oct 2004 11:03:50 -0700 Received: from dsl-213-023-154-242.arcor-ip.net ([213.23.154.242] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1CKhHh-0006hm-Gq; Thu, 21 Oct 2004 20:03:34 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1CKhHY-000341-H5; Thu, 21 Oct 2004 20:03:24 +0200 Date: Thu, 21 Oct 2004 20:03:24 +0200 From: Harald Welte To: jamal Cc: "David S. Miller" , Linux Netdev List , Netfilter Development Mailinglist , lmb@suse.de Subject: Re: [PATCH 2.6] iptables CLUSTERIP target, seq_file version Message-ID: <20041021180324.GL3551@sunbeam.de.gnumonks.org> Mail-Followup-To: Harald Welte , jamal , "David S. Miller" , Linux Netdev List , Netfilter Development Mailinglist , lmb@suse.de References: <20041020223828.GP19899@sunbeam.de.gnumonks.org> <20041021163655.GK3551@sunbeam.de.gnumonks.org> <1098380650.1031.82.camel@jzny.localdomain> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="A2x6GFCQWVc4i5ud" Content-Disposition: inline In-Reply-To: <1098380650.1031.82.camel@jzny.localdomain> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10666 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@netfilter.org Precedence: bulk X-list: netdev Content-Length: 1683 Lines: 46 --A2x6GFCQWVc4i5ud Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 21, 2004 at 01:44:11PM -0400, jamal wrote: >=20 > Sorry, couldnt resist - so out of hiding for just a few seconds; should > be able to achieve this much simpler with gact. One of the issues that CLUSTERIP needed to do is to work with locally-originated connections, i.e. every node within the cluster still has to be able to open tcp connections to anywhere. We currently catch this with connection tracking, which will assign all reply packets to such outbound connections INVALID on all but the originating node in the cluster. Yes, I know, this sounds like a very strange setup. Still it was one of the requirements for it's implementation. --=20 - Harald Welte http://www.netfilter.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie --A2x6GFCQWVc4i5ud Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBd/nsXaXGVTD0i/8RAtsdAJ9wpvL5dCeNxqsj7+6DisrSS4JSfgCfUY4w qn2cFMew7dFBjw8GAqvnz9Y= =XKDz -----END PGP SIGNATURE----- --A2x6GFCQWVc4i5ud-- From hno@marasystems.com Thu Oct 21 11:42:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 11:42:48 -0700 (PDT) Received: from filer.marasystems.com (marasystems.com [83.241.133.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LIggeq001937 for ; Thu, 21 Oct 2004 11:42:43 -0700 Received: from localhost (henrik@localhost) by filer.marasystems.com (8.11.6/8.11.6) with ESMTP id i9LIfYQ27001; Thu, 21 Oct 2004 20:41:34 +0200 Date: Thu, 21 Oct 2004 20:41:34 +0200 (CEST) From: Henrik Nordstrom To: Harald Welte cc: jamal , Linux Netdev List , Netfilter Development Mailinglist , lmb@suse.de Subject: Re: [PATCH 2.6] iptables CLUSTERIP target, seq_file version In-Reply-To: <20041021180324.GL3551@sunbeam.de.gnumonks.org> Message-ID: References: <20041020223828.GP19899@sunbeam.de.gnumonks.org> <20041021163655.GK3551@sunbeam.de.gnumonks.org> <1098380650.1031.82.camel@jzny.localdomain> <20041021180324.GL3551@sunbeam.de.gnumonks.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-archive-position: 10667 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hno@marasystems.com Precedence: bulk X-list: netdev Content-Length: 637 Lines: 17 On Thu, 21 Oct 2004, Harald Welte wrote: > On Thu, Oct 21, 2004 at 01:44:11PM -0400, jamal wrote: >> >> Sorry, couldnt resist - so out of hiding for just a few seconds; should >> be able to achieve this much simpler with gact. > > One of the issues that CLUSTERIP needed to do is to work with > locally-originated connections, i.e. every node within the cluster still > has to be able to open tcp connections to anywhere. Another criteria fulfilled by CLUSTERIP is the ability to do a soft failover where the new note accepts all new connections but the old node continues processing the connections it already have. Regards Henrik From tgraf@suug.ch Thu Oct 21 12:42:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 12:42:18 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LJgBd4007025 for ; Thu, 21 Oct 2004 12:42:12 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id A6AE3F; Thu, 21 Oct 2004 21:41:33 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 871C51C0E9; Thu, 21 Oct 2004 21:42:16 +0200 (CEST) Date: Thu, 21 Oct 2004 21:42:16 +0200 From: Thomas Graf To: Stephen Hemminger Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH] iproute2: support generic statistics and add requeues statistics Message-ID: <20041021194216.GW21977@postel.suug.ch> References: <20041021123209.GE21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021123209.GE21977@postel.suug.ch> X-archive-position: 10668 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 9508 Lines: 312 Stephen, Here is a patch for iproute2 adding support for the new statistic interface while still being backward compatible to the old statistic TLVs. Contains the following changes: o Add linux/gen_stats.h to header files o Update linux/rtnetlink.h to contain TCA_STATS2 TLV type o Modify print_tcstats_attr to take a TLV array, prefix string and xstats TLV result pointer. It will search for TCA_STATS2 in the TLV array and eventually fall back to TCA_STATS. If TCA_STATS2 is present it will look for TCA_STATS_APP and if present use it as xstats, otherwise it falls back to TCA_XSTATS. The prefix is printed on every new line to allow indenting properly. o Modify all callers to print_tcstats_attr and make them provide the new attributes and a xstats result pointer if needed. The xstats result pointer is checked for != NULL and used if true, otherwise it falls back to TCA_XSTATS to handle the unlikely case when TCA_STATS and TCA_STATS2 are not present but TCA_XSTATS is. I tried to stick to the old dumping format to not break too many scripts with the new requeues statistics. diff -Nru iproute2-2.6.9.orig/include/linux/gen_stats.h iproute2-2.6.9/include/linux/gen_stats.h --- iproute2-2.6.9.orig/include/linux/gen_stats.h 1970-01-01 01:00:00.000000000 +0100 +++ iproute2-2.6.9/include/linux/gen_stats.h 2004-10-21 18:17:31.000000000 +0200 @@ -0,0 +1,62 @@ +#ifndef __LINUX_GEN_STATS_H +#define __LINUX_GEN_STATS_H + +#include + +enum { + TCA_STATS_UNSPEC, + TCA_STATS_BASIC, + TCA_STATS_RATE_EST, + TCA_STATS_QUEUE, + TCA_STATS_APP, + __TCA_STATS_MAX, +}; +#define TCA_STATS_MAX (__TCA_STATS_MAX - 1) + +/** + * @bytes: number of seen bytes + * @packets: number of seen packets + */ +struct gnet_stats_basic +{ + __u64 bytes; + __u32 packets; +}; + +/** + * @bps: current byte rate + * @pps: current packet rate + */ +struct gnet_stats_rate_est +{ + __u32 bps; + __u32 pps; +}; + +/** + * @qlen: queue length + * @backlog: backlog size of queue + * @drops: number of dropped packets + * @requeues: number of requeues + */ +struct gnet_stats_queue +{ + __u32 qlen; + __u32 backlog; + __u32 drops; + __u32 requeues; + __u32 overlimits; +}; + +/** + * @interval: sampling period + * @ewma_log: the log of measurement window weight + */ +struct gnet_estimator +{ + signed char interval; + unsigned char ewma_log; +}; + + +#endif /* __LINUX_GEN_STATS_H */ diff -Nru iproute2-2.6.9.orig/include/linux/rtnetlink.h iproute2-2.6.9/include/linux/rtnetlink.h --- iproute2-2.6.9.orig/include/linux/rtnetlink.h 2004-10-19 22:49:02.000000000 +0200 +++ iproute2-2.6.9/include/linux/rtnetlink.h 2004-10-21 18:17:44.000000000 +0200 @@ -698,6 +698,7 @@ TCA_XSTATS, TCA_RATE, TCA_FCNT, + TCA_STATS2, __TCA_MAX }; diff -Nru iproute2-2.6.9.orig/tc/m_action.c iproute2-2.6.9/tc/m_action.c --- iproute2-2.6.9.orig/tc/m_action.c 2004-10-19 22:49:02.000000000 +0200 +++ iproute2-2.6.9/tc/m_action.c 2004-10-21 21:24:04.000000000 +0200 @@ -261,10 +261,11 @@ if (0 > err) return err; - if (show_stats && tb[TCA_STATS]) { - fprintf(f, "\t"); - print_tcstats_attr(f, tb[TCA_STATS]); - fprintf(f, "\n"); + if (show_stats) { + if (tb[TCA_STATS] || tb[TCA_STATS2]) { + print_tcstats_attr(f, tb, "\t", NULL); + fprintf(f, "\n"); + } } return 0; diff -Nru iproute2-2.6.9.orig/tc/tc_class.c iproute2-2.6.9/tc/tc_class.c --- iproute2-2.6.9.orig/tc/tc_class.c 2004-10-19 22:49:02.000000000 +0200 +++ iproute2-2.6.9/tc/tc_class.c 2004-10-21 21:21:33.000000000 +0200 @@ -216,12 +216,14 @@ } fprintf(fp, "\n"); if (show_stats) { - if (tb[TCA_STATS]) { - print_tcstats_attr(fp, tb[TCA_STATS]); + struct rtattr *xstats = NULL; + + if (tb[TCA_STATS] || tb[TCA_STATS2]) { + print_tcstats_attr(fp, tb, " ", &xstats); fprintf(fp, "\n"); } - if (q && tb[TCA_XSTATS] && q->print_xstats) { - q->print_xstats(q, fp, tb[TCA_XSTATS]); + if (q && (xstats || tb[TCA_XSTATS]) && q->print_xstats) { + q->print_xstats(q, fp, xstats ? : tb[TCA_XSTATS]); fprintf(fp, "\n"); } } diff -Nru iproute2-2.6.9.orig/tc/tc_filter.c iproute2-2.6.9/tc/tc_filter.c --- iproute2-2.6.9.orig/tc/tc_filter.c 2004-10-19 22:49:02.000000000 +0200 +++ iproute2-2.6.9/tc/tc_filter.c 2004-10-21 21:22:27.000000000 +0200 @@ -254,8 +254,8 @@ } fprintf(fp, "\n"); - if (show_stats && tb[TCA_STATS]) { - print_tcstats_attr(fp, tb[TCA_STATS]); + if (show_stats && (tb[TCA_STATS] || tb[TCA_STATS2])) { + print_tcstats_attr(fp, tb, " ", NULL); fprintf(fp, "\n"); } diff -Nru iproute2-2.6.9.orig/tc/tc_qdisc.c iproute2-2.6.9/tc/tc_qdisc.c --- iproute2-2.6.9.orig/tc/tc_qdisc.c 2004-10-19 22:49:02.000000000 +0200 +++ iproute2-2.6.9/tc/tc_qdisc.c 2004-10-21 21:22:56.000000000 +0200 @@ -168,36 +168,88 @@ } -void print_tcstats_attr(FILE *fp, const struct rtattr *rta) +void print_tcstats_attr(FILE *fp, struct rtattr *tb[], char *prefix, struct rtattr **xstats) { - struct tc_stats st; SPRINT_BUF(b1); - /* handle case where kernel returns more/less than we know about */ - memset(&st, 0, sizeof(st)); - memcpy(&st, RTA_DATA(rta), MIN(RTA_PAYLOAD(rta), sizeof(st))); - - fprintf(fp, " Sent %llu bytes %u pkts (dropped %u, overlimits %u) ", - (unsigned long long)st.bytes, st.packets, st.drops, - st.overlimits); - - if (st.bps || st.pps || st.qlen || st.backlog) { - fprintf(fp, "\n "); - if (st.bps || st.pps) { - fprintf(fp, "rate "); - if (st.bps) - fprintf(fp, "%s ", sprint_rate(st.bps, b1)); - if (st.pps) - fprintf(fp, "%upps ", st.pps); - } - if (st.qlen || st.backlog) { - fprintf(fp, "backlog "); - if (st.backlog) - fprintf(fp, "%s ", sprint_size(st.backlog, b1)); - if (st.qlen) - fprintf(fp, "%up ", st.qlen); + if (tb[TCA_STATS2]) { + struct rtattr *tbs[TCA_STATS_MAX + 1] = {0}; + + parse_rtattr(tbs, TCA_STATS_MAX, RTA_DATA(tb[TCA_STATS2]), + RTA_PAYLOAD(tb[TCA_STATS2])); + + if (tbs[TCA_STATS_BASIC]) { + struct gnet_stats_basic bs = {0}; + memcpy(&bs, RTA_DATA(tbs[TCA_STATS_BASIC]), MIN(RTA_PAYLOAD(tbs[TCA_STATS_BASIC]), sizeof(bs))); + fprintf(fp, "%sSent %llu bytes %u pkt", + prefix, bs.bytes, bs.packets); + } + + if (tbs[TCA_STATS_QUEUE]) { + struct gnet_stats_queue q = {0}; + memcpy(&q, RTA_DATA(tbs[TCA_STATS_QUEUE]), MIN(RTA_PAYLOAD(tbs[TCA_STATS_QUEUE]), sizeof(q))); + fprintf(fp, " (dropped %u, overlimits %u requeues %u) ", + q.drops, q.overlimits, q.requeues); + } + + if (tbs[TCA_STATS_RATE_EST]) { + struct gnet_stats_rate_est re = {0}; + memcpy(&re, RTA_DATA(tbs[TCA_STATS_RATE_EST]), MIN(RTA_PAYLOAD(tbs[TCA_STATS_RATE_EST]), sizeof(re))); + fprintf(fp, "\n%srate %s %upps ", + prefix, sprint_rate(re.bps, b1), re.pps); + } + + if (tbs[TCA_STATS_QUEUE]) { + struct gnet_stats_queue q = {0}; + memcpy(&q, RTA_DATA(tbs[TCA_STATS_QUEUE]), MIN(RTA_PAYLOAD(tbs[TCA_STATS_QUEUE]), sizeof(q))); + if (!tbs[TCA_STATS_RATE_EST]) + fprintf(fp, "\n%s", prefix); + fprintf(fp, "backlog %s %up requeues %u ", + sprint_size(q.backlog, b1), q.qlen, q.requeues); + } + + if (tbs[TCA_STATS_APP]) { + if (xstats) + *xstats = tbs[TCA_STATS_APP]; + } else + goto compat_xstats; + + return; + } + /* backward compatibility */ + if (tb[TCA_STATS]) { + struct tc_stats st; + + /* handle case where kernel returns more/less than we know about */ + memset(&st, 0, sizeof(st)); + memcpy(&st, RTA_DATA(tb[TCA_STATS]), MIN(RTA_PAYLOAD(tb[TCA_STATS]), sizeof(st))); + + fprintf(fp, "%sSent %llu bytes %u pkts (dropped %u, overlimits %u) ", + prefix, (unsigned long long)st.bytes, st.packets, st.drops, + st.overlimits); + + if (st.bps || st.pps || st.qlen || st.backlog) { + fprintf(fp, "\n%s", prefix); + if (st.bps || st.pps) { + fprintf(fp, "rate "); + if (st.bps) + fprintf(fp, "%s ", sprint_rate(st.bps, b1)); + if (st.pps) + fprintf(fp, "%upps ", st.pps); + } + if (st.qlen || st.backlog) { + fprintf(fp, "backlog "); + if (st.backlog) + fprintf(fp, "%s ", sprint_size(st.backlog, b1)); + if (st.qlen) + fprintf(fp, "%up ", st.qlen); + } } } + +compat_xstats: + if (tb[TCA_XSTATS] && xstats) + *xstats = tb[TCA_XSTATS]; } static int filter_ifindex; @@ -264,13 +316,15 @@ } fprintf(fp, "\n"); if (show_stats) { - if (tb[TCA_STATS]) { - print_tcstats_attr(fp, tb[TCA_STATS]); + struct rtattr *xstats = NULL; + + if (tb[TCA_STATS] || tb[TCA_STATS2]) { + print_tcstats_attr(fp, tb, " ", &xstats); fprintf(fp, "\n"); } - if (q && tb[TCA_XSTATS] && q->print_xstats) { - q->print_xstats(q, fp, tb[TCA_XSTATS]); + if (q && (xstats || tb[TCA_XSTATS]) && q->print_xstats) { + q->print_xstats(q, fp, xstats ? : tb[TCA_XSTATS]); fprintf(fp, "\n"); } } diff -Nru iproute2-2.6.9.orig/tc/tc_util.h iproute2-2.6.9/tc/tc_util.h --- iproute2-2.6.9.orig/tc/tc_util.h 2004-10-19 22:49:02.000000000 +0200 +++ iproute2-2.6.9/tc/tc_util.h 2004-10-21 21:15:18.000000000 +0200 @@ -4,6 +4,7 @@ #define MAX_MSG 16384 #include #include +#include #include "tc_core.h" struct qdisc_util @@ -58,7 +59,7 @@ extern char * sprint_usecs(__u32 usecs, char *buf); extern char * sprint_percent(__u32 percent, char *buf); -extern void print_tcstats_attr(FILE *fp, const struct rtattr *ts); +extern void print_tcstats_attr(FILE *fp, struct rtattr *tb[], char *prefix, struct rtattr **xstats); extern int get_tc_classid(__u32 *h, const char *str); extern int print_tc_classid(char *buf, int len, __u32 h); From shemminger@osdl.org Thu Oct 21 13:37:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 13:37:12 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LKb50L008517 for ; Thu, 21 Oct 2004 13:37:05 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9LKaiWL017797 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 21 Oct 2004 13:36:44 -0700 Date: Thu, 21 Oct 2004 13:37:52 -0700 From: Stephen Hemminger To: netdev@oss.sgi.com Subject: Fw: [Bug 3610] New: kernel-2.6.9 breaks Amanda Message-Id: <20041021133752.67a386fb@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10669 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 Content-Length: 9433 Lines: 242 http://bugme.osdl.org/show_bug.cgi?id=3610 Summary: kernel-2.6.9 breaks Amanda Kernel Version: 2.6.9 Status: NEW Severity: normal Owner: shemminger@osdl.org Submitter: wralph@nswc.navy.mil Distribution: Fedora Core 2 Hardware Environment: Pentium III @800MHz, 384 MB memory, Adaptec AIC-7892A U160 SCSI controller, SEAGATE Model: ST39204LW drive, Lite-ON LNE100TX NIC, Gateway GP 800 computer. This machine is the Amanda tape server. Software Environment: Amanda 2.4.4p2 Software, Fedora Core 2 environment with vanilla 2.6.9 kernel. Problem Description: Amanda clients exchanges UDP packets with the server giving it a TCP port number with which to connect in order to receive files to be dumped to tape. Under kernel-2.6.8.1 the sofware performs perfectly. Under kernel-2.6.9, with exactly the same Amanda software, the UDP packet exchange seems to occur, but no TCP connection between client and server occurs. The client eventually times out with messages like: sendbackup: time 0.000: stream_server: waiting for connection: 0.0.0.0.32951 sendbackup: time 0.000: stream_server: waiting for connection: 0.0.0.0.32952 sendbackup: time 0.000: stream_server: waiting for connection: 0.0.0.0.32953 sendbackup: time 0.000: waiting for connect on 32951, then 32952, then 32953 sendbackup: time 29.995: stream_accept: timeout after 30 seconds sendbackup: time 29.995: timeout on data port 32951 sendbackup: time 59.990: stream_accept: timeout after 30 seconds sendbackup: time 59.990: timeout on mesg port 32952 sendbackup: time 89.987: stream_accept: timeout after 30 seconds sendbackup: time 89.987: timeout on index port 32953 sendbackup: time 89.987: pid 3008 finish time Thu Oct 21 12:30:38 2004 Running tcpdump on both client and server shows no TCP traffic at all. I have completely disabled iptables in an effort to allow the traffic to pass. No effect. Re-compiling the Amanda software had no effect. Switching back to kernel-2.6.8.1 allows it to run normally.lspci -vvv 00:00.0 Host bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 03) Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- 00:01.0 PCI bridge: Intel Corp. 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 03) (prog-if 00 [Normal decode]) Control: I/O+ Mem+ BusMaster+ SpecCycle+ MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B- Status: Cap- 66Mhz+ UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- Reset- FastB2B+ 00:07.0 ISA bridge: Intel Corp. 82371AB/EB/MB PIIX4 ISA (rev 02) Control: I/O+ Mem+ BusMaster+ SpecCycle+ MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- more /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 8 model name : Pentium III (Coppermine) stepping : 3 cpu MHz : 795.899 cache size : 256 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr sse bogomips : 1572.86 more /proc/modules uhci_hcd 29136 0 - Live 0xd8997000 more /proc/iomem 00000000-0009f3ff : System RAM 0009f400-0009ffff : reserved 000a0000-000bffff : Video RAM area 000c0000-000cffff : Video ROM 000d0000-000d65ff : Adapter ROM 000e4000-000effff : Adapter ROM 000f0000-000fffff : System ROM 00100000-040fd7ff : System RAM 00100000-003296b0 : Kernel code 003296b1-003fbcbf : Kernel data 040fd800-040ff7ff : ACPI Tables 040ff800-040ffbff : ACPI Non-volatile Storage 040ffc00-17ffffff : System RAM f4000000-f4000fff : 0000:00:0e.0 f4000000-f4000fff : aic7xxx f4001000-f40010ff : 0000:00:10.0 f4001000-f40010ff : tulip f5000000-f5ffffff : PCI Bus #01 f5000000-f5ffffff : 0000:01:00.0 f8000000-fbffffff : 0000:00:00.0 fc000000-fdffffff : PCI Bus #01 fc000000-fdffffff : 0000:01:00.0 fc000000-fc17ffff : vesafb fffe7000-ffffffff : reserved 0000-001f : dma1 0020-0021 : pic1 0040-0043 : timer0 0050-0053 : timer1 0060-006f : keyboard 0070-0077 : rtc 0080-008f : dma page reg 00a0-00a1 : pic2 00c0-00df : dma2 00f0-00ff : fpu 0170-0177 : ide1 01f0-01f7 : ide0 02f8-02ff : serial 0376-0376 : ide1 03c0-03df : vesafb 03f6-03f6 : ide0 03f8-03ff : serial 0cf8-0cff : PCI conf1 1000-10ff : 0000:00:0e.0 1400-14ff : 0000:00:10.0 1400-14ff : tulip 1800-181f : 0000:00:07.2 1800-181f : uhci_hcd 1820-182f : 0000:00:07.1 1820-1827 : ide0 1828-182f : ide1 7000-701f : 0000:00:07.3 8000-803f : 0000:00:07.3 more /proc/scsi/scsi Attached devices: Host: scsi0 Channel: 00 Id: 00 Lun: 00 Vendor: SEAGATE Model: ST39204LW Rev: 0006 Type: Direct-Access ANSI SCSI revision: 03 Host: scsi0 Channel: 00 Id: 06 Lun: 00 Vendor: SEAGATE Model: DAT 06240-XXX Rev: 8110 Type: Sequential-Access ANSI SCSI revision: 03 Steps to reproduce: Run Amanda server on kernel-2.6.9. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From davem@davemloft.net Thu Oct 21 14:29:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 14:29:53 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LLTkEw010099 for ; Thu, 21 Oct 2004 14:29:47 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKkPH-0004yA-00; Thu, 21 Oct 2004 14:23:35 -0700 Date: Thu, 21 Oct 2004 14:23:35 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: netdev@oss.sgi.com Subject: Re: Fw: [Bug 3610] New: kernel-2.6.9 breaks Amanda Message-Id: <20041021142335.54f088ad.davem@davemloft.net> In-Reply-To: <20041021133752.67a386fb@zqx3.pdx.osdl.net> References: <20041021133752.67a386fb@zqx3.pdx.osdl.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10670 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 1256 Lines: 34 On Thu, 21 Oct 2004 13:37:52 -0700 Stephen Hemminger wrote: > Summary: kernel-2.6.9 breaks Amanda Unfortunately, he failed to show the tcpdump traces of the UDP traffic as he did in his lkml postings. There you will find checksum errors mentioned in the tcpdump output for the last few consequetive UDP packets and I think that is a good clue as to what may be the problem here. I have to trust that the user did try, as Andrew Morton suggested, the 2.6.8.1 3c59x driver copied into the 2.6.9 kernel. He said the problem persists. He also states he disabled netfilter (although I would have liked him to also make sure that no netfilter modules were loaded as well). That basically leaves us with ipv4/udp changes to look at. There are two potentially problem causing changesets. That would be: ChangeSet 1.1832.88.1 2004/09/13 20:05:28 acme@conectiva.com.br and ChangeSet 1.1803.16.6 2004/07/21 13:51:01 Samuel.Thibault@ens-lyon.fr I'm mostly suspicious of the latter, because it changes the behvaior of UDP sockets when MSG_TRUNC is specified. Can someone check if Amanda uses MSG_TRUNC on UDP sockets? If the bug reporter had provided an strace of the Amanda userland components, we'd know this already. From herbert@gondor.apana.org.au Thu Oct 21 14:32:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 14:32:22 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LLWBTh010429 for ; Thu, 21 Oct 2004 14:32:12 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CKkWi-0001lD-00; Fri, 22 Oct 2004 07:31:16 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CKkWZ-0005x5-00; Fri, 22 Oct 2004 07:31:07 +1000 From: Herbert Xu To: laforge@netfilter.org (Harald Welte) Subject: Allowing netlink_family to be any integer (was: [PATCH 2.6] iptables CLUSTERIP target) Cc: lmb@suse.de, ahu@ds9a.nl, hch@infradead.org, netdev@oss.sgi.com, davem@davemloft.net Organization: Core In-Reply-To: <20041021142527.GG3551@sunbeam.de.gnumonks.org> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) Message-Id: Date: Fri, 22 Oct 2004 07:31:07 +1000 X-archive-position: 10671 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 952 Lines: 24 Harald Welte wrote: > > For supporting two primitive operation, adding a new netlink address > family also isn't worthwhile, especially since we're short of netlink > families. That's something I'm looking into as well. The current strategy of either creating a new family or tacking random things into RTNETLINK is simply not going to scale. Initially I considered an interface where kernel users can register themselves using a string as the key. But I soon realised that we could simply allow the netlink_family field to be an arbitrary integer that is used as a key to a hash table. The CPU cost of the hash table isn't too bad since you'll only be looking it up when the socket is created. Comments anyone? -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From shemminger@osdl.org Thu Oct 21 14:50:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 14:50:22 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LLoDhh011826 for ; Thu, 21 Oct 2004 14:50:14 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9LLnjWL023728 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 21 Oct 2004 14:49:46 -0700 Date: Thu, 21 Oct 2004 14:50:53 -0700 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: [Bug 3610] New: kernel-2.6.9 breaks Amanda Message-Id: <20041021145053.6d87f32d@zqx3.pdx.osdl.net> In-Reply-To: <20041021142335.54f088ad.davem@davemloft.net> References: <20041021133752.67a386fb@zqx3.pdx.osdl.net> <20041021142335.54f088ad.davem@davemloft.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10672 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 Content-Length: 582 Lines: 15 On Thu, 21 Oct 2004 14:23:35 -0700 "David S. Miller" wrote: > On Thu, 21 Oct 2004 13:37:52 -0700 > Stephen Hemminger wrote: > > > Summary: kernel-2.6.9 breaks Amanda > > Unfortunately, he failed to show the tcpdump traces of the UDP > traffic as he did in his lkml postings. There you will find > checksum errors mentioned in the tcpdump output for the last > few consequetive UDP packets and I think that is a good clue > as to what may be the problem here. Since it is reproducible, I already requested a tcpdump trace. From herbert@gondor.apana.org.au Thu Oct 21 14:58:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 14:58:21 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LLwAUA012443 for ; Thu, 21 Oct 2004 14:58:12 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CKkwO-00020O-00; Fri, 22 Oct 2004 07:57:48 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CKkwJ-00064X-00; Fri, 22 Oct 2004 07:57:43 +1000 Date: Fri, 22 Oct 2004 07:57:43 +1000 To: Phil Oester Cc: linux-net@vger.kernel.org, netdev@oss.sgi.com, "David S. Miller" Subject: Re: 2.6.9 failed assertion in tcp_timer.c Message-ID: <20041021215743.GA23062@gondor.apana.org.au> References: <20041019215054.GA17565@linuxace.com> <20041020164748.GA20905@linuxace.com> <20041020212651.GA8534@gondor.apana.org.au> <20041020225536.GA22179@linuxace.com> <20041021130339.GA19345@gondor.apana.org.au> <20041021165224.GA25399@linuxace.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="PEIAKu/WMn1b1Hv9" Content-Disposition: inline In-Reply-To: <20041021165224.GA25399@linuxace.com> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10673 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 1458 Lines: 51 --PEIAKu/WMn1b1Hv9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Oct 21, 2004 at 09:52:24AM -0700, Phil Oester wrote: > > KERNEL: assertion (!tcp_get_pcount(&tp->packets_out) || !skb_ > queue_empty(&sk->sk_write_queue)) failed at net/ipv4/tcp_input.c (2496) Perhaps the MTU is growing upwards? Does this patch help? Dave, we need to use the skb's MSS in trim_head as otherwise the counters will be screwed up. Signed-off-by: Herbert Xu Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --PEIAKu/WMn1b1Hv9 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== net/ipv4/tcp_output.c 1.68 vs edited ===== --- 1.68/net/ipv4/tcp_output.c 2004-10-20 15:13:52 +10:00 +++ edited/net/ipv4/tcp_output.c 2004-10-22 07:56:45 +10:00 @@ -566,8 +566,6 @@ int tcp_trim_head(struct sock *sk, struct sk_buff *skb, u32 len) { - struct tcp_opt *tp = tcp_sk(sk); - if (skb_cloned(skb) && pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) return -ENOMEM; @@ -590,7 +588,7 @@ /* Any change of skb->len requires recalculation of tso * factor and mss. */ - tcp_set_skb_tso_segs(skb, tp->mss_cache_std); + tcp_set_skb_tso_segs(skb, tcp_skb_mss(skb)); return 0; } --PEIAKu/WMn1b1Hv9-- From herbert@gondor.apana.org.au Thu Oct 21 15:02:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 15:02:14 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LM264W012835 for ; Thu, 21 Oct 2004 15:02:07 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CKl09-00023Z-00; Fri, 22 Oct 2004 08:01:41 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CKl08-00065S-00; Fri, 22 Oct 2004 08:01:40 +1000 From: Herbert Xu To: davem@davemloft.net (David S. Miller) Subject: Re: Fw: [Bug 3610] New: kernel-2.6.9 breaks Amanda Cc: shemminger@osdl.org, netdev@oss.sgi.com Organization: Core In-Reply-To: <20041021142335.54f088ad.davem@davemloft.net> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) Message-Id: Date: Fri, 22 Oct 2004 08:01:40 +1000 X-archive-position: 10674 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 727 Lines: 18 David S. Miller wrote: > > ChangeSet 1.1803.16.6 2004/07/21 13:51:01 Samuel.Thibault@ens-lyon.fr > > I'm mostly suspicious of the latter, because it changes the > behvaior of UDP sockets when MSG_TRUNC is specified. Can Well that change made it in 2.6.8.1 so if 2.6.8.1 is working for him then that can't be it. That change also seems to only change the return value. In fact, since tcpdump is showing bad checksums, then presumably the packet has been corrupted before it even got to us. -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From shemminger@osdl.org Thu Oct 21 15:09:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 15:09:37 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LM9VGE013362 for ; Thu, 21 Oct 2004 15:09:32 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9LM97WL025253 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 21 Oct 2004 15:09:07 -0700 Date: Thu, 21 Oct 2004 15:10:15 -0700 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: [Bug 3610] New: kernel-2.6.9 breaks Amanda Message-Id: <20041021151015.10738f8a@zqx3.pdx.osdl.net> In-Reply-To: <20041021142335.54f088ad.davem@davemloft.net> References: <20041021133752.67a386fb@zqx3.pdx.osdl.net> <20041021142335.54f088ad.davem@davemloft.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10675 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 Content-Length: 1661 Lines: 46 On Thu, 21 Oct 2004 14:23:35 -0700 "David S. Miller" wrote: > On Thu, 21 Oct 2004 13:37:52 -0700 > Stephen Hemminger wrote: > > > Summary: kernel-2.6.9 breaks Amanda > > Unfortunately, he failed to show the tcpdump traces of the UDP > traffic as he did in his lkml postings. There you will find > checksum errors mentioned in the tcpdump output for the last > few consequetive UDP packets and I think that is a good clue > as to what may be the problem here. > > I have to trust that the user did try, as Andrew Morton suggested, > the 2.6.8.1 3c59x driver copied into the 2.6.9 kernel. He said > the problem persists. > > He also states he disabled netfilter (although I would have liked > him to also make sure that no netfilter modules were loaded as well). > > That basically leaves us with ipv4/udp changes to look at. There > are two potentially problem causing changesets. That would be: > > ChangeSet 1.1832.88.1 2004/09/13 20:05:28 acme@conectiva.com.br > > and > > ChangeSet 1.1803.16.6 2004/07/21 13:51:01 Samuel.Thibault@ens-lyon.fr > > I'm mostly suspicious of the latter, because it changes the > behvaior of UDP sockets when MSG_TRUNC is specified. Can > someone check if Amanda uses MSG_TRUNC on UDP sockets? No, not in current source. > If the bug reporter had provided an strace of the Amanda userland > components, we'd know this already. Reading the current source code: http://prdownloads.sourceforge.net/amanda/amanda-2.4.4p3.tar.gz?download It does sendto() then close() in the udp_send path. Also, it suffers from the select() and blocking rcvfrom() problem. From andre@tomt.net Thu Oct 21 15:27:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 15:27:54 -0700 (PDT) Received: from mail.skjellin.no (ns1.skjellin.no [80.239.42.66]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9LMRm4e014083 for ; Thu, 21 Oct 2004 15:27:48 -0700 Received: (qmail 22851 invoked from network); 21 Oct 2004 22:27:32 -0000 Received: from unknown (HELO ?10.255.1.10?) (andre@tomt.net@80.239.42.1) by mail.skjellin.no with SMTP; 21 Oct 2004 22:27:32 -0000 Message-ID: <417837D4.1020402@tomt.net> Date: Fri, 22 Oct 2004 00:27:32 +0200 From: Andre Tomt User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com Subject: TCP-MD5 support Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10676 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: andre@tomt.net Precedence: bulk X-list: netdev Content-Length: 119 Lines: 2 How is this moving along? Last time I heard around 2.6.7 sometime it was beeing cleaned up for inclusion in mainline. From shemminger@osdl.org Thu Oct 21 15:36:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 15:36:34 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LMaS5E018614 for ; Thu, 21 Oct 2004 15:36:29 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9LMa8WL027471 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 21 Oct 2004 15:36:08 -0700 Date: Thu, 21 Oct 2004 13:34:34 -0700 From: Stephen Hemminger To: davem@redhat.com Cc: netdev@oss.sgi.com Subject: [PATCH] replace dst_release refcount error with standard WARN_ON Message-Id: <20041021133434.73188fae@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10677 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 Content-Length: 1397 Lines: 48 Replace the dst count underflow bug message with a standard WARN message. This makes errors noticeable and also reduces the kernel text size by 600 since we aren't doing as much to setup the printk. Signed-off-by: Stephen Hemminger diff -Nru a/include/net/dst.h b/include/net/dst.h --- a/include/net/dst.h 2004-10-21 13:30:02 -07:00 +++ b/include/net/dst.h 2004-10-21 13:30:02 -07:00 @@ -142,16 +142,11 @@ return dst; } -extern const char dst_underflow_bug_msg[]; - static inline void dst_release(struct dst_entry * dst) { if (dst) { - if (atomic_read(&dst->__refcnt) < 1) - printk(dst_underflow_bug_msg, - atomic_read(&dst->__refcnt), - dst, current_text_addr()); + WARN_ON(atomic_read(&dst->__refcnt) < 1); atomic_dec(&dst->__refcnt); } } diff -Nru a/net/core/dst.c b/net/core/dst.c --- a/net/core/dst.c 2004-10-21 13:30:02 -07:00 +++ b/net/core/dst.c 2004-10-21 13:30:02 -07:00 @@ -19,8 +19,6 @@ #include -const char dst_underflow_bug_msg[] = KERN_DEBUG "BUG: dst underflow %d: %p at %p\n"; - /* Locking strategy: * 1) Garbage collection state of dead destination cache * entries is protected by dst_lock. @@ -275,7 +273,6 @@ register_netdevice_notifier(&dst_dev_notifier); } -EXPORT_SYMBOL(dst_underflow_bug_msg); EXPORT_SYMBOL(__dst_free); EXPORT_SYMBOL(dst_alloc); EXPORT_SYMBOL(dst_destroy); From davem@davemloft.net Thu Oct 21 15:51:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 15:51:14 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LMp89a019791 for ; Thu, 21 Oct 2004 15:51:08 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKlfv-00055c-00; Thu, 21 Oct 2004 15:44:51 -0700 Date: Thu, 21 Oct 2004 15:44:51 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: netdev@oss.sgi.com Subject: Re: [Bug 3610] New: kernel-2.6.9 breaks Amanda Message-Id: <20041021154451.50b07f53.davem@davemloft.net> In-Reply-To: <20041021151015.10738f8a@zqx3.pdx.osdl.net> References: <20041021133752.67a386fb@zqx3.pdx.osdl.net> <20041021142335.54f088ad.davem@davemloft.net> <20041021151015.10738f8a@zqx3.pdx.osdl.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10678 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 685 Lines: 20 On Thu, 21 Oct 2004 15:10:15 -0700 Stephen Hemminger wrote: > > If the bug reporter had provided an strace of the Amanda userland > > components, we'd know this already. > > Reading the current source code: > http://prdownloads.sourceforge.net/amanda/amanda-2.4.4p3.tar.gz?download > > It does sendto() then close() in the udp_send path. > Also, it suffers from the select() and blocking rcvfrom() problem. Not to accuse the reporter or anything, but this may be a straw-man rigged up bug report to try and force our hands in changing the behavior of this case. If so, that's quite rude, because kernels have behaved that way forever, not just in 2.6.9. From tgr@reeler.org Thu Oct 21 15:54:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 15:54:05 -0700 (PDT) Received: from rei.rakuen (217-162-107-144.dclient.hispeed.ch [217.162.107.144]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LMrx7p020151 for ; Thu, 21 Oct 2004 15:54:00 -0700 Received: from tgr by rei.rakuen with local (Exim 4.34) id 1CKlo3-0004XH-Ly; Fri, 22 Oct 2004 00:53:15 +0200 Date: Fri, 22 Oct 2004 00:53:15 +0200 From: Thomas Graf To: Herbert Xu Cc: Harald Welte , lmb@suse.de, ahu@ds9a.nl, hch@infradead.org, netdev@oss.sgi.com, davem@davemloft.net Subject: Re: Allowing netlink_family to be any integer (was: [PATCH 2.6] iptables CLUSTERIP target) Message-ID: <20041021225315.GH19714@rei.reeler.org> References: <20041021142527.GG3551@sunbeam.de.gnumonks.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-archive-position: 10679 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 711 Lines: 14 * Herbert Xu 2004-10-22 07:31 > Initially I considered an interface where kernel users can register > themselves using a string as the key. But I soon realised that we > could simply allow the netlink_family field to be an arbitrary integer > that is used as a key to a hash table. Sounds like a good idea, converting nl_table and nl_nonroot into a hash table won't be much of a problem. The netlink device driver must probably be changed to create devices on the fly if we want modules to be able to register netlink families. The same goes for some selinux stuff but this is minor. The only real problem I see is sk_protocol being only 8bit as limiting factor. From davem@davemloft.net Thu Oct 21 15:57:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 15:57:26 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LMvKci022799 for ; Thu, 21 Oct 2004 15:57:20 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKlm2-00056S-00; Thu, 21 Oct 2004 15:51:10 -0700 Date: Thu, 21 Oct 2004 15:51:09 -0700 From: "David S. Miller" To: Andre Tomt Cc: netdev@oss.sgi.com Subject: Re: TCP-MD5 support Message-Id: <20041021155109.204e4f68.davem@davemloft.net> In-Reply-To: <417837D4.1020402@tomt.net> References: <417837D4.1020402@tomt.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10680 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 512 Lines: 19 On Fri, 22 Oct 2004 00:27:32 +0200 Andre Tomt wrote: > How is this moving along? Last time I heard around 2.6.7 sometime it was > beeing cleaned up for inclusion in mainline. Yeah, I have a tree at: bk://kernel.bkbits.net/davem/tcp-2.6 that Yoshifuji and myself were working on. It needs two pieces of work which I'll do soon: 1) Remove the older API, the newer AF-agnostic one is the only one we should provide 2) Merge up with current 2.6.x Then it'll be ready to merge to Linus. From greearb@candelatech.com Thu Oct 21 16:03:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 16:03:28 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LN3I3o023220 for ; Thu, 21 Oct 2004 16:03:19 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i9LN9DLH031970; Thu, 21 Oct 2004 16:09:13 -0700 Message-ID: <41784003.7070505@candelatech.com> Date: Thu, 21 Oct 2004 16:02:27 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Thomas Graf CC: Herbert Xu , Harald Welte , lmb@suse.de, ahu@ds9a.nl, hch@infradead.org, netdev@oss.sgi.com, davem@davemloft.net Subject: Re: Allowing netlink_family to be any integer References: <20041021142527.GG3551@sunbeam.de.gnumonks.org> <20041021225315.GH19714@rei.reeler.org> In-Reply-To: <20041021225315.GH19714@rei.reeler.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10681 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Content-Length: 283 Lines: 13 Thomas Graf wrote: > The only real problem I see is sk_protocol being only 8bit as > limiting factor. When you fix this, please make the route-table ID at least 16 bits as well :) Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From andre@tomt.net Thu Oct 21 16:28:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 16:28:45 -0700 (PDT) Received: from mail.skjellin.no (ns1.skjellin.no [80.239.42.66]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9LNSWVd027756 for ; Thu, 21 Oct 2004 16:28:32 -0700 Received: (qmail 19646 invoked from network); 21 Oct 2004 23:28:16 -0000 Received: from unknown (HELO ?10.255.1.10?) (andre@tomt.net@80.239.42.1) by mail.skjellin.no with SMTP; 21 Oct 2004 23:28:16 -0000 Message-ID: <41784610.1070303@tomt.net> Date: Fri, 22 Oct 2004 01:28:16 +0200 From: Andre Tomt User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" CC: netdev@oss.sgi.com Subject: Re: TCP-MD5 support References: <417837D4.1020402@tomt.net> <20041021155109.204e4f68.davem@davemloft.net> In-Reply-To: <20041021155109.204e4f68.davem@davemloft.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10682 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: andre@tomt.net Precedence: bulk X-list: netdev Content-Length: 395 Lines: 13 David S. Miller wrote: >>How is this moving along? Last time I heard around 2.6.7 sometime it was >>beeing cleaned up for inclusion in mainline. > > > Yeah, I have a tree at: > > bk://kernel.bkbits.net/davem/tcp-2.6 > > that Yoshifuji and myself were working on. It needs two > pieces of work which I'll do soon: Ahh - cool. I was just a bit worried that the project had died on us. :-) From jbarnes@engr.sgi.com Thu Oct 21 16:29:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 16:29:34 -0700 (PDT) Received: from omx2.sgi.com (omx2-ext.sgi.com [192.48.171.19]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LNTSn1027961 for ; Thu, 21 Oct 2004 16:29:28 -0700 Received: from nodin.corp.sgi.com (nodin.corp.sgi.com [192.26.51.193]) by omx2.sgi.com (8.12.11/8.12.9/linux-outbound_gateway-1.1) with ESMTP id i9M0gqRj012349 for ; Thu, 21 Oct 2004 17:42:52 -0700 Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by nodin.corp.sgi.com (8.12.9/8.12.10/SGI_generic_relay-1.2) with ESMTP id i9LNTDT339579579 for ; Thu, 21 Oct 2004 16:29:13 -0700 (PDT) Received: from spamtin.engr.sgi.com (postfix@spamtin.engr.sgi.com [163.154.6.130]) by cthulhu.engr.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id i9LNS8LG5308576; Thu, 21 Oct 2004 16:28:09 -0700 (PDT) Received: by spamtin.engr.sgi.com (Postfix, from userid 35197) id 612942404056; Thu, 21 Oct 2004 16:28:07 -0700 (PDT) From: Jesse Barnes To: akpm@osdl.org, linux-kernel@vger.kernel.org Subject: [PATCH] use mmiowb in tg3.c Date: Thu, 21 Oct 2004 16:28:06 -0700 User-Agent: KMail/1.7 Cc: netdev@oss.sgi.com, jgarzik@pobox.com, davem@davemloft.net, gnb@sgi.com, akepner@sgi.com References: <200410211613.19601.jbarnes@engr.sgi.com> In-Reply-To: <200410211613.19601.jbarnes@engr.sgi.com> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_GYEeBF4j/oqi4yZ" Message-Id: <200410211628.06906.jbarnes@engr.sgi.com> X-archive-position: 10683 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jbarnes@engr.sgi.com Precedence: bulk X-list: netdev Content-Length: 1398 Lines: 50 --Boundary-00=_GYEeBF4j/oqi4yZ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline This patch originally from Greg Banks. Some parts of the tg3 driver depend on PIO writes arriving in order. This patch ensures that in two key places using the new mmiowb macro. This not only prevents bugs (the queues can be corrupted), but is much faster than ensuring ordering using PIO reads (which involve a few round trips to the target bus on some platforms). Arthur has another patch that uses mmiowb in tg3 that he posted earlier as well. Signed-off-by: Greg Banks Signed-off-by: Jesse Barnes tx_lock, flags); dev->trans_start = jiffies; --Boundary-00=_GYEeBF4j/oqi4yZ-- From davem@davemloft.net Thu Oct 21 16:46:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 16:46:36 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9LNkSQ7028735 for ; Thu, 21 Oct 2004 16:46:31 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKmXP-0005Bx-00; Thu, 21 Oct 2004 16:40:07 -0700 Date: Thu, 21 Oct 2004 16:40:07 -0700 From: "David S. Miller" To: Jesse Barnes Cc: akpm@osdl.org, linux-kernel@vger.kernel.org, netdev@oss.sgi.com, jgarzik@pobox.com, gnb@sgi.com, akepner@sgi.com Subject: Re: [PATCH] use mmiowb in tg3.c Message-Id: <20041021164007.4933b10b.davem@davemloft.net> In-Reply-To: <200410211628.06906.jbarnes@engr.sgi.com> References: <200410211613.19601.jbarnes@engr.sgi.com> <200410211628.06906.jbarnes@engr.sgi.com> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10684 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 625 Lines: 13 On Thu, 21 Oct 2004 16:28:06 -0700 Jesse Barnes wrote: > This patch originally from Greg Banks. Some parts of the tg3 driver depend on > PIO writes arriving in order. This patch ensures that in two key places > using the new mmiowb macro. This not only prevents bugs (the queues can be > corrupted), but is much faster than ensuring ordering using PIO reads (which > involve a few round trips to the target bus on some platforms). Do other PCI systems which post PIO writes also potentially reorder them just like this SGI system does? Just trying to get this situation straight in my head. From linville@bilbo.tuxdriver.com Thu Oct 21 17:56:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 17:56:59 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M0uqXc030704 for ; Thu, 21 Oct 2004 17:56:52 -0700 Received: from bilbo.tuxdriver.com (bilbo.tuxdriver.com [24.172.12.5]) by ra.tuxdriver.com (8.11.6/8.11.6) with ESMTP id i9LNpdh08043; Thu, 21 Oct 2004 19:51:39 -0400 Received: from bilbo.tuxdriver.com (bilbo.tuxdriver.com [24.172.12.5]) by bilbo.tuxdriver.com (8.12.11/8.12.11) with ESMTP id i9M0veDP002231; Thu, 21 Oct 2004 20:57:40 -0400 Received: (from linville@localhost) by bilbo.tuxdriver.com (8.12.11/8.12.11/Submit) id i9M0vdvo002230; Thu, 21 Oct 2004 20:57:39 -0400 Date: Thu, 21 Oct 2004 20:57:39 -0400 From: "John W. Linville" To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Cc: jgarzik@pobox.com, romieu@fr.zoreil.com Subject: [patch netdev-2.6 0/2] r8169: vlan hwaccel fixes Message-ID: <20041022005737.GA1945@tuxdriver.com> Mail-Followup-To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, romieu@fr.zoreil.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-archive-position: 10685 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 1839 Lines: 46 After taking a little time to implement vlan hwaccl features for the r8169 driver, I discovered that someone had already beaten me to it! :-) Anyway, at least the experience put me in an ideal position to review the changes that had already been made. I found a couple of places that need some work. Patch 1: The return value of rtl8169_tx_vlan_tag() is not being endian-swapped to little endian. The hardware registers are little endian, even though the vlan tag value in this register (16-bits only) is big endian -- confusing! Anyway, I'll be posting a follow-up patch to correct this. Patch 2: The RxVlan bit in the CPlusCmd register is being turned-on in rtl8169_vlan_rx_register() without regard to the value passed-in for grp. rtl8169_vlan_rx_register() is called w/ a non-NULL grp value when the first vlan interface is created, then w/ a NULL grp value when the last vlan interface is removed. Similarly, the RxVlan bit in the CPlusCmd register is being turned-off in rtl8169_vlan_rx_kill_vid() without regard to anything. This function is called when vlan interfaces are removed, but there may still be other vlan interfaces still associated with the physical interface. The net effect of the status quo is that vlan hwaccel is enabled after the first vlan interfaces is created, UNTIL a vlan interface is removed. After a single vlan interface is removed, no vlan hwaccel will occur (on receive) until another vlan interface is created. The second follow-up patch I post will correct this by turning-on the RxVlan bit when rtl8169_vlan_rx_register() is called w/ a non-NULL grp value and turning-off the RxVlan bit when it is called w/ a NULL grp value. Manipulation of the RxVlan bit will be removed from rtl8169_vlan_rx_kill_vid(). Patches to follow... Thanks, John -- John W. Linville linville@tuxdriver.com From linville@bilbo.tuxdriver.com Thu Oct 21 17:59:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 18:00:05 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M0xxLD031065 for ; Thu, 21 Oct 2004 17:59:59 -0700 Received: from bilbo.tuxdriver.com (bilbo.tuxdriver.com [24.172.12.5]) by ra.tuxdriver.com (8.11.6/8.11.6) with ESMTP id i9LNskh08149; Thu, 21 Oct 2004 19:54:46 -0400 Received: from bilbo.tuxdriver.com (bilbo.tuxdriver.com [24.172.12.5]) by bilbo.tuxdriver.com (8.12.11/8.12.11) with ESMTP id i9M10ld3002251; Thu, 21 Oct 2004 21:00:47 -0400 Received: (from linville@localhost) by bilbo.tuxdriver.com (8.12.11/8.12.11/Submit) id i9M10l48002250; Thu, 21 Oct 2004 21:00:47 -0400 Date: Thu, 21 Oct 2004 21:00:47 -0400 From: "John W. Linville" To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, romieu@fr.zoreil.com Subject: [patch netdev-2.6 1/2] r8169: endian-swap return of rtl8169_tx_vlan_tag() Message-ID: <20041022010046.GB1945@tuxdriver.com> Mail-Followup-To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, romieu@fr.zoreil.com References: <20041022005737.GA1945@tuxdriver.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041022005737.GA1945@tuxdriver.com> User-Agent: Mutt/1.4.1i X-archive-position: 10686 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 608 Lines: 19 Endian-swap return of rtl8169_tx_vlan_tag() in rtl8169_start_xmit() Signed-off-by: John W. Linville --- drivers/net/r8169.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) --- netdev-2.6/drivers/net/r8169.c.netdev 2004-10-21 14:48:38.753676111 -0400 +++ netdev-2.6/drivers/net/r8169.c 2004-10-21 14:49:04.874988962 -0400 @@ -1906,7 +1906,7 @@ static int rtl8169_start_xmit(struct sk_ tp->tx_skb[entry].len = len; txd->addr = cpu_to_le64(mapping); - txd->opts2 = rtl8169_tx_vlan_tag(tp, skb); + txd->opts2 = cpu_to_le32(rtl8169_tx_vlan_tag(tp, skb)); wmb(); From linville@bilbo.tuxdriver.com Thu Oct 21 18:01:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 18:01:49 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M11hgZ031408 for ; Thu, 21 Oct 2004 18:01:43 -0700 Received: from bilbo.tuxdriver.com (bilbo.tuxdriver.com [24.172.12.5]) by ra.tuxdriver.com (8.11.6/8.11.6) with ESMTP id i9LNuVh08170; Thu, 21 Oct 2004 19:56:31 -0400 Received: from bilbo.tuxdriver.com (bilbo.tuxdriver.com [24.172.12.5]) by bilbo.tuxdriver.com (8.12.11/8.12.11) with ESMTP id i9M12WAm002277; Thu, 21 Oct 2004 21:02:32 -0400 Received: (from linville@localhost) by bilbo.tuxdriver.com (8.12.11/8.12.11/Submit) id i9M12VIT002276; Thu, 21 Oct 2004 21:02:31 -0400 Date: Thu, 21 Oct 2004 21:02:31 -0400 From: "John W. Linville" To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, romieu@fr.zoreil.com Subject: [patch netdev-2.6 2/2] r8169: fix RxVlan bit manipulation Message-ID: <20041022010231.GC1945@tuxdriver.com> Mail-Followup-To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com, romieu@fr.zoreil.com References: <20041022005737.GA1945@tuxdriver.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041022005737.GA1945@tuxdriver.com> User-Agent: Mutt/1.4.1i X-archive-position: 10687 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 1241 Lines: 38 Fix manipulation of RxVlan bit in rtl8169_vlan_rx_register(), and remove it from rtl8169_vlan_rx_kill_vid(). Signed-off-by: John W. Linville --- drivers/net/r8169.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) --- netdev-2.6/drivers/net/r8169.c.netdev 2004-10-21 14:38:16.000000000 -0400 +++ netdev-2.6/drivers/net/r8169.c 2004-10-21 14:44:22.968783027 -0400 @@ -705,8 +705,10 @@ static void rtl8169_vlan_rx_register(str unsigned long flags; spin_lock_irqsave(&tp->lock, flags); - tp->vlgrp = grp; - tp->cp_cmd |= RxVlan; + if ((tp->vlgrp = grp)) + tp->cp_cmd |= RxVlan; + else + tp->cp_cmd &= ~RxVlan; RTL_W16(CPlusCmd, tp->cp_cmd); RTL_R16(CPlusCmd); spin_unlock_irqrestore(&tp->lock, flags); @@ -715,13 +717,9 @@ static void rtl8169_vlan_rx_register(str static void rtl8169_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) { struct rtl8169_private *tp = netdev_priv(dev); - void __iomem *ioaddr = tp->mmio_addr; unsigned long flags; spin_lock_irqsave(&tp->lock, flags); - tp->cp_cmd &= ~RxVlan; - RTL_W16(CPlusCmd, tp->cp_cmd); - RTL_R16(CPlusCmd); if (tp->vlgrp) tp->vlgrp->vlan_devices[vid] = NULL; spin_unlock_irqrestore(&tp->lock, flags); From benh@kernel.crashing.org Thu Oct 21 18:17:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 18:18:04 -0700 (PDT) Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M1HwLk032204 for ; Thu, 21 Oct 2004 18:17:59 -0700 Received: from localhost (localhost [127.0.0.1]) by gate.crashing.org (8.12.8/8.12.8) with ESMTP id i9M1GaBG012800; Thu, 21 Oct 2004 20:16:37 -0500 Subject: Re: [PATCH] use mmiowb in tg3.c From: Benjamin Herrenschmidt To: "David S. Miller" Cc: Jesse Barnes , Andrew Morton , Linux Kernel list , netdev@oss.sgi.com, Jeff Garzik , gnb@sgi.com, akepner@sgi.com In-Reply-To: <20041021164007.4933b10b.davem@davemloft.net> References: <200410211613.19601.jbarnes@engr.sgi.com> <200410211628.06906.jbarnes@engr.sgi.com> <20041021164007.4933b10b.davem@davemloft.net> Content-Type: text/plain Message-Id: <1098407804.6071.22.camel@gaston> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Fri, 22 Oct 2004 11:16:45 +1000 Content-Transfer-Encoding: 7bit X-archive-position: 10688 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: benh@kernel.crashing.org Precedence: bulk X-list: netdev Content-Length: 1665 Lines: 36 On Fri, 2004-10-22 at 09:40, David S. Miller wrote: > On Thu, 21 Oct 2004 16:28:06 -0700 > Jesse Barnes wrote: > > > This patch originally from Greg Banks. Some parts of the tg3 driver depend on > > PIO writes arriving in order. This patch ensures that in two key places > > using the new mmiowb macro. This not only prevents bugs (the queues can be > > corrupted), but is much faster than ensuring ordering using PIO reads (which > > involve a few round trips to the target bus on some platforms). > > Do other PCI systems which post PIO writes also potentially reorder > them just like this SGI system does? Just trying to get this situation > straight in my head. I think the problem they have is really related to their spinlock, that is the IO leaking out of the spinlock vs. other CPUs. On the other hand, as I discussed with Jesse in the past, I'd like to extend the semantics of mmiowb() to also define full barrier between cacheable and non-cacheable accesses. That would help fixing a lot of issues on ppc and ppc64. Typically, our normal "light" write barrier doesn't reorder between cacheable and non-cacheable (MMIO) stores, which is why we had to put some heavy sync barrier in our MMIO writes macros. By having an mmiowb() that allow to explicitely do this ordering, it would allow us to relax the barriers in the MMIO macros, and so get back a few percent of perfs that we lost with the "fix". I haven't had time to work on that yet though, I need to review with paulus all the possible race cases, but hopefully, I'll have a patch on top of Jesse next week or so and will start converting more drivers. Ben. From chas@cmf.nrl.navy.mil Thu Oct 21 18:31:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 18:31:50 -0700 (PDT) Received: from ginger.cmf.nrl.navy.mil (ginger.cmf.nrl.navy.mil [134.207.10.161]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M1VgXt000300 for ; Thu, 21 Oct 2004 18:31:43 -0700 Received: from cmf.nrl.navy.mil (thirdoffive.cmf.nrl.navy.mil [134.207.10.180]) by ginger.cmf.nrl.navy.mil (8.12.11/8.12.11) with ESMTP id i9M1TvPr026209; Thu, 21 Oct 2004 21:29:57 -0400 (EDT) Message-Id: <200410220129.i9M1TvPr026209@ginger.cmf.nrl.navy.mil> To: Christoph Hellwig cc: netdev@oss.sgi.com, davem@redhat.com Subject: Re: [PATCH][ATM]: [ambassador] eliminate pci_find_device() In-reply-to: Your message of "Thu, 21 Oct 2004 12:38:41 BST." <20041021113841.GA3720@infradead.org> Date: Thu, 21 Oct 2004 21:29:57 -0400 From: "chas williams (contractor)" X-Virus-Scanned: NAI Completed X-Scanned-By: MIMEDefang 2.30 (www . roaringpenguin . com / mimedefang) X-archive-position: 10689 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chas@cmf.nrl.navy.mil Precedence: bulk X-list: netdev Content-Length: 7201 Lines: 266 better? # This is a BitKeeper generated diff -Nru style patch. # # [ATM]: [ambassador] eliminate pci_find_device() # diff -Nru a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c --- a/drivers/atm/ambassador.c 2004-10-21 21:24:47 -04:00 +++ b/drivers/atm/ambassador.c 2004-10-21 21:24:47 -04:00 @@ -313,9 +313,6 @@ static void do_housekeeping (unsigned long arg); /********** globals **********/ -static amb_dev * amb_devs = NULL; -static struct timer_list housekeeping = TIMER_INITIALIZER(do_housekeeping, 0, 1); - static unsigned short debug = 0; static unsigned int cmds = 8; static unsigned int txs = 32; @@ -870,7 +867,7 @@ static irqreturn_t interrupt_handler(int irq, void *dev_id, struct pt_regs *pt_regs) { - amb_dev * dev = amb_devs; + amb_dev * dev = (amb_dev *) dev_id; (void) pt_regs; PRINTD (DBG_IRQ|DBG_FLOW, "interrupt_handler: %p", dev_id); @@ -879,24 +876,6 @@ PRINTD (DBG_IRQ|DBG_ERR, "irq with NULL dev_id: %d", irq); return IRQ_NONE; } - // Did one of our cards generate the interrupt? - while (dev) { - if (dev == dev_id) - break; - dev = dev->prev; - } - // impossible - unless we add the device to our list after both - // registering the IRQ handler for it and enabling interrupts, AND - // the card generates an IRQ at startup - should not happen again - if (!dev) { - PRINTD (DBG_IRQ, "irq for unknown device: %d", irq); - return IRQ_NONE; - } - // impossible - unless we have memory corruption of dev or kernel - if (irq != dev->irq) { - PRINTD (DBG_IRQ|DBG_ERR, "irq mismatch: %d", irq); - return IRQ_NONE; - } { u32 interrupt = rd_plain (dev, offsetof(amb_mem, interrupt)); @@ -1554,22 +1533,13 @@ /********** housekeeping **********/ static void do_housekeeping (unsigned long arg) { - amb_dev * dev = amb_devs; - // data is set to zero at module unload - (void) arg; + amb_dev * dev = (amb_dev *) arg; - if (housekeeping.data) { - while (dev) { - - // could collect device-specific (not driver/atm-linux) stats here + // could collect device-specific (not driver/atm-linux) stats here - // last resort refill once every ten seconds - fill_rx_pools (dev); - - dev = dev->prev; - } - mod_timer(&housekeeping, jiffies + 10*HZ); - } + // last resort refill once every ten seconds + fill_rx_pools (dev); + mod_timer(&dev->housekeeping, jiffies + 10*HZ); return; } @@ -2225,6 +2195,7 @@ // set up known dev items straight away dev->pci_dev = pci_dev; + pci_set_drvdata(pci_dev, dev); dev->iobase = pci_resource_start (pci_dev, 1); dev->irq = pci_dev->irq; @@ -2284,7 +2255,7 @@ return ret; } -static int __init do_pci_device(struct pci_dev *pci_dev) +static int __devinit amb_probe(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent) { amb_dev * dev; int err; @@ -2292,6 +2263,12 @@ // read resources from PCI configuration space u8 irq = pci_dev->irq; + if (pci_dev->device == PCI_DEVICE_ID_MADGE_AMBASSADOR_BAD) { + PRINTK (KERN_ERR, "skipped broken (PLX rev 2) card"); + err = -EINVAL; + goto out; + } + PRINTD (DBG_INFO, "found Madge ATM adapter (amb) at" " IO %x, IRQ %u, MEM %p", pci_resource_start(pci_dev, 1), irq, bus_to_virt(pci_resource_start(pci_dev, 0))); @@ -2347,9 +2324,10 @@ dev->atm_dev->ci_range.vpi_bits = NUM_VPI_BITS; dev->atm_dev->ci_range.vci_bits = NUM_VCI_BITS; - // update linked list - dev->prev = amb_devs; - amb_devs = dev; + init_timer(&dev->housekeeping); + dev->housekeeping.function = do_housekeeping; + dev->housekeeping.data = (unsigned long) dev; + mod_timer(&dev->housekeeping, jiffies); // enable host interrupts interrupts_on (dev); @@ -2370,29 +2348,25 @@ goto out; } -static int __init amb_probe (void) { - struct pci_dev * pci_dev; - int devs; - - PRINTD (DBG_FLOW, "amb_probe"); - - devs = 0; - pci_dev = NULL; - while ((pci_dev = pci_find_device - (PCI_VENDOR_ID_MADGE, PCI_DEVICE_ID_MADGE_AMBASSADOR, pci_dev) - )) { - if (do_pci_device(pci_dev) == 0) - devs++; - } - - pci_dev = NULL; - while ((pci_dev = pci_find_device - (PCI_VENDOR_ID_MADGE, PCI_DEVICE_ID_MADGE_AMBASSADOR_BAD, pci_dev) - )) - PRINTK (KERN_ERR, "skipped broken (PLX rev 2) card"); - - return devs; +static void __devexit amb_remove_one(struct pci_dev *pci_dev) +{ + struct amb_dev *dev; + + dev = pci_get_drvdata(pci_dev); + + PRINTD(DBG_INFO|DBG_INIT, "closing %p (atm_dev = %p)", dev, dev->atm_dev); + del_timer_sync(&dev->housekeeping); + // the drain should not be necessary + drain_rx_pools(dev); + interrupts_off(dev); + amb_reset(dev, 0); + free_irq(dev->irq, dev); + pci_disable_device(pci_dev); + destroy_queues(dev); + atm_dev_deregister(dev->atm_dev); + kfree(dev); + pci_release_region(pci_dev, 1); } static void __init amb_check_args (void) { @@ -2457,9 +2431,23 @@ /********** module entry **********/ -static int __init amb_module_init (void) { - int devs; - +static struct pci_device_id amb_pci_tbl[] = { + { PCI_VENDOR_ID_MADGE, PCI_DEVICE_ID_MADGE_AMBASSADOR, PCI_ANY_ID, PCI_ANY_ID, + 0, 0, 0 }, + { PCI_VENDOR_ID_MADGE, PCI_DEVICE_ID_MADGE_AMBASSADOR_BAD, PCI_ANY_ID, PCI_ANY_ID, + 0, 0, 0 }, + { 0, } +}; + +static struct pci_driver amb_driver = { + .name = "amb", + .probe = amb_probe, + .remove = __devexit_p(amb_remove_one), + .id_table = amb_pci_tbl, +}; + +static int __init amb_module_init (void) +{ PRINTD (DBG_FLOW|DBG_INIT, "init_module"); // sanity check - cast needed as printk does not support %Zu @@ -2474,49 +2462,16 @@ amb_check_args(); // get the juice - devs = amb_probe(); - - if (devs) { - mod_timer (&housekeeping, jiffies); - } else { - PRINTK (KERN_INFO, "no (usable) adapters found"); - } - - return devs ? 0 : -ENODEV; + return pci_module_init(&amb_driver); } /********** module exit **********/ -static void __exit amb_module_exit (void) { - amb_dev * dev; - +static void __exit amb_module_exit (void) +{ PRINTD (DBG_FLOW|DBG_INIT, "cleanup_module"); - // paranoia - housekeeping.data = 0; - del_timer_sync(&housekeeping); - - while (amb_devs) { - struct pci_dev *pdev; - - dev = amb_devs; - pdev = dev->pci_dev; - amb_devs = dev->prev; - - PRINTD (DBG_INFO|DBG_INIT, "closing %p (atm_dev = %p)", dev, dev->atm_dev); - // the drain should not be necessary - drain_rx_pools (dev); - interrupts_off (dev); - amb_reset (dev, 0); - free_irq (dev->irq, dev); - pci_disable_device (pdev); - destroy_queues (dev); - atm_dev_deregister (dev->atm_dev); - kfree (dev); - pci_release_region (pdev, 1); - } - - return; + return pci_unregister_driver(&amb_driver); } module_init(amb_module_init); diff -Nru a/drivers/atm/ambassador.h b/drivers/atm/ambassador.h --- a/drivers/atm/ambassador.h 2004-10-21 21:24:47 -04:00 +++ b/drivers/atm/ambassador.h 2004-10-21 21:24:47 -04:00 @@ -649,7 +649,7 @@ struct atm_dev * atm_dev; struct pci_dev * pci_dev; - struct amb_dev * prev; + struct timer_list housekeeping; }; typedef struct amb_dev amb_dev; From chrisw@osdl.org Thu Oct 21 18:43:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 18:43:46 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M1hefj001034 for ; Thu, 21 Oct 2004 18:43:41 -0700 Received: from build.pdx.osdl.net (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9M1hL909577; Thu, 21 Oct 2004 18:43:21 -0700 Received: (from chrisw@localhost) by build.pdx.osdl.net (8.11.6/8.11.6) id i9M1hKv16075; Thu, 21 Oct 2004 18:43:20 -0700 Date: Thu, 21 Oct 2004 18:43:20 -0700 From: Chris Wright To: davem@davemloft.net Cc: netdev@oss.sgi.com Subject: [PATCH] trivial speeling fix in net/sched/Kconfig Message-ID: <20041021184320.K2357@build.pdx.osdl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-archive-position: 10690 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chrisw@osdl.org Precedence: bulk X-list: netdev Content-Length: 1018 Lines: 26 Trivial speeling fixes. Signed-off-by: Chris Wright ===== net/sched/Kconfig 1.22 vs edited ===== --- 1.22/net/sched/Kconfig 2004-10-19 21:45:22 -07:00 +++ edited/net/sched/Kconfig 2004-10-21 18:34:57 -07:00 @@ -391,14 +391,14 @@ tristate "generic Actions" depends on NET_CLS_ACT ---help--- - You must have new iproute2 to use this feature - This adds simple filtering actions like drop,accepet etc + You must have new iproute2 to use this feature. + This adds simple filtering actions like drop, accept etc. config GACT_PROB bool "generic Actions probability" depends on NET_ACT_GACT ---help--- - Allows generic actions to be randomly or deterministically used + Allows generic actions to be randomly or deterministically used. config NET_ACT_MIRRED tristate "Packet In/Egress redirecton/mirror Actions" From chrisw@osdl.org Thu Oct 21 18:44:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 18:44:50 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M1ijPG001280 for ; Thu, 21 Oct 2004 18:44:46 -0700 Received: from build.pdx.osdl.net (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9M1iQ909860; Thu, 21 Oct 2004 18:44:26 -0700 Received: (from chrisw@localhost) by build.pdx.osdl.net (8.11.6/8.11.6) id i9M1iQX16093; Thu, 21 Oct 2004 18:44:26 -0700 Date: Thu, 21 Oct 2004 18:44:26 -0700 From: Chris Wright To: davem@davemloft.net Cc: netdev@oss.sgi.com Subject: [PATCH] make tcf_proto_lookup_ops() static Message-ID: <20041021184426.L2357@build.pdx.osdl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-archive-position: 10691 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chrisw@osdl.org Precedence: bulk X-list: netdev Content-Length: 517 Lines: 16 Make tcf_proto_lookup_ops() static, it's only used in cls_api.c. Signed-off-by: Chris Wright ===== net/sched/cls_api.c 1.14 vs edited ===== --- 1.14/net/sched/cls_api.c 2004-10-20 01:37:15 -07:00 +++ edited/net/sched/cls_api.c 2004-10-21 18:35:52 -07:00 @@ -52,7 +52,7 @@ /* Find classifier type by string name */ -struct tcf_proto_ops * tcf_proto_lookup_ops(struct rtattr *kind) +static struct tcf_proto_ops * tcf_proto_lookup_ops(struct rtattr *kind) { struct tcf_proto_ops *t = NULL; From akepner@sgi.com Thu Oct 21 18:49:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 18:49:21 -0700 (PDT) Received: from omx2.sgi.com (omx2-ext.sgi.com [192.48.171.19]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M1nGb2001879 for ; Thu, 21 Oct 2004 18:49:16 -0700 Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by omx2.sgi.com (8.12.11/8.12.9/linux-outbound_gateway-1.1) with ESMTP id i9M32fms022035 for ; Thu, 21 Oct 2004 20:02:41 -0700 Received: from [192.168.2.3] (mtv-vpn-sw-corp-0-12.corp.sgi.com [134.15.0.12]) by cthulhu.engr.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id i9M1mwLH5317188; Thu, 21 Oct 2004 18:48:59 -0700 (PDT) Date: Thu, 21 Oct 2004 18:33:22 -0700 (PDT) From: X-X-Sender: To: Benjamin Herrenschmidt cc: "David S. Miller" , Jesse Barnes , Andrew Morton , Linux Kernel list , , Jeff Garzik , Subject: Re: [PATCH] use mmiowb in tg3.c In-Reply-To: <1098407804.6071.22.camel@gaston> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 10692 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: akepner@sgi.com Precedence: bulk X-list: netdev Content-Length: 332 Lines: 15 On Fri, 22 Oct 2004, Benjamin Herrenschmidt wrote: > ... > Typically, our normal "light" write barrier doesn't reorder between cacheable > and non-cacheable (MMIO) stores, which is why we had to put some heavy sync > barrier in our MMIO writes macros. > ... Do you mean "impose order" rather than "reorder" here? -- Arthur From benh@kernel.crashing.org Thu Oct 21 19:08:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 19:08:43 -0700 (PDT) Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M28brm004199 for ; Thu, 21 Oct 2004 19:08:37 -0700 Received: from localhost (localhost [127.0.0.1]) by gate.crashing.org (8.12.8/8.12.8) with ESMTP id i9M27HBG013645; Thu, 21 Oct 2004 21:07:18 -0500 Subject: Re: [PATCH] use mmiowb in tg3.c From: Benjamin Herrenschmidt To: akepner@sgi.com Cc: "David S. Miller" , Jesse Barnes , Andrew Morton , Linux Kernel list , netdev@oss.sgi.com, Jeff Garzik , gnb@sgi.com In-Reply-To: References: Content-Type: text/plain Message-Id: <1098410843.6028.45.camel@gaston> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Fri, 22 Oct 2004 12:07:24 +1000 Content-Transfer-Encoding: 7bit X-archive-position: 10693 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: benh@kernel.crashing.org Precedence: bulk X-list: netdev Content-Length: 403 Lines: 16 On Fri, 2004-10-22 at 11:33, akepner@sgi.com wrote: > On Fri, 22 Oct 2004, Benjamin Herrenschmidt wrote: > > > ... > > Typically, our normal "light" write barrier doesn't reorder between cacheable > > and non-cacheable (MMIO) stores, which is why we had to put some heavy sync > > barrier in our MMIO writes macros. > > ... > > Do you mean "impose order" rather than "reorder" here? Right. Ben. From garzik@havoc.gtf.org Thu Oct 21 19:12:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 19:12:30 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [69.28.190.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M2CDqv004558 for ; Thu, 21 Oct 2004 19:12:14 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id ABC4A75FF; Thu, 21 Oct 2004 22:11:03 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i9M2B3hM021860; Thu, 21 Oct 2004 22:11:03 -0400 Date: Thu, 21 Oct 2004 22:11:03 -0400 From: Jeff Garzik To: Andrew Morton , Linus Torvalds Cc: netdev@oss.sgi.com Subject: [BK PATCHES] 2.6.x net driver updates Message-ID: <20041022021103.GA21829@havoc.gtf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.4.1i X-archive-position: 10694 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: 118863 Lines: 3722 The day's net driver merges. Please do a bk pull bk://gkernel.bkbits.net/net-drivers-2.6 This will update the following files: drivers/net/8139cp.c | 1 drivers/net/b44.c | 131 +++-- drivers/net/b44.h | 113 ---- drivers/net/depca.c | 8 drivers/net/forcedeth.c | 31 + drivers/net/sis900.c | 258 +++++----- drivers/net/smc91x.c | 484 ++++++++++--------- drivers/net/smc91x.h | 33 - drivers/net/tokenring/lanstreamer.c | 2 drivers/net/tulip/dmfe.c | 1 drivers/net/via-rhine.c | 4 drivers/net/wireless/prism54/isl_38xx.c | 15 drivers/net/wireless/prism54/isl_38xx.h | 4 drivers/net/wireless/prism54/isl_ioctl.c | 639 ++++++++++++++++++++++---- drivers/net/wireless/prism54/isl_ioctl.h | 2 drivers/net/wireless/prism54/isl_oid.h | 9 drivers/net/wireless/prism54/islpci_dev.c | 49 + drivers/net/wireless/prism54/islpci_dev.h | 4 drivers/net/wireless/prism54/islpci_eth.c | 5 drivers/net/wireless/prism54/islpci_hotplug.c | 3 drivers/net/wireless/prism54/islpci_mgt.c | 1 drivers/net/wireless/prism54/islpci_mgt.h | 2 drivers/net/wireless/prism54/oid_mgt.c | 126 ++++- drivers/net/wireless/prism54/oid_mgt.h | 5 24 files changed, 1273 insertions(+), 657 deletions(-) through these ChangeSets: : o [netdrvr b44] clean up SiliconBackplane definitions/functions o [netdrvr b44] ignore carrier lost errors Alexander Viro: o depca removal of bogus virt_to_bus() uses o missing includes of asm/irq.h o lanstreamer fix Andrew Morton: o typhoon build fix Con Kolivas: o b44poll - whitespace o netconsole support for b44 Daniele Venzano: o [netdrvr sis900] whitespace and codingstyle updates Hirokazu Takata: o m32r: trivial fix of smc91x.h Jeff Garzik: o [netdrvr b44] update MODULE_AUTHORS Manfred Spraul: o rx checksum support for gige nForce ethernet Margit Schubert-While: o prism54 bug initialization/mgt_commit o prism54 print firmware version o prism54 Bug in timeout scheduling o prism54 remove TRACE o prism54 fix wpa_supplicant frequency parsing o prism54 initial WPA support o prism54 add WE17 support o prism54 remove module params o prism54 Code cleanup Nicolas Pitre: o smc91x: release on-chip RX packet memory ASAP o smc91x: receives two bytes too many o smc91x: fix compilation with DMA on PXA2xx o smc91x: more SMP locking fixes o smc91x: fix SMP lock usage o smc91x: cosmetics o smc91x: straighten SMP locking o smc91x: display pertinent register values from the timeout function o smc91x: fix possible leak of the skb waiting for mem allocation o smc91x: use a work queue to reconfigure the phy from smc_timeout() o smc91x: move TX processing out of IRQ context entirely o smc91x: simplify register bank usage o smc91x: fold smc_setmulticast() into smc_set_multicast_list() o smc91x: set the MAC addr from the smc_enable function o smc91x: Assorted minor cleanups o smc91x: Revert 1.1923.3.58: "m32r: modify drivers/net/smc91x.c for m32r" Pavel Machek: o Fix suspend/resume support in via-rhine2 Pekka Pietikäinen: o b44: use bounce buffers to workaround chip DMA bug/limitations Stephen Hemminger: o b44: use netdev_priv o b44: replace MODULE_PARM diff -Nru a/drivers/net/8139cp.c b/drivers/net/8139cp.c --- a/drivers/net/8139cp.c 2004-10-21 22:09:44 -04:00 +++ b/drivers/net/8139cp.c 2004-10-21 22:09:44 -04:00 @@ -71,6 +71,7 @@ #include #include #include +#include #include /* VLAN tagging feature enable/disable */ diff -Nru a/drivers/net/b44.c b/drivers/net/b44.c --- a/drivers/net/b44.c 2004-10-21 22:09:44 -04:00 +++ b/drivers/net/b44.c 2004-10-21 22:09:44 -04:00 @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -27,8 +28,8 @@ #define DRV_MODULE_NAME "b44" #define PFX DRV_MODULE_NAME ": " -#define DRV_MODULE_VERSION "0.94" -#define DRV_MODULE_RELDATE "May 4, 2004" +#define DRV_MODULE_VERSION "0.95" +#define DRV_MODULE_RELDATE "Aug 3, 2004" #define B44_DEF_MSG_ENABLE \ (NETIF_MSG_DRV | \ @@ -57,6 +58,7 @@ #define B44_DEF_TX_RING_PENDING (B44_TX_RING_SIZE - 1) #define B44_TX_RING_BYTES (sizeof(struct dma_desc) * \ B44_TX_RING_SIZE) +#define B44_DMA_MASK 0x3fffffff #define TX_RING_GAP(BP) \ (B44_TX_RING_SIZE - (BP)->tx_pending) @@ -67,6 +69,7 @@ #define NEXT_TX(N) (((N) + 1) & (B44_TX_RING_SIZE - 1)) #define RX_PKT_BUF_SZ (1536 + bp->rx_offset + 64) +#define TX_PKT_BUF_SZ (B44_MAX_MTU + ETH_HLEN + 8) /* minimum number of free TX descriptors required to wake up TX process */ #define B44_TX_WAKEUP_THRESH (B44_TX_RING_SIZE / 4) @@ -74,13 +77,13 @@ static char version[] __devinitdata = DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; -MODULE_AUTHOR("David S. Miller (davem@redhat.com)"); +MODULE_AUTHOR("Florian Schirmer, Pekka Pietikainen, David S. Miller"); MODULE_DESCRIPTION("Broadcom 4400 10/100 PCI ethernet driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(b44_debug, "i"); -MODULE_PARM_DESC(b44_debug, "B44 bitmapped debugging message enable value"); static int b44_debug = -1; /* -1 == use B44_DEF_MSG_ENABLE as value */ +module_param(b44_debug, int, 0); +MODULE_PARM_DESC(b44_debug, "B44 bitmapped debugging message enable value"); static struct pci_device_id b44_pci_tbl[] = { { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_BCM4401, @@ -97,6 +100,10 @@ static void b44_halt(struct b44 *); static void b44_init_rings(struct b44 *); static void b44_init_hw(struct b44 *); +static int b44_poll(struct net_device *dev, int *budget); +#ifdef CONFIG_NET_POLL_CONTROLLER +static void b44_poll_controller(struct net_device *dev); +#endif static inline unsigned long br32(const struct b44 *bp, unsigned long reg) { @@ -141,41 +148,8 @@ * interrupts disabled. */ -#define SBID_SDRAM 0 -#define SBID_PCI_MEM 1 -#define SBID_PCI_CFG 2 -#define SBID_PCI_DMA 3 -#define SBID_SDRAM_SWAPPED 4 -#define SBID_ENUM 5 -#define SBID_REG_SDRAM 6 -#define SBID_REG_ILINE20 7 -#define SBID_REG_EMAC 8 -#define SBID_REG_CODEC 9 -#define SBID_REG_USB 10 -#define SBID_REG_PCI 11 -#define SBID_REG_MIPS 12 -#define SBID_REG_EXTIF 13 -#define SBID_EXTIF 14 -#define SBID_EJTAG 15 -#define SBID_MAX 16 - -static u32 ssb_get_addr(struct b44 *bp, u32 id, u32 instance) -{ - switch (id) { - case SBID_PCI_DMA: - return 0x40000000; - case SBID_ENUM: - return 0x18000000; - case SBID_REG_EMAC: - return 0x18000000; - case SBID_REG_CODEC: - return 0x18001000; - case SBID_REG_PCI: - return 0x18002000; - default: - return 0; - }; -} +#define SB_PCI_DMA 0x40000000 /* Client Mode PCI memory access space (1 GB) */ +#define BCM4400_PCI_CORE_ADDR 0x18002000 /* Address of PCI core on BCM4400 cards */ static u32 ssb_get_core_rev(struct b44 *bp) { @@ -187,8 +161,7 @@ u32 bar_orig, pci_rev, val; pci_read_config_dword(bp->pdev, SSB_BAR0_WIN, &bar_orig); - pci_write_config_dword(bp->pdev, SSB_BAR0_WIN, - ssb_get_addr(bp, SBID_REG_PCI, 0)); + pci_write_config_dword(bp->pdev, SSB_BAR0_WIN, BCM4400_PCI_CORE_ADDR); pci_rev = ssb_get_core_rev(bp); val = br32(bp, B44_SBINTVEC); @@ -649,10 +622,30 @@ if (skb == NULL) return -ENOMEM; - skb->dev = bp->dev; mapping = pci_map_single(bp->pdev, skb->data, RX_PKT_BUF_SZ, PCI_DMA_FROMDEVICE); + + /* Hardware bug work-around, the chip is unable to do PCI DMA + to/from anything above 1GB :-( */ + if(mapping+RX_PKT_BUF_SZ > B44_DMA_MASK) { + /* Sigh... */ + pci_unmap_single(bp->pdev, mapping, RX_PKT_BUF_SZ,PCI_DMA_FROMDEVICE); + dev_kfree_skb_any(skb); + skb = __dev_alloc_skb(RX_PKT_BUF_SZ,GFP_DMA); + if (skb == NULL) + return -ENOMEM; + mapping = pci_map_single(bp->pdev, skb->data, + RX_PKT_BUF_SZ, + PCI_DMA_FROMDEVICE); + if(mapping+RX_PKT_BUF_SZ > B44_DMA_MASK) { + pci_unmap_single(bp->pdev, mapping, RX_PKT_BUF_SZ,PCI_DMA_FROMDEVICE); + dev_kfree_skb_any(skb); + return -ENOMEM; + } + } + + skb->dev = bp->dev; skb_reserve(skb, bp->rx_offset); rh = (struct rx_header *) @@ -930,6 +923,12 @@ entry = bp->tx_prod; mapping = pci_map_single(bp->pdev, skb->data, len, PCI_DMA_TODEVICE); + if(mapping+len > B44_DMA_MASK) { + /* Chip can't handle DMA to/from >1GB, use bounce buffer */ + pci_unmap_single(bp->pdev, mapping, len,PCI_DMA_TODEVICE); + memcpy(bp->tx_bufs+entry*TX_PKT_BUF_SZ,skb->data,skb->len); + mapping = pci_map_single(bp->pdev, bp->tx_bufs+entry*TX_PKT_BUF_SZ, len, PCI_DMA_TODEVICE); + } bp->tx_buffers[entry].skb = skb; pci_unmap_addr_set(&bp->tx_buffers[entry], mapping, mapping); @@ -1077,6 +1076,11 @@ bp->tx_ring, bp->tx_ring_dma); bp->tx_ring = NULL; } + if (bp->tx_bufs) { + pci_free_consistent(bp->pdev, B44_TX_RING_SIZE * TX_PKT_BUF_SZ, + bp->tx_bufs, bp->tx_bufs_dma); + bp->tx_bufs = NULL; + } } /* @@ -1099,6 +1103,12 @@ goto out_err; memset(bp->tx_buffers, 0, size); + size = B44_TX_RING_SIZE * TX_PKT_BUF_SZ; + bp->tx_bufs = pci_alloc_consistent(bp->pdev, size, &bp->tx_bufs_dma); + if (!bp->tx_bufs) + goto out_err; + memset(bp->tx_bufs, 0, size); + size = DMA_TABLE_BYTES; bp->rx_ring = pci_alloc_consistent(bp->pdev, size, &bp->rx_ring_dma); if (!bp->rx_ring) @@ -1297,6 +1307,19 @@ } #endif +#ifdef CONFIG_NET_POLL_CONTROLLER +/* + * Polling receive - used by netconsole and other diagnostic tools + * to allow network i/o with interrupts disabled. + */ +static void b44_poll_controller(struct net_device *dev) +{ + disable_irq(dev->irq); + b44_interrupt(dev->irq, dev, NULL); + enable_irq(dev->irq); +} +#endif + static int b44_close(struct net_device *dev) { struct b44 *bp = netdev_priv(dev); @@ -1358,7 +1381,10 @@ hwstat->rx_symbol_errs); nstat->tx_aborted_errors = hwstat->tx_underruns; +#if 0 + /* Carrier lost counter seems to be broken for some devices */ nstat->tx_carrier_errors = hwstat->tx_carrier_lost; +#endif return nstat; } @@ -1684,7 +1710,6 @@ bp->dev->dev_addr[5] = eeprom[82]; bp->phy_addr = eeprom[90] & 0x1f; - bp->mdc_port = (eeprom[90] >> 14) & 0x1; /* With this, plus the rx_header prepended to the data by the * hardware, we'll land the ethernet header on a 2-byte boundary. @@ -1694,7 +1719,7 @@ bp->imask = IMASK_DEF; bp->core_unit = ssb_core_unit(bp); - bp->dma_offset = ssb_get_addr(bp, SBID_PCI_DMA, 0); + bp->dma_offset = SB_PCI_DMA; /* XXX - really required? bp->flags |= B44_FLAG_BUGGY_TXPTR; @@ -1738,12 +1763,19 @@ pci_set_master(pdev); - err = pci_set_dma_mask(pdev, (u64) 0xffffffff); + err = pci_set_dma_mask(pdev, (u64) B44_DMA_MASK); if (err) { printk(KERN_ERR PFX "No usable DMA configuration, " "aborting.\n"); goto err_out_free_res; } + + err = pci_set_consistent_dma_mask(pdev, (u64) B44_DMA_MASK); + if (err) { + printk(KERN_ERR PFX "No usable DMA configuration, " + "aborting.\n"); + goto err_out_free_res; + } b44reg_base = pci_resource_start(pdev, 0); b44reg_len = pci_resource_len(pdev, 0); @@ -1793,6 +1825,9 @@ dev->poll = b44_poll; dev->weight = 64; dev->watchdog_timeo = B44_TX_TIMEOUT; +#ifdef CONFIG_NET_POLL_CONTROLLER + dev->poll_controller = b44_poll_controller; +#endif dev->change_mtu = b44_change_mtu; dev->irq = pdev->irq; SET_ETHTOOL_OPS(dev, &b44_ethtool_ops); @@ -1870,7 +1905,7 @@ static int b44_suspend(struct pci_dev *pdev, u32 state) { struct net_device *dev = pci_get_drvdata(pdev); - struct b44 *bp = dev->priv; + struct b44 *bp = netdev_priv(dev); if (!netif_running(dev)) return 0; @@ -1891,7 +1926,7 @@ static int b44_resume(struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); - struct b44 *bp = dev->priv; + struct b44 *bp = netdev_priv(dev); pci_restore_state(pdev); diff -Nru a/drivers/net/b44.h b/drivers/net/b44.h --- a/drivers/net/b44.h 2004-10-21 22:09:44 -04:00 +++ b/drivers/net/b44.h 2004-10-21 22:09:44 -04:00 @@ -223,21 +223,8 @@ #define B44_RX_SYM 0x05D0UL /* MIB RX Symbol Errors */ #define B44_RX_PAUSE 0x05D4UL /* MIB RX Pause Packets */ #define B44_RX_NPAUSE 0x05D8UL /* MIB RX Non-Pause Packets */ -#define B44_SBIPSFLAG 0x0F08UL /* SB Initiator Port OCP Slave Flag */ -#define SBIPSFLAG_IMASK1 0x0000003f /* Which sbflags --> mips interrupt 1 */ -#define SBIPSFLAG_ISHIFT1 0 -#define SBIPSFLAG_IMASK2 0x00003f00 /* Which sbflags --> mips interrupt 2 */ -#define SBIPSFLAG_ISHIFT2 8 -#define SBIPSFLAG_IMASK3 0x003f0000 /* Which sbflags --> mips interrupt 3 */ -#define SBIPSFLAG_ISHIFT3 16 -#define SBIPSFLAG_IMASK4 0x3f000000 /* Which sbflags --> mips interrupt 4 */ -#define SBIPSFLAG_ISHIFT4 24 -#define B44_SBTPSFLAG 0x0F18UL /* SB Target Port OCP Slave Flag */ -#define SBTPS_NUM0_MASK 0x0000003f -#define SBTPS_F0EN0 0x00000040 -#define B44_SBADMATCH3 0x0F60UL /* SB Address Match 3 */ -#define B44_SBADMATCH2 0x0F68UL /* SB Address Match 2 */ -#define B44_SBADMATCH1 0x0F70UL /* SB Address Match 1 */ + +/* Silicon backplane register definitions */ #define B44_SBIMSTATE 0x0F90UL /* SB Initiator Agent State */ #define SBIMSTATE_PC 0x0000000f /* Pipe Count */ #define SBIMSTATE_AP_MASK 0x00000030 /* Arbitration Priority */ @@ -269,86 +256,6 @@ #define SBTMSHIGH_GCR 0x20000000 /* Gated Clock Request */ #define SBTMSHIGH_BISTF 0x40000000 /* BIST Failed */ #define SBTMSHIGH_BISTD 0x80000000 /* BIST Done */ -#define B44_SBBWA0 0x0FA0UL /* SB Bandwidth Allocation Table 0 */ -#define SBBWA0_TAB0_MASK 0x0000ffff /* Lookup Table 0 */ -#define SBBWA0_TAB0_SHIFT 0 -#define SBBWA0_TAB1_MASK 0xffff0000 /* Lookup Table 0 */ -#define SBBWA0_TAB1_SHIFT 16 -#define B44_SBIMCFGLOW 0x0FA8UL /* SB Initiator Configuration Low */ -#define SBIMCFGLOW_STO_MASK 0x00000003 /* Service Timeout */ -#define SBIMCFGLOW_RTO_MASK 0x00000030 /* Request Timeout */ -#define SBIMCFGLOW_RTO_SHIFT 4 -#define SBIMCFGLOW_CID_MASK 0x00ff0000 /* Connection ID */ -#define SBIMCFGLOW_CID_SHIFT 16 -#define B44_SBIMCFGHIGH 0x0FACUL /* SB Initiator Configuration High */ -#define SBIMCFGHIGH_IEM_MASK 0x0000000c /* Inband Error Mode */ -#define SBIMCFGHIGH_TEM_MASK 0x00000030 /* Timeout Error Mode */ -#define SBIMCFGHIGH_TEM_SHIFT 4 -#define SBIMCFGHIGH_BEM_MASK 0x000000c0 /* Bus Error Mode */ -#define SBIMCFGHIGH_BEM_SHIFT 6 -#define B44_SBADMATCH0 0x0FB0UL /* SB Address Match 0 */ -#define SBADMATCH0_TYPE_MASK 0x00000003 /* Address Type */ -#define SBADMATCH0_AD64 0x00000004 /* Reserved */ -#define SBADMATCH0_AI0_MASK 0x000000f8 /* Type0 Size */ -#define SBADMATCH0_AI0_SHIFT 3 -#define SBADMATCH0_AI1_MASK 0x000001f8 /* Type1 Size */ -#define SBADMATCH0_AI1_SHIFT 3 -#define SBADMATCH0_AI2_MASK 0x000001f8 /* Type2 Size */ -#define SBADMATCH0_AI2_SHIFT 3 -#define SBADMATCH0_ADEN 0x00000400 /* Enable */ -#define SBADMATCH0_ADNEG 0x00000800 /* Negative Decode */ -#define SBADMATCH0_BS0_MASK 0xffffff00 /* Type0 Base Address */ -#define SBADMATCH0_BS0_SHIFT 8 -#define SBADMATCH0_BS1_MASK 0xfffff000 /* Type1 Base Address */ -#define SBADMATCH0_BS1_SHIFT 12 -#define SBADMATCH0_BS2_MASK 0xffff0000 /* Type2 Base Address */ -#define SBADMATCH0_BS2_SHIFT 16 -#define B44_SBTMCFGLOW 0x0FB8UL /* SB Target Configuration Low */ -#define SBTMCFGLOW_CD_MASK 0x000000ff /* Clock Divide Mask */ -#define SBTMCFGLOW_CO_MASK 0x0000f800 /* Clock Offset Mask */ -#define SBTMCFGLOW_CO_SHIFT 11 -#define SBTMCFGLOW_IF_MASK 0x00fc0000 /* Interrupt Flags Mask */ -#define SBTMCFGLOW_IF_SHIFT 18 -#define SBTMCFGLOW_IM_MASK 0x03000000 /* Interrupt Mode Mask */ -#define SBTMCFGLOW_IM_SHIFT 24 -#define B44_SBTMCFGHIGH 0x0FBCUL /* SB Target Configuration High */ -#define SBTMCFGHIGH_BM_MASK 0x00000003 /* Busy Mode */ -#define SBTMCFGHIGH_RM_MASK 0x0000000C /* Retry Mode */ -#define SBTMCFGHIGH_RM_SHIFT 2 -#define SBTMCFGHIGH_SM_MASK 0x00000030 /* Stop Mode */ -#define SBTMCFGHIGH_SM_SHIFT 4 -#define SBTMCFGHIGH_EM_MASK 0x00000300 /* Error Mode */ -#define SBTMCFGHIGH_EM_SHIFT 8 -#define SBTMCFGHIGH_IM_MASK 0x00000c00 /* Interrupt Mode */ -#define SBTMCFGHIGH_IM_SHIFT 10 -#define B44_SBBCFG 0x0FC0UL /* SB Broadcast Configuration */ -#define SBBCFG_LAT_MASK 0x00000003 /* SB Latency */ -#define SBBCFG_MAX0_MASK 0x000f0000 /* MAX Counter 0 */ -#define SBBCFG_MAX0_SHIFT 16 -#define SBBCFG_MAX1_MASK 0x00f00000 /* MAX Counter 1 */ -#define SBBCFG_MAX1_SHIFT 20 -#define B44_SBBSTATE 0x0FC8UL /* SB Broadcast State */ -#define SBBSTATE_SRD 0x00000001 /* ST Reg Disable */ -#define SBBSTATE_HRD 0x00000002 /* Hold Reg Disable */ -#define B44_SBACTCNFG 0x0FD8UL /* SB Activate Configuration */ -#define B44_SBFLAGST 0x0FE8UL /* SB Current SBFLAGS */ -#define B44_SBIDLOW 0x0FF8UL /* SB Identification Low */ -#define SBIDLOW_CS_MASK 0x00000003 /* Config Space Mask */ -#define SBIDLOW_AR_MASK 0x00000038 /* Num Address Ranges Supported */ -#define SBIDLOW_AR_SHIFT 3 -#define SBIDLOW_SYNCH 0x00000040 /* Sync */ -#define SBIDLOW_INIT 0x00000080 /* Initiator */ -#define SBIDLOW_MINLAT_MASK 0x00000f00 /* Minimum Backplane Latency */ -#define SBIDLOW_MINLAT_SHIFT 8 -#define SBIDLOW_MAXLAT_MASK 0x0000f000 /* Maximum Backplane Latency */ -#define SBIDLOW_MAXLAT_SHIFT 12 -#define SBIDLOW_FIRST 0x00010000 /* This Initiator is First */ -#define SBIDLOW_CW_MASK 0x000c0000 /* Cycle Counter Width */ -#define SBIDLOW_CW_SHIFT 18 -#define SBIDLOW_TP_MASK 0x00f00000 /* Target Ports */ -#define SBIDLOW_TP_SHIFT 20 -#define SBIDLOW_IP_MASK 0x0f000000 /* Initiator Ports */ -#define SBIDLOW_IP_SHIFT 24 #define B44_SBIDHIGH 0x0FFCUL /* SB Identification High */ #define SBIDHIGH_RC_MASK 0x0000000f /* Revision Code */ #define SBIDHIGH_CC_MASK 0x0000fff0 /* Core Code */ @@ -356,23 +263,13 @@ #define SBIDHIGH_VC_MASK 0xffff0000 /* Vendor Code */ #define SBIDHIGH_VC_SHIFT 16 -#define CORE_CODE_ILINE20 0x801 -#define CORE_CODE_SDRAM 0x803 -#define CORE_CODE_PCI 0x804 -#define CORE_CODE_MIPS 0x805 -#define CORE_CODE_ENET 0x806 -#define CORE_CODE_CODEC 0x807 -#define CORE_CODE_USB 0x808 -#define CORE_CODE_ILINE100 0x80a -#define CORE_CODE_EXTIF 0x811 - /* SSB PCI config space registers. */ #define SSB_BAR0_WIN 0x80 #define SSB_BAR1_WIN 0x84 #define SSB_SPROM_CONTROL 0x88 #define SSB_BAR1_CONTROL 0x8c -/* SSB core and hsot control registers. */ +/* SSB core and host control registers. */ #define SSB_CONTROL 0x0000UL #define SSB_ARBCONTROL 0x0010UL #define SSB_ISTAT 0x0020UL @@ -500,6 +397,7 @@ struct ring_info *rx_buffers; struct ring_info *tx_buffers; + unsigned char *tx_bufs; u32 dma_offset; u32 flags; @@ -531,12 +429,11 @@ struct pci_dev *pdev; struct net_device *dev; - dma_addr_t rx_ring_dma, tx_ring_dma; + dma_addr_t rx_ring_dma, tx_ring_dma,tx_bufs_dma; u32 rx_pending; u32 tx_pending; u8 phy_addr; - u8 mdc_port; u8 core_unit; struct mii_if_info mii_if; diff -Nru a/drivers/net/depca.c b/drivers/net/depca.c --- a/drivers/net/depca.c 2004-10-21 22:09:44 -04:00 +++ b/drivers/net/depca.c 2004-10-21 22:09:44 -04:00 @@ -1222,10 +1222,10 @@ /* clear IDON by writing a "1", enable interrupts and start lance */ outw(IDON | INEA | STRT, DEPCA_DATA); if (depca_debug > 2) { - printk("%s: DEPCA open after %d ticks, init block 0x%08lx csr0 %4.4x.\n", dev->name, i, virt_to_phys(lp->sh_mem), inw(DEPCA_DATA)); + printk("%s: DEPCA open after %d ticks, init block 0x%08lx csr0 %4.4x.\n", dev->name, i, lp->mem_start, inw(DEPCA_DATA)); } } else { - printk("%s: DEPCA unopen after %d ticks, init block 0x%08lx csr0 %4.4x.\n", dev->name, i, virt_to_phys(lp->sh_mem), inw(DEPCA_DATA)); + printk("%s: DEPCA unopen after %d ticks, init block 0x%08lx csr0 %4.4x.\n", dev->name, i, lp->mem_start, inw(DEPCA_DATA)); status = -1; } @@ -1901,7 +1901,7 @@ } } printk("...0x%8.8x\n", readl(&lp->tx_ring[i].base)); - printk("Initialisation block at 0x%8.8lx(Phys)\n", virt_to_phys(lp->sh_mem)); + printk("Initialisation block at 0x%8.8lx(Phys)\n", lp->mem_start); printk(" mode: 0x%4.4x\n", p->mode); printk(" physical address: "); for (i = 0; i < ETH_ALEN - 1; i++) { @@ -1915,7 +1915,7 @@ printk("%2.2x\n", p->mcast_table[i]); printk(" rx_ring at: 0x%8.8x\n", p->rx_ring); printk(" tx_ring at: 0x%8.8x\n", p->tx_ring); - printk("buffers (Phys): 0x%8.8lx\n", virt_to_phys(lp->sh_mem) + lp->buffs_offset); + printk("buffers (Phys): 0x%8.8lx\n", lp->mem_start + lp->buffs_offset); printk("Ring size:\nRX: %d Log2(rxRingMask): 0x%8.8x\n", (int) lp->rxRingMask + 1, lp->rx_rlen); printk("TX: %d Log2(txRingMask): 0x%8.8x\n", (int) lp->txRingMask + 1, lp->tx_rlen); outw(CSR2, DEPCA_ADDR); diff -Nru a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c --- a/drivers/net/forcedeth.c 2004-10-21 22:09:44 -04:00 +++ b/drivers/net/forcedeth.c 2004-10-21 22:09:44 -04:00 @@ -76,6 +76,9 @@ * for registers, link status and other minor fixes. * 0.28: 21 Jun 2004: Big cleanup, making driver mostly endian safe * 0.29: 31 Aug 2004: Add backup timer for link change notification. + * 0.30: 25 Sep 2004: rx checksum support for nf 250 Gb. Add rx reset + * into nv_close, otherwise reenabling for wol can + * cause DMA to kfree'd memory. * * Known bugs: * We suspect that on some hardware no TX done interrupts are generated. @@ -87,7 +90,7 @@ * DEV_NEED_TIMERIRQ will not harm you on sane hardware, only generating a few * superfluous timer interrupts from the nic. */ -#define FORCEDETH_VERSION "0.29" +#define FORCEDETH_VERSION "0.30" #define DRV_NAME "forcedeth" #include @@ -217,6 +220,7 @@ #define NVREG_TXRXCTL_BIT2 0x0004 #define NVREG_TXRXCTL_IDLE 0x0008 #define NVREG_TXRXCTL_RESET 0x0010 +#define NVREG_TXRXCTL_RXCHECK 0x0400 NvRegMIIStatus = 0x180, #define NVREG_MIISTAT_ERROR 0x0001 #define NVREG_MIISTAT_LINKCHANGE 0x0008 @@ -313,6 +317,10 @@ #define NV_RX_ERROR (1<<30) #define NV_RX_AVAIL (1<<31) +#define NV_RX2_CHECKSUMMASK (0x1C000000) +#define NV_RX2_CHECKSUMOK1 (0x10000000) +#define NV_RX2_CHECKSUMOK2 (0x14000000) +#define NV_RX2_CHECKSUMOK3 (0x18000000) #define NV_RX2_DESCRIPTORVALID (1<<29) #define NV_RX2_SUBSTRACT1 (1<<25) #define NV_RX2_ERROR1 (1<<18) @@ -371,8 +379,15 @@ #define POLL_WAIT (1+HZ/100) #define LINK_TIMEOUT (3*HZ) +/* + * desc_ver values: + * This field has two purposes: + * - Newer nics uses a different ring layout. The layout is selected by + * comparing np->desc_ver with DESC_VER_xy. + * - It contains bits that are forced on when writing to NvRegTxRxControl. + */ #define DESC_VER_1 0x0 -#define DESC_VER_2 0x02100 +#define DESC_VER_2 (0x02100|NVREG_TXRXCTL_RXCHECK) /* PHY defines */ #define PHY_OUI_MARVELL 0x5043 @@ -1142,6 +1157,15 @@ goto next_pkt; } } + Flags &= NV_RX2_CHECKSUMMASK; + if (Flags == NV_RX2_CHECKSUMOK1 || + Flags == NV_RX2_CHECKSUMOK2 || + Flags == NV_RX2_CHECKSUMOK3) { + dprintk(KERN_DEBUG "%s: hw checksum hit!.\n", dev->name); + np->rx_skbuff[i]->ip_summed = CHECKSUM_UNNECESSARY; + } else { + dprintk(KERN_DEBUG "%s: hwchecksum miss!.\n", dev->name); + } } /* got a valid packet - forward it to the network core */ skb = np->rx_skbuff[i]; @@ -1634,9 +1658,10 @@ spin_lock_irq(&np->lock); nv_stop_tx(dev); nv_stop_rx(dev); - base = get_hwbase(dev); + nv_txrx_reset(dev); /* disable interrupts on the nic or we will lock up */ + base = get_hwbase(dev); writel(0, base + NvRegIrqMask); pci_push(base); dprintk(KERN_INFO "%s: Irqmask is zero again\n", dev->name); diff -Nru a/drivers/net/sis900.c b/drivers/net/sis900.c --- a/drivers/net/sis900.c 2004-10-21 22:09:44 -04:00 +++ b/drivers/net/sis900.c 2004-10-21 22:09:44 -04:00 @@ -140,9 +140,9 @@ }; typedef struct _BufferDesc { - u32 link; - u32 cmdsts; - u32 bufptr; + u32 link; + u32 cmdsts; + u32 bufptr; } BufferDesc; struct sis900_private { @@ -156,7 +156,7 @@ unsigned int cur_phy; struct timer_list timer; /* Link status detection timer. */ - u8 autong_complete; /* 1: auto-negotiate complete */ + u8 autong_complete; /* 1: auto-negotiate complete */ unsigned int cur_rx, dirty_rx; /* producer/comsumer pointers for Tx/Rx ring */ unsigned int cur_tx, dirty_tx; @@ -170,7 +170,7 @@ dma_addr_t tx_ring_dma; dma_addr_t rx_ring_dma; - unsigned int tx_full; /* The Tx queue is full. */ + unsigned int tx_full; /* The Tx queue is full. */ u8 host_bridge_rev; }; @@ -255,7 +255,8 @@ * MAC address is read into @net_dev->dev_addr. */ -static int __devinit sis630e_get_mac_addr(struct pci_dev * pci_dev, struct net_device *net_dev) +static int __devinit sis630e_get_mac_addr(struct pci_dev * pci_dev, + struct net_device *net_dev) { struct pci_dev *isa_bridge = NULL; u8 reg; @@ -292,7 +293,8 @@ * @net_dev->dev_addr. */ -static int __devinit sis635_get_mac_addr(struct pci_dev * pci_dev, struct net_device *net_dev) +static int __devinit sis635_get_mac_addr(struct pci_dev * pci_dev, + struct net_device *net_dev) { long ioaddr = net_dev->base_addr; u32 rfcrSave; @@ -334,7 +336,8 @@ * MAC address is read into @net_dev->dev_addr. */ -static int __devinit sis96x_get_mac_addr(struct pci_dev * pci_dev, struct net_device *net_dev) +static int __devinit sis96x_get_mac_addr(struct pci_dev * pci_dev, + struct net_device *net_dev) { long ioaddr = net_dev->base_addr; long ee_addr = ioaddr + mear; @@ -371,7 +374,8 @@ * ie: sis900_open(), sis900_start_xmit(), sis900_close(), etc. */ -static int __devinit sis900_probe (struct pci_dev *pci_dev, const struct pci_device_id *pci_id) +static int __devinit sis900_probe(struct pci_dev *pci_dev, + const struct pci_device_id *pci_id) { struct sis900_private *sis_priv; struct net_device *net_dev; @@ -522,7 +526,7 @@ * return error if it failed to found. */ -static int __init sis900_mii_probe (struct net_device * net_dev) +static int __init sis900_mii_probe(struct net_device * net_dev) { struct sis900_private * sis_priv = net_dev->priv; u16 poll_bit = MII_STAT_LINK, status = 0; @@ -572,9 +576,10 @@ mii_phy->phy_types = mii_chip_table[i].phy_types; if (mii_chip_table[i].phy_types == MIX) mii_phy->phy_types = - (mii_status & (MII_STAT_CAN_TX_FDX | MII_STAT_CAN_TX)) ? LAN : HOME; + (mii_status & (MII_STAT_CAN_TX_FDX | MII_STAT_CAN_TX)) ? LAN : HOME; printk(KERN_INFO "%s: %s transceiver found at address %d.\n", - net_dev->name, mii_chip_table[i].name, phy_addr); + net_dev->name, mii_chip_table[i].name, + phy_addr); break; } @@ -587,7 +592,7 @@ if (sis_priv->mii == NULL) { printk(KERN_INFO "%s: No MII transceivers found!\n", - net_dev->name); + net_dev->name); return 0; } @@ -611,7 +616,8 @@ poll_bit ^= (mdio_read(net_dev, sis_priv->cur_phy, MII_STATUS) & poll_bit); if (time_after_eq(jiffies, timeout)) { - printk(KERN_WARNING "%s: reset phy and link down now\n", net_dev->name); + printk(KERN_WARNING "%s: reset phy and link down now\n", + net_dev->name); return -ETIME; } } @@ -647,38 +653,41 @@ static u16 sis900_default_phy(struct net_device * net_dev) { struct sis900_private * sis_priv = net_dev->priv; - struct mii_phy *phy = NULL, *phy_home = NULL, *default_phy = NULL, *phy_lan = NULL; + struct mii_phy *phy = NULL, *phy_home = NULL, + *default_phy = NULL, *phy_lan = NULL; u16 status; - for( phy=sis_priv->first_mii; phy; phy=phy->next ){ + for (phy=sis_priv->first_mii; phy; phy=phy->next) { status = mdio_read(net_dev, phy->phy_addr, MII_STATUS); status = mdio_read(net_dev, phy->phy_addr, MII_STATUS); /* Link ON & Not select default PHY & not ghost PHY */ - if ( (status & MII_STAT_LINK) && !default_phy && (phy->phy_types != UNKNOWN) ) + if ((status & MII_STAT_LINK) && !default_phy && + (phy->phy_types != UNKNOWN)) default_phy = phy; - else{ + else { status = mdio_read(net_dev, phy->phy_addr, MII_CONTROL); mdio_write(net_dev, phy->phy_addr, MII_CONTROL, status | MII_CNTL_AUTO | MII_CNTL_ISOLATE); - if( phy->phy_types == HOME ) + if (phy->phy_types == HOME) phy_home = phy; - else if (phy->phy_types == LAN) + else if(phy->phy_types == LAN) phy_lan = phy; } } - if( !default_phy && phy_home ) + if (!default_phy && phy_home) default_phy = phy_home; - else if( !default_phy && phy_lan ) + else if (!default_phy && phy_lan) default_phy = phy_lan; - else if ( !default_phy ) + else if (!default_phy) default_phy = sis_priv->first_mii; - if( sis_priv->mii != default_phy ){ + if (sis_priv->mii != default_phy) { sis_priv->mii = default_phy; sis_priv->cur_phy = default_phy->phy_addr; - printk(KERN_INFO "%s: Using transceiver found at address %d as default\n", net_dev->name,sis_priv->cur_phy); + printk(KERN_INFO "%s: Using transceiver found at address %d as default\n", + net_dev->name,sis_priv->cur_phy); } status = mdio_read(net_dev, sis_priv->cur_phy, MII_CONTROL); @@ -701,7 +710,7 @@ * mii status register. It's necessary before auto-negotiate. */ -static void sis900_set_capability( struct net_device *net_dev , struct mii_phy *phy ) +static void sis900_set_capability(struct net_device *net_dev, struct mii_phy *phy) { u16 cap; u16 status; @@ -851,7 +860,8 @@ * please see SiS7014 or ICS spec */ -static void mdio_write(struct net_device *net_dev, int phy_id, int location, int value) +static void mdio_write(struct net_device *net_dev, int phy_id, int location, + int value) { long mdio_addr = net_dev->base_addr + mear; int mii_cmd = MIIwrite|(phy_id<pci_dev, PCI_CLASS_REVISION, &revision); sis630_set_eq(net_dev, revision); - ret = request_irq(net_dev->irq, &sis900_interrupt, SA_SHIRQ, net_dev->name, net_dev); + ret = request_irq(net_dev->irq, &sis900_interrupt, SA_SHIRQ, + net_dev->name, net_dev); if (ret) return ret; @@ -1136,48 +1147,55 @@ return; if (netif_carrier_ok(net_dev)) { - reg14h=mdio_read(net_dev, sis_priv->cur_phy, MII_RESV); - mdio_write(net_dev, sis_priv->cur_phy, MII_RESV, (0x2200 | reg14h) & 0xBFFF); + reg14h = mdio_read(net_dev, sis_priv->cur_phy, MII_RESV); + mdio_write(net_dev, sis_priv->cur_phy, MII_RESV, + (0x2200 | reg14h) & 0xBFFF); for (i=0; i < maxcount; i++) { - eq_value=(0x00F8 & mdio_read(net_dev, sis_priv->cur_phy, MII_RESV)) >> 3; + eq_value = (0x00F8 & mdio_read(net_dev, + sis_priv->cur_phy, MII_RESV)) >> 3; if (i == 0) max_value=min_value=eq_value; - max_value=(eq_value > max_value) ? eq_value : max_value; - min_value=(eq_value < min_value) ? eq_value : min_value; + max_value = (eq_value > max_value) ? + eq_value : max_value; + min_value = (eq_value < min_value) ? + eq_value : min_value; } /* 630E rule to determine the equalizer value */ if (revision == SIS630E_900_REV || revision == SIS630EA1_900_REV || revision == SIS630ET_900_REV) { if (max_value < 5) - eq_value=max_value; + eq_value = max_value; else if (max_value >= 5 && max_value < 15) - eq_value=(max_value == min_value) ? max_value+2 : max_value+1; + eq_value = (max_value == min_value) ? + max_value+2 : max_value+1; else if (max_value >= 15) - eq_value=(max_value == min_value) ? max_value+6 : max_value+5; + eq_value=(max_value == min_value) ? + max_value+6 : max_value+5; } /* 630B0&B1 rule to determine the equalizer value */ if (revision == SIS630A_900_REV && (sis_priv->host_bridge_rev == SIS630B0 || sis_priv->host_bridge_rev == SIS630B1)) { if (max_value == 0) - eq_value=3; + eq_value = 3; else - eq_value=(max_value+min_value+1)/2; + eq_value = (max_value + min_value + 1)/2; } /* write equalizer value and setting */ - reg14h=mdio_read(net_dev, sis_priv->cur_phy, MII_RESV); - reg14h=(reg14h & 0xFF07) | ((eq_value << 3) & 0x00F8); - reg14h=(reg14h | 0x6000) & 0xFDFF; + reg14h = mdio_read(net_dev, sis_priv->cur_phy, MII_RESV); + reg14h = (reg14h & 0xFF07) | ((eq_value << 3) & 0x00F8); + reg14h = (reg14h | 0x6000) & 0xFDFF; mdio_write(net_dev, sis_priv->cur_phy, MII_RESV, reg14h); - } - else { - reg14h=mdio_read(net_dev, sis_priv->cur_phy, MII_RESV); + } else { + reg14h = mdio_read(net_dev, sis_priv->cur_phy, MII_RESV); if (revision == SIS630A_900_REV && (sis_priv->host_bridge_rev == SIS630B0 || sis_priv->host_bridge_rev == SIS630B1)) - mdio_write(net_dev, sis_priv->cur_phy, MII_RESV, (reg14h | 0x2200) & 0xBFFF); + mdio_write(net_dev, sis_priv->cur_phy, MII_RESV, + (reg14h | 0x2200) & 0xBFFF); else - mdio_write(net_dev, sis_priv->cur_phy, MII_RESV, (reg14h | 0x2000) & 0xBFFF); + mdio_write(net_dev, sis_priv->cur_phy, MII_RESV, + (reg14h | 0x2000) & 0xBFFF); } return; } @@ -1205,7 +1223,8 @@ sis900_read_mode(net_dev, &speed, &duplex); if (duplex){ sis900_set_mode(net_dev->base_addr, speed, duplex); - pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISION, &revision); + pci_read_config_byte(sis_priv->pci_dev, + PCI_CLASS_REVISION, &revision); sis630_set_eq(net_dev, revision); netif_start_queue(net_dev); } @@ -1229,9 +1248,8 @@ sis900_check_mode(net_dev, mii_phy); netif_carrier_on(net_dev); } - } + } else { /* Link ON -> OFF */ - else { if (!(status & MII_STAT_LINK)){ netif_carrier_off(net_dev); printk(KERN_INFO "%s: Media Link Off\n", net_dev->name); @@ -1241,7 +1259,8 @@ ((mii_phy->phy_id1 & 0xFFF0) == 0x8000)) sis900_reset_phy(net_dev, sis_priv->cur_phy); - pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISION, &revision); + pci_read_config_byte(sis_priv->pci_dev, + PCI_CLASS_REVISION, &revision); sis630_set_eq(net_dev, revision); goto LookForLink; @@ -1264,18 +1283,18 @@ * and autong_complete should be set to 1. */ -static void sis900_check_mode (struct net_device *net_dev, struct mii_phy *mii_phy) +static void sis900_check_mode(struct net_device *net_dev, struct mii_phy *mii_phy) { struct sis900_private *sis_priv = net_dev->priv; long ioaddr = net_dev->base_addr; int speed, duplex; - if( mii_phy->phy_types == LAN ){ - outl( ~EXD & inl( ioaddr + cfg ), ioaddr + cfg); + if (mii_phy->phy_types == LAN) { + outl(~EXD & inl(ioaddr + cfg), ioaddr + cfg); sis900_set_capability(net_dev , mii_phy); sis900_auto_negotiate(net_dev, sis_priv->cur_phy); - }else{ - outl(EXD | inl( ioaddr + cfg ), ioaddr + cfg); + } else { + outl(EXD | inl(ioaddr + cfg), ioaddr + cfg); speed = HW_SPEED_HOME; duplex = FDX_CAPABLE_HALF_SELECTED; sis900_set_mode(ioaddr, speed, duplex); @@ -1300,20 +1319,20 @@ { u32 tx_flags = 0, rx_flags = 0; - if( inl(ioaddr + cfg) & EDB_MASTER_EN ){ - tx_flags = TxATP | (DMA_BURST_64 << TxMXDMA_shift) | (TX_FILL_THRESH << TxFILLT_shift); + if (inl(ioaddr + cfg) & EDB_MASTER_EN) { + tx_flags = TxATP | (DMA_BURST_64 << TxMXDMA_shift) | + (TX_FILL_THRESH << TxFILLT_shift); rx_flags = DMA_BURST_64 << RxMXDMA_shift; - } - else{ - tx_flags = TxATP | (DMA_BURST_512 << TxMXDMA_shift) | (TX_FILL_THRESH << TxFILLT_shift); + } else { + tx_flags = TxATP | (DMA_BURST_512 << TxMXDMA_shift) | + (TX_FILL_THRESH << TxFILLT_shift); rx_flags = DMA_BURST_512 << RxMXDMA_shift; } - if (speed == HW_SPEED_HOME || speed == HW_SPEED_10_MBPS ) { + if (speed == HW_SPEED_HOME || speed == HW_SPEED_10_MBPS) { rx_flags |= (RxDRNT_10 << RxDRNT_shift); tx_flags |= (TxDRNT_10 << TxDRNT_shift); - } - else { + } else { rx_flags |= (RxDRNT_100 << RxDRNT_shift); tx_flags |= (TxDRNT_100 << TxDRNT_shift); } @@ -1403,19 +1422,19 @@ sis_priv->autong_complete = 1; /* Workaround for Realtek RTL8201 PHY issue */ - if((phy->phy_id0 == 0x0000) && ((phy->phy_id1 & 0xFFF0) == 0x8200)){ - if(mdio_read(net_dev, phy_addr, MII_CONTROL) & MII_CNTL_FDX) + if ((phy->phy_id0 == 0x0000) && ((phy->phy_id1 & 0xFFF0) == 0x8200)) { + if (mdio_read(net_dev, phy_addr, MII_CONTROL) & MII_CNTL_FDX) *duplex = FDX_CAPABLE_FULL_SELECTED; - if(mdio_read(net_dev, phy_addr, 0x0019) & 0x01) + if (mdio_read(net_dev, phy_addr, 0x0019) & 0x01) *speed = HW_SPEED_100_MBPS; } printk(KERN_INFO "%s: Media Link On %s %s-duplex \n", - net_dev->name, - *speed == HW_SPEED_100_MBPS ? - "100mbps" : "10mbps", - *duplex == FDX_CAPABLE_FULL_SELECTED ? - "full" : "half"); + net_dev->name, + *speed == HW_SPEED_100_MBPS ? + "100mbps" : "10mbps", + *duplex == FDX_CAPABLE_FULL_SELECTED ? + "full" : "half"); } /** @@ -1677,13 +1696,13 @@ sis_priv->stats.rx_bytes += rx_size; sis_priv->stats.rx_packets++; - /* refill the Rx buffer, what if there is not enought memory for - new socket buffer ?? */ + /* refill the Rx buffer, what if there is not enought + * memory for new socket buffer ?? */ if ((skb = dev_alloc_skb(RX_BUF_SIZE)) == NULL) { - /* not enough memory for skbuff, this makes a "hole" - on the buffer ring, it is not clear how the - hardware will react to this kind of degenerated - buffer */ + /* not enough memory for skbuff, this makes a + * "hole" on the buffer ring, it is not clear + * how the hardware will react to this kind + * of degenerated buffer */ printk(KERN_INFO "%s: Memory squeeze," "deferring packet.\n", net_dev->name); @@ -1707,8 +1726,8 @@ rx_status = sis_priv->rx_ring[entry].cmdsts; } // while - /* refill the Rx buffer, what if the rate of refilling is slower than - consuming ?? */ + /* refill the Rx buffer, what if the rate of refilling is slower + * than consuming ?? */ for (;sis_priv->cur_rx - sis_priv->dirty_rx > 0; sis_priv->dirty_rx++) { struct sk_buff *skb; @@ -1716,10 +1735,10 @@ if (sis_priv->rx_skbuff[entry] == NULL) { if ((skb = dev_alloc_skb(RX_BUF_SIZE)) == NULL) { - /* not enough memory for skbuff, this makes a "hole" - on the buffer ring, it is not clear how the - hardware will react to this kind of degenerated - buffer */ + /* not enough memory for skbuff, this makes a + * "hole" on the buffer ring, it is not clear + * how the hardware will react to this kind + * of degenerated buffer */ printk(KERN_INFO "%s: Memory squeeze," "deferring packet.\n", net_dev->name); @@ -1764,8 +1783,8 @@ if (tx_status & OWN) { /* The packet is not transmitted yet (owned by hardware) ! - Note: the interrupt is generated only when Tx Machine - is idle, so this is an almost impossible case */ + * Note: the interrupt is generated only when Tx Machine + * is idle, so this is an almost impossible case */ break; } @@ -1803,8 +1822,8 @@ if (sis_priv->tx_full && netif_queue_stopped(net_dev) && sis_priv->cur_tx - sis_priv->dirty_tx < NUM_TX_DESC - 4) { - /* The ring is no longer full, clear tx_full and schedule more transmission - by netif_wake_queue(net_dev) */ + /* The ring is no longer full, clear tx_full and schedule + * more transmission by netif_wake_queue(net_dev) */ sis_priv->tx_full = 0; netif_wake_queue (net_dev); } @@ -1818,8 +1837,7 @@ * free Tx and RX socket buffer */ -static int -sis900_close(struct net_device *net_dev) +static int sis900_close(struct net_device *net_dev) { long ioaddr = net_dev->base_addr; struct sis900_private *sis_priv = net_dev->priv; @@ -1955,27 +1973,28 @@ if ((map->port != (u_char)(-1)) && (map->port != dev->if_port)) { /* we switch on the ifmap->port field. I couldn't find anything - like a definition or standard for the values of that field. - I think the meaning of those values is device specific. But - since I would like to change the media type via the ifconfig - command I use the definition from linux/netdevice.h - (which seems to be different from the ifport(pcmcia) definition) - */ + * like a definition or standard for the values of that field. + * I think the meaning of those values is device specific. But + * since I would like to change the media type via the ifconfig + * command I use the definition from linux/netdevice.h + * (which seems to be different from the ifport(pcmcia) definition) */ switch(map->port){ case IF_PORT_UNKNOWN: /* use auto here */ dev->if_port = map->port; - /* we are going to change the media type, so the Link will - be temporary down and we need to reflect that here. When - the Link comes up again, it will be sensed by the sis_timer - procedure, which also does all the rest for us */ + /* we are going to change the media type, so the Link + * will be temporary down and we need to reflect that + * here. When the Link comes up again, it will be + * sensed by the sis_timer procedure, which also does + * all the rest for us */ netif_carrier_off(dev); /* read current state */ status = mdio_read(dev, mii_phy->phy_addr, MII_CONTROL); /* enable auto negotiation and reset the negotioation - (I don't really know what the auto negatiotiation reset - really means, but it sounds for me right to do one here)*/ + * (I don't really know what the auto negatiotiation + * reset really means, but it sounds for me right to + * do one here) */ mdio_write(dev, mii_phy->phy_addr, MII_CONTROL, status | MII_CNTL_AUTO | MII_CNTL_RST_AUTO); @@ -1984,10 +2003,11 @@ case IF_PORT_10BASET: /* 10BaseT */ dev->if_port = map->port; - /* we are going to change the media type, so the Link will - be temporary down and we need to reflect that here. When - the Link comes up again, it will be sensed by the sis_timer - procedure, which also does all the rest for us */ + /* we are going to change the media type, so the Link + * will be temporary down and we need to reflect that + * here. When the Link comes up again, it will be + * sensed by the sis_timer procedure, which also does + * all the rest for us */ netif_carrier_off(dev); /* set Speed to 10Mbps */ @@ -1996,24 +2016,27 @@ /* disable auto negotiation and force 10MBit mode*/ mdio_write(dev, mii_phy->phy_addr, - MII_CONTROL, status & ~(MII_CNTL_SPEED | MII_CNTL_AUTO)); + MII_CONTROL, status & ~(MII_CNTL_SPEED | + MII_CNTL_AUTO)); break; case IF_PORT_100BASET: /* 100BaseT */ case IF_PORT_100BASETX: /* 100BaseTx */ dev->if_port = map->port; - /* we are going to change the media type, so the Link will - be temporary down and we need to reflect that here. When - the Link comes up again, it will be sensed by the sis_timer - procedure, which also does all the rest for us */ + /* we are going to change the media type, so the Link + * will be temporary down and we need to reflect that + * here. When the Link comes up again, it will be + * sensed by the sis_timer procedure, which also does + * all the rest for us */ netif_carrier_off(dev); /* set Speed to 100Mbps */ /* disable auto negotiation and enable 100MBit Mode */ status = mdio_read(dev, mii_phy->phy_addr, MII_CONTROL); mdio_write(dev, mii_phy->phy_addr, - MII_CONTROL, (status & ~MII_CNTL_SPEED) | MII_CNTL_SPEED); + MII_CONTROL, (status & ~MII_CNTL_SPEED) | + MII_CNTL_SPEED); break; @@ -2093,12 +2116,14 @@ for (i = 0; i < table_entries; i++) mc_filter[i] = 0xffff; } else { - /* Accept Broadcast packet, destination address matchs our MAC address, - use Receive Filter to reject unwanted MCAST packet */ + /* Accept Broadcast packet, destination address matchs our + * MAC address, use Receive Filter to reject unwanted MCAST + * packets */ struct dev_mc_list *mclist; rx_mode = RFAAB; - for (i = 0, mclist = net_dev->mc_list; mclist && i < net_dev->mc_count; - i++, mclist = mclist->next) { + for (i = 0, mclist = net_dev->mc_list; + mclist && i < net_dev->mc_count; + i++, mclist = mclist->next) { unsigned int bit_nr = sis900_mcast_bitnr(mclist->dmi_addr, revision); mc_filter[bit_nr >> 4] |= (1 << (bit_nr & 0xf)); @@ -2114,7 +2139,8 @@ outl(RFEN | rx_mode, ioaddr + rfcr); - /* sis900 is capatable of looping back packet at MAC level for debugging purpose */ + /* sis900 is capable of looping back packets at MAC level for + * debugging purpose */ if (net_dev->flags & IFF_LOOPBACK) { u32 cr_saved; /* We must disable Tx/Rx before setting loopback mode */ diff -Nru a/drivers/net/smc91x.c b/drivers/net/smc91x.c --- a/drivers/net/smc91x.c 2004-10-21 22:09:44 -04:00 +++ b/drivers/net/smc91x.c 2004-10-21 22:09:44 -04:00 @@ -55,12 +55,10 @@ * smc_phy_configure * - clean up (and fix stack overrun) in PHY * MII read/write functions - * 09/15/04 Hayato Fujiwara - Add m32r support. - * - Modify for SMP kernel; Change spin-locked - * regions. + * 22/09/04 Nicolas Pitre big update (see commit log for details) */ static const char version[] = - "smc91x.c: v1.0, mar 07 2003 by Nicolas Pitre \n"; + "smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre \n"; /* Debugging level */ #ifndef SMC_DEBUG @@ -75,7 +73,7 @@ #include #include #include -#include +#include #include #include #include @@ -83,6 +81,7 @@ #include #include #include +#include #include #include @@ -177,7 +176,8 @@ * packet, I will store the skbuff here, until I get the * desired memory. Then, I'll send it out and free it. */ - struct sk_buff *saved_skb; + struct sk_buff *pending_tx_skb; + struct tasklet_struct tx_task; /* * these are things that the kernel wants me to keep, so users @@ -203,6 +203,8 @@ u32 msg_enable; u32 phy_type; struct mii_if_info mii; + struct work_struct phy_configure; + spinlock_t lock; #ifdef SMC_USE_PXA_DMA @@ -215,7 +217,7 @@ #define DBG(n, args...) \ do { \ if (SMC_DEBUG >= (n)) \ - printk(KERN_DEBUG args); \ + printk(args); \ } while (0) #define PRINTK(args...) printk(args) @@ -260,17 +262,21 @@ /* this enables an interrupt in the interrupt mask register */ #define SMC_ENABLE_INT(x) do { \ unsigned char mask; \ + spin_lock_irq(&lp->lock); \ mask = SMC_GET_INT_MASK(); \ mask |= (x); \ SMC_SET_INT_MASK(mask); \ + spin_unlock_irq(&lp->lock); \ } while (0) /* this disables an interrupt from the interrupt mask register */ #define SMC_DISABLE_INT(x) do { \ unsigned char mask; \ + spin_lock_irq(&lp->lock); \ mask = SMC_GET_INT_MASK(); \ mask &= ~(x); \ SMC_SET_INT_MASK(mask); \ + spin_unlock_irq(&lp->lock); \ } while (0) /* @@ -299,10 +305,17 @@ static void smc_reset(struct net_device *dev) { unsigned long ioaddr = dev->base_addr; + struct smc_local *lp = netdev_priv(dev); unsigned int ctl, cfg; DBG(2, "%s: %s\n", dev->name, __FUNCTION__); + /* Disable all interrupts */ + spin_lock(&lp->lock); + SMC_SELECT_BANK(2); + SMC_SET_INT_MASK(0); + spin_unlock(&lp->lock); + /* * This resets the registers mostly to defaults, but doesn't * affect EEPROM. That seems unnecessary @@ -358,20 +371,24 @@ * transmitted packets, to make the best use out of our limited * memory */ -#if ! THROTTLE_TX_PKTS - ctl |= CTL_AUTO_RELEASE; -#else - ctl &= ~CTL_AUTO_RELEASE; -#endif + if(!THROTTLE_TX_PKTS) + ctl |= CTL_AUTO_RELEASE; + else + ctl &= ~CTL_AUTO_RELEASE; SMC_SET_CTL(ctl); - /* Disable all interrupts */ - SMC_SELECT_BANK(2); - SMC_SET_INT_MASK(0); - /* Reset the MMU */ + SMC_SELECT_BANK(2); SMC_SET_MMU_CMD(MC_RESET); SMC_WAIT_MMU_BUSY(); + + /* clear anything saved */ + if (lp->pending_tx_skb != NULL) { + dev_kfree_skb (lp->pending_tx_skb); + lp->pending_tx_skb = NULL; + lp->stats.tx_errors++; + lp->stats.tx_aborted_errors++; + } } /* @@ -390,24 +407,39 @@ SMC_SET_TCR(lp->tcr_cur_mode); SMC_SET_RCR(lp->rcr_cur_mode); + SMC_SELECT_BANK(1); + SMC_SET_MAC_ADDR(dev->dev_addr); + /* now, enable interrupts */ mask = IM_EPH_INT|IM_RX_OVRN_INT|IM_RCV_INT; if (lp->version >= (CHIP_91100 << 4)) mask |= IM_MDINT; SMC_SELECT_BANK(2); SMC_SET_INT_MASK(mask); + + /* + * From this point the register bank must _NOT_ be switched away + * to something else than bank 2 without proper locking against + * races with any tasklet or interrupt handlers until smc_shutdown() + * or smc_reset() is called. + */ } /* * this puts the device in an inactive state */ -static void smc_shutdown(unsigned long ioaddr) +static void smc_shutdown(struct net_device *dev) { + unsigned long ioaddr = dev->base_addr; + struct smc_local *lp = netdev_priv(dev); + DBG(2, "%s: %s\n", CARDNAME, __FUNCTION__); /* no more interrupts for me */ + spin_lock(&lp->lock); SMC_SELECT_BANK(2); SMC_SET_INT_MASK(0); + spin_unlock(&lp->lock); /* and tell the card to stay away from that nasty outside world */ SMC_SELECT_BANK(0); @@ -449,6 +481,8 @@ packet_len, packet_len); if (unlikely(status & RS_ERRORS)) { + SMC_WAIT_MMU_BUSY(); + SMC_SET_MMU_CMD(MC_RELEASE); lp->stats.rx_errors++; if (status & RS_ALGNERR) lp->stats.rx_frame_errors++; @@ -466,17 +500,21 @@ lp->stats.multicast++; /* - * Actual payload is packet_len - 4 (or 3 if odd byte). + * Actual payload is packet_len - 6 (or 5 if odd byte). * We want skb_reserve(2) and the final ctrl word * (2 bytes, possibly containing the payload odd byte). - * Ence packet_len - 4 + 2 + 2. + * Furthermore, we add 2 bytes to allow rounding up to + * multiple of 4 bytes on 32 bit buses. + * Ence packet_len - 6 + 2 + 2 + 2. */ skb = dev_alloc_skb(packet_len); if (unlikely(skb == NULL)) { printk(KERN_NOTICE "%s: Low memory, packet dropped.\n", dev->name); + SMC_WAIT_MMU_BUSY(); + SMC_SET_MMU_CMD(MC_RELEASE); lp->stats.rx_dropped++; - goto done; + return; } /* Align IP header to 32 bits */ @@ -487,14 +525,18 @@ status |= RS_ODDFRAME; /* - * If odd length: packet_len - 3, - * otherwise packet_len - 4. + * If odd length: packet_len - 5, + * otherwise packet_len - 6. + * With the trailing ctrl byte it's packet_len - 4. */ - data_len = packet_len - ((status & RS_ODDFRAME) ? 3 : 4); + data_len = packet_len - ((status & RS_ODDFRAME) ? 5 : 6); data = skb_put(skb, data_len); - SMC_PULL_DATA(data, packet_len - 2); + SMC_PULL_DATA(data, packet_len - 4); - PRINT_PKT(data, packet_len - 2); + SMC_WAIT_MMU_BUSY(); + SMC_SET_MMU_CMD(MC_RELEASE); + + PRINT_PKT(data, packet_len - 4); dev->last_rx = jiffies; skb->dev = dev; @@ -503,34 +545,76 @@ lp->stats.rx_packets++; lp->stats.rx_bytes += data_len; } - -done: - SMC_WAIT_MMU_BUSY(); - SMC_SET_MMU_CMD(MC_RELEASE); } +#ifdef CONFIG_SMP +/* + * On SMP we have the following problem: + * + * A = smc_hardware_send_pkt() + * B = smc_hard_start_xmit() + * C = smc_interrupt() + * + * A and B can never be executed simultaneously. However, at least on UP, + * it is possible (and even desirable) for C to interrupt execution of + * A or B in order to have better RX reliability and avoid overruns. + * C, just like A and B, must have exclusive access to the chip and + * each of them must lock against any other concurrent access. + * Unfortunately this is not possible to have C suspend execution of A or + * B taking place on another CPU. On UP this is no an issue since A and B + * are run from softirq context and C from hard IRQ context, and there is + * no other CPU where concurrent access can happen. + * If ever there is a way to force at least B and C to always be executed + * on the same CPU then we could use read/write locks to protect against + * any other concurrent access and C would always interrupt B. But life + * isn't that easy in a SMP world... + */ +#define smc_special_trylock(lock) \ +({ \ + int __ret; \ + local_irq_disable(); \ + __ret = spin_trylock(lock); \ + if (!__ret) \ + local_irq_enable(); \ + __ret; \ +}) +#define smc_special_lock(lock) spin_lock_irq(lock) +#define smc_special_unlock(lock) spin_unlock_irq(lock) +#else +#define smc_special_trylock(lock) (1) +#define smc_special_lock(lock) do { } while (0) +#define smc_special_unlock(lock) do { } while (0) +#endif + /* * This is called to actually send a packet to the chip. - * Returns non-zero when successful. */ -static void smc_hardware_send_packet(struct net_device *dev) +static void smc_hardware_send_pkt(unsigned long data) { + struct net_device *dev = (struct net_device *)data; struct smc_local *lp = netdev_priv(dev); unsigned long ioaddr = dev->base_addr; - struct sk_buff *skb = lp->saved_skb; + struct sk_buff *skb; unsigned int packet_no, len; unsigned char *buf; DBG(3, "%s: %s\n", dev->name, __FUNCTION__); + if (!smc_special_trylock(&lp->lock)) { + netif_stop_queue(dev); + tasklet_schedule(&lp->tx_task); + return; + } + + skb = lp->pending_tx_skb; + lp->pending_tx_skb = NULL; packet_no = SMC_GET_AR(); if (unlikely(packet_no & AR_FAILED)) { printk("%s: Memory allocation failed.\n", dev->name); - lp->saved_skb = NULL; lp->stats.tx_errors++; lp->stats.tx_fifo_errors++; - dev_kfree_skb_any(skb); - return; + smc_special_unlock(&lp->lock); + goto done; } /* point to the beginning of the packet */ @@ -555,15 +639,33 @@ /* Send final ctl word with the last byte if there is one */ SMC_outw(((len & 1) ? (0x2000 | buf[len-1]) : 0), ioaddr, DATA_REG); - /* and let the chipset deal with it */ + /* + * If THROTTLE_TX_PKTS is set, we look at the TX_EMPTY flag + * before queueing this packet for TX, and if it's clear then + * we stop the queue here. This will have the effect of + * having at most 2 packets queued for TX in the chip's memory + * at all time. If THROTTLE_TX_PKTS is not set then the queue + * is stopped only when memory allocation (MC_ALLOC) does not + * succeed right away. + */ + if (THROTTLE_TX_PKTS && !(SMC_GET_INT() & IM_TX_EMPTY_INT)) + netif_stop_queue(dev); + + /* queue the packet for TX */ SMC_SET_MMU_CMD(MC_ENQUEUE); SMC_ACK_INT(IM_TX_EMPTY_INT); + smc_special_unlock(&lp->lock); dev->trans_start = jiffies; - dev_kfree_skb_any(skb); - lp->saved_skb = NULL; lp->stats.tx_packets++; lp->stats.tx_bytes += len; + + SMC_ENABLE_INT(IM_TX_INT | IM_TX_EMPTY_INT); + +done: if (!THROTTLE_TX_PKTS) + netif_wake_queue(dev); + + dev_kfree_skb(skb); } /* @@ -576,15 +678,12 @@ { struct smc_local *lp = netdev_priv(dev); unsigned long ioaddr = dev->base_addr; - unsigned int numPages, poll_count, status, saved_bank; - unsigned long flags; + unsigned int numPages, poll_count, status; DBG(3, "%s: %s\n", dev->name, __FUNCTION__); - spin_lock_irqsave(&lp->lock, flags); - - BUG_ON(lp->saved_skb != NULL); - lp->saved_skb = skb; + BUG_ON(lp->pending_tx_skb != NULL); + lp->pending_tx_skb = skb; /* * The MMU wants the number of pages to be the number of 256 bytes @@ -600,17 +699,16 @@ numPages = ((skb->len & ~1) + (6 - 1)) >> 8; if (unlikely(numPages > 7)) { printk("%s: Far too big packet error.\n", dev->name); - lp->saved_skb = NULL; + lp->pending_tx_skb = NULL; lp->stats.tx_errors++; lp->stats.tx_dropped++; dev_kfree_skb(skb); - spin_unlock_irqrestore(&lp->lock, flags); return 0; } + smc_special_lock(&lp->lock); + /* now, try to allocate the memory */ - saved_bank = SMC_CURRENT_BANK(); - SMC_SELECT_BANK(2); SMC_SET_MMU_CMD(MC_ALLOC | numPages); /* @@ -626,6 +724,8 @@ } } while (--poll_count); + smc_special_unlock(&lp->lock); + if (!poll_count) { /* oh well, wait until the chip finds memory later */ netif_stop_queue(dev); @@ -635,25 +735,10 @@ /* * Allocation succeeded: push packet to the chip's own memory * immediately. - * - * If THROTTLE_TX_PKTS is selected that means we don't want - * more than a single TX packet taking up space in the chip's - * internal memory at all time, in which case we stop the - * queue right here until we're notified of TX completion. - * - * Otherwise we're quite happy to feed more TX packets right - * away for better TX throughput, in which case the queue is - * left active. */ -#if THROTTLE_TX_PKTS - netif_stop_queue(dev); -#endif - smc_hardware_send_packet(dev); - SMC_ENABLE_INT(IM_TX_INT | IM_TX_EMPTY_INT); + smc_hardware_send_pkt((unsigned long)dev); } - SMC_SELECT_BANK(saved_bank); - spin_unlock_irqrestore(&lp->lock, flags); return 0; } @@ -767,10 +852,8 @@ static int smc_phy_read(struct net_device *dev, int phyaddr, int phyreg) { unsigned long ioaddr = dev->base_addr; - unsigned int phydata, old_bank; + unsigned int phydata; - /* Save the current bank, and select bank 3 */ - old_bank = SMC_CURRENT_BANK(); SMC_SELECT_BANK(3); /* Idle - 32 ones */ @@ -785,12 +868,10 @@ /* Return to idle state */ SMC_SET_MII(SMC_GET_MII() & ~(MII_MCLK|MII_MDOE|MII_MDO)); - /* And select original bank */ - SMC_SELECT_BANK(old_bank); - DBG(3, "%s: phyaddr=0x%x, phyreg=0x%x, phydata=0x%x\n", __FUNCTION__, phyaddr, phyreg, phydata); + SMC_SELECT_BANK(2); return phydata; } @@ -801,10 +882,7 @@ int phydata) { unsigned long ioaddr = dev->base_addr; - unsigned int old_bank; - /* Save the current bank, and select bank 3 */ - old_bank = SMC_CURRENT_BANK(); SMC_SELECT_BANK(3); /* Idle - 32 ones */ @@ -816,11 +894,10 @@ /* Return to idle state */ SMC_SET_MII(SMC_GET_MII() & ~(MII_MCLK|MII_MDOE|MII_MDO)); - /* And select original bank */ - SMC_SELECT_BANK(old_bank); - DBG(3, "%s: phyaddr=0x%x, phyreg=0x%x, phydata=0x%x\n", __FUNCTION__, phyaddr, phyreg, phydata); + + SMC_SELECT_BANK(2); } /* @@ -893,7 +970,9 @@ smc_phy_write(dev, phyaddr, MII_BMCR, bmcr); /* Re-Configure the Receive/Phy Control register */ + SMC_SELECT_BANK(0); SMC_SET_RPC(lp->rpc_cur_mode); + SMC_SELECT_BANK(2); return 1; } @@ -941,13 +1020,10 @@ */ static void smc_phy_powerdown(struct net_device *dev, int phy) { - struct smc_local *lp = netdev_priv(dev); unsigned int bmcr; - spin_lock_irq(&lp->lock); bmcr = smc_phy_read(dev, phy, MII_BMCR); smc_phy_write(dev, phy, MII_BMCR, bmcr | BMCR_PDOWN); - spin_unlock_irq(&lp->lock); } /* @@ -964,8 +1040,6 @@ unsigned long ioaddr = dev->base_addr; if (mii_check_media(&lp->mii, netif_msg_link(lp), init)) { - unsigned int old_bank; - /* duplex state has changed */ if (lp->mii.full_duplex) { lp->tcr_cur_mode |= TCR_SWFDUP; @@ -973,10 +1047,8 @@ lp->tcr_cur_mode &= ~TCR_SWFDUP; } - old_bank = SMC_CURRENT_BANK(); SMC_SELECT_BANK(0); SMC_SET_TCR(lp->tcr_cur_mode); - SMC_SELECT_BANK(old_bank); } } @@ -989,8 +1061,9 @@ * of autonegotiation.) If the RPC ANEG bit is cleared, the selection * is controlled by the RPC SPEED and RPC DPLX bits. */ -static void smc_phy_configure(struct net_device *dev) +static void smc_phy_configure(void *data) { + struct net_device *dev = data; struct smc_local *lp = netdev_priv(dev); unsigned long ioaddr = dev->base_addr; int phyaddr = lp->mii.phy_id; @@ -1117,12 +1190,13 @@ { struct smc_local *lp = netdev_priv(dev); unsigned long ioaddr = dev->base_addr; - unsigned int old_carrier, new_carrier, old_bank; + unsigned int old_carrier, new_carrier; - old_bank = SMC_CURRENT_BANK(); - SMC_SELECT_BANK(0); old_carrier = netif_carrier_ok(dev) ? 1 : 0; + + SMC_SELECT_BANK(0); new_carrier = SMC_inw(ioaddr, EPH_STATUS_REG) & ES_LINK_OK ? 1 : 0; + SMC_SELECT_BANK(2); if (init || (old_carrier != new_carrier)) { if (!new_carrier) { @@ -1134,24 +1208,20 @@ printk(KERN_INFO "%s: link %s\n", dev->name, new_carrier ? "up" : "down"); } - SMC_SELECT_BANK(old_bank); } static void smc_eph_interrupt(struct net_device *dev) { unsigned long ioaddr = dev->base_addr; - unsigned int old_bank, ctl; + unsigned int ctl; smc_10bt_check_media(dev, 0); - old_bank = SMC_CURRENT_BANK(); SMC_SELECT_BANK(1); - ctl = SMC_GET_CTL(); SMC_SET_CTL(ctl & ~CTL_LE_ENABLE); SMC_SET_CTL(ctl); - - SMC_SELECT_BANK(old_bank); + SMC_SELECT_BANK(2); } /* @@ -1164,14 +1234,12 @@ unsigned long ioaddr = dev->base_addr; struct smc_local *lp = netdev_priv(dev); int status, mask, timeout, card_stats; - int saved_bank, saved_pointer; + int saved_pointer; DBG(3, "%s: %s\n", dev->name, __FUNCTION__); spin_lock(&lp->lock); - saved_bank = SMC_CURRENT_BANK(); - SMC_SELECT_BANK(2); saved_pointer = SMC_GET_PTR(); mask = SMC_GET_INT_MASK(); SMC_SET_INT_MASK(0); @@ -1182,7 +1250,7 @@ do { status = SMC_GET_INT(); - DBG(2, "%s: IRQ 0x%02x MASK 0x%02x MEM 0x%04x FIFO 0x%04x\n", + DBG(2, "%s: INT 0x%02x MASK 0x%02x MEM 0x%04x FIFO 0x%04x\n", dev->name, status, mask, ({ int meminfo; SMC_SELECT_BANK(0); meminfo = SMC_GET_MIR(); @@ -1200,17 +1268,12 @@ DBG(3, "%s: TX int\n", dev->name); smc_tx(dev); SMC_ACK_INT(IM_TX_INT); -#if THROTTLE_TX_PKTS - netif_wake_queue(dev); -#endif + if (THROTTLE_TX_PKTS) + netif_wake_queue(dev); } else if (status & IM_ALLOC_INT) { DBG(3, "%s: Allocation irq\n", dev->name); - smc_hardware_send_packet(dev); - mask |= (IM_TX_INT | IM_TX_EMPTY_INT); + tasklet_hi_schedule(&lp->tx_task); mask &= ~IM_ALLOC_INT; -#if ! THROTTLE_TX_PKTS - netif_wake_queue(dev); -#endif } else if (status & IM_TX_EMPTY_INT) { DBG(3, "%s: TX empty\n", dev->name); mask &= ~IM_TX_EMPTY_INT; @@ -1240,17 +1303,16 @@ SMC_ACK_INT(IM_ERCV_INT); PRINTK("%s: UNSUPPORTED: ERCV INTERRUPT \n", dev->name); } - } while (--timeout); /* restore register states */ - SMC_SET_INT_MASK(mask); SMC_SET_PTR(saved_pointer); - SMC_SELECT_BANK(saved_bank); + SMC_SET_INT_MASK(mask); + + spin_unlock(&lp->lock); DBG(3, "%s: Interrupt done (%d loops)\n", dev->name, 8-timeout); - spin_unlock(&lp->lock); /* * We return IRQ_HANDLED unconditionally here even if there was * nothing to do. There is a possibility that a packet might @@ -1266,101 +1328,39 @@ static void smc_timeout(struct net_device *dev) { struct smc_local *lp = netdev_priv(dev); - unsigned long flags; + unsigned long ioaddr = dev->base_addr; + int status, mask, meminfo, fifo; - spin_lock_irqsave(&lp->lock, flags); DBG(2, "%s: %s\n", dev->name, __FUNCTION__); + spin_lock_irq(&lp->lock); + status = SMC_GET_INT(); + mask = SMC_GET_INT_MASK(); + fifo = SMC_GET_FIFO(); + SMC_SELECT_BANK(0); + meminfo = SMC_GET_MIR(); + SMC_SELECT_BANK(2); + spin_unlock_irq(&lp->lock); + PRINTK( "%s: INT 0x%02x MASK 0x%02x MEM 0x%04x FIFO 0x%04x\n", + dev->name, status, mask, meminfo, fifo ); + smc_reset(dev); smc_enable(dev); -#if 0 /* * Reconfiguring the PHY doesn't seem like a bad idea here, but - * it introduced a problem. Now that this is a timeout routine, - * we are getting called from within an interrupt context. - * smc_phy_configure() calls msleep() which calls - * schedule_timeout() which calls schedule(). When schedule() - * is called from an interrupt context, it prints out - * "Scheduling in interrupt" and then calls BUG(). This is - * obviously not desirable. This was worked around by removing - * the call to smc_phy_configure() here because it didn't seem - * absolutely necessary. Ultimately, if msleep() is - * supposed to be usable from an interrupt context (which it - * looks like it thinks it should handle), it should be fixed. + * smc_phy_configure() calls msleep() which calls schedule_timeout() + * which calls schedule(). Ence we use a work queue. */ if (lp->phy_type != 0) - smc_phy_configure(dev); -#endif + schedule_work(&lp->phy_configure); - /* clear anything saved */ - if (lp->saved_skb != NULL) { - dev_kfree_skb (lp->saved_skb); - lp->saved_skb = NULL; - lp->stats.tx_errors++; - lp->stats.tx_aborted_errors++; - } /* We can accept TX packets again */ dev->trans_start = jiffies; - - spin_unlock_irqrestore(&lp->lock, flags); - netif_wake_queue(dev); } /* - * This sets the internal hardware table to filter out unwanted multicast - * packets before they take up memory. - * - * The SMC chip uses a hash table where the high 6 bits of the CRC of - * address are the offset into the table. If that bit is 1, then the - * multicast packet is accepted. Otherwise, it's dropped silently. - * - * To use the 6 bits as an offset into the table, the high 3 bits are the - * number of the 8 bit register, while the low 3 bits are the bit within - * that register. - * - * This routine is based very heavily on the one provided by Peter Cammaert. - */ -static void -smc_setmulticast(unsigned long ioaddr, int count, struct dev_mc_list *addrs) -{ - int i; - unsigned char multicast_table[8]; - struct dev_mc_list *cur_addr; - - /* table for flipping the order of 3 bits */ - static unsigned char invert3[] = { 0, 4, 2, 6, 1, 5, 3, 7 }; - - /* start with a table of all zeros: reject all */ - memset(multicast_table, 0, sizeof(multicast_table)); - - cur_addr = addrs; - for (i = 0; i < count; i++, cur_addr = cur_addr->next) { - int position; - - /* do we have a pointer here? */ - if (!cur_addr) - break; - /* make sure this is a multicast address - shouldn't this - be a given if we have it here ? */ - if (!(*cur_addr->dmi_addr & 1)) - continue; - - /* only use the low order bits */ - position = crc32_le(~0, cur_addr->dmi_addr, 6) & 0x3f; - - /* do some messy swapping to put the bit in the right spot */ - multicast_table[invert3[position&7]] |= - (1<>3)&7]); - - } - /* now, the table can be loaded into the chipset */ - SMC_SELECT_BANK(3); - SMC_SET_MCAST(multicast_table); -} - -/* * This routine will, depending on the values passed to it, * either make it accept multicast packets, go into * promiscuous mode (for TCPDUMP and cousins) or accept @@ -1370,14 +1370,14 @@ { struct smc_local *lp = netdev_priv(dev); unsigned long ioaddr = dev->base_addr; + unsigned char multicast_table[8]; + int update_multicast = 0; DBG(2, "%s: %s\n", dev->name, __FUNCTION__); - SMC_SELECT_BANK(0); if (dev->flags & IFF_PROMISC) { DBG(2, "%s: RCR_PRMS\n", dev->name); lp->rcr_cur_mode |= RCR_PRMS; - SMC_SET_RCR(lp->rcr_cur_mode); } /* BUG? I never disable promiscuous mode if multicasting was turned on. @@ -1391,38 +1391,78 @@ * checked before the table is */ else if (dev->flags & IFF_ALLMULTI || dev->mc_count > 16) { - lp->rcr_cur_mode |= RCR_ALMUL; - SMC_SET_RCR(lp->rcr_cur_mode); DBG(2, "%s: RCR_ALMUL\n", dev->name); + lp->rcr_cur_mode |= RCR_ALMUL; } /* - * We just get all multicast packets even if we only want them - * from one source. This will be changed at some future point. + * This sets the internal hardware table to filter out unwanted + * multicast packets before they take up memory. + * + * The SMC chip uses a hash table where the high 6 bits of the CRC of + * address are the offset into the table. If that bit is 1, then the + * multicast packet is accepted. Otherwise, it's dropped silently. + * + * To use the 6 bits as an offset into the table, the high 3 bits are + * the number of the 8 bit register, while the low 3 bits are the bit + * within that register. */ else if (dev->mc_count) { - /* support hardware multicasting */ + int i; + struct dev_mc_list *cur_addr; + + /* table for flipping the order of 3 bits */ + static const unsigned char invert3[] = {0, 4, 2, 6, 1, 5, 3, 7}; + + /* start with a table of all zeros: reject all */ + memset(multicast_table, 0, sizeof(multicast_table)); + + cur_addr = dev->mc_list; + for (i = 0; i < dev->mc_count; i++, cur_addr = cur_addr->next) { + int position; + + /* do we have a pointer here? */ + if (!cur_addr) + break; + /* make sure this is a multicast address - + shouldn't this be a given if we have it here ? */ + if (!(*cur_addr->dmi_addr & 1)) + continue; + + /* only use the low order bits */ + position = crc32_le(~0, cur_addr->dmi_addr, 6) & 0x3f; + + /* do some messy swapping to put the bit in the right spot */ + multicast_table[invert3[position&7]] |= + (1<>3)&7]); + } /* be sure I get rid of flags I might have set */ lp->rcr_cur_mode &= ~(RCR_PRMS | RCR_ALMUL); - SMC_SET_RCR(lp->rcr_cur_mode); - /* - * NOTE: this has to set the bank, so make sure it is the - * last thing called. The bank is set to zero at the top - */ - smc_setmulticast(ioaddr, dev->mc_count, dev->mc_list); + + /* now, the table can be loaded into the chipset */ + update_multicast = 1; } else { DBG(2, "%s: ~(RCR_PRMS|RCR_ALMUL)\n", dev->name); lp->rcr_cur_mode &= ~(RCR_PRMS | RCR_ALMUL); - SMC_SET_RCR(lp->rcr_cur_mode); /* * since I'm disabling all multicast entirely, I need to * clear the multicast list */ + memset(multicast_table, 0, sizeof(multicast_table)); + update_multicast = 1; + } + + spin_lock_irq(&lp->lock); + SMC_SELECT_BANK(0); + SMC_SET_RCR(lp->rcr_cur_mode); + if (update_multicast) { SMC_SELECT_BANK(3); - SMC_CLEAR_MCAST(); + SMC_SET_MCAST(multicast_table); } + SMC_SELECT_BANK(2); + spin_unlock_irq(&lp->lock); } @@ -1435,7 +1475,6 @@ smc_open(struct net_device *dev) { struct smc_local *lp = netdev_priv(dev); - unsigned long ioaddr = dev->base_addr; DBG(2, "%s: %s\n", dev->name, __FUNCTION__); @@ -1445,13 +1484,10 @@ * address using ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx */ if (!is_valid_ether_addr(dev->dev_addr)) { - DBG(2, "smc_open: no valid ethernet hw addr\n"); + PRINTK("%s: no valid ethernet hw addr\n", __FUNCTION__); return -EINVAL; } - /* clear out all the junk that was put here before... */ - lp->saved_skb = NULL; - /* Setup the default Register Modes */ lp->tcr_cur_mode = TCR_DEFAULT; lp->rcr_cur_mode = RCR_DEFAULT; @@ -1468,10 +1504,7 @@ smc_reset(dev); smc_enable(dev); - SMC_SELECT_BANK(1); - SMC_SET_MAC_ADDR(dev->dev_addr); - - /* Configure the PHY */ + /* Configure the PHY, initialize the link state */ if (lp->phy_type != 0) smc_phy_configure(dev); else { @@ -1480,12 +1513,6 @@ spin_unlock_irq(&lp->lock); } - /* - * make sure to initialize the link state with netif_carrier_off() - * somewhere, too --jgarzik - * - * smc_phy_configure() and smc_10bt_check_media() does that. --rmk - */ netif_start_queue(dev); return 0; } @@ -1507,10 +1534,17 @@ netif_carrier_off(dev); /* clear everything */ - smc_shutdown(dev->base_addr); + smc_shutdown(dev); - if (lp->phy_type != 0) + if (lp->phy_type != 0) { + flush_scheduled_work(); smc_phy_powerdown(dev, lp->mii.phy_id); + } + + if (lp->pending_tx_skb) { + dev_kfree_skb(lp->pending_tx_skb); + lp->pending_tx_skb = NULL; + } return 0; } @@ -1800,6 +1834,7 @@ /* fill in some of the fields */ dev->base_addr = ioaddr; lp->version = revision_register & 0xff; + spin_lock_init(&lp->lock); /* Get the MAC address */ SMC_SELECT_BANK(1); @@ -1855,7 +1890,8 @@ dev->set_multicast_list = smc_set_multicast_list; dev->ethtool_ops = &smc_ethtool_ops; - spin_lock_init(&lp->lock); + tasklet_init(&lp->tx_task, smc_hardware_send_pkt, (unsigned long)dev); + INIT_WORK(&lp->phy_configure, smc_phy_configure, dev); lp->mii.phy_id_mask = 0x1f; lp->mii.reg_num_mask = 0x1f; lp->mii.force_media = 0; @@ -1885,9 +1921,8 @@ if (retval) goto err_out; -#if !defined(__m32r__) set_irq_type(dev->irq, IRQT_RISING); -#endif + #ifdef SMC_USE_PXA_DMA { int dma = pxa_request_dma(dev->name, DMA_PRIO_LOW, @@ -2121,7 +2156,7 @@ if (ndev && level == SUSPEND_DISABLE) { if (netif_running(ndev)) { netif_device_detach(ndev); - smc_shutdown(ndev->base_addr); + smc_shutdown(ndev); } } return 0; @@ -2134,15 +2169,12 @@ if (ndev && level == RESUME_ENABLE) { struct smc_local *lp = netdev_priv(ndev); - unsigned long ioaddr = ndev->base_addr; if (pdev->num_resources == 3) smc_enable_device(pdev->resource[2].start); if (netif_running(ndev)) { smc_reset(ndev); smc_enable(ndev); - SMC_SELECT_BANK(1); - SMC_SET_MAC_ADDR(ndev->dev_addr); if (lp->phy_type != 0) smc_phy_configure(ndev); netif_device_attach(ndev); diff -Nru a/drivers/net/smc91x.h b/drivers/net/smc91x.h --- a/drivers/net/smc91x.h 2004-10-21 22:09:44 -04:00 +++ b/drivers/net/smc91x.h 2004-10-21 22:09:44 -04:00 @@ -173,6 +173,11 @@ #define SMC_insw(a, r, p, l) insw((a) + (r) - 0xa0000000, p, l) #define SMC_outsw(a, r, p, l) outsw((a) + (r) - 0xa0000000, p, l) +#define set_irq_type(irq, type) do {} while(0) + +#define RPC_LSA_DEFAULT RPC_LED_TX_RX +#define RPC_LSB_DEFAULT RPC_LED_100_10 + #else #define SMC_CAN_USE_8BIT 1 @@ -202,8 +207,9 @@ * different and probably not worth it for that reason, and not as critical * as RX which can overrun memory and lose packets. */ -#include +#include #include +#include #ifdef SMC_insl #undef SMC_insl @@ -223,19 +229,21 @@ /* 64 bit alignment is required for memory to memory DMA */ if ((long)buf & 4) { - *((u32 *)buf)++ = SMC_inl(ioaddr, reg); + *((u32 *)buf) = SMC_inl(ioaddr, reg); + buf += 4; len--; } len *= 4; - dmabuf = dma_map_single(NULL, buf, len, PCI_DMA_FROMDEVICE); + dmabuf = dma_map_single(NULL, buf, len, DMA_FROM_DEVICE); DCSR(dma) = DCSR_NODESC; DTADR(dma) = dmabuf; DSADR(dma) = physaddr + reg; DCMD(dma) = (DCMD_INCTRGADDR | DCMD_BURST32 | DCMD_WIDTH4 | (DCMD_LENGTH & len)); DCSR(dma) = DCSR_NODESC | DCSR_RUN; - while (!(DCSR(dma) & DCSR_STOPSTATE)); + while (!(DCSR(dma) & DCSR_STOPSTATE)) + cpu_relax(); DCSR(dma) = 0; dma_unmap_single(NULL, dmabuf, len, PCI_DMA_FROMDEVICE); } @@ -259,7 +267,8 @@ /* 64 bit alignment is required for memory to memory DMA */ while ((long)buf & 6) { - *((u16 *)buf)++ = SMC_inw(ioaddr, reg); + *((u16 *)buf) = SMC_inw(ioaddr, reg); + buf += 2; len--; } @@ -271,9 +280,10 @@ DCMD(dma) = (DCMD_INCTRGADDR | DCMD_BURST32 | DCMD_WIDTH2 | (DCMD_LENGTH & len)); DCSR(dma) = DCSR_NODESC | DCSR_RUN; - while (!(DCSR(dma) & DCSR_STOPSTATE)); + while (!(DCSR(dma) & DCSR_STOPSTATE)) + cpu_relax(); DCSR(dma) = 0; - dma_unmap_single(NULL, dmabuf, len, PCI_DMA_FROMDEVICE); + dma_unmap_single(NULL, dmabuf, len, DMA_FROM_DEVICE); } #endif @@ -762,16 +772,9 @@ SMC_outw( addr[4]|(addr[5] << 8), ioaddr, ADDR2_REG ); \ } while (0) -#define SMC_CLEAR_MCAST() \ - do { \ - SMC_outw( 0, ioaddr, MCAST_REG1 ); \ - SMC_outw( 0, ioaddr, MCAST_REG2 ); \ - SMC_outw( 0, ioaddr, MCAST_REG3 ); \ - SMC_outw( 0, ioaddr, MCAST_REG4 ); \ - } while (0) #define SMC_SET_MCAST(x) \ do { \ - unsigned char *mt = (x); \ + const unsigned char *mt = (x); \ SMC_outw( mt[0] | (mt[1] << 8), ioaddr, MCAST_REG1 ); \ SMC_outw( mt[2] | (mt[3] << 8), ioaddr, MCAST_REG2 ); \ SMC_outw( mt[4] | (mt[5] << 8), ioaddr, MCAST_REG3 ); \ diff -Nru a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c --- a/drivers/net/tokenring/lanstreamer.c 2004-10-21 22:09:44 -04:00 +++ b/drivers/net/tokenring/lanstreamer.c 2004-10-21 22:09:44 -04:00 @@ -1606,7 +1606,7 @@ i += 2; } - memcpy_fromio(skb_put(mac_frame, buffer_len), + memcpy(skb_put(mac_frame, buffer_len), frame_data, buffer_len); } while (next_ptr && (buff_off = next_ptr)); diff -Nru a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c --- a/drivers/net/tulip/dmfe.c 2004-10-21 22:09:44 -04:00 +++ b/drivers/net/tulip/dmfe.c 2004-10-21 22:09:44 -04:00 @@ -92,6 +92,7 @@ #include #include #include +#include /* Board/System/Debug information/definition ---------------- */ diff -Nru a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c --- a/drivers/net/via-rhine.c 2004-10-21 22:09:44 -04:00 +++ b/drivers/net/via-rhine.c 2004-10-21 22:09:44 -04:00 @@ -1957,6 +1957,7 @@ rhine_shutdown(&pdev->dev); spin_unlock_irqrestore(&rp->lock, flags); + free_irq(dev->irq, dev); return 0; } @@ -1969,6 +1970,9 @@ if (!netif_running(dev)) return 0; + + if (request_irq(dev->irq, rhine_interrupt, SA_SHIRQ, dev->name, dev)) + printk(KERN_ERR "via-rhine %s: request_irq failed\n", dev->name); ret = pci_set_power_state(pdev, 0); if (debug > 1) diff -Nru a/drivers/net/wireless/prism54/isl_38xx.c b/drivers/net/wireless/prism54/isl_38xx.c --- a/drivers/net/wireless/prism54/isl_38xx.c 2004-10-21 22:09:44 -04:00 +++ b/drivers/net/wireless/prism54/isl_38xx.c 2004-10-21 22:09:44 -04:00 @@ -133,8 +133,8 @@ readl(device_base + ISL38XX_CTRL_STAT_REG)); udelay(ISL38XX_WRITEIO_DELAY); - if (reg = readl(device_base + ISL38XX_INT_IDENT_REG), - reg == 0xabadface) { + reg = readl(device_base + ISL38XX_INT_IDENT_REG); + if (reg == 0xabadface) { #if VERBOSE > SHOW_ERROR_MESSAGES do_gettimeofday(¤t_time); DEBUG(SHOW_TRACING, @@ -192,10 +192,8 @@ void isl38xx_interface_reset(void __iomem *device_base, dma_addr_t host_address) { - u32 reg; - #if VERBOSE > SHOW_ERROR_MESSAGES - DEBUG(SHOW_FUNCTION_CALLS, "isl38xx_interface_reset \n"); + DEBUG(SHOW_FUNCTION_CALLS, "isl38xx_interface_reset\n"); #endif /* load the address of the control block in the device */ @@ -203,8 +201,7 @@ udelay(ISL38XX_WRITEIO_DELAY); /* set the reset bit in the Device Interrupt Register */ - isl38xx_w32_flush(device_base, ISL38XX_DEV_INT_RESET, - ISL38XX_DEV_INT_REG); + isl38xx_w32_flush(device_base, ISL38XX_DEV_INT_RESET, ISL38XX_DEV_INT_REG); udelay(ISL38XX_WRITEIO_DELAY); /* enable the interrupt for detecting initialization */ @@ -212,9 +209,7 @@ /* Note: Do not enable other interrupts here. We want the * device to have come up first 100% before allowing any other * interrupts. */ - reg = ISL38XX_INT_IDENT_INIT; - - isl38xx_w32_flush(device_base, reg, ISL38XX_INT_EN_REG); + isl38xx_w32_flush(device_base, ISL38XX_INT_IDENT_INIT, ISL38XX_INT_EN_REG); udelay(ISL38XX_WRITEIO_DELAY); /* allow complete full reset */ } diff -Nru a/drivers/net/wireless/prism54/isl_38xx.h b/drivers/net/wireless/prism54/isl_38xx.h --- a/drivers/net/wireless/prism54/isl_38xx.h 2004-10-21 22:09:44 -04:00 +++ b/drivers/net/wireless/prism54/isl_38xx.h 2004-10-21 22:09:44 -04:00 @@ -95,6 +95,10 @@ #define ISL38XX_INT_SOURCES 0x001E /* Control/Status register bits */ +/* Looks like there are other meaningful bits + 0x20004400 seen in normal operation, + 0x200044db at 'timeout waiting for mgmt response' +*/ #define ISL38XX_CTRL_STAT_SLEEPMODE 0x00000200 #define ISL38XX_CTRL_STAT_CLKRUN 0x00800000 #define ISL38XX_CTRL_STAT_RESET 0x10000000 diff -Nru a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c --- a/drivers/net/wireless/prism54/isl_ioctl.c 2004-10-21 22:09:44 -04:00 +++ b/drivers/net/wireless/prism54/isl_ioctl.c 2004-10-21 22:09:44 -04:00 @@ -36,38 +36,6 @@ #include /* New driver API */ -static int init_mode = CARD_DEFAULT_IW_MODE; -static int init_channel = CARD_DEFAULT_CHANNEL; -static int init_wep = CARD_DEFAULT_WEP; -static int init_filter = CARD_DEFAULT_FILTER; -static int init_authen = CARD_DEFAULT_AUTHEN; -static int init_dot1x = CARD_DEFAULT_DOT1X; -static int init_conformance = CARD_DEFAULT_CONFORMANCE; -static int init_mlme = CARD_DEFAULT_MLME_MODE; - -module_param(init_mode, int, 0); -MODULE_PARM_DESC(init_mode, - "Set card mode:\n0: Auto\n1: Ad-Hoc\n2: Managed Client (Default)\n3: Master / Access Point\n4: Repeater (Not supported yet)\n5: Secondary (Not supported yet)\n6: Monitor"); - -module_param(init_channel, int, 0); -MODULE_PARM_DESC(init_channel, - "Check `iwpriv ethx channel` for available channels"); - -module_param(init_wep, int, 0); -module_param(init_filter, int, 0); - -module_param(init_authen, int, 0); -MODULE_PARM_DESC(init_authen, - "Authentication method. Can be of seven types:\n0 0x0000: None\n1 0x0001: DOT11_AUTH_OS (Default)\n2 0x0002: DOT11_AUTH_SK\n3 0x0003: DOT11_AUTH_BOTH"); - -module_param(init_dot1x, int, 0); -MODULE_PARM_DESC(init_dot1x, - "\n0: None/not set (Default)\n1: DOT11_DOT1X_AUTHENABLED\n2: DOT11_DOT1X_KEYTXENABLED"); - -module_param(init_mlme, int, 0); -MODULE_PARM_DESC(init_mlme, - "Sets the MAC layer management entity (MLME) mode of operation,\n0: DOT11_MLME_AUTO (Default)\n1: DOT11_MLME_INTERMEDIATE\n2: DOT11_MLME_EXTENDED"); - /** * prism54_mib_mode_helper - MIB change mode helper function * @mib: the &struct islpci_mib object to modify @@ -141,36 +109,34 @@ void prism54_mib_init(islpci_private *priv) { - u32 t; + u32 channel, authen, wep, filter, dot1x, mlme, conformance, power, mode; struct obj_buffer psm_buffer = { .size = PSM_BUFFER_SIZE, .addr = priv->device_psm_buffer }; - mgt_set(priv, DOT11_OID_CHANNEL, &init_channel); - mgt_set(priv, DOT11_OID_AUTHENABLE, &init_authen); - mgt_set(priv, DOT11_OID_PRIVACYINVOKED, &init_wep); - + channel = CARD_DEFAULT_CHANNEL; + authen = CARD_DEFAULT_AUTHEN; + wep = CARD_DEFAULT_WEP; + filter = CARD_DEFAULT_FILTER; /* (0) Do not filter un-encrypted data */ + dot1x = CARD_DEFAULT_DOT1X; + mlme = CARD_DEFAULT_MLME_MODE; + conformance = CARD_DEFAULT_CONFORMANCE; + power = 127; + mode = CARD_DEFAULT_IW_MODE; + + mgt_set(priv, DOT11_OID_CHANNEL, &channel); + mgt_set(priv, DOT11_OID_AUTHENABLE, &authen); + mgt_set(priv, DOT11_OID_PRIVACYINVOKED, &wep); mgt_set(priv, DOT11_OID_PSMBUFFER, &psm_buffer); - mgt_set(priv, DOT11_OID_EXUNENCRYPTED, &init_filter); - mgt_set(priv, DOT11_OID_DOT1XENABLE, &init_dot1x); - mgt_set(priv, DOT11_OID_MLMEAUTOLEVEL, &init_mlme); - mgt_set(priv, OID_INL_DOT11D_CONFORMANCE, &init_conformance); - - t = 127; - mgt_set(priv, OID_INL_OUTPUTPOWER, &t); - - /* Important: we are setting a default wireless mode and we are - * forcing a valid one, so prism54_mib_mode_helper should just set - * mib values depending on what the wireless mode given is. No need - * for it save old values */ - if (init_mode > IW_MODE_MONITOR || init_mode < IW_MODE_AUTO) { - printk(KERN_DEBUG "%s(): You passed a non-valid init_mode. " - "Using default mode\n", __FUNCTION__); - init_mode = CARD_DEFAULT_IW_MODE; - } + mgt_set(priv, DOT11_OID_EXUNENCRYPTED, &filter); + mgt_set(priv, DOT11_OID_DOT1XENABLE, &dot1x); + mgt_set(priv, DOT11_OID_MLMEAUTOLEVEL, &mlme); + mgt_set(priv, OID_INL_DOT11D_CONFORMANCE, &conformance); + mgt_set(priv, OID_INL_OUTPUTPOWER, &power); + /* This sets all of the mode-dependent values */ - prism54_mib_mode_helper(priv, init_mode); + prism54_mib_mode_helper(priv, mode); } /* this will be executed outside of atomic context thanks to @@ -374,7 +340,10 @@ mgt_set(priv, DOT11_OID_MLMEAUTOLEVEL, &mlmeautolevel); - mgt_commit(priv); + if (mgt_commit(priv)) { + up_write(&priv->mib_sem); + return -EIO; + } priv->ndev->type = (priv->iw_mode == IW_MODE_MONITOR) ? priv->monitor_type : ARPHRD_ETHER; up_write(&priv->mib_sem); @@ -485,6 +454,15 @@ /* txpower is supported in dBm's */ range->txpower_capa = IW_TXPOW_DBM; +#if WIRELESS_EXT > 16 + /* Event capability (kernel + driver) */ + range->event_capa[0] = (IW_EVENT_CAPA_K_0 | + IW_EVENT_CAPA_MASK(SIOCGIWTHRSPY) | + IW_EVENT_CAPA_MASK(SIOCGIWAP)); + range->event_capa[1] = IW_EVENT_CAPA_K_1; + range->event_capa[4] = IW_EVENT_CAPA_MASK(IWEVCUSTOM); +#endif /* WIRELESS_EXT > 16 */ + if (islpci_get_state(priv) < PRV_STATE_INIT) return 0; @@ -629,8 +607,8 @@ current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, NULL); /* Add frequency. (short) bss->channel is the frequency in MHz */ - iwe.u.freq.m = channel_of_freq(bss->channel); - iwe.u.freq.e = 0; + iwe.u.freq.m = bss->channel; + iwe.u.freq.e = 6; iwe.cmd = SIOCGIWFREQ; current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_FREQ_LEN); @@ -690,19 +668,33 @@ rvalue = mgt_get_request(priv, DOT11_OID_NOISEFLOOR, 0, NULL, &r); noise = r.u; - /* Ask the device for a list of known bss. We can report at most - * IW_MAX_AP=64 to the range struct. But the device won't repport anything - * if you change the value of IWMAX_BSS=24. - */ + /* Ask the device for a list of known bss. + * The old API, using SIOCGIWAPLIST, had a hard limit of IW_MAX_AP=64. + * The new API, using SIOCGIWSCAN, is only limited by the buffer size. + * WE-14->WE-16, the buffer is limited to IW_SCAN_MAX_DATA bytes. + * Starting with WE-17, the buffer can be as big as needed. + * But the device won't repport anything if you change the value + * of IWMAX_BSS=24. */ + rvalue |= mgt_get_request(priv, DOT11_OID_BSSLIST, 0, NULL, &r); bsslist = r.ptr; /* ok now, scan the list and translate its info */ - for (i = 0; i < min(IW_MAX_AP, (int) bsslist->nr); i++) + for (i = 0; i < (int) bsslist->nr; i++) { current_ev = prism54_translate_bss(ndev, current_ev, - extra + IW_SCAN_MAX_DATA, + extra + dwrq->length, &(bsslist->bsslist[i]), noise); +#if WIRELESS_EXT > 16 + /* Check if there is space for one more entry */ + if((extra + dwrq->length - current_ev) <= IW_EV_ADDR_LEN) { + /* Ask user space to try again with a bigger buffer */ + rvalue = -E2BIG; + break; + } +#endif /* WIRELESS_EXT > 16 */ + } + kfree(bsslist); dwrq->length = (current_ev - extra); dwrq->flags = 0; /* todo */ @@ -1412,7 +1404,10 @@ mlmeautolevel = DOT11_MLME_EXTENDED; mgt_set(priv, DOT11_OID_MLMEAUTOLEVEL, &mlmeautolevel); /* restart the card with our new policy */ - mgt_commit(priv); + if (mgt_commit(priv)) { + up_write(&priv->mib_sem); + return -EIO; + } up_write(&priv->mib_sem); return 0; @@ -1746,11 +1741,13 @@ char *data) { struct obj_mlme *mlme = (struct obj_mlme *) data; - size_t len; - u8 *payload, *pos = (u8 *) (mlme + 1); - - len = pos[0] | (pos[1] << 8); /* little endian data length */ - payload = pos + 2; + struct obj_mlmeex *mlmeex = (struct obj_mlmeex *) data; + struct obj_mlmeex *confirm; + u8 wpa_ie[MAX_WPA_IE_LEN]; + int wpa_ie_len; + size_t len = 0; /* u16, better? */ + u8 *payload = 0, *pos = 0; + int ret; /* I think all trapable objects are listed here. * Some oids have a EX version. The difference is that they are emitted @@ -1760,9 +1757,14 @@ * suited. We use the more flexible custom event facility. */ + if (oid >= DOT11_OID_BEACON) { + len = mlmeex->size; + payload = pos = mlmeex->data; + } + /* I fear prism54_process_bss_data won't work with big endian data */ if ((oid == DOT11_OID_BEACON) || (oid == DOT11_OID_PROBE)) - prism54_process_bss_data(priv, oid, mlme->address, + prism54_process_bss_data(priv, oid, mlmeex->address, payload, len); mgt_le_to_cpu(isl_oid[oid].flags & OID_FLAG_TYPE, (void *) mlme); @@ -1822,21 +1824,134 @@ case DOT11_OID_AUTHENTICATEEX: handle_request(priv, mlme, oid); - send_formatted_event(priv, "Authenticate request", mlme, 1); + send_formatted_event(priv, "Authenticate request (ex)", mlme, 1); + + if (priv->iw_mode != IW_MODE_MASTER + && mlmeex->state != DOT11_STATE_AUTHING) + break; + + confirm = kmalloc(sizeof(struct obj_mlmeex) + 6, GFP_ATOMIC); + + if (!confirm) + break; + + memcpy(&confirm->address, mlmeex->address, ETH_ALEN); + printk(KERN_DEBUG "Authenticate from: address:\t%02x:%02x:%02x:%02x:%02x:%02x\n", + mlmeex->address[0], + mlmeex->address[1], + mlmeex->address[2], + mlmeex->address[3], + mlmeex->address[4], + mlmeex->address[5] + ); + confirm->id = -1; /* or mlmeex->id ? */ + confirm->state = 0; /* not used */ + confirm->code = 0; + confirm->size = 6; + confirm->data[0] = 0x00; + confirm->data[1] = 0x00; + confirm->data[2] = 0x02; + confirm->data[3] = 0x00; + confirm->data[4] = 0x00; + confirm->data[5] = 0x00; + + ret = mgt_set_varlen(priv, DOT11_OID_ASSOCIATEEX, confirm, 6); + + kfree(confirm); + if (ret) + return ret; break; case DOT11_OID_DISASSOCIATEEX: - send_formatted_event(priv, "Disassociate request", mlme, 0); + send_formatted_event(priv, "Disassociate request (ex)", mlme, 0); break; case DOT11_OID_ASSOCIATEEX: handle_request(priv, mlme, oid); - send_formatted_event(priv, "Associate request", mlme, 1); + send_formatted_event(priv, "Associate request (ex)", mlme, 1); + + if (priv->iw_mode != IW_MODE_MASTER + && mlmeex->state != DOT11_STATE_AUTHING) + break; + + confirm = kmalloc(sizeof(struct obj_mlmeex), GFP_ATOMIC); + + if (!confirm) + break; + + memcpy(&confirm->address, mlmeex->address, ETH_ALEN); + + confirm->id = ((struct obj_mlmeex *)mlme)->id; + confirm->state = 0; /* not used */ + confirm->code = 0; + + wpa_ie_len = prism54_wpa_ie_get(priv, mlmeex->address, wpa_ie); + + if (!wpa_ie_len) { + printk(KERN_DEBUG "No WPA IE found from " + "address:\t%02x:%02x:%02x:%02x:%02x:%02x\n", + mlmeex->address[0], + mlmeex->address[1], + mlmeex->address[2], + mlmeex->address[3], + mlmeex->address[4], + mlmeex->address[5] + ); + kfree(confirm); + break; + } + + confirm->size = wpa_ie_len; + memcpy(&confirm->data, wpa_ie, wpa_ie_len); + + mgt_set_varlen(priv, oid, confirm, wpa_ie_len); + + kfree(confirm); + break; case DOT11_OID_REASSOCIATEEX: handle_request(priv, mlme, oid); - send_formatted_event(priv, "Reassociate request", mlme, 1); + send_formatted_event(priv, "Reassociate request (ex)", mlme, 1); + + if (priv->iw_mode != IW_MODE_MASTER + && mlmeex->state != DOT11_STATE_ASSOCING) + break; + + confirm = kmalloc(sizeof(struct obj_mlmeex), GFP_ATOMIC); + + if (!confirm) + break; + + memcpy(&confirm->address, mlmeex->address, ETH_ALEN); + + confirm->id = mlmeex->id; + confirm->state = 0; /* not used */ + confirm->code = 0; + + wpa_ie_len = prism54_wpa_ie_get(priv, mlmeex->address, wpa_ie); + + if (!wpa_ie_len) { + printk(KERN_DEBUG "No WPA IE found from " + "address:\t%02x:%02x:%02x:%02x:%02x:%02x\n", + mlmeex->address[0], + mlmeex->address[1], + mlmeex->address[2], + mlmeex->address[3], + mlmeex->address[4], + mlmeex->address[5] + ); + kfree(confirm); + break; + } + + confirm->size = wpa_ie_len; + memcpy(&confirm->data, wpa_ie, wpa_ie_len); + + mgt_set_varlen(priv, oid, confirm, wpa_ie_len); + + kfree(confirm); + break; default: @@ -1879,23 +1994,367 @@ return ret; } +/* Note: currently, use hostapd ioctl from the Host AP driver for WPA + * support. This is to be replaced with Linux wireless extensions once they + * get WPA support. */ + +/* Note II: please leave all this together as it will be easier to remove later, + * once wireless extensions add WPA support -mcgrof */ + +/* PRISM54_HOSTAPD ioctl() cmd: */ +enum { + PRISM2_SET_ENCRYPTION = 6, + PRISM2_HOSTAPD_SET_GENERIC_ELEMENT = 12, + PRISM2_HOSTAPD_MLME = 13, + PRISM2_HOSTAPD_SCAN_REQ = 14, +}; + +#define PRISM54_SET_WPA SIOCIWFIRSTPRIV+12 +#define PRISM54_HOSTAPD SIOCIWFIRSTPRIV+25 +#define PRISM54_DROP_UNENCRYPTED SIOCIWFIRSTPRIV+26 + +#define PRISM2_HOSTAPD_MAX_BUF_SIZE 1024 +#define PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN \ +((int) (&((struct prism2_hostapd_param *) 0)->u.generic_elem.data)) + +/* Maximum length for algorithm names (-1 for nul termination) + * used in ioctl() */ +#define HOSTAP_CRYPT_ALG_NAME_LEN 16 + +struct prism2_hostapd_param { + u32 cmd; + u8 sta_addr[ETH_ALEN]; + union { + struct { + u8 alg[HOSTAP_CRYPT_ALG_NAME_LEN]; + u32 flags; + u32 err; + u8 idx; + u8 seq[8]; /* sequence counter (set: RX, get: TX) */ + u16 key_len; + u8 key[0]; + } crypt; + struct { + u8 len; + u8 data[0]; + } generic_elem; + struct { +#define MLME_STA_DEAUTH 0 +#define MLME_STA_DISASSOC 1 + u16 cmd; + u16 reason_code; + } mlme; + struct { + u8 ssid_len; + u8 ssid[32]; + } scan_req; + } u; +}; + + +static int +prism2_ioctl_set_encryption(struct net_device *dev, + struct prism2_hostapd_param *param, + int param_len) +{ + islpci_private *priv = netdev_priv(dev); + int rvalue = 0, force = 0; + int authen = DOT11_AUTH_OS, invoke = 0, exunencrypt = 0; + union oid_res_t r; + + /* with the new API, it's impossible to get a NULL pointer. + * New version of iwconfig set the IW_ENCODE_NOKEY flag + * when no key is given, but older versions don't. */ + + if (param->u.crypt.key_len > 0) { + /* we have a key to set */ + int index = param->u.crypt.idx; + int current_index; + struct obj_key key = { DOT11_PRIV_TKIP, 0, "" }; + + /* get the current key index */ + rvalue = mgt_get_request(priv, DOT11_OID_DEFKEYID, 0, NULL, &r); + current_index = r.u; + /* Verify that the key is not marked as invalid */ + if (!(param->u.crypt.flags & IW_ENCODE_NOKEY)) { + key.length = param->u.crypt.key_len > sizeof (param->u.crypt.key) ? + sizeof (param->u.crypt.key) : param->u.crypt.key_len; + memcpy(key.key, param->u.crypt.key, key.length); + if (key.length == 32) + /* we want WPA-PSK */ + key.type = DOT11_PRIV_TKIP; + if ((index < 0) || (index > 3)) + /* no index provided use the current one */ + index = current_index; + + /* now send the key to the card */ + rvalue |= + mgt_set_request(priv, DOT11_OID_DEFKEYX, index, + &key); + } + /* + * If a valid key is set, encryption should be enabled + * (user may turn it off later). + * This is also how "iwconfig ethX key on" works + */ + if ((index == current_index) && (key.length > 0)) + force = 1; + } else { + int index = (param->u.crypt.flags & IW_ENCODE_INDEX) - 1; + if ((index >= 0) && (index <= 3)) { + /* we want to set the key index */ + rvalue |= + mgt_set_request(priv, DOT11_OID_DEFKEYID, 0, + &index); + } else { + if (!param->u.crypt.flags & IW_ENCODE_MODE) { + /* we cannot do anything. Complain. */ + return -EINVAL; + } + } + } + /* now read the flags */ + if (param->u.crypt.flags & IW_ENCODE_DISABLED) { + /* Encoding disabled, + * authen = DOT11_AUTH_OS; + * invoke = 0; + * exunencrypt = 0; */ + } + if (param->u.crypt.flags & IW_ENCODE_OPEN) + /* Encode but accept non-encoded packets. No auth */ + invoke = 1; + if ((param->u.crypt.flags & IW_ENCODE_RESTRICTED) || force) { + /* Refuse non-encoded packets. Auth */ + authen = DOT11_AUTH_BOTH; + invoke = 1; + exunencrypt = 1; + } + /* do the change if requested */ + if ((param->u.crypt.flags & IW_ENCODE_MODE) || force) { + rvalue |= + mgt_set_request(priv, DOT11_OID_AUTHENABLE, 0, &authen); + rvalue |= + mgt_set_request(priv, DOT11_OID_PRIVACYINVOKED, 0, &invoke); + rvalue |= + mgt_set_request(priv, DOT11_OID_EXUNENCRYPTED, 0, + &exunencrypt); + } + return rvalue; +} + +static int +prism2_ioctl_set_generic_element(struct net_device *ndev, + struct prism2_hostapd_param *param, + int param_len) +{ + islpci_private *priv = netdev_priv(ndev); + int max_len, len, alen, ret=0; + struct obj_attachment *attach; + + len = param->u.generic_elem.len; + max_len = param_len - PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN; + if (max_len < 0 || max_len < len) + return -EINVAL; + + alen = sizeof(*attach) + len; + attach = kmalloc(alen, GFP_KERNEL); + if (attach == NULL) + return -ENOMEM; + + memset(attach, 0, alen); +#define WLAN_FC_TYPE_MGMT 0 +#define WLAN_FC_STYPE_ASSOC_REQ 0 +#define WLAN_FC_STYPE_REASSOC_REQ 2 + + /* Note: endianness is covered by mgt_set_varlen */ + + attach->type = (WLAN_FC_TYPE_MGMT << 2) | + (WLAN_FC_STYPE_ASSOC_REQ << 4); + attach->id = -1; + attach->size = len; + memcpy(attach->data, param->u.generic_elem.data, len); + + ret = mgt_set_varlen(priv, DOT11_OID_ATTACHMENT, attach, len); + + if (ret == 0) { + attach->type = (WLAN_FC_TYPE_MGMT << 2) | + (WLAN_FC_STYPE_REASSOC_REQ << 4); + + ret = mgt_set_varlen(priv, DOT11_OID_ATTACHMENT, attach, len); + + if (ret == 0) + printk(KERN_DEBUG "%s: WPA IE Attachment was set\n", + ndev->name); + } + + kfree(attach); + return ret; + +} + +static int +prism2_ioctl_mlme(struct net_device *dev, struct prism2_hostapd_param *param) +{ + return -EOPNOTSUPP; +} + +static int +prism2_ioctl_scan_req(struct net_device *ndev, + struct prism2_hostapd_param *param) +{ + islpci_private *priv = netdev_priv(ndev); + int i, rvalue; + struct obj_bsslist *bsslist; + u32 noise = 0; + char *extra = ""; + char *current_ev = "foo"; + union oid_res_t r; + + if (islpci_get_state(priv) < PRV_STATE_INIT) { + /* device is not ready, fail gently */ + return 0; + } + + /* first get the noise value. We will use it to report the link quality */ + rvalue = mgt_get_request(priv, DOT11_OID_NOISEFLOOR, 0, NULL, &r); + noise = r.u; + + /* Ask the device for a list of known bss. We can report at most + * IW_MAX_AP=64 to the range struct. But the device won't repport anything + * if you change the value of IWMAX_BSS=24. + */ + rvalue |= mgt_get_request(priv, DOT11_OID_BSSLIST, 0, NULL, &r); + bsslist = r.ptr; + + /* ok now, scan the list and translate its info */ + for (i = 0; i < min(IW_MAX_AP, (int) bsslist->nr); i++) + current_ev = prism54_translate_bss(ndev, current_ev, + extra + IW_SCAN_MAX_DATA, + &(bsslist->bsslist[i]), + noise); + kfree(bsslist); + + return rvalue; +} + +static int +prism54_hostapd(struct net_device *ndev, struct iw_point *p) +{ + struct prism2_hostapd_param *param; + int ret = 0; + u32 uwrq; + + printk(KERN_DEBUG "prism54_hostapd - len=%d\n", p->length); + if (p->length < sizeof(struct prism2_hostapd_param) || + p->length > PRISM2_HOSTAPD_MAX_BUF_SIZE || !p->pointer) + return -EINVAL; + + param = (struct prism2_hostapd_param *) kmalloc(p->length, GFP_KERNEL); + if (param == NULL) + return -ENOMEM; + + if (copy_from_user(param, p->pointer, p->length)) { + kfree(param); + return -EFAULT; + } + + switch (param->cmd) { + case PRISM2_SET_ENCRYPTION: + printk(KERN_DEBUG "%s: Caught WPA supplicant set encryption request\n", + ndev->name); + ret = prism2_ioctl_set_encryption(ndev, param, p->length); + break; + case PRISM2_HOSTAPD_SET_GENERIC_ELEMENT: + printk(KERN_DEBUG "%s: Caught WPA supplicant set WPA IE request\n", + ndev->name); + ret = prism2_ioctl_set_generic_element(ndev, param, + p->length); + break; + case PRISM2_HOSTAPD_MLME: + printk(KERN_DEBUG "%s: Caught WPA supplicant MLME request\n", + ndev->name); + ret = prism2_ioctl_mlme(ndev, param); + break; + case PRISM2_HOSTAPD_SCAN_REQ: + printk(KERN_DEBUG "%s: Caught WPA supplicant scan request\n", + ndev->name); + ret = prism2_ioctl_scan_req(ndev, param); + break; + case PRISM54_SET_WPA: + printk(KERN_DEBUG "%s: Caught WPA supplicant wpa init request\n", + ndev->name); + uwrq = 1; + ret = prism54_set_wpa(ndev, NULL, &uwrq, NULL); + break; + case PRISM54_DROP_UNENCRYPTED: + printk(KERN_DEBUG "%s: Caught WPA drop unencrypted request\n", + ndev->name); +#if 0 + uwrq = 0x01; + mgt_set(priv, DOT11_OID_EXUNENCRYPTED, &uwrq); + down_write(&priv->mib_sem); + mgt_commit(priv); + up_write(&priv->mib_sem); +#endif + /* Not necessary, as set_wpa does it, should we just do it here though? */ + ret = 0; + break; + default: + printk(KERN_DEBUG "%s: Caught a WPA supplicant request that is not supported\n", + ndev->name); + ret = -EOPNOTSUPP; + break; + } + + if (ret == 0 && copy_to_user(p->pointer, param, p->length)) + ret = -EFAULT; + + kfree(param); + + return ret; +} + int prism54_set_wpa(struct net_device *ndev, struct iw_request_info *info, __u32 * uwrq, char *extra) { islpci_private *priv = netdev_priv(ndev); + u32 mlme, authen, dot1x, filter, wep; - down_write(&priv->mib_sem); + if (islpci_get_state(priv) < PRV_STATE_INIT) + return 0; + + wep = 1; /* For privacy invoked */ + filter = 1; /* Filter out all unencrypted frames */ + dot1x = 0x01; /* To enable eap filter */ + mlme = DOT11_MLME_EXTENDED; + authen = DOT11_AUTH_OS; /* Only WEP uses _SK and _BOTH */ + down_write(&priv->mib_sem); priv->wpa = *uwrq; - if (priv->wpa) { - u32 l = DOT11_MLME_EXTENDED; - mgt_set(priv, DOT11_OID_MLMEAUTOLEVEL, &l); + + switch (priv->wpa) { + default: + case 0: /* Clears/disables WPA and friends */ + wep = 0; + filter = 0; /* Do not filter un-encrypted data */ + dot1x = 0; + mlme = DOT11_MLME_AUTO; + printk("%s: Disabling WPA\n", ndev->name); + break; + case 2: + case 1: /* WPA */ + printk("%s: Enabling WPA\n", ndev->name); + break; } - /* restart the card with new level. Needed ? */ - mgt_commit(priv); up_write(&priv->mib_sem); + mgt_set_request(priv, DOT11_OID_AUTHENABLE, 0, &authen); + mgt_set_request(priv, DOT11_OID_PRIVACYINVOKED, 0, &wep); + mgt_set_request(priv, DOT11_OID_EXUNENCRYPTED, 0, &filter); + mgt_set_request(priv, DOT11_OID_DOT1XENABLE, 0, &dot1x); + mgt_set_request(priv, DOT11_OID_MLMEAUTOLEVEL, 0, &mlme); + return 0; } @@ -1947,7 +2406,7 @@ struct iw_point *data, char *extra) { islpci_private *priv = netdev_priv(ndev); - struct islpci_mgmtframe *response = NULL; + struct islpci_mgmtframe *response; int ret = -EIO; printk("%s: get_oid 0x%08X\n", ndev->name, priv->priv_oid); @@ -1983,7 +2442,7 @@ struct iw_point *data, char *extra) { islpci_private *priv = netdev_priv(ndev); - struct islpci_mgmtframe *response = NULL; + struct islpci_mgmtframe *response; int ret = 0, response_op = PIMFOR_OP_ERROR; printk("%s: set_oid 0x%08X\tlen: %d\n", ndev->name, priv->priv_oid, @@ -2256,14 +2715,24 @@ .standard = (iw_handler *) prism54_handler, .private = (iw_handler *) prism54_private_handler, .private_args = (struct iw_priv_args *) prism54_private_args, +#if WIRELESS_EXT == 16 .spy_offset = offsetof(islpci_private, spy_data), +#endif /* WIRELESS_EXT == 16 */ }; -/* For ioctls that don't work with the new API */ +/* For wpa_supplicant */ int prism54_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd) { - + struct iwreq *wrq = (struct iwreq *) rq; + int ret = -1; + switch (cmd) { + case PRISM54_HOSTAPD: + if (!capable(CAP_NET_ADMIN)) + return -EPERM; + ret = prism54_hostapd(ndev, &wrq->u.data); + return ret; + } return -EOPNOTSUPP; } diff -Nru a/drivers/net/wireless/prism54/isl_ioctl.h b/drivers/net/wireless/prism54/isl_ioctl.h --- a/drivers/net/wireless/prism54/isl_ioctl.h 2004-10-21 22:09:44 -04:00 +++ b/drivers/net/wireless/prism54/isl_ioctl.h 2004-10-21 22:09:44 -04:00 @@ -48,6 +48,8 @@ int prism54_set_mac_address(struct net_device *, void *); int prism54_ioctl(struct net_device *, struct ifreq *, int); +int prism54_set_wpa(struct net_device *, struct iw_request_info *, + __u32 *, char *); extern const struct iw_handler_def prism54_handler_def; diff -Nru a/drivers/net/wireless/prism54/isl_oid.h b/drivers/net/wireless/prism54/isl_oid.h --- a/drivers/net/wireless/prism54/isl_oid.h 2004-10-21 22:09:44 -04:00 +++ b/drivers/net/wireless/prism54/isl_oid.h 2004-10-21 22:09:44 -04:00 @@ -91,6 +91,14 @@ u16 mhz[0]; } __attribute__ ((packed)); +struct obj_attachment { + char type; + char reserved; + short id; + short size; + char data[0]; +} __attribute__((packed)); + /* * in case everything's ok, the inlined function below will be * optimized away by the compiler... @@ -472,6 +480,7 @@ #define OID_TYPE_MLMEEX 0x09 #define OID_TYPE_ADDR 0x0A #define OID_TYPE_RAW 0x0B +#define OID_TYPE_ATTACH 0x0C /* OID_TYPE_MLMEEX is special because of a variable size field when sending. * Not yet implemented (not used in driver anyway). diff -Nru a/drivers/net/wireless/prism54/islpci_dev.c b/drivers/net/wireless/prism54/islpci_dev.c --- a/drivers/net/wireless/prism54/islpci_dev.c 2004-10-21 22:09:44 -04:00 +++ b/drivers/net/wireless/prism54/islpci_dev.c 2004-10-21 22:09:44 -04:00 @@ -105,7 +105,7 @@ "%s: firmware '%s' size is not multiple of 32bit, aborting!\n", "prism54", priv->firmware); release_firmware(fw_entry); - return EILSEQ; /* Illegal byte sequence */; + return -EILSEQ; /* Illegal byte sequence */; } while (fw_len > 0) { @@ -142,6 +142,10 @@ BUG_ON(fw_len != 0); + /* Firmware version is at offset 40 (also for "newmac") */ + printk(KERN_DEBUG "%s: firmware version: %.8s\n", + priv->ndev->name, fw_entry->data + 40); + release_firmware(fw_entry); } @@ -375,8 +379,6 @@ u32 rc; islpci_private *priv = netdev_priv(ndev); - printk(KERN_DEBUG "%s: islpci_open()\n", ndev->name); - /* reset data structures, upload firmware and reset device */ rc = islpci_reset(priv,1); if (rc) { @@ -462,8 +464,7 @@ return rc; } - printk(KERN_DEBUG - "%s: firmware uploaded done, now triggering reset...\n", + printk(KERN_DEBUG "%s: firmware upload complete\n", priv->ndev->name); islpci_set_state(priv, PRV_STATE_POSTBOOT); @@ -489,6 +490,7 @@ /* The software reset acknowledge needs about 220 msec here. * Be conservative and wait for up to one second. */ + set_current_state(TASK_UNINTERRUPTIBLE); remaining = schedule_timeout(HZ); if(remaining > 0) { @@ -499,15 +501,16 @@ /* If we're here it's because our IRQ hasn't yet gone through. * Retry a bit more... */ - printk(KERN_ERR "%s: device soft reset timed out\n", - priv->ndev->name); - + printk(KERN_ERR "%s: no 'reset complete' IRQ seen - retrying\n", + priv->ndev->name); } finish_wait(&priv->reset_done, &wait); - if(result) + if (result) { + printk(KERN_ERR "%s: interface reset failure\n", priv->ndev->name); return result; + } islpci_set_state(priv, PRV_STATE_INIT); @@ -519,11 +522,17 @@ isl38xx_enable_common_interrupts(priv->device_base); down_write(&priv->mib_sem); - mgt_commit(priv); + result = mgt_commit(priv); + if (result) { + printk(KERN_ERR "%s: interface reset failure\n", priv->ndev->name); + up_write(&priv->mib_sem); + return result; + } up_write(&priv->mib_sem); islpci_set_state(priv, PRV_STATE_READY); + printk(KERN_DEBUG "%s: interface reset complete\n", priv->ndev->name); return 0; } @@ -584,18 +593,18 @@ /* now that the data structures are cleaned up, upload * firmware and reset interface */ rc = islpci_upload_fw(priv); - if (rc) + if (rc) { + printk(KERN_ERR "%s: islpci_reset: failure\n", + priv->ndev->name); return rc; + } } /* finally reset interface */ rc = islpci_reset_if(priv); - if (!rc) /* If successful */ - return rc; - - printk(KERN_DEBUG "prism54: Your card/socket may be faulty, or IRQ line too busy :(\n"); + if (rc) + printk(KERN_ERR "prism54: Your card/socket may be faulty, or IRQ line too busy :(\n"); return rc; - } struct net_device_stats * @@ -604,7 +613,7 @@ islpci_private *priv = netdev_priv(ndev); #if VERBOSE > SHOW_ERROR_MESSAGES - DEBUG(SHOW_FUNCTION_CALLS, "islpci_statistics \n"); + DEBUG(SHOW_FUNCTION_CALLS, "islpci_statistics\n"); #endif return &priv->statistics; @@ -829,6 +838,12 @@ priv->monitor_type = ARPHRD_IEEE80211; priv->ndev->type = (priv->iw_mode == IW_MODE_MONITOR) ? priv->monitor_type : ARPHRD_ETHER; + +#if WIRELESS_EXT > 16 + /* Add pointers to enable iwspy support. */ + priv->wireless_data.spy_data = &priv->spy_data; + ndev->wireless_data = &priv->wireless_data; +#endif /* WIRELESS_EXT > 16 */ /* save the start and end address of the PCI memory area */ ndev->mem_start = (unsigned long) priv->device_base; diff -Nru a/drivers/net/wireless/prism54/islpci_dev.h b/drivers/net/wireless/prism54/islpci_dev.h --- a/drivers/net/wireless/prism54/islpci_dev.h 2004-10-21 22:09:44 -04:00 +++ b/drivers/net/wireless/prism54/islpci_dev.h 2004-10-21 22:09:44 -04:00 @@ -100,6 +100,10 @@ struct iw_spy_data spy_data; /* iwspy support */ +#if WIRELESS_EXT > 16 + struct iw_public_data wireless_data; +#endif /* WIRELESS_EXT > 16 */ + int monitor_type; /* ARPHRD_IEEE80211 or ARPHRD_IEEE80211_PRISM */ struct islpci_acl acl; diff -Nru a/drivers/net/wireless/prism54/islpci_eth.c b/drivers/net/wireless/prism54/islpci_eth.c --- a/drivers/net/wireless/prism54/islpci_eth.c 2004-10-21 22:09:44 -04:00 +++ b/drivers/net/wireless/prism54/islpci_eth.c 2004-10-21 22:09:44 -04:00 @@ -508,11 +508,12 @@ /* increment the transmit error counter */ statistics->tx_errors++; + printk(KERN_WARNING "%s: tx_timeout", ndev->name); if (!priv->reset_task_pending) { priv->reset_task_pending = 1; + printk(", scheduling a reset"); netif_stop_queue(ndev); schedule_work(&priv->reset_task); } - - return; + printk("\n"); } diff -Nru a/drivers/net/wireless/prism54/islpci_hotplug.c b/drivers/net/wireless/prism54/islpci_hotplug.c --- a/drivers/net/wireless/prism54/islpci_hotplug.c 2004-10-21 22:09:44 -04:00 +++ b/drivers/net/wireless/prism54/islpci_hotplug.c 2004-10-21 22:09:44 -04:00 @@ -107,9 +107,6 @@ islpci_private *priv; int rvalue; - /* TRACE(DRV_NAME); */ - - /* Enable the pci device */ if (pci_enable_device(pdev)) { printk(KERN_ERR "%s: pci_enable_device() failed.\n", DRV_NAME); diff -Nru a/drivers/net/wireless/prism54/islpci_mgt.c b/drivers/net/wireless/prism54/islpci_mgt.c --- a/drivers/net/wireless/prism54/islpci_mgt.c 2004-10-21 22:09:44 -04:00 +++ b/drivers/net/wireless/prism54/islpci_mgt.c 2004-10-21 22:09:44 -04:00 @@ -473,6 +473,7 @@ int timeleft; struct islpci_mgmtframe *frame; + set_current_state(TASK_UNINTERRUPTIBLE); timeleft = schedule_timeout(wait_cycle_jiffies); frame = xchg(&priv->mgmt_received, NULL); if (frame) { diff -Nru a/drivers/net/wireless/prism54/islpci_mgt.h b/drivers/net/wireless/prism54/islpci_mgt.h --- a/drivers/net/wireless/prism54/islpci_mgt.h 2004-10-21 22:09:44 -04:00 +++ b/drivers/net/wireless/prism54/islpci_mgt.h 2004-10-21 22:09:44 -04:00 @@ -31,8 +31,6 @@ #define K_DEBUG(f, m, args...) do { if(f & m) printk(KERN_DEBUG args); } while(0) #define DEBUG(f, args...) K_DEBUG(f, pc_debug, args) -#define TRACE(devname) K_DEBUG(SHOW_TRACING, VERBOSE, "%s: -> " __FUNCTION__ "()\n", devname) - extern int pc_debug; #define init_wds 0 /* help compiler optimize away dead code */ diff -Nru a/drivers/net/wireless/prism54/oid_mgt.c b/drivers/net/wireless/prism54/oid_mgt.c --- a/drivers/net/wireless/prism54/oid_mgt.c 2004-10-21 22:09:44 -04:00 +++ b/drivers/net/wireless/prism54/oid_mgt.c 2004-10-21 22:09:44 -04:00 @@ -201,7 +201,8 @@ OID_U32(DOT11_OID_STATIMEOUT, 0x19000000), OID_U32_C(DOT11_OID_MLMEAUTOLEVEL, 0x19000001), OID_U32(DOT11_OID_BSSTIMEOUT, 0x19000002), - OID_UNKNOWN(DOT11_OID_ATTACHMENT, 0x19000003), + [DOT11_OID_ATTACHMENT] = {0x19000003, 0, + sizeof(struct obj_attachment), OID_TYPE_ATTACH}, OID_STRUCT_C(DOT11_OID_PSMBUFFER, 0x19000004, struct obj_buffer, OID_TYPE_BUFFER), @@ -329,6 +330,12 @@ mlme->size = le16_to_cpu(mlme->size); break; } + case OID_TYPE_ATTACH:{ + struct obj_attachment *attach = data; + attach->id = le16_to_cpu(attach->id); + attach->size = le16_to_cpu(attach->size);; + break; + } case OID_TYPE_SSID: case OID_TYPE_KEY: case OID_TYPE_ADDR: @@ -392,6 +399,12 @@ mlme->size = cpu_to_le16(mlme->size); break; } + case OID_TYPE_ATTACH:{ + struct obj_attachment *attach = data; + attach->id = cpu_to_le16(attach->id); + attach->size = cpu_to_le16(attach->size);; + break; + } case OID_TYPE_SSID: case OID_TYPE_KEY: case OID_TYPE_ADDR: @@ -465,6 +478,42 @@ return ret; } +/* None of these are cached */ +int +mgt_set_varlen(islpci_private *priv, enum oid_num_t n, void *data, int extra_len) +{ + int ret = 0; + struct islpci_mgmtframe *response; + int response_op = PIMFOR_OP_ERROR; + int dlen; + u32 oid; + + BUG_ON(OID_NUM_LAST <= n); + + dlen = isl_oid[n].size; + oid = isl_oid[n].oid; + + mgt_cpu_to_le(isl_oid[n].flags & OID_FLAG_TYPE, data); + + if (islpci_get_state(priv) >= PRV_STATE_READY) { + ret = islpci_mgt_transaction(priv->ndev, PIMFOR_OP_SET, oid, + data, dlen + extra_len, &response); + if (!ret) { + response_op = response->header->operation; + islpci_mgt_release(response); + } + if (ret || response_op == PIMFOR_OP_ERROR) + ret = -EIO; + } else + ret = -EIO; + + /* re-set given data to what it was */ + if (data) + mgt_le_to_cpu(isl_oid[n].flags & OID_FLAG_TYPE, data); + + return ret; +} + int mgt_get_request(islpci_private *priv, enum oid_num_t n, int extra, void *data, union oid_res_t *res) @@ -555,15 +604,18 @@ u32 oid = t->oid; BUG_ON(data == NULL); while (j <= t->range) { - response = NULL; - ret |= islpci_mgt_transaction(priv->ndev, PIMFOR_OP_SET, + int r = islpci_mgt_transaction(priv->ndev, PIMFOR_OP_SET, oid, data, t->size, &response); if (response) { - ret |= (response->header->operation == - PIMFOR_OP_ERROR); + r |= (response->header->operation == PIMFOR_OP_ERROR); islpci_mgt_release(response); } + if (r) + printk(KERN_ERR "%s: mgt_commit_list: failure. " + "oid=%08x err=%d\n", + priv->ndev->name, oid, r); + ret |= r; j++; oid++; data += t->size; @@ -624,7 +676,7 @@ static int mgt_update_addr(islpci_private *priv) { - struct islpci_mgmtframe *res = NULL; + struct islpci_mgmtframe *res; int ret; ret = islpci_mgt_transaction(priv->ndev, PIMFOR_OP_GET, @@ -638,26 +690,26 @@ if (res) islpci_mgt_release(res); + if (ret) + printk(KERN_ERR "%s: mgt_update_addr: failure\n", priv->ndev->name); return ret; } -void +#define VEC_SIZE(a) (sizeof(a)/sizeof(a[0])) + +int mgt_commit(islpci_private *priv) { int rvalue; u32 u; if (islpci_get_state(priv) < PRV_STATE_INIT) - return; + return 0; - rvalue = mgt_commit_list(priv, commit_part1, - sizeof (commit_part1) / - sizeof (commit_part1[0])); + rvalue = mgt_commit_list(priv, commit_part1, VEC_SIZE(commit_part1)); if (priv->iw_mode != IW_MODE_MONITOR) - rvalue |= mgt_commit_list(priv, commit_part2, - sizeof (commit_part2) / - sizeof (commit_part2[0])); + rvalue |= mgt_commit_list(priv, commit_part2, VEC_SIZE(commit_part2)); u = OID_INL_MODE; rvalue |= mgt_commit_list(priv, &u, 1); @@ -666,9 +718,43 @@ if (rvalue) { /* some request have failed. The device might be in an incoherent state. We should reset it ! */ - printk(KERN_DEBUG "%s: mgt_commit has failed. Restart the " - "device \n", priv->ndev->name); + printk(KERN_DEBUG "%s: mgt_commit: failure\n", priv->ndev->name); } + return rvalue; +} + +/* The following OIDs need to be "unlatched": + * + * MEDIUMLIMIT,BEACONPERIOD,DTIMPERIOD,ATIMWINDOW,LISTENINTERVAL + * FREQUENCY,EXTENDEDRATES. + * + * The way to do this is to set ESSID. Note though that they may get + * unlatch before though by setting another OID. */ +void +mgt_unlatch_all(islpci_private *priv) +{ + u32 u; + int rvalue = 0; + + if (islpci_get_state(priv) < PRV_STATE_INIT) + return; + + u = DOT11_OID_SSID; + rvalue = mgt_commit_list(priv, &u, 1); + /* Necessary if in MANUAL RUN mode? */ +#if 0 + u = OID_INL_MODE; + rvalue |= mgt_commit_list(priv, &u, 1); + + u = DOT11_OID_MLMEAUTOLEVEL; + rvalue |= mgt_commit_list(priv, &u, 1); + + u = OID_INL_MODE; + rvalue |= mgt_commit_list(priv, &u, 1); +#endif + + if (rvalue) + printk(KERN_DEBUG "%s: Unlatching OIDs failed\n", priv->ndev->name); } /* This will tell you if you are allowed to answer a mlme(ex) request .*/ @@ -769,6 +855,14 @@ "id=0x%X\nstate=0x%X\n" "code=0x%X\nsize=0x%X\n", mlme->id, mlme->state, mlme->code, mlme->size); + } + break; + case OID_TYPE_ATTACH:{ + struct obj_attachment *attach = r->ptr; + return snprintf(str, PRIV_STR_SIZE, + "id=%d\nsize=%d\n", + attach->id, + attach->size); } break; case OID_TYPE_SSID:{ diff -Nru a/drivers/net/wireless/prism54/oid_mgt.h b/drivers/net/wireless/prism54/oid_mgt.h --- a/drivers/net/wireless/prism54/oid_mgt.h 2004-10-21 22:09:44 -04:00 +++ b/drivers/net/wireless/prism54/oid_mgt.h 2004-10-21 22:09:44 -04:00 @@ -36,6 +36,8 @@ void mgt_le_to_cpu(int, void *); int mgt_set_request(islpci_private *, enum oid_num_t, int, void *); +int mgt_set_varlen(islpci_private *, enum oid_num_t, void *, int); + int mgt_get_request(islpci_private *, enum oid_num_t, int, void *, union oid_res_t *); @@ -46,7 +48,8 @@ void mgt_get(islpci_private *, enum oid_num_t, void *); -void mgt_commit(islpci_private *); +int mgt_commit(islpci_private *); +void mgt_unlatch_all(islpci_private *); int mgt_mlme_answer(islpci_private *); From jbarnes@sgi.com Thu Oct 21 20:01:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 20:01:56 -0700 (PDT) Received: from omx2.sgi.com (omx2-ext.sgi.com [192.48.171.19]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M31pQi008383 for ; Thu, 21 Oct 2004 20:01:51 -0700 Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by omx2.sgi.com (8.12.11/8.12.9/linux-outbound_gateway-1.1) with ESMTP id i9M4FHsf029612 for ; Thu, 21 Oct 2004 21:15:17 -0700 Received: from localhost.localdomain ([198.149.36.12]) by cthulhu.engr.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id i9M31XLG5324357; Thu, 21 Oct 2004 20:01:34 -0700 (PDT) From: Jesse Barnes To: "David S. Miller" Subject: Re: [PATCH] use mmiowb in tg3.c Date: Thu, 21 Oct 2004 22:01:34 -0500 User-Agent: KMail/1.7 Cc: Jesse Barnes , akpm@osdl.org, linux-kernel@vger.kernel.org, netdev@oss.sgi.com, jgarzik@pobox.com, gnb@sgi.com, akepner@sgi.com References: <200410211613.19601.jbarnes@engr.sgi.com> <200410211628.06906.jbarnes@engr.sgi.com> <20041021164007.4933b10b.davem@davemloft.net> In-Reply-To: <20041021164007.4933b10b.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410212201.35430.jbarnes@sgi.com> X-archive-position: 10695 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jbarnes@sgi.com Precedence: bulk X-list: netdev Content-Length: 875 Lines: 20 On Thursday, October 21, 2004 6:40 pm, David S. Miller wrote: > On Thu, 21 Oct 2004 16:28:06 -0700 > > Jesse Barnes wrote: > > This patch originally from Greg Banks. Some parts of the tg3 driver > > depend on PIO writes arriving in order. This patch ensures that in two > > key places using the new mmiowb macro. This not only prevents bugs (the > > queues can be corrupted), but is much faster than ensuring ordering using > > PIO reads (which involve a few round trips to the target bus on some > > platforms). > > Do other PCI systems which post PIO writes also potentially reorder > them just like this SGI system does? Just trying to get this situation > straight in my head. The HP guys claim that theirs don't, but PPC does, afaik. And clearly any large system that posts PCI writes has the *potential* of reordering them. Thanks, Jesse From paulus@ozlabs.org Thu Oct 21 20:57:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 20:57:32 -0700 (PDT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M3vQN2013022 for ; Thu, 21 Oct 2004 20:57:27 -0700 Received: by ozlabs.org (Postfix, from userid 1003) id 32C502BDA5; Fri, 22 Oct 2004 13:57:06 +1000 (EST) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16760.34275.675065.538997@cargo.ozlabs.ibm.com> Date: Fri, 22 Oct 2004 14:00:35 +1000 From: Paul Mackerras To: Jesse Barnes Cc: "David S. Miller" , Jesse Barnes , akpm@osdl.org, linux-kernel@vger.kernel.org, netdev@oss.sgi.com, jgarzik@pobox.com, gnb@sgi.com, akepner@sgi.com Subject: Re: [PATCH] use mmiowb in tg3.c In-Reply-To: <200410212201.35430.jbarnes@sgi.com> References: <200410211613.19601.jbarnes@engr.sgi.com> <200410211628.06906.jbarnes@engr.sgi.com> <20041021164007.4933b10b.davem@davemloft.net> <200410212201.35430.jbarnes@sgi.com> X-Mailer: VM 7.18 under Emacs 21.3.1 X-archive-position: 10696 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: paulus@samba.org Precedence: bulk X-list: netdev Content-Length: 1572 Lines: 33 Jesse Barnes writes: > On Thursday, October 21, 2004 6:40 pm, David S. Miller wrote: > > On Thu, 21 Oct 2004 16:28:06 -0700 > > > > Jesse Barnes wrote: > > > This patch originally from Greg Banks. Some parts of the tg3 driver > > > depend on PIO writes arriving in order. This patch ensures that in two > > > key places using the new mmiowb macro. This not only prevents bugs (the > > > queues can be corrupted), but is much faster than ensuring ordering using > > > PIO reads (which involve a few round trips to the target bus on some > > > platforms). > > > > Do other PCI systems which post PIO writes also potentially reorder > > them just like this SGI system does? Just trying to get this situation > > straight in my head. > > The HP guys claim that theirs don't, but PPC does, afaik. And clearly any > large system that posts PCI writes has the *potential* of reordering them. No, PPC systems don't reorder writes to PCI devices. Provided you use inl/outl/readl/writel et al., all PCI accesses from one processor are strictly ordered, and if you use a spinlock, that gives you strict access ordering between processors. Our barrier instructions mostly order cacheable accesses separately from non-cacheable accesses, except for the strongest barrier instruction, which orders everything. Thus it would be useful for us to have an explicit indication of when a cacheable write (i.e. to main memory) has to be completed (from a PCI device's point of view) before a non-cacheable device read or write (e.g. to kick off DMA). Paul. From suresh.krishnan@ericsson.com Thu Oct 21 21:33:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 21:34:02 -0700 (PDT) Received: from imr1.ericy.com (imr1.ericy.com [198.24.6.9]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M4XrWs013937 for ; Thu, 21 Oct 2004 21:33:54 -0700 Received: from eamrcnt751.exu.ericsson.se (eamrcnt751.exu.ericsson.se [138.85.133.52]) by imr1.ericy.com (8.12.10/8.12.10) with ESMTP id i9M4XhCR015264; Thu, 21 Oct 2004 23:33:44 -0500 (CDT) Received: by eamrcnt751.exu.ericsson.se with Internet Mail Service (5.5.2657.72) id <47W1HA2B>; Thu, 21 Oct 2004 23:32:54 -0500 Received: from [142.133.72.115] (142.133.72.115 [142.133.72.115]) by EAMMLEX034.dyn.lmc.ericsson.se with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id VJ837694; Fri, 22 Oct 2004 00:32:56 -0400 Date: Fri, 22 Oct 2004 00:27:14 -0400 (EDT) From: Suresh Krishnan X-X-Sender: lmcsukr@localhost.localdomain Reply-To: Suresh Krishnan To: davem@davemloft.net, Subject: [PATCH 2.6.9] address family not supported for sendmsg() Message-ID: <21A5F45EFF209A44B3057E35CE1FE6E403981824-100000@eammlex037.lmc.ericsson.se> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 10697 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: suresh.krishnan@ericsson.ca Precedence: bulk X-list: netdev Content-Length: 2630 Lines: 57 When sendmsg() encounters an unsupported address family it must return EAFNOSUPPORT. It currently returns EINVAL, which must be returned only when the sum of the iov_len values overflows a ssize_t. Signed-off-by: Suresh Krishnan --- diff -Nur linux-2.6.9/net/ipv4/raw.c linux-2.6.9-patched/net/ipv4/raw.c --- linux-2.6.9/net/ipv4/raw.c 2004-10-18 17:54:31.000000000 -0400 +++ linux-2.6.9-patched/net/ipv4/raw.c 2004-10-21 16:38:15.000000000 -0400 @@ -407,7 +407,7 @@ printk(KERN_INFO "%s forgot to set AF_INET in " "raw sendmsg. Fix it!\n", current->comm); - err = -EINVAL; + err = -EAFNOSUPPORT; if (usin->sin_family) goto out; } diff -Nur linux-2.6.9/net/ipv4/udp.c linux-2.6.9-patched/net/ipv4/udp.c --- linux-2.6.9/net/ipv4/udp.c 2004-10-18 17:53:22.000000000 -0400 +++ linux-2.6.9-patched/net/ipv4/udp.c 2004-10-21 16:37:40.000000000 -0400 @@ -531,7 +531,7 @@ return -EINVAL; if (usin->sin_family != AF_INET) { if (usin->sin_family != AF_UNSPEC) - return -EINVAL; + return -EAFNOSUPPORT; } daddr = usin->sin_addr.s_addr; diff -Nur linux-2.6.9/net/ipv6/raw.c linux-2.6.9-patched/net/ipv6/raw.c --- linux-2.6.9/net/ipv6/raw.c 2004-10-18 17:53:51.000000000 -0400 +++ linux-2.6.9-patched/net/ipv6/raw.c 2004-10-21 16:38:00.000000000 -0400 @@ -639,7 +639,7 @@ return -EINVAL; if (sin6->sin6_family && sin6->sin6_family != AF_INET6) - return(-EINVAL); + return(-EAFNOSUPPORT); /* port is the proto value [0..255] carried in nexthdr */ proto = ntohs(sin6->sin6_port); diff -Nur linux-2.6.9/net/ipv6/udp.c linux-2.6.9-patched/net/ipv6/udp.c --- linux-2.6.9/net/ipv6/udp.c 2004-10-18 17:54:55.000000000 -0400 +++ linux-2.6.9-patched/net/ipv6/udp.c 2004-10-21 16:37:52.000000000 -0400 @@ -699,7 +699,7 @@ if (likely(up->pending)) { if (unlikely(up->pending != AF_INET6)) { release_sock(sk); - return -EINVAL; + return -EAFNOSUPPORT; } dst = NULL; goto do_append_data; From davem@davemloft.net Thu Oct 21 22:11:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 22:11:50 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M5BbQb015384 for ; Thu, 21 Oct 2004 22:11:37 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKrc9-0005kh-00; Thu, 21 Oct 2004 22:05:21 -0700 Date: Thu, 21 Oct 2004 22:05:21 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: netdev@oss.sgi.com Subject: Re: [PATCH] replace dst_release refcount error with standard WARN_ON Message-Id: <20041021220521.5314025e.davem@davemloft.net> In-Reply-To: <20041021133434.73188fae@zqx3.pdx.osdl.net> References: <20041021133434.73188fae@zqx3.pdx.osdl.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10698 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 374 Lines: 10 On Thu, 21 Oct 2004 13:34:34 -0700 Stephen Hemminger wrote: > Replace the dst count underflow bug message with a standard WARN message. > This makes errors noticeable and also reduces the kernel text size by 600 > since we aren't doing as much to setup the printk. > > Signed-off-by: Stephen Hemminger Applied, thanks Stephen. From davem@davemloft.net Thu Oct 21 22:20:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 22:20:50 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M5KitP015874 for ; Thu, 21 Oct 2004 22:20:44 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKrkq-0005mr-00; Thu, 21 Oct 2004 22:14:20 -0700 Date: Thu, 21 Oct 2004 22:14:20 -0700 From: "David S. Miller" To: "chas williams (contractor)" Cc: hch@infradead.org, netdev@oss.sgi.com, davem@redhat.com Subject: Re: [PATCH][ATM]: [ambassador] eliminate pci_find_device() Message-Id: <20041021221420.1002bfc5.davem@davemloft.net> In-Reply-To: <200410220129.i9M1TvPr026209@ginger.cmf.nrl.navy.mil> References: <20041021113841.GA3720@infradead.org> <200410220129.i9M1TvPr026209@ginger.cmf.nrl.navy.mil> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10699 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 257 Lines: 11 On Thu, 21 Oct 2004 21:29:57 -0400 "chas williams (contractor)" wrote: > better? > > # This is a BitKeeper generated diff -Nru style patch. > # > # [ATM]: [ambassador] eliminate pci_find_device() > # Looks fine to me, applied. From davem@davemloft.net Thu Oct 21 22:26:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 22:26:18 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M5QCGV016247 for ; Thu, 21 Oct 2004 22:26:12 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKrqE-0005oP-00; Thu, 21 Oct 2004 22:19:54 -0700 Date: Thu, 21 Oct 2004 22:19:53 -0700 From: "David S. Miller" To: "chas williams (contractor)" Cc: netdev@oss.sgi.com, davem@redhat.com, romieu@fr.zoreil.com Subject: Re: [PATCH][ATM]: [firestream] remove dead code (from Francois Romieu ) Message-Id: <20041021221953.4a3a89b1.davem@davemloft.net> In-Reply-To: <200410211127.i9LBReF3008853@ginger.cmf.nrl.navy.mil> References: <200410211127.i9LBReF3008853@ginger.cmf.nrl.navy.mil> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10700 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 128 Lines: 6 On Thu, 21 Oct 2004 07:27:41 -0400 "chas williams (contractor)" wrote: > please apply to 2.6 Applied. From davem@davemloft.net Thu Oct 21 22:27:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 22:27:22 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M5RFls016466 for ; Thu, 21 Oct 2004 22:27:16 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKrrA-0005or-00; Thu, 21 Oct 2004 22:20:52 -0700 Date: Thu, 21 Oct 2004 22:20:51 -0700 From: "David S. Miller" To: "chas williams (contractor)" Cc: netdev@oss.sgi.com, davem@redhat.com, romieu@fr.zoreil.com Subject: Re: [PATCH][ATM]: [zatm] eliminate pci_find_device() (from Francois Romieu ) Message-Id: <20041021222051.137757dc.davem@davemloft.net> In-Reply-To: <200410211128.i9LBSt4W008894@ginger.cmf.nrl.navy.mil> References: <200410211128.i9LBSt4W008894@ginger.cmf.nrl.navy.mil> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10701 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 141 Lines: 6 On Thu, 21 Oct 2004 07:28:57 -0400 "chas williams (contractor)" wrote: > please apply to 2.6 Applied, thanks Chas. From davem@davemloft.net Thu Oct 21 22:54:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 22:54:38 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M5sVpj017405 for ; Thu, 21 Oct 2004 22:54:31 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKsHc-0005w5-00; Thu, 21 Oct 2004 22:48:12 -0700 Date: Thu, 21 Oct 2004 22:48:12 -0700 From: "David S. Miller" To: Thomas Graf Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: Re: [PATCHSET 0/16] More gnet_stats conversions Message-Id: <20041021224812.4a7e2c35.davem@davemloft.net> In-Reply-To: <20041021123209.GE21977@postel.suug.ch> References: <20041021123209.GE21977@postel.suug.ch> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10702 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 479 Lines: 14 On Thu, 21 Oct 2004 14:32:09 +0200 Thomas Graf wrote: > This patchset contains requeues statistics, TLV type max cleanups, and > more conversions to the new generic statistic interface. > > It converts all qdiscs to dump their xstats via gnet_stats_copy_app and > converts all class statistics in classful qdiscs to the new API. Thomas has been a very busy boy :-) All nice and straightforward transformations, nice work. All patches applied, thanks Thomas. From davem@davemloft.net Thu Oct 21 22:58:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 22:58:45 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M5wcmt017871 for ; Thu, 21 Oct 2004 22:58:38 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKsLR-0005xR-00; Thu, 21 Oct 2004 22:52:09 -0700 Date: Thu, 21 Oct 2004 22:52:08 -0700 From: "David S. Miller" To: Harald Welte Cc: netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org, lmb@suse.de Subject: Re: [PATCH 2.6] iptables CLUSTERIP target, seq_file version Message-Id: <20041021225208.44ddaa10.davem@davemloft.net> In-Reply-To: <20041021163655.GK3551@sunbeam.de.gnumonks.org> References: <20041020223828.GP19899@sunbeam.de.gnumonks.org> <20041021163655.GK3551@sunbeam.de.gnumonks.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10703 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 614 Lines: 15 On Thu, 21 Oct 2004 18:36:55 +0200 Harald Welte wrote: > This is the 'CLUSTERIP' target for iptables, this time no core kernel > changes required, please apply. > > This enables you to build a static load sharing cluster between multiple > nodes - without the requirement to have a load balancer. It uses a > series of [evil] tricks like replying with linklayer multicast addresses > to ARP requests, and using CONNMARK for stateful blocking all traffic > not intended for the local node. It's clever and nasty, I like it :-) Thanks for cleaning it up to use seq_file. Patch applied. From davem@davemloft.net Thu Oct 21 22:59:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 23:00:02 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M5xuh0018159 for ; Thu, 21 Oct 2004 22:59:56 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKsMn-0005y3-00; Thu, 21 Oct 2004 22:53:33 -0700 Date: Thu, 21 Oct 2004 22:53:32 -0700 From: "David S. Miller" To: Herbert Xu Cc: kernel@linuxace.com, linux-net@vger.kernel.org, netdev@oss.sgi.com Subject: Re: 2.6.9 failed assertion in tcp_timer.c Message-Id: <20041021225332.7f6bcfaf.davem@davemloft.net> In-Reply-To: <20041021215743.GA23062@gondor.apana.org.au> References: <20041019215054.GA17565@linuxace.com> <20041020164748.GA20905@linuxace.com> <20041020212651.GA8534@gondor.apana.org.au> <20041020225536.GA22179@linuxace.com> <20041021130339.GA19345@gondor.apana.org.au> <20041021165224.GA25399@linuxace.com> <20041021215743.GA23062@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10704 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 293 Lines: 9 On Fri, 22 Oct 2004 07:57:43 +1000 Herbert Xu wrote: > Dave, we need to use the skb's MSS in trim_head as otherwise the > counters will be screwed up. > > Signed-off-by: Herbert Xu Excellent catch. Patch applied, thanks Herbert. From davem@davemloft.net Thu Oct 21 23:02:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 23:02:28 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M62NgM018600 for ; Thu, 21 Oct 2004 23:02:23 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKsPG-0005yN-00; Thu, 21 Oct 2004 22:56:06 -0700 Date: Thu, 21 Oct 2004 22:56:06 -0700 From: "David S. Miller" To: Chris Wright Cc: netdev@oss.sgi.com Subject: Re: [PATCH] trivial speeling fix in net/sched/Kconfig Message-Id: <20041021225606.0bb8358e.davem@davemloft.net> In-Reply-To: <20041021184320.K2357@build.pdx.osdl.net> References: <20041021184320.K2357@build.pdx.osdl.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10705 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 175 Lines: 8 On Thu, 21 Oct 2004 18:43:20 -0700 Chris Wright wrote: > Trivial speeling fixes. > > Signed-off-by: Chris Wright Applied, thanks Chris. From davem@davemloft.net Thu Oct 21 23:03:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 23:03:42 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M63cnU018952 for ; Thu, 21 Oct 2004 23:03:38 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKsQW-000601-00; Thu, 21 Oct 2004 22:57:24 -0700 Date: Thu, 21 Oct 2004 22:57:24 -0700 From: "David S. Miller" To: Chris Wright Cc: netdev@oss.sgi.com Subject: Re: [PATCH] make tcf_proto_lookup_ops() static Message-Id: <20041021225724.67cd9fba.davem@davemloft.net> In-Reply-To: <20041021184426.L2357@build.pdx.osdl.net> References: <20041021184426.L2357@build.pdx.osdl.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10706 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 216 Lines: 8 On Thu, 21 Oct 2004 18:44:26 -0700 Chris Wright wrote: > Make tcf_proto_lookup_ops() static, it's only used in cls_api.c. > > Signed-off-by: Chris Wright Applied, thanks Chris. From davem@davemloft.net Thu Oct 21 23:04:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 23:04:41 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M64ZTj019281 for ; Thu, 21 Oct 2004 23:04:35 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CKsRR-00060A-00; Thu, 21 Oct 2004 22:58:21 -0700 Date: Thu, 21 Oct 2004 22:58:20 -0700 From: "David S. Miller" To: Suresh Krishnan Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9] address family not supported for sendmsg() Message-Id: <20041021225820.72d278c7.davem@davemloft.net> In-Reply-To: <21A5F45EFF209A44B3057E35CE1FE6E403981824-100000@eammlex037.lmc.ericsson.se> References: <21A5F45EFF209A44B3057E35CE1FE6E403981824-100000@eammlex037.lmc.ericsson.se> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10707 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 577 Lines: 13 On Fri, 22 Oct 2004 00:27:14 -0400 (EDT) Suresh Krishnan wrote: > --- linux-2.6.9/net/ipv6/udp.c 2004-10-18 17:54:55.000000000 -0400 > +++ linux-2.6.9-patched/net/ipv6/udp.c 2004-10-21 16:37:52.000000000 -0400 > @@ -699,7 +699,7 @@ > if (likely(up->pending)) { > if (unlikely(up->pending != AF_INET6)) { > release_sock(sk); > - return -EINVAL; > + return -EAFNOSUPPORT; I think this case should remain -EINVAL. From yoshfuji@linux-ipv6.org Thu Oct 21 23:30:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 23:30:37 -0700 (PDT) Received: from yue.st-paulia.net (yue.linux-ipv6.org [203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M6UV27020974 for ; Thu, 21 Oct 2004 23:30:32 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id BE0C833CE5; Fri, 22 Oct 2004 15:30:57 +0900 (JST) Date: Fri, 22 Oct 2004 15:30:56 +0900 (JST) Message-Id: <20041022.153056.57690221.yoshfuji@linux-ipv6.org> To: davem@davemloft.net Cc: suresh.krishnan@ericsson.ca, netdev@oss.sgi.com, yoshfuji@linux-ipv6.org Subject: Re: [PATCH 2.6.9] address family not supported for sendmsg() From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <20041021225820.72d278c7.davem@davemloft.net> References: <21A5F45EFF209A44B3057E35CE1FE6E403981824-100000@eammlex037.lmc.ericsson.se> <20041021225820.72d278c7.davem@davemloft.net> Organization: USAGI Project X-URL: http://www.yoshifuji.org/%7Ehideaki/ X-Fingerprint: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA X-PGP-Key-URL: http://www.yoshifuji.org/%7Ehideaki/hideaki@yoshifuji.org.asc X-Face: "5$Al-.M>NJ%a'@hhZdQm:."qn~PA^gq4o*>iCFToq*bAi#4FRtx}enhuQKz7fNqQz\BYU] $~O_5m-9'}MIs`XGwIEscw;e5b>n"B_?j/AkL~i/MEaZBLP X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 10708 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: yoshfuji@linux-ipv6.org Precedence: bulk X-list: netdev Content-Length: 971 Lines: 24 In article <20041021225820.72d278c7.davem@davemloft.net> (at Thu, 21 Oct 2004 22:58:20 -0700), "David S. Miller" says: > On Fri, 22 Oct 2004 00:27:14 -0400 (EDT) > Suresh Krishnan wrote: > > > --- linux-2.6.9/net/ipv6/udp.c 2004-10-18 17:54:55.000000000 -0400 > > +++ linux-2.6.9-patched/net/ipv6/udp.c 2004-10-21 16:37:52.000000000 -0400 > > @@ -699,7 +699,7 @@ > > if (likely(up->pending)) { > > if (unlikely(up->pending != AF_INET6)) { > > release_sock(sk); > > - return -EINVAL; > > + return -EAFNOSUPPORT; > > I think this case should remain -EINVAL. EAFNOSUPPORT may be okay. If we try to push data for ipv6 socket while data is pending for ipv4 destination, the family of destination (ipv6) is not allowed for that socket. This may be convered by EAFNOSUPPORT. --yoshfuji From yoshfuji@linux-ipv6.org Thu Oct 21 23:31:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 23:31:18 -0700 (PDT) Received: from yue.st-paulia.net (yue.linux-ipv6.org [203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M6VALr021043 for ; Thu, 21 Oct 2004 23:31:10 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 11B9A33CE5; Fri, 22 Oct 2004 15:31:39 +0900 (JST) Date: Fri, 22 Oct 2004 15:31:37 +0900 (JST) Message-Id: <20041022.153137.99739029.yoshfuji@linux-ipv6.org> To: davem@davemloft.net Cc: suresh.krishnan@ericsson.ca, netdev@oss.sgi.com, yoshfuji@linux-ipv6.org Subject: Re: [PATCH 2.6.9] address family not supported for sendmsg() From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <20041022.153056.57690221.yoshfuji@linux-ipv6.org> References: <21A5F45EFF209A44B3057E35CE1FE6E403981824-100000@eammlex037.lmc.ericsson.se> <20041021225820.72d278c7.davem@davemloft.net> <20041022.153056.57690221.yoshfuji@linux-ipv6.org> Organization: USAGI Project X-URL: http://www.yoshifuji.org/%7Ehideaki/ X-Fingerprint: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA X-PGP-Key-URL: http://www.yoshifuji.org/%7Ehideaki/hideaki@yoshifuji.org.asc X-Face: "5$Al-.M>NJ%a'@hhZdQm:."qn~PA^gq4o*>iCFToq*bAi#4FRtx}enhuQKz7fNqQz\BYU] $~O_5m-9'}MIs`XGwIEscw;e5b>n"B_?j/AkL~i/MEaZBLP X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit X-archive-position: 10709 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: yoshfuji@linux-ipv6.org Precedence: bulk X-list: netdev Content-Length: 248 Lines: 6 In article <20041022.153056.57690221.yoshfuji@linux-ipv6.org> (at Fri, 22 Oct 2004 15:30:56 +0900 (JST)), YOSHIFUJI Hideaki / $B5HF#1QL@(B says: > This may be convered by EAFNOSUPPORT. covered --yoshfuji From jgarzik@pobox.com Thu Oct 21 23:39:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 23:39:54 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M6df92021762 for ; Thu, 21 Oct 2004 23:39:42 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CKt57-00077K-Cc; Fri, 22 Oct 2004 07:39:23 +0100 Message-ID: <4178AB0D.6060107@pobox.com> Date: Fri, 22 Oct 2004 02:39:09 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Netdev CC: YOSHIFUJI Hideaki Subject: BUG: dst underflow (again) Content-Type: multipart/mixed; boundary="------------020708030300020109090600" X-archive-position: 10710 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: 72645 Lines: 977 This is a multi-part message in MIME format. --------------020708030300020109090600 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit As requested, I updated my kernel to see if the "BUG: dst underflow..." messages disappeared. Alas, they didn't. dmesg and .config from 2.6.9-final attached. Let me know what additional debugging information I can provide, if any. The symbol addresses in the dmesg output are all inside the ipv6 module. Thanks, Jeff --------------020708030300020109090600 Content-Type: text/plain; name="dmesg.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="dmesg.txt" 1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=47493 PROTO=UDP SPT=67 DPT=68 LEN=372 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=54131 PROTO=UDP SPT=67 DPT=68 LEN=317 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=59078 PROTO=UDP SPT=67 DPT=68 LEN=377 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=63144 PROTO=UDP SPT=67 DPT=68 LEN=377 IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=219.150.14.9 DST=24.74.155.169 LEN=40 TOS=0x00 PREC=0x00 TTL=106 ID=0 PROTO=TCP SPT=80 DPT=27040 WINDOW=0 RES=0x00 ACK SYN URGP=0 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=5525 PROTO=UDP SPT=67 DPT=68 LEN=372 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=9369 PROTO=UDP SPT=67 DPT=68 LEN=372 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=13769 PROTO=UDP SPT=67 DPT=68 LEN=377 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=18134 PROTO=UDP SPT=67 DPT=68 LEN=372 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=21988 PROTO=UDP SPT=67 DPT=68 LEN=372 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=394 TOS=0x00 PREC=0x00 TTL=255 ID=26055 PROTO=UDP SPT=67 DPT=68 LEN=374 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=205.252.48.130 DST=24.74.155.169 LEN=84 TOS=0x00 PREC=0x00 TTL=52 ID=0 DF PROTO=ICMP TYPE=8 CODE=0 ID=1306 SEQ=24046 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=348 TOS=0x00 PREC=0x00 TTL=255 ID=36409 PROTO=UDP SPT=67 DPT=68 LEN=328 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=42284 PROTO=UDP SPT=67 DPT=68 LEN=372 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=48254 PROTO=UDP SPT=67 DPT=68 LEN=377 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=52320 PROTO=UDP SPT=67 DPT=68 LEN=372 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=344 TOS=0x00 PREC=0x00 TTL=255 ID=56231 PROTO=UDP SPT=67 DPT=68 LEN=324 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=60035 PROTO=UDP SPT=67 DPT=68 LEN=372 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=63620 PROTO=UDP SPT=67 DPT=68 LEN=372 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=1558 PROTO=UDP SPT=67 DPT=68 LEN=377 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=5255 PROTO=UDP SPT=67 DPT=68 LEN=317 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=209.120.213.226 DST=24.74.155.169 LEN=84 TOS=0x00 PREC=0x00 TTL=49 ID=0 DF PROTO=ICMP TYPE=8 CODE=0 ID=13650 SEQ=54802 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=13115 PROTO=UDP SPT=67 DPT=68 LEN=317 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=20218 PROTO=UDP SPT=67 DPT=68 LEN=317 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=341 TOS=0x00 PREC=0x00 TTL=255 ID=27114 PROTO=UDP SPT=67 DPT=68 LEN=321 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=34116 PROTO=UDP SPT=67 DPT=68 LEN=317 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=39154 PROTO=UDP SPT=67 DPT=68 LEN=372 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=44086 PROTO=UDP SPT=67 DPT=68 LEN=317 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=48840 PROTO=UDP SPT=67 DPT=68 LEN=377 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=328 TOS=0x00 PREC=0x00 TTL=255 ID=54312 PROTO=UDP SPT=67 DPT=68 LEN=308 IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=220.75.149.123 DST=24.74.155.169 LEN=48 TOS=0x00 PREC=0x00 TTL=113 ID=59613 DF PROTO=TCP SPT=1672 DPT=1025 WINDOW=16384 RES=0x00 SYN URGP=0 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=2162 PROTO=UDP SPT=67 DPT=68 LEN=372 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=9672 PROTO=UDP SPT=67 DPT=68 LEN=317 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=340 TOS=0x00 PREC=0x00 TTL=255 ID=16868 PROTO=UDP SPT=67 DPT=68 LEN=320 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=23156 PROTO=UDP SPT=67 DPT=68 LEN=372 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=29446 PROTO=UDP SPT=67 DPT=68 LEN=317 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=348 TOS=0x00 PREC=0x00 TTL=255 ID=35545 PROTO=UDP SPT=67 DPT=68 LEN=328 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=42110 PROTO=UDP SPT=67 DPT=68 LEN=372 IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=68.97.38.48 DST=24.74.155.169 LEN=48 TOS=0x00 PREC=0x00 TTL=111 ID=14286 DF PROTO=TCP SPT=2713 DPT=901 WINDOW=64240 RES=0x00 SYN URGP=0 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=55063 PROTO=UDP SPT=67 DPT=68 LEN=372 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=344 TOS=0x00 PREC=0x00 TTL=255 ID=61149 PROTO=UDP SPT=67 DPT=68 LEN=324 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=1416 PROTO=UDP SPT=67 DPT=68 LEN=377 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=7507 PROTO=UDP SPT=67 DPT=68 LEN=372 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=210.233.127.100 DST=24.74.155.169 LEN=48 TOS=0x00 PREC=0x00 TTL=112 ID=61686 DF PROTO=TCP SPT=2479 DPT=5554 WINDOW=16384 RES=0x00 SYN URGP=0 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=17685 PROTO=UDP SPT=67 DPT=68 LEN=372 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=208.185.54.14 DST=24.74.155.169 LEN=72 TOS=0x00 PREC=0x00 TTL=51 ID=19594 PROTO=UDP SPT=7103 DPT=53 LEN=52 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=27524 PROTO=UDP SPT=67 DPT=68 LEN=377 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=216.74.133.194 DST=24.74.155.169 LEN=72 TOS=0x00 PREC=0x00 TTL=50 ID=13780 PROTO=UDP SPT=61401 DPT=53 LEN=52 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=36957 PROTO=UDP SPT=67 DPT=68 LEN=372 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=41187 PROTO=UDP SPT=67 DPT=68 LEN=377 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=338 TOS=0x00 PREC=0x00 TTL=255 ID=44340 PROTO=UDP SPT=67 DPT=68 LEN=318 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=47580 PROTO=UDP SPT=67 DPT=68 LEN=317 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=192.132.92.18 DST=24.74.155.169 LEN=52 TOS=0x00 PREC=0x00 TTL=47 ID=9643 DF PROTO=TCP SPT=80 DPT=33904 WINDOW=11160 RES=0x00 ACK FIN URGP=0 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=395 TOS=0x00 PREC=0x00 TTL=255 ID=53545 PROTO=UDP SPT=67 DPT=68 LEN=375 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=396 TOS=0x00 PREC=0x00 TTL=255 ID=56797 PROTO=UDP SPT=67 DPT=68 LEN=376 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=59857 PROTO=UDP SPT=67 DPT=68 LEN=372 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=24.191.57.199 DST=24.74.155.169 LEN=28 TOS=0x00 PREC=0x00 TTL=113 ID=51134 PROTO=ICMP TYPE=8 CODE=0 ID=512 SEQ=10531 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=394 TOS=0x00 PREC=0x00 TTL=255 ID=1093 PROTO=UDP SPT=67 DPT=68 LEN=374 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=338 TOS=0x00 PREC=0x00 TTL=255 ID=4588 PROTO=UDP SPT=67 DPT=68 LEN=318 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=394 TOS=0x00 PREC=0x00 TTL=255 ID=8545 PROTO=UDP SPT=67 DPT=68 LEN=374 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=348 TOS=0x00 PREC=0x00 TTL=255 ID=12530 PROTO=UDP SPT=67 DPT=68 LEN=328 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=344 TOS=0x00 PREC=0x00 TTL=255 ID=16331 PROTO=UDP SPT=67 DPT=68 LEN=324 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=19879 PROTO=UDP SPT=67 DPT=68 LEN=372 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=341 TOS=0x00 PREC=0x00 TTL=255 ID=24517 PROTO=UDP SPT=67 DPT=68 LEN=321 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=344 TOS=0x00 PREC=0x00 TTL=255 ID=29505 PROTO=UDP SPT=67 DPT=68 LEN=324 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=394 TOS=0x00 PREC=0x00 TTL=255 ID=34058 PROTO=UDP SPT=67 DPT=68 LEN=374 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=38777 PROTO=UDP SPT=67 DPT=68 LEN=317 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=45400 PROTO=UDP SPT=67 DPT=68 LEN=377 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=51174 PROTO=UDP SPT=67 DPT=68 LEN=317 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=394 TOS=0x00 PREC=0x00 TTL=255 ID=57305 PROTO=UDP SPT=67 DPT=68 LEN=374 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=341 TOS=0x00 PREC=0x00 TTL=255 ID=63634 PROTO=UDP SPT=67 DPT=68 LEN=321 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=341 TOS=0x00 PREC=0x00 TTL=255 ID=6179 PROTO=UDP SPT=67 DPT=68 LEN=321 IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=218.17.84.57 DST=24.74.155.169 LEN=48 TOS=0x00 PREC=0x00 TTL=103 ID=59149 DF PROTO=TCP SPT=17014 DPT=9898 WINDOW=64240 RES=0x00 SYN URGP=0 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=22768 PROTO=UDP SPT=67 DPT=68 LEN=317 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=31754 PROTO=UDP SPT=67 DPT=68 LEN=377 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=42558 PROTO=UDP SPT=67 DPT=68 LEN=317 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=53443 PROTO=UDP SPT=67 DPT=68 LEN=317 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=65199 PROTO=UDP SPT=67 DPT=68 LEN=317 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=13169 PROTO=UDP SPT=67 DPT=68 LEN=377 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=22405 PROTO=UDP SPT=67 DPT=68 LEN=372 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=340 TOS=0x00 PREC=0x00 TTL=255 ID=28480 PROTO=UDP SPT=67 DPT=68 LEN=320 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=328 TOS=0x00 PREC=0x00 TTL=255 ID=34271 PROTO=UDP SPT=67 DPT=68 LEN=308 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=39835 PROTO=UDP SPT=67 DPT=68 LEN=317 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=44993 PROTO=UDP SPT=67 DPT=68 LEN=372 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=49878 PROTO=UDP SPT=67 DPT=68 LEN=372 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=52791 PROTO=UDP SPT=67 DPT=68 LEN=372 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=55553 PROTO=UDP SPT=67 DPT=68 LEN=377 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=338 TOS=0x00 PREC=0x00 TTL=255 ID=58435 PROTO=UDP SPT=67 DPT=68 LEN=318 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=344 TOS=0x00 PREC=0x00 TTL=255 ID=61509 PROTO=UDP SPT=67 DPT=68 LEN=324 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=395 TOS=0x00 PREC=0x00 TTL=255 ID=64271 PROTO=UDP SPT=67 DPT=68 LEN=375 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=1627 PROTO=UDP SPT=67 DPT=68 LEN=317 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=221.157.46.104 DST=24.74.155.169 LEN=48 TOS=0x00 PREC=0x00 TTL=112 ID=13253 DF PROTO=TCP SPT=1422 DPT=5554 WINDOW=64240 RES=0x00 SYN URGP=0 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=8542 PROTO=UDP SPT=67 DPT=68 LEN=317 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=11743 PROTO=UDP SPT=67 DPT=68 LEN=317 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=16201 PROTO=UDP SPT=67 DPT=68 LEN=317 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=20553 PROTO=UDP SPT=67 DPT=68 LEN=317 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=23841 PROTO=UDP SPT=67 DPT=68 LEN=317 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=216.73.87.200 DST=24.74.155.169 LEN=72 TOS=0x00 PREC=0x00 TTL=53 ID=0 DF PROTO=UDP SPT=47719 DPT=53 LEN=52 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow -1: cd0d8580 at f8c0ce90 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=34301 PROTO=UDP SPT=67 DPT=68 LEN=317 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=37553 PROTO=UDP SPT=67 DPT=68 LEN=317 BUG: dst underflow -1: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c0ce90 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=340 TOS=0x00 PREC=0x00 TTL=255 ID=40949 PROTO=UDP SPT=67 DPT=68 LEN=320 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=340 TOS=0x00 PREC=0x00 TTL=255 ID=44355 PROTO=UDP SPT=67 DPT=68 LEN=320 IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=210.26.11.251 DST=24.74.155.169 LEN=836 TOS=0x00 PREC=0x00 TTL=112 ID=5809 PROTO=UDP SPT=29486 DPT=1026 LEN=816 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=338 TOS=0x00 PREC=0x00 TTL=255 ID=51324 PROTO=UDP SPT=67 DPT=68 LEN=318 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=340 TOS=0x00 PREC=0x00 TTL=255 ID=58178 PROTO=UDP SPT=67 DPT=68 LEN=320 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=65127 PROTO=UDP SPT=67 DPT=68 LEN=377 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=5757 PROTO=UDP SPT=67 DPT=68 LEN=317 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=11425 PROTO=UDP SPT=67 DPT=68 LEN=372 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=394 TOS=0x00 PREC=0x00 TTL=255 ID=15732 PROTO=UDP SPT=67 DPT=68 LEN=374 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=19851 PROTO=UDP SPT=67 DPT=68 LEN=372 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=328 TOS=0x00 PREC=0x00 TTL=255 ID=23559 PROTO=UDP SPT=67 DPT=68 LEN=308 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=26881 PROTO=UDP SPT=67 DPT=68 LEN=317 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=29967 PROTO=UDP SPT=67 DPT=68 LEN=317 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=338 TOS=0x00 PREC=0x00 TTL=255 ID=32967 PROTO=UDP SPT=67 DPT=68 LEN=318 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=35661 PROTO=UDP SPT=67 DPT=68 LEN=377 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=338 TOS=0x00 PREC=0x00 TTL=255 ID=40439 PROTO=UDP SPT=67 DPT=68 LEN=318 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=45218 PROTO=UDP SPT=67 DPT=68 LEN=317 IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=83.28.2.207 DST=24.74.155.169 LEN=48 TOS=0x00 PREC=0x00 TTL=108 ID=55143 DF PROTO=TCP SPT=1898 DPT=12345 WINDOW=65535 RES=0x00 SYN URGP=0 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=55173 PROTO=UDP SPT=67 DPT=68 LEN=372 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=61312 PROTO=UDP SPT=67 DPT=68 LEN=317 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=344 TOS=0x00 PREC=0x00 TTL=255 ID=2534 PROTO=UDP SPT=67 DPT=68 LEN=324 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=394 TOS=0x00 PREC=0x00 TTL=255 ID=9500 PROTO=UDP SPT=67 DPT=68 LEN=374 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=394 TOS=0x00 PREC=0x00 TTL=255 ID=16576 PROTO=UDP SPT=67 DPT=68 LEN=374 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=394 TOS=0x00 PREC=0x00 TTL=255 ID=23079 PROTO=UDP SPT=67 DPT=68 LEN=374 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=30152 PROTO=UDP SPT=67 DPT=68 LEN=372 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=37328 PROTO=UDP SPT=67 DPT=68 LEN=372 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=44179 PROTO=UDP SPT=67 DPT=68 LEN=377 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=328 TOS=0x00 PREC=0x00 TTL=255 ID=51093 PROTO=UDP SPT=67 DPT=68 LEN=308 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=58483 PROTO=UDP SPT=67 DPT=68 LEN=377 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=64722 PROTO=UDP SPT=67 DPT=68 LEN=377 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=5127 PROTO=UDP SPT=67 DPT=68 LEN=317 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=338 TOS=0x00 PREC=0x00 TTL=255 ID=10335 PROTO=UDP SPT=67 DPT=68 LEN=318 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=395 TOS=0x00 PREC=0x00 TTL=255 ID=16456 PROTO=UDP SPT=67 DPT=68 LEN=375 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=22968 PROTO=UDP SPT=67 DPT=68 LEN=377 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=394 TOS=0x00 PREC=0x00 TTL=255 ID=29496 PROTO=UDP SPT=67 DPT=68 LEN=374 IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=209.175.238.142 DST=24.74.155.169 LEN=836 TOS=0x00 PREC=0x00 TTL=112 ID=57272 PROTO=UDP SPT=22936 DPT=1026 LEN=816 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=41106 PROTO=UDP SPT=67 DPT=68 LEN=317 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=46615 PROTO=UDP SPT=67 DPT=68 LEN=372 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=51880 PROTO=UDP SPT=67 DPT=68 LEN=372 IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=193.95.144.136 DST=24.74.155.169 LEN=64 TOS=0x00 PREC=0x00 TTL=41 ID=9410 PROTO=ICMP TYPE=8 CODE=0 ID=7785 SEQ=0 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=63452 PROTO=UDP SPT=67 DPT=68 LEN=372 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=218.95.110.136 DST=24.74.155.169 LEN=52 TOS=0x00 PREC=0x00 TTL=43 ID=32875 DF PROTO=TCP SPT=4195 DPT=9898 WINDOW=58944 RES=0x00 SYN URGP=0 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=10652 PROTO=UDP SPT=67 DPT=68 LEN=372 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=14091 PROTO=UDP SPT=67 DPT=68 LEN=377 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=394 TOS=0x00 PREC=0x00 TTL=255 ID=17219 PROTO=UDP SPT=67 DPT=68 LEN=374 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=20381 PROTO=UDP SPT=67 DPT=68 LEN=372 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=23384 PROTO=UDP SPT=67 DPT=68 LEN=317 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=26241 PROTO=UDP SPT=67 DPT=68 LEN=377 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=396 TOS=0x00 PREC=0x00 TTL=255 ID=29361 PROTO=UDP SPT=67 DPT=68 LEN=376 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=32447 PROTO=UDP SPT=67 DPT=68 LEN=372 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=340 TOS=0x00 PREC=0x00 TTL=255 ID=35792 PROTO=UDP SPT=67 DPT=68 LEN=320 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=39004 PROTO=UDP SPT=67 DPT=68 LEN=372 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=42430 PROTO=UDP SPT=67 DPT=68 LEN=377 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=47324 PROTO=UDP SPT=67 DPT=68 LEN=377 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=52900 PROTO=UDP SPT=67 DPT=68 LEN=317 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=58946 PROTO=UDP SPT=67 DPT=68 LEN=317 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=394 TOS=0x00 PREC=0x00 TTL=255 ID=1028 PROTO=UDP SPT=67 DPT=68 LEN=374 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=394 TOS=0x00 PREC=0x00 TTL=255 ID=8241 PROTO=UDP SPT=67 DPT=68 LEN=374 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=354 TOS=0x00 PREC=0x00 TTL=255 ID=15967 PROTO=UDP SPT=67 DPT=68 LEN=334 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=23380 PROTO=UDP SPT=67 DPT=68 LEN=317 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=30402 PROTO=UDP SPT=67 DPT=68 LEN=372 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=37224 PROTO=UDP SPT=67 DPT=68 LEN=317 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=340 TOS=0x00 PREC=0x00 TTL=255 ID=44523 PROTO=UDP SPT=67 DPT=68 LEN=320 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=216.34.77.37 DST=24.74.155.169 LEN=64 TOS=0x00 PREC=0x00 TTL=42 ID=6057 PROTO=ICMP TYPE=8 CODE=0 ID=57916 SEQ=0 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=341 TOS=0x00 PREC=0x00 TTL=255 ID=55533 PROTO=UDP SPT=67 DPT=68 LEN=321 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=340 TOS=0x00 PREC=0x00 TTL=255 ID=60496 PROTO=UDP SPT=67 DPT=68 LEN=320 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=65397 PROTO=UDP SPT=67 DPT=68 LEN=317 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=5076 PROTO=UDP SPT=67 DPT=68 LEN=372 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=63.209.221.226 DST=24.74.155.169 LEN=84 TOS=0x00 PREC=0x00 TTL=54 ID=0 DF PROTO=ICMP TYPE=8 CODE=0 ID=54860 SEQ=25143 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=15827 PROTO=UDP SPT=67 DPT=68 LEN=377 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=22623 PROTO=UDP SPT=67 DPT=68 LEN=377 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=340 TOS=0x00 PREC=0x00 TTL=255 ID=28871 PROTO=UDP SPT=67 DPT=68 LEN=320 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=340 TOS=0x00 PREC=0x00 TTL=255 ID=36446 PROTO=UDP SPT=67 DPT=68 LEN=320 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=340 TOS=0x00 PREC=0x00 TTL=255 ID=43307 PROTO=UDP SPT=67 DPT=68 LEN=320 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=340 TOS=0x00 PREC=0x00 TTL=255 ID=50300 PROTO=UDP SPT=67 DPT=68 LEN=320 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=340 TOS=0x00 PREC=0x00 TTL=255 ID=57283 PROTO=UDP SPT=67 DPT=68 LEN=320 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=340 TOS=0x00 PREC=0x00 TTL=255 ID=64796 PROTO=UDP SPT=67 DPT=68 LEN=320 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=5364 PROTO=UDP SPT=67 DPT=68 LEN=317 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=10627 PROTO=UDP SPT=67 DPT=68 LEN=317 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=16015 PROTO=UDP SPT=67 DPT=68 LEN=372 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=348 TOS=0x00 PREC=0x00 TTL=255 ID=21053 PROTO=UDP SPT=67 DPT=68 LEN=328 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=25992 PROTO=UDP SPT=67 DPT=68 LEN=377 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=30695 PROTO=UDP SPT=67 DPT=68 LEN=377 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=338 TOS=0x00 PREC=0x00 TTL=255 ID=35388 PROTO=UDP SPT=67 DPT=68 LEN=318 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=395 TOS=0x00 PREC=0x00 TTL=255 ID=40012 PROTO=UDP SPT=67 DPT=68 LEN=375 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=44662 PROTO=UDP SPT=67 DPT=68 LEN=377 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=391 TOS=0x00 PREC=0x00 TTL=255 ID=48619 PROTO=UDP SPT=67 DPT=68 LEN=371 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c0ce90 IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=219.111.142.191 DST=24.74.155.169 LEN=48 TOS=0x00 PREC=0x00 TTL=106 ID=7140 DF PROTO=TCP SPT=1615 DPT=5554 WINDOW=65535 RES=0x00 SYN URGP=0 IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=195.92.249.252 DST=24.74.155.169 LEN=60 TOS=0x00 PREC=0x00 TTL=50 ID=50557 DF PROTO=TCP SPT=41025 DPT=113 WINDOW=5840 RES=0x00 SYN URGP=0 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=395 TOS=0x00 PREC=0x00 TTL=255 ID=57458 PROTO=UDP SPT=67 DPT=68 LEN=375 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=62213 PROTO=UDP SPT=67 DPT=68 LEN=377 IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=24.36.37.201 DST=24.74.155.169 LEN=48 TOS=0x00 PREC=0x00 TTL=111 ID=33487 DF PROTO=TCP SPT=3879 DPT=2745 WINDOW=16384 RES=0x00 SYN URGP=0 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=2774 PROTO=UDP SPT=67 DPT=68 LEN=372 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=352 TOS=0x00 PREC=0x00 TTL=255 ID=6073 PROTO=UDP SPT=67 DPT=68 LEN=332 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=192.132.92.14 DST=24.74.155.169 LEN=40 TOS=0x00 PREC=0x00 TTL=42 ID=0 DF PROTO=TCP SPT=14690 DPT=32982 WINDOW=0 RES=0x00 RST URGP=0 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=397 TOS=0x00 PREC=0x00 TTL=255 ID=12729 PROTO=UDP SPT=67 DPT=68 LEN=377 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=328 TOS=0x00 PREC=0x00 TTL=255 ID=16270 PROTO=UDP SPT=67 DPT=68 LEN=308 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=67.19.41.102 DST=24.74.155.169 LEN=1654 TOS=0x00 PREC=0x00 TTL=114 ID=1626 PROTO=UDP SPT=12842 DPT=1026 LEN=1634 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=192.132.92.18 DST=24.74.155.169 LEN=52 TOS=0x00 PREC=0x00 TTL=42 ID=30781 DF PROTO=TCP SPT=80 DPT=33001 WINDOW=11457 RES=0x00 ACK FIN URGP=0 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=344 TOS=0x00 PREC=0x00 TTL=255 ID=26848 PROTO=UDP SPT=67 DPT=68 LEN=324 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=337 TOS=0x00 PREC=0x00 TTL=255 ID=30771 PROTO=UDP SPT=67 DPT=68 LEN=317 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=00:00:21:de:de:b5:00:06:2a:ce:18:8c:08:00 SRC=210.110.217.209 DST=24.74.155.169 LEN=836 TOS=0x00 PREC=0x00 TTL=112 ID=2289 PROTO=UDP SPT=15693 DPT=1026 LEN=816 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=340 TOS=0x00 PREC=0x00 TTL=255 ID=41754 PROTO=UDP SPT=67 DPT=68 LEN=320 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=340 TOS=0x00 PREC=0x00 TTL=255 ID=47607 PROTO=UDP SPT=67 DPT=68 LEN=320 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=341 TOS=0x00 PREC=0x00 TTL=255 ID=53432 PROTO=UDP SPT=67 DPT=68 LEN=321 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=340 TOS=0x00 PREC=0x00 TTL=255 ID=59140 PROTO=UDP SPT=67 DPT=68 LEN=320 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow 0: cd0d8580 at f8c1764b BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=341 TOS=0x00 PREC=0x00 TTL=255 ID=64423 PROTO=UDP SPT=67 DPT=68 LEN=321 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=341 TOS=0x00 PREC=0x00 TTL=255 ID=3912 PROTO=UDP SPT=67 DPT=68 LEN=321 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c0e1c2 BUG: dst underflow 0: cd0d8580 at f8c05d46 BUG: dst underflow -1: cd0d8580 at f8c1764b IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=394 TOS=0x00 PREC=0x00 TTL=255 ID=8601 PROTO=UDP SPT=67 DPT=68 LEN=374 IN=eth0 OUT= MAC=ff:ff:ff:ff:ff:ff:00:06:2a:ce:18:54:08:00 SRC=10.41.192.1 DST=255.255.255.255 LEN=392 TOS=0x00 PREC=0x00 TTL=255 ID=13283 PROTO=UDP SPT=67 DPT=68 LEN=372 --------------020708030300020109090600 Content-Type: application/x-bzip2; name="config.txt.bz2" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="config.txt.bz2" QlpoOTFBWSZTWcao4HAAB0pfgEAQWOf/8j////C////gYB4cAACUZAe9t1mS+w1JYUaZPgAX 3savMD1669eJ3bbOe15tG884A6dFKaA21NdC7el6bNvdhvderZ93tnyXpqnoeoaBAjRpoEaa BTJknqnlNGm9U2oeSek9Q9IaDTRGQECaRiNSm9UAGgDQaZNAABpppNRpkJkaJqmj1HqZAAAA AAAJNJJDRBRmkNAeoAAAAAA0AaahqNEyeommCZNGjEGI0xMQBk0MmgkSAmgCTEEamQpkNMjI AAAGjq+Pb/vIKfq1UKkVu+So+ZrCGIqJWsURFGKMWLNCVDyLzhjOzNMqXyNYj7X8b8J+exwQ T8mFRQ3ISFpttVDBOJq/1dDtrHBqP575iat9JOyBh2cKZlKlQWFRQqSpMYYxRy0ZDEqDlqqo 1oxVJjKixGJllVjLQYlEVa1UotlKWney4l0scRMqxQcpCoKIxQxgXLFmRmJiEKyVp3uhMW1V qWwohNIEqQxhjiZZREmZZiSYyVcsFrVti0YoKEbKTExiK4r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/7+dr/uf8KAZmVnvfIy1RADXn6bZAem38UR+kUb/K QHb+jf2YCAD0XMtiW/sXs7aN9h2LxRBLJ9akQJdEBgxYREVVegFjWMcq+Zd1aTbTuyK9Sj6f n/NzTZH7rEPAfxkqJdOD7fdtiY21sKbtCPrz5Mn1RFmgaQD0vcz1PGd21YoeJoona9nVdtng XKY+rrB0tRuP3++TZqAgAf4vWW7UQf5NJAAdPquLGmCI0wzr4AiWBC9ZQxAGQhMSBIu0IFGz xmYyZWTpv+6DWqSAAgo8KcWlmetMTeYHya5VDLLA/6lbJqmRIMM6ApiWs7OPGlPi2u0xgTNM IC5LCIbxSFXhbu5ALl+nVSee+QSEJBJIBKBuiSppVfifHsqUp6+y/DlefA/dpL1rE0kX7Nfy 8Ct7SHe9/nlj8EQBESvPC7zREtrOruFxbVsgE/4u5IpwoSGNUcDg --------------020708030300020109090600-- From yoshfuji@linux-ipv6.org Thu Oct 21 23:51:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 21 Oct 2004 23:51:38 -0700 (PDT) Received: from yue.st-paulia.net (yue.linux-ipv6.org [203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M6pWDO025311 for ; Thu, 21 Oct 2004 23:51:33 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 278B633CE5; Fri, 22 Oct 2004 15:52:01 +0900 (JST) Date: Fri, 22 Oct 2004 15:51:59 +0900 (JST) Message-Id: <20041022.155159.98771450.yoshfuji@linux-ipv6.org> To: jgarzik@pobox.com Cc: netdev@oss.sgi.com, yoshfuji@linux-ipv6.org Subject: Re: BUG: dst underflow (again) From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <4178AB0D.6060107@pobox.com> References: <4178AB0D.6060107@pobox.com> Organization: USAGI Project X-URL: http://www.yoshifuji.org/%7Ehideaki/ X-Fingerprint: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA X-PGP-Key-URL: http://www.yoshifuji.org/%7Ehideaki/hideaki@yoshifuji.org.asc X-Face: "5$Al-.M>NJ%a'@hhZdQm:."qn~PA^gq4o*>iCFToq*bAi#4FRtx}enhuQKz7fNqQz\BYU] $~O_5m-9'}MIs`XGwIEscw;e5b>n"B_?j/AkL~i/MEaZBLP X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 10711 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: yoshfuji@linux-ipv6.org Precedence: bulk X-list: netdev Content-Length: 606 Lines: 17 In article <4178AB0D.6060107@pobox.com> (at Fri, 22 Oct 2004 02:39:09 -0400), Jeff Garzik says: > As requested, I updated my kernel to see if the "BUG: dst underflow..." > messages disappeared. Alas, they didn't. dmesg and .config from > 2.6.9-final attached. Okay, thanks, but hmm... (We haven't met this issue... I really want to know tow to reproduce...) > Let me know what additional debugging information I can provide, if any. > The symbol addresses in the dmesg output are all inside the ipv6 module. Would you enable CONFIG_KALLSYMS_ALL, please? Thanks. --yoshfuji From buytenh@wantstofly.org Fri Oct 22 01:00:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 01:00:10 -0700 (PDT) Received: from xi.wantstofly.org (alephnull.demon.nl [212.238.201.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M803aE030518 for ; Fri, 22 Oct 2004 01:00:03 -0700 Received: by xi.wantstofly.org (Postfix, from userid 500) id BADE32B0ED; Fri, 22 Oct 2004 09:59:47 +0200 (MEST) Date: Fri, 22 Oct 2004 09:59:47 +0200 From: Lennert Buytenhek To: "YOSHIFUJI Hideaki / ?$B5HF#1QL@" Cc: jgarzik@pobox.com, netdev@oss.sgi.com Subject: Re: BUG: dst underflow (again) Message-ID: <20041022075947.GA15795@xi.wantstofly.org> References: <4178AB0D.6060107@pobox.com> <20041022.155159.98771450.yoshfuji@linux-ipv6.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041022.155159.98771450.yoshfuji@linux-ipv6.org> User-Agent: Mutt/1.4.1i X-archive-position: 10712 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: buytenh@wantstofly.org Precedence: bulk X-list: netdev Content-Length: 1011 Lines: 31 On Fri, Oct 22, 2004 at 03:51:59PM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote: > > As requested, I updated my kernel to see if the "BUG: dst underflow..." > > messages disappeared. Alas, they didn't. dmesg and .config from > > 2.6.9-final attached. > > Okay, thanks, but hmm... > (We haven't met this issue... I really want to know tow to reproduce...) FWIW, I'm seeing loads of these on the kernel that comes with Fedora Core 2, also in the ipv6.ko module. I have 6to4 enabled, if that matters anything. % dmesg | grep BUG | sort | uniq BUG: dst underflow -1: 3bcf9a80 at 42350024 BUG: dst underflow 0: 3bcf9a80 at 423486d2 BUG: dst underflow 0: 3bcf9a80 at 4235823d % cat /sys/module/ipv6/sections/.text 0x42345000 0x42350024 - 0x42345000 = 0xb024, corresponds to: 0000affa 0x423486d2 - 0x42345000 = 0x36d2, corresponds to: 0000339d 0x4235823d - 0x42345000 = 0x1323d, corresponds to: 00012c0d (god, that's one big function btw) --L From EAMONN.HAMILTON@saic.com Fri Oct 22 02:32:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 02:32:12 -0700 (PDT) Received: from cpmx2.mail.saic.com (cpmx2.mail.saic.com [139.121.17.172]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9M9W6bu032514 for ; Fri, 22 Oct 2004 02:32:07 -0700 Received: from cp-its-ieg01.mail.saic.com by cpmx2.mail.saic.com; Fri, 22 Oct 2004 02:31:39 -0700 Received: from cpmx2.mail.saic.com ([139.121.17.172]) by cp-its-ieg01.mail.saic.com (SAVSMTP 3.1.6.45) with SMTP id M2004102202313925106 ; Fri, 22 Oct 2004 02:31:39 -0700 Received: from ukabzc383.uk.saic.com by cpmx2.mail.saic.com with ESMTP; Fri, 22 Oct 2004 02:31:39 -0700 Received: from localhost (localhost [127.0.0.1]) by ukabzc383.uk.saic.com (Postfix) with ESMTP id 03E1E2B027; Fri, 22 Oct 2004 10:31:34 +0100 (BST) Received: from ukabzc383.uk.saic.com ([127.0.0.1]) by localhost (ukabzc383.uk.saic.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 04127-02; Fri, 22 Oct 2004 10:31:33 +0100 (BST) Received: from localhost (localhost [127.0.0.1]) by ukabzc383.uk.saic.com (Postfix) with ESMTP id B3BD12B026; Fri, 22 Oct 2004 10:31:33 +0100 (BST) Subject: Re: linux 2.6.9: r8169: eth0: PCI error (status: 0x8404). Device disabled. From: Eamonn Hamilton To: Francois Romieu Cc: netdev In-Reply-To: <20041021120208.GA752@electric-eye.fr.zoreil.com> References: <1098269117.6631.5.camel@ukabzc383.uk.saic.com> <20041020121520.GA4004@electric-eye.fr.zoreil.com> <1098282567.6631.10.camel@ukabzc383.uk.saic.com> <20041020201010.GA13023@electric-eye.fr.zoreil.com> <1098350743.15528.40.camel@ukabzc383.uk.saic.com> <20041021120208.GA752@electric-eye.fr.zoreil.com> Content-Type: text/plain Date: Fri, 22 Oct 2004 10:31:32 +0100 Message-Id: <1098437493.5513.8.camel@ukabzc383.uk.saic.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at saic.com X-archive-position: 10713 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: EAMONN.HAMILTON@saic.com Precedence: bulk X-list: netdev Content-Length: 504 Lines: 17 Hi Francois, Testing 2.6.9 with just the untouched patch applied again fails : PCI error (cmd = 0x0017, status = 0x22b0) Testing the kernel with the error reset disabled just causes networking to stop, with no reported error after copying data from the box for a bit ( < 1GB ) Tests were tried under 2.6.7 and 2.6.8, but the guy doing the testing reported odd problems under these kernels ( they were the pre-packaged debian ones, I'll run up a manual set today sometime ). Hope this helps, Eamonn From tgraf@suug.ch Fri Oct 22 03:05:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 03:05:20 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MA5DXU002927 for ; Fri, 22 Oct 2004 03:05:14 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id B3AF5F; Fri, 22 Oct 2004 12:04:35 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 795931C0E9; Fri, 22 Oct 2004 12:05:17 +0200 (CEST) Date: Fri, 22 Oct 2004 12:05:17 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2.4] PKT_SCHED: Avoid duplicated TCA_STATS TLVs for HTB and HFSC Message-ID: <20041022100517.GY21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 10714 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 1045 Lines: 32 Dave, Backport of the equivalent 2.6 fixes. Qdiscs are not supposed to dump TCA_STATS, it is done in generic code part. Signed-off-by: Thomas Graf --- linux-2.4.28-pre4-bk6.orig/net/sched/sch_htb.c 2004-10-22 10:58:23.000000000 +0200 +++ linux-2.4.28-pre4-bk6/net/sched/sch_htb.c 2004-10-22 10:59:30.000000000 +0200 @@ -1287,8 +1287,6 @@ RTA_PUT(skb, TCA_OPTIONS, 0, NULL); RTA_PUT(skb, TCA_HTB_INIT, sizeof(gopt), &gopt); rta->rta_len = skb->tail - b; - sch->stats.qlen = sch->q.qlen; - RTA_PUT(skb, TCA_STATS, sizeof(sch->stats), &sch->stats); HTB_QUNLOCK(sch); return skb->len; rtattr_failure: --- linux-2.4.28-pre4-bk6.orig/net/sched/sch_hfsc.c 2004-10-22 10:58:23.000000000 +0200 +++ linux-2.4.28-pre4-bk6/net/sched/sch_hfsc.c 2004-10-22 11:00:46.000000000 +0200 @@ -1628,10 +1628,6 @@ qopt.defcls = q->defcls; RTA_PUT(skb, TCA_OPTIONS, sizeof(qopt), &qopt); - sch->stats.qlen = sch->q.qlen; - if (qdisc_copy_stats(skb, &sch->stats) < 0) - goto rtattr_failure; - return skb->len; rtattr_failure: From romieu@fr.zoreil.com Fri Oct 22 03:54:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 03:54:40 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MAsVrw004330 for ; Fri, 22 Oct 2004 03:54:32 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i9MAqOvr026730; Fri, 22 Oct 2004 12:52:25 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i9MAqOSH026729; Fri, 22 Oct 2004 12:52:24 +0200 Date: Fri, 22 Oct 2004 12:52:24 +0200 From: Francois Romieu To: Eamonn Hamilton Cc: netdev Subject: Re: linux 2.6.9: r8169: eth0: PCI error (status: 0x8404). Device disabled. Message-ID: <20041022105224.GA26714@electric-eye.fr.zoreil.com> References: <1098269117.6631.5.camel@ukabzc383.uk.saic.com> <20041020121520.GA4004@electric-eye.fr.zoreil.com> <1098282567.6631.10.camel@ukabzc383.uk.saic.com> <20041020201010.GA13023@electric-eye.fr.zoreil.com> <1098350743.15528.40.camel@ukabzc383.uk.saic.com> <20041021120208.GA752@electric-eye.fr.zoreil.com> <1098437493.5513.8.camel@ukabzc383.uk.saic.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1098437493.5513.8.camel@ukabzc383.uk.saic.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 10715 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 Content-Length: 377 Lines: 15 Eamonn Hamilton : [...] > Testing the kernel with the error reset disabled just causes networking > to stop, with no reported error after copying data from the box for a > bit ( < 1GB ) At this point, can you have network traffic again is the device goes through closed/open or the module through rmmod/insmod ? > Hope this helps, Yes. -- Ueimor From hadi@cyberus.ca Fri Oct 22 04:09:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 04:09:22 -0700 (PDT) Received: from mx03.cybersurf.com (mx03.cybersurf.com [209.197.145.106]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MB9DmJ005358 for ; Fri, 22 Oct 2004 04:09:13 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.30) id 1CKxHr-0000J8-VE for netdev@oss.sgi.com; Fri, 22 Oct 2004 07:08:47 -0400 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CKxHV-00026S-M3; Fri, 22 Oct 2004 07:08:25 -0400 Subject: Re: [PATCHSET 0/16] More gnet_stats conversions From: jamal Reply-To: hadi@cyberus.ca To: "David S. Miller" Cc: Thomas Graf , netdev@oss.sgi.com In-Reply-To: <20041021224812.4a7e2c35.davem@davemloft.net> References: <20041021123209.GE21977@postel.suug.ch> <20041021224812.4a7e2c35.davem@davemloft.net> Content-Type: text/plain Organization: jamalopolous Message-Id: <1098443298.1114.45.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 22 Oct 2004 07:08:18 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 10716 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev Content-Length: 208 Lines: 13 On Fri, 2004-10-22 at 01:48, David S. Miller wrote: > Thomas has been a very busy boy :-) Yes, he has been ;-> > All nice and straightforward transformations, nice work. Good work Thomas. cheers, jamal From hadi@cyberus.ca Fri Oct 22 04:30:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 04:30:16 -0700 (PDT) Received: from mx02.cybersurf.com (mx02.cybersurf.com [209.197.145.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MBU6js009448 for ; Fri, 22 Oct 2004 04:30:06 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1CKxcC-0006cF-93 for netdev@oss.sgi.com; Fri, 22 Oct 2004 07:29:48 -0400 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CKxcB-0004RB-8X; Fri, 22 Oct 2004 07:29:47 -0400 Subject: Re: Allowing netlink_family to be any integer (was: [PATCH 2.6] iptables CLUSTERIP target) From: jamal Reply-To: hadi@cyberus.ca To: Herbert Xu , Evgeniy Polyakov Cc: Harald Welte , lmb@suse.de, ahu@ds9a.nl, hch@infradead.org, netdev@oss.sgi.com, "David S. Miller" In-Reply-To: References: Content-Type: text/plain Organization: jamalopolous Message-Id: <1098444579.1112.66.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 22 Oct 2004 07:29:39 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 10717 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev Content-Length: 1422 Lines: 38 Evgeniy Polyakov(aka mr. Sean Paul) posted code a while back for something that uses netlink that he calls "kernel Konnector". I think thats a good idea which will ease the use of those limited numbers. It also has potential for generic kernel-kernel as well as kernel-userspace messaging subsystem. I printed the code, got a large cup of brazillian-derived cappucino but alas got preempted before finishing the rewiew. Maybe you could work with him Herbert? I still plan to continue looking at it. This does not exclude the use of the netlink numbers, but should ease them. cheers, jamal On Thu, 2004-10-21 at 17:31, Herbert Xu wrote: > Harald Welte wrote: > > > > For supporting two primitive operation, adding a new netlink address > > family also isn't worthwhile, especially since we're short of netlink > > families. > > That's something I'm looking into as well. The current strategy of > either creating a new family or tacking random things into RTNETLINK > is simply not going to scale. > > Initially I considered an interface where kernel users can register > themselves using a string as the key. But I soon realised that we > could simply allow the netlink_family field to be an arbitrary integer > that is used as a key to a hash table. > > The CPU cost of the hash table isn't too bad since you'll only be > looking it up when the socket is created. > > Comments anyone? From herbert@gondor.apana.org.au Fri Oct 22 04:41:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 04:41:30 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MBfBRP009928 for ; Fri, 22 Oct 2004 04:41:12 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CKxm0-0000De-00; Fri, 22 Oct 2004 21:39:56 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CKxlj-0002PV-00; Fri, 22 Oct 2004 21:39:39 +1000 Date: Fri, 22 Oct 2004 21:39:39 +1000 To: jamal Cc: Evgeniy Polyakov , Harald Welte , lmb@suse.de, ahu@ds9a.nl, hch@infradead.org, netdev@oss.sgi.com, "David S. Miller" Subject: Re: Allowing netlink_family to be any integer (was: [PATCH 2.6] iptables CLUSTERIP target) Message-ID: <20041022113939.GA812@gondor.apana.org.au> References: <1098444579.1112.66.camel@jzny.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1098444579.1112.66.camel@jzny.localdomain> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10718 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 567 Lines: 16 On Fri, Oct 22, 2004 at 07:29:39AM -0400, jamal wrote: > > Evgeniy Polyakov(aka mr. Sean Paul) posted code a while back for > something that uses netlink that he calls "kernel Konnector". I think That patch puts the ID in each message, right? That would mean paying the lookup cost for each message rather than once when you create the socket. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From lukasz@trabinski.net Fri Oct 22 04:56:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 04:56:45 -0700 (PDT) Received: from portraits.wsisiz.edu.pl (root@portraits.wsisiz.edu.pl [213.135.44.34]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MBud8P021028 for ; Fri, 22 Oct 2004 04:56:40 -0700 Received: from portraits.wsisiz.edu.pl (uucp@localhost [127.0.0.1]) by portraits.wsisiz.edu.pl (8.13.0/8.13.0) with ESMTP id i9MBuGoG019827; Fri, 22 Oct 2004 13:56:17 +0200 Received: (from uucp@localhost) by portraits.wsisiz.edu.pl (8.13.0/8.13.0/Submit) with UUCP id i9MBuGWw019826; Fri, 22 Oct 2004 13:56:16 +0200 Received: from lt.wsisiz.edu.pl (IDENT:m37n5t2SegfEGv7tWE7AbYpSkxZCqZHB@localhost [127.0.0.1]) by lt.wsisiz.edu.pl (8.12.11/8.12.11) with ESMTP id i9MBu7F7002759; Fri, 22 Oct 2004 13:56:07 +0200 Received: from localhost (lukasz@localhost) by lt.wsisiz.edu.pl (8.12.11/8.12.11/Submit) with ESMTP id i9MBu1Pe002756; Fri, 22 Oct 2004 13:56:06 +0200 X-Authentication-Warning: lt.wsisiz.edu.pl: lukasz owned process doing -bs Date: Fri, 22 Oct 2004 13:56:01 +0200 (CEST) From: Lukasz Trabinski X-X-Sender: lukasz@lt.wsisiz.edu.pl To: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= cc: netdev@oss.sgi.com Subject: Re: unregister_netdevice 2.6.9 In-Reply-To: <20041020.154045.128392519.yoshfuji@linux-ipv6.org> Message-ID: References: <20041020.154045.128392519.yoshfuji@linux-ipv6.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-2 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.4 (portraits.wsisiz.edu.pl [0.0.0.0]); Fri, 22 Oct 2004 13:56:17 +0200 (CEST) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by oss.sgi.com id i9MBud8P021028 X-archive-position: 10719 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: lukasz@trabinski.net Precedence: bulk X-list: netdev Content-Length: 315 Lines: 16 On Wed, 20 Oct 2004, YOSHIFUJI Hideaki / ???? wrote: > > After shutdown/reboot : > > > > unregister_netdevice: waiting for xxxx to become free. Usage count = 1 > > > > and still wait. > > Does this fix your problem? I have just applied this patch, but i have still problem with unregister_netdevice. -- £T From chas@cmf.nrl.navy.mil Fri Oct 22 05:08:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 05:08:19 -0700 (PDT) Received: from ginger.cmf.nrl.navy.mil (ginger.cmf.nrl.navy.mil [134.207.10.161]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MC8BAl021615 for ; Fri, 22 Oct 2004 05:08:12 -0700 Received: from cmf.nrl.navy.mil (thirdoffive.cmf.nrl.navy.mil [134.207.10.180]) by ginger.cmf.nrl.navy.mil (8.12.11/8.12.11) with ESMTP id i9MC3Ecw003142; Fri, 22 Oct 2004 08:03:14 -0400 (EDT) Message-Id: <200410221203.i9MC3Ecw003142@ginger.cmf.nrl.navy.mil> To: Christoph Hellwig cc: netdev@oss.sgi.com, davem@redhat.com Subject: Re: [PATCH][ATM]: [horizon] eliminate pci_find_device() In-reply-to: Your message of "Thu, 21 Oct 2004 12:39:49 BST." <20041021113949.GB3720@infradead.org> Date: Fri, 22 Oct 2004 08:03:15 -0400 From: "chas williams (contractor)" X-Virus-Scanned: NAI Completed X-Scanned-By: MIMEDefang 2.30 (www . roaringpenguin . com / mimedefang) X-archive-position: 10720 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chas@cmf.nrl.navy.mil Precedence: bulk X-list: netdev Content-Length: 13028 Lines: 469 In message <20041021113949.GB3720@infradead.org>,Christoph Hellwig writes: >The same device list comments as for ambassador apply here aswell. better? # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/22 08:02:03-04:00 chas@relax.cmf.nrl.navy.mil # horizon.h, horizon.c: # [ATM]: [horizon] eliminate pci_find_device() # # drivers/atm/horizon.h # 2004/10/22 08:01:18-04:00 chas@relax.cmf.nrl.navy.mil +1 -1 # [ATM]: [horizon] eliminate pci_find_device() # # drivers/atm/horizon.c # 2004/10/22 08:01:05-04:00 chas@relax.cmf.nrl.navy.mil +156 -176 # [ATM]: [horizon] eliminate pci_find_device() # diff -Nru a/drivers/atm/horizon.c b/drivers/atm/horizon.c --- a/drivers/atm/horizon.c 2004-10-22 08:02:29 -04:00 +++ b/drivers/atm/horizon.c 2004-10-22 08:02:29 -04:00 @@ -354,8 +354,7 @@ /********** globals **********/ -static hrz_dev * hrz_devs = NULL; -static struct timer_list housekeeping; +static void do_housekeeping (unsigned long arg); static unsigned short debug = 0; static unsigned short vpi_bits = 0; @@ -1386,7 +1385,7 @@ static irqreturn_t interrupt_handler(int irq, void *dev_id, struct pt_regs *pt_regs) { - hrz_dev * dev = hrz_devs; + hrz_dev * dev = (hrz_dev *) dev_id; u32 int_source; unsigned int irq_ok; (void) pt_regs; @@ -1397,16 +1396,6 @@ PRINTD (DBG_IRQ|DBG_ERR, "irq with NULL dev_id: %d", irq); return IRQ_NONE; } - // Did one of our cards generate the interrupt? - while (dev) { - if (dev == dev_id) - break; - dev = dev->prev; - } - if (!dev) { - PRINTD (DBG_IRQ, "irq not for me: %d", irq); - return IRQ_NONE; - } if (irq != dev->irq) { PRINTD (DBG_IRQ|DBG_ERR, "irq mismatch: %d", irq); return IRQ_NONE; @@ -1462,28 +1451,18 @@ /********** housekeeping **********/ -static void set_timer (struct timer_list * timer, unsigned int delay) { - timer->expires = jiffies + delay; - add_timer (timer); - return; -} - static void do_housekeeping (unsigned long arg) { // just stats at the moment - hrz_dev * dev = hrz_devs; - (void) arg; - // data is set to zero at module unload - if (housekeeping.data) { - while (dev) { - // collect device-specific (not driver/atm-linux) stats here - dev->tx_cell_count += rd_regw (dev, TX_CELL_COUNT_OFF); - dev->rx_cell_count += rd_regw (dev, RX_CELL_COUNT_OFF); - dev->hec_error_count += rd_regw (dev, HEC_ERROR_COUNT_OFF); - dev->unassigned_cell_count += rd_regw (dev, UNASSIGNED_CELL_COUNT_OFF); - dev = dev->prev; - } - set_timer (&housekeeping, HZ/10); - } + hrz_dev * dev = (hrz_dev *) arg; + + // collect device-specific (not driver/atm-linux) stats here + dev->tx_cell_count += rd_regw (dev, TX_CELL_COUNT_OFF); + dev->rx_cell_count += rd_regw (dev, RX_CELL_COUNT_OFF); + dev->hec_error_count += rd_regw (dev, HEC_ERROR_COUNT_OFF); + dev->unassigned_cell_count += rd_regw (dev, UNASSIGNED_CELL_COUNT_OFF); + + mod_timer (&dev->housekeeping, jiffies + HZ/10); + return; } @@ -2719,157 +2698,176 @@ .owner = THIS_MODULE, }; -static int __init hrz_probe (void) { - struct pci_dev * pci_dev; - int devs; - - PRINTD (DBG_FLOW, "hrz_probe"); - - devs = 0; - pci_dev = NULL; - while ((pci_dev = pci_find_device - (PCI_VENDOR_ID_MADGE, PCI_DEVICE_ID_MADGE_HORIZON, pci_dev) - )) { - hrz_dev * dev; - - // adapter slot free, read resources from PCI configuration space - u32 iobase = pci_resource_start (pci_dev, 0); - u32 * membase = bus_to_virt (pci_resource_start (pci_dev, 1)); - u8 irq = pci_dev->irq; - - /* XXX DEV_LABEL is a guess */ - if (!request_region (iobase, HRZ_IO_EXTENT, DEV_LABEL)) - continue; - - if (pci_enable_device (pci_dev)) - continue; - - dev = kmalloc (sizeof(hrz_dev), GFP_KERNEL); - if (!dev) { - // perhaps we should be nice: deregister all adapters and abort? - PRINTD (DBG_ERR, "out of memory"); - continue; - } - - memset (dev, 0, sizeof(hrz_dev)); - - // grab IRQ and install handler - move this someplace more sensible - if (request_irq (irq, - interrupt_handler, - SA_SHIRQ, /* irqflags guess */ - DEV_LABEL, /* name guess */ - dev)) { - PRINTD (DBG_WARN, "request IRQ failed!"); - // free_irq is at "endif" - } else { - - PRINTD (DBG_INFO, "found Madge ATM adapter (hrz) at: IO %x, IRQ %u, MEM %p", - iobase, irq, membase); - - dev->atm_dev = atm_dev_register (DEV_LABEL, &hrz_ops, -1, NULL); - if (!(dev->atm_dev)) { - PRINTD (DBG_ERR, "failed to register Madge ATM adapter"); - } else { +static int __devinit hrz_probe(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent) +{ + hrz_dev * dev; + int err = 0; + + // adapter slot free, read resources from PCI configuration space + u32 iobase = pci_resource_start (pci_dev, 0); + u32 * membase = bus_to_virt (pci_resource_start (pci_dev, 1)); + u8 irq = pci_dev->irq; unsigned char lat; - - PRINTD (DBG_INFO, "registered Madge ATM adapter (no. %d) (%p) at %p", - dev->atm_dev->number, dev, dev->atm_dev); + + PRINTD (DBG_FLOW, "hrz_probe"); + + /* XXX DEV_LABEL is a guess */ + if (!request_region(iobase, HRZ_IO_EXTENT, DEV_LABEL)) + return -EINVAL; + + if (pci_enable_device(pci_dev)) { + err = -EINVAL; + goto out_release; + } + + dev = kmalloc(sizeof(hrz_dev), GFP_KERNEL); + if (!dev) { + // perhaps we should be nice: deregister all adapters and abort? + PRINTD(DBG_ERR, "out of memory"); + err = -ENOMEM; + goto out_disable; + } + + memset(dev, 0, sizeof(hrz_dev)); + + pci_set_drvdata(pci_dev, dev); + + // grab IRQ and install handler - move this someplace more sensible + if (request_irq(irq, + interrupt_handler, + SA_SHIRQ, /* irqflags guess */ + DEV_LABEL, /* name guess */ + dev)) { + PRINTD(DBG_WARN, "request IRQ failed!"); + err = -EINVAL; + goto out_free; + } + + PRINTD(DBG_INFO, "found Madge ATM adapter (hrz) at: IO %x, IRQ %u, MEM %p", + iobase, irq, membase); + + dev->atm_dev = atm_dev_register(DEV_LABEL, &hrz_ops, -1, NULL); + if (!(dev->atm_dev)) { + PRINTD(DBG_ERR, "failed to register Madge ATM adapter"); + err = -EINVAL; + goto out_free_irq; + } + + PRINTD(DBG_INFO, "registered Madge ATM adapter (no. %d) (%p) at %p", + dev->atm_dev->number, dev, dev->atm_dev); dev->atm_dev->dev_data = (void *) dev; dev->pci_dev = pci_dev; - + // enable bus master accesses - pci_set_master (pci_dev); - + pci_set_master(pci_dev); + // frobnicate latency (upwards, usually) - pci_read_config_byte (pci_dev, PCI_LATENCY_TIMER, &lat); + pci_read_config_byte(pci_dev, PCI_LATENCY_TIMER, &lat); if (pci_lat) { - PRINTD (DBG_INFO, "%s PCI latency timer from %hu to %hu", - "changing", lat, pci_lat); - pci_write_config_byte (pci_dev, PCI_LATENCY_TIMER, pci_lat); + PRINTD(DBG_INFO, "%s PCI latency timer from %hu to %hu", + "changing", lat, pci_lat); + pci_write_config_byte(pci_dev, PCI_LATENCY_TIMER, pci_lat); } else if (lat < MIN_PCI_LATENCY) { - PRINTK (KERN_INFO, "%s PCI latency timer from %hu to %hu", - "increasing", lat, MIN_PCI_LATENCY); - pci_write_config_byte (pci_dev, PCI_LATENCY_TIMER, MIN_PCI_LATENCY); + PRINTK(KERN_INFO, "%s PCI latency timer from %hu to %hu", + "increasing", lat, MIN_PCI_LATENCY); + pci_write_config_byte(pci_dev, PCI_LATENCY_TIMER, MIN_PCI_LATENCY); } - + dev->iobase = iobase; dev->irq = irq; dev->membase = membase; - + dev->rx_q_entry = dev->rx_q_reset = &memmap->rx_q_entries[0]; dev->rx_q_wrap = &memmap->rx_q_entries[RX_CHANS-1]; - + // these next three are performance hacks dev->last_vc = -1; dev->tx_last = -1; dev->tx_idle = 0; - + dev->tx_regions = 0; dev->tx_bytes = 0; dev->tx_skb = NULL; dev->tx_iovec = NULL; - + dev->tx_cell_count = 0; dev->rx_cell_count = 0; dev->hec_error_count = 0; dev->unassigned_cell_count = 0; - + dev->noof_spare_buffers = 0; - + { - unsigned int i; - for (i = 0; i < TX_CHANS; ++i) - dev->tx_channel_record[i] = -1; + unsigned int i; + for (i = 0; i < TX_CHANS; ++i) + dev->tx_channel_record[i] = -1; } - + dev->flags = 0; - + // Allocate cell rates and remember ASIC version // Fibre: ATM_OC3_PCR = 1555200000/8/270*260/53 - 29/53 // Copper: (WRONG) we want 6 into the above, close to 25Mb/s // Copper: (plagarise!) 25600000/8/270*260/53 - n/53 - - if (hrz_init (dev)) { - // to be really pedantic, this should be ATM_OC3c_PCR - dev->tx_avail = ATM_OC3_PCR; - dev->rx_avail = ATM_OC3_PCR; - set_bit (ultra, &dev->flags); // NOT "|= ultra" ! + + if (hrz_init(dev)) { + // to be really pedantic, this should be ATM_OC3c_PCR + dev->tx_avail = ATM_OC3_PCR; + dev->rx_avail = ATM_OC3_PCR; + set_bit(ultra, &dev->flags); // NOT "|= ultra" ! } else { - dev->tx_avail = ((25600000/8)*26)/(27*53); - dev->rx_avail = ((25600000/8)*26)/(27*53); - PRINTD (DBG_WARN, "Buggy ASIC: no TX bus-mastering."); + dev->tx_avail = ((25600000/8)*26)/(27*53); + dev->rx_avail = ((25600000/8)*26)/(27*53); + PRINTD(DBG_WARN, "Buggy ASIC: no TX bus-mastering."); } - + // rate changes spinlock - spin_lock_init (&dev->rate_lock); - + spin_lock_init(&dev->rate_lock); + // on-board memory access spinlock; we want atomic reads and // writes to adapter memory (handles IRQ and SMP) - spin_lock_init (&dev->mem_lock); - - init_waitqueue_head (&dev->tx_queue); - + spin_lock_init(&dev->mem_lock); + + init_waitqueue_head(&dev->tx_queue); + // vpi in 0..4, vci in 6..10 dev->atm_dev->ci_range.vpi_bits = vpi_bits; dev->atm_dev->ci_range.vci_bits = 10-vpi_bits; - - // update count and linked list - ++devs; - dev->prev = hrz_devs; - hrz_devs = dev; - // success - continue; - - /* not currently reached */ - atm_dev_deregister (dev->atm_dev); - } /* atm_dev_register */ - free_irq (irq, dev); - - } /* request_irq */ - kfree (dev); - release_region(iobase, HRZ_IO_EXTENT); - } /* kmalloc and while */ - return devs; + + init_timer(&dev->housekeeping); + dev->housekeeping.function = do_housekeeping; + dev->housekeeping.data = (unsigned long) dev; + mod_timer(&dev->housekeeping, jiffies); + +out: + return err; + +out_free_irq: + free_irq(dev->irq, dev); +out_free: + kfree(dev); +out_disable: + pci_disable_device(pci_dev); +out_release: + release_region(iobase, HRZ_IO_EXTENT); + goto out; +} + +static void __devexit hrz_remove_one(struct pci_dev *pci_dev) +{ + hrz_dev *dev; + + dev = pci_get_drvdata(pci_dev); + + PRINTD(DBG_INFO, "closing %p (atm_dev = %p)", dev, dev->atm_dev); + del_timer_sync(&dev->housekeeping); + hrz_reset(dev); + atm_dev_deregister(dev->atm_dev); + free_irq(dev->irq, dev); + release_region(dev->iobase, HRZ_IO_EXTENT); + kfree(dev); + + pci_disable_device(pci_dev); } static void __init hrz_check_args (void) { @@ -2909,11 +2907,22 @@ MODULE_PARM_DESC(max_rx_size, "maximum size of RX AAL5 frames"); MODULE_PARM_DESC(pci_lat, "PCI latency in bus cycles"); +static struct pci_device_id hrz_pci_tbl[] = { + { PCI_VENDOR_ID_MADGE, PCI_DEVICE_ID_MADGE_HORIZON, PCI_ANY_ID, PCI_ANY_ID, + 0, 0, 0 }, + { 0, } +}; + +static struct pci_driver hrz_driver = { + .name = "horizon", + .probe = hrz_probe, + .remove = __devexit_p(hrz_remove_one), + .id_table = hrz_pci_tbl, +}; + /********** module entry **********/ static int __init hrz_module_init (void) { - int devs; - // sanity check - cast is needed since printk does not support %Zu if (sizeof(struct MEMMAP) != 128*1024/4) { PRINTK (KERN_ERR, "Fix struct MEMMAP (is %lu fakewords).", @@ -2927,44 +2936,15 @@ hrz_check_args(); // get the juice - devs = hrz_probe(); - - if (devs) { - init_timer (&housekeeping); - housekeeping.function = do_housekeeping; - // paranoia - housekeeping.data = 1; - set_timer (&housekeeping, 0); - } else { - PRINTK (KERN_ERR, "no (usable) adapters found"); - } - - return devs ? 0 : -ENODEV; + return pci_module_init(&hrz_driver); } /********** module exit **********/ static void __exit hrz_module_exit (void) { - hrz_dev * dev; PRINTD (DBG_FLOW, "cleanup_module"); - // paranoia - housekeeping.data = 0; - del_timer (&housekeeping); - - while (hrz_devs) { - dev = hrz_devs; - hrz_devs = dev->prev; - - PRINTD (DBG_INFO, "closing %p (atm_dev = %p)", dev, dev->atm_dev); - hrz_reset (dev); - atm_dev_deregister (dev->atm_dev); - free_irq (dev->irq, dev); - release_region (dev->iobase, HRZ_IO_EXTENT); - kfree (dev); - } - - return; + return pci_unregister_driver(&hrz_driver); } module_init(hrz_module_init); diff -Nru a/drivers/atm/horizon.h b/drivers/atm/horizon.h --- a/drivers/atm/horizon.h 2004-10-22 08:02:29 -04:00 +++ b/drivers/atm/horizon.h 2004-10-22 08:02:29 -04:00 @@ -457,7 +457,7 @@ unsigned long unassigned_cell_count; struct pci_dev * pci_dev; - struct hrz_dev * prev; + struct timer_list housekeeping; }; typedef struct hrz_dev hrz_dev; From hadi@cyberus.ca Fri Oct 22 05:20:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 05:20:21 -0700 (PDT) Received: from mx03.cybersurf.com (mx03.cybersurf.com [209.197.145.106]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MCKGZX022166 for ; Fri, 22 Oct 2004 05:20:17 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.30) id 1CKyOl-0000AS-Hv for netdev@oss.sgi.com; Fri, 22 Oct 2004 08:19:59 -0400 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CKyOn-0002Te-Q5; Fri, 22 Oct 2004 08:20:02 -0400 Subject: Re: Allowing netlink_family to be any integer (was: [PATCH 2.6] iptables CLUSTERIP target) From: jamal Reply-To: hadi@cyberus.ca To: Herbert Xu Cc: Evgeniy Polyakov , Harald Welte , lmb@suse.de, ahu@ds9a.nl, hch@infradead.org, netdev@oss.sgi.com, "David S. Miller" In-Reply-To: <20041022113939.GA812@gondor.apana.org.au> References: <1098444579.1112.66.camel@jzny.localdomain> <20041022113939.GA812@gondor.apana.org.au> Content-Type: text/plain Organization: jamalopolous Message-Id: <1098447593.1112.77.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 22 Oct 2004 08:19:54 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 10721 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev Content-Length: 765 Lines: 23 On Fri, 2004-10-22 at 07:39, Herbert Xu wrote: > On Fri, Oct 22, 2004 at 07:29:39AM -0400, jamal wrote: > > > > Evgeniy Polyakov(aka mr. Sean Paul) posted code a while back for > > something that uses netlink that he calls "kernel Konnector". I think > > That patch puts the ID in each message, right? Yes, the ID is necessary for "routing" the message. Remember this is for a messaging subsystem so you cant avoid having something that is in the packet that is used to find where to go next. I was suggesting also messaging by name. > That would mean paying the lookup cost for each message rather than > once when you create the socket. > Take a look at the patch. See how it can be made better. Evgeniy, Do you have something new to post? cheers, jamal From herbert@gondor.apana.org.au Fri Oct 22 05:26:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 05:26:57 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MCQmUJ022629 for ; Fri, 22 Oct 2004 05:26:49 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CKyUM-0000av-00; Fri, 22 Oct 2004 22:25:46 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CKyU9-0002XS-00; Fri, 22 Oct 2004 22:25:33 +1000 Date: Fri, 22 Oct 2004 22:25:33 +1000 To: Thomas Graf Cc: Harald Welte , lmb@suse.de, ahu@ds9a.nl, hch@infradead.org, netdev@oss.sgi.com, davem@davemloft.net Subject: Re: Allowing netlink_family to be any integer (was: [PATCH 2.6] iptables CLUSTERIP target) Message-ID: <20041022122533.GA9713@gondor.apana.org.au> References: <20041021142527.GG3551@sunbeam.de.gnumonks.org> <20041021225315.GH19714@rei.reeler.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021225315.GH19714@rei.reeler.org> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10722 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 511 Lines: 15 On Fri, Oct 22, 2004 at 12:53:15AM +0200, Thomas Graf wrote: > > The only real problem I see is sk_protocol being only 8bit as > limiting factor. Well we wouldn't be using sk_protocol to look things up anymore. We'd be holding a reference on the family directly once the socket is created. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From johnpol@2ka.mipt.ru Fri Oct 22 05:29:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 05:29:57 -0700 (PDT) Received: from vocord.com (dea.vocord.ru [217.67.177.50]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MCTp5W022990 for ; Fri, 22 Oct 2004 05:29:52 -0700 Received: from [192.168.0.48] (uganda.factory.vocord.ru [192.168.0.48]) by vocord.com (8.12.11/8.12.11) with ESMTP id i9MCS5mL027815; Fri, 22 Oct 2004 16:28:08 +0400 Subject: Re: Allowing netlink_family to be any integer (was: [PATCH 2.6] iptables CLUSTERIP target) From: Evgeniy Polyakov Reply-To: johnpol@2ka.mipt.ru To: hadi@cyberus.ca Cc: Herbert Xu , Harald Welte , lmb@suse.de, ahu@ds9a.nl, hch@infradead.org, netdev@oss.sgi.com, "David S. Miller" In-Reply-To: <1098447593.1112.77.camel@jzny.localdomain> References: <1098444579.1112.66.camel@jzny.localdomain> <20041022113939.GA812@gondor.apana.org.au> <1098447593.1112.77.camel@jzny.localdomain> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-HXl5JTrDdsdSWwPTLq5P" Organization: MIPT Message-Id: <1098448359.5211.199.camel@uganda> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Fri, 22 Oct 2004 16:32:39 +0400 X-Virus-Scanned: clamd / ClamAV version 0.75.1, clamav-milter version 0.75c on dea.vocord.com X-Virus-Status: Clean X-archive-position: 10723 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: johnpol@2ka.mipt.ru Precedence: bulk X-list: netdev Content-Length: 1549 Lines: 52 --=-HXl5JTrDdsdSWwPTLq5P Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2004-10-22 at 16:19, jamal wrote: > On Fri, 2004-10-22 at 07:39, Herbert Xu wrote: > > On Fri, Oct 22, 2004 at 07:29:39AM -0400, jamal wrote: > > >=20 > > > Evgeniy Polyakov(aka mr. Sean Paul) posted code a while back for > > > something that uses netlink that he calls "kernel Konnector". I thin= k > >=20 > > That patch puts the ID in each message, right? >=20 > Yes, the ID is necessary for "routing" the message. Remember this is for > a messaging subsystem so you cant avoid having something that is in the > packet that is used to find where to go next. > I was suggesting also messaging by name. >=20 > > That would mean paying the lookup cost for each message rather than > > once when you create the socket. > >=20 >=20 > Take a look at the patch. See how it can be made better. > Evgeniy, Do you have something new to post? Nothing major, only multicast group selection by id. Although I think message sending mechanism can use unicast. Both have it's own advantages. > cheers, > jamal --=20 Evgeniy Polyakov Crash is better than data corruption. -- Art Grabowski --=-HXl5JTrDdsdSWwPTLq5P Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQBBeP3nIKTPhE+8wY0RArXvAJ4gsjSz2qu8IfAeF+yxFVKhSD00MACdFw5Z wFcp/DrOqTxn+26ZYjEmESA= =AHJB -----END PGP SIGNATURE----- --=-HXl5JTrDdsdSWwPTLq5P-- From hadi@cyberus.ca Fri Oct 22 05:53:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 05:53:34 -0700 (PDT) Received: from mx02.cybersurf.com (mx02.cybersurf.com [209.197.145.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MCrSFe023807 for ; Fri, 22 Oct 2004 05:53:28 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1CKyus-0006Kl-Ep for netdev@oss.sgi.com; Fri, 22 Oct 2004 08:53:10 -0400 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CKyus-0007Rq-DM; Fri, 22 Oct 2004 08:53:10 -0400 Subject: Re: Allowing netlink_family to be any integer (was: [PATCH 2.6] iptables CLUSTERIP target) From: jamal Reply-To: hadi@cyberus.ca To: Herbert Xu Cc: Thomas Graf , Harald Welte , lmb@suse.de, ahu@ds9a.nl, hch@infradead.org, netdev@oss.sgi.com, "David S. Miller" In-Reply-To: <20041022122533.GA9713@gondor.apana.org.au> References: <20041021142527.GG3551@sunbeam.de.gnumonks.org> <20041021225315.GH19714@rei.reeler.org> <20041022122533.GA9713@gondor.apana.org.au> Content-Type: text/plain Organization: jamalopolous Message-Id: <1098449582.1106.92.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 22 Oct 2004 08:53:02 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 10724 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev Content-Length: 907 Lines: 25 On Fri, 2004-10-22 at 08:25, Herbert Xu wrote: > On Fri, Oct 22, 2004 at 12:53:15AM +0200, Thomas Graf wrote: > > > > The only real problem I see is sk_protocol being only 8bit as > > limiting factor. > > Well we wouldn't be using sk_protocol to look things up anymore. > We'd be holding a reference on the family directly once the socket > is created. Thats why i said: This does not exclude the use of the netlink numbers, but should ease them. I think that rtnetlink is already overloaded and would benefit from having a clean split. As an example things like links and IPaddress should probably reside elsewhere since they are generic enough a service. Orthogal to this: If we could get more people to use the work from Evgeniy as opposed to creating a new netlink protocols, then it would benefit people - Harald could have used that scheme in what he was trying to do for example. cheers, jamal From mlindner@syskonnect.de Fri Oct 22 06:15:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 06:15:18 -0700 (PDT) Received: from gatekeeper.syskonnect.de (gatekeeper.syskonnect.de [213.144.13.149]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MDFAu2024748 for ; Fri, 22 Oct 2004 06:15:11 -0700 Received: from syskonnect.de (skd.de [10.9.15.1]) by gatekeeper.syskonnect.de (8.12.10/8.12.11) with ESMTP id i9MDExkT027262; Fri, 22 Oct 2004 15:14:59 +0200 (MET DST) Received: from [10.9.1.171] (localhost [127.0.0.1]) by syskonnect.de (8.12.11/8.12.11) with ESMTP id i9MDErlf006426; Fri, 22 Oct 2004 15:14:53 +0200 (MEST) Message-ID: <417907C1.6050407@syskonnect.de> Date: Fri, 22 Oct 2004 15:14:41 +0200 From: Mirko Lindner User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com, jgarzik@pobox.com Subject: [PATCH] sk98lin: Driver update v7.09 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10725 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mlindner@syskonnect.de Precedence: bulk X-list: netdev Content-Length: 827 Lines: 29 Hi dev-list, Hi Jeff, here is the new version (v7.09) from our sk98lin driver for Kernel 2.6. Sorry for this huge patch but this version has a lot of new functions and changes. The driver was tested by our Test & Verification group and our OEM customers and include all kernel changes during the latest kernel release. Please send me an email if you like a version of the driver for kernel 2.4 or if you have any problems or questions. The new patch for BK version 2.6.9 bk6 can be find at: http://www.syskonnect.de/support/temp/sk98lin_v7.09_2.6.9-bk6_patch Cheers Mirko ====================== Patch 1/1] [SK98LIN]: Add: Support for PCI Express based chipsets Add: Support for Yukon EC chipset Add: Support for FE chipset Add: Support for wake on lan Add: Support for Ethtool Add: Support for rx polling interface From bunk@stusta.de Fri Oct 22 06:40:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 06:40:28 -0700 (PDT) Received: from mailout.stusta.mhn.de (emailhub.stusta.mhn.de [141.84.69.5]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9MDeLtR025627 for ; Fri, 22 Oct 2004 06:40:22 -0700 Received: (qmail 7734 invoked from network); 22 Oct 2004 13:40:00 -0000 Received: from r063144.stusta.swh.mhn.de (10.150.63.144) by mailhub.stusta.mhn.de with SMTP; 22 Oct 2004 13:40:00 -0000 Received: by r063144.stusta.swh.mhn.de (Postfix, from userid 1000) id 0B8BCBB661; Fri, 22 Oct 2004 15:39:29 +0200 (CEST) Date: Fri, 22 Oct 2004 15:39:29 +0200 From: Adrian Bunk To: Andrew Morton , David Hinds Cc: linux-kernel@vger.kernel.org, jgarzik@pobox.com, linux-net@vger.kernel.org, prism54-private@prism54.org, netdev@oss.sgi.com Subject: 2.6.9-mm1: pc_debug multiple definitions Message-ID: <20041022133929.GA2831@stusta.de> References: <20041022032039.730eb226.akpm@osdl.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041022032039.730eb226.akpm@osdl.org> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10726 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@stusta.de Precedence: bulk X-list: netdev Content-Length: 771 Lines: 30 The following compile error comes from Linus' tree: <-- snip --> ... LD drivers/built-in.o drivers/pcmcia/built-in.o(.bss+0xf20): multiple definition of `pc_debug' drivers/net/built-in.o(.data+0x24ae0): first defined here make[1]: *** [drivers/built-in.o] Error 1 <-- snip --> The pc_debug in drivers/pcmcia/ds.c was made non-static in Linus' tree, but the global definition of a global variable with such a generic name in drivers/net/wireless/prism54/islpci_mgt.c seems to be equally wrong. cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed From sven@zion.homelinux.com Fri Oct 22 07:38:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 07:39:04 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.188]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MEcw3E030205 for ; Fri, 22 Oct 2004 07:38:58 -0700 Received: from [212.227.126.160] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CL0Yz-0007Kj-00; Fri, 22 Oct 2004 16:38:41 +0200 Received: from [80.136.80.75] (helo=zion.homelinux.com) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1CL0Yy-0004bT-00; Fri, 22 Oct 2004 16:38:40 +0200 Received: from localhost (zion.homelinux.com [127.0.0.1]) by stage2.zion.homelinux.com (Postfix) with ESMTP id 033A92BEA3; Fri, 22 Oct 2004 16:38:38 +0200 (CEST) Received: from zion.homelinux.com ([127.0.0.1]) by localhost (zion [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 32438-07; Fri, 22 Oct 2004 16:38:37 +0200 (CEST) Received: by zion.homelinux.com (Postfix, from userid 1022) id 2447B2D210; Fri, 22 Oct 2004 16:38:37 +0200 (CEST) Date: Fri, 22 Oct 2004 16:38:37 +0200 From: Sven Schuster To: netdev@oss.sgi.com Cc: davem@davemloft.net Subject: [RFC/PATCH] check tcp_v4_md5_do_add retval in tcp-2.6 tree Message-ID: <20041022143837.GA1173@zion.homelinux.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pf9I7BMVVzbSWLtt" Content-Disposition: inline User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new-2.1.2 at zion.homelinux.com X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:38b5f051b8cd178556c5593940405c4a X-archive-position: 10727 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: schuster.sven@gmx.de Precedence: bulk X-list: netdev Content-Length: 2899 Lines: 104 --pf9I7BMVVzbSWLtt Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi everybody, hi David, after the recent posting asking for the tcp md5 implementation I checked out the tcp-2.6 repo and had a look at it. I found that in a few places the return value of tcp_v4_md5_do_add() isn't checked and then kmalloc()ed memory is not kfree()ed. This patch does this, or at least tries to...but I'm not sure if the kfree() on newkey is enough in tcp_v4_syn_recv_sock(), shouldn't we also call tcp_v4_destroy_sock() or something like that and sk_free() on newsk, too?? Also there is another case in tcp_minisocks.c::tcp_check_req() where tcp_v4_md5_do_add() is called indirectly over af_specific->md5_add(). What should be done there? RST the connection?? Regards Sven Schuster # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/22 12:12:11+02:00 sven@zion.homelinux.com=20 # tcp_ipv4.c: # [TCP-MD5]: check return values of tcp_v4_md5_do_add # # Signed-off-by: Sven Schuster #=20 # net/ipv4/tcp_ipv4.c # 2004/10/22 12:11:03+02:00 sven@zion.homelinux.com +10 -2 # [TCP-MD5]: check return values of tcp_v4_md5_do_add # # Signed-off-by: Sven Schuster #=20 diff -Nru a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c --- a/net/ipv4/tcp_ipv4.c 2004-10-22 12:13:42 +02:00 +++ b/net/ipv4/tcp_ipv4.c 2004-10-22 12:13:42 +02:00 @@ -1731,11 +1731,16 @@ * memory, then we end up not copying the key * across. Shucks. */ + int ret; char *newkey =3D kmalloc(key->keylen, GFP_ATOMIC); if (newkey) { memcpy(newkey, key->key, key->keylen); - tcp_v4_md5_do_add(newsk, inet_sk(sk)->daddr, + ret =3D tcp_v4_md5_do_add(newsk, inet_sk(sk)->daddr, newkey, key->keylen); + if (ret !=3D 0) { + kfree(newkey); + goto exit; + } } } } @@ -2334,6 +2339,7 @@ =20 static int tcp_v4_md5_add(struct sock *sk, struct tcp_rfc2385_cmd *cmd) { + int ret; unsigned char *newkey; =20 /* Was a key already defined for this address? @@ -2347,7 +2353,11 @@ return -EFAULT; } =20 - return tcp_v4_md5_do_add(sk, cmd->address, newkey, cmd->keylen); + ret =3D tcp_v4_md5_do_add(sk, cmd->address, newkey, cmd->keylen); + if (ret !=3D 0) + kfree(newkey); + + return ret; } =20 /* This can be called on a newly created socket, from other files */ --=20 Linux zion 2.6.9-rc1-mm4 #1 Tue Sep 7 12:57:19 CEST 2004 i686 athlon i386 G= NU/Linux 16:34:02 up 26 days, 15:48, 1 user, load average: 0.00, 0.01, 0.00 --pf9I7BMVVzbSWLtt Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBeRtto4FAdB2PneQRAqEeAJ9kUsXNzB77voGD04fuIERRb4hUeQCfdnNv n817BRfW14HZxPcT7wrC2ao= =OD2K -----END PGP SIGNATURE----- --pf9I7BMVVzbSWLtt-- From SRS0+9d681ae411de349a9b11+425+infradead.org+hch@phoenix.srs.infradead.org Fri Oct 22 07:52:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 07:52:56 -0700 (PDT) Received: from phoenix.infradead.org (phoenix.infradead.org [81.187.226.98]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MEqonj030803 for ; Fri, 22 Oct 2004 07:52:51 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.42 #1 (Red Hat Linux)) id 1CL0mR-0005AD-Kt; Fri, 22 Oct 2004 15:52:35 +0100 Date: Fri, 22 Oct 2004 15:52:35 +0100 From: Christoph Hellwig To: "chas williams (contractor)" Cc: Christoph Hellwig , netdev@oss.sgi.com, davem@redhat.com Subject: Re: [PATCH][ATM]: [horizon] eliminate pci_find_device() Message-ID: <20041022145235.GA19847@infradead.org> References: <20041021113949.GB3720@infradead.org> <200410221203.i9MC3Ecw003142@ginger.cmf.nrl.navy.mil> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410221203.i9MC3Ecw003142@ginger.cmf.nrl.navy.mil> User-Agent: Mutt/1.4.1i X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 10728 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: netdev Content-Length: 243 Lines: 8 On Fri, Oct 22, 2004 at 08:03:15AM -0400, chas williams (contractor) wrote: > In message <20041021113949.GB3720@infradead.org>,Christoph Hellwig writes: > >The same device list comments as for ambassador apply here aswell. > > better? yes. From SRS0+9d681ae411de349a9b11+425+infradead.org+hch@phoenix.srs.infradead.org Fri Oct 22 08:04:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 08:04:25 -0700 (PDT) Received: from phoenix.infradead.org (phoenix.infradead.org [81.187.226.98]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MF4KKI032319 for ; Fri, 22 Oct 2004 08:04:20 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.42 #1 (Red Hat Linux)) id 1CL0xW-0005CG-GF; Fri, 22 Oct 2004 16:04:02 +0100 Date: Fri, 22 Oct 2004 16:04:02 +0100 From: Christoph Hellwig To: Mirko Lindner Cc: netdev@oss.sgi.com, jgarzik@pobox.com Subject: Re: [PATCH] sk98lin: Driver update v7.09 Message-ID: <20041022150402.GA19928@infradead.org> References: <417907C1.6050407@syskonnect.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <417907C1.6050407@syskonnect.de> User-Agent: Mutt/1.4.1i X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 10729 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: netdev Content-Length: 747 Lines: 19 On Fri, Oct 22, 2004 at 03:14:41PM +0200, Mirko Lindner wrote: > Hi dev-list, > Hi Jeff, > > here is the new version (v7.09) from our sk98lin driver for Kernel 2.6. > Sorry for this huge patch but this version has a lot of new functions > and changes. The driver was tested by our Test & Verification group and > our OEM customers and include all kernel changes during the latest > kernel release. > > Please send me an email if you like a version of the driver for kernel > 2.4 or if you have any problems or questions. > > The new patch for BK version 2.6.9 bk6 can be find at: > http://www.syskonnect.de/support/temp/sk98lin_v7.09_2.6.9-bk6_patch Standard disclaimer: please submit small incremental patches that fix specific issue. From kernel@linuxace.com Fri Oct 22 11:54:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 11:55:01 -0700 (PDT) Received: from home.linuxace.com (adsl-67-120-171-161.dsl.lsan03.pacbell.net [67.120.171.161]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9MIstmm019028 for ; Fri, 22 Oct 2004 11:54:55 -0700 Received: (qmail 30733 invoked by uid 0); 22 Oct 2004 18:54:35 -0000 Date: Fri, 22 Oct 2004 11:54:35 -0700 From: Phil Oester To: Herbert Xu Cc: linux-net@vger.kernel.org, netdev@oss.sgi.com, "David S. Miller" Subject: Re: 2.6.9 failed assertion in tcp_timer.c Message-ID: <20041022185435.GA30709@linuxace.com> References: <20041019215054.GA17565@linuxace.com> <20041020164748.GA20905@linuxace.com> <20041020212651.GA8534@gondor.apana.org.au> <20041020225536.GA22179@linuxace.com> <20041021130339.GA19345@gondor.apana.org.au> <20041021165224.GA25399@linuxace.com> <20041021215743.GA23062@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041021215743.GA23062@gondor.apana.org.au> User-Agent: Mutt/1.4.1i X-archive-position: 10731 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kernel@linuxace.com Precedence: bulk X-list: netdev Content-Length: 1774 Lines: 47 On Fri, Oct 22, 2004 at 07:57:43AM +1000, Herbert Xu wrote: > On Thu, Oct 21, 2004 at 09:52:24AM -0700, Phil Oester wrote: > > > > KERNEL: assertion (!tcp_get_pcount(&tp->packets_out) || !skb_ > > queue_empty(&sk->sk_write_queue)) failed at net/ipv4/tcp_input.c (2496) > > Perhaps the MTU is growing upwards? Does this patch help? > > Dave, we need to use the skb's MSS in trim_head as otherwise the > counters will be screwed up. This patch gets it a bit further, but still panics (divide by 0?): divide error: 0000 [#1] SMP CPU: 0 EIP: 0060:[] Not tainted VLI EFLAGS: 00010246 (2.6.9) EIP is at tcp_set_skb_tso_segs+0x2c/0x50 eax: 000000f3 ebx: d75f5b00 ecx: 00000000 edx: 00000000 esi: 00000001 edi: d6c22460 ebp: d6c22650 esp: c035decc ds: 007b es: 007b ss: 0068 Process swapper (pid: 0, threadinfo=c035c000 task=c030eac0) Stack: d75f5b00 c029e858 d75f5b00 d75f5b00 d6c22460 fffffff5 c029f3dd c02971a6 00000002 000005b4 d6c22460 d6c22650 d6c224c4 c035df58 c02a148d 00000002 00004100 00000080 f7c52260 c0393bec c038bda0 f710f130 00000010 c035df4c Call Trace: [] tcp_trim_head+0x88/0xc0 [] tcp_retransmit_skb+0x8d/0x320 [] tcp_enter_loss+0x76/0x240 [] tcp_retransmit_timer+0xfd/0x430 [] tcp_write_timer+0xc9/0x100 [] tcp_write_timer+0x0/0x100 [] run_timer_softirq+0xd9/0x170 [] __do_softirq+0xb6/0xd0 [] do_softirq+0x2d/0x30 [] smp_apic_timer_interrupt+0x85/0xf0 [] apic_timer_interrupt+0x1a/0x20 [] default_idle+0x0/0x40 [] default_idle+0x2c/0x40 [] cpu_idle+0x3b/0x50 [] start_kernel+0x156/0x180 [] unknown_bootoption+0x0/0x180 From rddunlap@osdl.org Fri Oct 22 11:50:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 11:51:02 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MIouv5018736 for ; Fri, 22 Oct 2004 11:50:56 -0700 Received: from [172.20.1.27] (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9MIoTWL028097 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Fri, 22 Oct 2004 11:50:29 -0700 Message-ID: <4179543F.1020407@osdl.org> Date: Fri, 22 Oct 2004 11:41:03 -0700 From: "Randy.Dunlap" Organization: OSDL User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: jgarzik@pobox.net, netdev@oss.sgi.com, rl@hellgate.ch Subject: [PATCH] via-rhine: references __init code during resume Content-Type: multipart/mixed; boundary="------------090704010809020703050304" X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10730 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rddunlap@osdl.org Precedence: bulk X-list: netdev Content-Length: 1232 Lines: 41 This is a multi-part message in MIME format. --------------090704010809020703050304 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit -- ~Randy --------------090704010809020703050304 Content-Type: text/x-patch; name="via_rhine_mmio.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="via_rhine_mmio.patch" Fix __init section usage: rhine_resume calls enable_mmio, so latter cannot be __devinit; Error: ./drivers/net/via-rhine.o .text refers to 0000000000000925 R_X86_64_PC32 .init.text+0xfffffffffffffffc Signed-off-by: Randy Dunlap diffstat:= drivers/net/via-rhine.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -Naurp ./drivers/net/via-rhine.c~via_rhine_mmio ./drivers/net/via-rhine.c --- ./drivers/net/via-rhine.c~via_rhine_mmio 2004-10-18 14:55:28.000000000 -0700 +++ ./drivers/net/via-rhine.c 2004-10-22 10:10:58.928311448 -0700 @@ -627,7 +627,7 @@ static void rhine_chip_reset(struct net_ } #ifdef USE_MMIO -static void __devinit enable_mmio(long pioaddr, u32 quirks) +static void enable_mmio(long pioaddr, u32 quirks) { int n; if (quirks & rqRhineI) { --------------090704010809020703050304-- From vda@port.imtp.ilyichevsk.odessa.ua Fri Oct 22 12:00:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 12:00:48 -0700 (PDT) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9MJ0aah019629 for ; Fri, 22 Oct 2004 12:00:38 -0700 Received: (qmail 7084 invoked by alias); 22 Oct 2004 19:00:12 -0000 Received: from unknown (195.138.72.162) by 0 (195.66.192.168) with ESMTP; 22 Oct 2004 19:00:12 -0000 From: Denis Vlasenko To: linux-kernel@vger.kernel.org Subject: cannot up iface in 2.6.9, was working in 2.6.9-rc3 Date: Fri, 22 Oct 2004 21:59:26 +0300 User-Agent: KMail/1.5.4 Cc: netdev@oss.sgi.com, Jeff Garzik , Stephen Hemminger MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Message-Id: <200410222159.26369.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 10732 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: vda@port.imtp.ilyichevsk.odessa.ua Precedence: bulk X-list: netdev Content-Length: 2785 Lines: 60 I have an onboard VIA eth: # lspci 00:00.0 Host bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333] 00:01.0 PCI bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333 AGP] 00:0a.0 Network controller: Texas Instruments ACX 111 54Mbps Wireless Interface 00:0c.0 Network controller: Harris Semiconductor D-Links DWL-g650 A1 (rev 01) 00:10.0 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 80) 00:10.1 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 80) 00:10.2 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 80) 00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82) 00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge 00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C/VT8235 PIPC Bus Master IDE (rev 06) 00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50) 00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 74) 01:00.0 VGA compatible controller: nVidia Corporation NV11 [GeForce2 MX/MX 400] (rev a1) It cannot be upped: # ip l set dev if up SIOCSIFFLAGS: Function not implemented # ifconfig if up SIOCSIFFLAGS: Function not implemented # busybox ip l set dev if up SIOCSIFFLAGS: Function not implemented Strace (busybox one is smallest): execve("/usr/bin/busybox", ["busybox", "ip", "l", "set", "dev", "if", "up"], [/* 28 vars */]) = 0 fcntl64(0, F_GETFD) = 0 fcntl64(1, F_GETFD) = 0 fcntl64(2, F_GETFD) = 0 uname({sys="Linux", node="shadow", ...}) = 0 geteuid32() = 0 getuid32() = 0 getegid32() = 0 getgid32() = 0 brk(0) = 0x81ab000 brk(0x81ac000) = 0x81ac000 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4 ioctl(4, 0x8913, 0xbffff9e0) = 0 ioctl(4, 0x8914, 0xbffff9e0) = -1 ENOSYS (Function not implemented) dup(2) = 5 fcntl64(5, F_GETFL) = 0x2 (flags O_RDWR) fstat64(5, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 2), ...}) = 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40000000 _llseek(5, 0, 0xbffff830, SEEK_CUR) = -1 ESPIPE (Illegal seek) write(5, "SIOCSIFFLAGS: Function not imple"..., 39) = 39 close(5) = 0 munmap(0x40000000, 4096) = 0 close(4) = 0 write(2, "BusyBox v1.00-pre8 (2004.03.31-2"..., 295) = 295 _exit(1) It was working in 2.6.9-rc3. drivers/net/via-rhine.c did not change between rc3 and "official" 2.6.9 -- vda From shemminger@osdl.org Fri Oct 22 12:16:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 12:16:55 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MJGp2v020431 for ; Fri, 22 Oct 2004 12:16:51 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9MJGUWL030271 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 22 Oct 2004 12:16:30 -0700 Date: Fri, 22 Oct 2004 12:17:41 -0700 From: Stephen Hemminger To: Denis Vlasenko Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Jeff Garzik Subject: Re: cannot up iface in 2.6.9, was working in 2.6.9-rc3 Message-Id: <20041022121741.32d6732f@zqx3.pdx.osdl.net> In-Reply-To: <200410222159.26369.vda@port.imtp.ilyichevsk.odessa.ua> References: <200410222159.26369.vda@port.imtp.ilyichevsk.odessa.ua> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10733 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 Content-Length: 3135 Lines: 66 On Fri, 22 Oct 2004 21:59:26 +0300 Denis Vlasenko wrote: > I have an onboard VIA eth: > > # lspci > 00:00.0 Host bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333] > 00:01.0 PCI bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333 AGP] > 00:0a.0 Network controller: Texas Instruments ACX 111 54Mbps Wireless Interface > 00:0c.0 Network controller: Harris Semiconductor D-Links DWL-g650 A1 (rev 01) > 00:10.0 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 80) > 00:10.1 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 80) > 00:10.2 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 80) > 00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82) > 00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge > 00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C/VT8235 PIPC Bus Master IDE (rev 06) > 00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50) > 00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 74) > 01:00.0 VGA compatible controller: nVidia Corporation NV11 [GeForce2 MX/MX 400] (rev a1) > > It cannot be upped: > > # ip l set dev if up > SIOCSIFFLAGS: Function not implemented > # ifconfig if up > SIOCSIFFLAGS: Function not implemented > # busybox ip l set dev if up > SIOCSIFFLAGS: Function not implemented > > Strace (busybox one is smallest): > > execve("/usr/bin/busybox", ["busybox", "ip", "l", "set", "dev", "if", "up"], [/* 28 vars */]) = 0 > fcntl64(0, F_GETFD) = 0 > fcntl64(1, F_GETFD) = 0 > fcntl64(2, F_GETFD) = 0 > uname({sys="Linux", node="shadow", ...}) = 0 > geteuid32() = 0 > getuid32() = 0 > getegid32() = 0 > getgid32() = 0 > brk(0) = 0x81ab000 > brk(0x81ac000) = 0x81ac000 > socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4 > ioctl(4, 0x8913, 0xbffff9e0) = 0 > ioctl(4, 0x8914, 0xbffff9e0) = -1 ENOSYS (Function not implemented) > dup(2) = 5 > fcntl64(5, F_GETFL) = 0x2 (flags O_RDWR) > fstat64(5, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 2), ...}) = 0 > old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40000000 > _llseek(5, 0, 0xbffff830, SEEK_CUR) = -1 ESPIPE (Illegal seek) > write(5, "SIOCSIFFLAGS: Function not imple"..., 39) = 39 > close(5) = 0 > munmap(0x40000000, 4096) = 0 > close(4) = 0 > write(2, "BusyBox v1.00-pre8 (2004.03.31-2"..., 295) = 295 > _exit(1) > > It was working in 2.6.9-rc3. > > drivers/net/via-rhine.c did not change between rc3 and "official" 2.6.9 > -- > vda It probably isn't the via driver at all, but something in the ioctl layer. Try it without using the busybox version of ifconfig and ip. From sri@us.ibm.com Fri Oct 22 12:25:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 12:25:26 -0700 (PDT) Received: from e5.ny.us.ibm.com (e5.ny.us.ibm.com [32.97.182.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MJPJWa024243 for ; Fri, 22 Oct 2004 12:25:19 -0700 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e5.ny.us.ibm.com (8.12.10/8.12.9) with ESMTP id i9MJOnpA334440; Fri, 22 Oct 2004 15:24:49 -0400 Received: from w-sridhar.beaverton.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay04.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i9MJOmJ5204116; Fri, 22 Oct 2004 15:24:48 -0400 Date: Fri, 22 Oct 2004 12:24:47 -0700 (PDT) From: Sridhar Samudrala X-X-Sender: sridhar@w-sridhar.beaverton.ibm.com To: davem@redhat.com cc: netdev@oss.sgi.com, lksctp-developers@lists.sourceforge.net Subject: [BK PATCH] 2.6 & 2.4 SCTP updates Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 10734 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sri@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 20298 Lines: 664 Dave, Please do a bk pull http://linux-lksctp.bkbits.net/lksctp-2.5.work & bk pull http://linux-lksctp.bkbits.net/lksctp-2.4.work to get the following SCTP updates to 2.6 and 2.4. Thanks Sridhar # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/21 15:38:41-07:00 sri@us.ibm.com # [SCTP] Fix HEARTBEAT_ACKs being sent to wrong dest. ip address in a # multi-homing scenario after a failback. # # Signed-off-by: Jorge Hernandez-Herrero # Signed-off-by: Sridhar Samudrala # # net/sctp/outqueue.c # # ChangeSet # 2004/10/21 15:32:54-07:00 sri@us.ibm.com # [SCTP] When an address is deleted, update any transports that are caching it as a source adddress. # # Signed-off-by: Sridhar Samudrala # # net/sctp/sm_make_chunk.c # # ChangeSet # 2004/10/21 15:28:41-07:00 sri@us.ibm.com # [SCTP] Update cwnd/ssthresh as per the sctpimpguide modifications. # # Signed-off-by: Sridhar Samudrala # # net/sctp/transport.c # net/sctp/associola.c # # ChangeSet # 2004/10/21 15:21:31-07:00 sri@us.ibm.com # [SCTP] Adaption layer indication support. # # Add support for SCTP_ADAPTION_INDICATION notification, SCTP_ADAPTION_LAYER # socket option and SCTP_PARAM_ADAPTION_LAYER_IND parameter. # # Signed-off-by: Sridhar Samudrala # # net/sctp/ulpevent.c # net/sctp/socket.c # net/sctp/sm_statefuns.c # net/sctp/sm_make_chunk.c # include/net/sctp/ulpevent.h # include/net/sctp/structs.h # include/linux/sctp.h # # ChangeSet # 2004/10/21 15:18:18-07:00 sri@us.ibm.com # [SCTP] Change sctp_assoc_t to a sized type(s32). # # Signed-off-by: Sridhar Samudrala # # net/sctp/socket.c # net/sctp/associola.c # include/net/sctp/user.h # include/net/sctp/sctp.h # diff -Nru a/include/linux/sctp.h b/include/linux/sctp.h --- a/include/linux/sctp.h 2004-10-22 12:06:24 -07:00 +++ b/include/linux/sctp.h 2004-10-22 12:06:24 -07:00 @@ -281,7 +281,11 @@ sctp_paramhdr_t param_hdr; } __attribute__((packed)) sctp_ecn_capable_param_t; - +/* ADDIP Section 3.2.6 Adaption Layer Indication */ +typedef struct sctp_adaption_ind_param { + struct sctp_paramhdr param_hdr; + __u32 adaption_ind; +} __attribute__((packed)) sctp_adaption_ind_param_t; /* RFC 2960. Section 3.3.3 Initiation Acknowledgement (INIT ACK) (2): * The INIT ACK chunk is used to acknowledge the initiation of an SCTP diff -Nru a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h --- a/include/net/sctp/sctp.h 2004-10-22 12:06:24 -07:00 +++ b/include/net/sctp/sctp.h 2004-10-22 12:06:24 -07:00 @@ -335,7 +335,7 @@ /* Map an association to an assoc_id. */ static inline sctp_assoc_t sctp_assoc2id(const struct sctp_association *asoc) { - return (asoc?asoc->assoc_id:NULL); + return (asoc?asoc->assoc_id:0); } /* Look up the association by its id. */ diff -Nru a/include/net/sctp/structs.h b/include/net/sctp/structs.h --- a/include/net/sctp/structs.h 2004-10-22 12:06:24 -07:00 +++ b/include/net/sctp/structs.h 2004-10-22 12:06:24 -07:00 @@ -266,6 +266,7 @@ __u8 disable_fragments; __u8 pd_mode; __u8 v4mapped; + __u32 adaption_ind; /* Receive to here while partial delivery is in effect. */ struct sk_buff_head pd_lobby; @@ -323,6 +324,8 @@ __u8 prsctp_capable; + __u32 adaption_ind; + /* This is a shim for my peer's INIT packet, followed by * a copy of the raw address list of the association. * The length of the raw address list is saved in the @@ -362,6 +365,7 @@ struct sctp_ipv4addr_param *v4; struct sctp_ipv6addr_param *v6; union sctp_addr_param *addr; + struct sctp_adaption_ind_param *aind; }; /* RFC 2960. Section 3.3.5 Heartbeat. @@ -1394,6 +1398,8 @@ __u8 hostname_address;/* Peer understands DNS addresses? */ __u8 asconf_capable; /* Does peer support ADDIP? */ __u8 prsctp_capable; /* Can peer do PR-SCTP? */ + + __u32 adaption_ind; /* Adaption Code point. */ /* This mask is used to disable sending the ASCONF chunk * with specified parameter to peer. diff -Nru a/include/net/sctp/ulpevent.h b/include/net/sctp/ulpevent.h --- a/include/net/sctp/ulpevent.h 2004-10-22 12:06:24 -07:00 +++ b/include/net/sctp/ulpevent.h 2004-10-22 12:06:24 -07:00 @@ -121,6 +121,9 @@ const struct sctp_association *asoc, __u32 indication, int gfp); +struct sctp_ulpevent *sctp_ulpevent_make_adaption_indication( + const struct sctp_association *asoc, int gfp); + struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc, struct sctp_chunk *chunk, int gfp); diff -Nru a/include/net/sctp/user.h b/include/net/sctp/user.h --- a/include/net/sctp/user.h 2004-10-22 12:06:24 -07:00 +++ b/include/net/sctp/user.h 2004-10-22 12:06:24 -07:00 @@ -55,7 +55,7 @@ #include #include -typedef void * sctp_assoc_t; +typedef __s32 sctp_assoc_t; /* The following symbols come from the Sockets API Extensions for * SCTP . diff -Nru a/net/sctp/associola.c b/net/sctp/associola.c --- a/net/sctp/associola.c 2004-10-22 12:06:24 -07:00 +++ b/net/sctp/associola.c 2004-10-22 12:06:24 -07:00 @@ -271,7 +271,7 @@ asoc->need_ecne = 0; - asoc->assoc_id = (sctp_assoc_t)-1L; + asoc->assoc_id = 0; /* Assume that peer would support both address types unless we are * told otherwise. @@ -374,9 +374,9 @@ sctp_endpoint_put(asoc->ep); sock_put(asoc->base.sk); - if ((long)asoc->assoc_id != -1L) { + if (asoc->assoc_id != 0) { spin_lock_bh(&sctp_assocs_id_lock); - idr_remove(&sctp_assocs_id, (long)asoc->assoc_id); + idr_remove(&sctp_assocs_id, asoc->assoc_id); spin_unlock_bh(&sctp_assocs_id_lock); } @@ -482,14 +482,15 @@ /* 7.2.1 Slow-Start * - * o The initial cwnd before data transmission or after a - * sufficiently long idle period MUST be <= 2*MTU. + * o The initial cwnd before DATA transmission or after a sufficiently + * long idle period MUST be set to + * min(4*MTU, max(2*MTU, 4380 bytes)) * * o The initial value of ssthresh MAY be arbitrarily high * (for example, implementations MAY use the size of the * receiver advertised window). */ - peer->cwnd = asoc->pmtu * 2; + peer->cwnd = min(4*asoc->pmtu, max_t(__u32, 2*asoc->pmtu, 4380)); /* At this point, we may not have the receiver's advertised window, * so initialize ssthresh to the default value and it will be set diff -Nru a/net/sctp/outqueue.c b/net/sctp/outqueue.c --- a/net/sctp/outqueue.c 2004-10-22 12:06:24 -07:00 +++ b/net/sctp/outqueue.c 2004-10-22 12:06:24 -07:00 @@ -706,10 +706,19 @@ if (!new_transport) { new_transport = asoc->peer.active_path; } else if (!new_transport->active) { - /* If the chunk is Heartbeat, send it to - * chunk->transport, even it's inactive. + /* If the chunk is Heartbeat or Heartbeat Ack, + * send it to chunk->transport, even if it's + * inactive. + * + * 3.3.6 Heartbeat Acknowledgement: + * ... + * A HEARTBEAT ACK is always sent to the source IP + * address of the IP datagram containing the + * HEARTBEAT chunk to which this ack is responding. + * ... */ - if (chunk->chunk_hdr->type != SCTP_CID_HEARTBEAT) + if (chunk->chunk_hdr->type != SCTP_CID_HEARTBEAT && + chunk->chunk_hdr->type != SCTP_CID_HEARTBEAT_ACK) new_transport = asoc->peer.active_path; } diff -Nru a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c --- a/net/sctp/sm_make_chunk.c 2004-10-22 12:06:24 -07:00 +++ b/net/sctp/sm_make_chunk.c 2004-10-22 12:06:24 -07:00 @@ -171,6 +171,7 @@ struct sctp_opt *sp; sctp_supported_addrs_param_t sat; __u16 types[2]; + sctp_adaption_ind_param_t aiparam; /* RFC 2960 3.3.2 Initiation (INIT) (1) * @@ -196,6 +197,7 @@ chunksize += sizeof(ecap_param); if (sctp_prsctp_enable) chunksize += sizeof(prsctp_param); + chunksize += sizeof(aiparam); chunksize += vparam_len; /* RFC 2960 3.3.2 Initiation (INIT) (1) @@ -234,6 +236,10 @@ sctp_addto_chunk(retval, sizeof(ecap_param), &ecap_param); if (sctp_prsctp_enable) sctp_addto_chunk(retval, sizeof(prsctp_param), &prsctp_param); + aiparam.param_hdr.type = SCTP_PARAM_ADAPTION_LAYER_IND; + aiparam.param_hdr.length = htons(sizeof(aiparam)); + aiparam.adaption_ind = htonl(sp->adaption_ind); + sctp_addto_chunk(retval, sizeof(aiparam), &aiparam); nodata: if (addrs.v) kfree(addrs.v); @@ -251,6 +257,7 @@ sctp_cookie_param_t *cookie; int cookie_len; size_t chunksize; + sctp_adaption_ind_param_t aiparam; retval = NULL; @@ -284,6 +291,8 @@ if (asoc->peer.prsctp_capable) chunksize += sizeof(prsctp_param); + chunksize += sizeof(aiparam); + /* Now allocate and fill out the chunk. */ retval = sctp_make_chunk(asoc, SCTP_CID_INIT_ACK, 0, chunksize); if (!retval) @@ -302,6 +311,11 @@ if (asoc->peer.prsctp_capable) sctp_addto_chunk(retval, sizeof(prsctp_param), &prsctp_param); + aiparam.param_hdr.type = SCTP_PARAM_ADAPTION_LAYER_IND; + aiparam.param_hdr.length = htons(sizeof(aiparam)); + aiparam.adaption_ind = htonl(sctp_sk(asoc->base.sk)->adaption_ind); + sctp_addto_chunk(retval, sizeof(aiparam), &aiparam); + /* We need to remove the const qualifier at this point. */ retval->asoc = (struct sctp_association *) asoc; @@ -1297,6 +1311,9 @@ /* Remember PR-SCTP capability. */ cookie->c.prsctp_capable = asoc->peer.prsctp_capable; + /* Save adaption indication in the cookie. */ + cookie->c.adaption_ind = asoc->peer.adaption_ind; + /* Set an expiration time for the cookie. */ do_gettimeofday(&cookie->c.expiration); TIMEVAL_ADD(asoc->cookie_life, cookie->c.expiration); @@ -1455,6 +1472,7 @@ retval->addip_serial = retval->c.initial_tsn; retval->adv_peer_ack_point = retval->ctsn_ack_point; retval->peer.prsctp_capable = retval->c.prsctp_capable; + retval->peer.adaption_ind = retval->c.adaption_ind; /* The INIT stuff will be done by the side effects. */ return retval; @@ -1661,6 +1679,7 @@ case SCTP_PARAM_HEARTBEAT_INFO: case SCTP_PARAM_UNRECOGNIZED_PARAMETERS: case SCTP_PARAM_ECN_CAPABLE: + case SCTP_PARAM_ADAPTION_LAYER_IND: break; case SCTP_PARAM_HOST_NAME_ADDRESS: @@ -1989,6 +2008,10 @@ asoc->peer.ecn_capable = 1; break; + case SCTP_PARAM_ADAPTION_LAYER_IND: + asoc->peer.adaption_ind = param.aind->adaption_ind; + break; + case SCTP_PARAM_FWD_TSN_SUPPORT: if (sctp_prsctp_enable) { asoc->peer.prsctp_capable = 1; @@ -2459,6 +2482,8 @@ union sctp_addr addr; struct sctp_bind_addr *bp = &asoc->base.bind_addr; union sctp_addr_param *addr_param; + struct list_head *pos; + struct sctp_transport *transport; int retval = 0; addr_param = (union sctp_addr_param *) @@ -2482,6 +2507,12 @@ retval = sctp_del_bind_addr(bp, &addr); sctp_write_unlock(&asoc->base.addr_lock); sctp_local_bh_enable(); + list_for_each(pos, &asoc->peer.transport_addr_list) { + transport = list_entry(pos, struct sctp_transport, + transports); + sctp_transport_route(transport, NULL, + sctp_sk(asoc->base.sk)); + } break; default: break; diff -Nru a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c --- a/net/sctp/sm_statefuns.c 2004-10-22 12:06:24 -07:00 +++ b/net/sctp/sm_statefuns.c 2004-10-22 12:06:24 -07:00 @@ -629,6 +629,21 @@ sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP, SCTP_ULPEVENT(ev)); + /* Sockets API Draft Section 5.3.1.6 + * When a peer sends a Adaption Layer Indication parameter , SCTP + * delivers this notification to inform the application that of the + * peers requested adaption layer. + */ + if (new_asoc->peer.adaption_ind) { + ev = sctp_ulpevent_make_adaption_indication(new_asoc, + GFP_ATOMIC); + if (!ev) + goto nomem_ev; + + sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP, + SCTP_ULPEVENT(ev)); + } + return SCTP_DISPOSITION_CONSUME; nomem_ev: @@ -713,6 +728,20 @@ sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP, SCTP_ULPEVENT(ev)); + /* Sockets API Draft Section 5.3.1.6 + * When a peer sends a Adaption Layer Indication parameter , SCTP + * delivers this notification to inform the application that of the + * peers requested adaption layer. + */ + if (asoc->peer.adaption_ind) { + ev = sctp_ulpevent_make_adaption_indication(asoc, GFP_ATOMIC); + if (!ev) + goto nomem; + + sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP, + SCTP_ULPEVENT(ev)); + } + return SCTP_DISPOSITION_CONSUME; nomem: return SCTP_DISPOSITION_NOMEM; @@ -1532,6 +1561,21 @@ goto nomem_ev; sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP, SCTP_ULPEVENT(ev)); + + /* Sockets API Draft Section 5.3.1.6 + * When a peer sends a Adaption Layer Indication parameter , SCTP + * delivers this notification to inform the application that of the + * peers requested adaption layer. + */ + if (asoc->peer.adaption_ind) { + ev = sctp_ulpevent_make_adaption_indication(asoc, GFP_ATOMIC); + if (!ev) + goto nomem_ev; + + sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP, + SCTP_ULPEVENT(ev)); + } + return SCTP_DISPOSITION_CONSUME; nomem_ev: @@ -1612,6 +1656,21 @@ goto nomem; sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP, SCTP_ULPEVENT(ev)); + + /* Sockets API Draft Section 5.3.1.6 + * When a peer sends a Adaption Layer Indication parameter, + * SCTP delivers this notification to inform the application + * that of the peers requested adaption layer. + */ + if (new_asoc->peer.adaption_ind) { + ev = sctp_ulpevent_make_adaption_indication(new_asoc, + GFP_ATOMIC); + if (!ev) + goto nomem; + + sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP, + SCTP_ULPEVENT(ev)); + } } sctp_add_cmd_sf(commands, SCTP_CMD_TRANSMIT, SCTP_NULL()); diff -Nru a/net/sctp/socket.c b/net/sctp/socket.c --- a/net/sctp/socket.c 2004-10-22 12:06:24 -07:00 +++ b/net/sctp/socket.c 2004-10-22 12:06:24 -07:00 @@ -1063,7 +1063,7 @@ struct sctp_sndrcvinfo default_sinfo = { 0 }; struct sctp_sndrcvinfo *sinfo; struct sctp_initmsg *sinit; - sctp_assoc_t associd = NULL; + sctp_assoc_t associd = 0; sctp_cmsgs_t cmsgs = { NULL }; int err; sctp_scope_t scope; @@ -2120,6 +2120,20 @@ return err; } +static int sctp_setsockopt_adaption_layer(struct sock *sk, char __user *optval, + int optlen) +{ + __u32 val; + + if (optlen < sizeof(__u32)) + return -EINVAL; + if (copy_from_user(&val, optval, sizeof(__u32))) + return -EFAULT; + + sctp_sk(sk)->adaption_ind = val; + + return 0; +} /* API 6.2 setsockopt(), getsockopt() * @@ -2219,6 +2233,10 @@ case SCTP_MAXSEG: retval = sctp_setsockopt_maxseg(sk, optval, optlen); break; + case SCTP_ADAPTION_LAYER: + retval = sctp_setsockopt_adaption_layer(sk, optval, optlen); + break; + default: retval = -ENOPROTOOPT; break; @@ -2518,6 +2536,8 @@ /* User specified fragmentation limit. */ sp->user_frag = 0; + sp->adaption_ind = 0; + sp->pf = sctp_get_pf_specific(sk->sk_family); /* Control variables for partial data delivery. */ @@ -3160,6 +3180,29 @@ } /* + * 7.1.11 Set Adaption Layer Indicator (SCTP_ADAPTION_LAYER) + * + * Requests that the local endpoint set the specified Adaption Layer + * Indication parameter for all future INIT and INIT-ACK exchanges. + */ +static int sctp_getsockopt_adaption_layer(struct sock *sk, int len, + char __user *optval, int __user *optlen) +{ + __u32 val; + + if (len < sizeof(__u32)) + return -EINVAL; + + len = sizeof(__u32); + val = sctp_sk(sk)->adaption_ind; + if (put_user(len, optlen)) + return -EFAULT; + if (copy_to_user(optval, &val, len)) + return -EFAULT; + return 0; +} + +/* * * 7.1.14 Set default send parameters (SCTP_DEFAULT_SEND_PARAM) * @@ -3513,6 +3556,10 @@ break; case SCTP_GET_PEER_ADDR_INFO: retval = sctp_getsockopt_peer_addr_info(sk, len, optval, + optlen); + break; + case SCTP_ADAPTION_LAYER: + retval = sctp_getsockopt_adaption_layer(sk, len, optval, optlen); break; default: diff -Nru a/net/sctp/transport.c b/net/sctp/transport.c --- a/net/sctp/transport.c 2004-10-22 12:06:24 -07:00 +++ b/net/sctp/transport.c 2004-10-22 12:06:24 -07:00 @@ -421,15 +421,15 @@ { switch (reason) { case SCTP_LOWER_CWND_T3_RTX: - /* RFC 2960 Section 7.2.3, sctpimpguide-05 Section 2.9.2 + /* RFC 2960 Section 7.2.3, sctpimpguide * When the T3-rtx timer expires on an address, SCTP should * perform slow start by: - * ssthresh = max(cwnd/2, 2*MTU) + * ssthresh = max(cwnd/2, 4*MTU) * cwnd = 1*MTU * partial_bytes_acked = 0 */ transport->ssthresh = max(transport->cwnd/2, - 2*transport->asoc->pmtu); + 4*transport->asoc->pmtu); transport->cwnd = transport->asoc->pmtu; break; @@ -439,15 +439,15 @@ * were last sent, according to the formula described in * Section 7.2.3. * - * RFC 2960 7.2.3, sctpimpguide-05 2.9.2 Upon detection of - * packet losses from SACK (see Section 7.2.4), An endpoint + * RFC 2960 7.2.3, sctpimpguide Upon detection of packet + * losses from SACK (see Section 7.2.4), An endpoint * should do the following: - * ssthresh = max(cwnd/2, 2*MTU) + * ssthresh = max(cwnd/2, 4*MTU) * cwnd = ssthresh * partial_bytes_acked = 0 */ transport->ssthresh = max(transport->cwnd/2, - 2*transport->asoc->pmtu); + 4*transport->asoc->pmtu); transport->cwnd = transport->ssthresh; break; @@ -467,23 +467,24 @@ if ((jiffies - transport->last_time_ecne_reduced) > transport->rtt) { transport->ssthresh = max(transport->cwnd/2, - 2*transport->asoc->pmtu); + 4*transport->asoc->pmtu); transport->cwnd = transport->ssthresh; transport->last_time_ecne_reduced = jiffies; } break; case SCTP_LOWER_CWND_INACTIVE: - /* RFC 2960 Section 7.2.1, sctpimpguide-05 Section 2.14.2 - * When the association does not transmit data on a given - * transport address within an RTO, the cwnd of the transport - * address should be adjusted to 2*MTU. + /* RFC 2960 Section 7.2.1, sctpimpguide + * When the endpoint does not transmit data on a given + * transport address, the cwnd of the transport address + * should be adjusted to max(cwnd/2, 4*MTU) per RTO. * NOTE: Although the draft recommends that this check needs * to be done every RTO interval, we do it every hearbeat * interval. */ if ((jiffies - transport->last_time_used) > transport->rto) - transport->cwnd = 2*transport->asoc->pmtu; + transport->cwnd = max(transport->cwnd/2, + 4*transport->asoc->pmtu); break; }; diff -Nru a/net/sctp/ulpevent.c b/net/sctp/ulpevent.c --- a/net/sctp/ulpevent.c 2004-10-22 12:06:24 -07:00 +++ b/net/sctp/ulpevent.c 2004-10-22 12:06:24 -07:00 @@ -562,7 +562,7 @@ struct sctp_shutdown_event *sse; struct sk_buff *skb; - event = sctp_ulpevent_new(sizeof(struct sctp_assoc_change), + event = sctp_ulpevent_new(sizeof(struct sctp_shutdown_event), MSG_NOTIFICATION, gfp); if (!event) goto fail; @@ -613,6 +613,40 @@ return NULL; } +/* Create and initialize a SCTP_ADAPTION_INDICATION notification. + * + * Socket Extensions for SCTP + * 5.3.1.6 SCTP_ADAPTION_INDICATION + */ +struct sctp_ulpevent *sctp_ulpevent_make_adaption_indication( + const struct sctp_association *asoc, int gfp) +{ + struct sctp_ulpevent *event; + struct sctp_adaption_event *sai; + struct sk_buff *skb; + + event = sctp_ulpevent_new(sizeof(struct sctp_adaption_event), + MSG_NOTIFICATION, gfp); + if (!event) + goto fail; + + skb = sctp_event2skb(event); + sai = (struct sctp_adaption_event *) + skb_put(skb, sizeof(struct sctp_adaption_event)); + + sai->sai_type = SCTP_ADAPTION_INDICATION; + sai->sai_flags = 0; + sai->sai_length = sizeof(struct sctp_adaption_event); + sai->sai_adaption_ind = asoc->peer.adaption_ind; + sctp_ulpevent_set_owner(event, asoc); + sai->sai_assoc_id = sctp_assoc2id(asoc); + + return event; + +fail: + return NULL; +} + /* A message has been received. Package this message as a notification * to pass it to the upper layers. Go ahead and calculate the sndrcvinfo * even if filtered out later. @@ -689,7 +723,7 @@ struct sctp_pdapi_event *pd; struct sk_buff *skb; - event = sctp_ulpevent_new(sizeof(struct sctp_assoc_change), + event = sctp_ulpevent_new(sizeof(struct sctp_pdapi_event), MSG_NOTIFICATION, gfp); if (!event) goto fail; From shemminger@osdl.org Fri Oct 22 12:52:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 12:52:19 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MJqDcq026032 for ; Fri, 22 Oct 2004 12:52:13 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9MJppWL000688 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 22 Oct 2004 12:51:52 -0700 Date: Fri, 22 Oct 2004 12:53:03 -0700 From: Stephen Hemminger To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH] netem: use timer to handle packets not rescheduling Message-Id: <20041022125303.6c4c979a@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10735 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 Content-Length: 3175 Lines: 107 Change the behaviour of netem's delayed packets queue to make it work better with TBF and other rate control disciplines. Now, packets are put in the delayed queue and held there until the next timer interval, then moved to the underlying qdisc. qlen is set to match the available packets in the underlying discipline (and not count those waiting). Previously, netem would perturb the rate control disciplines because of rescheduling and moving packets in the dequeue handler. Signed-off-by: Stephen Hemminger --- linux-2.6/net/sched/sch_netem.c 2004-10-22 11:59:01.888348800 -0700 +++ netem-2.6/net/sched/sch_netem.c 2004-10-22 12:10:09.520853232 -0700 @@ -142,19 +142,23 @@ static int delay_skb(struct Qdisc *sch, { struct netem_sched_data *q = qdisc_priv(sch); struct netem_skb_cb *cb = (struct netem_skb_cb *)skb->cb; + psched_tdiff_t td; psched_time_t now; PSCHED_GET_TIME(now); - PSCHED_TADD2(now, tabledist(q->latency, q->jitter, - &q->delay_cor, q->delay_dist), - cb->time_to_send); + td = tabledist(q->latency, q->jitter, &q->delay_cor, q->delay_dist); + PSCHED_TADD2(now, td, cb->time_to_send); /* Always queue at tail to keep packets in order */ if (likely(q->delayed.qlen < q->limit)) { __skb_queue_tail(&q->delayed, skb); - sch->q.qlen++; sch->bstats.bytes += skb->len; sch->bstats.packets++; + + if (!timer_pending(&q->timer)) { + q->timer.expires = jiffies + PSCHED_US2JIFFIE(td); + add_timer(&q->timer); + } return NET_XMIT_SUCCESS; } @@ -243,15 +247,31 @@ static struct sk_buff *netem_dequeue(str { struct netem_sched_data *q = qdisc_priv(sch); struct sk_buff *skb; + + skb = q->qdisc->dequeue(q->qdisc); + if (skb) + sch->q.qlen--; + return skb; +} + +static void netem_watchdog(unsigned long arg) +{ + struct Qdisc *sch = (struct Qdisc *)arg; + struct netem_sched_data *q = qdisc_priv(sch); + struct sk_buff *skb; psched_time_t now; + pr_debug("netem_watchdog: fired @%lu\n", jiffies); + + spin_lock_bh(&sch->dev->queue_lock); PSCHED_GET_TIME(now); + while ((skb = skb_peek(&q->delayed)) != NULL) { const struct netem_skb_cb *cb = (const struct netem_skb_cb *)skb->cb; long delay = PSCHED_US2JIFFIE(PSCHED_TDIFF(cb->time_to_send, now)); - pr_debug("netem_dequeue: delay queue %p@%lu %ld\n", + pr_debug("netem_watchdog: skb %p@%lu %ld\n", skb, jiffies, delay); /* if more time remaining? */ @@ -263,20 +283,10 @@ static struct sk_buff *netem_dequeue(str if (q->qdisc->enqueue(skb, q->qdisc)) sch->qstats.drops++; + else + sch->q.qlen++; } - - skb = q->qdisc->dequeue(q->qdisc); - if (skb) - sch->q.qlen--; - return skb; -} - -static void netem_watchdog(unsigned long arg) -{ - struct Qdisc *sch = (struct Qdisc *)arg; - - pr_debug("netem_watchdog: fired @%lu\n", jiffies); - netif_schedule(sch->dev); + spin_unlock_bh(&sch->dev->queue_lock); } static void netem_reset(struct Qdisc *sch) @@ -493,7 +503,7 @@ static int netem_graft(struct Qdisc *sch sch_tree_lock(sch); *old = xchg(&q->qdisc, new); qdisc_reset(*old); - sch->q.qlen = q->delayed.qlen; + sch->q.qlen = 0; sch_tree_unlock(sch); return 0; From romieu@fr.zoreil.com Fri Oct 22 13:30:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 13:30:40 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MKUXF7027997 for ; Fri, 22 Oct 2004 13:30:34 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i9MKSpvr005469; Fri, 22 Oct 2004 22:28:51 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i9MKSpiT005468; Fri, 22 Oct 2004 22:28:51 +0200 Date: Fri, 22 Oct 2004 22:28:51 +0200 From: Francois Romieu To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com Subject: Re: [patch netdev-2.6 0/2] r8169: vlan hwaccel fixes Message-ID: <20041022202851.GB4216@electric-eye.fr.zoreil.com> References: <20041022005737.GA1945@tuxdriver.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041022005737.GA1945@tuxdriver.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 10736 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 Content-Length: 563 Lines: 21 John W. Linville : [...] > Patch 1: > > The return value of rtl8169_tx_vlan_tag() is not being > endian-swapped to little endian. The hardware registers are little > endian, even though the vlan tag value in this register (16-bits only) > is big endian -- confusing! Anyway, I'll be posting a follow-up patch > to correct this. Oops. > Patch 2: [nice explanation] Any objection against me replacing the actual comment of patch #2 (i.e. "why" instead of "how") and splitting the "if ((tp->>vlgrp = grp))" over two lines ? -- Ueimor From vda@port.imtp.ilyichevsk.odessa.ua Fri Oct 22 13:42:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 13:43:03 -0700 (PDT) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9MKgt40028737 for ; Fri, 22 Oct 2004 13:42:57 -0700 Received: (qmail 7495 invoked by alias); 22 Oct 2004 20:42:38 -0000 Received: from unknown (195.138.72.162) by 0 (195.66.192.168) with ESMTP; 22 Oct 2004 20:42:38 -0000 From: Denis Vlasenko To: Stephen Hemminger Subject: Re: cannot up iface in 2.6.9, was working in 2.6.9-rc3 Date: Fri, 22 Oct 2004 23:42:31 +0300 User-Agent: KMail/1.5.4 Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Jeff Garzik References: <200410222159.26369.vda@port.imtp.ilyichevsk.odessa.ua> <20041022121741.32d6732f@zqx3.pdx.osdl.net> In-Reply-To: <20041022121741.32d6732f@zqx3.pdx.osdl.net> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_3CXeB13N96mH1fs" Message-Id: <200410222342.31973.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 10737 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: vda@port.imtp.ilyichevsk.odessa.ua Precedence: bulk X-list: netdev Content-Length: 11639 Lines: 180 --Boundary-00=_3CXeB13N96mH1fs Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Friday 22 October 2004 22:17, Stephen Hemminger wrote: > On Fri, 22 Oct 2004 21:59:26 +0300 > > It cannot be upped: > > > > # ip l set dev if up > > SIOCSIFFLAGS: Function not implemented > > # ifconfig if up > > SIOCSIFFLAGS: Function not implemented > > # busybox ip l set dev if up > > SIOCSIFFLAGS: Function not implemented > > It probably isn't the via driver at all, but something in the ioctl layer. > Try it without using the busybox version of ifconfig and ip. As shown above, I did it. All three utilities fail. I rechecked that rc3 works and found out that rc4 does not. I also booted with init=/bin/sh and ran 'ip l set dev eth0 up' - it fails under rc4, but works under rc3. This rules out my userspace setup being somehow involved. Config for rc4 is attached. -- vda --Boundary-00=_3CXeB13N96mH1fs Content-Type: application/x-bzip2; name=".config.bz2" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=".config.bz2" QlpoOTFBWSZTWfT+noIAB8pfgEAQWOf/8j////C////gYCTcAAAOXcBQveNdqQi+hoSRiqa+XWkA Anc7hiVVs0tZhaAW2CTYVIA0CrY9txCkVC2Bu5np7NjbuaV2Gg9zt2e3fe63xj6H3rhoICDI0aEA EJPQU8o09JtEfpTelNPUANNCaAQCJiFU/aRTZQ9QAAaHqAAGIST1NTwp6KeJqPEnoR4pkxGTTTym hkMhoJNJIgE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/al8aZsWc9LHQwdmJsY8GosdphfX6P3dV3F+X8uAEvM1Yv2FLhDXdn161Pt+lttibbOkrPGEX uYPJ9qou0DQIemETP6PjxWGNjZ7GKUUV9D4dqbG5vi+7DT93bY1aVFv/PiDIYzZIEknmv0wRtThq IP8mIEkuz7XzuGvnSZ2Rm+/0BE5oAwmGkIMUkmCSQYNAJQbvLMyVYdOP3wa2ECSUFXineMjzfX0w tOgHobHWmIaaZD/pWGTVciUZsyArlOypdxrpXT4m1kBieqoWjhptoHmNCuGPz9Q4ukDh1YMZss1I EIIJJNgUouEZM7a1lK2wi5GfYUquodjAwxKZAXcCHJaTm/Xawl+N2vubjrp6yCCSMuO7DyabyTyj LA9cs+hAv/xdyRThQkPT+noI --Boundary-00=_3CXeB13N96mH1fs-- From shemminger@osdl.org Fri Oct 22 14:00:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 14:00:17 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9ML0Cqt029721 for ; Fri, 22 Oct 2004 14:00:12 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9MKxpWL006969 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 22 Oct 2004 13:59:51 -0700 Date: Fri, 22 Oct 2004 14:01:02 -0700 From: Stephen Hemminger To: Denis Vlasenko Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Jeff Garzik Subject: Re: cannot up iface in 2.6.9, was working in 2.6.9-rc3 Message-Id: <20041022140102.034e8368@zqx3.pdx.osdl.net> In-Reply-To: <200410222159.26369.vda@port.imtp.ilyichevsk.odessa.ua> References: <200410222159.26369.vda@port.imtp.ilyichevsk.odessa.ua> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10738 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 Content-Length: 3317 Lines: 73 On Fri, 22 Oct 2004 21:59:26 +0300 Denis Vlasenko wrote: > I have an onboard VIA eth: > > # lspci > 00:00.0 Host bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333] > 00:01.0 PCI bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333 AGP] > 00:0a.0 Network controller: Texas Instruments ACX 111 54Mbps Wireless Interface > 00:0c.0 Network controller: Harris Semiconductor D-Links DWL-g650 A1 (rev 01) > 00:10.0 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 80) > 00:10.1 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 80) > 00:10.2 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 80) > 00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82) > 00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge > 00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C/VT8235 PIPC Bus Master IDE (rev 06) > 00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50) > 00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 74) > 01:00.0 VGA compatible controller: nVidia Corporation NV11 [GeForce2 MX/MX 400] (rev a1) > > It cannot be upped: > > # ip l set dev if up > SIOCSIFFLAGS: Function not implemented > # ifconfig if up > SIOCSIFFLAGS: Function not implemented > # busybox ip l set dev if up > SIOCSIFFLAGS: Function not implemented > > Strace (busybox one is smallest): > > execve("/usr/bin/busybox", ["busybox", "ip", "l", "set", "dev", "if", "up"], [/* 28 vars */]) = 0 > fcntl64(0, F_GETFD) = 0 > fcntl64(1, F_GETFD) = 0 > fcntl64(2, F_GETFD) = 0 > uname({sys="Linux", node="shadow", ...}) = 0 > geteuid32() = 0 > getuid32() = 0 > getegid32() = 0 > getgid32() = 0 > brk(0) = 0x81ab000 > brk(0x81ac000) = 0x81ac000 > socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4 > ioctl(4, 0x8913, 0xbffff9e0) = 0 > ioctl(4, 0x8914, 0xbffff9e0) = -1 ENOSYS (Function not implemented) > dup(2) = 5 > fcntl64(5, F_GETFL) = 0x2 (flags O_RDWR) > fstat64(5, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 2), ...}) = 0 > old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40000000 > _llseek(5, 0, 0xbffff830, SEEK_CUR) = -1 ESPIPE (Illegal seek) > write(5, "SIOCSIFFLAGS: Function not imple"..., 39) = 39 > close(5) = 0 > munmap(0x40000000, 4096) = 0 > close(4) = 0 > write(2, "BusyBox v1.00-pre8 (2004.03.31-2"..., 295) = 295 > _exit(1) > > It was working in 2.6.9-rc3. > > drivers/net/via-rhine.c did not change between rc3 and "official" 2.6.9 > -- > vda Is your ethernet device really named "if" not "eth0". You must be using nameif or something to rename it. Perhaps the name isn't what you expect. Look at things like: ifconfig -a and ls /sys/class/net What ever you are using to assign the name "if" to the device is (which defaults to eth0) probably got confused From vda@port.imtp.ilyichevsk.odessa.ua Fri Oct 22 14:02:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 14:02:42 -0700 (PDT) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9ML2ZKC030161 for ; Fri, 22 Oct 2004 14:02:36 -0700 Received: (qmail 7588 invoked by alias); 22 Oct 2004 21:02:18 -0000 Received: from unknown (195.138.72.162) by 0 (195.66.192.168) with ESMTP; 22 Oct 2004 21:02:18 -0000 From: Denis Vlasenko To: Stephen Hemminger Subject: Re: cannot up iface in 2.6.9, was working in 2.6.9-rc3 Date: Sat, 23 Oct 2004 00:02:13 +0300 User-Agent: KMail/1.5.4 Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Jeff Garzik References: <200410222159.26369.vda@port.imtp.ilyichevsk.odessa.ua> <20041022140102.034e8368@zqx3.pdx.osdl.net> In-Reply-To: <20041022140102.034e8368@zqx3.pdx.osdl.net> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410230002.13038.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 10739 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: vda@port.imtp.ilyichevsk.odessa.ua Precedence: bulk X-list: netdev Content-Length: 3528 Lines: 77 On Saturday 23 October 2004 00:01, Stephen Hemminger wrote: > On Fri, 22 Oct 2004 21:59:26 +0300 > Denis Vlasenko wrote: > > > I have an onboard VIA eth: > > > > # lspci > > 00:00.0 Host bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333] > > 00:01.0 PCI bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333 AGP] > > 00:0a.0 Network controller: Texas Instruments ACX 111 54Mbps Wireless Interface > > 00:0c.0 Network controller: Harris Semiconductor D-Links DWL-g650 A1 (rev 01) > > 00:10.0 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 80) > > 00:10.1 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 80) > > 00:10.2 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 80) > > 00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82) > > 00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge > > 00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C/VT8235 PIPC Bus Master IDE (rev 06) > > 00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50) > > 00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 74) > > 01:00.0 VGA compatible controller: nVidia Corporation NV11 [GeForce2 MX/MX 400] (rev a1) > > > > It cannot be upped: > > > > # ip l set dev if up > > SIOCSIFFLAGS: Function not implemented > > # ifconfig if up > > SIOCSIFFLAGS: Function not implemented > > # busybox ip l set dev if up > > SIOCSIFFLAGS: Function not implemented > > > > Strace (busybox one is smallest): > > > > execve("/usr/bin/busybox", ["busybox", "ip", "l", "set", "dev", "if", "up"], [/* 28 vars */]) = 0 > > fcntl64(0, F_GETFD) = 0 > > fcntl64(1, F_GETFD) = 0 > > fcntl64(2, F_GETFD) = 0 > > uname({sys="Linux", node="shadow", ...}) = 0 > > geteuid32() = 0 > > getuid32() = 0 > > getegid32() = 0 > > getgid32() = 0 > > brk(0) = 0x81ab000 > > brk(0x81ac000) = 0x81ac000 > > socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4 > > ioctl(4, 0x8913, 0xbffff9e0) = 0 > > ioctl(4, 0x8914, 0xbffff9e0) = -1 ENOSYS (Function not implemented) > > dup(2) = 5 > > fcntl64(5, F_GETFL) = 0x2 (flags O_RDWR) > > fstat64(5, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 2), ...}) = 0 > > old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40000000 > > _llseek(5, 0, 0xbffff830, SEEK_CUR) = -1 ESPIPE (Illegal seek) > > write(5, "SIOCSIFFLAGS: Function not imple"..., 39) = 39 > > close(5) = 0 > > munmap(0x40000000, 4096) = 0 > > close(4) = 0 > > write(2, "BusyBox v1.00-pre8 (2004.03.31-2"..., 295) = 295 > > _exit(1) > > > > It was working in 2.6.9-rc3. > > > > drivers/net/via-rhine.c did not change between rc3 and "official" 2.6.9 > > -- > > vda > > Is your ethernet device really named "if" not "eth0". You must be > using nameif or something to rename it. > > Perhaps the name isn't what you expect. Look at things like: > ifconfig -a > and > ls /sys/class/net I checked that the same happens with 'ip l set dev eth0 up' right after boot with init=/bin/sh. See my other mail. -- vda From akepner@sgi.com Fri Oct 22 14:07:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 14:07:06 -0700 (PDT) Received: from omx2.sgi.com (omx2-ext.sgi.com [192.48.171.19]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9ML71ms030724 for ; Fri, 22 Oct 2004 14:07:01 -0700 Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by omx2.sgi.com (8.12.11/8.12.9/linux-outbound_gateway-1.1) with ESMTP id i9MMKYW4031994 for ; Fri, 22 Oct 2004 15:20:34 -0700 Received: from [192.168.2.3] (mtv-vpn-sw-corp-0-12.corp.sgi.com [134.15.0.12]) by cthulhu.engr.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id i9ML6hLH5421314; Fri, 22 Oct 2004 14:06:44 -0700 (PDT) Date: Fri, 22 Oct 2004 13:51:01 -0700 (PDT) From: X-X-Sender: To: , cc: , , , , Subject: [PATCH] use mmiowb in tg3_poll In-Reply-To: <200410211628.06906.jbarnes@engr.sgi.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 10740 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: akepner@sgi.com Precedence: bulk X-list: netdev Content-Length: 1182 Lines: 50 Returning from tg3_poll() without flushing the PIO write which reenables interrupts can result in lower cpu utilization and higher throughput. So use a memory barrier, mmiowb(), instead of flushing the write with a PIO read. Signed-off-by: Arthur Kepner --- --- linux-2.6.9-rc4-mm1.orig/drivers/net/tg3.c 2004-10-22 13:51:10.000000000 -0700 +++ linux-2.6.9-rc4-mm1/drivers/net/tg3.c 2004-10-22 13:53:36.000000000 -0700 @@ -417,6 +417,20 @@ tg3_cond_int(tp); } +/* tg3_restart_ints + * similar to tg3_enable_ints, but it can return without flushing the + * PIO write which reenables interrupts + */ +static void tg3_restart_ints(struct tg3 *tp) +{ + tw32(TG3PCI_MISC_HOST_CTRL, + (tp->misc_host_ctrl & ~MISC_HOST_CTRL_MASK_PCI_INT)); + tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x00000000); + mmiowb(); + + tg3_cond_int(tp); +} + static inline void tg3_netif_stop(struct tg3 *tp) { netif_poll_disable(tp->dev); @@ -2787,7 +2801,7 @@ if (done) { spin_lock_irqsave(&tp->lock, flags); __netif_rx_complete(netdev); - tg3_enable_ints(tp); + tg3_restart_ints(tp); spin_unlock_irqrestore(&tp->lock, flags); } -- Arthur From greearb@candelatech.com Fri Oct 22 14:07:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 14:07:56 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9ML7ooU030949 for ; Fri, 22 Oct 2004 14:07:50 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i9MLERLH017506; Fri, 22 Oct 2004 14:14:27 -0700 Message-ID: <41797696.9070905@candelatech.com> Date: Fri, 22 Oct 2004 14:07:34 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "'netdev@oss.sgi.com'" , "Linux 802.1Q VLAN" Subject: [PATCH] 802.1Q VLAN Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10741 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Content-Length: 7654 Lines: 275 Signed off by: Ben Greear This patch brings the 2.6.9 802.1Q VLAN code up to date with 2.4.27. It also includes better return logic from the hard_start_xmit hook to allow back pressure up the networking stack. Comments welcome. Thanks, Ben --- linux-2.6.9/net/8021q/vlan_dev.c 2004-10-18 14:55:07.000000000 -0700 +++ linux-2.6.9.p4s/net/8021q/vlan_dev.c 2004-10-22 12:14:24.000000000 -0700 @@ -1,4 +1,4 @@ -/* +/* -*- linux-c -*- * INET 802.1Q VLAN * Ethernet-type device handling. * @@ -484,13 +484,32 @@ veth->h_vlan_proto, veth->h_vlan_TCI, veth->h_vlan_encapsulated_proto); #endif - stats->tx_packets++; /* for statics only */ - stats->tx_bytes += skb->len; - skb->dev = VLAN_DEV_INFO(dev)->real_dev; - dev_queue_xmit(skb); - return 0; + { + /* Please note, dev_queue_xmit consumes the pkt regardless of the + * error value. So, will copy the skb first and free if successful. + */ + struct sk_buff* skb2 = skb_get(skb); + int rv = dev_queue_xmit(skb2); + if (rv != 0) { + /* The skb memory should still be valid since we made a copy, + * so can return error code here. + */ + return rv; + } + else { + /* Was success, need to free the skb reference since we bumped up the + * user count above. + */ + + stats->tx_packets++; /* for statics only */ + stats->tx_bytes += skb->len; + + kfree_skb(skb); + return 0; + } + } } int vlan_dev_hwaccel_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) @@ -622,7 +641,57 @@ return -EINVAL; } + +int vlan_dev_get_realdev_name(const char *dev_name, char* result) +{ + struct net_device *dev = dev_get_by_name(dev_name); + int rv = 0; + if (dev) { + if (dev->priv_flags & IFF_802_1Q_VLAN) { + strncpy(result, VLAN_DEV_INFO(dev)->real_dev->name, 23); + dev_put(dev); + rv = 0; + } else { + /*printk(KERN_ERR + "%s: %s is not a vlan device, priv_flags: %hX.\n", + __FUNCTION__, dev->name, dev->priv_flags);*/ + dev_put(dev); + rv = -EINVAL; + } + } else { + /* printk(KERN_ERR "%s: Could not find device: %s\n", + __FUNCTION__, dev_name); */ + rv = -ENODEV; + } + return rv; +} + +int vlan_dev_get_vid(const char *dev_name, unsigned short* result) +{ + struct net_device *dev = dev_get_by_name(dev_name); + int rv = 0; + if (dev) { + if (dev->priv_flags & IFF_802_1Q_VLAN) { + *result = VLAN_DEV_INFO(dev)->vlan_id; + dev_put(dev); + rv = 0; + } else { + /*printk(KERN_ERR + "%s: %s is not a vlan device, priv_flags: %hX.\n", + __FUNCTION__, dev->name, dev->priv_flags);*/ + dev_put(dev); + rv = -EINVAL; + } + } else { + /* printk(KERN_ERR "%s: Could not find device: %s\n", + __FUNCTION__, dev_name);*/ + rv = -ENODEV; + } + return rv; +} + + int vlan_dev_set_mac_address(struct net_device *dev, void *addr_struct_p) { struct sockaddr *addr = (struct sockaddr *)(addr_struct_p); --- linux-2.6.9/net/8021q/vlan.c 2004-10-18 14:54:55.000000000 -0700 +++ linux-2.6.9.p4s/net/8021q/vlan.c 2004-10-22 12:14:24.000000000 -0700 @@ -1,4 +1,4 @@ -/* +/* -*- linux-c -*- * INET 802.1Q VLAN * Ethernet-type device handling. * @@ -646,15 +646,9 @@ static int vlan_ioctl_handler(void __user *arg) { int err = 0; + unsigned short vid = 0; struct vlan_ioctl_args args; - /* everything here needs root permissions, except aguably the - * hack ioctls for sending packets. However, I know _I_ don't - * want users running that on my network! --BLG - */ - if (!capable(CAP_NET_ADMIN)) - return -EPERM; - if (copy_from_user(&args, arg, sizeof(struct vlan_ioctl_args))) return -EFAULT; @@ -668,24 +662,32 @@ switch (args.cmd) { case SET_VLAN_INGRESS_PRIORITY_CMD: + if (!capable(CAP_NET_ADMIN)) + return -EPERM; err = vlan_dev_set_ingress_priority(args.device1, args.u.skb_priority, args.vlan_qos); break; case SET_VLAN_EGRESS_PRIORITY_CMD: + if (!capable(CAP_NET_ADMIN)) + return -EPERM; err = vlan_dev_set_egress_priority(args.device1, args.u.skb_priority, args.vlan_qos); break; case SET_VLAN_FLAG_CMD: + if (!capable(CAP_NET_ADMIN)) + return -EPERM; err = vlan_dev_set_vlan_flag(args.device1, args.u.flag, args.vlan_qos); break; case SET_VLAN_NAME_TYPE_CMD: + if (!capable(CAP_NET_ADMIN)) + return -EPERM; if ((args.u.name_type >= 0) && (args.u.name_type < VLAN_NAME_TYPE_HIGHEST)) { vlan_name_type = args.u.name_type; @@ -695,17 +697,9 @@ } break; - /* TODO: Figure out how to pass info back... - case GET_VLAN_INGRESS_PRIORITY_IOCTL: - err = vlan_dev_get_ingress_priority(args); - break; - - case GET_VLAN_EGRESS_PRIORITY_IOCTL: - err = vlan_dev_get_egress_priority(args); - break; - */ - case ADD_VLAN_CMD: + if (!capable(CAP_NET_ADMIN)) + return -EPERM; /* we have been given the name of the Ethernet Device we want to * talk to: args.dev1 We also have the * VLAN ID: args.u.VID @@ -718,13 +712,52 @@ break; case DEL_VLAN_CMD: + if (!capable(CAP_NET_ADMIN)) + return -EPERM; /* Here, the args.dev1 is the actual VLAN we want * to get rid of. */ err = unregister_vlan_device(args.device1); break; + case GET_VLAN_INGRESS_PRIORITY_CMD: + /* TODO: Implement + err = vlan_dev_get_ingress_priority(args); + if (copy_to_user((void*)arg, &args, + sizeof(struct vlan_ioctl_args))) { + err = -EFAULT; + } + */ + err = -EINVAL; + break; + case GET_VLAN_EGRESS_PRIORITY_CMD: + /* TODO: Implement + err = vlan_dev_get_egress_priority(args.device1, &(args.args); + if (copy_to_user((void*)arg, &args, + sizeof(struct vlan_ioctl_args))) { + err = -EFAULT; + } + */ + err = -EINVAL; + break; + case GET_VLAN_REALDEV_NAME_CMD: + err = vlan_dev_get_realdev_name(args.device1, args.u.device2); + if (copy_to_user((void*)arg, &args, + sizeof(struct vlan_ioctl_args))) { + err = -EFAULT; + } + break; + + case GET_VLAN_VID_CMD: + err = vlan_dev_get_vid(args.device1, &vid); + args.u.VID = vid; + if (copy_to_user((void*)arg, &args, + sizeof(struct vlan_ioctl_args))) { + err = -EFAULT; + } + break; + default: /* pass on to underlying device instead?? */ printk(VLAN_DBG "%s: Unknown VLAN CMD: %x \n", --- linux-2.6.9/net/8021q/vlan.h 2004-10-18 14:54:37.000000000 -0700 +++ linux-2.6.9.p4s/net/8021q/vlan.h 2004-10-22 12:14:24.000000000 -0700 @@ -66,7 +66,9 @@ int vlan_dev_set_ingress_priority(char* dev_name, __u32 skb_prio, short vlan_prio); int vlan_dev_set_egress_priority(char* dev_name, __u32 skb_prio, short vlan_prio); int vlan_dev_set_vlan_flag(char* dev_name, __u32 flag, short flag_val); +int vlan_dev_get_realdev_name(const char* dev_name, char* result); +int vlan_dev_get_vid(const char* dev_name, unsigned short* result); void vlan_dev_set_multicast_list(struct net_device *vlan_dev); #endif /* !(__BEN_VLAN_802_1Q_INC__) */ --- linux-2.6.9/include/linux/if_vlan.h 2004-10-18 14:53:43.000000000 -0700 +++ linux-2.6.9.p4s/include/linux/if_vlan.h 2004-10-22 12:14:24.000000000 -0700 @@ -366,7 +366,9 @@ GET_VLAN_INGRESS_PRIORITY_CMD, GET_VLAN_EGRESS_PRIORITY_CMD, SET_VLAN_NAME_TYPE_CMD, - SET_VLAN_FLAG_CMD + SET_VLAN_FLAG_CMD, + GET_VLAN_REALDEV_NAME_CMD, /* If this works, you know it's a VLAN device, btw */ + GET_VLAN_VID_CMD /* Get the VID of this VLAN (specified by name) */ }; enum vlan_name_types { -- Ben Greear Candela Technologies Inc http://www.candelatech.com From romieu@fr.zoreil.com Fri Oct 22 14:46:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 14:46:42 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MLkaHj032702 for ; Fri, 22 Oct 2004 14:46:37 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i9MLkBvr006976; Fri, 22 Oct 2004 23:46:11 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i9MLkBH7006975; Fri, 22 Oct 2004 23:46:11 +0200 Date: Fri, 22 Oct 2004 23:46:11 +0200 From: Francois Romieu To: Ben Greear Cc: "'netdev@oss.sgi.com'" , "Linux 802.1Q VLAN" Subject: Re: [PATCH] 802.1Q VLAN Message-ID: <20041022214611.GA4948@electric-eye.fr.zoreil.com> References: <41797696.9070905@candelatech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41797696.9070905@candelatech.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 10742 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 Content-Length: 2064 Lines: 84 Minor nits below. [...] > @@ -484,13 +484,32 @@ > veth->h_vlan_proto, veth->h_vlan_TCI, > veth->h_vlan_encapsulated_proto); > #endif > > - stats->tx_packets++; /* for statics only */ > - stats->tx_bytes += skb->len; > - > skb->dev = VLAN_DEV_INFO(dev)->real_dev; > - dev_queue_xmit(skb); > > - return 0; > + { > + /* Please note, dev_queue_xmit consumes the pkt regardless of the > + * error value. So, will copy the skb first and free if successful. > + */ > + struct sk_buff* skb2 = skb_get(skb); > + int rv = dev_queue_xmit(skb2); > + if (rv != 0) { > + /* The skb memory should still be valid since we made a copy, > + * so can return error code here. > + */ > + return rv; > + } > + else { > + /* Was success, need to free the skb reference since we bumped up the > + * user count above. > + */ > + > + stats->tx_packets++; /* for statics only */ > + stats->tx_bytes += skb->len; > + > + kfree_skb(skb); > + return 0; > + } > + } Why not use a single return point, say: struct sk_buff *skb2 = skb_get(skb); int rv = dev_queue_xmit(skb2); if (!rv) { /* * Was success, need to free the skb reference since * we bumped up the user count above. */ stats->tx_packets++; /* for statics only */ stats->tx_bytes += skb->len; kfree_skb(skb); } return rv; vlan_dev_get_realdev_name() and vlan_dev_get_vid() can be tidy up a bit (factoring dev_put() or handling debug code differently for instance). [...] > --- linux-2.6.9/include/linux/if_vlan.h 2004-10-18 > 14:53:43.000000000 -0700 > +++ linux-2.6.9.p4s/include/linux/if_vlan.h 2004-10-22 > 12:14:24.000000000 -0700 > @@ -366,7 +366,9 @@ > GET_VLAN_INGRESS_PRIORITY_CMD, > GET_VLAN_EGRESS_PRIORITY_CMD, > SET_VLAN_NAME_TYPE_CMD, > - SET_VLAN_FLAG_CMD > + SET_VLAN_FLAG_CMD, > + GET_VLAN_REALDEV_NAME_CMD, /* If this works, you know it's a VLAN device, btw */ > + GET_VLAN_VID_CMD /* Get the VID of this VLAN (specified by name) */ > }; Whitespace attacks. My 0.02 U+20AC -- Ueimor From herbert@gondor.apana.org.au Fri Oct 22 14:51:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 14:51:16 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MLp6SZ000730 for ; Fri, 22 Oct 2004 14:51:07 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CL7J6-0005ui-00; Sat, 23 Oct 2004 07:50:44 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CL7J2-0003Vp-00; Sat, 23 Oct 2004 07:50:40 +1000 Date: Sat, 23 Oct 2004 07:50:40 +1000 To: Phil Oester Cc: linux-net@vger.kernel.org, netdev@oss.sgi.com, "David S. Miller" Subject: Re: 2.6.9 failed assertion in tcp_timer.c Message-ID: <20041022215040.GA13309@gondor.apana.org.au> References: <20041019215054.GA17565@linuxace.com> <20041020164748.GA20905@linuxace.com> <20041020212651.GA8534@gondor.apana.org.au> <20041020225536.GA22179@linuxace.com> <20041021130339.GA19345@gondor.apana.org.au> <20041021165224.GA25399@linuxace.com> <20041021215743.GA23062@gondor.apana.org.au> <20041022185435.GA30709@linuxace.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="3MwIy2ne0vdjdPXF" Content-Disposition: inline In-Reply-To: <20041022185435.GA30709@linuxace.com> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10743 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 1215 Lines: 41 --3MwIy2ne0vdjdPXF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Oct 22, 2004 at 11:54:35AM -0700, Phil Oester wrote: > > This patch gets it a bit further, but still panics (divide by 0?): Oops, I forgot that this gets called on non-TSO packets as well. So we don't really know whether it went further or not :) We should only set the TSO size if the packet was TSO to start with. Signed-off-by: Herbert Xu Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --3MwIy2ne0vdjdPXF Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p --- linux-2.6/net/ipv4/tcp_output.c.orig 2004-10-22 07:56:45.000000000 +1000 +++ linux-2.6/net/ipv4/tcp_output.c 2004-10-23 07:48:15.000000000 +1000 @@ -588,7 +588,8 @@ /* Any change of skb->len requires recalculation of tso * factor and mss. */ - tcp_set_skb_tso_segs(skb, tcp_skb_mss(skb)); + if (tcp_skb_mss(skb)) + tcp_set_skb_tso_segs(skb, tcp_skb_mss(skb)); return 0; } --3MwIy2ne0vdjdPXF-- From greearb@candelatech.com Fri Oct 22 15:09:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 15:09:35 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MM9TGj001683 for ; Fri, 22 Oct 2004 15:09:29 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i9MMG4LH018665; Fri, 22 Oct 2004 15:16:04 -0700 Message-ID: <41798506.1030909@candelatech.com> Date: Fri, 22 Oct 2004 15:09:10 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Francois Romieu CC: "'netdev@oss.sgi.com'" , "Linux 802.1Q VLAN" Subject: Re: [PATCH] 802.1Q VLAN References: <41797696.9070905@candelatech.com> <20041022214611.GA4948@electric-eye.fr.zoreil.com> In-Reply-To: <20041022214611.GA4948@electric-eye.fr.zoreil.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10744 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Content-Length: 3038 Lines: 103 Francois Romieu wrote: > Minor nits below. > > [...] > >>@@ -484,13 +484,32 @@ >> veth->h_vlan_proto, veth->h_vlan_TCI, >> veth->h_vlan_encapsulated_proto); >> #endif >> >>- stats->tx_packets++; /* for statics only */ >>- stats->tx_bytes += skb->len; >>- >> skb->dev = VLAN_DEV_INFO(dev)->real_dev; >>- dev_queue_xmit(skb); >> >>- return 0; >>+ { >>+ /* Please note, dev_queue_xmit consumes the pkt regardless of the >>+ * error value. So, will copy the skb first and free if successful. >>+ */ >>+ struct sk_buff* skb2 = skb_get(skb); >>+ int rv = dev_queue_xmit(skb2); >>+ if (rv != 0) { >>+ /* The skb memory should still be valid since we made a copy, >>+ * so can return error code here. >>+ */ >>+ return rv; >>+ } >>+ else { >>+ /* Was success, need to free the skb reference since we bumped up the >>+ * user count above. >>+ */ >>+ >>+ stats->tx_packets++; /* for statics only */ >>+ stats->tx_bytes += skb->len; >>+ >>+ kfree_skb(skb); >>+ return 0; >>+ } >>+ } > > > > Why not use a single return point, say: > > struct sk_buff *skb2 = skb_get(skb); > int rv = dev_queue_xmit(skb2); > > if (!rv) { > /* > * Was success, need to free the skb reference since > * we bumped up the user count above. > */ > > stats->tx_packets++; /* for statics only */ > stats->tx_bytes += skb->len; > > kfree_skb(skb); > } > return rv; That should be OK. I think I was worried that I would have to further translate the error codes. There appears to be no documentation on what valid return values are for the dev_queue_xmit or the hard_start_xmit method... I think someone should add comments to the netdevice.h file to specify the proper return codes (maybe even return an enum). In my own code, I have this patch to dev.c. I think it is correct, but I could be wrong: @@ -1253,6 +1272,17 @@ * A negative errno code is returned on a failure. A success does not * guarantee the frame will be transmitted as it may be dropped due * to congestion or traffic shaping. + * + * ----------------------------------------------------------------------------------- + * I notice this method can also return errors from the queue disciplines, + * including NET_XMIT_DROP, which is a positive value. So, errors can also + * be positive. + * + * Regardless of the return value, the skb is consumed, so it is currently + * impossible to retry a send to this method. This implies that virtual devices, + * such as VLANs, can ONLY return 0 from their hard_start_xmit method, making + * it difficult to apply pressure back up the stack. + * --Ben */ int dev_queue_xmit(struct sk_buff *skb) > vlan_dev_get_realdev_name() and vlan_dev_get_vid() can be tidy up > a bit (factoring dev_put() or handling debug code differently for instance). Agreed, will fix this and the white-space issue. Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From tgraf@suug.ch Fri Oct 22 15:10:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 15:10:23 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MMAH94001869 for ; Fri, 22 Oct 2004 15:10:17 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 26DC2F; Sat, 23 Oct 2004 00:09:38 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 3F7D71C0E9; Sat, 23 Oct 2004 00:10:20 +0200 (CEST) Date: Sat, 23 Oct 2004 00:10:20 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2.6] U32: Remove unused hgenerator field in tc_u_hnode Message-ID: <20041022221020.GG21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 10745 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 338 Lines: 12 Signed-off-by: Thomas Graf --- linux-2.6.9-bk6.orig/net/sched/cls_u32.c 2004-10-21 17:29:02.000000000 +0200 +++ linux-2.6.9-bk6/net/sched/cls_u32.c 2004-10-23 00:01:29.000000000 +0200 @@ -88,7 +88,6 @@ struct tc_u_common *tp_c; int refcnt; unsigned divisor; - u32 hgenerator; struct tc_u_knode *ht[1]; }; From tgraf@suug.ch Fri Oct 22 15:11:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 15:11:24 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MMBJXT002236 for ; Fri, 22 Oct 2004 15:11:19 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 0974AF; Sat, 23 Oct 2004 00:10:42 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 6A9DF1C0E9; Sat, 23 Oct 2004 00:11:25 +0200 (CEST) Date: Sat, 23 Oct 2004 00:11:25 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2.4] U32: Remove unused hgenerator field in tc_u_hnode Message-ID: <20041022221125.GH21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 10746 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 350 Lines: 12 Signed-off-by: Thomas Graf --- linux-2.4.28-pre4-bk6.orig/net/sched/cls_u32.c 2004-10-22 10:58:23.000000000 +0200 +++ linux-2.4.28-pre4-bk6/net/sched/cls_u32.c 2004-10-23 00:03:47.000000000 +0200 @@ -73,7 +73,6 @@ struct tc_u_common *tp_c; int refcnt; unsigned divisor; - u32 hgenerator; struct tc_u_knode *ht[1]; }; From davem@davemloft.net Fri Oct 22 15:18:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 15:18:57 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MMIpVt002994 for ; Fri, 22 Oct 2004 15:18:51 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CL7dp-0008Ez-00; Fri, 22 Oct 2004 15:12:09 -0700 Date: Fri, 22 Oct 2004 15:12:09 -0700 From: "David S. Miller" To: Herbert Xu Cc: kernel@linuxace.com, linux-net@vger.kernel.org, netdev@oss.sgi.com Subject: Re: 2.6.9 failed assertion in tcp_timer.c Message-Id: <20041022151209.26b2d355.davem@davemloft.net> In-Reply-To: <20041022215040.GA13309@gondor.apana.org.au> References: <20041019215054.GA17565@linuxace.com> <20041020164748.GA20905@linuxace.com> <20041020212651.GA8534@gondor.apana.org.au> <20041020225536.GA22179@linuxace.com> <20041021130339.GA19345@gondor.apana.org.au> <20041021165224.GA25399@linuxace.com> <20041021215743.GA23062@gondor.apana.org.au> <20041022185435.GA30709@linuxace.com> <20041022215040.GA13309@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10747 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 498 Lines: 15 On Sat, 23 Oct 2004 07:50:40 +1000 Herbert Xu wrote: > On Fri, Oct 22, 2004 at 11:54:35AM -0700, Phil Oester wrote: > > > > This patch gets it a bit further, but still panics (divide by 0?): > > Oops, I forgot that this gets called on non-TSO packets as well. > So we don't really know whether it went further or not :) > > We should only set the TSO size if the packet was TSO to start with. > > Signed-off-by: Herbert Xu Applied. From davem@davemloft.net Fri Oct 22 15:21:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 15:21:54 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MMLlMI003393 for ; Fri, 22 Oct 2004 15:21:47 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CL7gr-0008Fa-00; Fri, 22 Oct 2004 15:15:17 -0700 Date: Fri, 22 Oct 2004 15:15:16 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: netdev@oss.sgi.com Subject: Re: [PATCH] netem: use timer to handle packets not rescheduling Message-Id: <20041022151516.411e1385.davem@davemloft.net> In-Reply-To: <20041022125303.6c4c979a@zqx3.pdx.osdl.net> References: <20041022125303.6c4c979a@zqx3.pdx.osdl.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10748 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 277 Lines: 8 On Fri, 22 Oct 2004 12:53:03 -0700 Stephen Hemminger wrote: > Change the behaviour of netem's delayed packets queue to make it work better > with TBF and other rate control disciplines. Applied, thanks Stephen. Can you cook up a 2.4.x version? Thanks. From davem@davemloft.net Fri Oct 22 15:24:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 15:24:57 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MMOqjE003768 for ; Fri, 22 Oct 2004 15:24:52 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CL7jp-0008GH-00; Fri, 22 Oct 2004 15:18:21 -0700 Date: Fri, 22 Oct 2004 15:18:21 -0700 From: "David S. Miller" To: Thomas Graf Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.4] U32: Remove unused hgenerator field in tc_u_hnode Message-Id: <20041022151821.35da8eef.davem@davemloft.net> In-Reply-To: <20041022221125.GH21977@postel.suug.ch> References: <20041022221125.GH21977@postel.suug.ch> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10749 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 55 Lines: 2 Both 2.6.x and 2.4.x versions applied, thanks Thomas. From davem@davemloft.net Fri Oct 22 15:27:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 15:27:06 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MMR1hJ004057 for ; Fri, 22 Oct 2004 15:27:01 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CL7lw-0008Go-00; Fri, 22 Oct 2004 15:20:32 -0700 Date: Fri, 22 Oct 2004 15:20:31 -0700 From: "David S. Miller" To: Thomas Graf Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.4] PKT_SCHED: Avoid duplicated TCA_STATS TLVs for HTB and HFSC Message-Id: <20041022152031.0e7811a9.davem@davemloft.net> In-Reply-To: <20041022100517.GY21977@postel.suug.ch> References: <20041022100517.GY21977@postel.suug.ch> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10750 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 265 Lines: 10 On Fri, 22 Oct 2004 12:05:17 +0200 Thomas Graf wrote: > Backport of the equivalent 2.6 fixes. > > Qdiscs are not supposed to dump TCA_STATS, it is done in generic code part. > > Signed-off-by: Thomas Graf Applied, thanks Thomas. From tgraf@suug.ch Fri Oct 22 16:07:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 16:07:31 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MN7Pvm005433 for ; Fri, 22 Oct 2004 16:07:26 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id AD76BF; Sat, 23 Oct 2004 01:06:48 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id DF6E11C0E9; Sat, 23 Oct 2004 01:07:31 +0200 (CEST) Date: Sat, 23 Oct 2004 01:07:31 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2.4] PKT_SCHED: Rename TCQ_F_INGRES to TCQ_F_INGRESS Message-ID: <20041022230731.GL21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 10752 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 1285 Lines: 42 Signed-off-by: Thomas Graf --- linux-2.4.28-pre4-bk6.orig/include/net/pkt_sched.h 2004-10-22 10:58:23.000000000 +0200 +++ linux-2.4.28-pre4-bk6/include/net/pkt_sched.h 2004-10-23 00:48:08.000000000 +0200 @@ -78,7 +78,7 @@ unsigned flags; #define TCQ_F_BUILTIN 1 #define TCQ_F_THROTTLED 2 -#define TCQ_F_INGRES 4 +#define TCQ_F_INGRESS 4 struct Qdisc_ops *ops; u32 handle; u32 parent; --- linux-2.4.28-pre4-bk6.orig/net/sched/sch_api.c 2004-10-22 10:58:23.000000000 +0200 +++ linux-2.4.28-pre4-bk6/net/sched/sch_api.c 2004-10-23 00:48:08.000000000 +0200 @@ -307,7 +307,7 @@ write_lock(&qdisc_tree_lock); spin_lock_bh(&dev->queue_lock); - if (qdisc && qdisc->flags&TCQ_F_INGRES) { + if (qdisc && qdisc->flags&TCQ_F_INGRESS) { oqdisc = dev->qdisc_ingress; /* Prune old scheduler */ if (oqdisc && atomic_read(&oqdisc->refcnt) <= 1) { @@ -357,7 +357,7 @@ if (parent == NULL) { - if (q && q->flags&TCQ_F_INGRES) { + if (q && q->flags&TCQ_F_INGRESS) { *old = dev_graft_qdisc(dev, q); } else { *old = dev_graft_qdisc(dev, new); @@ -431,7 +431,7 @@ skb_queue_head_init(&sch->q); if (handle == TC_H_INGRESS) - sch->flags |= TCQ_F_INGRES; + sch->flags |= TCQ_F_INGRESS; sch->ops = ops; sch->enqueue = ops->enqueue; From tgraf@suug.ch Fri Oct 22 16:06:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 16:06:31 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MN6PLD005205 for ; Fri, 22 Oct 2004 16:06:26 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 23DF2F; Sat, 23 Oct 2004 01:05:48 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id F1F821C0E9; Sat, 23 Oct 2004 01:06:30 +0200 (CEST) Date: Sat, 23 Oct 2004 01:06:30 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2.6] PKT_SCHED: Rename TCQ_F_INGRES to TCQ_F_INGRESS Message-ID: <20041022230630.GK21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 10751 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 1308 Lines: 44 This typo annoyned me several times by not showing up in greps. Signed-off-by: Thomas Graf --- linux-2.6.9-bk6.orig/include/net/pkt_sched.h 2004-10-21 17:28:57.000000000 +0200 +++ linux-2.6.9-bk6/include/net/pkt_sched.h 2004-10-23 00:45:48.000000000 +0200 @@ -79,7 +79,7 @@ unsigned flags; #define TCQ_F_BUILTIN 1 #define TCQ_F_THROTTLED 2 -#define TCQ_F_INGRES 4 +#define TCQ_F_INGRESS 4 int padded; struct Qdisc_ops *ops; u32 handle; --- linux-2.6.9-bk6.orig/net/sched/sch_api.c 2004-10-21 17:29:02.000000000 +0200 +++ linux-2.6.9-bk6/net/sched/sch_api.c 2004-10-23 00:42:06.000000000 +0200 @@ -308,7 +308,7 @@ dev_deactivate(dev); qdisc_lock_tree(dev); - if (qdisc && qdisc->flags&TCQ_F_INGRES) { + if (qdisc && qdisc->flags&TCQ_F_INGRESS) { oqdisc = dev->qdisc_ingress; /* Prune old scheduler */ if (oqdisc && atomic_read(&oqdisc->refcnt) <= 1) { @@ -357,7 +357,7 @@ if (parent == NULL) { - if (q && q->flags&TCQ_F_INGRES) { + if (q && q->flags&TCQ_F_INGRESS) { *old = dev_graft_qdisc(dev, q); } else { *old = dev_graft_qdisc(dev, new); @@ -430,7 +430,7 @@ skb_queue_head_init(&sch->q); if (handle == TC_H_INGRESS) - sch->flags |= TCQ_F_INGRES; + sch->flags |= TCQ_F_INGRESS; sch->ops = ops; sch->enqueue = ops->enqueue; From rmk+netdev=oss.sgi.com@arm.linux.org.uk Fri Oct 22 16:08:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 16:08:35 -0700 (PDT) Received: from caramon.arm.linux.org.uk (caramon.arm.linux.org.uk [212.18.232.186]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MN8ScW005742 for ; Fri, 22 Oct 2004 16:08:29 -0700 Received: from flint.arm.linux.org.uk ([2002:d412:e8ba:1:201:2ff:fe14:8fad]) by caramon.arm.linux.org.uk with asmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.41) id 1CL8Vo-0006fi-TE; Sat, 23 Oct 2004 00:07:57 +0100 Received: from rmk by flint.arm.linux.org.uk with local (Exim 4.41) id 1CL8Vn-0007kl-GY; Sat, 23 Oct 2004 00:07:55 +0100 Date: Sat, 23 Oct 2004 00:07:55 +0100 From: Russell King To: Adrian Bunk Cc: Andrew Morton , linux-kernel@vger.kernel.org, jgarzik@pobox.com, linux-net@vger.kernel.org, prism54-private@prism54.org, netdev@oss.sgi.com Subject: Re: 2.6.9-mm1: pc_debug multiple definitions Message-ID: <20041023000755.E3459@flint.arm.linux.org.uk> Mail-Followup-To: Adrian Bunk , Andrew Morton , linux-kernel@vger.kernel.org, jgarzik@pobox.com, linux-net@vger.kernel.org, prism54-private@prism54.org, netdev@oss.sgi.com References: <20041022032039.730eb226.akpm@osdl.org> <20041022133929.GA2831@stusta.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20041022133929.GA2831@stusta.de>; from bunk@stusta.de on Fri, Oct 22, 2004 at 03:39:29PM +0200 X-archive-position: 10753 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rmk+lkml@arm.linux.org.uk Precedence: bulk X-list: netdev Content-Length: 985 Lines: 31 On Fri, Oct 22, 2004 at 03:39:29PM +0200, Adrian Bunk wrote: > > The following compile error comes from Linus' tree: > > > <-- snip --> > > ... > LD drivers/built-in.o > drivers/pcmcia/built-in.o(.bss+0xf20): multiple definition of `pc_debug' > drivers/net/built-in.o(.data+0x24ae0): first defined here > make[1]: *** [drivers/built-in.o] Error 1 > > <-- snip --> > > > The pc_debug in drivers/pcmcia/ds.c was made non-static in Linus' tree, > but the global definition of a global variable with such a generic name > in drivers/net/wireless/prism54/islpci_mgt.c seems to be equally wrong. I've forwarded it to Dominik to sort out with suggested solutions. Hopefully Dominik will forward a fix soon. (PS, I dropped David Hinds from the CC list - David doesn't maintain 2.6 PCMCIA.) -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/ 2.6 Serial core From davem@davemloft.net Fri Oct 22 16:13:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 16:13:06 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MND1gd006312 for ; Fri, 22 Oct 2004 16:13:01 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CL8Tv-0008Oj-00; Fri, 22 Oct 2004 16:05:59 -0700 Date: Fri, 22 Oct 2004 16:05:59 -0700 From: "David S. Miller" To: Herbert Xu Cc: laforge@netfilter.org, lmb@suse.de, ahu@ds9a.nl, hch@infradead.org, netdev@oss.sgi.com Subject: Re: Allowing netlink_family to be any integer (was: [PATCH 2.6] iptables CLUSTERIP target) Message-Id: <20041022160559.28f9c540.davem@davemloft.net> In-Reply-To: References: <20041021142527.GG3551@sunbeam.de.gnumonks.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10754 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 739 Lines: 18 On Fri, 22 Oct 2004 07:31:07 +1000 Herbert Xu wrote: > Initially I considered an interface where kernel users can register > themselves using a string as the key. But I soon realised that we > could simply allow the netlink_family field to be an arbitrary integer > that is used as a key to a hash table. (I assume you mean "nl_family" not "netlink_family" :-) > The CPU cost of the hash table isn't too bad since you'll only be > looking it up when the socket is created. I'm fine with this idea, however please tell me how you intend to make things like ->getname() behave? I would also suggest to start with values > AF_MAX, so that people sticking other AF_* values in there by accident are caught. From herbert@gondor.apana.org.au Fri Oct 22 16:17:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 16:17:25 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MNHFjE006712 for ; Fri, 22 Oct 2004 16:17:17 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CL8dr-0006dl-00; Sat, 23 Oct 2004 09:16:15 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CL8dj-0003k3-00; Sat, 23 Oct 2004 09:16:07 +1000 Date: Sat, 23 Oct 2004 09:16:07 +1000 To: "David S. Miller" Cc: laforge@netfilter.org, lmb@suse.de, ahu@ds9a.nl, hch@infradead.org, netdev@oss.sgi.com Subject: Re: Allowing netlink_family to be any integer (was: [PATCH 2.6] iptables CLUSTERIP target) Message-ID: <20041022231607.GA14365@gondor.apana.org.au> References: <20041021142527.GG3551@sunbeam.de.gnumonks.org> <20041022160559.28f9c540.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041022160559.28f9c540.davem@davemloft.net> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10755 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 808 Lines: 20 On Fri, Oct 22, 2004 at 04:05:59PM -0700, David S. Miller wrote: > On Fri, 22 Oct 2004 07:31:07 +1000 > Herbert Xu wrote: > > > Initially I considered an interface where kernel users can register > > themselves using a string as the key. But I soon realised that we > > could simply allow the netlink_family field to be an arbitrary integer > > that is used as a key to a hash table. > > (I assume you mean "nl_family" not "netlink_family" :-) I'm no plans yet in taking over all address families :) I'm only referring to the third argument in socket(2). Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From herbert@gondor.apana.org.au Fri Oct 22 16:24:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 16:24:40 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9MNOUem010353 for ; Fri, 22 Oct 2004 16:24:31 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CL8lS-0006jV-00; Sat, 23 Oct 2004 09:24:06 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CL8lP-0003on-00; Sat, 23 Oct 2004 09:24:03 +1000 Date: Sat, 23 Oct 2004 09:24:03 +1000 To: Phil Oester Cc: linux-net@vger.kernel.org, netdev@oss.sgi.com, "David S. Miller" Subject: Re: 2.6.9 failed assertion in tcp_timer.c Message-ID: <20041022232403.GA14618@gondor.apana.org.au> References: <20041019215054.GA17565@linuxace.com> <20041020164748.GA20905@linuxace.com> <20041020212651.GA8534@gondor.apana.org.au> <20041020225536.GA22179@linuxace.com> <20041021130339.GA19345@gondor.apana.org.au> <20041021165224.GA25399@linuxace.com> <20041021215743.GA23062@gondor.apana.org.au> <20041022185435.GA30709@linuxace.com> <20041022215040.GA13309@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MGYHOYXEY6WxJCY8" Content-Disposition: inline In-Reply-To: <20041022215040.GA13309@gondor.apana.org.au> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10756 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 2628 Lines: 85 --MGYHOYXEY6WxJCY8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Oct 23, 2004 at 07:50:40AM +1000, herbert wrote: > > So we don't really know whether it went further or not :) Actually, I think we've caught your crash now. If that code path is triggering at all, then it'll trigger with TSO packets too. If we get a truly partial ack on a TSO packet, then tcp_tso_acked will not trim it off. So we will fall through to this last-ditch trim call, which doesn't update packets_out. There are two solutions to this problem. I've taken the simpler approach for now. We simply trim off the partial bits in tcp_tso_acked and live with the fact that the packet counters may differ from what's on the netwrok by one. Signed-off-by: Herbert Xu Later on we can "fix" this by remembering where the original TSO packet started from, perhaps in skb->h or somewhere. Dave, is this worth it? Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --MGYHOYXEY6WxJCY8 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== net/ipv4/tcp_input.c 1.81 vs edited ===== --- 1.81/net/ipv4/tcp_input.c 2004-10-04 07:31:39 +10:00 +++ edited/net/ipv4/tcp_input.c 2004-10-23 09:12:42 +10:00 @@ -2369,25 +2369,19 @@ { struct tcp_opt *tp = tcp_sk(sk); struct tcp_skb_cb *scb = TCP_SKB_CB(skb); - __u32 mss = tcp_skb_mss(skb); - __u32 snd_una = tp->snd_una; - __u32 orig_seq, seq; - __u32 packets_acked = 0; + __u32 seq = tp->snd_una; + __u32 packets_acked; int acked = 0; /* If we get here, the whole TSO packet has not been * acked. */ - BUG_ON(!after(scb->end_seq, snd_una)); + BUG_ON(!after(scb->end_seq, seq)); - seq = orig_seq = scb->seq; - while (!after(seq + mss, snd_una)) { - packets_acked++; - seq += mss; - } - - if (tcp_trim_head(sk, skb, (seq - orig_seq))) + packets_acked = tcp_skb_pcount(skb); + if (tcp_trim_head(sk, skb, seq - scb->seq)) return 0; + packets_acked -= tcp_skb_pcount(skb); if (packets_acked) { __u8 sacked = scb->sacked; --- linux-2.6/net/ipv4/tcp_output.c.orig 2004-10-23 08:44:16.000000000 +1000 +++ linux-2.6/net/ipv4/tcp_output.c 2004-10-23 09:10:13.000000000 +1000 @@ -588,7 +588,7 @@ /* Any change of skb->len requires recalculation of tso * factor and mss. */ - if (tcp_skb_mss(skb)) + if (tcp_skb_pcount(skb) > 1) tcp_set_skb_tso_segs(skb, tcp_skb_mss(skb)); return 0; --MGYHOYXEY6WxJCY8-- From suresh.krishnan@ericsson.com Fri Oct 22 17:14:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 17:14:21 -0700 (PDT) Received: from imr2.ericy.com (imr2.ericy.com [198.24.6.3]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9N0EEbH013012 for ; Fri, 22 Oct 2004 17:14:15 -0700 Received: from eamrcnt751.exu.ericsson.se (eamrcnt751.exu.ericsson.se [138.85.133.52]) by imr2.ericy.com (8.12.10/8.12.10) with ESMTP id i9N0DHbj007557; Fri, 22 Oct 2004 19:13:17 -0500 (CDT) Received: by eamrcnt751.exu.ericsson.se with Internet Mail Service (5.5.2657.72) id ; Fri, 22 Oct 2004 19:13:16 -0500 Received: from [142.133.72.115] (142.133.72.115 [142.133.72.115]) by EAMMLEX034.dyn.lmc.ericsson.se with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id VJ838GF6; Fri, 22 Oct 2004 20:12:44 -0400 Date: Fri, 22 Oct 2004 20:07:01 -0400 (EDT) From: Suresh Krishnan X-X-Sender: lmcsukr@localhost.localdomain Reply-To: Suresh Krishnan To: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= cc: davem@davemloft.net, , Subject: Re: [PATCH 2.6.9] address family not supported for sendmsg() In-Reply-To: <20041022.153137.99739029.yoshfuji@linux-ipv6.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 X-archive-position: 10757 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: suresh.krishnan@ericsson.ca Precedence: bulk X-list: netdev Content-Length: 583 Lines: 17 Hi Dave/Yoshifuji, I agree that the case you pointed out is tricky. I am fine with either EAFNOSUPPORT or EINVAL. But the POSIX and SUSv3 man pages specify EINVAL as a error only when the sum of iov_len values overflows ssize_t. Thanks Suresh On Fri, 22 Oct 2004, YOSHIFUJI Hideaki / [iso-2022-jp] $B5HF#1QL@(B wrote: >In article <20041022.153056.57690221.yoshfuji@linux-ipv6.org> (at Fri, 22 Oct 2004 15:30:56 +0900 (JST)), YOSHIFUJI Hideaki / $B5HF#1QL@(J says: > >> This may be convered by EAFNOSUPPORT. > covered > >--yoshfuji > From romieu@fr.zoreil.com Fri Oct 22 17:26:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 17:26:42 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9N0QZUc013602 for ; Fri, 22 Oct 2004 17:26:36 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i9N0OQvr010405; Sat, 23 Oct 2004 02:24:26 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i9N0OP4P010404; Sat, 23 Oct 2004 02:24:25 +0200 Date: Sat, 23 Oct 2004 02:24:25 +0200 From: Francois Romieu To: Ben Greear Cc: "'netdev@oss.sgi.com'" Subject: Re: [PATCH] 802.1Q VLAN Message-ID: <20041023002425.GB4948@electric-eye.fr.zoreil.com> References: <41797696.9070905@candelatech.com> <20041022214611.GA4948@electric-eye.fr.zoreil.com> <41798506.1030909@candelatech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41798506.1030909@candelatech.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 10758 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 Content-Length: 1200 Lines: 29 (vlan cc: bounces) Ben Greear : [...] > @@ -1253,6 +1272,17 @@ > * A negative errno code is returned on a failure. A success does not > * guarantee the frame will be transmitted as it may be dropped due > * to congestion or traffic shaping. > + * > + * > ----------------------------------------------------------------------------------- > + * I notice this method can also return errors from the queue disciplines, > + * including NET_XMIT_DROP, which is a positive value. So, errors can also > + * be positive. > + * > + * Regardless of the return value, the skb is consumed, so it is currently > + * impossible to retry a send to this method. This implies that virtual devices, > + * such as VLANs, can ONLY return 0 from their hard_start_xmit method, making > + * it difficult to apply pressure back up the stack. > + * --Ben > */ Afaikr it is not true anymore with the previous code as the congestion/error status is propagated and the extra skb_get() balances the kfree_skb() on error in dev_queue_xmit. So I'd say that vlan_dev_hard_start_xmit() seems to behave like a normal start_xmit() instead. -- Ueimor From herbert@gondor.apana.org.au Fri Oct 22 18:20:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 18:20:52 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9N1Kg9n015325 for ; Fri, 22 Oct 2004 18:20:43 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CLAZw-0007fD-00; Sat, 23 Oct 2004 11:20:20 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CLAZu-0003zJ-00; Sat, 23 Oct 2004 11:20:18 +1000 Date: Sat, 23 Oct 2004 11:20:18 +1000 To: James Morris Cc: netdev@oss.sgi.com Subject: Re: TCP crashes when cycling loopback interface. Message-ID: <20041023012018.GA15257@gondor.apana.org.au> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="bp/iNruPH9dso1Pn" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10759 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 1167 Lines: 40 --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Oct 07, 2004 at 12:46:25PM -0400, James Morris wrote: > > Two runs with the following crashes: > > KERNEL: assertion (!skb_queue_empty(&sk->sk_write_queue)) failed at net/ipv4/tcp_timer.c (322) James, are you still getting this crash? If so can you please apply this patch and see if it trips? If it does then your problem has been found and fixed. Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== net/ipv4/tcp_output.c 1.68 vs edited ===== --- 1.68/net/ipv4/tcp_output.c 2004-10-20 15:13:52 +10:00 +++ edited/net/ipv4/tcp_output.c 2004-10-23 11:19:21 +10:00 @@ -1038,6 +1038,7 @@ tp->mss_cache = tp->mss_cache_std; } + BUG_TRAP(tcp_skb_pcount(skb) <= 1); if (tcp_trim_head(sk, skb, tp->snd_una - TCP_SKB_CB(skb)->seq)) return -ENOMEM; } --bp/iNruPH9dso1Pn-- From linville@bilbo.tuxdriver.com Fri Oct 22 18:48:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 18:48:48 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9N1mgjC016282 for ; Fri, 22 Oct 2004 18:48:43 -0700 Received: from bilbo.tuxdriver.com (bilbo.tuxdriver.com [24.172.12.5]) by ra.tuxdriver.com (8.11.6/8.11.6) with ESMTP id i9N0hDh28883; Fri, 22 Oct 2004 20:43:13 -0400 Received: from bilbo.tuxdriver.com (bilbo.tuxdriver.com [24.172.12.5]) by bilbo.tuxdriver.com (8.12.11/8.12.11) with ESMTP id i9N1nOYE032200; Fri, 22 Oct 2004 21:49:24 -0400 Received: (from linville@localhost) by bilbo.tuxdriver.com (8.12.11/8.12.11/Submit) id i9N1nOLj032199; Fri, 22 Oct 2004 21:49:24 -0400 Date: Fri, 22 Oct 2004 21:49:24 -0400 From: "John W. Linville" To: Francois Romieu Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com Subject: [patch netdev-2.6 3/3] r8169: simplify trick if() expression Message-ID: <20041023014923.GB32031@tuxdriver.com> Mail-Followup-To: Francois Romieu , netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com References: <20041022005737.GA1945@tuxdriver.com> <20041022202851.GB4216@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041022202851.GB4216@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.4.1i X-archive-position: 10760 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 679 Lines: 22 Simplify tricky if() expression in rtl8169_vlan_rx_register(). Signed-off-by: John W. Linville --- You're probably right -- the "if ((tp->vlgrp = grp))" line is probably a little TOO clever... :-) drivers/net/r8169.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) --- ./drivers/net/r8169.c.orig 2004-10-22 21:44:06.050154952 -0400 +++ ./drivers/net/r8169.c 2004-10-22 21:44:26.228087440 -0400 @@ -703,7 +703,8 @@ static void rtl8169_vlan_rx_register(str unsigned long flags; spin_lock_irqsave(&tp->lock, flags); - if ((tp->vlgrp = grp)) + tp->vlgrp = grp; + if (tp->vlgrp) tp->cp_cmd |= RxVlan; else tp->cp_cmd &= ~RxVlan; From linville@bilbo.tuxdriver.com Fri Oct 22 18:50:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 18:50:32 -0700 (PDT) Received: from ra.tuxdriver.com (ra.tuxdriver.com [24.172.12.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9N1oRei016565 for ; Fri, 22 Oct 2004 18:50:27 -0700 Received: from bilbo.tuxdriver.com (bilbo.tuxdriver.com [24.172.12.5]) by ra.tuxdriver.com (8.11.6/8.11.6) with ESMTP id i9N0j0h28932; Fri, 22 Oct 2004 20:45:00 -0400 Received: from bilbo.tuxdriver.com (bilbo.tuxdriver.com [24.172.12.5]) by bilbo.tuxdriver.com (8.12.11/8.12.11) with ESMTP id i9N1pC0H032215; Fri, 22 Oct 2004 21:51:12 -0400 Received: (from linville@localhost) by bilbo.tuxdriver.com (8.12.11/8.12.11/Submit) id i9N1pCPb032214; Fri, 22 Oct 2004 21:51:12 -0400 Date: Fri, 22 Oct 2004 21:51:12 -0400 From: "John W. Linville" To: Francois Romieu Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com Subject: Re: [patch netdev-2.6 0/2] r8169: vlan hwaccel fixes Message-ID: <20041023015111.GC32031@tuxdriver.com> Mail-Followup-To: Francois Romieu , netdev@oss.sgi.com, linux-kernel@vger.kernel.org, jgarzik@pobox.com References: <20041022005737.GA1945@tuxdriver.com> <20041022202851.GB4216@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041022202851.GB4216@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.4.1i X-archive-position: 10761 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linville@tuxdriver.com Precedence: bulk X-list: netdev Content-Length: 527 Lines: 17 On Fri, Oct 22, 2004 at 10:28:51PM +0200, Francois Romieu wrote: > John W. Linville : > > Patch 2: > [nice explanation] > > Any objection against me replacing the actual comment of patch #2 (i.e. > "why" instead of "how") and splitting the "if ((tp->>vlgrp = grp))" over > two lines ? Not quite sure which comment you mean, but I'm sure that's fine. I posted a third patch to fix-up that tricky if() -- you're right, it is a little TOO clever... :-) John -- John W. Linville linville@tuxdriver.com From jmorris@redhat.com Fri Oct 22 20:23:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 20:23:41 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9N3NZ9M022400 for ; Fri, 22 Oct 2004 20:23:35 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9N3NBCP025716; Fri, 22 Oct 2004 23:23:11 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9N3NAr18545; Fri, 22 Oct 2004 23:23:10 -0400 Received: from thoron.boston.redhat.com (thoron.boston.redhat.com [172.16.80.63]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9N3N9Pe021669; Fri, 22 Oct 2004 23:23:09 -0400 Date: Fri, 22 Oct 2004 23:23:10 -0400 (EDT) From: James Morris X-X-Sender: jmorris@thoron.boston.redhat.com To: Herbert Xu cc: netdev@oss.sgi.com Subject: Re: TCP crashes when cycling loopback interface. In-Reply-To: <20041023012018.GA15257@gondor.apana.org.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 10762 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jmorris@redhat.com Precedence: bulk X-list: netdev Content-Length: 410 Lines: 20 On Sat, 23 Oct 2004, Herbert Xu wrote: > > KERNEL: assertion (!skb_queue_empty(&sk->sk_write_queue)) failed at net/ipv4/tcp_timer.c (322) > > James, are you still getting this crash? Yes. > If so can you please apply this patch and see if it trips? If it > does then your problem has been found and fixed. Did not seem to trip during a crash in 2.6.9-mm1 - James -- James Morris From davem@davemloft.net Fri Oct 22 22:35:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 22:35:45 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9N5Zejc025938 for ; Fri, 22 Oct 2004 22:35:40 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CLESd-0000qb-00; Fri, 22 Oct 2004 22:29:03 -0700 Date: Fri, 22 Oct 2004 22:29:03 -0700 From: "David S. Miller" To: Suresh Krishnan Cc: yoshfuji@linux-ipv6.org, netdev@oss.sgi.com Subject: Re: [PATCH 2.6.9] address family not supported for sendmsg() Message-Id: <20041022222903.0871a216.davem@davemloft.net> In-Reply-To: References: <20041022.153137.99739029.yoshfuji@linux-ipv6.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10763 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 457 Lines: 12 On Fri, 22 Oct 2004 20:07:01 -0400 (EDT) Suresh Krishnan wrote: > Hi Dave/Yoshifuji, > I agree that the case you pointed out is tricky. I am fine with either > EAFNOSUPPORT or EINVAL. But the POSIX and SUSv3 man pages specify EINVAL > as a error only when the sum of iov_len values overflows ssize_t. I now think EAFNOSUPPORT is fine. Please resend your patch to me under private cover so I can apply it Suresh, thanks. From herbert@gondor.apana.org.au Fri Oct 22 22:49:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 22 Oct 2004 22:49:32 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9N5nM0u026627 for ; Fri, 22 Oct 2004 22:49:23 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CLElx-0000f8-00; Sat, 23 Oct 2004 15:49:01 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CLEls-00051y-00; Sat, 23 Oct 2004 15:48:56 +1000 Date: Sat, 23 Oct 2004 15:48:56 +1000 To: James Morris Cc: netdev@oss.sgi.com Subject: Re: TCP crashes when cycling loopback interface. Message-ID: <20041023054856.GA19324@gondor.apana.org.au> References: <20041023012018.GA15257@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="dDRMvlgZJXvWKvBx" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10764 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 1161 Lines: 38 --dDRMvlgZJXvWKvBx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Oct 22, 2004 at 11:23:10PM -0400, James Morris wrote: > > Did not seem to trip during a crash in 2.6.9-mm1 Oh well. Please apply this patch and tell me whether packets_out is postive or negative when it crashes. Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --dDRMvlgZJXvWKvBx Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== net/ipv4/tcp_timer.c 1.24 vs edited ===== --- 1.24/net/ipv4/tcp_timer.c 2004-09-08 02:18:04 +10:00 +++ edited/net/ipv4/tcp_timer.c 2004-10-09 16:51:20 +10:00 @@ -319,6 +319,9 @@ if (!tcp_get_pcount(&tp->packets_out)) goto out; + if (skb_queue_empty(&sk->sk_write_queue)) + printk(KERN_DEBUG "TCP: empty write queue packets_out = %d", + tcp_get_pcount(&tp->packets_out)); BUG_TRAP(!skb_queue_empty(&sk->sk_write_queue)); if (!tp->snd_wnd && !sock_flag(sk, SOCK_DEAD) && --dDRMvlgZJXvWKvBx-- From vda@port.imtp.ilyichevsk.odessa.ua Sat Oct 23 06:00:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 23 Oct 2004 06:00:24 -0700 (PDT) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9ND0GY0018269 for ; Sat, 23 Oct 2004 06:00:17 -0700 Received: (qmail 11603 invoked by alias); 23 Oct 2004 12:59:57 -0000 Received: from unknown (195.138.72.162) by 0 (195.66.192.168) with ESMTP; 23 Oct 2004 12:59:57 -0000 From: Denis Vlasenko To: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: 2.6.9 SMP: via-rhine cannot be upped. Date: Sat, 23 Oct 2004 15:59:28 +0300 User-Agent: KMail/1.5.4 Cc: Stephen Hemminger , Jeff Garzik MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_wWleBRFFIcZ2ZEK" Message-Id: <200410231559.28215.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 10765 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: vda@port.imtp.ilyichevsk.odessa.ua Precedence: bulk X-list: netdev Content-Length: 14640 Lines: 246 --Boundary-00=_wWleBRFFIcZ2ZEK Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I reported this yesterday but somehow managed to mess up configs and accidentally compiled 2.6.9 for SMP! :( I just checked that it does not happen on non-SMP 2.6.9. 2.6.9-preempt is working too. Here goes a problem description again. I have an onboard VIA eth: # lspci 00:00.0 Host bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333] 00:01.0 PCI bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333 A= GP] 00:0a.0 Network controller: Texas Instruments ACX 111 54Mbps Wireless Inter= face 00:0c.0 Network controller: Harris Semiconductor D-Links DWL-g650 A1 (rev 0= 1) 00:10.0 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] = (rev 80) 00:10.1 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] = (rev 80) 00:10.2 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] = (rev 80) 00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82) 00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge 00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT82= 3x/A/C/VT8235 PIPC Bus Master IDE (rev 06) 00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8= 237 AC97 Audio Controller (rev 50) 00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev = 74) 01:00.0 VGA compatible controller: nVidia Corporation NV11 [GeForce2 MX/MX = 400] (rev a1) It cannot be upped: # ip l set dev if up SIOCSIFFLAGS: Function not implemented # ifconfig if up SIOCSIFFLAGS: Function not implemented # busybox ip l set dev if up SIOCSIFFLAGS: Function not implemented (NB: ip and ifconfig are not busyboxed, they are "standard" ones) Strace (busybox one is smallest): execve("/usr/bin/busybox", ["busybox", "ip", "l", "set", "dev", "if", "up"]= , [/* 28 vars */]) =3D 0 fcntl64(0, F_GETFD) =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =3D 0 fcntl64(1, F_GETFD) =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =3D 0 fcntl64(2, F_GETFD) =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =3D 0 uname({sys=3D"Linux", node=3D"shadow", ...}) =3D 0 geteuid32() =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =3D 0 getuid32() =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A=3D 0 getegid32() =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =3D 0 getgid32() =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A=3D 0 brk(0) =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A= =3D 0x81ab000 brk(0x81ac000) =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A=3D 0x81a= c000 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) =3D 4 ioctl(4, 0x8913, 0xbffff9e0) =9A =9A =9A =9A =9A =9A=3D 0 ioctl(4, 0x8914, 0xbffff9e0) =9A =9A =9A =9A =9A =9A=3D -1 ENOSYS (Function= not implemented) dup(2) =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A= =3D 5 fcntl64(5, F_GETFL) =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =3D 0x2 (flags = O_RDWR) fstat64(5, {st_mode=3DS_IFCHR|0600, st_rdev=3Dmakedev(136, 2), ...}) =3D 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0= ) =3D 0x40000000 _llseek(5, 0, 0xbffff830, SEEK_CUR) =9A =9A =3D -1 ESPIPE (Illegal seek) write(5, "SIOCSIFFLAGS: Function not imple"..., 39) =3D 39 close(5) =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A=3D= 0 munmap(0x40000000, 4096) =9A =9A =9A =9A =9A =9A =9A =9A=3D 0 close(4) =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A=3D= 0 write(2, "BusyBox v1.00-pre8 (2004.03.31-2"..., 295) =3D 295 _exit(1) I booted with init=3D/bin/sh and ran 'ip l set dev eth0 up' =2D it fails under 2.6.9-smp. This rules out my userspace setup being somehow involved (for example, the fact that I rename iface from 'eth0' to 'if' does not contribute to the bug). My 2.6.9-smp config is attached. =2D- vda --Boundary-00=_wWleBRFFIcZ2ZEK Content-Type: application/x-bzip2; name=".config.bz2" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=".config.bz2" QlpoOTFBWSZTWU3TjBcAB8xfgEAQWOf/8j////C////gYCT8AAAOXcBR29mXGgn2oaCiwoHyy1AA Iy0O7AubTuxBFdBtojtg6kAdejy8hWQB7ZRdgbt0cnRqilb27ux1n3b2Pd7vX27ldsdgamECYjTQ CAIgptNT1DI0xM1PRAANNCMhCYTSaaaVNkjyIAABoAABiITSYapiR6J5Go2pp5Jk2o0eoP1QGQ9I aCTSSI1MSPUyT0mSGQAAABo0BkASKRpqjaj01NpkNT0o2p+lD1PUAPUYjIaAAJEQRoEyCCaJqek0 oaGmgANAaaA6/m+mf+/tY6uIsFMS8UrHKUSjURFRFFBaypa2oMay2yYzGGP1POGkLiM7fzpkX7uv 8c26Noy2GmpMRYcgITPqwu9ObN1FTE19Lodl1i4yoj9FPoymrfkfEhnijVp2Yp6jWhyoVFlaIqVl FXVsVxtzJkUrGmZW2qC4JUWsLllViIiqtK2VrTPloaTWqo4VwsUWtQUxhWTGFjlq5cy3LW5JFAy5 ka0KlpaKsFZFUCLIVItFHMtZAUgCilarWMxvw1rV1K41WY0YoLIKCmVEq1FIlknzIQxhAMqNtLqo 4728jMMNN2pVXMzFY4235cuUrpw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2YkML1GaOq9Vmi5O9pLTGE4kpZmenKlh9+qBH6fHd2wx5 cnBCEkaruazbsk3NGfVOdEdfeYN/8XckU4UJBN04wXA= --Boundary-00=_wWleBRFFIcZ2ZEK-- From mcgrof@studorgs.rutgers.edu Sat Oct 23 20:42:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 23 Oct 2004 20:42:14 -0700 (PDT) Received: from ruslug.rutgers.edu (studorgs.rutgers.edu [128.6.24.131]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9O3g7in022116 for ; Sat, 23 Oct 2004 20:42:08 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id 4FD2DF99BE; Sat, 23 Oct 2004 23:41:52 -0400 (EDT) Date: Sat, 23 Oct 2004 23:41:52 -0400 To: Adrian Bunk Cc: Andrew Morton , David Hinds , linux-kernel@vger.kernel.org, jgarzik@pobox.com, linux-net@vger.kernel.org, prism54-devel@prism54.org, netdev@oss.sgi.com Subject: Re: 2.6.9-mm1: pc_debug multiple definitions Message-ID: <20041024034152.GB17506@ruslug.rutgers.edu> Mail-Followup-To: Adrian Bunk , Andrew Morton , David Hinds , linux-kernel@vger.kernel.org, jgarzik@pobox.com, linux-net@vger.kernel.org, prism54-devel@prism54.org, netdev@oss.sgi.com References: <20041022032039.730eb226.akpm@osdl.org> <20041022133929.GA2831@stusta.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041022133929.GA2831@stusta.de> User-Agent: Mutt/1.3.28i X-Operating-System: 2.4.18-1-686 Organization: Rutgers University Student Linux Users Group From: mcgrof@studorgs.rutgers.edu (Luis R. Rodriguez) X-archive-position: 10766 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mcgrof@studorgs.rutgers.edu Precedence: bulk X-list: netdev Content-Length: 1036 Lines: 32 On Fri, Oct 22, 2004 at 03:39:29PM +0200, Adrian Bunk wrote: > > The following compile error comes from Linus' tree: > > > <-- snip --> > > ... > LD drivers/built-in.o > drivers/pcmcia/built-in.o(.bss+0xf20): multiple definition of `pc_debug' > drivers/net/built-in.o(.data+0x24ae0): first defined here > make[1]: *** [drivers/built-in.o] Error 1 > > <-- snip --> > > > The pc_debug in drivers/pcmcia/ds.c was made non-static in Linus' tree, > but the global definition of a global variable with such a generic name > in drivers/net/wireless/prism54/islpci_mgt.c seems to be equally wrong. Great, anyone know why this change was done on ds.c ? The pc_debug on prism54 comes from the original Intersil driver. It is used to for debugging but we should move away from our current debugging mechanism to netif_msg. Margit, do you have some pending commits left? Do you want to take a stab at this? If not I can later on this week. Luis -- GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E From bunk@stusta.de Sun Oct 24 02:34:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 02:34:38 -0700 (PDT) Received: from mailout.stusta.mhn.de (emailhub.stusta.mhn.de [141.84.69.5]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9O9YV2D001390 for ; Sun, 24 Oct 2004 02:34:32 -0700 Received: (qmail 31263 invoked from network); 24 Oct 2004 09:34:10 -0000 Received: from r063144.stusta.swh.mhn.de (10.150.63.144) by mailhub.stusta.mhn.de with SMTP; 24 Oct 2004 09:34:10 -0000 Received: by r063144.stusta.swh.mhn.de (Postfix, from userid 1000) id A7D03BB66B; Sun, 24 Oct 2004 11:33:40 +0200 (CEST) Date: Sun, 24 Oct 2004 11:33:40 +0200 From: Adrian Bunk To: Andrew Morton , David Hinds , linux-kernel@vger.kernel.org, jgarzik@pobox.com, linux-net@vger.kernel.org, prism54-devel@prism54.org, netdev@oss.sgi.com Subject: Re: 2.6.9-mm1: pc_debug multiple definitions Message-ID: <20041024093340.GA4216@stusta.de> References: <20041022032039.730eb226.akpm@osdl.org> <20041022133929.GA2831@stusta.de> <20041024034152.GB17506@ruslug.rutgers.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041024034152.GB17506@ruslug.rutgers.edu> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10767 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@stusta.de Precedence: bulk X-list: netdev Content-Length: 1345 Lines: 43 On Sat, Oct 23, 2004 at 11:41:52PM -0400, Luis R. Rodriguez wrote: > On Fri, Oct 22, 2004 at 03:39:29PM +0200, Adrian Bunk wrote: > > > > The following compile error comes from Linus' tree: > > > > > > <-- snip --> > > > > ... > > LD drivers/built-in.o > > drivers/pcmcia/built-in.o(.bss+0xf20): multiple definition of `pc_debug' > > drivers/net/built-in.o(.data+0x24ae0): first defined here > > make[1]: *** [drivers/built-in.o] Error 1 > > > > <-- snip --> > > > > > > The pc_debug in drivers/pcmcia/ds.c was made non-static in Linus' tree, > > but the global definition of a global variable with such a generic name > > in drivers/net/wireless/prism54/islpci_mgt.c seems to be equally wrong. > > Great, anyone know why this change was done on ds.c ? The pc_debug on > prism54 comes from the original Intersil driver. It is used to for > debugging but we should move away from our current debugging mechanism > to netif_msg. >... pc_debug is a pretty generic name - it seems too generic in both files. In prism54, couldn't it be called prism54_pc_debug? > Luis cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed From mcgrof@studorgs.rutgers.edu Sun Oct 24 03:06:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 03:06:17 -0700 (PDT) Received: from ruslug.rutgers.edu (studorgs.rutgers.edu [128.6.24.131]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9OA6C0e004313 for ; Sun, 24 Oct 2004 03:06:13 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id 841E4F99BE; Sun, 24 Oct 2004 06:05:57 -0400 (EDT) Date: Sun, 24 Oct 2004 06:05:57 -0400 To: Adrian Bunk Cc: Andrew Morton , David Hinds , linux-kernel@vger.kernel.org, jgarzik@pobox.com, linux-net@vger.kernel.org, prism54-devel@prism54.org, netdev@oss.sgi.com Subject: Re: 2.6.9-mm1: pc_debug multiple definitions Message-ID: <20041024100557.GC17506@ruslug.rutgers.edu> Mail-Followup-To: Adrian Bunk , Andrew Morton , David Hinds , linux-kernel@vger.kernel.org, jgarzik@pobox.com, linux-net@vger.kernel.org, prism54-devel@prism54.org, netdev@oss.sgi.com References: <20041022032039.730eb226.akpm@osdl.org> <20041022133929.GA2831@stusta.de> <20041024034152.GB17506@ruslug.rutgers.edu> <20041024093340.GA4216@stusta.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041024093340.GA4216@stusta.de> User-Agent: Mutt/1.3.28i X-Operating-System: 2.4.18-1-686 Organization: Rutgers University Student Linux Users Group From: mcgrof@studorgs.rutgers.edu (Luis R. Rodriguez) X-archive-position: 10768 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mcgrof@studorgs.rutgers.edu Precedence: bulk X-list: netdev Content-Length: 1509 Lines: 41 On Sun, Oct 24, 2004 at 11:33:40AM +0200, Adrian Bunk wrote: > On Sat, Oct 23, 2004 at 11:41:52PM -0400, Luis R. Rodriguez wrote: > > On Fri, Oct 22, 2004 at 03:39:29PM +0200, Adrian Bunk wrote: > > > > > > The following compile error comes from Linus' tree: > > > > > > > > > <-- snip --> > > > > > > ... > > > LD drivers/built-in.o > > > drivers/pcmcia/built-in.o(.bss+0xf20): multiple definition of `pc_debug' > > > drivers/net/built-in.o(.data+0x24ae0): first defined here > > > make[1]: *** [drivers/built-in.o] Error 1 > > > > > > <-- snip --> > > > > > > > > > The pc_debug in drivers/pcmcia/ds.c was made non-static in Linus' tree, > > > but the global definition of a global variable with such a generic name > > > in drivers/net/wireless/prism54/islpci_mgt.c seems to be equally wrong. > > > > Great, anyone know why this change was done on ds.c ? The pc_debug on > > prism54 comes from the original Intersil driver. It is used to for > > debugging but we should move away from our current debugging mechanism > > to netif_msg. > >... > > pc_debug is a pretty generic name - it seems too generic in both files. > > In prism54, couldn't it be called prism54_pc_debug? Sure although that's doing a half ass job. It'll fix your compile problems for sure but ideally we should move away from the old debug mechanisms that came with the driver originally. We do this by moving to to netif_msg. Luis -- GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E From ja@ssi.bg Sun Oct 24 05:23:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 05:24:05 -0700 (PDT) Received: from u.domain.uli (ja.ssi.bg [217.79.71.194]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9OCNvNY016428 for ; Sun, 24 Oct 2004 05:23:58 -0700 Received: from localhost (localhost [127.0.0.1]) by u.domain.uli (8.12.10/8.12.10) with ESMTP id i9OCRkJE018658; Sun, 24 Oct 2004 15:27:47 +0300 Date: Sun, 24 Oct 2004 15:27:46 +0300 (EEST) From: Julian Anastasov X-X-Sender: ja@u.domain.uli To: Harald Welte cc: Netfilter Development Mailinglist , netdev@oss.sgi.com, Rusty Russell Subject: Re: [PATCH 2.6] ip_nat_ftp - manip at the right place In-Reply-To: <20040911215746.GF19871@obroa-skai.de.gnumonks.org> Message-ID: References: <20040911215746.GF19871@obroa-skai.de.gnumonks.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 10769 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ja@ssi.bg Precedence: bulk X-list: netdev Content-Length: 1628 Lines: 49 Hello, On Sat, 11 Sep 2004, Harald Welte wrote: > I agree with this change, but shouldn't we make it consistently over all > NAT helpers? In case you didn't check yet, and assuming that this is > applicable to other helpers as well: Please include patches for other > protocol helpers as well. I can live with the appended patch, I hope it is correct. Signed-off-by: Julian Anastasov diff -ur v2.6.9/linux/net/ipv4/netfilter/ip_nat_core.c linux/net/ipv4/netfilter/ip_nat_core.c --- v2.6.9/linux/net/ipv4/netfilter/ip_nat_core.c 2004-10-19 10:00:36.000000000 +0300 +++ linux/net/ipv4/netfilter/ip_nat_core.c 2004-10-24 14:52:39.334958976 +0300 @@ -728,7 +728,7 @@ struct sk_buff **pskb) { unsigned int i; - struct ip_nat_helper *helper; + struct ip_nat_helper *helper = NULL; enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo); int proto = (*pskb)->nh.iph->protocol; @@ -751,9 +751,9 @@ READ_UNLOCK(&ip_nat_lock); return NF_DROP; } + helper = info->helper; } } - helper = info->helper; READ_UNLOCK(&ip_nat_lock); if (helper) { diff -ur v2.6.9/linux/net/ipv4/netfilter/ip_nat_ftp.c linux/net/ipv4/netfilter/ip_nat_ftp.c --- v2.6.9/linux/net/ipv4/netfilter/ip_nat_ftp.c 2004-10-19 10:00:36.000000000 +0300 +++ linux/net/ipv4/netfilter/ip_nat_ftp.c 2004-10-24 14:52:39.335958824 +0300 @@ -54,6 +54,8 @@ IP_NF_ASSERT(master); IP_NF_ASSERT(!(info->initialized & (1<initialized & (1<master->help.exp_ftp_info; From hch@lst.de Sun Oct 24 06:13:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 06:13:19 -0700 (PDT) Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9ODDDJ4017918 for ; Sun, 24 Oct 2004 06:13:13 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-6.6) with ESMTP id i9ODCula019634 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sun, 24 Oct 2004 15:12:56 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id i9ODCuxe019632; Sun, 24 Oct 2004 15:12:56 +0200 Date: Sun, 24 Oct 2004 15:12:56 +0200 From: Christoph Hellwig To: jgarzik@pobox.com Cc: netdev@oss.sgi.com Subject: [PATCH] unexport ei_tx_timeout Message-ID: <20041024131256.GC19567@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 10770 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 Content-Length: 373 Lines: 13 not used by any module, and the API doesn't make sense as export either --- 1.24/drivers/net/8390.c 2004-10-20 10:37:15 +02:00 +++ edited/drivers/net/8390.c 2004-10-23 16:17:41 +02:00 @@ -1114,7 +1114,6 @@ #ifdef CONFIG_NET_POLL_CONTROLLER EXPORT_SYMBOL(ei_poll); #endif -EXPORT_SYMBOL(ei_tx_timeout); EXPORT_SYMBOL(NS8390_init); EXPORT_SYMBOL(__alloc_ei_netdev); From hch@lst.de Sun Oct 24 06:18:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 06:18:44 -0700 (PDT) Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9ODIdKG018348 for ; Sun, 24 Oct 2004 06:18:40 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-6.6) with ESMTP id i9ODINla019853 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sun, 24 Oct 2004 15:18:23 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id i9ODINeW019851; Sun, 24 Oct 2004 15:18:23 +0200 Date: Sun, 24 Oct 2004 15:18:23 +0200 From: Christoph Hellwig To: davem@redhat.com Cc: netdev@oss.sgi.com Subject: [PATCH] mark arcnet_setup static Message-ID: <20041024131823.GC19658@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 10771 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 Content-Length: 586 Lines: 20 --- 1.19/drivers/net/arcnet/arcnet.c 2004-09-23 22:10:54 +02:00 +++ edited/drivers/net/arcnet/arcnet.c 2004-10-23 16:09:36 +02:00 @@ -91,7 +91,6 @@ EXPORT_SYMBOL(arc_proto_null); EXPORT_SYMBOL(arcnet_unregister_proto); EXPORT_SYMBOL(arcnet_debug); -EXPORT_SYMBOL(arcdev_setup); EXPORT_SYMBOL(alloc_arcdev); EXPORT_SYMBOL(arcnet_interrupt); @@ -305,7 +304,7 @@ /* Setup a struct device for ARCnet. */ -void arcdev_setup(struct net_device *dev) +static void arcdev_setup(struct net_device *dev) { dev->type = ARPHRD_ARCNET; dev->hard_header_len = sizeof(struct archdr); From hch@lst.de Sun Oct 24 06:21:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 06:21:12 -0700 (PDT) Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9ODL7Me018699 for ; Sun, 24 Oct 2004 06:21:08 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-6.6) with ESMTP id i9ODKpla019909 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sun, 24 Oct 2004 15:20:51 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id i9ODKpHl019907; Sun, 24 Oct 2004 15:20:51 +0200 Date: Sun, 24 Oct 2004 15:20:51 +0200 From: Christoph Hellwig To: davem@redhat.com Cc: netdev@oss.sgi.com Subject: Re: [PATCH] mark arcnet_setup static Message-ID: <20041024132051.GB19867@lst.de> References: <20041024131823.GC19658@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041024131823.GC19658@lst.de> User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 10772 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 Content-Length: 459 Lines: 12 also needs a header update, sorry: --- 1.7/include/linux/arcdevice.h 2004-10-05 22:16:18 +02:00 +++ edited/include/linux/arcdevice.h 2004-10-23 16:09:24 +02:00 @@ -330,7 +330,6 @@ void arcnet_unregister_proto(struct ArcProto *proto); irqreturn_t arcnet_interrupt(int irq, void *dev_id, struct pt_regs *regs); -void arcdev_setup(struct net_device *dev); struct net_device *alloc_arcdev(char *name); void arcnet_rx(struct net_device *dev, int bufnum); From hch@lst.de Sun Oct 24 06:25:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 06:25:25 -0700 (PDT) Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9ODPKCJ019102 for ; Sun, 24 Oct 2004 06:25:21 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-6.6) with ESMTP id i9ODP4la019989 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sun, 24 Oct 2004 15:25:04 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id i9ODP48L019987; Sun, 24 Oct 2004 15:25:04 +0200 Date: Sun, 24 Oct 2004 15:25:04 +0200 From: Christoph Hellwig To: paulus@samba.org Cc: netdev@oss.sgi.com Subject: [PATCH] remove bogus exports in ppp Message-ID: <20041024132504.GC19927@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 10773 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 Content-Length: 550 Lines: 15 even if they are usefull for debugging they're just bad namespace pollution for mainline --- 1.50/drivers/net/ppp_generic.c 2004-08-29 07:49:19 +02:00 +++ edited/drivers/net/ppp_generic.c 2004-10-23 14:08:17 +02:00 @@ -2721,8 +2721,6 @@ EXPORT_SYMBOL(ppp_output_wakeup); EXPORT_SYMBOL(ppp_register_compressor); EXPORT_SYMBOL(ppp_unregister_compressor); -EXPORT_SYMBOL(all_ppp_units); /* for debugging */ -EXPORT_SYMBOL(all_channels); /* for debugging */ MODULE_LICENSE("GPL"); MODULE_ALIAS_CHARDEV_MAJOR(PPP_MAJOR); MODULE_ALIAS("/dev/ppp"); From hch@lst.de Sun Oct 24 06:26:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 06:27:03 -0700 (PDT) Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9ODQw7d019363 for ; Sun, 24 Oct 2004 06:26:58 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-6.6) with ESMTP id i9ODQgla020014 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sun, 24 Oct 2004 15:26:42 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id i9ODQgvv020012; Sun, 24 Oct 2004 15:26:42 +0200 Date: Sun, 24 Oct 2004 15:26:42 +0200 From: Christoph Hellwig To: davem@redhat.com Cc: netdev@oss.sgi.com Subject: [PATCH] mark vcc_remove_socket static Message-ID: <20041024132642.GA20003@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 10774 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 Content-Length: 845 Lines: 29 --- 1.33/include/linux/atmdev.h 2004-10-21 06:51:48 +02:00 +++ edited/include/linux/atmdev.h 2004-10-23 16:06:06 +02:00 @@ -395,7 +395,6 @@ void atm_dev_deregister(struct atm_dev *dev); void shutdown_atm_dev(struct atm_dev *dev); void vcc_insert_socket(struct sock *sk); -void vcc_remove_socket(struct sock *sk); /* --- 1.55/net/atm/common.c 2004-10-21 06:50:41 +02:00 +++ edited/net/atm/common.c 2004-10-23 16:06:20 +02:00 @@ -57,7 +57,7 @@ write_unlock_irq(&vcc_sklist_lock); } -void vcc_remove_socket(struct sock *sk) +static void vcc_remove_socket(struct sock *sk) { write_lock_irq(&vcc_sklist_lock); sk_del_node_init(sk); @@ -86,7 +86,6 @@ EXPORT_SYMBOL(vcc_hash); EXPORT_SYMBOL(vcc_sklist_lock); EXPORT_SYMBOL(vcc_insert_socket); -EXPORT_SYMBOL(vcc_remove_socket); static void vcc_sock_destruct(struct sock *sk) { From hch@lst.de Sun Oct 24 06:40:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 06:40:36 -0700 (PDT) Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9ODeT9N020026 for ; Sun, 24 Oct 2004 06:40:29 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-6.6) with ESMTP id i9ODeCla020251 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sun, 24 Oct 2004 15:40:12 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id i9ODeCXq020249; Sun, 24 Oct 2004 15:40:12 +0200 Date: Sun, 24 Oct 2004 15:40:12 +0200 From: Christoph Hellwig To: davem@redhat.com Cc: netdev@oss.sgi.com Subject: [PATCH] remove dead exports from xfrm Message-ID: <20041024134012.GB20174@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 10775 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 Content-Length: 6724 Lines: 187 there's lots of dead exports in xfrm, are they needed for some future plans or can we just kill them like in the patch below? --- 1.69/include/net/xfrm.h 2004-10-21 06:47:36 +02:00 +++ edited/include/net/xfrm.h 2004-10-23 14:04:08 +02:00 @@ -178,8 +178,6 @@ extern int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo); extern int xfrm_policy_unregister_afinfo(struct xfrm_policy_afinfo *afinfo); -extern struct xfrm_policy_afinfo *xfrm_policy_get_afinfo(unsigned short family); -extern void xfrm_policy_put_afinfo(struct xfrm_policy_afinfo *afinfo); #define XFRM_ACQ_EXPIRES 30 @@ -200,8 +198,6 @@ extern int xfrm_state_register_afinfo(struct xfrm_state_afinfo *afinfo); extern int xfrm_state_unregister_afinfo(struct xfrm_state_afinfo *afinfo); -extern struct xfrm_state_afinfo *xfrm_state_get_afinfo(unsigned short family); -extern void xfrm_state_put_afinfo(struct xfrm_state_afinfo *afinfo); extern void xfrm_state_delete_tunnel(struct xfrm_state *x); @@ -805,14 +801,12 @@ extern void xfrm_state_insert(struct xfrm_state *x); extern int xfrm_state_add(struct xfrm_state *x); extern int xfrm_state_update(struct xfrm_state *x); -extern int xfrm_state_check_space(struct xfrm_state *x, struct sk_buff *skb); extern struct xfrm_state *xfrm_state_lookup(xfrm_address_t *daddr, u32 spi, u8 proto, unsigned short family); extern struct xfrm_state *xfrm_find_acq_byseq(u32 seq); extern void xfrm_state_delete(struct xfrm_state *x); extern void xfrm_state_flush(u8 proto); extern int xfrm_replay_check(struct xfrm_state *x, u32 seq); extern void xfrm_replay_advance(struct xfrm_state *x, u32 seq); -extern int xfrm_check_selectors(struct xfrm_state **x, int n, struct flowi *fl); extern int xfrm_state_check(struct xfrm_state *x, struct sk_buff *skb); extern int xfrm4_rcv(struct sk_buff *skb); extern int xfrm4_output(struct sk_buff **pskb); @@ -863,7 +857,6 @@ xfrm_address_t *daddr, xfrm_address_t *saddr, int create, unsigned short family); extern void xfrm_policy_flush(void); -extern void xfrm_policy_kill(struct xfrm_policy *); extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol); extern struct xfrm_policy *xfrm_sk_policy_lookup(struct sock *sk, int dir, struct flowi *fl); extern int xfrm_flush_bundles(void); --- 1.4/net/xfrm/xfrm_export.c 2004-08-19 16:13:10 +02:00 +++ edited/net/xfrm/xfrm_export.c 2004-10-23 14:04:12 +02:00 @@ -12,22 +12,17 @@ EXPORT_SYMBOL(__xfrm_route_forward); EXPORT_SYMBOL(xfrm_state_alloc); EXPORT_SYMBOL(__xfrm_state_destroy); -EXPORT_SYMBOL(xfrm_state_find); EXPORT_SYMBOL(xfrm_state_insert); EXPORT_SYMBOL(xfrm_state_add); EXPORT_SYMBOL(xfrm_state_update); EXPORT_SYMBOL(xfrm_state_check_expire); -EXPORT_SYMBOL(xfrm_state_check_space); EXPORT_SYMBOL(xfrm_state_check); EXPORT_SYMBOL(xfrm_state_lookup); EXPORT_SYMBOL(xfrm_state_register_afinfo); EXPORT_SYMBOL(xfrm_state_unregister_afinfo); -EXPORT_SYMBOL(xfrm_state_get_afinfo); -EXPORT_SYMBOL(xfrm_state_put_afinfo); EXPORT_SYMBOL(xfrm_state_delete_tunnel); EXPORT_SYMBOL(xfrm_replay_check); EXPORT_SYMBOL(xfrm_replay_advance); -EXPORT_SYMBOL(xfrm_check_selectors); EXPORT_SYMBOL(__secpath_destroy); EXPORT_SYMBOL(secpath_dup); EXPORT_SYMBOL(xfrm_get_acqseq); @@ -44,7 +39,6 @@ EXPORT_SYMBOL(xfrm_find_acq); EXPORT_SYMBOL(xfrm_alloc_spi); EXPORT_SYMBOL(xfrm_state_flush); -EXPORT_SYMBOL(xfrm_policy_kill); EXPORT_SYMBOL(xfrm_policy_bysel); EXPORT_SYMBOL(xfrm_policy_insert); EXPORT_SYMBOL(xfrm_policy_walk); @@ -54,8 +48,6 @@ EXPORT_SYMBOL(xfrm_dst_lookup); EXPORT_SYMBOL(xfrm_policy_register_afinfo); EXPORT_SYMBOL(xfrm_policy_unregister_afinfo); -EXPORT_SYMBOL(xfrm_policy_get_afinfo); -EXPORT_SYMBOL(xfrm_policy_put_afinfo); EXPORT_SYMBOL_GPL(xfrm_probe_algs); EXPORT_SYMBOL_GPL(xfrm_count_auth_supported); --- 1.56/net/xfrm/xfrm_policy.c 2004-10-21 06:49:33 +02:00 +++ edited/net/xfrm/xfrm_policy.c 2004-10-23 14:04:31 +02:00 @@ -40,6 +40,9 @@ LIST_HEAD_INIT(xfrm_policy_gc_list); static spinlock_t xfrm_policy_gc_lock = SPIN_LOCK_UNLOCKED; +static struct xfrm_policy_afinfo *xfrm_policy_get_afinfo(unsigned short family); +static void xfrm_policy_put_afinfo(struct xfrm_policy_afinfo *afinfo); + int xfrm_register_type(struct xfrm_type *type, unsigned short family) { struct xfrm_policy_afinfo *afinfo = xfrm_policy_get_afinfo(family); @@ -286,7 +289,7 @@ * entry dead. The rule must be unlinked from lists to the moment. */ -void xfrm_policy_kill(struct xfrm_policy *policy) +static void xfrm_policy_kill(struct xfrm_policy *policy) { write_lock_bh(&policy->lock); if (policy->dead) @@ -1187,7 +1190,7 @@ return err; } -struct xfrm_policy_afinfo *xfrm_policy_get_afinfo(unsigned short family) +static struct xfrm_policy_afinfo *xfrm_policy_get_afinfo(unsigned short family) { struct xfrm_policy_afinfo *afinfo; if (unlikely(family >= NPROTO)) @@ -1200,7 +1203,7 @@ return afinfo; } -void xfrm_policy_put_afinfo(struct xfrm_policy_afinfo *afinfo) +static void xfrm_policy_put_afinfo(struct xfrm_policy_afinfo *afinfo) { if (unlikely(afinfo == NULL)) return; --- 1.49/net/xfrm/xfrm_state.c 2004-09-23 22:04:21 +02:00 +++ edited/net/xfrm/xfrm_state.c 2004-10-23 14:02:23 +02:00 @@ -48,6 +48,9 @@ static void __xfrm_state_delete(struct xfrm_state *x); +static struct xfrm_state_afinfo *xfrm_state_get_afinfo(unsigned short family); +static void xfrm_state_put_afinfo(struct xfrm_state_afinfo *afinfo); + static void xfrm_state_gc_destroy(struct xfrm_state *x) { if (del_timer(&x->timer)) @@ -526,7 +529,7 @@ return 0; } -int xfrm_state_check_space(struct xfrm_state *x, struct sk_buff *skb) +static int xfrm_state_check_space(struct xfrm_state *x, struct sk_buff *skb) { int nhead = x->props.header_len + LL_RESERVED_SPACE(skb->dst->dev) - skb_headroom(skb); @@ -740,19 +743,6 @@ } } -int xfrm_check_selectors(struct xfrm_state **x, int n, struct flowi *fl) -{ - int i; - - for (i=0; isel, fl, x[i]->props.family); - if (!match) - return -EINVAL; - } - return 0; -} - static struct list_head xfrm_km_list = LIST_HEAD_INIT(xfrm_km_list); static rwlock_t xfrm_km_lock = RW_LOCK_UNLOCKED; @@ -914,7 +904,7 @@ return err; } -struct xfrm_state_afinfo *xfrm_state_get_afinfo(unsigned short family) +static struct xfrm_state_afinfo *xfrm_state_get_afinfo(unsigned short family) { struct xfrm_state_afinfo *afinfo; if (unlikely(family >= NPROTO)) @@ -927,7 +917,7 @@ return afinfo; } -void xfrm_state_put_afinfo(struct xfrm_state_afinfo *afinfo) +static void xfrm_state_put_afinfo(struct xfrm_state_afinfo *afinfo) { if (unlikely(afinfo == NULL)) return; From hch@lst.de Sun Oct 24 06:41:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 06:41:54 -0700 (PDT) Received: from mail.lst.de (verein.lst.de [213.95.11.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9ODfnaJ020227 for ; Sun, 24 Oct 2004 06:41:49 -0700 Received: from verein.lst.de (localhost [127.0.0.1]) by mail.lst.de (8.12.3/8.12.3/Debian-6.6) with ESMTP id i9ODfXla020280 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sun, 24 Oct 2004 15:41:33 +0200 Received: (from hch@localhost) by verein.lst.de (8.12.3/8.12.3/Debian-6.6) id i9ODfWfV020277; Sun, 24 Oct 2004 15:41:32 +0200 Date: Sun, 24 Oct 2004 15:41:32 +0200 From: Christoph Hellwig To: davem@redhat.com Cc: netdev@oss.sgi.com Subject: [PATCH] remove dead ipv6 exports Message-ID: <20041024134132.GA20267@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-Scanned-By: MIMEDefang 2.39 X-archive-position: 10776 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 Content-Length: 546 Lines: 17 --- 1.20/net/ipv6/ipv6_syms.c 2004-03-28 11:55:27 +02:00 +++ edited/net/ipv6/ipv6_syms.c 2004-10-23 14:16:58 +02:00 @@ -35,13 +35,9 @@ EXPORT_SYMBOL(in6addr_any); EXPORT_SYMBOL(in6addr_loopback); EXPORT_SYMBOL(in6_dev_finish_destroy); -EXPORT_SYMBOL(ip6_find_1stfragopt); #ifdef CONFIG_XFRM EXPORT_SYMBOL(xfrm6_rcv); #endif EXPORT_SYMBOL(rt6_lookup); EXPORT_SYMBOL(fl6_sock_lookup); -EXPORT_SYMBOL(ip6_append_data); -EXPORT_SYMBOL(ip6_flush_pending_frames); -EXPORT_SYMBOL(ip6_push_pending_frames); EXPORT_SYMBOL(ipv6_push_nfrag_opts); From tgraf@suug.ch Sun Oct 24 06:57:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 06:57:23 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9ODvHX0021026 for ; Sun, 24 Oct 2004 06:57:18 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 6D6C4F; Sun, 24 Oct 2004 15:56:38 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 33EC51C0E9; Sun, 24 Oct 2004 15:57:21 +0200 (CEST) Date: Sun, 24 Oct 2004 15:57:21 +0200 From: Thomas Graf To: "David S. Miller" Cc: laforge@netfilter.org, hno@marasystems.com, netdev@oss.sgi.com Subject: [PATCH] iptables: Fix warning in CONNMARK Message-ID: <20041024135721.GO21977@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 10777 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 527 Lines: 13 Signed-off-by: Thomas Graf --- linux-2.6.10-rc1-bk1.orig/net/ipv4/netfilter/ipt_CONNMARK.c 2004-10-24 10:58:49.000000000 +0200 +++ linux-2.6.10-rc1-bk1/net/ipv4/netfilter/ipt_CONNMARK.c 2004-10-24 15:35:18.000000000 +0200 @@ -60,7 +60,7 @@ break; case IPT_CONNMARK_RESTORE: nfmark = (*pskb)->nfmark; - diff = (ct->mark ^ nfmark & markinfo->mask); + diff = ((ct->mark ^ nfmark) & markinfo->mask); if (diff != 0) { (*pskb)->nfmark = nfmark ^ diff; (*pskb)->nfcache |= NFC_ALTERED; From kaber@trash.net Sun Oct 24 07:18:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 07:18:51 -0700 (PDT) Received: from gw.localnet ([62.206.217.67]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9OEIkfC021805 for ; Sun, 24 Oct 2004 07:18:46 -0700 Received: from [172.16.1.123] (helo=[172.16.1.123]) by gw.localnet with esmtp (Exim 3.36 #1 (Debian)) id 1CLjJe-0004LG-00; Sun, 24 Oct 2004 16:25:50 +0200 Message-ID: <417BB97E.2000706@trash.net> Date: Sun, 24 Oct 2004 16:17:34 +0200 From: Patrick McHardy User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.3) Gecko/20041008 Debian/1.7.3-5 X-Accept-Language: en MIME-Version: 1.0 To: Thomas Graf CC: "David S. Miller" , laforge@netfilter.org, hno@marasystems.com, netdev@oss.sgi.com, Netfilter Development Mailinglist Subject: Re: [PATCH] iptables: Fix warning in CONNMARK References: <20041024135721.GO21977@postel.suug.ch> In-Reply-To: <20041024135721.GO21977@postel.suug.ch> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10778 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kaber@trash.net Precedence: bulk X-list: netdev Content-Length: 587 Lines: 21 Applied, thanks. Thomas Graf wrote: >Signed-off-by: Thomas Graf > >--- linux-2.6.10-rc1-bk1.orig/net/ipv4/netfilter/ipt_CONNMARK.c 2004-10-24 10:58:49.000000000 +0200 >+++ linux-2.6.10-rc1-bk1/net/ipv4/netfilter/ipt_CONNMARK.c 2004-10-24 15:35:18.000000000 +0200 >@@ -60,7 +60,7 @@ > break; > case IPT_CONNMARK_RESTORE: > nfmark = (*pskb)->nfmark; >- diff = (ct->mark ^ nfmark & markinfo->mask); >+ diff = ((ct->mark ^ nfmark) & markinfo->mask); > if (diff != 0) { > (*pskb)->nfmark = nfmark ^ diff; > (*pskb)->nfcache |= NFC_ALTERED; > > > From hadi@cyberus.ca Sun Oct 24 08:23:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 08:23:12 -0700 (PDT) Received: from mx03.cybersurf.com (mx03.cybersurf.com [209.197.145.106]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9OFN6d9026946 for ; Sun, 24 Oct 2004 08:23:06 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.30) id 1CLkCm-0000JL-Sk for netdev@oss.sgi.com; Sun, 24 Oct 2004 11:22:48 -0400 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CLkCj-00030G-4M; Sun, 24 Oct 2004 11:22:45 -0400 Subject: Re: [RFC] Yield in netlink_broadcast when congested From: jamal Reply-To: hadi@cyberus.ca To: Herbert Xu Cc: Pablo Neira , "David S. Miller" , netdev@oss.sgi.com In-Reply-To: <20041016113006.GA12843@gondor.apana.org.au> References: <20041016113006.GA12843@gondor.apana.org.au> Content-Type: text/plain Organization: jamalopolous Message-Id: <1098631362.1096.231.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 24 Oct 2004 11:22:42 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 10780 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev Content-Length: 1919 Lines: 49 Some feedback: I just tested this and it does appear to be improve things. I have to think a little on how else to break it. But overall seems to be a good change to make. cheers, jamal On Sat, 2004-10-16 at 07:30, Herbert Xu wrote: > Hi: > > Before we start please bear in mind that netlink is fundamentally > an *unreliable* protocol. This is the price we pay in order to use > it in all the contexts that we do. So what we're looking for here > is not how to make netlink 100% reliable, but what we can do to > improve the quality of its implementation. > > I have a proposal for the specific case of overruns with netlink > broadcast messages generated in a synchronous context typified > by the ifconfig example that Jamal gave. > > In such contexts it is possible for the sender to sleep. However, we > don't want to delay them indefinitely since the system must progress > even in the presence of idle multicast listeners. I also have strong > reservations about introducing any additional queues since all the > ones I've seen don't deliver anything over and above what you can > achieve by increasing the receive queue of the listener itself. > > Now I noticed that on SMP machines Jamal's case works successfully. > That is, ip monitor is able to keep up with the flood generated by > ifconfig. > > In fact, what's happening on UP is that in the time slice given to > the sender --- ifconfig, the kernel is able to generate a lot more > messages than what the average netlink receive queue can accomodate. > > So here is my proposal: if we detect signs of impending congestion > in netlink_broadcast(), and that we're in a sleepable context, then > we yield(). > > This gives the receivers a chance to pull down the messages without > having the sender spinning indefinitely. I've tested it on my UP > machine and it does resolve the problem for ip monitor. > > Comments anyone? > > Cheers, From eric.lemoine@gmail.com Sun Oct 24 08:22:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 08:22:35 -0700 (PDT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.193]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9OFMSk9026880 for ; Sun, 24 Oct 2004 08:22:29 -0700 Received: by rproxy.gmail.com with SMTP id 77so342966rnk for ; Sun, 24 Oct 2004 08:22:13 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=FKM87VtzsUifL5SZ052ArrbvVVgP3QKS5b1dz1BjR35uZLSV++HcluHnDjvoFMjh0CTQ4eIx3M3Fd35pkIObPPa9yupVAkp4M7EdbB1wlz7lc3NSVL0URWGhrseIu8oCrTolduskk9nbT3qB5Bp1+Dxx09VAM+jnhXol+mqKpiY= Received: by 10.38.89.58 with SMTP id m58mr632714rnb; Sun, 24 Oct 2004 08:22:13 -0700 (PDT) Received: by 10.38.99.58 with HTTP; Sun, 24 Oct 2004 08:22:13 -0700 (PDT) Message-ID: <5cac192f04102408224ffa9c61@mail.gmail.com> Date: Sun, 24 Oct 2004 17:22:13 +0200 From: Eric Lemoine Reply-To: Eric Lemoine To: Colin Leroy Subject: Re: [PATCH] Prevent netpoll hanging when link is down Cc: netdev@oss.sgi.com In-Reply-To: <20041021183610.23c5121c.colin@colino.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <20041007214505.GB31558@wotan.suse.de> <20041011163601.GM31237@waste.org> <20041011164315.GH26350@wotan.suse.de> <20041011165851.GN31237@waste.org> <20041011224542.5bdc93aa@jack.colino.net> <5cac192f0410181443303379e2@mail.gmail.com> <5cac192f041018145824acce5a@mail.gmail.com> <20041020161119.6e30efe5@pirandello> <5cac192f0410200848179ccc81@mail.gmail.com> <20041021183610.23c5121c.colin@colino.net> X-archive-position: 10779 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: eric.lemoine@gmail.com Precedence: bulk X-list: netdev Content-Length: 737 Lines: 20 > > > > > > [deadlock with sungem & netconsole when no carrier] > > > > > Sorry I'm catching up on that problem... Do you have your > > > > > problem solved? If not, did you try removing all printk calls > > > > > from within gem_poll(), as suggested by Matt Mackall? > > > > > > Ok. Keep me posted. If removing the printk's indeed helps I'll cook up > > a proper fix. > > Ok, it tried... It doesn't help. I tried the wild way too: > > #define printk(...) do {} while (0); > > It didn't help either. I'll give a look to other net drivers, to see if > they do stuff differently, but I fear that I won't find it easily... Thanks for running this Colin. Unfortunately I can't figure out what's going on at this point. -- Eric From hadi@cyberus.ca Sun Oct 24 10:02:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 10:02:13 -0700 (PDT) Received: from mx02.cybersurf.com (mx02.cybersurf.com [209.197.145.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9OH27Ji030710 for ; Sun, 24 Oct 2004 10:02:07 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1CLlkb-0006QB-SN for netdev@oss.sgi.com; Sun, 24 Oct 2004 13:01:49 -0400 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CLlka-0006sp-H5; Sun, 24 Oct 2004 13:01:48 -0400 Subject: Re: e1000 kick From: jamal Reply-To: hadi@cyberus.ca To: Scott Huang Cc: netdev@oss.sgi.com In-Reply-To: <20041011162444.20953.qmail@web80402.mail.yahoo.com> References: <20041011162444.20953.qmail@web80402.mail.yahoo.com> Content-Type: text/plain Organization: jamalopolous Message-Id: <1098637300.1097.247.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 24 Oct 2004 13:01:40 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 10781 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev Content-Length: 1164 Lines: 53 Scott, Sorry to bother you again. I am still trying to evaluate whether i should go and grab these patches from the unconnected machine. In other words, they may not be useful for you. Is this a proprieatry stack, something you are researching. what? How do you pass the packets from user space straight to DMA? cheers, jamal On Mon, 2004-10-11 at 12:24, Scott Huang wrote: > Hi Jamal, > > I would like to DMA packets to/from pre-allocated > fixed-sized buffer pools for a user space TCP/IP stack > to transmit/receive packets. The Rx path is working > well. I wanted to control when the card should DMA > packets from the Tx pool. > > thanks > > -Scott > > > --- jamal wrote: > > > What are you trying to do? > > I have some patches i wouldnt mind passing on for > > test purposes > > but it would depend on what the end goal is, > > > > cheers, > > jamal > > > > On Fri, 2004-10-08 at 19:17, Scott Huang wrote: > > > Hi folks, > > > > > > Is there a way to force tx dma to start on e1000 > > after > > > the I fill up the tx ring to a certain level? > > > > > > thanks > > > > > > -Scott > > > > > > > > > > > > > > > > From sfeldma@pobox.com Sun Oct 24 11:53:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 11:53:10 -0700 (PDT) Received: from boggle.pobox.com (boggle.pobox.com [208.58.1.193]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9OIr2EU002332 for ; Sun, 24 Oct 2004 11:53:03 -0700 Received: from boggle (localhost [127.0.0.1]) by boggle.pobox.com (Postfix) with ESMTP id 79F9EA918D; Sun, 24 Oct 2004 14:52:47 -0400 (EDT) Received: from [192.168.0.3] (wbar2.sea1-4-5-062-153.sea1.dsl-verizon.net [4.5.62.153]) by boggle.sasl.smtp.pobox.com (Postfix) with ESMTP id C3FEA41ACA0; Sun, 24 Oct 2004 14:52:46 -0400 (EDT) Subject: [PATCH 2.6] e100: update maintainer From: Scott Feldman Reply-To: sfeldma@pobox.com To: jgarzik@pobox.com Cc: netdev@oss.sgi.com Content-Type: text/plain Message-Id: <1098644172.4188.12.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Sun, 24 Oct 2004 11:56:12 -0700 Content-Transfer-Encoding: 7bit X-archive-position: 10782 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sfeldma@pobox.com Precedence: bulk X-list: netdev Content-Length: 490 Lines: 19 My intel.com address will bounce. Signed-off-by: Scott Feldman --- linux-2.6.10-rc1/MAINTAINERS.orig 2004-10-24 11:49:02.613540464 -0700 +++ linux-2.6.10-rc1/MAINTAINERS 2004-10-24 11:50:16.741271336 -0700 @@ -1112,8 +1112,8 @@ M: john.ronciak@intel.com P: Ganesh Venkatesan M: ganesh.venkatesan@intel.com -P: Scott Feldman -M: scott.feldman@intel.com +P: Jesse Brandeburg +M: jesse.brandeburg@intel.com W: http://sourceforge.net/projects/e1000/ S: Supported From codeslinger@gmail.com Sun Oct 24 17:20:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 17:20:22 -0700 (PDT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.194]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9P0KGZl022087 for ; Sun, 24 Oct 2004 17:20:16 -0700 Received: by rproxy.gmail.com with SMTP id 75so251120rnk for ; Sun, 24 Oct 2004 17:19:55 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=DD8bV8Zuc0tYJ7TFwyJPMU90MV2poiqdAqIT2MjayAotUtJLl8XNhLUMfQfW+z5aQZEpTMPhSzXTg34wYuFbBhb/VQiFKLAqzkpbjN7QvGm5Me64+9ShQzes/YzANxp9CeCyF4H++hu9bek8HfxaUjPx5W8sXvGfqISrirQEGkg= Received: by 10.38.88.68 with SMTP id l68mr560665rnb; Sun, 24 Oct 2004 17:19:55 -0700 (PDT) Received: by 10.39.1.32 with HTTP; Sun, 24 Oct 2004 17:19:55 -0700 (PDT) Message-ID: <876ef97a04102417193517f48f@mail.gmail.com> Date: Sun, 24 Oct 2004 20:19:55 -0400 From: Tobias DiPasquale Reply-To: Tobias DiPasquale To: linux-net , netdev , nf-devel Subject: routing table improvements Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10783 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: codeslinger@gmail.com Precedence: bulk X-list: netdev Content-Length: 1000 Lines: 26 Hi all, I am starting work on improving the routing table in Linux by removing the route cache altogether and reimplemting the FIB with a radix tree search implementation. However, I have some questions/RFCs before I get too deep into it. First of all, is anyone else doing something in this area? Second, it doesn't look (to me) as if the lib/radix-tree.c implementation is sufficiently generic to be used in this capacity. What I mean is, it appears as if this code can't be used in interrupt context, which is sort of a necessity for this particular purpose. Am I just out of my mind or is that the case? Finally, can anyone think of a reason not use a radix tree search for the FIB? I was going to implement a simple binary radix tree (similar to what FreeBSD has). I had originally thought of using something like CEF uses (a 256-way radix tree), but this would be too memory-intensive, IMO. Anyone have any comments? -- [ Tobias DiPasquale ] 0x636f6465736c696e67657240676d61696c2e636f6d From davem@davemloft.net Sun Oct 24 20:53:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 20:54:03 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9P3rvAw030366 for ; Sun, 24 Oct 2004 20:53:58 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CLvji-0005dH-00; Sun, 24 Oct 2004 20:41:34 -0700 Date: Sun, 24 Oct 2004 20:41:34 -0700 From: "David S. Miller" To: Tobias DiPasquale Cc: linux-net@vger.kernel.org, netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: routing table improvements Message-Id: <20041024204134.542420ce.davem@davemloft.net> In-Reply-To: <876ef97a04102417193517f48f@mail.gmail.com> References: <876ef97a04102417193517f48f@mail.gmail.com> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10784 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 1385 Lines: 34 On Sun, 24 Oct 2004 20:19:55 -0400 Tobias DiPasquale wrote: > First of all, is anyone else doing something in this area? Yes, this has been discussed on this list over the past 2 months. Let me save you some time: 1) We are already working on abstracting out the algorithmic portions of net/ipv4/fib_hash.c, see recent changeset history of this file in 2.6.x for details 2) Using the BSD Radix tree will not improve performance, it has the same algorithmic complexity as the current 32-hashtable algorithm for large routing tables 3) Once the complexity of the mid-level routing table FIB algorithms is made better, there is no evidence that this means the routing cache should be removed. You should instead evaluate it's performance after the mid-level algorithms perform acceptably. If you remove the routing cache, I don't believe you understand the implications of this. Firstly, you have to store the routing metrics for every remote host we talk to, where do you plan to store this and what will it be keyed upon? How will you handle per-socket routes? How will you handle the interface with the IPSEC layer which uses trees of routing cache entries as it's fundamental object type? Please scan the list postings, particularly on netdev, and I've even given a keynote on our planned work just the other week in Tokyo. From jgarzik@pobox.com Sun Oct 24 22:51:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 22:51:15 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9P5p9oM001407 for ; Sun, 24 Oct 2004 22:51:10 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CLxkr-0008I3-6I; Mon, 25 Oct 2004 06:50:53 +0100 Message-ID: <417C9431.6030505@pobox.com> Date: Mon, 25 Oct 2004 01:50:41 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" CC: Linux Kernel Mailing List , Netdev Subject: Re: [NET]: TSO requires SG, enforce this at device registry. References: <200410221715.i9MHFlIu021927@hera.kernel.org> In-Reply-To: <200410221715.i9MHFlIu021927@hera.kernel.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10785 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: 1114 Lines: 34 Linux Kernel Mailing List wrote: > diff -Nru a/net/core/dev.c b/net/core/dev.c > --- a/net/core/dev.c 2004-10-22 10:15:57 -07:00 > +++ b/net/core/dev.c 2004-10-22 10:15:57 -07:00 > @@ -2871,6 +2871,14 @@ > dev->features &= ~NETIF_F_SG; > } > > + /* TSO requires that SG is present as well. */ > + if ((dev->features & NETIF_F_TSO) && > + !(dev->features & NETIF_F_SG)) { > + printk("%s: Dropping NETIF_F_TSO since no SG feature.\n", > + dev->name); > + dev->features &= ~NETIF_F_TSO; > + } Although this patch is correct, I am pondering whether this fully covers the problems in the field. There are currently two classes of problems I am seeing, that generate real-life bug reports: 1) Given current driver implementations of ethtool ioctls, sysadmin is free to create a combination of bits that are IMHO a bug. One can argue that this is an extension of "root can shoot himself in the foot", so who knows. 2) Programmers writing drivers do not appear to be clear that SG is required to tx-csum/tso, and also, should not be present without one or both of those bits set. Jeff From davem@davemloft.net Sun Oct 24 23:04:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 23:04:29 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9P64OB1002141 for ; Sun, 24 Oct 2004 23:04:24 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CLxqm-0005oY-00; Sun, 24 Oct 2004 22:57:00 -0700 Date: Sun, 24 Oct 2004 22:57:00 -0700 From: "David S. Miller" To: Jeff Garzik Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [NET]: TSO requires SG, enforce this at device registry. Message-Id: <20041024225700.4a22a968.davem@davemloft.net> In-Reply-To: <417C9431.6030505@pobox.com> References: <200410221715.i9MHFlIu021927@hera.kernel.org> <417C9431.6030505@pobox.com> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10786 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 421 Lines: 10 On Mon, 25 Oct 2004 01:50:41 -0400 Jeff Garzik wrote: > 1) Given current driver implementations of ethtool ioctls, sysadmin is > free to create a combination of bits that are IMHO a bug. One can argue > that this is an extension of "root can shoot himself in the foot", so > who knows. I made a followon posting proposing ethtool changes which would enforce the rules there too, did you see it? From jgarzik@pobox.com Sun Oct 24 23:17:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 23:17:21 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9P6HGMs002807 for ; Sun, 24 Oct 2004 23:17:16 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CLyA5-0000jN-UU; Mon, 25 Oct 2004 07:16:58 +0100 Message-ID: <417C9A4E.3030909@pobox.com> Date: Mon, 25 Oct 2004 02:16:46 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Seiichi Nakashima CC: linux-kernel@vger.kernel.org, Netdev Subject: Re: linux-2.6.9 eepro100 warning References: <200410232313.AA00003@prism.kumin.ne.jp> In-Reply-To: <200410232313.AA00003@prism.kumin.ne.jp> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10787 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: 332 Lines: 15 Seiichi Nakashima wrote: > Hi. > > I update linux kernel form 2.6.8.1 to 2.6.9. > I found eepro100 warning, then I update 2.6.10-rc1, but same result. > It is only warning, I think pro100 may work fine. This should be fixed in the 2.6.9-mm tree (via my netdev-2.6 tree). Note that eepro100 driver will be deleted soon. Jeff From nickpiggin@yahoo.com.au Sun Oct 24 23:25:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 23:26:02 -0700 (PDT) Received: from smtp200.mail.sc5.yahoo.com (smtp200.mail.sc5.yahoo.com [216.136.130.125]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9P6Put2003470 for ; Sun, 24 Oct 2004 23:25:56 -0700 Received: from unknown (HELO ?192.168.0.1?) (nickpiggin@203.173.2.69 with plain) by smtp200.mail.sc5.yahoo.com with SMTP; 25 Oct 2004 06:25:40 -0000 Message-ID: <417C9C62.2050709@yahoo.com.au> Date: Mon, 25 Oct 2004 16:25:38 +1000 From: Nick Piggin User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040820 Debian/1.7.2-4 X-Accept-Language: en MIME-Version: 1.0 To: Jeff Garzik CC: Seiichi Nakashima , linux-kernel@vger.kernel.org, Netdev Subject: Re: linux-2.6.9 eepro100 warning References: <200410232313.AA00003@prism.kumin.ne.jp> <417C9A4E.3030909@pobox.com> In-Reply-To: <417C9A4E.3030909@pobox.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10788 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: nickpiggin@yahoo.com.au Precedence: bulk X-list: netdev Content-Length: 480 Lines: 19 Jeff Garzik wrote: > Seiichi Nakashima wrote: > >> Hi. >> >> I update linux kernel form 2.6.8.1 to 2.6.9. >> I found eepro100 warning, then I update 2.6.10-rc1, but same result. >> It is only warning, I think pro100 may work fine. > > > This should be fixed in the 2.6.9-mm tree (via my netdev-2.6 tree). > > Note that eepro100 driver will be deleted soon. > By soon, do you mean in 5 years? Or by deleted, do you mean deprecated? Ignore me, I'm just being a smart arse ;) From yoshfuji@linux-ipv6.org Sun Oct 24 23:27:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 23:27:24 -0700 (PDT) Received: from yue.st-paulia.net (yue.linux-ipv6.org [203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9P6RJwD003819 for ; Sun, 24 Oct 2004 23:27:20 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 8E4FD33CE5; Mon, 25 Oct 2004 15:27:50 +0900 (JST) Date: Mon, 25 Oct 2004 15:27:49 +0900 (JST) Message-Id: <20041025.152749.00307602.yoshfuji@linux-ipv6.org> To: jgarzik@pobox.com Cc: nakasima@kumin.ne.jp, linux-kernel@vger.kernel.org, netdev@oss.sgi.com, yoshfuji@linux-ipv6.org Subject: Re: linux-2.6.9 eepro100 warning From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <417C9A4E.3030909@pobox.com> References: <200410232313.AA00003@prism.kumin.ne.jp> <417C9A4E.3030909@pobox.com> Organization: USAGI Project X-URL: http://www.yoshifuji.org/%7Ehideaki/ X-Fingerprint: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA X-PGP-Key-URL: http://www.yoshifuji.org/%7Ehideaki/hideaki@yoshifuji.org.asc X-Face: "5$Al-.M>NJ%a'@hhZdQm:."qn~PA^gq4o*>iCFToq*bAi#4FRtx}enhuQKz7fNqQz\BYU] $~O_5m-9'}MIs`XGwIEscw;e5b>n"B_?j/AkL~i/MEaZBLP X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 10789 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: yoshfuji@linux-ipv6.org Precedence: bulk X-list: netdev Content-Length: 414 Lines: 12 In article <417C9A4E.3030909@pobox.com> (at Mon, 25 Oct 2004 02:16:46 -0400), Jeff Garzik says: > Note that eepro100 driver will be deleted soon. I'm afraid that e100 does not work well on some systems (e.g. my ThinkPad T30 on 2.4.x) while eepro100 does. (I also know there're systems which does not work well with eepro100 but e100.) Has all of such kind of issues been solved? --yoshfuji From jgarzik@pobox.com Sun Oct 24 23:28:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 23:28:57 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9P6Spc5004188 for ; Sun, 24 Oct 2004 23:28:52 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CLyLL-00010Q-Pf; Mon, 25 Oct 2004 07:28:35 +0100 Message-ID: <417C9D08.6030903@pobox.com> Date: Mon, 25 Oct 2004 02:28:24 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" CC: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [NET]: TSO requires SG, enforce this at device registry. References: <200410221715.i9MHFlIu021927@hera.kernel.org> <417C9431.6030505@pobox.com> <20041024225700.4a22a968.davem@davemloft.net> In-Reply-To: <20041024225700.4a22a968.davem@davemloft.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10790 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: 518 Lines: 20 David S. Miller wrote: > On Mon, 25 Oct 2004 01:50:41 -0400 > Jeff Garzik wrote: > > >>1) Given current driver implementations of ethtool ioctls, sysadmin is >>free to create a combination of bits that are IMHO a bug. One can argue >>that this is an extension of "root can shoot himself in the foot", so >>who knows. > > > I made a followon posting proposing ethtool changes which > would enforce the rules there too, did you see it? Sorry, I didn't see it. URL or grep string? Jeff From garzik@havoc.gtf.org Sun Oct 24 23:29:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 23:29:42 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [69.28.190.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9P6TbA4004473 for ; Sun, 24 Oct 2004 23:29:37 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id AEC0D7B5B; Mon, 25 Oct 2004 02:29:15 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i9P6TEpZ016741; Mon, 25 Oct 2004 02:29:14 -0400 Date: Mon, 25 Oct 2004 02:29:14 -0400 From: Jeff Garzik To: YOSHIFUJI Hideaki / =?utf-8?B?5ZCJ6Jek6Iux5piO?= Cc: nakasima@kumin.ne.jp, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: linux-2.6.9 eepro100 warning Message-ID: <20041025062914.GA16716@havoc.gtf.org> References: <200410232313.AA00003@prism.kumin.ne.jp> <417C9A4E.3030909@pobox.com> <20041025.152749.00307602.yoshfuji@linux-ipv6.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20041025.152749.00307602.yoshfuji@linux-ipv6.org> User-Agent: Mutt/1.4.1i X-archive-position: 10791 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: 578 Lines: 18 On Mon, Oct 25, 2004 at 03:27:49PM +0900, YOSHIFUJI Hideaki / å‰è—¤è‹±æ˜Ž wrote: > In article <417C9A4E.3030909@pobox.com> (at Mon, 25 Oct 2004 02:16:46 -0400), Jeff Garzik says: > > > Note that eepro100 driver will be deleted soon. > > I'm afraid that e100 does not work well on some systems (e.g. my ThinkPad > T30 on 2.4.x) while eepro100 does. > (I also know there're systems which does not work well > with eepro100 but e100.) > > Has all of such kind of issues been solved? The issues won't get resolved if there is no impetus to fix :) Jeff From rroesler@syskonnect.de Sun Oct 24 23:59:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 24 Oct 2004 23:59:33 -0700 (PDT) Received: from gatekeeper.syskonnect.de (gatekeeper.syskonnect.de [213.144.13.149]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9P6xQRw005732 for ; Sun, 24 Oct 2004 23:59:28 -0700 Received: from syskonnect.de (skd.de [10.9.15.1]) by gatekeeper.syskonnect.de (8.12.10/8.12.11) with ESMTP id i9P6xGkT008492; Mon, 25 Oct 2004 08:59:16 +0200 (MET DST) Received: from [10.9.1.98] (localhost [127.0.0.1]) by syskonnect.de (8.12.11/8.12.11) with ESMTP id i9P6x8wo018178; Mon, 25 Oct 2004 08:59:09 +0200 (MEST) Subject: modified pci.ids file From: Ralph Roesler To: pci-ids@ucw.cz Cc: netdev@oss.sgi.com, jgarzik@pobox.com Content-Type: multipart/mixed; boundary="=-v7QpnGEpyMiv7o+C4qKR" Organization: Message-Id: <1098687547.2237.18.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 25 Oct 2004 08:59:08 +0200 X-archive-position: 10792 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rroesler@syskonnect.de Precedence: bulk X-list: netdev Content-Length: 9700 Lines: 208 --=-v7QpnGEpyMiv7o+C4qKR Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi *, here is the list of pci-device id that are supported by the Marvell/SysKonnect sk98lin driver. Is it possible for you to the new information into the latest 2.6 kernel tree? I made the patch against version 2.6.10-rc1-bk2 (the most recent one while writing this mail). Thanks a lot for your help! -Ralph. -- The debugger isn't a substitute for good thinking. But, in some cases, thinking isn't a substitute for a good debugger either. The most effective combination is good thinking and a good debugger. -Steve McConnell, Code Complete --=-v7QpnGEpyMiv7o+C4qKR Content-Disposition: attachment; filename=patch-pci.ids-rc1-bk2 Content-Type: text/plain; name=patch-pci.ids-rc1-bk2; charset=UTF-8 Content-Transfer-Encoding: 7bit --- drivers/pci/pci.ids 2004-10-25 09:07:38.000000000 +0100 +++ pci.ids 2004-10-25 09:14:21.000000000 +0100 @@ -2769,6 +2769,7 @@ 7940 3c803 FDDILink UTP Controller 7980 3c804 FDDILink SAS Controller 7990 3c805 FDDILink DAS Controller + 80eb 3c940B 10/100/1000Base-T 8811 Token ring 9000 3c900 10BaseT [Boomerang] 9001 3c900 10Mbps Combo [Boomerang] @@ -4048,7 +4049,8 @@ f015 NinjaSCSI-32 Melco 1146 Force Computers 1147 Interface Corp -1148 Syskonnect (Schneider & Koch) +# Formerly (Schneider $ Koch) +1148 SysKonnect 4000 FDDI Adapter 0e11 b03b Netelligent 100 FDDI DAS Fibre SC 0e11 b03c Netelligent 100 FDDI SAS Fibre SC @@ -4106,6 +4108,14 @@ 1148 9521 SK-9521 10/100/1000Base-T Adapter 4400 SK-9Dxx Gigabit Ethernet Adapter 4500 SK-9Mxx Gigabit Ethernet Adapter + 9E00 SK-9Exx 10/100/1000Base-T Adapter + 1148 2100 SK-9E21 Server Adapter + 1148 21D0 SK-9E21D 10/100/1000Base-T Adapter + 1148 2200 SK-9E22 Server Adapter + 1148 8100 SK-9E81 Server Adapter + 1148 8200 SK-9E82 Server Adapter + 1148 9100 SK-9E91 Server Adapter + 1148 9200 SK-9E92 Server Adapter 1149 Win System Corporation 114a VMIC 5579 VMIPCI-5579 (Reflective Memory Card) @@ -4352,6 +4362,7 @@ 3b05 DWL-G650+ CardBus PC Card 4000 DL2000-based Gigabit Ethernet 4c00 Gigabit Ethernet Adapter + 1186 4c00 DGE-530T Gigabit Ethernet Adapter 8400 D-Link DWL-650+ CardBus PC Card 1187 Advanced Technology Laboratories, Inc. 1188 Shima Seiki Manufacturing Ltd. @@ -4434,9 +4445,119 @@ 0146 GT-64010/64010A System Controller 1fa6 Marvell W8300 802.11 Adapter 4320 Yukon Gigabit Ethernet 10/100/1000Base-T Adapter + 4320 Gigabit Ethernet Controller + 1019 0f38 Marvell 88E8001 Gigabit Ethernet Controller (ECS) + 1019 8001 Marvell 88E8001 Gigabit Ethernet Controller (ECS) + 1043 173c Marvell 88E8001 Gigabit Ethernet Controller (Asus) + 1043 811a Marvell 88E8001 Gigabit Ethernet Controller (Asus) + 105b 0c19 Marvell 88E8001 Gigabit Ethernet Controller (Foxconn) + 10b8 b452 SMC EZ Card 1000 (SMC9452TXV.2) + 11ab 0121 Marvell RDK-8001 + 11ab 0321 Marvell RDK-8003 + 11ab 1021 Marvell RDK-8010 + 11ab 5021 Marvell Yukon Gigabit Ethernet 10/100/1000Base-T Controller (64 bit) + 11ab 9521 Marvell Yukon Gigabit Ethernet 10/100/1000Base-T Controller (32 bit) + 1458 e000 Marvell 88E8001 Gigabit Ethernet Controller (Gigabyte) + 147b 1406 Marvell 88E8001 Gigabit Ethernet Controller (Abit) + 15d4 0047 Marvell 88E8001 Gigabit Ethernet Controller (Iwill) + 1695 9025 Marvell 88E8001 Gigabit Ethernet Controller (Epox) + 17f2 1c03 Marvell 88E8001 Gigabit Ethernet Controller (Albatron) + 270f 2803 Marvell 88E8001 Gigabit Ethernet Controller (Chaintech) + 4350 Fast Ethernet Controller + 1179 0001 Marvell 88E8035 Fast Ethernet Controller (Toshiba) + 11ab 3521 Marvell RDK-8035 + 1854 000d Marvell 88E8035 Fast Ethernet Controller (LGE) + 1854 000e Marvell 88E8035 Fast Ethernet Controller (LGE) + 1854 000f Marvell 88E8035 Fast Ethernet Controller (LGE) + 1854 0011 Marvell 88E8035 Fast Ethernet Controller (LGE) + 1854 0012 Marvell 88E8035 Fast Ethernet Controller (LGE) + 1854 0016 Marvell 88E8035 Fast Ethernet Controller (LGE) + 1854 0017 Marvell 88E8035 Fast Ethernet Controller (LGE) + 1854 0018 Marvell 88E8035 Fast Ethernet Controller (LGE) + 1854 0019 Marvell 88E8035 Fast Ethernet Controller (LGE) + 1854 001c Marvell 88E8035 Fast Ethernet Controller (LGE) + 1854 001e Marvell 88E8035 Fast Ethernet Controller (LGE) + 1854 0020 Marvell 88E8035 Fast Ethernet Controller (LGE) + 4351 Fast Ethernet Controller + 107b 4009 Marvell 88E8036 Fast Ethernet Controller (Wistron) + 10f7 8338 Marvell 88E8036 Fast Ethernet Controller (Panasonic) + 1179 0001 Marvell 88E8036 Fast Ethernet Controller (Toshiba) + 1179 ff00 Marvell 88E8036 Fast Ethernet Controller (Compal) + 1179 ff10 Marvell 88E8036 Fast Ethernet Controller (Inventec) + 11ab 3621 Marvell RDK-8036 + 13d1 ac12 Abocom EFE3K - 10/100 Ethernet Expresscard + 161f 203d Marvell 88E8036 Fast Ethernet Controller (Arima) + 1854 000d Marvell 88E8036 Fast Ethernet Controller (LGE) + 1854 000e Marvell 88E8036 Fast Ethernet Controller (LGE) + 1854 000f Marvell 88E8036 Fast Ethernet Controller (LGE) + 1854 0011 Marvell 88E8036 Fast Ethernet Controller (LGE) + 1854 0012 Marvell 88E8036 Fast Ethernet Controller (LGE) + 1854 0016 Marvell 88E8036 Fast Ethernet Controller (LGE) + 1854 0017 Marvell 88E8036 Fast Ethernet Controller (LGE) + 1854 0018 Marvell 88E8036 Fast Ethernet Controller (LGE) + 1854 0019 Marvell 88E8036 Fast Ethernet Controller (LGE) + 1854 001c Marvell 88E8036 Fast Ethernet Controller (LGE) + 1854 001e Marvell 88E8036 Fast Ethernet Controller (LGE) + 1854 0020 Marvell 88E8036 Fast Ethernet Controller (LGE) + 4360 Gigabit Ethernet Controller + 1043 8134 Marvell 88E8052 Gigabit Ethernet Controller (Asus) + 107b 4009 Marvell 88E8052 Gigabit Ethernet Controller (Wistron) + 11ab 5221 Marvell RDK-8052 + 1458 e000 Marvell 88E8052 Gigabit Ethernet Controller (Gigabyte) + 1462 052c Marvell 88E8052 Gigabit Ethernet Controller (MSI) + 1849 8052 Marvell 88E8052 Gigabit Ethernet Controller (ASRock) + 1940 e000 Marvell 88E8052 Gigabit Ethernet Controller (Gigabyte) + a0a0 0509 Marvell 88E8052 Gigabit Ethernet Controller (Aopen) + 4361 Gigabit Ethernet Controller + 107b 3015 Marvell 88E8050 Gigabit Ethernet Controller (Gateway) + 11ab 5021 Marvell 88E8050 Gigabit Ethernet Controller (Intel) + 4362 Gigabit Ethernet Controller + 103c 2a0d Marvell 88E8053 Gigabit Ethernet Controller (Asus) + 1043 8142 Marvell 88E8053 Gigabit Ethernet Controller (Asus) + 109f 3197 Marvell 88E8053 Gigabit Ethernet Controller (Trigem) + 10f7 8338 Marvell 88E8053 Gigabit Ethernet Controller (Panasonic) + 10fd a430 Marvell 88E8053 Gigabit Ethernet Controller (SOYO) + 1179 0001 Marvell 88E8053 Gigabit Ethernet Controller (Toshiba) + 1179 ff00 Marvell 88E8053 Gigabit Ethernet Controller (Compal) + 1179 ff10 Marvell 88E8053 Gigabit Ethernet Controller (Inventec) + 11ab 5321 Marvell RDK-8053 + 1297 c240 Marvell 88E8053 Gigabit Ethernet Controller (Shuttle) + 1297 c241 Marvell 88E8053 Gigabit Ethernet Controller (Shuttle) + 1297 c242 Marvell 88E8053 Gigabit Ethernet Controller (Shuttle) + 1297 c243 Marvell 88E8053 Gigabit Ethernet Controller (Shuttle) + 1297 c244 Marvell 88E8053 Gigabit Ethernet Controller (Shuttle) + 13d1 ac11 Abocom EGE5K - Giga Ethernet Expresscard + 1458 e000 Marvell 88E8053 Gigabit Ethernet Controller (Gigabyte) + 1462 058c Marvell 88E8053 Gigabit Ethernet Controller (MSI) + 14c0 0012 Marvell 88E8053 Gigabit Ethernet Controller (Compal) + 1558 04a0 Marvell 88E8053 Gigabit Ethernet Controller (Clevo) + 15bd 1003 Marvell 88E8053 Gigabit Ethernet Controller (DFI) + 161f 203c Marvell 88E8053 Gigabit Ethernet Controller (Arima) + 161f 203d Marvell 88E8053 Gigabit Ethernet Controller (Arima) + 1695 9029 Marvell 88E8053 Gigabit Ethernet Controller (Epox) + 17f2 2c08 Marvell 88E8053 Gigabit Ethernet Controller (Albatron) + 17ff 0585 Marvell 88E8053 Gigabit Ethernet Controller (Quanta) + 1849 8053 Marvell 88E8053 Gigabit Ethernet Controller (ASRock) + 1854 000b Marvell 88E8053 Gigabit Ethernet Controller (LGE) + 1854 000c Marvell 88E8053 Gigabit Ethernet Controller (LGE) + 1854 0010 Marvell 88E8053 Gigabit Ethernet Controller (LGE) + 1854 0013 Marvell 88E8053 Gigabit Ethernet Controller (LGE) + 1854 0014 Marvell 88E8053 Gigabit Ethernet Controller (LGE) + 1854 0015 Marvell 88E8053 Gigabit Ethernet Controller (LGE) + 1854 001a Marvell 88E8053 Gigabit Ethernet Controller (LGE) + 1854 001b Marvell 88E8053 Gigabit Ethernet Controller (LGE) + 1854 001d Marvell 88E8053 Gigabit Ethernet Controller (LGE) + 1854 001f Marvell 88E8053 Gigabit Ethernet Controller (LGE) + 1854 0021 Marvell 88E8053 Gigabit Ethernet Controller (LGE) + 1854 0022 Marvell 88E8053 Gigabit Ethernet Controller (LGE) + 1940 e000 Marvell 88E8053 Gigabit Ethernet Controller (Gigabyte) + 270f 2801 Marvell 88E8053 Gigabit Ethernet Controller (Chaintech) + a0a0 0506 Marvell 88E8053 Gigabit Ethernet Controller (Aopen) 4611 GT-64115 System Controller 4620 GT-64120/64120A/64121A System Controller 4801 GT-48001 + 5005 Belkin + 1799 5005 Belkin Gigabit Desktop Card 10/100/1000Base-T Adapter, Copper RJ-45 5040 MV88SX5040 4-port SATA I PCI-X Controller 5041 MV88SX5041 4-port SATA I PCI-X Controller 5080 MV88SX5080 8-port SATA I PCI-X Controller @@ -5735,6 +5856,7 @@ 1370 ATL Products 1371 CNet Technology Inc 434e GigaCard Network Adapter + 1371 434e N-Way PCI-Bus Giga-Card 1000/100/10Mbps(L) 1373 Silicon Vision Inc 1374 Silicom Ltd 1375 Argosystems Inc --=-v7QpnGEpyMiv7o+C4qKR-- From laforge@netfilter.org Mon Oct 25 00:44:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 00:44:34 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9P7iNlN010282 for ; Mon, 25 Oct 2004 00:44:24 -0700 Received: from dsl-082-082-103-213.arcor-ip.net ([82.82.103.213] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1CLzWP-0000db-08; Mon, 25 Oct 2004 09:44:05 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1CLzWN-00042u-HH; Mon, 25 Oct 2004 09:44:03 +0200 Date: Mon, 25 Oct 2004 09:44:03 +0200 From: Harald Welte To: David Miller Cc: Linux Netdev List , Netfilter Development Mailinglist Subject: [PATCH 2.6] fix ipt_ULOG bogus error messages Message-ID: <20041025074403.GO18934@sunbeam.de.gnumonks.org> Mail-Followup-To: Harald Welte , David Miller , Linux Netdev List , Netfilter Development Mailinglist Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6o78gXsyQHm68LY/" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10793 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@netfilter.org Precedence: bulk X-list: netdev Content-Length: 2410 Lines: 72 --6o78gXsyQHm68LY/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Dave! Please apply the fix below, it addresses some bogus error messages ("error during NLMSG_PUT") that were printed because of a wrong calculation of the 'len' parameter to NLMSG_PUT(). 2.4.x fix will follow. Thanks! --- linux-2.6.9/net/ipv4/netfilter/ipt_ULOG.c 2004-10-18 23:53:46.000000000= +0200 +++ linux-2.6.9-ulog/net/ipv4/netfilter/ipt_ULOG.c 2004-10-25 09:39:28.1505= 82258 +0200 @@ -1,7 +1,7 @@ /* * netfilter module for userspace packet logging daemons * - * (C) 2000-2002 by Harald Welte + * (C) 2000-2004 by Harald Welte * * 2000/09/22 ulog-cprange feature added * 2001/01/04 in-kernel queue as proposed by Sebastian Zander=20 @@ -13,6 +13,8 @@ * 2002/07/07 remove broken nflog_rcv() function -HW * 2002/08/29 fix shifted/unshifted nlgroup bug -HW * 2002/10/30 fix uninitialized mac_len field - + * 2004/10/25 fix erroneous calculation of 'len' parameter to NLMSG_PUT + * resulting in bogus 'error during NLMSG_PUT' messages. * * (C) 1999-2001 Paul `Rusty' Russell * (C) 2002-2004 Netfilter Core Team @@ -212,7 +214,7 @@ =20 /* NLMSG_PUT contains a hidden goto nlmsg_failure !!! */ nlh =3D NLMSG_PUT(ub->skb, 0, ub->qlen, ULOG_NL_EVENT,=20 - size - sizeof(*nlh)); + sizeof(*pm)+copy_len); ub->qlen++; =20 pm =3D NLMSG_DATA(nlh); --=20 - Harald Welte http://www.netfilter.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie --6o78gXsyQHm68LY/ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBfK7DXaXGVTD0i/8RAhImAJ9rqbwnyaL9luZFPTdwT5cj5z0wNgCfUniY JM6sbH+03mNjFP5BIahGkfo= =jZYh -----END PGP SIGNATURE----- --6o78gXsyQHm68LY/-- From laforge@netfilter.org Mon Oct 25 00:48:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 00:48:24 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9P7mGcY010738 for ; Mon, 25 Oct 2004 00:48:17 -0700 Received: from dsl-082-082-103-213.arcor-ip.net ([82.82.103.213] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1CLzaB-0000jT-Sh; Mon, 25 Oct 2004 09:48:00 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1CLzaA-00043H-VC; Mon, 25 Oct 2004 09:47:58 +0200 Date: Mon, 25 Oct 2004 09:47:58 +0200 From: Harald Welte To: David Miller Cc: Linux Netdev List , Netfilter Development Mailinglist Subject: [PATCH 2.4] fix ipt_ULOG bogus error messages Message-ID: <20041025074758.GP18934@sunbeam.de.gnumonks.org> Mail-Followup-To: Harald Welte , David Miller , Linux Netdev List , Netfilter Development Mailinglist Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CbqR2XcyIs6OSP+I" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10794 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@netfilter.org Precedence: bulk X-list: netdev Content-Length: 2777 Lines: 78 --CbqR2XcyIs6OSP+I Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [sorry for forgetting the Signed-off-by in the 2.6.x patch, it is hereby implied] Hi Dave! Please apply the fix below, it addresses some bogus error messages ("error during NLMSG_PUT") that were printed because of a wrong calculation of the 'len' parameter to NLMSG_PUT(). Signed-off-by: Harald Welte diff -Nru --exclude .depend --exclude '*.o' --exclude '*.ko' --exclude '*.v= er' --exclude '.*.flags' --exclude '*.orig' --exclude '*.rej' --exclude '*.= cmd' --exclude '*.mod.c' --exclude '*~' linux-2.4.28-pre3-plain/net/ipv4/ne= tfilter/ipt_ULOG.c linux-2.4.28-pre3-ulog/net/ipv4/netfilter/ipt_ULOG.c --- linux-2.4.28-pre3-plain/net/ipv4/netfilter/ipt_ULOG.c 2004-08-08 01:26:= 06.000000000 +0200 +++ linux-2.4.28-pre3-ulog/net/ipv4/netfilter/ipt_ULOG.c 2004-10-25 09:46:0= 6.319745399 +0200 @@ -1,7 +1,7 @@ /* * netfilter module for userspace packet logging daemons * - * (C) 2000-2002 by Harald Welte + * (C) 2000-2004 by Harald Welte * * 2000/09/22 ulog-cprange feature added * 2001/01/04 in-kernel queue as proposed by Sebastian Zander=20 @@ -13,6 +13,8 @@ * 2002/07/07 remove broken nflog_rcv() function -HW * 2002/08/29 fix shifted/unshifted nlgroup bug -HW * 2002/10/30 fix uninitialized mac_len field - + * 2004/10/25 fix erroneous calculation of 'len' parameter to NLMSG_PUT + * resulting in bogus 'error during NLMSG_PUT' messages. * * Released under the terms of the GPL * @@ -203,7 +205,7 @@ =20 /* NLMSG_PUT contains a hidden goto nlmsg_failure !!! */ nlh =3D NLMSG_PUT(ub->skb, 0, ub->qlen, ULOG_NL_EVENT,=20 - size - sizeof(*nlh)); + sizeof(*pm)+copy_len); ub->qlen++; =20 pm =3D NLMSG_DATA(nlh); --=20 - Harald Welte http://www.netfilter.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie --CbqR2XcyIs6OSP+I Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBfK+uXaXGVTD0i/8RAradAJ9iD4JfKx4vdn8fh8n8TrUVwtyXYwCfUhNB p+oi2EG8PBOTBvsbt+8sibg= =4ntx -----END PGP SIGNATURE----- --CbqR2XcyIs6OSP+I-- From garzik@havoc.gtf.org Mon Oct 25 01:24:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 01:24:48 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [69.28.190.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9P8Oam7012726 for ; Mon, 25 Oct 2004 01:24:37 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id BF0087B59; Mon, 25 Oct 2004 04:24:13 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i9P8ODkN021914; Mon, 25 Oct 2004 04:24:13 -0400 Date: Mon, 25 Oct 2004 04:24:13 -0400 From: Jeff Garzik To: Andrew Morton , Linus Torvalds Cc: netdev@oss.sgi.com Subject: [BK PATCHES] 2.6.x net driver updates Message-ID: <20041025082413.GA21877@havoc.gtf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-archive-position: 10795 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: 37958 Lines: 1279 Continuing the merge... e100, defxx, set-config no-op removal, acenic Please do a bk pull bk://gkernel.bkbits.net/net-drivers-2.6 This will update the following files: drivers/media/dvb/dvb-core/dvb_net.c | 9 - drivers/net/acenic.c | 171 +++++++++++++++-------------------- drivers/net/acenic.h | 23 +--- drivers/net/acenic_firmware.h | 2 drivers/net/defxx.c | 144 ++++++++++++++--------------- drivers/net/defxx.h | 2 drivers/net/e100.c | 51 ++++++---- drivers/net/ibmlana.c | 9 - drivers/net/meth.c | 26 ----- drivers/net/sk_mca.c | 9 - drivers/net/wan/lmc/lmc_main.c | 9 - drivers/net/wireless/netwave_cs.c | 12 -- 12 files changed, 185 insertions(+), 282 deletions(-) through these ChangeSets: Anton Blanchard: o fix acenic hotplug Ganesh Venkatesan: o e100: Driver version number update o e100: Fix set ringparam for ethtool returning error code on bad input o e100: Fix loss of connectivity to BMC when interface is brought down. o e100 driver version number update o e100 - use NET_IP_ALIGN to set rx data buffer alignment o e100 - Use pci_device_name for syslog messages till registering netdevice Jeff Garzik: o [netdev] Remove no-op in-driver implementations of ->set_config() Jesse Brandeburg: o e100: whitespace and DPRINTKS o e100: fix NAPI race with watchdog Maciej W. Rozycki: o defxx device name fixes o defxx trivial updates Stephen Hemminger: o (4/4) acenic - don't spin forever in hard_start_xmit o (3/4) acenic - __iomem warnings cleanup o (2/4) acenic - eliminate MAX_SKB_FRAGS #if o (1/4) acenic - use netdev_priv diff -Nru a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c --- a/drivers/media/dvb/dvb-core/dvb_net.c 2004-10-25 03:39:21 -04:00 +++ b/drivers/media/dvb/dvb-core/dvb_net.c 2004-10-25 03:39:21 -04:00 @@ -917,14 +917,6 @@ } -static int dvb_net_set_config(struct net_device *dev, struct ifmap *map) -{ - if (netif_running(dev)) - return -EBUSY; - return 0; -} - - static void wq_restart_net_feed (void *data) { struct net_device *dev = data; @@ -983,7 +975,6 @@ dev->hard_start_xmit = dvb_net_tx; dev->get_stats = dvb_net_get_stats; dev->set_multicast_list = dvb_net_set_multicast_list; - dev->set_config = dvb_net_set_config; dev->set_mac_address = dvb_net_set_mac; dev->mtu = 4096; dev->mc_count = 0; diff -Nru a/drivers/net/acenic.c b/drivers/net/acenic.c --- a/drivers/net/acenic.c 2004-10-25 03:39:21 -04:00 +++ b/drivers/net/acenic.c 2004-10-25 03:39:21 -04:00 @@ -443,7 +443,7 @@ MODULE_PARM_DESC(tx_ratio, "AceNIC/3C985/GA620 ratio of NIC memory used for TX/RX descriptors (range 0-63)"); -static char version[] __initdata = +static char version[] __devinitdata = "acenic.c: v0.92 08/05/2002 Jes Sorensen, linux-acenic@SunSITE.dk\n" " http://home.cern.ch/~jes/gige/acenic.html\n"; @@ -538,7 +538,7 @@ * addresses but who gives a damn. */ dev->base_addr = pci_resource_start(pdev, 0); - ap->regs = (struct ace_regs *)ioremap(dev->base_addr, 0x4000); + ap->regs = ioremap(dev->base_addr, 0x4000); if (!ap->regs) { printk(KERN_ERR "%s: Unable to map I/O register, " "AceNIC %i will be disabled.\n", @@ -631,7 +631,7 @@ { struct net_device *dev = pci_get_drvdata(pdev); struct ace_private *ap = netdev_priv(dev); - struct ace_regs *regs = ap->regs; + struct ace_regs __iomem *regs = ap->regs; short i; unregister_netdev(dev); @@ -884,7 +884,7 @@ /* * Commands are considered to be slow. */ -static inline void ace_issue_cmd(struct ace_regs *regs, struct cmd *cmd) +static inline void ace_issue_cmd(struct ace_regs __iomem *regs, struct cmd *cmd) { u32 idx; @@ -897,10 +897,10 @@ } -static int __init ace_init(struct net_device *dev) +static int __devinit ace_init(struct net_device *dev) { struct ace_private *ap; - struct ace_regs *regs; + struct ace_regs __iomem *regs; struct ace_info *info = NULL; struct pci_dev *pdev; unsigned long myjif; @@ -1318,11 +1318,10 @@ writel(TX_RING_BASE, ®s->WinBase); if (ACE_IS_TIGON_I(ap)) { - ap->tx_ring = (struct tx_desc *)regs->Window; - for (i = 0; i < (TIGON_I_TX_RING_ENTRIES * - sizeof(struct tx_desc) / 4); i++) { - writel(0, (unsigned long)ap->tx_ring + i * 4); - } + ap->tx_ring = (struct tx_desc *) regs->Window; + for (i = 0; i < (TIGON_I_TX_RING_ENTRIES + * sizeof(struct tx_desc)) / sizeof(u32); i++) + writel(0, (void __iomem *)ap->tx_ring + i * 4); set_aceaddr(&info->tx_ctrl.rngptr, TX_RING_BASE); } else { @@ -1549,14 +1548,9 @@ static void ace_set_rxtx_parms(struct net_device *dev, int jumbo) { - struct ace_private *ap; - struct ace_regs *regs; - int board_idx; - - ap = netdev_priv(dev); - regs = ap->regs; - - board_idx = ap->board_idx; + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; + int board_idx = ap->board_idx; if (board_idx >= 0) { if (!jumbo) { @@ -1594,7 +1588,7 @@ { struct net_device *dev = data; struct ace_private *ap = netdev_priv(dev); - struct ace_regs *regs = ap->regs; + struct ace_regs __iomem *regs = ap->regs; /* * We haven't received a stats update event for more than 2.5 @@ -1617,7 +1611,7 @@ static void ace_tasklet(unsigned long dev) { - struct ace_private *ap = ((struct net_device *)dev)->priv; + struct ace_private *ap = netdev_priv((struct net_device *)dev); int cur_size; cur_size = atomic_read(&ap->cur_rx_bufs); @@ -1675,10 +1669,9 @@ */ static void ace_load_std_rx_ring(struct ace_private *ap, int nr_bufs) { - struct ace_regs *regs; + struct ace_regs __iomem *regs = ap->regs; short i, idx; - - regs = ap->regs; + prefetchw(&ap->cur_rx_bufs); @@ -1739,11 +1732,9 @@ static void ace_load_mini_rx_ring(struct ace_private *ap, int nr_bufs) { - struct ace_regs *regs; + struct ace_regs __iomem *regs = ap->regs; short i, idx; - regs = ap->regs; - prefetchw(&ap->cur_mini_bufs); idx = ap->rx_mini_skbprd; @@ -1798,11 +1789,9 @@ */ static void ace_load_jumbo_rx_ring(struct ace_private *ap, int nr_bufs) { - struct ace_regs *regs; + struct ace_regs __iomem *regs = ap->regs; short i, idx; - regs = ap->regs; - idx = ap->rx_jumbo_skbprd; for (i = 0; i < nr_bufs; i++) { @@ -2082,8 +2071,7 @@ * the 12.3.x Firmware - my Tigon I NICs seem to disagree! */ if (ACE_IS_TIGON_I(ap)) { - struct ace_regs *regs = ap->regs; - writel(idx, ®s->RxRetCsm); + writel(idx, &ap->regs->RxRetCsm); } ap->cur_rx = idx; @@ -2163,16 +2151,13 @@ static irqreturn_t ace_interrupt(int irq, void *dev_id, struct pt_regs *ptregs) { - struct ace_private *ap; - struct ace_regs *regs; struct net_device *dev = (struct net_device *)dev_id; + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; u32 idx; u32 txcsm, rxretcsm, rxretprd; u32 evtcsm, evtprd; - ap = netdev_priv(dev); - regs = ap->regs; - /* * In case of PCI shared interrupts or spurious interrupts, * we want to make sure it is actually our interrupt before @@ -2325,13 +2310,10 @@ static int ace_open(struct net_device *dev) { - struct ace_private *ap; - struct ace_regs *regs; + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; struct cmd cmd; - ap = netdev_priv(dev); - regs = ap->regs; - if (!(ap->fw_running)) { printk(KERN_WARNING "%s: Firmware not running!\n", dev->name); return -EBUSY; @@ -2383,8 +2365,8 @@ static int ace_close(struct net_device *dev) { - struct ace_private *ap; - struct ace_regs *regs; + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; struct cmd cmd; unsigned long flags; short i; @@ -2396,9 +2378,7 @@ */ netif_stop_queue(dev); - ap = netdev_priv(dev); - regs = ap->regs; - + if (ap->promisc) { cmd.evt = C_SET_PROMISC_MODE; cmd.code = C_C_PROMISC_DISABLE; @@ -2433,9 +2413,11 @@ if (mapping) { if (ACE_IS_TIGON_I(ap)) { - writel(0, &ap->tx_ring[i].addr.addrhi); - writel(0, &ap->tx_ring[i].addr.addrlo); - writel(0, &ap->tx_ring[i].flagsize); + struct tx_desc __iomem *tx + = (struct tx_desc __iomem *) &ap->tx_ring[i]; + writel(0, &tx->addr.addrhi); + writel(0, &tx->addr.addrlo); + writel(0, &tx->flagsize); } else memset(ap->tx_ring + i, 0, sizeof(struct tx_desc)); @@ -2492,11 +2474,12 @@ #endif if (ACE_IS_TIGON_I(ap)) { - writel(addr >> 32, &desc->addr.addrhi); - writel(addr & 0xffffffff, &desc->addr.addrlo); - writel(flagsize, &desc->flagsize); + struct tx_desc __iomem *io = (struct tx_desc __iomem *) desc; + writel(addr >> 32, &io->addr.addrhi); + writel(addr & 0xffffffff, &io->addr.addrlo); + writel(flagsize, &io->flagsize); #if ACENIC_DO_VLAN - writel(vlan_tag, &desc->vlanres); + writel(vlan_tag, &io->vlanres); #endif } else { desc->addr.addrhi = addr >> 32; @@ -2512,9 +2495,10 @@ static int ace_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct ace_private *ap = netdev_priv(dev); - struct ace_regs *regs = ap->regs; + struct ace_regs __iomem *regs = ap->regs; struct tx_desc *desc; u32 idx, flagsize; + unsigned long maxjiff = jiffies + 3*HZ; restart: idx = ap->tx_prd; @@ -2522,10 +2506,7 @@ if (tx_ring_full(ap, ap->tx_ret_csm, idx)) goto overflow; -#if MAX_SKB_FRAGS - if (!skb_shinfo(skb)->nr_frags) -#endif - { + if (!skb_shinfo(skb)->nr_frags) { dma_addr_t mapping; u32 vlan_tag = 0; @@ -2547,9 +2528,7 @@ flagsize |= BD_FLG_COAL_NOW; ace_load_tx_bd(ap, desc, mapping, flagsize, vlan_tag); - } -#if MAX_SKB_FRAGS - else { + } else { dma_addr_t mapping; u32 vlan_tag = 0; int i, len = 0; @@ -2604,7 +2583,6 @@ ace_load_tx_bd(ap, desc, mapping, flagsize, vlan_tag); } } -#endif wmb(); ap->tx_prd = idx; @@ -2624,7 +2602,7 @@ } dev->trans_start = jiffies; - return 0; + return NETDEV_TX_OK; overflow: /* @@ -2643,15 +2621,22 @@ * Alternative is to return with 1 not throttling queue. In this * case loop becomes longer, no more useful effects. */ - barrier(); - goto restart; + if (time_before(jiffies, maxjiff)) { + barrier(); + cpu_relax(); + goto restart; + } + + /* The ring is stuck full. */ + printk(KERN_WARNING "%s: Transmit ring stuck full\n", dev->name); + return NETDEV_TX_BUSY; } static int ace_change_mtu(struct net_device *dev, int new_mtu) { struct ace_private *ap = netdev_priv(dev); - struct ace_regs *regs = ap->regs; + struct ace_regs __iomem *regs = ap->regs; if (new_mtu > ACE_JUMBO_MTU) return -EINVAL; @@ -2688,7 +2673,7 @@ static int ace_get_settings(struct net_device *dev, struct ethtool_cmd *ecmd) { struct ace_private *ap = netdev_priv(dev); - struct ace_regs *regs = ap->regs; + struct ace_regs __iomem *regs = ap->regs; u32 link; memset(ecmd, 0, sizeof(struct ethtool_cmd)); @@ -2741,7 +2726,7 @@ static int ace_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd) { struct ace_private *ap = netdev_priv(dev); - struct ace_regs *regs = ap->regs; + struct ace_regs __iomem *regs = ap->regs; u32 link, speed; link = readl(®s->GigLnkState); @@ -2821,8 +2806,9 @@ */ static int ace_set_mac_addr(struct net_device *dev, void *p) { + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; struct sockaddr *addr=p; - struct ace_regs *regs; u8 *da; struct cmd cmd; @@ -2833,7 +2819,6 @@ da = (u8 *)dev->dev_addr; - regs = ((struct ace_private *)netdev_priv(dev))->regs; writel(da[0] << 8 | da[1], ®s->MacAddrHi); writel((da[2] << 24) | (da[3] << 16) | (da[4] << 8) | da[5], ®s->MacAddrLo); @@ -2850,7 +2835,7 @@ static void ace_set_multicast_list(struct net_device *dev) { struct ace_private *ap = netdev_priv(dev); - struct ace_regs *regs = ap->regs; + struct ace_regs __iomem *regs = ap->regs; struct cmd cmd; if ((dev->flags & IFF_ALLMULTI) && !(ap->mcast_all)) { @@ -2904,8 +2889,8 @@ static struct net_device_stats *ace_get_stats(struct net_device *dev) { struct ace_private *ap = netdev_priv(dev); - struct ace_mac_stats *mac_stats = - (struct ace_mac_stats *)ap->regs->Stats; + struct ace_mac_stats __iomem *mac_stats = + (struct ace_mac_stats __iomem *)ap->regs->Stats; ap->stats.rx_missed_errors = readl(&mac_stats->drop_space); ap->stats.multicast = readl(&mac_stats->kept_mc); @@ -2915,10 +2900,10 @@ } -static void __init ace_copy(struct ace_regs *regs, void *src, +static void __devinit ace_copy(struct ace_regs __iomem *regs, void *src, u32 dest, int size) { - unsigned long tdest; + void __iomem *tdest; u32 *wsrc; short tsize, i; @@ -2928,7 +2913,7 @@ while (size > 0) { tsize = min_t(u32, ((~dest & (ACE_WINDOW_SIZE - 1)) + 1), min_t(u32, size, ACE_WINDOW_SIZE)); - tdest = (unsigned long)®s->Window + + tdest = (void __iomem *) ®s->Window + (dest & (ACE_WINDOW_SIZE - 1)); writel(dest & ~(ACE_WINDOW_SIZE - 1), ®s->WinBase); /* @@ -2948,9 +2933,9 @@ } -static void __init ace_clear(struct ace_regs *regs, u32 dest, int size) +static void __devinit ace_clear(struct ace_regs __iomem *regs, u32 dest, int size) { - unsigned long tdest; + void __iomem *tdest; short tsize = 0, i; if (size <= 0) @@ -2959,7 +2944,7 @@ while (size > 0) { tsize = min_t(u32, ((~dest & (ACE_WINDOW_SIZE - 1)) + 1), min_t(u32, size, ACE_WINDOW_SIZE)); - tdest = (unsigned long)®s->Window + + tdest = (void __iomem *) ®s->Window + (dest & (ACE_WINDOW_SIZE - 1)); writel(dest & ~(ACE_WINDOW_SIZE - 1), ®s->WinBase); @@ -2981,13 +2966,10 @@ * This operation requires the NIC to be halted and is performed with * interrupts disabled and with the spinlock hold. */ -int __init ace_load_firmware(struct net_device *dev) +int __devinit ace_load_firmware(struct net_device *dev) { - struct ace_private *ap; - struct ace_regs *regs; - - ap = netdev_priv(dev); - regs = ap->regs; + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; if (!(readl(®s->CpuCtrl) & CPU_HALTED)) { printk(KERN_ERR "%s: trying to download firmware while the " @@ -3035,7 +3017,7 @@ * Thanks to Stevarino Webinski for helping tracking down the bugs in the * code i2c readout code by beta testing all my hacks. */ -static void __init eeprom_start(struct ace_regs *regs) +static void __devinit eeprom_start(struct ace_regs __iomem *regs) { u32 local; @@ -3064,7 +3046,7 @@ } -static void __init eeprom_prep(struct ace_regs *regs, u8 magic) +static void __devinit eeprom_prep(struct ace_regs __iomem *regs, u8 magic) { short i; u32 local; @@ -3101,7 +3083,7 @@ } -static int __init eeprom_check_ack(struct ace_regs *regs) +static int __devinit eeprom_check_ack(struct ace_regs __iomem *regs) { int state; u32 local; @@ -3129,7 +3111,7 @@ } -static void __init eeprom_stop(struct ace_regs *regs) +static void __devinit eeprom_stop(struct ace_regs __iomem *regs) { u32 local; @@ -3164,11 +3146,11 @@ /* * Read a whole byte from the EEPROM. */ -static int __init read_eeprom_byte(struct net_device *dev, +static int __devinit read_eeprom_byte(struct net_device *dev, unsigned long offset) { - struct ace_private *ap; - struct ace_regs *regs; + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; unsigned long flags; u32 local; int result = 0; @@ -3179,9 +3161,6 @@ result = -ENODEV; goto out; } - - ap = netdev_priv(dev); - regs = ap->regs; /* * Don't take interrupts on this CPU will bit banging diff -Nru a/drivers/net/acenic.h b/drivers/net/acenic.h --- a/drivers/net/acenic.h 2004-10-25 03:39:21 -04:00 +++ b/drivers/net/acenic.h 2004-10-25 03:39:21 -04:00 @@ -10,11 +10,6 @@ */ #define USE_TX_COAL_NOW 0 -#ifndef MAX_SKB_FRAGS -#define MAX_SKB_FRAGS 0 -#endif - - /* * Addressing: * @@ -638,7 +633,7 @@ struct ace_private { struct ace_info *info; - struct ace_regs *regs; /* register base */ + struct ace_regs __iomem *regs; /* register base */ struct ace_skb *skb; dma_addr_t info_dma; /* 32/64 bit */ @@ -712,13 +707,7 @@ } #define tx_free(ap) tx_space((ap)->tx_ret_csm, (ap)->tx_prd, ap) - -#if MAX_SKB_FRAGS #define tx_ring_full(ap, csm, prd) (tx_space(ap, csm, prd) <= TX_RESERVED) -#else -#define tx_ring_full 0 -#endif - static inline void set_aceaddr(aceaddr *aa, dma_addr_t addr) { @@ -729,7 +718,7 @@ } -static inline void ace_set_txprd(struct ace_regs *regs, +static inline void ace_set_txprd(struct ace_regs __iomem *regs, struct ace_private *ap, u32 value) { #ifdef INDEX_DEBUG @@ -750,8 +739,8 @@ static inline void ace_mask_irq(struct net_device *dev) { - struct ace_private *ap = dev->priv; - struct ace_regs *regs = ap->regs; + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; if (ACE_IS_TIGON_I(ap)) writel(1, ®s->MaskInt); @@ -764,8 +753,8 @@ static inline void ace_unmask_irq(struct net_device *dev) { - struct ace_private *ap = dev->priv; - struct ace_regs *regs = ap->regs; + struct ace_private *ap = netdev_priv(dev); + struct ace_regs __iomem *regs = ap->regs; if (ACE_IS_TIGON_I(ap)) writel(0, ®s->MaskInt); diff -Nru a/drivers/net/acenic_firmware.h b/drivers/net/acenic_firmware.h --- a/drivers/net/acenic_firmware.h 2004-10-25 03:39:21 -04:00 +++ b/drivers/net/acenic_firmware.h 2004-10-25 03:39:21 -04:00 @@ -23,7 +23,7 @@ #define tigonFwRodata NULL #else /* Generated by genfw.c */ -static u32 tigonFwText[(MAX_TEXT_LEN/4) + 1] __initdata = { +static u32 tigonFwText[(MAX_TEXT_LEN/4) + 1] __devinitdata = { 0x10000003, 0x0, 0xd, 0xd, 0x3c1d0001, 0x8fbd5c54, 0x3a0f021, 0x3c100000, 0x26104000, diff -Nru a/drivers/net/defxx.c b/drivers/net/defxx.c --- a/drivers/net/defxx.c 2004-10-25 03:39:21 -04:00 +++ b/drivers/net/defxx.c 2004-10-25 03:39:21 -04:00 @@ -19,7 +19,7 @@ * LVS Lawrence V. Stefani * * Maintainers: - * macro Maciej W. Rozycki + * macro Maciej W. Rozycki * * Credits: * I'd like to thank Patricia Cross for helping me get started with @@ -190,6 +190,7 @@ * Feb 2001 Skb allocation fixes * Feb 2001 davej PCI enable cleanups. * 04 Aug 2003 macro Converted to the DMA API. + * 14 Aug 2004 macro Fix device names reported. */ /* Include files */ @@ -214,12 +215,14 @@ #include "defxx.h" -/* Version information string - should be updated prior to each new release!!! */ +/* Version information string should be updated prior to each new release! */ +#define DRV_NAME "defxx" +#define DRV_VERSION "v1.07" +#define DRV_RELDATE "2004/08/14" static char version[] __devinitdata = - "defxx.c:v1.06 2003/08/04 Lawrence V. Stefani and others\n"; - -#define DRV_NAME "defxx" + DRV_NAME ": " DRV_VERSION " " DRV_RELDATE + " Lawrence V. Stefani and others\n"; #define DYNAMIC_BUFFERS 1 @@ -235,7 +238,7 @@ static void dfx_bus_init(struct net_device *dev); static void dfx_bus_config_check(DFX_board_t *bp); -static int dfx_driver_init(struct net_device *dev); +static int dfx_driver_init(struct net_device *dev, const char *print_name); static int dfx_adap_init(DFX_board_t *bp, int get_buffers); static int dfx_open(struct net_device *dev); @@ -404,24 +407,25 @@ */ static int __devinit dfx_init_one_pci_or_eisa(struct pci_dev *pdev, long ioaddr) { + static int version_disp; + char *print_name = DRV_NAME; struct net_device *dev; DFX_board_t *bp; /* board pointer */ int alloc_size; /* total buffer size used */ int err; -#ifndef MODULE - static int version_disp; - - if (!version_disp) /* display version info if adapter is found */ - { + if (!version_disp) { /* display version info if adapter is found */ version_disp = 1; /* set display flag to TRUE so that */ printk(version); /* we only display this string ONCE */ } -#endif + + if (pdev != NULL) + print_name = pdev->slot_name; dev = alloc_fddidev(sizeof(*bp)); if (!dev) { - printk (KERN_ERR "defxx: unable to allocate fddidev, aborting\n"); + printk(KERN_ERR "%s: unable to allocate fddidev, aborting\n", + print_name); return -ENOMEM; } @@ -437,9 +441,12 @@ bp = dev->priv; - if (!request_region (ioaddr, pdev ? PFI_K_CSR_IO_LEN : PI_ESIC_K_CSR_IO_LEN, DRV_NAME)) { - printk (KERN_ERR "%s: Cannot reserve I/O resource 0x%x @ 0x%lx, aborting\n", - DRV_NAME, PFI_K_CSR_IO_LEN, ioaddr); + if (!request_region(ioaddr, + pdev ? PFI_K_CSR_IO_LEN : PI_ESIC_K_CSR_IO_LEN, + print_name)) { + printk(KERN_ERR "%s: Cannot reserve I/O resource " + "0x%x @ 0x%lx, aborting\n", print_name, + pdev ? PFI_K_CSR_IO_LEN : PI_ESIC_K_CSR_IO_LEN, ioaddr); err = -EBUSY; goto err_out; } @@ -468,7 +475,7 @@ pci_set_master (pdev); } - if (dfx_driver_init(dev) != DFX_K_SUCCESS) { + if (dfx_driver_init(dev, print_name) != DFX_K_SUCCESS) { err = -ENODEV; goto err_out_region; } @@ -477,6 +484,7 @@ if (err) goto err_out_kfree; + printk("%s: registered as %s\n", print_name, dev->name); return 0; err_out_kfree: @@ -770,6 +778,7 @@ * * Arguments: * dev - pointer to device information + * print_name - printable device name * * Functional Description: * This function allocates additional resources such as the host memory @@ -792,7 +801,8 @@ * returning from this routine. */ -static int __devinit dfx_driver_init(struct net_device *dev) +static int __devinit dfx_driver_init(struct net_device *dev, + const char *print_name) { DFX_board_t *bp = dev->priv; int alloc_size; /* total buffer size needed */ @@ -841,26 +851,20 @@ /* Read the factory MAC address from the adapter then save it */ - if (dfx_hw_port_ctrl_req(bp, - PI_PCTRL_M_MLA, - PI_PDATA_A_MLA_K_LO, - 0, - &data) != DFX_K_SUCCESS) - { - printk("%s: Could not read adapter factory MAC address!\n", dev->name); + if (dfx_hw_port_ctrl_req(bp, PI_PCTRL_M_MLA, PI_PDATA_A_MLA_K_LO, 0, + &data) != DFX_K_SUCCESS) { + printk("%s: Could not read adapter factory MAC address!\n", + print_name); return(DFX_K_FAILURE); - } + } memcpy(&bp->factory_mac_addr[0], &data, sizeof(u32)); - if (dfx_hw_port_ctrl_req(bp, - PI_PCTRL_M_MLA, - PI_PDATA_A_MLA_K_HI, - 0, - &data) != DFX_K_SUCCESS) - { - printk("%s: Could not read adapter factory MAC address!\n", dev->name); + if (dfx_hw_port_ctrl_req(bp, PI_PCTRL_M_MLA, PI_PDATA_A_MLA_K_HI, 0, + &data) != DFX_K_SUCCESS) { + printk("%s: Could not read adapter factory MAC address!\n", + print_name); return(DFX_K_FAILURE); - } + } memcpy(&bp->factory_mac_addr[4], &data, sizeof(u16)); /* @@ -872,27 +876,19 @@ memcpy(dev->dev_addr, bp->factory_mac_addr, FDDI_K_ALEN); if (bp->bus_type == DFX_BUS_TYPE_EISA) - printk("%s: DEFEA at I/O addr = 0x%lX, IRQ = %d, Hardware addr = %02X-%02X-%02X-%02X-%02X-%02X\n", - dev->name, - dev->base_addr, - dev->irq, - dev->dev_addr[0], - dev->dev_addr[1], - dev->dev_addr[2], - dev->dev_addr[3], - dev->dev_addr[4], - dev->dev_addr[5]); + printk("%s: DEFEA at I/O addr = 0x%lX, IRQ = %d, " + "Hardware addr = %02X-%02X-%02X-%02X-%02X-%02X\n", + print_name, dev->base_addr, dev->irq, + dev->dev_addr[0], dev->dev_addr[1], + dev->dev_addr[2], dev->dev_addr[3], + dev->dev_addr[4], dev->dev_addr[5]); else - printk("%s: DEFPA at I/O addr = 0x%lX, IRQ = %d, Hardware addr = %02X-%02X-%02X-%02X-%02X-%02X\n", - dev->name, - dev->base_addr, - dev->irq, - dev->dev_addr[0], - dev->dev_addr[1], - dev->dev_addr[2], - dev->dev_addr[3], - dev->dev_addr[4], - dev->dev_addr[5]); + printk("%s: DEFPA at I/O addr = 0x%lX, IRQ = %d, " + "Hardware addr = %02X-%02X-%02X-%02X-%02X-%02X\n", + print_name, dev->base_addr, dev->irq, + dev->dev_addr[0], dev->dev_addr[1], + dev->dev_addr[2], dev->dev_addr[3], + dev->dev_addr[4], dev->dev_addr[5]); /* * Get memory for descriptor block, consumer block, and other buffers @@ -909,11 +905,11 @@ (PI_ALIGN_K_DESC_BLK - 1); bp->kmalloced = top_v = pci_alloc_consistent(bp->pci_dev, alloc_size, &bp->kmalloced_dma); - if (top_v == NULL) - { - printk("%s: Could not allocate memory for host buffers and structures!\n", dev->name); + if (top_v == NULL) { + printk("%s: Could not allocate memory for host buffers " + "and structures!\n", print_name); return(DFX_K_FAILURE); - } + } memset(top_v, 0, alloc_size); /* zero out memory before continuing */ top_p = bp->kmalloced_dma; /* get physical address of buffer */ @@ -970,14 +966,20 @@ /* Display virtual and physical addresses if debug driver */ - DBG_printk("%s: Descriptor block virt = %0lX, phys = %0X\n", dev->name, (long)bp->descr_block_virt, bp->descr_block_phys); - DBG_printk("%s: Command Request buffer virt = %0lX, phys = %0X\n", dev->name, (long)bp->cmd_req_virt, bp->cmd_req_phys); - DBG_printk("%s: Command Response buffer virt = %0lX, phys = %0X\n", dev->name, (long)bp->cmd_rsp_virt, bp->cmd_rsp_phys); - DBG_printk("%s: Receive buffer block virt = %0lX, phys = %0X\n", dev->name, (long)bp->rcv_block_virt, bp->rcv_block_phys); - DBG_printk("%s: Consumer block virt = %0lX, phys = %0X\n", dev->name, (long)bp->cons_block_virt, bp->cons_block_phys); + DBG_printk("%s: Descriptor block virt = %0lX, phys = %0X\n", + print_name, + (long)bp->descr_block_virt, bp->descr_block_phys); + DBG_printk("%s: Command Request buffer virt = %0lX, phys = %0X\n", + print_name, (long)bp->cmd_req_virt, bp->cmd_req_phys); + DBG_printk("%s: Command Response buffer virt = %0lX, phys = %0X\n", + print_name, (long)bp->cmd_rsp_virt, bp->cmd_rsp_phys); + DBG_printk("%s: Receive buffer block virt = %0lX, phys = %0X\n", + print_name, (long)bp->rcv_block_virt, bp->rcv_block_phys); + DBG_printk("%s: Consumer block virt = %0lX, phys = %0X\n", + print_name, (long)bp->cons_block_virt, bp->cons_block_phys); return(DFX_K_SUCCESS); - } +} /* @@ -2668,12 +2670,12 @@ static void my_skb_align(struct sk_buff *skb, int n) { - unsigned long x=(unsigned long)skb->data; + unsigned long x = (unsigned long)skb->data; unsigned long v; - v=(x+n-1)&~(n-1); /* Where we want to be */ + v = ALIGN(x, n); /* Where we want to be */ - skb_reserve(skb, v-x); + skb_reserve(skb, v - x); } @@ -3428,11 +3430,6 @@ { int rc_pci, rc_eisa; -/* when a module, this is printed whether or not devices are found in probe */ -#ifdef MODULE - printk(version); -#endif - rc_pci = pci_module_init(&dfx_driver); if (rc_pci >= 0) dfx_have_pci = 1; @@ -3453,6 +3450,9 @@ module_init(dfx_init); module_exit(dfx_cleanup); +MODULE_AUTHOR("Lawrence V. Stefani"); +MODULE_DESCRIPTION("DEC FDDIcontroller EISA/PCI (DEFEA/DEFPA) driver " + DRV_VERSION " " DRV_RELDATE); MODULE_LICENSE("GPL"); diff -Nru a/drivers/net/defxx.h b/drivers/net/defxx.h --- a/drivers/net/defxx.h 2004-10-25 03:39:21 -04:00 +++ b/drivers/net/defxx.h 2004-10-25 03:39:21 -04:00 @@ -16,7 +16,7 @@ * LVS Lawrence V. Stefani * * Maintainers: - * macro Maciej W. Rozycki + * macro Maciej W. Rozycki * * Modification History: * Date Name Description diff -Nru a/drivers/net/e100.c b/drivers/net/e100.c --- a/drivers/net/e100.c 2004-10-25 03:39:21 -04:00 +++ b/drivers/net/e100.c 2004-10-25 03:39:21 -04:00 @@ -154,8 +154,8 @@ #define DRV_NAME "e100" -#define DRV_EXT "-NAPI" -#define DRV_VERSION "3.0.27-k2"DRV_EXT +#define DRV_EXT "-NAPI" +#define DRV_VERSION "3.2.3-k2"DRV_EXT #define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver" #define DRV_COPYRIGHT "Copyright(c) 1999-2004 Intel Corporation" #define PFX DRV_NAME ": " @@ -574,13 +574,21 @@ static inline void e100_enable_irq(struct nic *nic) { + unsigned long flags; + + spin_lock_irqsave(&nic->cmd_lock, flags); writeb(irq_mask_none, &nic->csr->scb.cmd_hi); + spin_unlock_irqrestore(&nic->cmd_lock, flags); e100_write_flush(nic); } static inline void e100_disable_irq(struct nic *nic) { + unsigned long flags; + + spin_lock_irqsave(&nic->cmd_lock, flags); writeb(irq_mask_all, &nic->csr->scb.cmd_hi); + spin_unlock_irqrestore(&nic->cmd_lock, flags); e100_write_flush(nic); } @@ -595,16 +603,6 @@ writel(software_reset, &nic->csr->port); e100_write_flush(nic); udelay(20); - /* TCO workaround - 82559 and greater */ - if(nic->mac >= mac_82559_D101M) { - /* Issue a redundant CU load base without setting - * general pointer, and without waiting for scb to - * clear. This gets us into post-driver. Finally, - * wait 20 msec for reset to take effect. */ - writeb(cuc_load_base, &nic->csr->scb.cmd_lo); - mdelay(20); - } - /* Mask off our interrupt line - it's unmasked after reset */ e100_disable_irq(nic); } @@ -1253,8 +1251,13 @@ mii_check_link(&nic->mii); /* Software generated interrupt to recover from (rare) Rx - * allocation failure */ - writeb(irq_sw_gen, &nic->csr->scb.cmd_hi); + * allocation failure. + * Unfortunately have to use a spinlock to not re-enable interrupts + * accidentally, due to hardware that shares a register between the + * interrupt mask bit and the SW Interrupt generation bit */ + spin_lock_irq(&nic->cmd_lock); + writeb(readb(&nic->csr->scb.cmd_hi) | irq_sw_gen,&nic->csr->scb.cmd_hi); + spin_unlock_irq(&nic->cmd_lock); e100_write_flush(nic); e100_update_stats(nic); @@ -1304,6 +1307,7 @@ switch(err) { case -ENOSPC: /* We queued the skb, but now we're out of space. */ + DPRINTK(TX_ERR, DEBUG, "No space for CB\n"); netif_stop_queue(netdev); break; case -ENOMEM: @@ -1424,14 +1428,12 @@ #define RFD_BUF_LEN (sizeof(struct rfd) + VLAN_ETH_FRAME_LEN) static inline int e100_rx_alloc_skb(struct nic *nic, struct rx *rx) { - unsigned int rx_offset = 2; /* u32 align protocol headers */ - - if(!(rx->skb = dev_alloc_skb(RFD_BUF_LEN + rx_offset))) + if(!(rx->skb = dev_alloc_skb(RFD_BUF_LEN + NET_IP_ALIGN))) return -ENOMEM; /* Align, init, and map the RFD. */ rx->skb->dev = nic->netdev; - skb_reserve(rx->skb, rx_offset); + skb_reserve(rx->skb, NET_IP_ALIGN); memcpy(rx->skb->data, &nic->blank_rfd, sizeof(struct rfd)); rx->dma_addr = pci_map_single(nic->pdev, rx->skb->data, RFD_BUF_LEN, PCI_DMA_BIDIRECTIONAL); @@ -1470,7 +1472,7 @@ /* If data isn't ready, nothing to indicate */ if(unlikely(!(rfd_status & cb_complete))) - return -EAGAIN; + return -EAGAIN; /* Get actual data size */ actual_size = le16_to_cpu(rfd->actual_size) & 0x3FFF; @@ -1762,7 +1764,7 @@ if(memcmp(nic->rx_to_clean->skb->data + sizeof(struct rfd), skb->data, ETH_DATA_LEN)) - err = -EAGAIN; + err = -EAGAIN; err_loopback_none: mdio_write(nic->netdev, nic->mii.phy_id, MII_BMCR, 0); @@ -1955,12 +1957,17 @@ struct param_range *rfds = &nic->params.rfds; struct param_range *cbs = &nic->params.cbs; + if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) + return -EINVAL; + if(netif_running(netdev)) e100_down(nic); rfds->count = max(ring->rx_pending, rfds->min); rfds->count = min(rfds->count, rfds->max); cbs->count = max(ring->tx_pending, cbs->min); cbs->count = min(cbs->count, cbs->max); + DPRINTK(DRV, INFO, "Ring Param settings: rx: %d, tx %d\n", + rfds->count, cbs->count); if(netif_running(netdev)) e100_up(nic); @@ -2172,6 +2179,7 @@ #ifdef CONFIG_NET_POLL_CONTROLLER netdev->poll_controller = e100_netpoll; #endif + strcpy(netdev->name, pci_name(pdev)); nic = netdev_priv(netdev); nic->netdev = netdev; @@ -2255,6 +2263,7 @@ pci_enable_wake(pdev, 0, nic->flags & (wol_magic | e100_asf(nic))); + strcpy(netdev->name, "eth%d"); if((err = register_netdev(netdev))) { DPRINTK(PROBE, ERR, "Cannot register net device, aborting.\n"); goto err_out_free; @@ -2351,7 +2360,7 @@ printk(KERN_INFO PFX "%s, %s\n", DRV_DESCRIPTION, DRV_VERSION); printk(KERN_INFO PFX "%s\n", DRV_COPYRIGHT); } - return pci_module_init(&e100_driver); + return pci_module_init(&e100_driver); } static void __exit e100_cleanup_module(void) diff -Nru a/drivers/net/ibmlana.c b/drivers/net/ibmlana.c --- a/drivers/net/ibmlana.c 2004-10-25 03:39:21 -04:00 +++ b/drivers/net/ibmlana.c 2004-10-25 03:39:21 -04:00 @@ -885,14 +885,6 @@ return &priv->stat; } -/* we don't support runtime reconfiguration, since am MCA card can - be unambigously identified by its POS registers. */ - -static int ibmlana_config(struct net_device *dev, struct ifmap *map) -{ - return 0; -} - /* switch receiver mode. */ static void ibmlana_set_multicast_list(struct net_device *dev) @@ -984,7 +976,6 @@ dev->open = ibmlana_open; dev->stop = ibmlana_close; - dev->set_config = ibmlana_config; dev->hard_start_xmit = ibmlana_tx; dev->do_ioctl = NULL; dev->get_stats = ibmlana_stats; diff -Nru a/drivers/net/meth.c b/drivers/net/meth.c --- a/drivers/net/meth.c 2004-10-25 03:39:21 -04:00 +++ b/drivers/net/meth.c 2004-10-25 03:39:21 -04:00 @@ -368,31 +368,6 @@ } /* - * Configuration changes (passed on by ifconfig) - */ -static int meth_config(struct net_device *dev, struct ifmap *map) -{ - if (dev->flags & IFF_UP) /* can't act on a running interface */ - return -EBUSY; - - /* Don't allow changing the I/O address */ - if (map->base_addr != dev->base_addr) { - printk(KERN_WARNING "meth: Can't change I/O address\n"); - return -EOPNOTSUPP; - } - - /* Don't allow changing the IRQ */ - if (map->irq != dev->irq) { - printk(KERN_WARNING "meth: Can't change IRQ\n"); - return -EOPNOTSUPP; - } - DPRINTK("Configured\n"); - - /* ignore other fields */ - return 0; -} - -/* * Receive a packet: retrieve, encapsulate and pass over to upper levels */ static void meth_rx(struct net_device* dev, unsigned long int_status) @@ -813,7 +788,6 @@ dev->open = meth_open; dev->stop = meth_release; - dev->set_config = meth_config; dev->hard_start_xmit = meth_tx; dev->do_ioctl = meth_ioctl; dev->get_stats = meth_stats; diff -Nru a/drivers/net/sk_mca.c b/drivers/net/sk_mca.c --- a/drivers/net/sk_mca.c 2004-10-25 03:39:21 -04:00 +++ b/drivers/net/sk_mca.c 2004-10-25 03:39:21 -04:00 @@ -972,14 +972,6 @@ return &(priv->stat); } -/* we don't support runtime reconfiguration, since an MCA card can - be unambigously identified by its POS registers. */ - -static int skmca_config(struct net_device *dev, struct ifmap *map) -{ - return 0; -} - /* switch receiver mode. We use the LANCE's multicast filter to prefilter multicast addresses. */ @@ -1147,7 +1139,6 @@ /* set methods */ dev->open = skmca_open; dev->stop = skmca_close; - dev->set_config = skmca_config; dev->hard_start_xmit = skmca_tx; dev->do_ioctl = NULL; dev->get_stats = skmca_stats; diff -Nru a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c --- a/drivers/net/wan/lmc/lmc_main.c 2004-10-25 03:39:21 -04:00 +++ b/drivers/net/wan/lmc/lmc_main.c 2004-10-25 03:39:21 -04:00 @@ -101,7 +101,6 @@ static int lmc_close(struct net_device *dev); static struct net_device_stats *lmc_get_stats(struct net_device *dev); static irqreturn_t lmc_interrupt(int irq, void *dev_instance, struct pt_regs *regs); -static int lmc_set_config(struct net_device *dev, struct ifmap *map); static void lmc_initcsrs(lmc_softc_t * const sc, lmc_csrptr_t csr_base, size_t csr_size); static void lmc_softreset(lmc_softc_t * const); static void lmc_running_reset(struct net_device *dev); @@ -814,7 +813,6 @@ dev->stop = lmc_close; dev->get_stats = lmc_get_stats; dev->do_ioctl = lmc_ioctl; - dev->set_config = lmc_set_config; dev->tx_timeout = lmc_driver_timeout; dev->watchdog_timeo = (HZ); /* 1 second */ @@ -1973,13 +1971,6 @@ LMC_CSR_WRITE (sc, csr_txlist, virt_to_bus (sc->lmc_txring)); lmc_trace(sc->lmc_device, "lmc_softreset out"); -} - -static int lmc_set_config(struct net_device *dev, struct ifmap *map) /*fold00*/ -{ - lmc_trace(dev, "lmc_set_config in"); - lmc_trace(dev, "lmc_set_config out"); - return -EOPNOTSUPP; } void lmc_gpio_mkinput(lmc_softc_t * const sc, u_int32_t bits) /*fold00*/ diff -Nru a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c --- a/drivers/net/wireless/netwave_cs.c 2004-10-25 03:39:21 -04:00 +++ b/drivers/net/wireless/netwave_cs.c 2004-10-25 03:39:21 -04:00 @@ -219,7 +219,6 @@ /* Misc device stuff */ static int netwave_open(struct net_device *dev); /* Open the device */ static int netwave_close(struct net_device *dev); /* Close the device */ -static int netwave_config(struct net_device *dev, struct ifmap *map); /* Packet transmission and Packet reception */ static int netwave_start_xmit( struct sk_buff *skb, struct net_device *dev); @@ -482,7 +481,6 @@ /* Netwave specific entries in the device structure */ SET_MODULE_OWNER(dev); dev->hard_start_xmit = &netwave_start_xmit; - dev->set_config = &netwave_config; dev->get_stats = &netwave_get_stats; dev->set_multicast_list = &set_multicast_list; /* wireless extensions */ @@ -1286,16 +1284,6 @@ /* Set the IENA bit in COR */ wait_WOC(iobase); outb(corConfIENA + corConfLVLREQ, iobase + NETWAVE_REG_COR); -} - -/* - * Function netwave_config (dev, map) - * - * Configure device, this work is done by netwave_pcmcia_config when a - * card is inserted - */ -static int netwave_config(struct net_device *dev, struct ifmap *map) { - return 0; } /* From chas@cmf.nrl.navy.mil Mon Oct 25 04:57:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 04:57:29 -0700 (PDT) Received: from ginger.cmf.nrl.navy.mil (ginger.cmf.nrl.navy.mil [134.207.10.161]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PBvM5I028654 for ; Mon, 25 Oct 2004 04:57:23 -0700 Received: from cmf.nrl.navy.mil (thirdoffive.cmf.nrl.navy.mil [134.207.10.180]) by ginger.cmf.nrl.navy.mil (8.12.11/8.12.11) with ESMTP id i9PBuwV6016648 for ; Mon, 25 Oct 2004 07:56:59 -0400 (EDT) Message-Id: <200410251156.i9PBuwV6016648@ginger.cmf.nrl.navy.mil> To: netdev@oss.sgi.com Subject: how about the following to elminate pci_find_device() in fore200e? Date: Mon, 25 Oct 2004 07:56:59 -0400 From: "chas williams (contractor)" X-Virus-Scanned: NAI Completed X-Scanned-By: MIMEDefang 2.30 (www . roaringpenguin . com / mimedefang) X-archive-position: 10796 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chas@cmf.nrl.navy.mil Precedence: bulk X-list: netdev Content-Length: 6319 Lines: 228 we need to keep the linked list around for the sbus devices. there doesnt seem to be something similar to pci_module_init() for sbus devices. ===== drivers/atm/fore200e.c 1.30 vs edited ===== --- 1.30/drivers/atm/fore200e.c 2004-07-29 18:27:53 -04:00 +++ edited/drivers/atm/fore200e.c 2004-10-24 22:12:20 -04:00 @@ -113,7 +113,7 @@ static const struct atmdev_ops fore200e_ops; static const struct fore200e_bus fore200e_bus[]; -static struct fore200e* fore200e_boards = NULL; +LIST_HEAD(fore200e_boards); MODULE_AUTHOR("Christophe Lizzi - credits to Uwe Dannowski and Heikki Vatiainen"); @@ -636,39 +636,6 @@ } -static struct fore200e* __init -fore200e_pca_detect(const struct fore200e_bus* bus, int index) -{ - struct fore200e* fore200e; - struct pci_dev* pci_dev = NULL; - int count = index; - - do { - pci_dev = pci_find_device(PCI_VENDOR_ID_FORE, PCI_DEVICE_ID_FORE_PCA200E, pci_dev); - if (pci_dev == NULL) - return NULL; - } while (count--); - - if (pci_enable_device(pci_dev)) - return NULL; - - fore200e = fore200e_kmalloc(sizeof(struct fore200e), GFP_KERNEL); - if (fore200e == NULL) - return NULL; - - fore200e->bus = bus; - fore200e->bus_dev = pci_dev; - fore200e->irq = pci_dev->irq; - fore200e->phys_base = pci_resource_start(pci_dev, 0); - - sprintf(fore200e->name, "%s-%d", bus->model_name, index - 1); - - pci_set_master(pci_dev); - - return fore200e; -} - - static int __init fore200e_pca_prom_read(struct fore200e* fore200e, struct prom_data* prom) { @@ -2770,20 +2737,105 @@ return 0; } + +static int __devinit +fore200e_pca_detect(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent) +{ + const struct fore200e_bus* bus = (struct fore200e_bus*) pci_ent->driver_data; + struct fore200e* fore200e; + int err = 0; + static int index = 0; + + if (pci_enable_device(pci_dev)) { + err = -EINVAL; + goto out; + } + + fore200e = fore200e_kmalloc(sizeof(struct fore200e), GFP_KERNEL); + if (fore200e == NULL) { + err = -ENOMEM; + goto out_disable; + } + + fore200e->bus = bus; + fore200e->bus_dev = pci_dev; + fore200e->irq = pci_dev->irq; + fore200e->phys_base = pci_resource_start(pci_dev, 0); + + sprintf(fore200e->name, "%s-%d", bus->model_name, index - 1); + + pci_set_master(pci_dev); + + printk(FORE200E "device %s found at 0x%lx, IRQ %s\n", + fore200e->bus->model_name, + fore200e->phys_base, fore200e_irq_itoa(fore200e->irq)); + + sprintf(fore200e->name, "%s-%d", bus->model_name, index); + + err = fore200e_init(fore200e); + if (err < 0) { + fore200e_shutdown(fore200e); + goto out_free; + } + + ++index; + pci_set_drvdata(pci_dev, fore200e); + +out: + return err; + +out_free: + kfree(fore200e); +out_disable: + pci_disable_device(pci_dev); + goto out; +} + + +static void __devexit fore200e_pca_remove_one(struct pci_dev *pci_dev) +{ + struct fore200e *fore200e; + + fore200e = pci_get_drvdata(pci_dev); + + list_del(&fore200e->entry); + + fore200e_shutdown(fore200e); + kfree(fore200e); + pci_disable_device(pci_dev); +} + + +#ifdef CONFIG_ATM_FORE200E_PCA +static struct pci_device_id fore200e_pca_tbl[] = { + { PCI_VENDOR_ID_FORE, PCI_DEVICE_ID_FORE_PCA200E, PCI_ANY_ID, PCI_ANY_ID, + 0, 0, (unsigned long) &fore200e_bus[0] }, + { 0, } +}; + +static struct pci_driver fore200e_pca_driver = { + .name = "fore_200e", + .probe = fore200e_pca_detect, + .remove = __devexit_p(fore200e_pca_remove_one), + .id_table = fore200e_pca_tbl, +}; +#endif + + static int __init fore200e_module_init(void) { const struct fore200e_bus* bus; struct fore200e* fore200e; - int index, link; + int index; printk(FORE200E "FORE Systems 200E-series ATM driver - version " FORE200E_VERSION "\n"); /* for each configured bus interface */ - for (link = 0, bus = fore200e_bus; bus->model_name; bus++) { + for (bus = fore200e_bus; bus->model_name; bus++) { /* detect all boards present on that bus */ - for (index = 0; (fore200e = bus->detect(bus, index)); index++) { + for (index = 0; bus->detect && (fore200e = bus->detect(bus, index)); index++) { printk(FORE200E "device %s found at 0x%lx, IRQ %s\n", fore200e->bus->model_name, @@ -2797,15 +2849,18 @@ break; } - link++; - - fore200e->next = fore200e_boards; - fore200e_boards = fore200e; + list_add(&fore200e->entry, &fore200e_boards); } } - if (link) - return 0; +#ifdef CONFIG_ATM_FORE200E_PCA + if (!pci_module_init(&fore200e_pca_driver)) + return 0; +#endif + + if (!list_empty(&fore200e_boards)) + return 0; + return -ENODEV; } @@ -2813,11 +2868,14 @@ static void __exit fore200e_module_cleanup(void) { - while (fore200e_boards) { - struct fore200e* fore200e = fore200e_boards; + struct fore200e* fore200e; + +#ifdef CONFIG_ATM_FORE200E_PCA + pci_unregister_driver(&fore200e_pca_driver); +#endif + list_for_each_entry(fore200e, &fore200e_boards, entry) { fore200e_shutdown(fore200e); - fore200e_boards = fore200e->next; kfree(fore200e); } DPRINTK(1, "module being removed\n"); @@ -3152,7 +3210,7 @@ fore200e_pca_dma_sync_for_device, fore200e_pca_dma_chunk_alloc, fore200e_pca_dma_chunk_free, - fore200e_pca_detect, + NULL, fore200e_pca_configure, fore200e_pca_map, fore200e_pca_reset, ===== drivers/atm/fore200e.h 1.8 vs edited ===== --- 1.8/drivers/atm/fore200e.h 2004-10-04 18:02:35 -04:00 +++ edited/drivers/atm/fore200e.h 2004-10-23 08:36:57 -04:00 @@ -841,7 +841,7 @@ /* per-device data */ typedef struct fore200e { - struct fore200e* next; /* next device */ + struct list_head entry; /* next device */ const struct fore200e_bus* bus; /* bus-dependent code and data */ union fore200e_regs regs; /* bus-dependent registers */ struct atm_dev* atm_dev; /* ATM device */ From linux-netdev@gmane.org Mon Oct 25 05:31:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 05:31:34 -0700 (PDT) Received: from main.gmane.org (main.gmane.org [80.91.229.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PCVRG2025462 for ; Mon, 25 Oct 2004 05:31:28 -0700 Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1CM40F-00005Q-00 for ; Mon, 25 Oct 2004 14:31:11 +0200 Received: from 209.13.232.208 ([209.13.232.208]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Oct 2004 14:31:11 +0200 Received: from javier by 209.13.232.208 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 Oct 2004 14:31:11 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: netdev@oss.sgi.com From: Javier Szyszlican Subject: Outbound IPIP Tunnel Packets not shaped/policed Date: Mon, 25 Oct 2004 09:24:15 -0300 Message-ID: <417CF06F.8090203@szysz.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 209.13.232.208 User-Agent: Mozilla Thunderbird 0.8 (X11/20040919) X-Accept-Language: en-us, en X-Enigmail-Version: 0.86.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime X-archive-position: 10797 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: javier@szysz.com Precedence: bulk X-list: netdev Content-Length: 1682 Lines: 58 Hi, I've a gateway host (cali), connected to the Internet via ADSL and a PPTP tunnel (ppp0). I also have a IPIP tunnel to another host over the Internet (mytun), nothing fancy. This is working perfectly. But I want to give more priority to the IPIP packets coming OUT of the PPP (PPTP connection) interface. And I can't get this to work. Class 2:21 is the one with high priority. FILTERS: filter parent 2: protocol ip pref 1 fw filter parent 2: protocol ip pref 1 fw handle 0x1 classid 2:21 CLASS Stats: class htb 2:21 parent 2:1 prio 1 rate 96Kbit ceil 128Kbit burst 1721b cburst 1762b Sent 0 bytes 0 pkts (dropped 0, overlimits 0) lended: 0 borrowed: 0 giants: 0 tokens: 218962 ctokens: 168131 As you can see no packets have gone out of this class. IPTABLES RULES (mangle table): Chain OUTPUT (policy ACCEPT 794K packets, 111M bytes) pkts bytes target prot opt in out source destination 4984 377K mark.4 4 -- * * 0.0.0.0/0 0.0.0.0/0 Chain mark.4 (1 references) pkts bytes target prot opt in out source destination 4984 377K MARK all -- * * 0.0.0.0/0 0.0.0.0/0 MARK set 0x1 But you can see that iptables is marking the packets correctly (the counters were reset at the same time). So, I'm guessing that the IPIP packets generated by the kernel, are not going into the packet scheduling routines/functions. If someone can point me to the place where this should be occurring, it will be great. I'm using Kernel 2.6.9 (2.6.8 did the same thing). Thanks. Javier -- -=-=-=-=-=-=-=-=- Javier Szyszlican javier@^^^^^.com From herbert@gondor.apana.org.au Mon Oct 25 05:36:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 05:36:50 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PCadlm025842 for ; Mon, 25 Oct 2004 05:36:40 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CM44E-0003bk-00; Mon, 25 Oct 2004 22:35:18 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CM443-00018y-00; Mon, 25 Oct 2004 22:35:07 +1000 Date: Mon, 25 Oct 2004 22:35:07 +1000 To: "David S. Miller" , James Morris , netdev@oss.sgi.com Subject: [NET] Give skb_checksum_help an sk_buff * again Message-ID: <20041025123507.GA4346@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="SUOF0GtieIMvvwua" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10798 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 14840 Lines: 472 --SUOF0GtieIMvvwua Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi: Since skb_checksum_help has been using pskb_expand_head for a while now without any ill effects, I thought it would be a good idea to remove the double pointers from it and its callers. This is what the following patch does. The only "rider" bit is the removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding assignment was only added because the following function oopsed so there is no point in doing BUG_ON. Signed-off-by: Herbert Xu Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --SUOF0GtieIMvvwua Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== include/linux/netdevice.h 1.89 vs edited ===== --- 1.89/include/linux/netdevice.h 2004-10-21 09:57:03 +10:00 +++ edited/include/linux/netdevice.h 2004-10-25 18:10:13 +10:00 @@ -937,7 +937,7 @@ extern unsigned long netdev_fc_xoff; extern atomic_t netdev_dropping; extern int netdev_set_master(struct net_device *dev, struct net_device *master); -extern int skb_checksum_help(struct sk_buff **pskb, int inward); +extern int skb_checksum_help(struct sk_buff *skb, int inward); #ifdef CONFIG_SYSCTL extern char *net_sysctl_strdup(const char *s); ===== include/net/dst.h 1.23 vs edited ===== --- 1.23/include/net/dst.h 2004-10-22 14:49:18 +10:00 +++ edited/include/net/dst.h 2004-10-25 18:10:14 +10:00 @@ -67,7 +67,7 @@ struct xfrm_state *xfrm; int (*input)(struct sk_buff*); - int (*output)(struct sk_buff**); + int (*output)(struct sk_buff*); #ifdef CONFIG_NET_CLS_ROUTE __u32 tclassid; @@ -222,7 +222,7 @@ int err; for (;;) { - err = skb->dst->output(&skb); + err = skb->dst->output(skb); if (likely(err == 0)) return err; ===== include/net/ip.h 1.34 vs edited ===== --- 1.34/include/net/ip.h 2004-08-30 14:10:09 +10:00 +++ edited/include/net/ip.h 2004-10-25 18:10:14 +10:00 @@ -89,8 +89,8 @@ struct packet_type *pt); extern int ip_local_deliver(struct sk_buff *skb); extern int ip_mr_input(struct sk_buff *skb); -extern int ip_output(struct sk_buff **pskb); -extern int ip_mc_output(struct sk_buff **pskb); +extern int ip_output(struct sk_buff *skb); +extern int ip_mc_output(struct sk_buff *skb); extern int ip_fragment(struct sk_buff *skb, int (*out)(struct sk_buff*)); extern int ip_do_nat(struct sk_buff *skb); extern void ip_send_check(struct iphdr *ip); ===== include/net/ip6_route.h 1.19 vs edited ===== --- 1.19/include/net/ip6_route.h 2004-09-15 07:03:30 +10:00 +++ edited/include/net/ip6_route.h 2004-10-25 18:10:14 +10:00 @@ -70,7 +70,7 @@ extern struct dst_entry *ndisc_dst_alloc(struct net_device *dev, struct neighbour *neigh, struct in6_addr *addr, - int (*output)(struct sk_buff **)); + int (*output)(struct sk_buff *)); extern int ndisc_dst_gc(int *more); extern void fib6_force_start_gc(void); ===== include/net/ipv6.h 1.39 vs edited ===== --- 1.39/include/net/ipv6.h 2004-09-08 16:32:57 +10:00 +++ edited/include/net/ipv6.h 2004-10-25 18:10:14 +10:00 @@ -355,7 +355,7 @@ * skb processing functions */ -extern int ip6_output(struct sk_buff **pskb); +extern int ip6_output(struct sk_buff *skb); extern int ip6_forward(struct sk_buff *skb); extern int ip6_input(struct sk_buff *skb); extern int ip6_mc_input(struct sk_buff *skb); ===== include/net/xfrm.h 1.69 vs edited ===== --- 1.69/include/net/xfrm.h 2004-10-21 14:47:36 +10:00 +++ edited/include/net/xfrm.h 2004-10-25 18:10:14 +10:00 @@ -815,7 +815,7 @@ extern int xfrm_check_selectors(struct xfrm_state **x, int n, struct flowi *fl); extern int xfrm_state_check(struct xfrm_state *x, struct sk_buff *skb); extern int xfrm4_rcv(struct sk_buff *skb); -extern int xfrm4_output(struct sk_buff **pskb); +extern int xfrm4_output(struct sk_buff *skb); extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler); extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler); extern int xfrm6_rcv_spi(struct sk_buff **pskb, unsigned int *nhoffp, u32 spi); @@ -825,7 +825,7 @@ extern u32 xfrm6_tunnel_alloc_spi(xfrm_address_t *saddr); extern void xfrm6_tunnel_free_spi(xfrm_address_t *saddr); extern u32 xfrm6_tunnel_spi_lookup(xfrm_address_t *saddr); -extern int xfrm6_output(struct sk_buff **pskb); +extern int xfrm6_output(struct sk_buff *skb); #ifdef CONFIG_XFRM extern int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type); ===== net/bridge/br_netfilter.c 1.26 vs edited ===== --- 1.26/net/bridge/br_netfilter.c 2004-10-06 07:51:01 +10:00 +++ edited/net/bridge/br_netfilter.c 2004-10-25 18:10:14 +10:00 @@ -197,7 +197,7 @@ skb_pull(skb, VLAN_HLEN); skb->nh.raw += VLAN_HLEN; } - skb->dst->output(&skb); + skb->dst->output(skb); return 0; } ===== net/core/dev.c 1.167 vs edited ===== --- 1.167/net/core/dev.c 2004-10-21 14:42:00 +10:00 +++ edited/net/core/dev.c 2004-10-25 18:10:15 +10:00 @@ -1106,34 +1106,34 @@ * Invalidate hardware checksum when packet is to be mangled, and * complete checksum manually on outgoing path. */ -int skb_checksum_help(struct sk_buff **pskb, int inward) +int skb_checksum_help(struct sk_buff *skb, int inward) { unsigned int csum; - int ret = 0, offset = (*pskb)->h.raw - (*pskb)->data; + int ret = 0, offset = skb->h.raw - skb->data; if (inward) { - (*pskb)->ip_summed = CHECKSUM_NONE; + skb->ip_summed = CHECKSUM_NONE; goto out; } - if (skb_cloned(*pskb)) { - ret = pskb_expand_head(*pskb, 0, 0, GFP_ATOMIC); + if (skb_cloned(skb)) { + ret = pskb_expand_head(skb, 0, 0, GFP_ATOMIC); if (ret) goto out; } - if (offset > (int)(*pskb)->len) + if (offset > (int)skb->len) BUG(); - csum = skb_checksum(*pskb, offset, (*pskb)->len-offset, 0); + csum = skb_checksum(skb, offset, skb->len-offset, 0); - offset = (*pskb)->tail - (*pskb)->h.raw; + offset = skb->tail - skb->h.raw; if (offset <= 0) BUG(); - if ((*pskb)->csum + 2 > offset) + if (skb->csum + 2 > offset) BUG(); - *(u16*)((*pskb)->h.raw + (*pskb)->csum) = csum_fold(csum); - (*pskb)->ip_summed = CHECKSUM_NONE; + *(u16*)(skb->h.raw + skb->csum) = csum_fold(csum); + skb->ip_summed = CHECKSUM_NONE; out: return ret; } @@ -1282,7 +1282,7 @@ (!(dev->features & (NETIF_F_HW_CSUM | NETIF_F_NO_CSUM)) && (!(dev->features & NETIF_F_IP_CSUM) || skb->protocol != htons(ETH_P_IP)))) - if (skb_checksum_help(&skb, 0)) + if (skb_checksum_help(skb, 0)) goto out_kfree_skb; ===== net/core/dst.c 1.22 vs edited ===== --- 1.22/net/core/dst.c 2004-10-22 14:49:18 +10:00 +++ edited/net/core/dst.c 2004-10-25 21:29:09 +10:00 @@ -106,9 +106,9 @@ return 0; } -static int dst_discard_out(struct sk_buff **pskb) +static int dst_discard_out(struct sk_buff *skb) { - kfree_skb(*pskb); + kfree_skb(skb); return 0; } ===== net/decnet/dn_route.c 1.25 vs edited ===== --- 1.25/net/decnet/dn_route.c 2004-09-24 09:51:55 +10:00 +++ edited/net/decnet/dn_route.c 2004-10-25 21:57:33 +10:00 @@ -683,9 +683,8 @@ return NET_RX_DROP; } -static int dn_output(struct sk_buff **pskb) +static int dn_output(struct sk_buff *skb) { - struct sk_buff *skb = *pskb; struct dst_entry *dst = skb->dst; struct dn_route *rt = (struct dn_route *)dst; struct net_device *dev = dst->dev; @@ -796,11 +795,6 @@ return NET_RX_BAD; } -static int dn_rt_bug_out(struct sk_buff **pskb) -{ - return dn_rt_bug(*pskb); -} - static int dn_rt_set_next_hop(struct dn_route *rt, struct dn_fib_res *res) { struct dn_fib_info *fi = res->fi; @@ -1392,7 +1386,7 @@ rt->u.dst.neighbour = neigh; rt->u.dst.dev = out_dev; rt->u.dst.lastuse = jiffies; - rt->u.dst.output = dn_rt_bug_out; + rt->u.dst.output = dn_rt_bug; switch(res.type) { case RTN_UNICAST: rt->u.dst.input = dn_forward; ===== net/ipv4/ip_output.c 1.70 vs edited ===== --- 1.70/net/ipv4/ip_output.c 2004-10-01 13:56:45 +10:00 +++ edited/net/ipv4/ip_output.c 2004-10-25 21:30:21 +10:00 @@ -224,9 +224,8 @@ ip_finish_output2); } -int ip_mc_output(struct sk_buff **pskb) +int ip_mc_output(struct sk_buff *skb) { - struct sk_buff *skb = *pskb; struct sock *sk = skb->sk; struct rtable *rt = (struct rtable*)skb->dst; struct net_device *dev = rt->u.dst.dev; @@ -285,10 +284,8 @@ return ip_finish_output(skb); } -int ip_output(struct sk_buff **pskb) +int ip_output(struct sk_buff *skb) { - struct sk_buff *skb = *pskb; - IP_INC_STATS(IPSTATS_MIB_OUTREQUESTS); if ((skb->len > dst_pmtu(skb->dst) || skb_shinfo(skb)->frag_list) && ===== net/ipv4/route.c 1.95 vs edited ===== --- 1.95/net/ipv4/route.c 2004-10-20 18:37:15 +10:00 +++ edited/net/ipv4/route.c 2004-10-25 21:32:32 +10:00 @@ -1367,10 +1367,8 @@ dst_set_expires(&rt->u.dst, 0); } -static int ip_rt_bug(struct sk_buff **pskb) +static int ip_rt_bug(struct sk_buff *skb) { - struct sk_buff *skb = *pskb; - printk(KERN_DEBUG "ip_rt_bug: %u.%u.%u.%u -> %u.%u.%u.%u, %s\n", NIPQUAD(skb->nh.iph->saddr), NIPQUAD(skb->nh.iph->daddr), skb->dev ? skb->dev->name : "?"); ===== net/ipv4/xfrm4_output.c 1.4 vs edited ===== --- 1.4/net/ipv4/xfrm4_output.c 2004-08-25 04:30:14 +10:00 +++ edited/net/ipv4/xfrm4_output.c 2004-10-25 21:30:04 +10:00 @@ -91,16 +91,14 @@ return ret; } -int xfrm4_output(struct sk_buff **pskb) +int xfrm4_output(struct sk_buff *skb) { - struct sk_buff *skb = *pskb; struct dst_entry *dst = skb->dst; struct xfrm_state *x = dst->xfrm; int err; if (skb->ip_summed == CHECKSUM_HW) { - err = skb_checksum_help(pskb, 0); - skb = *pskb; + err = skb_checksum_help(skb, 0); if (err) goto error_nolock; } ===== net/ipv4/netfilter/ip_fw_compat.c 1.22 vs edited ===== --- 1.22/net/ipv4/netfilter/ip_fw_compat.c 2004-06-04 15:02:47 +10:00 +++ edited/net/ipv4/netfilter/ip_fw_compat.c 2004-10-25 21:30:51 +10:00 @@ -69,7 +69,7 @@ /* Assume worse case: any hook could change packet */ (*pskb)->nfcache |= NFC_UNKNOWN | NFC_ALTERED; if ((*pskb)->ip_summed == CHECKSUM_HW) - if (skb_checksum_help(pskb, (out == NULL))) + if (skb_checksum_help(*pskb, (out == NULL))) return NF_DROP; switch (hooknum) { ===== net/ipv4/netfilter/ip_nat_standalone.c 1.35 vs edited ===== --- 1.35/net/ipv4/netfilter/ip_nat_standalone.c 2004-09-24 07:42:34 +10:00 +++ edited/net/ipv4/netfilter/ip_nat_standalone.c 2004-10-25 21:31:17 +10:00 @@ -86,7 +86,7 @@ /* If we had a hardware checksum before, it's now invalid */ if ((*pskb)->ip_summed == CHECKSUM_HW) - if (skb_checksum_help(pskb, (out == NULL))) + if (skb_checksum_help(*pskb, (out == NULL))) return NF_DROP; ct = ip_conntrack_get(*pskb, &ctinfo); ===== net/ipv4/netfilter/ipt_ECN.c 1.10 vs edited ===== --- 1.10/net/ipv4/netfilter/ipt_ECN.c 2004-08-19 10:14:53 +10:00 +++ edited/net/ipv4/netfilter/ipt_ECN.c 2004-10-25 21:31:50 +10:00 @@ -86,7 +86,7 @@ memcpy((*pskb)->data + (*pskb)->nh.iph->ihl*4, &_tcph, sizeof(_tcph)); if ((*pskb)->ip_summed == CHECKSUM_HW) - if (skb_checksum_help(pskb, inward)) + if (skb_checksum_help(*pskb, inward)) return 0; (*pskb)->nfcache |= NFC_ALTERED; } ===== net/ipv6/ip6_output.c 1.74 vs edited ===== --- 1.74/net/ipv6/ip6_output.c 2004-09-24 07:39:26 +10:00 +++ edited/net/ipv6/ip6_output.c 2004-10-25 21:58:19 +10:00 @@ -56,7 +56,7 @@ #include #include -static int ip6_fragment(struct sk_buff **pskb, int (*output)(struct sk_buff**)); +static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)); static __inline__ void ipv6_select_ident(struct sk_buff *skb, struct frag_hdr *fhdr) { @@ -108,9 +108,8 @@ } -static int ip6_output2(struct sk_buff **pskb) +static int ip6_output2(struct sk_buff *skb) { - struct sk_buff *skb = *pskb; struct dst_entry *dst = skb->dst; struct net_device *dev = dst->dev; @@ -146,14 +145,12 @@ return NF_HOOK(PF_INET6, NF_IP6_POST_ROUTING, skb,NULL, skb->dev,ip6_output_finish); } -int ip6_output(struct sk_buff **pskb) +int ip6_output(struct sk_buff *skb) { - struct sk_buff *skb = *pskb; - if ((skb->len > dst_pmtu(skb->dst) || skb_shinfo(skb)->frag_list)) - return ip6_fragment(pskb, ip6_output2); + return ip6_fragment(skb, ip6_output2); else - return ip6_output2(pskb); + return ip6_output2(skb); } #ifdef CONFIG_NETFILTER @@ -518,10 +515,10 @@ return offset; } -static int ip6_fragment(struct sk_buff **pskb, int (*output)(struct sk_buff**)) +static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) { struct net_device *dev; - struct sk_buff *frag, *skb = *pskb; + struct sk_buff *frag; struct rt6_info *rt = (struct rt6_info*)skb->dst; struct ipv6hdr *tmp_hdr; struct frag_hdr *fh; @@ -610,7 +607,7 @@ ip6_copy_metadata(frag, skb); } - err = output(&skb); + err = output(skb); if (err || !frag) break; @@ -726,7 +723,7 @@ IP6_INC_STATS(IPSTATS_MIB_FRAGCREATES); - err = output(&frag); + err = output(frag); if (err) goto fail; } ===== net/ipv6/route.c 1.97 vs edited ===== --- 1.97/net/ipv6/route.c 2004-10-21 15:00:01 +10:00 +++ edited/net/ipv6/route.c 2004-10-25 22:00:00 +10:00 @@ -88,7 +88,7 @@ static int ip6_dst_gc(void); static int ip6_pkt_discard(struct sk_buff *skb); -static int ip6_pkt_discard_out(struct sk_buff **pskb); +static int ip6_pkt_discard_out(struct sk_buff *skb); static void ip6_link_failure(struct sk_buff *skb); static void ip6_rt_update_pmtu(struct dst_entry *dst, u32 mtu); @@ -638,7 +638,7 @@ struct dst_entry *ndisc_dst_alloc(struct net_device *dev, struct neighbour *neigh, struct in6_addr *addr, - int (*output)(struct sk_buff **)) + int (*output)(struct sk_buff *)) { struct rt6_info *rt; struct inet6_dev *idev = in6_dev_get(dev); @@ -1362,11 +1362,10 @@ return 0; } -int ip6_pkt_discard_out(struct sk_buff **pskb) +int ip6_pkt_discard_out(struct sk_buff *skb) { - (*pskb)->dev = (*pskb)->dst->dev; - BUG_ON(!(*pskb)->dev); - return ip6_pkt_discard(*pskb); + skb->dev = skb->dst->dev; + return ip6_pkt_discard(skb); } /* ===== net/ipv6/xfrm6_output.c 1.5 vs edited ===== --- 1.5/net/ipv6/xfrm6_output.c 2004-09-09 14:19:31 +10:00 +++ edited/net/ipv6/xfrm6_output.c 2004-10-25 21:33:05 +10:00 @@ -91,16 +91,14 @@ return ret; } -int xfrm6_output(struct sk_buff **pskb) +int xfrm6_output(struct sk_buff *skb) { - struct sk_buff *skb = *pskb; struct dst_entry *dst = skb->dst; struct xfrm_state *x = dst->xfrm; int err; if (skb->ip_summed == CHECKSUM_HW) { - err = skb_checksum_help(pskb, 0); - skb = *pskb; + err = skb_checksum_help(skb, 0); if (err) goto error_nolock; } --SUOF0GtieIMvvwua-- From SRS0+6b5075ceba7b9fb86014+428+infradead.org+hch@phoenix.srs.infradead.org Mon Oct 25 05:57:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 05:57:20 -0700 (PDT) Received: from phoenix.infradead.org (phoenix.infradead.org [81.187.226.98]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PCvEkC026616 for ; Mon, 25 Oct 2004 05:57:15 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.42 #1 (Red Hat Linux)) id 1CM4P2-0008V6-Cu; Mon, 25 Oct 2004 13:56:48 +0100 Date: Mon, 25 Oct 2004 13:56:48 +0100 From: Christoph Hellwig To: "chas williams (contractor)" Cc: netdev@oss.sgi.com Subject: Re: how about the following to elminate pci_find_device() in fore200e? Message-ID: <20041025125648.GA32619@infradead.org> References: <200410251156.i9PBuwV6016648@ginger.cmf.nrl.navy.mil> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410251156.i9PBuwV6016648@ginger.cmf.nrl.navy.mil> User-Agent: Mutt/1.4.1i X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 10799 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: netdev Content-Length: 1368 Lines: 43 On Mon, Oct 25, 2004 at 07:56:59AM -0400, chas williams (contractor) wrote: > we need to keep the linked list around for the sbus devices. there doesnt > seem to be something similar to pci_module_init() for sbus devices. > > ===== drivers/atm/fore200e.c 1.30 vs edited ===== > --- 1.30/drivers/atm/fore200e.c 2004-07-29 18:27:53 -04:00 > +++ edited/drivers/atm/fore200e.c 2004-10-24 22:12:20 -04:00 > @@ -113,7 +113,7 @@ > static const struct atmdev_ops fore200e_ops; > static const struct fore200e_bus fore200e_bus[]; > > -static struct fore200e* fore200e_boards = NULL; > +LIST_HEAD(fore200e_boards); should still be static (yes, static LIST_HEAD(foo); is okay) > +static int __devinit > +fore200e_pca_detect(struct pci_dev *pci_dev, const struct pci_device_id *pci_ent) > +{ > + const struct fore200e_bus* bus = (struct fore200e_bus*) pci_ent->driver_data; > + struct fore200e* fore200e; > + int err = 0; > + static int index = 0; > + > + if (pci_enable_device(pci_dev)) { > + err = -EINVAL; > + goto out; > + } > indentation looks messed but, but I assume you did this to match the rest of the file? > +#ifdef CONFIG_ATM_FORE200E_PCA > + if (!pci_module_init(&fore200e_pca_driver)) > + return 0; > +#endif > + > + if (!list_empty(&fore200e_boards)) > + return 0; the driver only supports either sbus or pci at the same time? From chas@cmf.nrl.navy.mil Mon Oct 25 06:31:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 06:32:00 -0700 (PDT) Received: from ginger.cmf.nrl.navy.mil (ginger.cmf.nrl.navy.mil [134.207.10.161]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PDVtPU027996 for ; Mon, 25 Oct 2004 06:31:55 -0700 Received: from cmf.nrl.navy.mil (thirdoffive.cmf.nrl.navy.mil [134.207.10.180]) by ginger.cmf.nrl.navy.mil (8.12.11/8.12.11) with ESMTP id i9PDVMb0017733; Mon, 25 Oct 2004 09:31:22 -0400 (EDT) Message-Id: <200410251331.i9PDVMb0017733@ginger.cmf.nrl.navy.mil> To: Christoph Hellwig cc: netdev@oss.sgi.com Reply-To: chas3@users.sourceforge.net Subject: Re: how about the following to elminate pci_find_device() in fore200e? In-reply-to: Your message of "Mon, 25 Oct 2004 13:56:48 BST." <20041025125648.GA32619@infradead.org> Date: Mon, 25 Oct 2004 09:31:22 -0400 From: "chas williams (contractor)" X-Virus-Scanned: NAI Completed X-Scanned-By: MIMEDefang 2.30 (www . roaringpenguin . com / mimedefang) X-archive-position: 10800 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chas@cmf.nrl.navy.mil Precedence: bulk X-list: netdev Content-Length: 1126 Lines: 30 In message <20041025125648.GA32619@infradead.org>,Christoph Hellwig writes: >> -static struct fore200e* fore200e_boards = NULL; >> +LIST_HEAD(fore200e_boards); > >should still be static (yes, static LIST_HEAD(foo); is okay) missed that. didnt mean to undo the static. >indentation looks messed but, but I assume you did this to match the >rest of the file? yeah. however, i will probably fix the tabbing on anything that is rewritten wholesale. switching tabbing in the middle of a routine is a bit hard to read though. >> +#ifdef CONFIG_ATM_FORE200E_PCA >> + if (!pci_module_init(&fore200e_pca_driver)) >> + return 0; >> +#endif >> + >> + if (!list_empty(&fore200e_boards)) >> + return 0; > >the driver only supports either sbus or pci at the same time? i believe it supports pci, sbus or both at the same time (and hopefully still does). fore200e_boards is only used to track non-pci boards now. if pci_module_init() succeeds we have to stay resident--non-pci boards have been found and inited by this point. if pci_module_init() fails, we need to check to see if any other boards were found before exiting. From davej@redhat.com Mon Oct 25 08:24:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 08:24:41 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PFOZPX003236 for ; Mon, 25 Oct 2004 08:24:36 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9PFOKE0022401; Mon, 25 Oct 2004 11:24:20 -0400 Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9PFOKr00814; Mon, 25 Oct 2004 11:24:20 -0400 Received: from devserv.devel.redhat.com (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.11/8.12.10) with ESMTP id i9PFOHEd006660; Mon, 25 Oct 2004 11:24:17 -0400 Received: (from davej@localhost) by devserv.devel.redhat.com (8.12.11/8.12.11/Submit) id i9PFOHFs006649; Mon, 25 Oct 2004 11:24:17 -0400 X-Authentication-Warning: devserv.devel.redhat.com: davej set sender to davej@redhat.com using -f Date: Mon, 25 Oct 2004 11:24:16 -0400 From: Dave Jones To: Ralph Roesler Cc: pci-ids@ucw.cz, netdev@oss.sgi.com, jgarzik@pobox.com Subject: Re: modified pci.ids file Message-ID: <20041025152416.GB9878@redhat.com> References: <1098687547.2237.18.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1098687547.2237.18.camel@localhost.localdomain> User-Agent: Mutt/1.4.1i X-archive-position: 10801 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davej@redhat.com Precedence: bulk X-list: netdev Content-Length: 501 Lines: 16 On Mon, Oct 25, 2004 at 08:59:08AM +0200, Ralph Roesler wrote: > Hi *, > > here is the list of pci-device id that are supported > by the Marvell/SysKonnect sk98lin driver. > > Is it possible for you to the new information into > the latest 2.6 kernel tree? I made the patch against > version 2.6.10-rc1-bk2 (the most recent one while > writing this mail). See http://pciids.sf.net Submitting them to the database there means they'll get picked up by every project that uses them. Dave From akpm@osdl.org Mon Oct 25 12:40:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 12:41:04 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PJewVF016638 for ; Mon, 25 Oct 2004 12:40:58 -0700 Received: from localhost.localdomain (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9PJeQ910842; Mon, 25 Oct 2004 12:40:26 -0700 Message-Id: <200410251940.i9PJeQ910842@mail.osdl.org> Subject: [patch 4/5] aes-586-asm: formatting changes To: davem@redhat.com Cc: jmorris@redhat.com, netdev@oss.sgi.com, akpm@osdl.org, vda@port.imtp.ilyichevsk.odessa.ua From: akpm@osdl.org Date: Mon, 25 Oct 2004 12:38:29 -0700 X-archive-position: 10805 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 Content-Length: 11101 Lines: 363 From: Denis Vlasenko - Macro parameters renamed for clarity. - Inaccurate comments fixed. - ebp register usage de-obfuscated (this is needed for next patch). No real code changes. Signed-off-by: Andrew Morton --- 25-akpm/arch/i386/crypto/aes-i586-asm.S | 233 +++++++++++++++----------------- 1 files changed, 115 insertions(+), 118 deletions(-) diff -puN arch/i386/crypto/aes-i586-asm.S~aes-586-asm-formatting-changes arch/i386/crypto/aes-i586-asm.S --- 25/arch/i386/crypto/aes-i586-asm.S~aes-586-asm-formatting-changes 2004-10-03 16:02:25.383449528 -0700 +++ 25-akpm/arch/i386/crypto/aes-i586-asm.S 2004-10-03 16:02:25.390448464 -0700 @@ -61,7 +61,6 @@ #define r3 edx #define r4 esi #define r5 edi -#define r6 ebp #define eaxl al #define eaxh ah @@ -84,60 +83,61 @@ // output registers r0, r1, r4 or r5. // Parameters: +// table table base address // %1 out_state[0] // %2 out_state[1] // %3 out_state[2] // %4 out_state[3] -// %5 table base address -// %6 input register for the round (destroyed) -// %7 scratch register for the round - -#define do_col(a1, a2, a3, a4, a5, a6, a7) \ - movzx %l(a6),%a7; \ - xor a5(,%a7,4),%a1; \ - movzx %h(a6),%a7; \ - shr $16,%a6; \ - xor a5+tlen(,%a7,4),%a2; \ - movzx %l(a6),%a7; \ - movzx %h(a6),%a6; \ - xor a5+2*tlen(,%a7,4),%a3; \ - xor a5+3*tlen(,%a6,4),%a4; +// idx input register for the round (destroyed) +// tmp scratch register for the round +// sched key schedule + +#define do_col(table, a1,a2,a3,a4, idx, tmp) \ + movzx %l(idx),%tmp; \ + xor table(,%tmp,4),%a1; \ + movzx %h(idx),%tmp; \ + shr $16,%idx; \ + xor table+tlen(,%tmp,4),%a2; \ + movzx %l(idx),%tmp; \ + movzx %h(idx),%idx; \ + xor table+2*tlen(,%tmp,4),%a3; \ + xor table+3*tlen(,%idx,4),%a4; // initialise output registers from the key schedule - -#define do_fcol(a1, a2, a3, a4, a5, a6, a7, a8) \ - mov 0 a8,%a1; \ - movzx %l(a6),%a7; \ - mov 12 a8,%a2; \ - xor a5(,%a7,4),%a1; \ - mov 4 a8,%a4; \ - movzx %h(a6),%a7; \ - shr $16,%a6; \ - xor a5+tlen(,%a7,4),%a2; \ - movzx %l(a6),%a7; \ - movzx %h(a6),%a6; \ - xor a5+3*tlen(,%a6,4),%a4; \ - mov %a3,%a6; \ - mov 8 a8,%a3; \ - xor a5+2*tlen(,%a7,4),%a3; +// NB: original a3 is in idx on exit +#define do_fcol(table, a1,a2,a3,a4, idx, tmp, sched) \ + mov 0 sched,%a1; \ + movzx %l(idx),%tmp; \ + mov 12 sched,%a2; \ + xor table(,%tmp,4),%a1; \ + mov 4 sched,%a4; \ + movzx %h(idx),%tmp; \ + shr $16,%idx; \ + xor table+tlen(,%tmp,4),%a2; \ + movzx %l(idx),%tmp; \ + movzx %h(idx),%idx; \ + xor table+3*tlen(,%idx,4),%a4; \ + mov %a3,%idx; \ + mov 8 sched,%a3; \ + xor table+2*tlen(,%tmp,4),%a3; // initialise output registers from the key schedule - -#define do_icol(a1, a2, a3, a4, a5, a6, a7, a8) \ - mov 0 a8,%a1; \ - movzx %l(a6),%a7; \ - mov 4 a8,%a2; \ - xor a5(,%a7,4),%a1; \ - mov 12 a8,%a4; \ - movzx %h(a6),%a7; \ - shr $16,%a6; \ - xor a5+tlen(,%a7,4),%a2; \ - movzx %l(a6),%a7; \ - movzx %h(a6),%a6; \ - xor a5+3*tlen(,%a6,4),%a4; \ - mov %a3,%a6; \ - mov 8 a8,%a3; \ - xor a5+2*tlen(,%a7,4),%a3; +// NB: original a3 is in idx on exit +#define do_icol(table, a1,a2,a3,a4, idx, tmp, sched) \ + mov 0 sched,%a1; \ + movzx %l(idx),%tmp; \ + mov 4 sched,%a2; \ + xor table(,%tmp,4),%a1; \ + mov 12 sched,%a4; \ + movzx %h(idx),%tmp; \ + shr $16,%idx; \ + xor table+tlen(,%tmp,4),%a2; \ + movzx %l(idx),%tmp; \ + movzx %h(idx),%idx; \ + xor table+3*tlen(,%idx,4),%a4; \ + mov %a3,%idx; \ + mov 8 sched,%a3; \ + xor table+2*tlen(,%tmp,4),%a3; // original Gladman had conditional saves to MMX regs. @@ -149,42 +149,39 @@ // This macro performs a forward encryption cycle. It is entered with // the first previous round column values in r0, r1, r4 and r5 and -// exits with the final values in the same registers, using the MMX -// registers mm0-mm1 or the stack for temporary storage +// exits with the final values in the same registers, using stack +// for temporary storage -// mov current column values into the MMX registers #define fwd_rnd(arg, table) \ - /* mov current column values into the MMX registers */ \ mov %r0,%r2; \ save (0,r1); \ save (1,r5); \ \ /* compute new column values */ \ - do_fcol(r0,r5,r4,r1,table, r2,r3, arg); \ - do_col (r4,r1,r0,r5,table, r2,r3); \ + do_fcol(table, r0,r5,r4,r1, r2,r3, arg); \ + do_col (table, r4,r1,r0,r5, r2,r3); \ restore(r2,0); \ - do_col (r1,r0,r5,r4,table, r2,r3); \ + do_col (table, r1,r0,r5,r4, r2,r3); \ restore(r2,1); \ - do_col (r5,r4,r1,r0,table, r2,r3); + do_col (table, r5,r4,r1,r0, r2,r3); // This macro performs an inverse encryption cycle. It is entered with // the first previous round column values in r0, r1, r4 and r5 and -// exits with the final values in the same registers, using the MMX -// registers mm0-mm1 or the stack for temporary storage +// exits with the final values in the same registers, using stack +// for temporary storage #define inv_rnd(arg, table) \ - /* mov current column values into the MMX registers */ \ mov %r0,%r2; \ save (0,r1); \ save (1,r5); \ \ /* compute new column values */ \ - do_icol(r0,r1,r4,r5, table, r2,r3, arg); \ - do_col (r4,r5,r0,r1, table, r2,r3); \ + do_icol(table, r0,r1,r4,r5, r2,r3, arg); \ + do_col (table, r4,r5,r0,r1, r2,r3); \ restore(r2,0); \ - do_col (r1,r4,r5,r0, table, r2,r3); \ + do_col (table, r1,r4,r5,r0, r2,r3); \ restore(r2,1); \ - do_col (r5,r0,r1,r4, table, r2,r3); + do_col (table, r5,r0,r1,r4, r2,r3); // AES (Rijndael) Encryption Subroutine @@ -208,7 +205,7 @@ aes_enc_blk: push %esi mov nrnd(%ebp),%r3 // number of rounds push %edi - lea ekey(%ebp),%r6 // key pointer + lea ekey(%ebp),%ebp // key pointer // input four columns and xor in first round key @@ -216,47 +213,47 @@ aes_enc_blk: mov 4(%r2),%r1 mov 8(%r2),%r4 mov 12(%r2),%r5 - xor (%r6),%r0 - xor 4(%r6),%r1 - xor 8(%r6),%r4 - xor 12(%r6),%r5 + xor (%ebp),%r0 + xor 4(%ebp),%r1 + xor 8(%ebp),%r4 + xor 12(%ebp),%r5 sub $8,%esp // space for register saves on stack - add $16,%r6 // increment to next round key + add $16,%ebp // increment to next round key sub $10,%r3 je 4f // 10 rounds for 128-bit key - add $32,%r6 + add $32,%ebp sub $2,%r3 je 3f // 12 rounds for 128-bit key - add $32,%r6 + add $32,%ebp -2: fwd_rnd( -64(%r6) ,ft_tab) // 14 rounds for 128-bit key - fwd_rnd( -48(%r6) ,ft_tab) -3: fwd_rnd( -32(%r6) ,ft_tab) // 12 rounds for 128-bit key - fwd_rnd( -16(%r6) ,ft_tab) -4: fwd_rnd( (%r6) ,ft_tab) // 10 rounds for 128-bit key - fwd_rnd( +16(%r6) ,ft_tab) - fwd_rnd( +32(%r6) ,ft_tab) - fwd_rnd( +48(%r6) ,ft_tab) - fwd_rnd( +64(%r6) ,ft_tab) - fwd_rnd( +80(%r6) ,ft_tab) - fwd_rnd( +96(%r6) ,ft_tab) - fwd_rnd(+112(%r6) ,ft_tab) - fwd_rnd(+128(%r6) ,ft_tab) - fwd_rnd(+144(%r6) ,fl_tab) // last round uses a different table +2: fwd_rnd( -64(%ebp) ,ft_tab) // 14 rounds for 128-bit key + fwd_rnd( -48(%ebp) ,ft_tab) +3: fwd_rnd( -32(%ebp) ,ft_tab) // 12 rounds for 128-bit key + fwd_rnd( -16(%ebp) ,ft_tab) +4: fwd_rnd( (%ebp) ,ft_tab) // 10 rounds for 128-bit key + fwd_rnd( +16(%ebp) ,ft_tab) + fwd_rnd( +32(%ebp) ,ft_tab) + fwd_rnd( +48(%ebp) ,ft_tab) + fwd_rnd( +64(%ebp) ,ft_tab) + fwd_rnd( +80(%ebp) ,ft_tab) + fwd_rnd( +96(%ebp) ,ft_tab) + fwd_rnd(+112(%ebp) ,ft_tab) + fwd_rnd(+128(%ebp) ,ft_tab) + fwd_rnd(+144(%ebp) ,fl_tab) // last round uses a different table // move final values to the output array. CAUTION: the // order of these assigns rely on the register mappings add $8,%esp - mov out_blk+12(%esp),%r6 - mov %r5,12(%r6) + mov out_blk+12(%esp),%ebp + mov %r5,12(%ebp) pop %edi - mov %r4,8(%r6) + mov %r4,8(%ebp) pop %esi - mov %r1,4(%r6) + mov %r1,4(%ebp) pop %ebx - mov %r0,(%r6) + mov %r0,(%ebp) pop %ebp mov $1,%eax ret @@ -283,10 +280,10 @@ aes_dec_blk: push %esi mov nrnd(%ebp),%r3 // number of rounds push %edi - lea dkey(%ebp),%r6 // key pointer + lea dkey(%ebp),%ebp // key pointer mov %r3,%r0 shl $4,%r0 - add %r0,%r6 + add %r0,%ebp // input four columns and xor in first round key @@ -294,47 +291,47 @@ aes_dec_blk: mov 4(%r2),%r1 mov 8(%r2),%r4 mov 12(%r2),%r5 - xor (%r6),%r0 - xor 4(%r6),%r1 - xor 8(%r6),%r4 - xor 12(%r6),%r5 + xor (%ebp),%r0 + xor 4(%ebp),%r1 + xor 8(%ebp),%r4 + xor 12(%ebp),%r5 - sub $8,%esp // space for register saves on stack - sub $16,%r6 // increment to next round key + sub $8,%esp // space for register saves on stack + sub $16,%ebp // increment to next round key sub $10,%r3 je 4f // 10 rounds for 128-bit key - sub $32,%r6 + sub $32,%ebp sub $2,%r3 je 3f // 12 rounds for 128-bit key - sub $32,%r6 + sub $32,%ebp -2: inv_rnd( +64(%r6), it_tab) // 14 rounds for 128-bit key - inv_rnd( +48(%r6), it_tab) -3: inv_rnd( +32(%r6), it_tab) // 12 rounds for 128-bit key - inv_rnd( +16(%r6), it_tab) -4: inv_rnd( (%r6), it_tab) // 10 rounds for 128-bit key - inv_rnd( -16(%r6), it_tab) - inv_rnd( -32(%r6), it_tab) - inv_rnd( -48(%r6), it_tab) - inv_rnd( -64(%r6), it_tab) - inv_rnd( -80(%r6), it_tab) - inv_rnd( -96(%r6), it_tab) - inv_rnd(-112(%r6), it_tab) - inv_rnd(-128(%r6), it_tab) - inv_rnd(-144(%r6), il_tab) // last round uses a different table +2: inv_rnd( +64(%ebp), it_tab) // 14 rounds for 128-bit key + inv_rnd( +48(%ebp), it_tab) +3: inv_rnd( +32(%ebp), it_tab) // 12 rounds for 128-bit key + inv_rnd( +16(%ebp), it_tab) +4: inv_rnd( (%ebp), it_tab) // 10 rounds for 128-bit key + inv_rnd( -16(%ebp), it_tab) + inv_rnd( -32(%ebp), it_tab) + inv_rnd( -48(%ebp), it_tab) + inv_rnd( -64(%ebp), it_tab) + inv_rnd( -80(%ebp), it_tab) + inv_rnd( -96(%ebp), it_tab) + inv_rnd(-112(%ebp), it_tab) + inv_rnd(-128(%ebp), it_tab) + inv_rnd(-144(%ebp), il_tab) // last round uses a different table // move final values to the output array. CAUTION: the // order of these assigns rely on the register mappings add $8,%esp - mov out_blk+12(%esp),%r6 - mov %r5,12(%r6) + mov out_blk+12(%esp),%ebp + mov %r5,12(%ebp) pop %edi - mov %r4,8(%r6) + mov %r4,8(%ebp) pop %esi - mov %r1,4(%r6) + mov %r1,4(%ebp) pop %ebx - mov %r0,(%r6) + mov %r0,(%ebp) pop %ebp mov $1,%eax ret _ From akpm@osdl.org Mon Oct 25 12:40:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 12:40:56 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PJenNm016617 for ; Mon, 25 Oct 2004 12:40:50 -0700 Received: from localhost.localdomain (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9PJeM910827; Mon, 25 Oct 2004 12:40:22 -0700 Message-Id: <200410251940.i9PJeM910827@mail.osdl.org> Subject: [patch 1/5] small sha256 cleanup To: davem@redhat.com Cc: jmorris@redhat.com, netdev@oss.sgi.com, akpm@osdl.org, vda@port.imtp.ilyichevsk.odessa.ua From: akpm@osdl.org Date: Mon, 25 Oct 2004 12:38:26 -0700 X-archive-position: 10803 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 Content-Length: 1115 Lines: 40 From: Denis Vlasenko Looks like open-coded be_to_cpu. GCC produces rather poor code for this. be_to_cpu produces asm()s which are ~4 times shorter. Compile-tested only. I am not sure whether input can be 32bit-unaligned. If it indeed can be, replace: ((u32*)(input))[I] -> get_unaligned( ((u32*)(input))+I ) Signed-off-by: Andrew Morton --- 25-akpm/crypto/sha256.c | 10 +--------- 1 files changed, 1 insertion(+), 9 deletions(-) diff -puN crypto/sha256.c~small-sha256-cleanup crypto/sha256.c --- 25/crypto/sha256.c~small-sha256-cleanup 2004-10-01 21:20:39.113354352 -0700 +++ 25-akpm/crypto/sha256.c 2004-10-01 21:20:39.117353744 -0700 @@ -63,15 +63,7 @@ static inline u32 RORu32(u32 x, u32 y) static inline void LOAD_OP(int I, u32 *W, const u8 *input) { - u32 t1 = input[(4 * I)] & 0xff; - - t1 <<= 8; - t1 |= input[(4 * I) + 1] & 0xff; - t1 <<= 8; - t1 |= input[(4 * I) + 2] & 0xff; - t1 <<= 8; - t1 |= input[(4 * I) + 3] & 0xff; - W[I] = t1; + W[I] = __be32_to_cpu( ((u32*)(input))[I] ); } static inline void BLEND_OP(int I, u32 *W) _ From akpm@osdl.org Mon Oct 25 12:40:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 12:41:06 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PJexI5016640 for ; Mon, 25 Oct 2004 12:40:59 -0700 Received: from localhost.localdomain (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9PJeQ910847; Mon, 25 Oct 2004 12:40:27 -0700 Message-Id: <200410251940.i9PJeQ910847@mail.osdl.org> Subject: [patch 5/5] aes-586-asm: small optimizations To: davem@redhat.com Cc: jmorris@redhat.com, netdev@oss.sgi.com, akpm@osdl.org, vda@port.imtp.ilyichevsk.odessa.ua From: akpm@osdl.org Date: Mon, 25 Oct 2004 12:38:30 -0700 X-archive-position: 10806 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 Content-Length: 9105 Lines: 266 From: Denis Vlasenko - recode back-to-back fwd_rnd() pairs to avoid two register moves. - ditto for inv_rnd(). - optimize out lea 0(%ebp),%ebp - remove two stray insns # size aes-i586-asm.o.org aes-i586-asm.o text data bss dec hex filename 5971 0 0 5971 1753 aes-i586-asm.o.org 5905 0 0 5905 1711 aes-i586-asm.o Overall, patch does not add and does not modify any insns, only removes a handful of them. However, speed difference is way below noise level. Run-tested with tcrypt module. Signed-off-by: Andrew Morton --- 25-akpm/arch/i386/crypto/aes-i586-asm.S | 168 +++++++++++++++++++------------- 1 files changed, 103 insertions(+), 65 deletions(-) diff -puN arch/i386/crypto/aes-i586-asm.S~aes-586-asm-small-optimizations arch/i386/crypto/aes-i586-asm.S --- 25/arch/i386/crypto/aes-i586-asm.S~aes-586-asm-small-optimizations 2004-10-03 16:02:36.483762024 -0700 +++ 25-akpm/arch/i386/crypto/aes-i586-asm.S 2004-10-03 16:02:36.487761416 -0700 @@ -104,7 +104,8 @@ xor table+3*tlen(,%idx,4),%a4; // initialise output registers from the key schedule -// NB: original a3 is in idx on exit +// NB1: original value of a3 is in idx on exit +// NB2: original values of a1,a2,a4 aren't used #define do_fcol(table, a1,a2,a3,a4, idx, tmp, sched) \ mov 0 sched,%a1; \ movzx %l(idx),%tmp; \ @@ -122,7 +123,8 @@ xor table+2*tlen(,%tmp,4),%a3; // initialise output registers from the key schedule -// NB: original a3 is in idx on exit +// NB1: original value of a3 is in idx on exit +// NB2: original values of a1,a2,a4 aren't used #define do_icol(table, a1,a2,a3,a4, idx, tmp, sched) \ mov 0 sched,%a1; \ movzx %l(idx),%tmp; \ @@ -147,41 +149,75 @@ #define restore(a1, a2) \ mov 4*a2(%esp),%a1 -// This macro performs a forward encryption cycle. It is entered with -// the first previous round column values in r0, r1, r4 and r5 and -// exits with the final values in the same registers, using stack +// These macros perform a forward encryption cycle. They are entered with +// the first previous round column values in r0,r1,r4,r5 and +// exit with the final values in the same registers, using stack +// for temporary storage. + +// round column values +// on entry: r0,r1,r4,r5 +// on exit: r2,r1,r4,r5 +#define fwd_rnd1(arg, table) \ + save (0,r1); \ + save (1,r5); \ + \ + /* compute new column values */ \ + do_fcol(table, r2,r5,r4,r1, r0,r3, arg); /* idx=r0 */ \ + do_col (table, r4,r1,r2,r5, r0,r3); /* idx=r4 */ \ + restore(r0,0); \ + do_col (table, r1,r2,r5,r4, r0,r3); /* idx=r1 */ \ + restore(r0,1); \ + do_col (table, r5,r4,r1,r2, r0,r3); /* idx=r5 */ + +// round column values +// on entry: r2,r1,r4,r5 +// on exit: r0,r1,r4,r5 +#define fwd_rnd2(arg, table) \ + save (0,r1); \ + save (1,r5); \ + \ + /* compute new column values */ \ + do_fcol(table, r0,r5,r4,r1, r2,r3, arg); /* idx=r2 */ \ + do_col (table, r4,r1,r0,r5, r2,r3); /* idx=r4 */ \ + restore(r2,0); \ + do_col (table, r1,r0,r5,r4, r2,r3); /* idx=r1 */ \ + restore(r2,1); \ + do_col (table, r5,r4,r1,r0, r2,r3); /* idx=r5 */ + +// These macros performs an inverse encryption cycle. They are entered with +// the first previous round column values in r0,r1,r4,r5 and +// exit with the final values in the same registers, using stack // for temporary storage -#define fwd_rnd(arg, table) \ - mov %r0,%r2; \ - save (0,r1); \ - save (1,r5); \ - \ - /* compute new column values */ \ - do_fcol(table, r0,r5,r4,r1, r2,r3, arg); \ - do_col (table, r4,r1,r0,r5, r2,r3); \ - restore(r2,0); \ - do_col (table, r1,r0,r5,r4, r2,r3); \ - restore(r2,1); \ - do_col (table, r5,r4,r1,r0, r2,r3); - -// This macro performs an inverse encryption cycle. It is entered with -// the first previous round column values in r0, r1, r4 and r5 and -// exits with the final values in the same registers, using stack -// for temporary storage - -#define inv_rnd(arg, table) \ - mov %r0,%r2; \ - save (0,r1); \ - save (1,r5); \ - \ - /* compute new column values */ \ - do_icol(table, r0,r1,r4,r5, r2,r3, arg); \ - do_col (table, r4,r5,r0,r1, r2,r3); \ - restore(r2,0); \ - do_col (table, r1,r4,r5,r0, r2,r3); \ - restore(r2,1); \ - do_col (table, r5,r0,r1,r4, r2,r3); +// round column values +// on entry: r0,r1,r4,r5 +// on exit: r2,r1,r4,r5 +#define inv_rnd1(arg, table) \ + save (0,r1); \ + save (1,r5); \ + \ + /* compute new column values */ \ + do_icol(table, r2,r1,r4,r5, r0,r3, arg); /* idx=r0 */ \ + do_col (table, r4,r5,r2,r1, r0,r3); /* idx=r4 */ \ + restore(r0,0); \ + do_col (table, r1,r4,r5,r2, r0,r3); /* idx=r1 */ \ + restore(r0,1); \ + do_col (table, r5,r2,r1,r4, r0,r3); /* idx=r5 */ + +// round column values +// on entry: r2,r1,r4,r5 +// on exit: r0,r1,r4,r5 +#define inv_rnd2(arg, table) \ + save (0,r1); \ + save (1,r5); \ + \ + /* compute new column values */ \ + do_icol(table, r0,r1,r4,r5, r2,r3, arg); /* idx=r2 */ \ + do_col (table, r4,r5,r0,r1, r2,r3); /* idx=r4 */ \ + restore(r2,0); \ + do_col (table, r1,r4,r5,r0, r2,r3); /* idx=r1 */ \ + restore(r2,1); \ + do_col (table, r5,r0,r1,r4, r2,r3); /* idx=r5 */ // AES (Rijndael) Encryption Subroutine @@ -195,7 +231,6 @@ aes_enc_blk: push %ebp mov ctx(%esp),%ebp // pointer to context - xor %eax,%eax // CAUTION: the order and the values used in these assigns // rely on the register mappings @@ -205,7 +240,9 @@ aes_enc_blk: push %esi mov nrnd(%ebp),%r3 // number of rounds push %edi +#if ekey != 0 lea ekey(%ebp),%ebp // key pointer +#endif // input four columns and xor in first round key @@ -227,20 +264,20 @@ aes_enc_blk: je 3f // 12 rounds for 128-bit key add $32,%ebp -2: fwd_rnd( -64(%ebp) ,ft_tab) // 14 rounds for 128-bit key - fwd_rnd( -48(%ebp) ,ft_tab) -3: fwd_rnd( -32(%ebp) ,ft_tab) // 12 rounds for 128-bit key - fwd_rnd( -16(%ebp) ,ft_tab) -4: fwd_rnd( (%ebp) ,ft_tab) // 10 rounds for 128-bit key - fwd_rnd( +16(%ebp) ,ft_tab) - fwd_rnd( +32(%ebp) ,ft_tab) - fwd_rnd( +48(%ebp) ,ft_tab) - fwd_rnd( +64(%ebp) ,ft_tab) - fwd_rnd( +80(%ebp) ,ft_tab) - fwd_rnd( +96(%ebp) ,ft_tab) - fwd_rnd(+112(%ebp) ,ft_tab) - fwd_rnd(+128(%ebp) ,ft_tab) - fwd_rnd(+144(%ebp) ,fl_tab) // last round uses a different table +2: fwd_rnd1( -64(%ebp) ,ft_tab) // 14 rounds for 128-bit key + fwd_rnd2( -48(%ebp) ,ft_tab) +3: fwd_rnd1( -32(%ebp) ,ft_tab) // 12 rounds for 128-bit key + fwd_rnd2( -16(%ebp) ,ft_tab) +4: fwd_rnd1( (%ebp) ,ft_tab) // 10 rounds for 128-bit key + fwd_rnd2( +16(%ebp) ,ft_tab) + fwd_rnd1( +32(%ebp) ,ft_tab) + fwd_rnd2( +48(%ebp) ,ft_tab) + fwd_rnd1( +64(%ebp) ,ft_tab) + fwd_rnd2( +80(%ebp) ,ft_tab) + fwd_rnd1( +96(%ebp) ,ft_tab) + fwd_rnd2(+112(%ebp) ,ft_tab) + fwd_rnd1(+128(%ebp) ,ft_tab) + fwd_rnd2(+144(%ebp) ,fl_tab) // last round uses a different table // move final values to the output array. CAUTION: the // order of these assigns rely on the register mappings @@ -270,7 +307,6 @@ aes_enc_blk: aes_dec_blk: push %ebp mov ctx(%esp),%ebp // pointer to context - xor %eax,%eax // CAUTION: the order and the values used in these assigns // rely on the register mappings @@ -280,7 +316,9 @@ aes_dec_blk: push %esi mov nrnd(%ebp),%r3 // number of rounds push %edi +#if dkey != 0 lea dkey(%ebp),%ebp // key pointer +#endif mov %r3,%r0 shl $4,%r0 add %r0,%ebp @@ -305,20 +343,20 @@ aes_dec_blk: je 3f // 12 rounds for 128-bit key sub $32,%ebp -2: inv_rnd( +64(%ebp), it_tab) // 14 rounds for 128-bit key - inv_rnd( +48(%ebp), it_tab) -3: inv_rnd( +32(%ebp), it_tab) // 12 rounds for 128-bit key - inv_rnd( +16(%ebp), it_tab) -4: inv_rnd( (%ebp), it_tab) // 10 rounds for 128-bit key - inv_rnd( -16(%ebp), it_tab) - inv_rnd( -32(%ebp), it_tab) - inv_rnd( -48(%ebp), it_tab) - inv_rnd( -64(%ebp), it_tab) - inv_rnd( -80(%ebp), it_tab) - inv_rnd( -96(%ebp), it_tab) - inv_rnd(-112(%ebp), it_tab) - inv_rnd(-128(%ebp), it_tab) - inv_rnd(-144(%ebp), il_tab) // last round uses a different table +2: inv_rnd1( +64(%ebp), it_tab) // 14 rounds for 128-bit key + inv_rnd2( +48(%ebp), it_tab) +3: inv_rnd1( +32(%ebp), it_tab) // 12 rounds for 128-bit key + inv_rnd2( +16(%ebp), it_tab) +4: inv_rnd1( (%ebp), it_tab) // 10 rounds for 128-bit key + inv_rnd2( -16(%ebp), it_tab) + inv_rnd1( -32(%ebp), it_tab) + inv_rnd2( -48(%ebp), it_tab) + inv_rnd1( -64(%ebp), it_tab) + inv_rnd2( -80(%ebp), it_tab) + inv_rnd1( -96(%ebp), it_tab) + inv_rnd2(-112(%ebp), it_tab) + inv_rnd1(-128(%ebp), it_tab) + inv_rnd2(-144(%ebp), il_tab) // last round uses a different table // move final values to the output array. CAUTION: the // order of these assigns rely on the register mappings _ From akpm@osdl.org Mon Oct 25 12:40:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 12:40:55 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PJeolO016621 for ; Mon, 25 Oct 2004 12:40:50 -0700 Received: from localhost.localdomain (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9PJeN910832; Mon, 25 Oct 2004 12:40:23 -0700 Message-Id: <200410251940.i9PJeN910832@mail.osdl.org> Subject: [patch 2/5] small sha512 cleanup To: davem@redhat.com Cc: jmorris@redhat.com, netdev@oss.sgi.com, akpm@osdl.org, vda@port.imtp.ilyichevsk.odessa.ua From: akpm@osdl.org Date: Mon, 25 Oct 2004 12:38:27 -0700 X-archive-position: 10802 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 Content-Length: 1524 Lines: 53 From: Denis Vlasenko Looks like open-coded be_to_cpu. GCC produces rather poor code for this. be_to_cpu produces asm()s which are ~4 times shorter. Compile-tested only. I am not sure whether input can be 64bit-unaligned. If it indeed can be, replace: ((u64*)(input))[I] -> get_unaligned( ((u64*)(input))+I ) Signed-off-by: Andrew Morton --- 25-akpm/crypto/sha512.c | 19 ++----------------- 1 files changed, 2 insertions(+), 17 deletions(-) diff -puN crypto/sha512.c~small-sha512-cleanup crypto/sha512.c --- 25/crypto/sha512.c~small-sha512-cleanup 2004-10-01 21:20:42.100900176 -0700 +++ 25-akpm/crypto/sha512.c 2004-10-01 21:20:42.104899568 -0700 @@ -104,27 +104,12 @@ const u64 sha512_K[80] = { static inline void LOAD_OP(int I, u64 *W, const u8 *input) { - u64 t1 = input[(8*I) ] & 0xff; - t1 <<= 8; - t1 |= input[(8*I)+1] & 0xff; - t1 <<= 8; - t1 |= input[(8*I)+2] & 0xff; - t1 <<= 8; - t1 |= input[(8*I)+3] & 0xff; - t1 <<= 8; - t1 |= input[(8*I)+4] & 0xff; - t1 <<= 8; - t1 |= input[(8*I)+5] & 0xff; - t1 <<= 8; - t1 |= input[(8*I)+6] & 0xff; - t1 <<= 8; - t1 |= input[(8*I)+7] & 0xff; - W[I] = t1; + W[I] = __be64_to_cpu( ((u64*)(input))[I] ); } static inline void BLEND_OP(int I, u64 *W) { - W[I] = s1(W[I-2]) + W[I-7] + s0(W[I-15]) + W[I-16]; + W[I] = s1(W[I-2]) + W[I-7] + s0(W[I-15]) + W[I-16]; } static void _ From akpm@osdl.org Mon Oct 25 12:40:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 12:40:57 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PJeqoQ016625 for ; Mon, 25 Oct 2004 12:40:52 -0700 Received: from localhost.localdomain (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9PJeP910837; Mon, 25 Oct 2004 12:40:25 -0700 Message-Id: <200410251940.i9PJeP910837@mail.osdl.org> Subject: [patch 3/5] reduce sha512_transform() stack usage, speedup To: davem@redhat.com Cc: jmorris@redhat.com, netdev@oss.sgi.com, akpm@osdl.org, vda@port.imtp.ilyichevsk.odessa.ua From: akpm@osdl.org Date: Mon, 25 Oct 2004 12:38:28 -0700 X-archive-position: 10804 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 Content-Length: 3145 Lines: 96 From: Denis Vlasenko Patch moves large temporary u64 W[80] from stack to ctx struct: * reduces stack usage by 640 bytes * saves one 640-byte memset() per sha512_transform() (we still do it after *all* iterations are done) * quite unexpectedly saves 1.6k of code on i386 because stack offsets now fit into 8bits and many stack addressing insns got 3 bytes smaller: # size sha512.o.org sha512.o text data bss dec hex filename 8281 372 0 8653 21cd sha512.o.org 6649 372 0 7021 1b6d sha512.o # objdump -d sha512.o.org | cut -b9- >sha512.d.org # objdump -d sha512.o | cut -b9- >sha512.d # diff -u sha512.d.org sha512.d [snip] : 8b 4b 28 mov 0x28(%ebx),%ecx : 8b 5b 2c mov 0x2c(%ebx),%ebx -: 89 8d 44 fd ff ff mov %ecx,0xfffffd44(%ebp) -: 89 9d 48 fd ff ff mov %ebx,0xfffffd48(%ebp) -: 89 9d f4 fc ff ff mov %ebx,0xfffffcf4(%ebp) +: 89 4d c4 mov %ecx,0xffffffc4(%ebp) +: 89 5d c8 mov %ebx,0xffffffc8(%ebp) +: 89 9d 64 ff ff ff mov %ebx,0xffffff64(%ebp) : 8b 5d 08 mov 0x8(%ebp),%ebx -: 89 8d f0 fc ff ff mov %ecx,0xfffffcf0(%ebp) +: 89 8d 60 ff ff ff mov %ecx,0xffffff60(%ebp) : 8b 42 30 mov 0x30(%edx),%eax : 8b 52 34 mov 0x34(%edx),%edx Signed-off-by: Andrew Morton --- 25-akpm/crypto/sha512.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff -puN crypto/sha512.c~reduce-sha512_transform-stack-usage-speedup crypto/sha512.c --- 25/crypto/sha512.c~reduce-sha512_transform-stack-usage-speedup 2004-10-01 21:20:45.102443872 -0700 +++ 25-akpm/crypto/sha512.c 2004-10-01 21:20:45.106443264 -0700 @@ -30,6 +30,7 @@ struct sha512_ctx { u64 state[8]; u32 count[4]; u8 buf[128]; + u64 W[80]; }; static inline u64 Ch(u64 x, u64 y, u64 z) @@ -113,10 +114,9 @@ static inline void BLEND_OP(int I, u64 * } static void -sha512_transform(u64 *state, const u8 *input) +sha512_transform(u64 *state, u64 *W, const u8 *input) { u64 a, b, c, d, e, f, g, h, t1, t2; - u64 W[80]; int i; @@ -157,7 +157,6 @@ sha512_transform(u64 *state, const u8 *i /* erase our data */ a = b = c = d = e = f = g = h = t1 = t2 = 0; - memset(W, 0, 80 * sizeof(u64)); } static void @@ -215,10 +214,10 @@ sha512_update(void *ctx, const u8 *data, /* Transform as many times as possible. */ if (len >= part_len) { memcpy(&sctx->buf[index], data, part_len); - sha512_transform(sctx->state, sctx->buf); + sha512_transform(sctx->state, sctx->W, sctx->buf); for (i = part_len; i + 127 < len; i+=128) - sha512_transform(sctx->state, &data[i]); + sha512_transform(sctx->state, sctx->W, &data[i]); index = 0; } else { @@ -227,6 +226,9 @@ sha512_update(void *ctx, const u8 *data, /* Buffer remaining input */ memcpy(&sctx->buf[index], &data[i], len - i); + + /* erase our data */ + memset(sctx->W, 0, sizeof(sctx->W)); } static void _ From terjekv@nommo.uio.no Mon Oct 25 12:55:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 12:55:18 -0700 (PDT) Received: from pat.uio.no (IDENT:7411@pat.uio.no [129.240.130.16]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PJt9Wf019152 for ; Mon, 25 Oct 2004 12:55:10 -0700 Received: from mail-mx3.uio.no ([129.240.10.44]) by pat.uio.no with esmtp (Exim 4.34) id 1CMAvX-0003Aa-6T; Mon, 25 Oct 2004 21:54:47 +0200 Received: from nommo.uio.no ([129.240.222.179]) by smtp.uio.no with esmtp (Exim 4.34) id 1CMAvS-00075S-90; Mon, 25 Oct 2004 21:54:42 +0200 Received: from terjekv by nommo.uio.no with local (Exim 4.30) id 1CMAvO-0006og-2w; Mon, 25 Oct 2004 21:54:38 +0200 To: Jeff Garzik Cc: Seiichi Nakashima , linux-kernel@vger.kernel.org, Netdev Subject: Re: linux-2.6.9 eepro100 warning References: <200410232313.AA00003@prism.kumin.ne.jp> <417C9A4E.3030909@pobox.com> From: Terje Kvernes Organization: The friends of mr. Tux X-URL: http://terje.kvernes.no/ Date: Mon, 25 Oct 2004 21:54:38 +0200 In-Reply-To: <417C9A4E.3030909@pobox.com> (Jeff Garzik's message of "Mon, 25 Oct 2004 02:16:46 -0400") Message-ID: User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-Information: This message has been scanned for viruses/spam. Contact postmaster@uio.no if you have questions about this scanning X-UiO-MailScanner: No virus found X-UiO-Spam-info: not spam, SpamAssassin (score=-5, required 12, UIO_MAIL_IS_INTERNAL -5.00) X-archive-position: 10807 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: terjekv@math.uio.no Precedence: bulk X-list: netdev Content-Length: 552 Lines: 19 Jeff Garzik writes: [ ... ] > Note that eepro100 driver will be deleted soon. we have several systems where e100 produces netdev watchdog errors, while eepro100 works without problems. I can understand the desire to migrate, but what timeframe are we looking at? roughly translated, when do I _have_ to start help debugging the e100 driver? ;-) I can do another attempt at rolling out the e100 driver, see what breaks, and try to report it around 2.6.1[01] or something like that if that helps? -- Terje From kernel@linuxace.com Mon Oct 25 12:58:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 12:58:43 -0700 (PDT) Received: from home.linuxace.com (adsl-67-120-171-161.dsl.lsan03.pacbell.net [67.120.171.161]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9PJwacA019552 for ; Mon, 25 Oct 2004 12:58:38 -0700 Received: (qmail 28656 invoked by uid 0); 25 Oct 2004 19:58:15 -0000 Date: Mon, 25 Oct 2004 12:58:15 -0700 From: Phil Oester To: Herbert Xu Cc: linux-net@vger.kernel.org, netdev@oss.sgi.com, "David S. Miller" Subject: Re: 2.6.9 failed assertion in tcp_timer.c Message-ID: <20041025195815.GA28640@linuxace.com> References: <20041020164748.GA20905@linuxace.com> <20041020212651.GA8534@gondor.apana.org.au> <20041020225536.GA22179@linuxace.com> <20041021130339.GA19345@gondor.apana.org.au> <20041021165224.GA25399@linuxace.com> <20041021215743.GA23062@gondor.apana.org.au> <20041022185435.GA30709@linuxace.com> <20041022215040.GA13309@gondor.apana.org.au> <20041022232403.GA14618@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041022232403.GA14618@gondor.apana.org.au> User-Agent: Mutt/1.4.1i X-archive-position: 10808 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: kernel@linuxace.com Precedence: bulk X-list: netdev Content-Length: 1084 Lines: 26 On Sat, Oct 23, 2004 at 09:24:03AM +1000, Herbert Xu wrote: > Actually, I think we've caught your crash now. If that code path > is triggering at all, then it'll trigger with TSO packets too. If > we get a truly partial ack on a TSO packet, then tcp_tso_acked will > not trim it off. So we will fall through to this last-ditch trim > call, which doesn't update packets_out. > > There are two solutions to this problem. I've taken the simpler > approach for now. We simply trim off the partial bits in tcp_tso_acked > and live with the fact that the packet counters may differ from > what's on the netwrok by one. > > Signed-off-by: Herbert Xu > > Later on we can "fix" this by remembering where the original TSO > packet started from, perhaps in skb->h or somewhere. Dave, is this > worth it? Looks like your most recent 2 patches did the trick. Uptime on the test box is over 4 hours, whereas before I could count on a panic within about an hour. I'll continue running 2.6.9 + your patches and let you know if this changes... Thanks, Phil From SRS0+3abdd0dc3a400bffabed+428+infradead.org+arjan@phoenix.srs.infradead.org Mon Oct 25 13:21:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 13:21:07 -0700 (PDT) Received: from phoenix.infradead.org (phoenix.infradead.org [81.187.226.98]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PKL0xi020356 for ; Mon, 25 Oct 2004 13:21:01 -0700 Received: from arjan by phoenix.infradead.org with local (Exim 4.42 #1 (Red Hat Linux)) id 1CMBKc-0001Ht-CT; Mon, 25 Oct 2004 21:20:42 +0100 Date: Mon, 25 Oct 2004 21:20:42 +0100 From: Arjan van de Ven To: jgarzik@pobox.com Cc: netdev@oss.sgi.com Subject: [PATCH 2.6.10-rc1] remove NET_HW_FLOWCONTROL Message-ID: <20041025202042.GA4930@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 10809 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: arjan@infradead.org Precedence: bulk X-list: netdev Content-Length: 5205 Lines: 185 CONFIG_NET_HW_FLOWCONTROL is entirely unused now, and superceded by NAPI in practice, so remove the dead code Signed-off-by: Arjan van de Ven diff -purN linux-2.6.9/include/linux/netdevice.h linux/include/linux/netdevice.h --- linux-2.6.9/include/linux/netdevice.h 2004-10-23 13:07:34.000000000 +0200 +++ linux/include/linux/netdevice.h 2004-10-25 22:08:54.374374481 +0200 @@ -930,8 +930,6 @@ extern void netdev_state_change(struct /* Load a device via the kmod */ extern void dev_load(const char *name); extern void dev_mcast_init(void); -extern int netdev_register_fc(struct net_device *dev, void (*stimul)(struct net_device *dev)); -extern void netdev_unregister_fc(int bit); extern int netdev_max_backlog; extern int weight_p; extern unsigned long netdev_fc_xoff; diff -purN linux-2.6.9/net/Kconfig linux/net/Kconfig --- linux-2.6.9/net/Kconfig 2004-10-18 23:53:10.000000000 +0200 +++ linux/net/Kconfig 2004-10-25 22:14:22.940935390 +0200 @@ -564,24 +564,6 @@ config WAN_ROUTER If unsure, say N. -config NET_HW_FLOWCONTROL - bool "Forwarding between high speed interfaces" - depends on EXPERIMENTAL - ---help--- - This option enables NIC (Network Interface Card) hardware throttling - during periods of extreme congestion. At the moment only a couple - of device drivers support it (really only one -- tulip, a modified - 8390 driver can be found at - ). - - Really, this option is applicable to any machine attached to a fast - enough network, and even a 10 Mb NIC is able to kill a not very slow - box, such as a 120MHz Pentium. - - However, do not say Y here if you did not experience any serious - problems. - - menu "QoS and/or fair queueing" config NET_SCHED diff -purN linux-2.6.9/net/core/dev.c linux/net/core/dev.c --- linux-2.6.9/net/core/dev.c 2004-10-23 13:07:34.000000000 +0200 +++ linux/net/core/dev.c 2004-10-25 22:14:10.183464383 +0200 @@ -1390,66 +1390,6 @@ int mod_cong = 290; DEFINE_PER_CPU(struct netif_rx_stats, netdev_rx_stat) = { 0, }; -#ifdef CONFIG_NET_HW_FLOWCONTROL -atomic_t netdev_dropping = ATOMIC_INIT(0); -static unsigned long netdev_fc_mask = 1; -unsigned long netdev_fc_xoff; -spinlock_t netdev_fc_lock = SPIN_LOCK_UNLOCKED; - -static struct -{ - void (*stimul)(struct net_device *); - struct net_device *dev; -} netdev_fc_slots[BITS_PER_LONG]; - -int netdev_register_fc(struct net_device *dev, - void (*stimul)(struct net_device *dev)) -{ - int bit = 0; - unsigned long flags; - - spin_lock_irqsave(&netdev_fc_lock, flags); - if (netdev_fc_mask != ~0UL) { - bit = ffz(netdev_fc_mask); - netdev_fc_slots[bit].stimul = stimul; - netdev_fc_slots[bit].dev = dev; - set_bit(bit, &netdev_fc_mask); - clear_bit(bit, &netdev_fc_xoff); - } - spin_unlock_irqrestore(&netdev_fc_lock, flags); - return bit; -} - -void netdev_unregister_fc(int bit) -{ - unsigned long flags; - - spin_lock_irqsave(&netdev_fc_lock, flags); - if (bit > 0) { - netdev_fc_slots[bit].stimul = NULL; - netdev_fc_slots[bit].dev = NULL; - clear_bit(bit, &netdev_fc_mask); - clear_bit(bit, &netdev_fc_xoff); - } - spin_unlock_irqrestore(&netdev_fc_lock, flags); -} - -static void netdev_wakeup(void) -{ - unsigned long xoff; - - spin_lock(&netdev_fc_lock); - xoff = netdev_fc_xoff; - netdev_fc_xoff = 0; - while (xoff) { - int i = ffz(~xoff); - xoff &= ~(1 << i); - netdev_fc_slots[i].stimul(netdev_fc_slots[i].dev); - } - spin_unlock(&netdev_fc_lock); -} -#endif - static void get_sample_stats(int cpu) { #ifdef RAND_LIE @@ -1559,13 +1499,8 @@ enqueue: return queue->cng_level; } - if (queue->throttle) { + if (queue->throttle) queue->throttle = 0; -#ifdef CONFIG_NET_HW_FLOWCONTROL - if (atomic_dec_and_test(&netdev_dropping)) - netdev_wakeup(); -#endif - } netif_rx_schedule(&queue->backlog_dev); goto enqueue; @@ -1574,9 +1509,6 @@ enqueue: if (!queue->throttle) { queue->throttle = 1; __get_cpu_var(netdev_rx_stat).throttled++; -#ifdef CONFIG_NET_HW_FLOWCONTROL - atomic_inc(&netdev_dropping); -#endif } drop: @@ -1848,16 +1780,6 @@ static int process_backlog(struct net_de if (work >= quota || jiffies - start_time > 1) break; -#ifdef CONFIG_NET_HW_FLOWCONTROL - if (queue->throttle && - queue->input_pkt_queue.qlen < no_cong_thresh ) { - queue->throttle = 0; - if (atomic_dec_and_test(&netdev_dropping)) { - netdev_wakeup(); - break; - } - } -#endif } backlog_dev->quota -= work; @@ -1872,13 +1794,8 @@ job_done: smp_mb__before_clear_bit(); netif_poll_enable(backlog_dev); - if (queue->throttle) { + if (queue->throttle) queue->throttle = 0; -#ifdef CONFIG_NET_HW_FLOWCONTROL - if (atomic_dec_and_test(&netdev_dropping)) - netdev_wakeup(); -#endif - } local_irq_enable(); return 0; } @@ -3365,12 +3282,6 @@ EXPORT_SYMBOL(br_handle_frame_hook); #ifdef CONFIG_KMOD EXPORT_SYMBOL(dev_load); #endif -#ifdef CONFIG_NET_HW_FLOWCONTROL -EXPORT_SYMBOL(netdev_dropping); -EXPORT_SYMBOL(netdev_fc_xoff); -EXPORT_SYMBOL(netdev_register_fc); -EXPORT_SYMBOL(netdev_unregister_fc); -#endif #ifdef CONFIG_NET_CLS_ACT EXPORT_SYMBOL(ing_filter); From jgarzik@pobox.com Mon Oct 25 13:22:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 13:22:37 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PKMWY6020720 for ; Mon, 25 Oct 2004 13:22:33 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CMBM4-0006sZ-FB; Mon, 25 Oct 2004 21:22:13 +0100 Message-ID: <417D6067.3010102@pobox.com> Date: Mon, 25 Oct 2004 16:21:59 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Arjan van de Ven CC: netdev@oss.sgi.com, "David S. Miller" , jamal Subject: Re: [PATCH 2.6.10-rc1] remove NET_HW_FLOWCONTROL References: <20041025202042.GA4930@infradead.org> In-Reply-To: <20041025202042.GA4930@infradead.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10810 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: 168 Lines: 9 Arjan van de Ven wrote: > CONFIG_NET_HW_FLOWCONTROL is entirely unused now, and superceded by NAPI in > practice, so remove the dead code Ok with me. Jamal? Jeff From davem@davemloft.net Mon Oct 25 13:33:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 13:33:33 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PKXSnU021270 for ; Mon, 25 Oct 2004 13:33:29 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CMBPW-0007g9-00; Mon, 25 Oct 2004 13:25:46 -0700 Date: Mon, 25 Oct 2004 13:25:45 -0700 From: "David S. Miller" To: Phil Oester Cc: herbert@gondor.apana.org.au, linux-net@vger.kernel.org, netdev@oss.sgi.com Subject: Re: 2.6.9 failed assertion in tcp_timer.c Message-Id: <20041025132545.3d8d1890.davem@davemloft.net> In-Reply-To: <20041025195815.GA28640@linuxace.com> References: <20041020164748.GA20905@linuxace.com> <20041020212651.GA8534@gondor.apana.org.au> <20041020225536.GA22179@linuxace.com> <20041021130339.GA19345@gondor.apana.org.au> <20041021165224.GA25399@linuxace.com> <20041021215743.GA23062@gondor.apana.org.au> <20041022185435.GA30709@linuxace.com> <20041022215040.GA13309@gondor.apana.org.au> <20041022232403.GA14618@gondor.apana.org.au> <20041025195815.GA28640@linuxace.com> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10811 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 549 Lines: 15 On Mon, 25 Oct 2004 12:58:15 -0700 Phil Oester wrote: > > Later on we can "fix" this by remembering where the original TSO > > packet started from, perhaps in skb->h or somewhere. Dave, is this > > worth it? > > Looks like your most recent 2 patches did the trick. Uptime on the > test box is over 4 hours, whereas before I could count on a panic > within about an hour. I'll continue running 2.6.9 + your patches > and let you know if this changes... Thanks for testing Phil. Herbert I'll ponder over this patch today. From greearb@candelatech.com Mon Oct 25 13:52:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 13:52:19 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PKq5Q9022024 for ; Mon, 25 Oct 2004 13:52:06 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i9PKwvLH010948; Mon, 25 Oct 2004 13:58:57 -0700 Message-ID: <417D675F.3000909@candelatech.com> Date: Mon, 25 Oct 2004 13:51:43 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "'netdev@oss.sgi.com'" CC: "Linux 802.1Q VLAN" , Francois Romieu Subject: Re: [PATCH] 802.1Q VLAN References: <41797696.9070905@candelatech.com> <20041022214611.GA4948@electric-eye.fr.zoreil.com> <41798506.1030909@candelatech.com> In-Reply-To: <41798506.1030909@candelatech.com> Content-Type: multipart/mixed; boundary="------------000309000109080400000304" X-archive-position: 10812 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Content-Length: 7479 Lines: 274 This is a multi-part message in MIME format. --------------000309000109080400000304 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Ok, I believe I have fixed all the suggestions offered by Francois (thanks!). Please see what you think of this updated patch. The changes have been compile tested...and will pass some data in just a few minutes to make sure nothing funny happens... Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com --------------000309000109080400000304 Content-Type: text/plain; name="vlan.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="vlan.patch" --- linux-2.6.9/net/8021q/vlan_dev.c 2004-10-18 14:55:07.000000000 -0700 +++ linux-2.6.9.p4s/net/8021q/vlan_dev.c 2004-10-25 13:38:32.779294920 -0700 @@ -1,4 +1,4 @@ -/* +/* -*- linux-c -*- * INET 802.1Q VLAN * Ethernet-type device handling. * @@ -484,13 +484,26 @@ veth->h_vlan_proto, veth->h_vlan_TCI, veth->h_vlan_encapsulated_proto); #endif - stats->tx_packets++; /* for statics only */ - stats->tx_bytes += skb->len; - skb->dev = VLAN_DEV_INFO(dev)->real_dev; - dev_queue_xmit(skb); - return 0; + { + /* Please note, dev_queue_xmit consumes the pkt regardless of the + * error value. So, will copy the skb first and free if successful. + */ + struct sk_buff* skb2 = skb_get(skb); + int rv = dev_queue_xmit(skb2); + if (rv == 0) { + /* Was success, need to free the skb reference since we bumped up the + * user count above. + */ + + stats->tx_packets++; /* for statics only */ + stats->tx_bytes += skb->len; + + kfree_skb(skb); + } + return rv; + } } int vlan_dev_hwaccel_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) @@ -622,7 +635,45 @@ return -EINVAL; } + +int vlan_dev_get_realdev_name(const char *dev_name, char* result) +{ + struct net_device *dev = dev_get_by_name(dev_name); + int rv = 0; + if (dev) { + if (dev->priv_flags & IFF_802_1Q_VLAN) { + strncpy(result, VLAN_DEV_INFO(dev)->real_dev->name, 23); + rv = 0; + } else { + rv = -EINVAL; + } + dev_put(dev); + } else { + rv = -ENODEV; + } + return rv; +} + +int vlan_dev_get_vid(const char *dev_name, unsigned short* result) +{ + struct net_device *dev = dev_get_by_name(dev_name); + int rv = 0; + if (dev) { + if (dev->priv_flags & IFF_802_1Q_VLAN) { + *result = VLAN_DEV_INFO(dev)->vlan_id; + rv = 0; + } else { + rv = -EINVAL; + } + dev_put(dev); + } else { + rv = -ENODEV; + } + return rv; +} + + int vlan_dev_set_mac_address(struct net_device *dev, void *addr_struct_p) { struct sockaddr *addr = (struct sockaddr *)(addr_struct_p); --- linux-2.6.9/net/8021q/vlan.c 2004-10-18 14:54:55.000000000 -0700 +++ linux-2.6.9.p4s/net/8021q/vlan.c 2004-10-22 12:14:24.000000000 -0700 @@ -1,4 +1,4 @@ -/* +/* -*- linux-c -*- * INET 802.1Q VLAN * Ethernet-type device handling. * @@ -646,15 +646,9 @@ static int vlan_ioctl_handler(void __user *arg) { int err = 0; + unsigned short vid = 0; struct vlan_ioctl_args args; - /* everything here needs root permissions, except aguably the - * hack ioctls for sending packets. However, I know _I_ don't - * want users running that on my network! --BLG - */ - if (!capable(CAP_NET_ADMIN)) - return -EPERM; - if (copy_from_user(&args, arg, sizeof(struct vlan_ioctl_args))) return -EFAULT; @@ -668,24 +662,32 @@ switch (args.cmd) { case SET_VLAN_INGRESS_PRIORITY_CMD: + if (!capable(CAP_NET_ADMIN)) + return -EPERM; err = vlan_dev_set_ingress_priority(args.device1, args.u.skb_priority, args.vlan_qos); break; case SET_VLAN_EGRESS_PRIORITY_CMD: + if (!capable(CAP_NET_ADMIN)) + return -EPERM; err = vlan_dev_set_egress_priority(args.device1, args.u.skb_priority, args.vlan_qos); break; case SET_VLAN_FLAG_CMD: + if (!capable(CAP_NET_ADMIN)) + return -EPERM; err = vlan_dev_set_vlan_flag(args.device1, args.u.flag, args.vlan_qos); break; case SET_VLAN_NAME_TYPE_CMD: + if (!capable(CAP_NET_ADMIN)) + return -EPERM; if ((args.u.name_type >= 0) && (args.u.name_type < VLAN_NAME_TYPE_HIGHEST)) { vlan_name_type = args.u.name_type; @@ -695,17 +697,9 @@ } break; - /* TODO: Figure out how to pass info back... - case GET_VLAN_INGRESS_PRIORITY_IOCTL: - err = vlan_dev_get_ingress_priority(args); - break; - - case GET_VLAN_EGRESS_PRIORITY_IOCTL: - err = vlan_dev_get_egress_priority(args); - break; - */ - case ADD_VLAN_CMD: + if (!capable(CAP_NET_ADMIN)) + return -EPERM; /* we have been given the name of the Ethernet Device we want to * talk to: args.dev1 We also have the * VLAN ID: args.u.VID @@ -718,13 +712,52 @@ break; case DEL_VLAN_CMD: + if (!capable(CAP_NET_ADMIN)) + return -EPERM; /* Here, the args.dev1 is the actual VLAN we want * to get rid of. */ err = unregister_vlan_device(args.device1); break; + case GET_VLAN_INGRESS_PRIORITY_CMD: + /* TODO: Implement + err = vlan_dev_get_ingress_priority(args); + if (copy_to_user((void*)arg, &args, + sizeof(struct vlan_ioctl_args))) { + err = -EFAULT; + } + */ + err = -EINVAL; + break; + case GET_VLAN_EGRESS_PRIORITY_CMD: + /* TODO: Implement + err = vlan_dev_get_egress_priority(args.device1, &(args.args); + if (copy_to_user((void*)arg, &args, + sizeof(struct vlan_ioctl_args))) { + err = -EFAULT; + } + */ + err = -EINVAL; + break; + case GET_VLAN_REALDEV_NAME_CMD: + err = vlan_dev_get_realdev_name(args.device1, args.u.device2); + if (copy_to_user((void*)arg, &args, + sizeof(struct vlan_ioctl_args))) { + err = -EFAULT; + } + break; + + case GET_VLAN_VID_CMD: + err = vlan_dev_get_vid(args.device1, &vid); + args.u.VID = vid; + if (copy_to_user((void*)arg, &args, + sizeof(struct vlan_ioctl_args))) { + err = -EFAULT; + } + break; + default: /* pass on to underlying device instead?? */ printk(VLAN_DBG "%s: Unknown VLAN CMD: %x \n", --- linux-2.6.9/net/8021q/vlan.h 2004-10-18 14:54:37.000000000 -0700 +++ linux-2.6.9.p4s/net/8021q/vlan.h 2004-10-22 12:14:24.000000000 -0700 @@ -66,7 +66,9 @@ int vlan_dev_set_ingress_priority(char* dev_name, __u32 skb_prio, short vlan_prio); int vlan_dev_set_egress_priority(char* dev_name, __u32 skb_prio, short vlan_prio); int vlan_dev_set_vlan_flag(char* dev_name, __u32 flag, short flag_val); +int vlan_dev_get_realdev_name(const char* dev_name, char* result); +int vlan_dev_get_vid(const char* dev_name, unsigned short* result); void vlan_dev_set_multicast_list(struct net_device *vlan_dev); #endif /* !(__BEN_VLAN_802_1Q_INC__) */ --- linux-2.6.9/include/linux/if_vlan.h 2004-10-18 14:53:43.000000000 -0700 +++ linux-2.6.9.p4s/include/linux/if_vlan.h 2004-10-22 15:05:52.000000000 -0700 @@ -1,4 +1,4 @@ -/* +/* -*- linux-c -*- * VLAN An implementation of 802.1Q VLAN tagging. * * Authors: Ben Greear @@ -366,7 +366,9 @@ GET_VLAN_INGRESS_PRIORITY_CMD, GET_VLAN_EGRESS_PRIORITY_CMD, SET_VLAN_NAME_TYPE_CMD, - SET_VLAN_FLAG_CMD + SET_VLAN_FLAG_CMD, + GET_VLAN_REALDEV_NAME_CMD, /* If this works, you know it's a VLAN device, btw */ + GET_VLAN_VID_CMD /* Get the VID of this VLAN (specified by name) */ }; enum vlan_name_types { --------------000309000109080400000304-- From Brian.Haley@hp.com Mon Oct 25 14:29:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 14:29:22 -0700 (PDT) Received: from ztxmail03.ztx.compaq.com (ztxmail03.ztx.compaq.com [161.114.1.207]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PLTHXb022875 for ; Mon, 25 Oct 2004 14:29:17 -0700 Received: from mailrelay01.cce.cpqcorp.net (mailrelay01.cce.cpqcorp.net [16.47.68.171]) by ztxmail03.ztx.compaq.com (Postfix) with ESMTP id B7C3C5EE; Mon, 25 Oct 2004 16:28:56 -0500 (CDT) Received: from kitche.zk3.dec.com (kitche2.zk3.dec.com [16.140.160.162]) by mailrelay01.cce.cpqcorp.net (Postfix) with ESMTP id 3B192C4; Mon, 25 Oct 2004 16:28:56 -0500 (CDT) Received: from [127.0.0.1] by kitche.zk3.dec.com (8.9.3/1.1.27.5/27Oct00-1235PM) id RAA0001160348; Mon, 25 Oct 2004 17:28:55 -0400 (EDT) Message-ID: <417D6FD0.7010903@hp.com> Date: Mon, 25 Oct 2004 17:27:44 -0400 From: Brian Haley Organization: Linux and Open Source Lab User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040803 X-Accept-Language: en-us, en MIME-Version: 1.0 To: yoshfuji@linux-ipv6.org Cc: davem@davemloft.net, netdev@oss.sgi.com, kazunori@miyazawa.org Subject: Re: [PATCH, TAKE 2] [IPV6] XFRM: extract xfrm_lookup() from ip6_dst_lookup() (is Re: [PATCH][IPv6] separation xfrm_lookup from ip6_dst_lookup) References: <20040730171205.114f22ba.kazunori@miyazawa.org> <20040801195135.16734846.davem@redhat.com> <20040828.014935.131415609.yoshfuji@linux-ipv6.org> In-Reply-To: <20040828.014935.131415609.yoshfuji@linux-ipv6.org> Content-Type: multipart/mixed; boundary="------------080602020509050608080305" X-archive-position: 10813 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Brian.Haley@hp.com Precedence: bulk X-list: netdev Content-Length: 4688 Lines: 90 This is a multi-part message in MIME format. --------------080602020509050608080305 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit YOSHIFUJI Hideaki / å‰è—¤è‹±æ˜Ž wrote: > Here's the updated patch. Hi, I finally tracked-down the patch that fixed the IPv6 routing header problems I'd been seeing :) But I think you missed one code path from the original patch Kazunori posted in tcp_v6_xmit(), which I think is only called from the ND code. Attached is a patch that fixes that and also brings the rt0_hdr struct in-line with RFC 3542 by removing the "bitmap" field. Thanks, -Brian -- Brian Haley, HP Linux and Open Source Lab --------------080602020509050608080305 Content-Type: text/plain; name="rt0.diffs" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="rt0.diffs" U2lnbmVkLW9mZi1ieTogQnJpYW4uSGFsZXlAaHAuY29tCgotLS0gbGludXgtMi42Ljkub3Jp Zy9pbmNsdWRlL2xpbnV4L2lwdjYuaAkyMDA0LTEwLTE4IDE3OjU0OjM5LjAwMDAwMDAwMCAt MDQwMAorKysgbGludXgtMi42LjkucnQwL2luY2x1ZGUvbGludXgvaXB2Ni5oCTIwMDQtMTAt MjIgMTc6MTU6NTIuMDAwMDAwMDAwIC0wNDAwCkBAIC02OCw3ICs2OCw3IEBACiAKIHN0cnVj dCBydDBfaGRyIHsKIAlzdHJ1Y3QgaXB2Nl9ydF9oZHIJcnRfaGRyOwotCV9fdTMyCQkJYml0 bWFwOwkJLyogc3RyaWN0L2xvb3NlIGJpdCBtYXAgKi8KKwlfX3UzMgkJCXJ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WZvciAoaT0wOyBpPG47IGkrKykKIAkJbWVt Y3B5KGlydGhkci0+YWRkcitpLCBydGhkci0+YWRkcisobi0xLWkpLCAxNik7Cg== --------------080602020509050608080305-- From demon@pro-linux.de Mon Oct 25 14:31:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 14:31:26 -0700 (PDT) Received: from 4demon.com (s15132518.rootmaster.info [217.160.186.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PLVKQh023246 for ; Mon, 25 Oct 2004 14:31:21 -0700 Received: from pro-linux.de (p508B20A0.dip.t-dialin.net [80.139.32.160]) by 4demon.com (Postfix) with ESMTP id 90BD8140008; Mon, 25 Oct 2004 23:31:03 +0200 (CEST) Message-ID: <417D7259.2020800@pro-linux.de> Date: Mon, 25 Oct 2004 23:38:33 +0200 From: Mirko Lindner User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7a) Gecko/20040221 X-Accept-Language: en-us, en MIME-Version: 1.0 To: hch@infradead.org, netdev@oss.sgi.com Subject: Re: [PATCH] sk98lin: Driver update v7.09 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10814 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: demon@pro-linux.de Precedence: bulk X-list: netdev Content-Length: 1453 Lines: 35 On Fri, Oct 22, 2004 at 03:14:41PM +0200, Mirko Lindner wrote: >> Hi dev-list, >> Hi Jeff, >> >> here is the new version (v7.09) from our sk98lin driver for Kernel 2.6. >> Sorry for this huge patch but this version has a lot of new functions >> and changes. The driver was tested by our Test & Verification group and >> our OEM customers and include all kernel changes during the latest >> kernel release. >> >> Please send me an email if you like a version of the driver for kernel >> 2.4 or if you have any problems or questions. >> >> The new patch for BK version 2.6.9 bk6 can be find at: >> http://www.syskonnect.de/support/temp/sk98lin_v7.09_2.6.9-bk6_patch > Standard disclaimer: please submit small incremental patches that fix > specific issue. Sorry for the big patch but it's not possible to split the driver into small pieces. As mentioned the submission isn't a bugfix release of the old v6 driver with small additions. The new version 7.09 is a new driver based on the old sk98lin driver with a support for two new chipsets from Marvell (Yukon EC and Yukon FE). Yes, I know. The patch is huge but the Yukon chipset has a different buffer handling and many register and hw changes I will be out of the office till Thursday. After the LWE we will merge the new changes from Stephen into the new driver version. We have also small fixes for the 7.09 and I think I'll release the 7.10 at the end of the next week. Mirko From greearb@candelatech.com Mon Oct 25 14:43:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 14:43:27 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PLhLbC023916 for ; Mon, 25 Oct 2004 14:43:21 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i9PLoKLH011705 for ; Mon, 25 Oct 2004 14:50:20 -0700 Message-ID: <417D736A.6080207@candelatech.com> Date: Mon, 25 Oct 2004 14:43:06 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "'netdev@oss.sgi.com'" Subject: Add ability to receive and transmit ethernet frames with bad CRC (e1000) Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10815 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Content-Length: 8738 Lines: 257 I have patched the e1000 driver to allow one to send frames with bad (ie, custom) CRCs, as well as receive packets with bad CRCs and other errors. The receive logic should be very useful for packet sniffing, and the tx is useful for testing error cases for ethernet equipment. The rest of the patch to turn on/off these bits is tangled in with ethtool changes and several other files, but I will dis-entangle them if it is agreed that this feature is desired. I also have driver support for the e100 driver. Comments welcome, and let me know if it's worth my time to break out the other components of this feature from my big patch. Thanks, Ben --- linux-2.6.9/drivers/net/e1000/e1000_main.c 2004-10-18 14:53:50.000000000 -0700 +++ linux-2.6.9.p4s/drivers/net/e1000/e1000_main.c 2004-10-22 12:35:22.000000000 -0700 @@ -1,4 +1,4 @@ -/******************************************************************************* +/** -*-linux-c -*- *************************************************************** Copyright(c) 1999 - 2004 Intel Corporation. All rights reserved. @@ -120,7 +120,7 @@ static void e1000_setup_rctl(struct e1000_adapter *adapter); static void e1000_clean_tx_ring(struct e1000_adapter *adapter); static void e1000_clean_rx_ring(struct e1000_adapter *adapter); -static void e1000_set_multi(struct net_device *netdev); +void e1000_set_multi(struct net_device *netdev); static void e1000_update_phy_info(unsigned long data); static void e1000_watchdog(unsigned long data); static void e1000_82547_tx_fifo_stall(unsigned long data); @@ -499,6 +499,10 @@ if(pci_using_dac) netdev->features |= NETIF_F_HIGHDMA; + /* Has ability to receive all frames (even bad CRCs and such) */ + netdev->features |= NETIF_F_RX_ALL | NETIF_F_SAVE_CRC; + + /* hard_start_xmit is safe against parallel locking */ netdev->features |= NETIF_F_LLTX; @@ -1269,7 +1273,7 @@ * promiscuous mode, and all-multi behavior. **/ -static void +void e1000_set_multi(struct net_device *netdev) { struct e1000_adapter *adapter = netdev->priv; @@ -1297,6 +1301,35 @@ E1000_WRITE_REG(hw, RCTL, rctl); + + /* This is useful for using ethereal or tcpdump to sniff + * packets in promiscuous mode without stripping VLAN/priority + * information, and also letting bad packets through. + * + * THIS IS NOT PRODUCTION CODE - FOR INTERNAL USE ONLY!!! + * + */ + if (netdev->priv_flags & IFF_ACCEPT_ALL_FRAMES) { + uint32_t ctrl; + /*printk("%s: Enabling acceptance of ALL frames (bad CRC too).\n", + netdev->name); */ + /* store bad packets, promisc/multicast all, no VLAN + * filter */ + rctl = E1000_READ_REG(hw, RCTL); + rctl |= (E1000_RCTL_SBP | E1000_RCTL_UPE | E1000_RCTL_MPE); + rctl &= ~(E1000_RCTL_VFE | E1000_RCTL_CFIEN); + E1000_WRITE_REG(hw, RCTL, rctl); + /* disable VLAN tagging/striping */ + ctrl = E1000_READ_REG(hw, CTRL); + ctrl &= ~E1000_CTRL_VME; + E1000_WRITE_REG(hw, CTRL, ctrl); + } + else { + /* TODO: Do we need a way to explicitly turn this off if it was + * previously enabled, or will it magically go back to normal??? --Ben + */ + } + /* 82542 2.0 needs to be in reset to write receive address registers */ if(hw->mac_type == e1000_82542_rev2_0) @@ -1493,6 +1526,7 @@ #define E1000_TX_FLAGS_CSUM 0x00000001 #define E1000_TX_FLAGS_VLAN 0x00000002 #define E1000_TX_FLAGS_TSO 0x00000004 +#define E1000_TX_FLAGS_NO_FCS 0x00000008 #define E1000_TX_FLAGS_VLAN_MASK 0xffff0000 #define E1000_TX_FLAGS_VLAN_SHIFT 16 @@ -1697,6 +1731,13 @@ txd_upper |= (tx_flags & E1000_TX_FLAGS_VLAN_MASK); } +#ifdef CONFIG_SUPPORT_SEND_BAD_CRC + if (unlikely(tx_flags & E1000_TX_FLAGS_NO_FCS)) { + txd_lower &= ~(E1000_TXD_CMD_IFCS); + /* printk("Disabling CRC in tx_queue, txd_lower: 0x%x\n", txd_lower); */ + } +#endif + i = tx_ring->next_to_use; while(count--) { @@ -1711,6 +1752,14 @@ tx_desc->lower.data |= cpu_to_le32(adapter->txd_cmd); +#ifdef CONFIG_SUPPORT_SEND_BAD_CRC + /* txd_cmd re-enables FCS, so we'll re-disable it here as desired. */ + if (unlikely(tx_flags & E1000_TX_FLAGS_NO_FCS)) { + tx_desc->lower.data &= ~(cpu_to_le32(E1000_TXD_CMD_IFCS)); + /* printk("Disabling2 CRC in tx_queue, txd_lower: 0x%x\n", tx_desc->lower.data); */ + } +#endif + /* Force memory writes to complete before letting h/w * know there are new descriptors to fetch. (Only * applicable for weak-ordered memory model archs, @@ -1849,6 +1898,12 @@ else if(likely(e1000_tx_csum(adapter, skb))) tx_flags |= E1000_TX_FLAGS_CSUM; +#ifdef CONFIG_SUPPORT_SEND_BAD_CRC + if (unlikely(skb->general_flags & DONT_DO_TX_CRC)) { + tx_flags |= E1000_TX_FLAGS_NO_FCS; + } +#endif + e1000_tx_queue(adapter, e1000_tx_map(adapter, skb, first, max_per_txd, nr_frags, mss), tx_flags); @@ -2307,7 +2362,11 @@ goto next_desc; } - if(unlikely(rx_desc->errors & E1000_RXD_ERR_FRAME_ERR_MASK)) { + /* If we are accepting all frames, then do not pay attention to the + * framing errors. + */ + if (unlikely(rx_desc->errors & E1000_RXD_ERR_FRAME_ERR_MASK) && + !(netdev->priv_flags & IFF_ACCEPT_ALL_FRAMES)) { last_byte = *(skb->data + length - 1); if(TBI_ACCEPT(&adapter->hw, rx_desc->status, rx_desc->errors, length, last_byte)) { @@ -2325,7 +2384,12 @@ } /* Good Receive */ - skb_put(skb, length - ETHERNET_FCS_SIZE); + if (netdev->priv_flags & IFF_SAVE_FCS) { + skb_put(skb, length); + } + else { + skb_put(skb, length - ETHERNET_FCS_SIZE); + } /* Receive Checksum Offload */ e1000_rx_checksum(adapter, rx_desc, skb); --- linux-2.6.9/drivers/net/e1000/e1000_ethtool.c 2004-10-18 14:54:07.000000000 -0700 +++ linux-2.6.9.p4s/drivers/net/e1000/e1000_ethtool.c 2004-10-22 12:14:24.000000000 -0700 @@ -1,4 +1,4 @@ -/******************************************************************************* +/*** -*-linux-c-*- ************************************************************** Copyright(c) 1999 - 2004 Intel Corporation. All rights reserved. @@ -39,6 +39,7 @@ extern void e1000_down(struct e1000_adapter *adapter); extern void e1000_reset(struct e1000_adapter *adapter); extern int e1000_set_spd_dplx(struct e1000_adapter *adapter, uint16_t spddplx); +extern void e1000_set_multi(struct net_device *netdev); extern int e1000_setup_rx_resources(struct e1000_adapter *adapter); extern int e1000_setup_tx_resources(struct e1000_adapter *adapter); extern void e1000_free_rx_resources(struct e1000_adapter *adapter); @@ -1612,6 +1613,58 @@ } } +static int e1000_ethtool_setrxall(struct net_device *netdev, uint32_t val) { + unsigned short old_flags = netdev->priv_flags; + if (val) { + netdev->priv_flags |= IFF_ACCEPT_ALL_FRAMES; + } + else { + netdev->priv_flags &= ~(IFF_ACCEPT_ALL_FRAMES); + } + + /* printk("e1000_ethtool_setrxall (%s) val: %d\n", + netdev->name, val); */ + if (old_flags != netdev->priv_flags) { + spin_lock_bh(&netdev->xmit_lock); + if (netif_running(netdev)) { + /*printk("Kicking e1000 for setrxall..\n");*/ + e1000_set_multi(netdev); + } else { + /* Value will be flushed into the hardware when the device is + * brought up. + */ + } + spin_unlock_bh(&netdev->xmit_lock); + } + return 0; +} + +static int e1000_ethtool_set_save_fcs(struct net_device *netdev, uint32_t val) { + spin_lock_bh(&netdev->xmit_lock); + if (val) { + netdev->priv_flags |= IFF_SAVE_FCS; + } + else { + netdev->priv_flags &= ~IFF_SAVE_FCS; + } + spin_unlock_bh(&netdev->xmit_lock); + return 0; +} + +static int e1000_ethtool_get_save_fcs(struct net_device *netdev, uint32_t* val) { + *val = !!(netdev->priv_flags & IFF_SAVE_FCS); + /*printk("GETRXALL, data: %d priv_flags: %hx\n", + edata.data, netdev->priv_flags);*/ + return 0; +} + +static int e1000_ethtool_getrxall(struct net_device *netdev, uint32_t* val) { + *val = !!(netdev->priv_flags & IFF_ACCEPT_ALL_FRAMES); + /*printk("GETRXALL, data: %d priv_flags: %hx\n", + edata.data, netdev->priv_flags);*/ + return 0; +} + struct ethtool_ops e1000_ethtool_ops = { .get_settings = e1000_get_settings, .set_settings = e1000_set_settings, @@ -1647,6 +1700,10 @@ .phys_id = e1000_phys_id, .get_stats_count = e1000_get_stats_count, .get_ethtool_stats = e1000_get_ethtool_stats, + .get_rx_all = e1000_ethtool_getrxall, + .set_rx_all = e1000_ethtool_setrxall, + .set_save_fcs = e1000_ethtool_set_save_fcs, + .get_save_fcs = e1000_ethtool_get_save_fcs, }; void set_ethtool_ops(struct net_device *netdev) -- Ben Greear Candela Technologies Inc http://www.candelatech.com From shemminger@osdl.org Mon Oct 25 15:28:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 15:28:20 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PMSFjt025429 for ; Mon, 25 Oct 2004 15:28:15 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9PMRrWL027955 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 25 Oct 2004 15:27:54 -0700 Date: Mon, 25 Oct 2004 15:29:13 -0700 From: Stephen Hemminger To: Denis Vlasenko Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Jeff Garzik Subject: Re: 2.6.9 SMP: via-rhine cannot be upped. Message-Id: <20041025152913.1f003eb4@zqx3.pdx.osdl.net> In-Reply-To: <200410231559.28215.vda@port.imtp.ilyichevsk.odessa.ua> References: <200410231559.28215.vda@port.imtp.ilyichevsk.odessa.ua> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i9PMSFjt025429 X-archive-position: 10816 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 Content-Length: 4246 Lines: 91 On Sat, 23 Oct 2004 15:59:28 +0300 Denis Vlasenko wrote: > I reported this yesterday but somehow managed to mess up configs > and accidentally compiled 2.6.9 for SMP! :( > > I just checked that it does not happen on non-SMP 2.6.9. > 2.6.9-preempt is working too. > > Here goes a problem description again. > > I have an onboard VIA eth: > > # lspci > 00:00.0 Host bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333] > 00:01.0 PCI bridge: VIA Technologies, Inc. VT8366/A/7 [Apollo KT266/A/333 AGP] > 00:0a.0 Network controller: Texas Instruments ACX 111 54Mbps Wireless Interface > 00:0c.0 Network controller: Harris Semiconductor D-Links DWL-g650 A1 (rev 01) > 00:10.0 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 80) > 00:10.1 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 80) > 00:10.2 USB Controller: VIA Technologies, Inc. VT6202 [USB 2.0 controller] (rev 80) > 00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82) > 00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge > 00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C/VT8235 PIPC Bus Master IDE (rev 06) > 00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50) > 00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 74) > 01:00.0 VGA compatible controller: nVidia Corporation NV11 [GeForce2 MX/MX 400] (rev a1) > > It cannot be upped: > > # ip l set dev if up > SIOCSIFFLAGS: Function not implemented > # ifconfig if up > SIOCSIFFLAGS: Function not implemented > # busybox ip l set dev if up > SIOCSIFFLAGS: Function not implemented > > (NB: ip and ifconfig are not busyboxed, they are "standard" ones) > > Strace (busybox one is smallest): > > execve("/usr/bin/busybox", ["busybox", "ip", "l", "set", "dev", "if", "up"], [/* 28 vars */]) = 0 > fcntl64(0, F_GETFD)                     = 0 > fcntl64(1, F_GETFD)                     = 0 > fcntl64(2, F_GETFD)                     = 0 > uname({sys="Linux", node="shadow", ...}) = 0 > geteuid32()                             = 0 > getuid32()                              = 0 > getegid32()                             = 0 > getgid32()                              = 0 > brk(0)                                  = 0x81ab000 > brk(0x81ac000)                          = 0x81ac000 > socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4 > ioctl(4, 0x8913, 0xbffff9e0)            = 0 > ioctl(4, 0x8914, 0xbffff9e0)            = -1 ENOSYS (Function not implemented) > dup(2)                                  = 5 > fcntl64(5, F_GETFL)                     = 0x2 (flags O_RDWR) > fstat64(5, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 2), ...}) = 0 > old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40000000 > _llseek(5, 0, 0xbffff830, SEEK_CUR)     = -1 ESPIPE (Illegal seek) > write(5, "SIOCSIFFLAGS: Function not imple"..., 39) = 39 > close(5)                                = 0 > munmap(0x40000000, 4096)                = 0 > close(4)                                = 0 > write(2, "BusyBox v1.00-pre8 (2004.03.31-2"..., 295) = 295 > _exit(1) > > I booted with init=/bin/sh and ran 'ip l set dev eth0 up' > - it fails under 2.6.9-smp. This rules out my userspace setup > being somehow involved (for example, the fact that I rename iface > from 'eth0' to 'if' does not contribute to the bug). > > My 2.6.9-smp config is attached. My suspicion is that the eth0 device is not actually the VIA driver at all. Since your config builds many drivers directly into the kernel, probably one of the others created an eth0 device. There is no guarantee of initialization order about which device gets created first (at least the way network devices are done in 2.6). You should investigate if there are multiple devices present (ifconfig -a or ls /sys/class/net). Perhaps one of the other drivers does not correctly handle the case of hardware not being present and leaves a ghost behind.. One way to find out would be to look at: /sys/class/net/eth0/device/vendor /sys/class/net/eth0/device/device /sys/class/net/eth0/device/subsystem_vendor /sys/class/net/eth0/device/subsystem_device From hadi@cyberus.ca Mon Oct 25 15:36:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 15:36:42 -0700 (PDT) Received: from mx01.cybersurf.com (mx01.cybersurf.com [209.197.145.104]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PMabnZ025865 for ; Mon, 25 Oct 2004 15:36:38 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx01.cybersurf.com with esmtp (Exim 4.30) id 1CMDRt-0000FC-VJ for netdev@oss.sgi.com; Mon, 25 Oct 2004 18:36:21 -0400 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CMDRn-0002dC-Fi; Mon, 25 Oct 2004 18:36:15 -0400 Subject: Re: [PATCH 2.6.10-rc1] remove NET_HW_FLOWCONTROL From: jamal Reply-To: hadi@cyberus.ca To: Jeff Garzik Cc: Arjan van de Ven , netdev@oss.sgi.com, "David S. Miller" In-Reply-To: <417D6067.3010102@pobox.com> References: <20041025202042.GA4930@infradead.org> <417D6067.3010102@pobox.com> Content-Type: text/plain Organization: jamalopolous Message-Id: <1098743771.1043.11.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 25 Oct 2004 18:36:11 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 10817 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev Content-Length: 334 Lines: 18 nuke it. I only know of one user of it in 2.4.x. If possible leave 2.4.x alone. cheers, jamal On Mon, 2004-10-25 at 16:21, Jeff Garzik wrote: > Arjan van de Ven wrote: > > CONFIG_NET_HW_FLOWCONTROL is entirely unused now, and superceded by NAPI in > > practice, so remove the dead code > > Ok with me. Jamal? > > Jeff > > > From jgarzik@pobox.com Mon Oct 25 16:02:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 16:02:43 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PN2cor026818 for ; Mon, 25 Oct 2004 16:02:39 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CMDr2-00022a-SV; Tue, 26 Oct 2004 00:02:21 +0100 Message-ID: <417D85F1.9010400@pobox.com> Date: Mon, 25 Oct 2004 19:02:09 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: hadi@cyberus.ca CC: Arjan van de Ven , netdev@oss.sgi.com, "David S. Miller" Subject: Re: [PATCH 2.6.10-rc1] remove NET_HW_FLOWCONTROL References: <20041025202042.GA4930@infradead.org> <417D6067.3010102@pobox.com> <1098743771.1043.11.camel@jzny.localdomain> In-Reply-To: <1098743771.1043.11.camel@jzny.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10818 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: 132 Lines: 10 jamal wrote: > nuke it. > I only know of one user of it in 2.4.x. If possible leave 2.4.x alone. ok, will apply, thanks. Jeff From shemminger@osdl.org Mon Oct 25 16:13:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 16:13:36 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PNDSun027358 for ; Mon, 25 Oct 2004 16:13:28 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9PND7WL031869 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Mon, 25 Oct 2004 16:13:07 -0700 Date: Mon, 25 Oct 2004 16:14:28 -0700 From: Stephen Hemminger To: netdev@oss.sgi.com Subject: Fw: [Bug 3610] New: kernel-2.6.9 breaks Amanda Message-Id: <20041025161428.3b34b1e7@zqx3.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Mon__25_Oct_2004_16_14_28_-0700_JPJTxy13XnFlLmSG" X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10819 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 Content-Length: 6378 Lines: 112 This is a multi-part message in MIME format. --Multipart=_Mon__25_Oct_2004_16_14_28_-0700_JPJTxy13XnFlLmSG Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Here are the traces Bill sent me. No indication of UDP checksum errors. > >>Problem Description: Amanda clients exchanges UDP packets with the server giving >>it a TCP port number with which to connect in order to receive files to be >>dumped to tape. Under kernel-2.6.8.1 the sofware performs perfectly. Under >>kernel-2.6.9, with exactly the same Amanda software, the UDP packet exchange >>seems to occur, but no TCP connection between client and server occurs. The >>client eventually times out with messages like: >> >> > >Could you capture a tcpdump of the exchange, especially the failed connection attempt? > > Here are two traces, one on the Amanada server machine, one on the client machine. Not very useful, as there is no sign that the server even attempts to connect to the client with a TCP connection. --------------------------------------- 12:01:25.948611 IP 172.16.240.36.706 > 172.16.240.17.10080: UDP, length 117 12:01:25.951372 IP 172.16.240.17.10080 > 172.16.240.36.706: UDP, length 50 12:01:25.951904 IP 172.16.240.17.10080 > 172.16.240.36.706: UDP, length 83 12:01:25.952031 IP 172.16.240.36.706 > 172.16.240.17.10080: UDP, length 50 12:01:25.952425 IP 172.16.240.36.706 > 172.16.240.17.10080: UDP, length 329 12:01:25.955552 IP 172.16.240.17.10080 > 172.16.240.36.706: UDP, length 50 12:01:26.023487 IP 172.16.240.17.10080 > 172.16.240.36.706: UDP, length 116 12:01:26.023732 IP 172.16.240.36.706 > 172.16.240.17.10080: UDP, length 50 12:01:26.026096 IP 172.16.240.36.710 > 172.16.240.17.10080: UDP, length 236 12:01:26.028704 IP 172.16.240.17.10080 > 172.16.240.36.710: UDP, length 50 12:01:26.032026 IP 172.16.240.17.10080 > 172.16.240.36.710: UDP, length 125 12:01:36.030832 IP 172.16.240.17.10080 > 172.16.240.36.710: UDP, length 125 12:01:46.029536 IP 172.16.240.17.10080 > 172.16.240.36.710: UDP, length 125 12:01:56.028276 IP 172.16.240.17.10080 > 172.16.240.36.710: UDP, length 125 12:02:06.026973 IP 172.16.240.17.10080 > 172.16.240.36.710: UDP, length 125 --------------------------------------- 12:01:21.636090 IP 172.16.240.36.706 > 172.16.240.17.10080: UDP, length 117 12:01:21.638787 IP 172.16.240.17.10080 > 172.16.240.36.706: UDP, length 50 12:01:21.639324 IP 172.16.240.17.10080 > 172.16.240.36.706: UDP, length 83 12:01:21.639539 IP 172.16.240.36.706 > 172.16.240.17.10080: UDP, length 50 12:01:21.639982 IP 172.16.240.36.706 > 172.16.240.17.10080: UDP, length 329 12:01:21.642965 IP 172.16.240.17.10080 > 172.16.240.36.706: UDP, length 50 12:01:21.710888 IP 172.16.240.17.10080 > 172.16.240.36.706: UDP, length 116 12:01:21.711239 IP 172.16.240.36.706 > 172.16.240.17.10080: UDP, length 50 12:01:21.713642 IP 172.16.240.36.710 > 172.16.240.17.10080: UDP, length 236 12:01:21.716120 IP 172.16.240.17.10080 > 172.16.240.36.710: UDP, length 50 12:01:21.719435 IP 172.16.240.17.10080 > 172.16.240.36.710: UDP, length 125 12:01:31.718004 IP 172.16.240.17.10080 > 172.16.240.36.710: UDP, length 125 12:01:41.716472 IP 172.16.240.17.10080 > 172.16.240.36.710: UDP, length 125 12:01:51.714977 IP 172.16.240.17.10080 > 172.16.240.36.710: UDP, length 125 12:02:01.713437 IP 172.16.240.17.10080 > 172.16.240.36.710: UDP, length 125 12:12:33.133935 IP 172.16.240.36.32775 > 172.16.240.17.22: P 1:49(48) ack 224 win 7504 --Multipart=_Mon__25_Oct_2004_16_14_28_-0700_JPJTxy13XnFlLmSG Content-Type: text/plain; name="obf_srv.20041022.dmp" Content-Disposition: attachment; filename="obf_srv.20041022.dmp" Content-Transfer-Encoding: 7bit 12:01:25.948611 IP 172.16.240.36.706 > 172.16.240.17.10080: UDP, length 117 12:01:25.951372 IP 172.16.240.17.10080 > 172.16.240.36.706: UDP, length 50 12:01:25.951904 IP 172.16.240.17.10080 > 172.16.240.36.706: UDP, length 83 12:01:25.952031 IP 172.16.240.36.706 > 172.16.240.17.10080: UDP, length 50 12:01:25.952425 IP 172.16.240.36.706 > 172.16.240.17.10080: UDP, length 329 12:01:25.955552 IP 172.16.240.17.10080 > 172.16.240.36.706: UDP, length 50 12:01:26.023487 IP 172.16.240.17.10080 > 172.16.240.36.706: UDP, length 116 12:01:26.023732 IP 172.16.240.36.706 > 172.16.240.17.10080: UDP, length 50 12:01:26.026096 IP 172.16.240.36.710 > 172.16.240.17.10080: UDP, length 236 12:01:26.028704 IP 172.16.240.17.10080 > 172.16.240.36.710: UDP, length 50 12:01:26.032026 IP 172.16.240.17.10080 > 172.16.240.36.710: UDP, length 125 12:01:36.030832 IP 172.16.240.17.10080 > 172.16.240.36.710: UDP, length 125 12:01:46.029536 IP 172.16.240.17.10080 > 172.16.240.36.710: UDP, length 125 12:01:56.028276 IP 172.16.240.17.10080 > 172.16.240.36.710: UDP, length 125 12:02:06.026973 IP 172.16.240.17.10080 > 172.16.240.36.710: UDP, length 125 --Multipart=_Mon__25_Oct_2004_16_14_28_-0700_JPJTxy13XnFlLmSG Content-Type: text/plain; name="obf_cln.20041022.dmp" Content-Disposition: attachment; filename="obf_cln.20041022.dmp" Content-Transfer-Encoding: 7bit 12:01:21.636090 IP 172.16.240.36.706 > 172.16.240.17.10080: UDP, length 117 12:01:21.638787 IP 172.16.240.17.10080 > 172.16.240.36.706: UDP, length 50 12:01:21.639324 IP 172.16.240.17.10080 > 172.16.240.36.706: UDP, length 83 12:01:21.639539 IP 172.16.240.36.706 > 172.16.240.17.10080: UDP, length 50 12:01:21.639982 IP 172.16.240.36.706 > 172.16.240.17.10080: UDP, length 329 12:01:21.642965 IP 172.16.240.17.10080 > 172.16.240.36.706: UDP, length 50 12:01:21.710888 IP 172.16.240.17.10080 > 172.16.240.36.706: UDP, length 116 12:01:21.711239 IP 172.16.240.36.706 > 172.16.240.17.10080: UDP, length 50 12:01:21.713642 IP 172.16.240.36.710 > 172.16.240.17.10080: UDP, length 236 12:01:21.716120 IP 172.16.240.17.10080 > 172.16.240.36.710: UDP, length 50 12:01:21.719435 IP 172.16.240.17.10080 > 172.16.240.36.710: UDP, length 125 12:01:31.718004 IP 172.16.240.17.10080 > 172.16.240.36.710: UDP, length 125 12:01:41.716472 IP 172.16.240.17.10080 > 172.16.240.36.710: UDP, length 125 12:01:51.714977 IP 172.16.240.17.10080 > 172.16.240.36.710: UDP, length 125 12:02:01.713437 IP 172.16.240.17.10080 > 172.16.240.36.710: UDP, length 125 12:12:33.133935 IP 172.16.240.36.32775 > 172.16.240.17.22: P 1:49(48) ack 224 win 7504 --Multipart=_Mon__25_Oct_2004_16_14_28_-0700_JPJTxy13XnFlLmSG-- From shemminger@osdl.org Mon Oct 25 16:15:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 16:15:41 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PNFaTn027715 for ; Mon, 25 Oct 2004 16:15:36 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9PNFBWL032060 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 25 Oct 2004 16:15:12 -0700 Date: Mon, 25 Oct 2004 16:16:32 -0700 From: Stephen Hemminger To: Bill Ralph Cc: netdev@oss.sgi.com Subject: Re: [Bug 3610] New: kernel-2.6.9 breaks Amanda Message-Id: <20041025161632.55fa938b@zqx3.pdx.osdl.net> In-Reply-To: <41793958.3050306@nswc.navy.mil> References: <200410211647.i9LGlnp1030223@fire-1.osdl.org> <20041021121205.30556eac@zqx3.pdx.osdl.net> <41793958.3050306@nswc.navy.mil> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10820 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 Content-Length: 1047 Lines: 22 > >>Problem Description: Amanda clients exchanges UDP packets with the server giving > >>it a TCP port number with which to connect in order to receive files to be > >>dumped to tape. Under kernel-2.6.8.1 the sofware performs perfectly. Under > >>kernel-2.6.9, with exactly the same Amanda software, the UDP packet exchange > >>seems to occur, but no TCP connection between client and server occurs. The > >>client eventually times out with messages like: > >> > >> > > > >Could you capture a tcpdump of the exchange, especially the failed connection attempt? > > > > > Here are two traces, one on the Amanada server machine, one on the > client machine. Not very useful, as there is no sign that the server > even attempts to connect to the client with a TCP connection. Is there a firewall that is blocking the connection for some reason. Can you successfully make a TCP connection between the two machines with some other command? ssh, telnet, ttcp Perhaps this is another instance of an OpenBSD firewall stomping on window scaling. From davem@davemloft.net Mon Oct 25 16:20:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 16:20:08 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PNJxIj031326 for ; Mon, 25 Oct 2004 16:19:59 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CMDzo-0008Aw-00; Mon, 25 Oct 2004 16:11:24 -0700 Date: Mon, 25 Oct 2004 16:11:24 -0700 From: "David S. Miller" To: Jeff Garzik Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: [NET]: TSO requires SG, enforce this at device registry. Message-Id: <20041025161124.52a04212.davem@davemloft.net> In-Reply-To: <417C9D08.6030903@pobox.com> References: <200410221715.i9MHFlIu021927@hera.kernel.org> <417C9431.6030505@pobox.com> <20041024225700.4a22a968.davem@davemloft.net> <417C9D08.6030903@pobox.com> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10821 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 4510 Lines: 150 On Mon, 25 Oct 2004 02:28:24 -0400 Jeff Garzik wrote: > David S. Miller wrote: > > I made a followon posting proposing ethtool changes which > > would enforce the rules there too, did you see it? > > > Sorry, I didn't see it. URL or grep string? It was to linux-net, here is a replay. Date: Wed, 20 Oct 2004 16:35:10 -0700 From: "David S. Miller" To: Herbert Xu Cc: thomas.spatzier@de.ibm.com, linux-net@vger.kernel.org Subject: Re: [PATCH] select appropriate skb size in tcp_sendmsg when TSO is used Message-Id: <20041020163510.6d13e9c7.davem@davemloft.net> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 20 Oct 2004 20:52:55 +1000 Herbert Xu wrote: > This is bogus. The subsequent if clause is what allows the size to > exceed mss_cache_std. > > TSO without NETIF_F_SG is not worth it. Indeed. I'm going to enforce this at device registration time as in the patch at the end of this email. BTW, we allow mucking of all of these SG, TSO, CSUM settings via ethtool yet the "X needs Y" rules are not enforced. I can't think of an easy way to do this without touching a lot of drivers. Perhaps something like: int ethtool_feature_change(struct net_device *dev, u32 flag_bit, int on_off); So drivers/net/tg3.c:tg3_set_tx() might then look like this: static int tg3_set_tx_csum(struct net_device *dev, u32 data) { struct tg3 *tp = netdev_priv(dev); int err; if (tp->tg3_flags & TG3_FLAG_BROKEN_CHECKSUMS) { if (data != 0) return -EINVAL; return 0; } else dev->features &= ~NETIF_F_IP_CSUM; return ethtool_feature_change(dev, NETIF_F_IP_CSUM, data); } And ethtool_feature_change() might be implemented like so: int ethtool_feature_change(struct net_device *dev, u32 flag_bit, int on_off) { /* If checksumming is being disabled, both SG and * TSO must be disabled as well. */ if (!on_off && (flag_bit & (NETIF_F_IP_CSUM | NETIF_F_HW_CSUM | NETIF_F_NO_CSUM))) { dev->features &= ~(NETIF_F_SG | NETIF_F_TSO); } /* If SG is being disabled, TSO must be disabled * as well. */ if (!on_off && (flag_bit & NETIF_F_SG)) dev->features &= ~NETIF_F_TSO; /* TSO requires SG */ if (on_off && (flag_bit & NETIF_F_TSO) && !(dev->features & NETIF_F_SG)) return -EINVAL; /* SG requires CSUM */ if (on_off && (flag_bit & NETIF_F_SG) && !(dev->features & (NETIF_F_IP_CSUM | NETIF_F_HW_CSUM | NETIF_F_NO_CSUM))) return -EINVAL; if (on_off) dev->features |= flag_bit; else dev->features &= ~flag_bit; return 0; } And then we add usage of this thing to the various drivers and the generic implementation of the appropriate ethtool ops in net/core/ethtool.c It just occured to me that instead of manually clearing dev->feature bits we should invoke the appropriate ethtool op to accomplish that just in case the device needs to do something implementation specific when disabling said features. This implies that ethtool_feature_change() should be invoked without any device locks set to prevent deadlocks. Comments? # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/20 16:16:33-07:00 davem@nuts.davemloft.net # [NET]: TSO requires SG, enforce this at device registry. # # Signed-off-by: David S. Miller # # net/core/dev.c # 2004/10/20 16:16:03-07:00 davem@nuts.davemloft.net +8 -0 # [NET]: TSO requires SG, enforce this at device registry. # diff -Nru a/net/core/dev.c b/net/core/dev.c --- a/net/core/dev.c 2004-10-20 16:16:47 -07:00 +++ b/net/core/dev.c 2004-10-20 16:16:47 -07:00 @@ -2871,6 +2871,14 @@ dev->features &= ~NETIF_F_SG; } + /* TSO requires that SG is present as well. */ + if ((dev->features & NETIF_F_TSO) && + !(dev->features & NETIF_F_SG)) { + printk("%s: Dropping NETIF_F_TSO since no SG feature.\n", + dev->name); + dev->features &= ~NETIF_F_TSO; + } + /* * nil rebuild_header routine, * that should be never called and used as just bug trap. From davem@davemloft.net Mon Oct 25 16:28:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 16:28:45 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PNSfpe031804 for ; Mon, 25 Oct 2004 16:28:41 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CME8y-0008C6-00; Mon, 25 Oct 2004 16:20:52 -0700 Date: Mon, 25 Oct 2004 16:20:51 -0700 From: "David S. Miller" To: Harald Welte Cc: netdev@oss.sgi.com, netfilter-devel@lists.netfilter.org Subject: Re: [PATCH 2.4] fix ipt_ULOG bogus error messages Message-Id: <20041025162051.49b524a0.davem@davemloft.net> In-Reply-To: <20041025074758.GP18934@sunbeam.de.gnumonks.org> References: <20041025074758.GP18934@sunbeam.de.gnumonks.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10822 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 55 Lines: 2 Both 2.4.x and 2.6.x variants applied, thanks Harald. From davem@davemloft.net Mon Oct 25 16:33:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 16:33:59 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PNXsVN032247 for ; Mon, 25 Oct 2004 16:33:54 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CMEE2-0008Ct-00; Mon, 25 Oct 2004 16:26:06 -0700 Date: Mon, 25 Oct 2004 16:26:06 -0700 From: "David S. Miller" To: Herbert Xu Cc: jmorris@redhat.com, netdev@oss.sgi.com Subject: Re: [NET] Give skb_checksum_help an sk_buff * again Message-Id: <20041025162606.5938f8df.davem@davemloft.net> In-Reply-To: <20041025123507.GA4346@gondor.apana.org.au> References: <20041025123507.GA4346@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10823 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 779 Lines: 21 On Mon, 25 Oct 2004 22:35:07 +1000 Herbert Xu wrote: > Since skb_checksum_help has been using pskb_expand_head for a while > now without any ill effects, I thought it would be a good idea to > remove the double pointers from it and its callers. > > This is what the following patch does. The only "rider" bit is the > removal of an unnecessary BUG_ON in ip6_pkt_discard_out. The preceding > assignment was only added because the following function oopsed so > there is no point in doing BUG_ON. > > Signed-off-by: Herbert Xu Looks great, patch applied. It looks like this makes a few netfilter paths no longer need a **pskb anymore as well. Folks can feel free to make that simplification. :-) Thanks Herbert. From davem@redhat.com Mon Oct 25 16:42:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 16:42:08 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PNg11h032752 for ; Mon, 25 Oct 2004 16:42:02 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9PNfZN6025094; Mon, 25 Oct 2004 19:41:35 -0400 Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9PNfYr14500; Mon, 25 Oct 2004 19:41:34 -0400 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.11/8.12.10) with SMTP id i9PNfVJ8022553; Mon, 25 Oct 2004 19:41:31 -0400 Date: Mon, 25 Oct 2004 16:34:18 -0700 From: "David S. Miller" To: Stephen Hemminger Cc: netdev@oss.sgi.com Subject: Re: [RFC] tcp ephemeral port selection Message-Id: <20041025163418.30c703e2.davem@redhat.com> In-Reply-To: <20041011171422.65f88472@zqx3.pdx.osdl.net> References: <20041011171422.65f88472@zqx3.pdx.osdl.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10824 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: 888 Lines: 24 On Mon, 11 Oct 2004 17:14:22 -0700 Stephen Hemminger wrote: > Here is a test patch which changes how TCP ephemeral ports are > selected from a simple roving pointer to: > * net_random() as starting point when doing pure local > searchs. > * use md hash (like isn) when doing connection based > assignments with a rover > > This is *not* for 2.6.9 but wanted to get it out for comment for > future versions. I'm not totally against this kind of idea at all. I hope we don't run into situations with the new code where we don't actually check the whole port range due to some logic error or similar. Another thing we need to eventually do is allow allocation into the local port space more completely. Even if every local port has one user, we could still allocate some ports if the daddr/dport is known and is different from the existing user. From greearb@candelatech.com Mon Oct 25 16:56:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 16:56:33 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9PNuRWL000948 for ; Mon, 25 Oct 2004 16:56:27 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i9Q03PLH013434; Mon, 25 Oct 2004 17:03:26 -0700 Message-ID: <417D929A.2090809@candelatech.com> Date: Mon, 25 Oct 2004 16:56:10 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "'netdev@oss.sgi.com'" CC: "David S. Miller" Subject: Re: [PATCH] 802.1Q VLAN References: <41797696.9070905@candelatech.com> <20041022214611.GA4948@electric-eye.fr.zoreil.com> <41798506.1030909@candelatech.com> <417D675F.3000909@candelatech.com> In-Reply-To: <417D675F.3000909@candelatech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10825 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Content-Length: 601 Lines: 24 Ben Greear wrote: > > Ok, I believe I have fixed all the suggestions offered by Francois > (thanks!). > > Please see what you think of this updated patch. The changes have > been compile tested...and will pass some data in just a few minutes to > make sure nothing funny happens... > > Thanks, > Ben I've been beating on it with pktgen for a while, and it seems stable. DaveM, please consider accepting this patch (it's in a previous email to netdev, just ask if you want it re-sent.) Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From davem@davemloft.net Mon Oct 25 20:30:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 20:30:11 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9Q3U6qS009002 for ; Mon, 25 Oct 2004 20:30:07 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CMHug-00009d-00; Mon, 25 Oct 2004 20:22:22 -0700 Date: Mon, 25 Oct 2004 20:22:21 -0700 From: "David S. Miller" To: Christoph Hellwig Cc: chas@cmf.nrl.navy.mil, hch@infradead.org, netdev@oss.sgi.com, davem@redhat.com Subject: Re: [PATCH][ATM]: [horizon] eliminate pci_find_device() Message-Id: <20041025202221.4f4d32a3.davem@davemloft.net> In-Reply-To: <20041022145235.GA19847@infradead.org> References: <20041021113949.GB3720@infradead.org> <200410221203.i9MC3Ecw003142@ginger.cmf.nrl.navy.mil> <20041022145235.GA19847@infradead.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10826 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 375 Lines: 13 On Fri, 22 Oct 2004 15:52:35 +0100 Christoph Hellwig wrote: > On Fri, Oct 22, 2004 at 08:03:15AM -0400, chas williams (contractor) wrote: > > In message <20041021113949.GB3720@infradead.org>,Christoph Hellwig writes: > > >The same device list comments as for ambassador apply here aswell. > > > > better? > > yes. Applied, thanks Chas and Christoph. From davem@davemloft.net Mon Oct 25 20:34:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 20:34:30 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9Q3YPZt009348 for ; Mon, 25 Oct 2004 20:34:25 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CMHyy-0000Aq-00; Mon, 25 Oct 2004 20:26:48 -0700 Date: Mon, 25 Oct 2004 20:26:47 -0700 From: "David S. Miller" To: Thomas Graf Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.4] PKT_SCHED: Rename TCQ_F_INGRES to TCQ_F_INGRESS Message-Id: <20041025202647.5f4d5163.davem@davemloft.net> In-Reply-To: <20041022230731.GL21977@postel.suug.ch> References: <20041022230731.GL21977@postel.suug.ch> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10827 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 282 Lines: 7 Both 2.4.x and 2.6.x variants applied, thanks Thomas. Speaking of grep'ability, I will always apply patches that make structure members easier to grep for in the kernel sources. One great example is when Arnaldo added the "sk_*" prefix to the names of the members of struct sock. From davem@davemloft.net Mon Oct 25 20:38:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 20:38:44 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9Q3ccGV009833 for ; Mon, 25 Oct 2004 20:38:39 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CMHzY-0000B9-00; Mon, 25 Oct 2004 20:27:24 -0700 Date: Mon, 25 Oct 2004 20:27:24 -0700 From: "David S. Miller" To: Herbert Xu Cc: laforge@netfilter.org, lmb@suse.de, ahu@ds9a.nl, hch@infradead.org, netdev@oss.sgi.com Subject: Re: Allowing netlink_family to be any integer (was: [PATCH 2.6] iptables CLUSTERIP target) Message-Id: <20041025202724.6d834af5.davem@davemloft.net> In-Reply-To: <20041022231607.GA14365@gondor.apana.org.au> References: <20041021142527.GG3551@sunbeam.de.gnumonks.org> <20041022160559.28f9c540.davem@davemloft.net> <20041022231607.GA14365@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10828 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 831 Lines: 21 On Sat, 23 Oct 2004 09:16:07 +1000 Herbert Xu wrote: > On Fri, Oct 22, 2004 at 04:05:59PM -0700, David S. Miller wrote: > > On Fri, 22 Oct 2004 07:31:07 +1000 > > Herbert Xu wrote: > > > > > Initially I considered an interface where kernel users can register > > > themselves using a string as the key. But I soon realised that we > > > could simply allow the netlink_family field to be an arbitrary integer > > > that is used as a key to a hash table. > > > > (I assume you mean "nl_family" not "netlink_family" :-) > > I'm no plans yet in taking over all address families :) > I'm only referring to the third argument in socket(2). Color me confused about how your scheme might work. If you cook up an example patch, I guarentee it will be worth your while. 8) From yoshfuji@linux-ipv6.org Mon Oct 25 20:55:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 20:55:15 -0700 (PDT) Received: from yue.st-paulia.net (yue.linux-ipv6.org [203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9Q3t9P4010507 for ; Mon, 25 Oct 2004 20:55:09 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id BA14733CE5; Tue, 26 Oct 2004 12:55:40 +0900 (JST) Date: Tue, 26 Oct 2004 12:55:39 +0900 (JST) Message-Id: <20041026.125539.84990576.yoshfuji@linux-ipv6.org> To: Brian.Haley@hp.com, davem@davemloft.net Cc: netdev@oss.sgi.com, kazunori@miyazawa.org, yoshfuji@linux-ipv6.org Subject: Re: [PATCH, TAKE 2] [IPV6] XFRM: extract xfrm_lookup() from ip6_dst_lookup() (is Re: [PATCH][IPv6] separation xfrm_lookup from ip6_dst_lookup) From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <417D6FD0.7010903@hp.com> References: <20040801195135.16734846.davem@redhat.com> <20040828.014935.131415609.yoshfuji@linux-ipv6.org> <417D6FD0.7010903@hp.com> Organization: USAGI Project X-URL: http://www.yoshifuji.org/%7Ehideaki/ X-Fingerprint: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA X-PGP-Key-URL: http://www.yoshifuji.org/%7Ehideaki/hideaki@yoshifuji.org.asc X-Face: "5$Al-.M>NJ%a'@hhZdQm:."qn~PA^gq4o*>iCFToq*bAi#4FRtx}enhuQKz7fNqQz\BYU] $~O_5m-9'}MIs`XGwIEscw;e5b>n"B_?j/AkL~i/MEaZBLP X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 10829 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: yoshfuji@linux-ipv6.org Precedence: bulk X-list: netdev Content-Length: 517 Lines: 13 In article <417D6FD0.7010903@hp.com> (at Mon, 25 Oct 2004 17:27:44 -0400), Brian Haley says: > Attached is a patch that fixes that and also brings the rt0_hdr struct > in-line with RFC 3542 by removing the "bitmap" field. Good catch but please do not change bitmap. I applied it into my tree, without changing bitmap. David, I'll send bk URL including this very soon. -- Hideaki YOSHIFUJI @ USAGI Project GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA From yoshfuji@linux-ipv6.org Mon Oct 25 21:15:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 21:16:01 -0700 (PDT) Received: from yue.st-paulia.net (yue.linux-ipv6.org [203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9Q4FtnR011325 for ; Mon, 25 Oct 2004 21:15:55 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id C675733CE5; Tue, 26 Oct 2004 13:16:26 +0900 (JST) Date: Tue, 26 Oct 2004 13:16:26 +0900 (JST) Message-Id: <20041026.131626.77300437.yoshfuji@linux-ipv6.org> To: davem@davemloft.net Cc: netdev@oss.sgi.com, yoshfuji@linux-ipv6.org Subject: [BK PATCH] INET6 Updates (2004/10/26) From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= Organization: USAGI Project X-URL: http://www.yoshifuji.org/%7Ehideaki/ X-Fingerprint: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA X-PGP-Key-URL: http://www.yoshifuji.org/%7Ehideaki/hideaki@yoshifuji.org.asc X-Face: "5$Al-.M>NJ%a'@hhZdQm:."qn~PA^gq4o*>iCFToq*bAi#4FRtx}enhuQKz7fNqQz\BYU] $~O_5m-9'}MIs`XGwIEscw;e5b>n"B_?j/AkL~i/MEaZBLP X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 10830 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: yoshfuji@linux-ipv6.org Precedence: bulk X-list: netdev Content-Length: 12012 Lines: 422 Hello. Please pull following changesets available at . Thank you. HEADLINES --------- ChangeSet@1.2176, 2004-10-26 12:51:07+09:00, Brian.Haley@hp.com [IPV6] Lookup appropriate destination when sending TCPv6 with routing header. ChangeSet@1.2177, 2004-10-26 12:54:41+09:00, yoshfuji@linux-ipv6.org [IPV6] Remove codes related to RTF_ALLONLINK. ChangeSet@1.2178, 2004-10-26 12:54:58+09:00, yoshfuji@linux-ipv6.org [IPV6] simplify functions related to RTF_ALLONLINK. ChangeSet@1.2179, 2004-10-26 12:55:56+09:00, yoshfuji@linux-ipv6.org [IPV6] NDISC: update neighbor cache entry by RS. ChangeSet@1.2180, 2004-10-26 13:11:47+09:00, yoshfuji@linux-ipv6.org [IPV6] kill a warning when building without CONFIG_SYSCTL. DIFFSTATS --------- include/linux/ipv6_route.h | 3 +- include/net/addrconf.h | 3 -- include/net/ip6_route.h | 2 - include/net/ndisc.h | 5 +++ net/ipv6/addrconf.c | 26 ++++------------- net/ipv6/ip6_fib.c | 2 - net/ipv6/ndisc.c | 66 +++++++++++++++++++++++++++++++++++++++++++-- net/ipv6/route.c | 12 ++------ net/ipv6/tcp_ipv6.c | 6 ++++ 9 files changed, 90 insertions(+), 35 deletions(-) CHANGESETS ---------- ChangeSet@1.2176, 2004-10-26 12:51:07+09:00, Brian.Haley@hp.com [IPV6] Lookup appropriate destination when sending TCPv6 with routing header. Signed-off-by: Brian Haley Signed-off-by: Hideaki YOSHIFUJI diff -Nru a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c --- a/net/ipv6/tcp_ipv6.c 2004-10-26 13:12:33 +09:00 +++ b/net/ipv6/tcp_ipv6.c 2004-10-26 13:12:34 +09:00 @@ -1802,6 +1802,7 @@ struct ipv6_pinfo *np = inet6_sk(sk); struct flowi fl; struct dst_entry *dst; + struct in6_addr *final_p = NULL, final; memset(&fl, 0, sizeof(fl)); fl.proto = IPPROTO_TCP; @@ -1815,7 +1816,9 @@ if (np->opt && np->opt->srcrt) { struct rt0_hdr *rt0 = (struct rt0_hdr *) np->opt->srcrt; + ipv6_addr_copy(&final, &fl.fl6_dst); ipv6_addr_copy(&fl.fl6_dst, rt0->addr); + final_p = &final; } dst = __sk_dst_check(sk, np->dst_cookie); @@ -1827,6 +1830,9 @@ sk->sk_err_soft = -err; return err; } + + if (final_p) + ipv6_addr_copy(&fl.fl6_dst, final_p); if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) { sk->sk_route_caps = 0; ChangeSet@1.2177, 2004-10-26 12:54:41+09:00, yoshfuji@linux-ipv6.org [IPV6] Remove codes related to RTF_ALLONLINK. Signed-off-by: Hideaki YOSHIFUJI diff -Nru a/include/linux/ipv6_route.h b/include/linux/ipv6_route.h --- a/include/linux/ipv6_route.h 2004-10-26 13:12:38 +09:00 +++ b/include/linux/ipv6_route.h 2004-10-26 13:12:38 +09:00 @@ -14,7 +14,8 @@ #define _LINUX_IPV6_ROUTE_H #define RTF_DEFAULT 0x00010000 /* default - learned via ND */ -#define RTF_ALLONLINK 0x00020000 /* fallback, no routers on link */ +#define RTF_ALLONLINK 0x00020000 /* (deprecated and will be removed) + fallback, no routers on link */ #define RTF_ADDRCONF 0x00040000 /* addrconf route - RA */ #define RTF_PREFIX_RT 0x00080000 /* A prefix only route - RA */ diff -Nru a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c --- a/net/ipv6/addrconf.c 2004-10-26 13:12:38 +09:00 +++ b/net/ipv6/addrconf.c 2004-10-26 13:12:38 +09:00 @@ -885,7 +885,7 @@ if (rt) dev = rt->rt6i_dev; - onlink = (rt && (rt->rt6i_flags & RTF_ALLONLINK)); + onlink = 0; return ipv6_dev_get_saddr(dev, daddr, saddr, onlink); } diff -Nru a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c --- a/net/ipv6/ip6_fib.c 2004-10-26 13:12:38 +09:00 +++ b/net/ipv6/ip6_fib.c 2004-10-26 13:12:38 +09:00 @@ -433,7 +433,7 @@ if (fn->fn_flags&RTN_TL_ROOT && fn->leaf == &ip6_null_entry && - !(rt->rt6i_flags & (RTF_DEFAULT | RTF_ADDRCONF | RTF_ALLONLINK)) ){ + !(rt->rt6i_flags & (RTF_DEFAULT | RTF_ADDRCONF)) ){ fn->leaf = rt; rt->u.next = NULL; goto out; diff -Nru a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c --- a/net/ipv6/ndisc.c 2004-10-26 13:12:38 +09:00 +++ b/net/ipv6/ndisc.c 2004-10-26 13:12:38 +09:00 @@ -1026,7 +1026,7 @@ * delete it */ - rt6_purge_dflt_routers(RTF_ALLONLINK); + rt6_purge_dflt_routers(0); } if (rt) diff -Nru a/net/ipv6/route.c b/net/ipv6/route.c --- a/net/ipv6/route.c 2004-10-26 13:12:38 +09:00 +++ b/net/ipv6/route.c 2004-10-26 13:12:38 +09:00 @@ -1293,10 +1293,7 @@ struct rt6_info *rt; u32 flags; - if (last_resort) - flags = RTF_ALLONLINK; - else - flags = RTF_DEFAULT | RTF_ADDRCONF; + flags = RTF_DEFAULT | RTF_ADDRCONF; restart: read_lock_bh(&rt6_lock); @@ -1592,7 +1589,7 @@ rtm->rtm_protocol = rt->rt6i_protocol; if (rt->rt6i_flags&RTF_DYNAMIC) rtm->rtm_protocol = RTPROT_REDIRECT; - else if (rt->rt6i_flags&(RTF_ADDRCONF|RTF_ALLONLINK)) + else if (rt->rt6i_flags & RTF_ADDRCONF) rtm->rtm_protocol = RTPROT_KERNEL; else if (rt->rt6i_flags&RTF_DEFAULT) rtm->rtm_protocol = RTPROT_RA; ChangeSet@1.2178, 2004-10-26 12:54:58+09:00, yoshfuji@linux-ipv6.org [IPV6] simplify functions related to RTF_ALLONLINK. Simplify ipv6_get_saddr(), ipv6_dev_get_saddr() and rt6_purge_dflt_routers(). Signed-off-by: Hideaki YOSHIFUJI diff -Nru a/include/net/addrconf.h b/include/net/addrconf.h --- a/include/net/addrconf.h 2004-10-26 13:12:42 +09:00 +++ b/include/net/addrconf.h 2004-10-26 13:12:42 +09:00 @@ -67,8 +67,7 @@ struct in6_addr *saddr); extern int ipv6_dev_get_saddr(struct net_device *dev, struct in6_addr *daddr, - struct in6_addr *saddr, - int onlink); + struct in6_addr *saddr); extern int ipv6_get_lladdr(struct net_device *dev, struct in6_addr *); extern int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2); diff -Nru a/include/net/ip6_route.h b/include/net/ip6_route.h --- a/include/net/ip6_route.h 2004-10-26 13:12:42 +09:00 +++ b/include/net/ip6_route.h 2004-10-26 13:12:42 +09:00 @@ -87,7 +87,7 @@ extern struct rt6_info * rt6_add_dflt_router(struct in6_addr *gwaddr, struct net_device *dev); -extern void rt6_purge_dflt_routers(int lst_resort); +extern void rt6_purge_dflt_routers(void); extern void rt6_reset_dflt_pointer(struct rt6_info *rt); diff -Nru a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c --- a/net/ipv6/addrconf.c 2004-10-26 13:12:42 +09:00 +++ b/net/ipv6/addrconf.c 2004-10-26 13:12:42 +09:00 @@ -760,7 +760,7 @@ #endif int ipv6_dev_get_saddr(struct net_device *dev, - struct in6_addr *daddr, struct in6_addr *saddr, int onlink) + struct in6_addr *daddr, struct in6_addr *saddr) { struct inet6_ifaddr *ifp = NULL; struct inet6_ifaddr *match = NULL; @@ -769,10 +769,7 @@ int err; int hiscore = -1, score; - if (!onlink) - scope = ipv6_addr_scope(daddr); - else - scope = IFA_LINK; + scope = ipv6_addr_scope(daddr); /* * known dev @@ -877,17 +874,7 @@ int ipv6_get_saddr(struct dst_entry *dst, struct in6_addr *daddr, struct in6_addr *saddr) { - struct rt6_info *rt; - struct net_device *dev = NULL; - int onlink; - - rt = (struct rt6_info *) dst; - if (rt) - dev = rt->rt6i_dev; - - onlink = 0; - - return ipv6_dev_get_saddr(dev, daddr, saddr, onlink); + return ipv6_dev_get_saddr(dst ? dst->dev : NULL, daddr, saddr); } @@ -3042,7 +3029,7 @@ addrconf_forward_change(); } if (*valp) - rt6_purge_dflt_routers(0); + rt6_purge_dflt_routers(); } return ret; @@ -3096,7 +3083,7 @@ } if (*valp) - rt6_purge_dflt_routers(0); + rt6_purge_dflt_routers(); } else *valp = new; diff -Nru a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c --- a/net/ipv6/ndisc.c 2004-10-26 13:12:42 +09:00 +++ b/net/ipv6/ndisc.c 2004-10-26 13:12:42 +09:00 @@ -396,7 +396,7 @@ src_addr = solicited_addr; in6_ifa_put(ifp); } else { - if (ipv6_dev_get_saddr(dev, daddr, &tmpaddr, 0)) + if (ipv6_dev_get_saddr(dev, daddr, &tmpaddr)) return; src_addr = &tmpaddr; } @@ -1026,7 +1026,7 @@ * delete it */ - rt6_purge_dflt_routers(0); + rt6_purge_dflt_routers(); } if (rt) diff -Nru a/net/ipv6/route.c b/net/ipv6/route.c --- a/net/ipv6/route.c 2004-10-26 13:12:42 +09:00 +++ b/net/ipv6/route.c 2004-10-26 13:12:42 +09:00 @@ -1288,17 +1288,14 @@ return rt6_get_dflt_router(gwaddr, dev); } -void rt6_purge_dflt_routers(int last_resort) +void rt6_purge_dflt_routers(void) { struct rt6_info *rt; - u32 flags; - - flags = RTF_DEFAULT | RTF_ADDRCONF; restart: read_lock_bh(&rt6_lock); for (rt = ip6_routing_table.leaf; rt; rt = rt->u.next) { - if (rt->rt6i_flags & flags) { + if (rt->rt6i_flags & (RTF_DEFAULT | RTF_ADDRCONF)) { dst_hold(&rt->u.dst); rt6_reset_dflt_pointer(NULL); ChangeSet@1.2179, 2004-10-26 12:55:56+09:00, yoshfuji@linux-ipv6.org [IPV6] NDISC: update neighbor cache entry by RS. Signed-off-by: Hideaki YOSHIFUJI diff -Nru a/include/net/ndisc.h b/include/net/ndisc.h --- a/include/net/ndisc.h 2004-10-26 13:12:46 +09:00 +++ b/include/net/ndisc.h 2004-10-26 13:12:46 +09:00 @@ -45,6 +45,11 @@ __u8 opt[0]; }; +struct rs_msg { + struct icmp6hdr icmph; + __u8 opt[0]; +}; + struct ra_msg { struct icmp6hdr icmph; __u32 reachable_time; diff -Nru a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c --- a/net/ipv6/ndisc.c 2004-10-26 13:12:46 +09:00 +++ b/net/ipv6/ndisc.c 2004-10-26 13:12:46 +09:00 @@ -921,6 +921,64 @@ } } +static void ndisc_recv_rs(struct sk_buff *skb) +{ + struct rs_msg *rs_msg = (struct rs_msg *) skb->h.raw; + unsigned long ndoptlen = skb->len - sizeof(*rs_msg); + struct neighbour *neigh; + struct inet6_dev *idev; + struct in6_addr *saddr = &skb->nh.ipv6h->saddr; + struct ndisc_options ndopts; + u8 *lladdr = NULL; + int lladdrlen = 0; + + if (skb->len < sizeof(*rs_msg)) + return; + + idev = in6_dev_get(skb->dev); + if (!idev) { + if (net_ratelimit()) + ND_PRINTK1("ICMP6 RS: can't find in6 device\n"); + return; + } + + /* Don't accept RS if we're not in router mode */ + if (!idev->cnf.forwarding || idev->cnf.accept_ra) + goto out; + + /* + * Don't update NCE if src = ::; + * this implies that the source node has no ip address assigned yet. + */ + if (ipv6_addr_any(saddr)) + goto out; + + /* Parse ND options */ + if (!ndisc_parse_options(rs_msg->opt, ndoptlen, &ndopts)) { + if (net_ratelimit()) + ND_PRINTK2("ICMP6 NS: invalid ND option, ignored\n"); + goto out; + } + + if (ndopts.nd_opts_src_lladdr) { + lladdr = (u8 *)(ndopts.nd_opts_src_lladdr + 1); + lladdrlen = ndopts.nd_opts_src_lladdr->nd_opt_len << 3; + if (lladdrlen != NDISC_OPT_SPACE(skb->dev->addr_len)) + goto out; + } + + neigh = __neigh_lookup(&nd_tbl, saddr, skb->dev, 1); + if (neigh) { + neigh_update(neigh, lladdr, NUD_STALE, + NEIGH_UPDATE_F_WEAK_OVERRIDE| + NEIGH_UPDATE_F_OVERRIDE| + NEIGH_UPDATE_F_OVERRIDE_ISROUTER); + neigh_release(neigh); + } +out: + in6_dev_put(idev); +} + static void ndisc_router_discovery(struct sk_buff *skb) { struct ra_msg *ra_msg = (struct ra_msg *) skb->h.raw; @@ -1393,6 +1451,10 @@ case NDISC_NEIGHBOUR_ADVERTISEMENT: ndisc_recv_na(skb); + break; + + case NDISC_ROUTER_SOLICITATION: + ndisc_recv_rs(skb); break; case NDISC_ROUTER_ADVERTISEMENT: ChangeSet@1.2180, 2004-10-26 13:11:47+09:00, yoshfuji@linux-ipv6.org [IPV6] kill a warning when building without CONFIG_SYSCTL. Signed-off-by: Hideaki YOSHIFUJI diff -Nru a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c --- a/net/ipv6/addrconf.c 2004-10-26 13:12:51 +09:00 +++ b/net/ipv6/addrconf.c 2004-10-26 13:12:51 +09:00 @@ -404,6 +404,7 @@ return idev; } +#ifdef CONFIG_SYSCTL static void dev_forward_change(struct inet6_dev *idev) { struct net_device *dev; @@ -449,7 +450,7 @@ } read_unlock(&dev_base_lock); } - +#endif /* Nobody refers to this ifaddr, destroy it */ -- Hideaki YOSHIFUJI @ USAGI Project GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA From davem@davemloft.net Mon Oct 25 21:17:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 21:17:50 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9Q4HgTR011682 for ; Mon, 25 Oct 2004 21:17:42 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CMIeY-0000HN-00; Mon, 25 Oct 2004 21:09:46 -0700 Date: Mon, 25 Oct 2004 21:09:46 -0700 From: "David S. Miller" To: Herbert Xu Cc: kernel@linuxace.com, linux-net@vger.kernel.org, netdev@oss.sgi.com Subject: Re: 2.6.9 failed assertion in tcp_timer.c Message-Id: <20041025210946.367f65be.davem@davemloft.net> In-Reply-To: <20041022232403.GA14618@gondor.apana.org.au> References: <20041019215054.GA17565@linuxace.com> <20041020164748.GA20905@linuxace.com> <20041020212651.GA8534@gondor.apana.org.au> <20041020225536.GA22179@linuxace.com> <20041021130339.GA19345@gondor.apana.org.au> <20041021165224.GA25399@linuxace.com> <20041021215743.GA23062@gondor.apana.org.au> <20041022185435.GA30709@linuxace.com> <20041022215040.GA13309@gondor.apana.org.au> <20041022232403.GA14618@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10831 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 983 Lines: 24 On Sat, 23 Oct 2004 09:24:03 +1000 Herbert Xu wrote: > Actually, I think we've caught your crash now. If that code path > is triggering at all, then it'll trigger with TSO packets too. If > we get a truly partial ack on a TSO packet, then tcp_tso_acked will > not trim it off. So we will fall through to this last-ditch trim > call, which doesn't update packets_out. > > There are two solutions to this problem. I've taken the simpler > approach for now. We simply trim off the partial bits in tcp_tso_acked > and live with the fact that the packet counters may differ from > what's on the netwrok by one. > > Signed-off-by: Herbert Xu > > Later on we can "fix" this by remembering where the original TSO > packet started from, perhaps in skb->h or somewhere. Dave, is this > worth it? I'm going to apply this patch for now. I think at this point we can generalize TSO processing a bit better in this code now. From herbert@gondor.apana.org.au Mon Oct 25 21:57:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 21:57:36 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9Q4vQNF012830 for ; Mon, 25 Oct 2004 21:57:27 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CMJOL-0002ez-00; Tue, 26 Oct 2004 14:57:05 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CMJOH-0002hb-00; Tue, 26 Oct 2004 14:57:01 +1000 Date: Tue, 26 Oct 2004 14:57:01 +1000 To: "David S. Miller" , netdev@oss.sgi.com Subject: [TCP] Move tcp_get_info out of tcp_diag Message-ID: <20041026045701.GA10365@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Dxnq1zWXvFF0Q93v" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10832 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 5403 Lines: 163 --Dxnq1zWXvFF0Q93v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Dave: In my recent foray into tcp_diag I discovered some ugly looking ifdef's on CONFIG_IPV6 that'll break when IPv6 is built as a module. In order to fix it, we need to allow tcp_diag to be built as a module. So here is a start. This patch move tcp_get_info from tcp_diag.c into the site of the other caller, tcp.c. Signed-off-by: Herbert Xu Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --Dxnq1zWXvFF0Q93v Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== net/ipv4/tcp.c 1.81 vs edited ===== --- 1.81/net/ipv4/tcp.c 2004-10-04 07:26:12 +10:00 +++ edited/net/ipv4/tcp.c 2004-10-26 14:46:13 +10:00 @@ -2095,6 +2095,63 @@ return err; } +/* Return information about state of tcp endpoint in API format. */ +void tcp_get_info(struct sock *sk, struct tcp_info *info) +{ + struct tcp_opt *tp = tcp_sk(sk); + u32 now = tcp_time_stamp; + + memset(info, 0, sizeof(*info)); + + info->tcpi_state = sk->sk_state; + info->tcpi_ca_state = tp->ca_state; + info->tcpi_retransmits = tp->retransmits; + info->tcpi_probes = tp->probes_out; + info->tcpi_backoff = tp->backoff; + + if (tp->tstamp_ok) + info->tcpi_options |= TCPI_OPT_TIMESTAMPS; + if (tp->sack_ok) + info->tcpi_options |= TCPI_OPT_SACK; + if (tp->wscale_ok) { + info->tcpi_options |= TCPI_OPT_WSCALE; + info->tcpi_snd_wscale = tp->snd_wscale; + info->tcpi_rcv_wscale = tp->rcv_wscale; + } + + if (tp->ecn_flags&TCP_ECN_OK) + info->tcpi_options |= TCPI_OPT_ECN; + + info->tcpi_rto = jiffies_to_usecs(tp->rto); + info->tcpi_ato = jiffies_to_usecs(tp->ack.ato); + info->tcpi_snd_mss = tp->mss_cache_std; + info->tcpi_rcv_mss = tp->ack.rcv_mss; + + info->tcpi_unacked = tcp_get_pcount(&tp->packets_out); + info->tcpi_sacked = tcp_get_pcount(&tp->sacked_out); + info->tcpi_lost = tcp_get_pcount(&tp->lost_out); + info->tcpi_retrans = tcp_get_pcount(&tp->retrans_out); + info->tcpi_fackets = tcp_get_pcount(&tp->fackets_out); + + info->tcpi_last_data_sent = jiffies_to_msecs(now - tp->lsndtime); + info->tcpi_last_data_recv = jiffies_to_msecs(now - tp->ack.lrcvtime); + info->tcpi_last_ack_recv = jiffies_to_msecs(now - tp->rcv_tstamp); + + info->tcpi_pmtu = tp->pmtu_cookie; + info->tcpi_rcv_ssthresh = tp->rcv_ssthresh; + info->tcpi_rtt = jiffies_to_usecs(tp->srtt)>>3; + info->tcpi_rttvar = jiffies_to_usecs(tp->mdev)>>2; + info->tcpi_snd_ssthresh = tp->snd_ssthresh; + info->tcpi_snd_cwnd = tp->snd_cwnd; + info->tcpi_advmss = tp->advmss; + info->tcpi_reordering = tp->reordering; + + info->tcpi_rcv_rtt = jiffies_to_usecs(tp->rcv_rtt_est.rtt)>>3; + info->tcpi_rcv_space = tp->rcvq_space.space; + + info->tcpi_total_retrans = tp->total_retrans; +} + int tcp_getsockopt(struct sock *sk, int level, int optname, char __user *optval, int __user *optlen) { ===== net/ipv4/tcp_diag.c 1.23 vs edited ===== --- 1.23/net/ipv4/tcp_diag.c 2004-10-21 14:20:29 +10:00 +++ edited/net/ipv4/tcp_diag.c 2004-10-26 14:45:51 +10:00 @@ -52,63 +52,6 @@ rta->rta_len = rtalen; \ RTA_DATA(rta); }) -/* Return information about state of tcp endpoint in API format. */ -void tcp_get_info(struct sock *sk, struct tcp_info *info) -{ - struct tcp_opt *tp = tcp_sk(sk); - u32 now = tcp_time_stamp; - - memset(info, 0, sizeof(*info)); - - info->tcpi_state = sk->sk_state; - info->tcpi_ca_state = tp->ca_state; - info->tcpi_retransmits = tp->retransmits; - info->tcpi_probes = tp->probes_out; - info->tcpi_backoff = tp->backoff; - - if (tp->tstamp_ok) - info->tcpi_options |= TCPI_OPT_TIMESTAMPS; - if (tp->sack_ok) - info->tcpi_options |= TCPI_OPT_SACK; - if (tp->wscale_ok) { - info->tcpi_options |= TCPI_OPT_WSCALE; - info->tcpi_snd_wscale = tp->snd_wscale; - info->tcpi_rcv_wscale = tp->rcv_wscale; - } - - if (tp->ecn_flags&TCP_ECN_OK) - info->tcpi_options |= TCPI_OPT_ECN; - - info->tcpi_rto = jiffies_to_usecs(tp->rto); - info->tcpi_ato = jiffies_to_usecs(tp->ack.ato); - info->tcpi_snd_mss = tp->mss_cache_std; - info->tcpi_rcv_mss = tp->ack.rcv_mss; - - info->tcpi_unacked = tcp_get_pcount(&tp->packets_out); - info->tcpi_sacked = tcp_get_pcount(&tp->sacked_out); - info->tcpi_lost = tcp_get_pcount(&tp->lost_out); - info->tcpi_retrans = tcp_get_pcount(&tp->retrans_out); - info->tcpi_fackets = tcp_get_pcount(&tp->fackets_out); - - info->tcpi_last_data_sent = jiffies_to_msecs(now - tp->lsndtime); - info->tcpi_last_data_recv = jiffies_to_msecs(now - tp->ack.lrcvtime); - info->tcpi_last_ack_recv = jiffies_to_msecs(now - tp->rcv_tstamp); - - info->tcpi_pmtu = tp->pmtu_cookie; - info->tcpi_rcv_ssthresh = tp->rcv_ssthresh; - info->tcpi_rtt = jiffies_to_usecs(tp->srtt)>>3; - info->tcpi_rttvar = jiffies_to_usecs(tp->mdev)>>2; - info->tcpi_snd_ssthresh = tp->snd_ssthresh; - info->tcpi_snd_cwnd = tp->snd_cwnd; - info->tcpi_advmss = tp->advmss; - info->tcpi_reordering = tp->reordering; - - info->tcpi_rcv_rtt = jiffies_to_usecs(tp->rcv_rtt_est.rtt)>>3; - info->tcpi_rcv_space = tp->rcvq_space.space; - - info->tcpi_total_retrans = tp->total_retrans; -} - static int tcpdiag_fill(struct sk_buff *skb, struct sock *sk, int ext, u32 pid, u32 seq) { --Dxnq1zWXvFF0Q93v-- From davem@davemloft.net Mon Oct 25 21:59:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 21:59:05 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9Q4x0qa013012 for ; Mon, 25 Oct 2004 21:59:00 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CMJIg-0000LU-00; Mon, 25 Oct 2004 21:51:14 -0700 Date: Mon, 25 Oct 2004 21:51:14 -0700 From: "David S. Miller" To: yoshfuji@linux-ipv6.org Cc: netdev@oss.sgi.com Subject: Re: [BK PATCH] INET6 Updates (2004/10/26) Message-Id: <20041025215114.2d56b7b9.davem@davemloft.net> In-Reply-To: <20041026.131626.77300437.yoshfuji@linux-ipv6.org> References: <20041026.131626.77300437.yoshfuji@linux-ipv6.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i9Q4x0qa013012 X-archive-position: 10833 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 903 Lines: 19 On Tue, 26 Oct 2004 13:16:26 +0900 (JST) YOSHIFUJI Hideaki / $B5HF#1QL@(B wrote: > Please pull following changesets available at > . ... > ChangeSet@1.2176, 2004-10-26 12:51:07+09:00, Brian.Haley@hp.com > [IPV6] Lookup appropriate destination when sending TCPv6 with routing header. > ChangeSet@1.2177, 2004-10-26 12:54:41+09:00, yoshfuji@linux-ipv6.org > [IPV6] Remove codes related to RTF_ALLONLINK. > ChangeSet@1.2178, 2004-10-26 12:54:58+09:00, yoshfuji@linux-ipv6.org > [IPV6] simplify functions related to RTF_ALLONLINK. > ChangeSet@1.2179, 2004-10-26 12:55:56+09:00, yoshfuji@linux-ipv6.org > [IPV6] NDISC: update neighbor cache entry by RS. > ChangeSet@1.2180, 2004-10-26 13:11:47+09:00, yoshfuji@linux-ipv6.org > [IPV6] kill a warning when building without CONFIG_SYSCTL. Pulled, thank you Yoshifuji-san. From garzik@havoc.gtf.org Mon Oct 25 22:37:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Mon, 25 Oct 2004 22:38:00 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [69.28.190.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9Q5bkXS014213 for ; Mon, 25 Oct 2004 22:37:47 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id 940047912; Tue, 26 Oct 2004 01:37:24 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i9Q5bOCx029109; Tue, 26 Oct 2004 01:37:24 -0400 Date: Tue, 26 Oct 2004 01:37:24 -0400 From: Jeff Garzik To: Andrew Morton , Linus Torvalds Cc: netdev@oss.sgi.com Subject: [BK PATCHES] 2.6.x net driver updates Message-ID: <20041026053724.GA29080@havoc.gtf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.4.1i X-archive-position: 10834 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: 86624 Lines: 2676 Still pushing pending stuff... this time, the "e1000", "janitor", and "misc" piles. Please do a bk pull bk://gkernel.bkbits.net/net-drivers-2.6 This will update the following files: Documentation/networking/e100.txt | 137 +++++++++++++++++++++-- Documentation/networking/e1000.txt | 218 ++++++++++++++++++++++++++----------- Documentation/networking/ixgb.txt | 36 ++---- drivers/net/3c59x.c | 2 drivers/net/Kconfig | 120 +++----------------- drivers/net/dummy.c | 4 drivers/net/e1000/e1000.h | 2 drivers/net/e1000/e1000_ethtool.c | 13 +- drivers/net/e1000/e1000_hw.c | 128 ++++++++++++++++++--- drivers/net/e1000/e1000_main.c | 43 ++----- drivers/net/e1000/e1000_osdep.h | 6 + drivers/net/e1000/e1000_param.c | 167 +++++++++++++++++----------- drivers/net/eql.c | 26 ++-- drivers/net/hamradio/hdlcdrv.c | 2 drivers/net/ixgb/ixgb_main.c | 10 + drivers/net/mac8390.c | 4 drivers/net/ne2k-pci.c | 31 +++++ drivers/net/ns83820.c | 121 ++++++++++++++++++-- drivers/net/pcnet32.c | 6 - drivers/net/sis900.c | 18 +-- drivers/net/skfp/hwmtm.c | 3 drivers/net/slip.c | 39 +++--- drivers/net/tokenring/olympic.c | 1 drivers/net/tulip/de2104x.c | 3 drivers/net/tulip/de4x5.c | 2 drivers/net/tulip/tulip_core.c | 21 ++- drivers/net/tulip/xircom_cb.c | 14 ++ include/linux/netdevice.h | 2 net/Kconfig | 18 --- net/core/dev.c | 93 --------------- net/irda/irlan/irlan_client.c | 2 31 files changed, 791 insertions(+), 501 deletions(-) through these ChangeSets: : o remove NET_HW_FLOWCONTROL : o netpoll with xircom_cb : o janitor: net/tulip: pci_find_device to pci_dev_present o janitor: net/sis900: pci_find_device to pci_get_device Adrian Bunk: o net/tokenring/olympic.c: remove unused variable Andrew Morton: o e1000 module_param build fix o ne2k-pci pci build fix o e1000 sparc64 dma_mapping build fix o igxb speedup o de4x5 warning fix François Romieu: o via-velocity: wrong module name in Kconfig documentation Ganesh Venkatesan: o ixgb: Configuration and user guide update o e100: Configuration and user guide update o e1000: Configuration and user guide update o e1000: white space corrections o e1000: driver version update o e1000: fix set ringparam for ethtool returning error code on bad input o e1000: remove unused function e1000_enable_mng_pass_thru o e1000: modified ethtool_set_pauseparam to use e1000_setup_link for flow control settings for fiber serdes link o e1000 update -- fix MODULE_PARM, module_param, module_param_array o e1000 - Ethtool -- 82545 do not support WoL o e1000 - Polarity reversal workaround for 10F/10H links o e1000 - Fix VLAN filter setup errors (while running on PPC) o e1000 Check value returned by from pci_enable_device o e1000 - Removed support for advanced TCO features o e1000 - use pci_device_name for syslog messages till registering netdevice. Jeff Garzik: o Cset exclude: elf@buici.com|ChangeSet|20040920183610|08290 Jesse Brandeburg: o ixgb: fix endianness issue for tx cleanup John W. Linville: o 3c59x: style change in vortex_ethtool_ops declaration Kenji Kaneshige: o add missing pci_disable_device for e1000 Marc Singer: o adding smc91x ethernet to lpd7a40x Mika Kukkonen: o sparse: fix warnings in net/irda/* Neil Horman: o ns83820: add vlan tag hardware acceleration support Nishanth Aravamudan: o net/de2104x: replace schedule_timeout() with msleep() Olaf Hering: o remove old version check from mac8390 Pavel Machek: o swsuspend for ne2k-pci cards Ralf Bächle: o Stop queue on close in hdlcdrv Randy Dunlap: o skfp: remove assignment expression in conditional (sparse)(v2) o pcnet32: use unsigned 1-bit fields Stephen Hemminger: o slip: use netdev_priv o slip: use module_param o dummy: use netdev_priv o eql: use netdev_priv o ns83820: use module_param diff -Nru a/Documentation/networking/e100.txt b/Documentation/networking/e100.txt --- a/Documentation/networking/e100.txt 2004-10-26 01:30:56 -04:00 +++ b/Documentation/networking/e100.txt 2004-10-26 01:30:56 -04:00 @@ -1,14 +1,16 @@ Linux* Base Driver for the Intel(R) PRO/100 Family of Adapters ============================================================== -March 15, 2004 +September 13, 2004 Contents ======== - In This Release -- Supported Adapters +- Identifying Your Adapter +- Driver Configuration Parameters +- Additional Configurations - Support @@ -16,26 +18,140 @@ =============== This file describes the Linux* Base Driver for the Intel(R) PRO/100 Family of -Adapters, version 3.x.x. This driver includes support for Itanium(TM)-based -systems. +Adapters, version 3.2.x. This driver includes support for Itanium(TM)2 and +EM64T systems. -Supported Adapters -================== - -To verify that your adapter is supported, find the board ID number on the -adapter. Look for a label that has a barcode and a number in the format -A12345-001. Match this to the list of numbers above. +Identifying Your Adapter +======================== For more information on how to identify your adapter, go to the Adapter & Driver ID Guide at: http://support.intel.com/support/network/adapter/pro100/21397.htm -For the latest Intel PRO/100 network driver for Linux, see: +For the latest Intel network drivers for Linux, refer to the following +website. In the search field, enter your adapter name or type, or use the +networking link on the left to search for your adapter: http://downloadfinder.intel.com/scripts-df/support_intel.asp +Driver Configuration Parameters +=============================== + +The default value for each parameter is generally the recommended setting, +unless otherwise noted. + +Rx Descriptors: Number of receive descriptors. A receive descriptor is a data + structure that describes a receive buffer and its attributes to the network + controller. The data in the descriptor is used by the controller to write + data from the controller to host memory. In the 3.0.x driver the valid + range for this parameter is 64-256. The default value is 64. This parameter + can be changed using the command + + ethtool -G eth? rx n, where n is the number of desired rx descriptors. + +Tx Descriptors: Number of transmit descriptors. A transmit descriptor is a + data structure that describes a transmit buffer and its attributes to the + network controller. The data in the descriptor is used by the controller to + read data from the host memory to the controller. In the 3.0.x driver the + valid range for this parameter is 64-256. The default value is 64. This + parameter can be changed using the command + + ethtool -G eth? tx n, where n is the number of desired tx descriptors. + +Speed/Duplex: The driver auto-negotiates the link speed and duplex settings by + default. Ethtool can be used as follows to force speed/duplex. + + ethtool -s eth? autoneg off speed {10|100} duplex {full|half} + + NOTE: setting the speed/duplex to incorrect values will cause the link to + fail. + +Event Log Message Level: The driver uses the message level flag to log events + to syslog. The message level can be set at driver load time. It can also be + set using the command + + ethtool -s eth? msglvl n + +Additional Configurations +========================= + + Configuring the Driver on Different Distributions + ------------------------------------------------- + + Configuring a network driver to load properly when the system is started is + distribution dependent. Typically, the configuration process involves adding + an alias line to /etc/modules.conf as well as editing other system startup + scripts and/or configuration files. Many popular Linux distributions ship + with tools to make these changes for you. To learn the proper way to + configure a network device for your system, refer to your distribution + documentation. If during this process you are asked for the driver or module + name, the name for the Linux Base Driver for the Intel PRO/100 Family of + Adapters is e100. + + As an example, if you install the e100 driver for two PRO/100 adapters + (eth0 and eth1), add the following to modules.conf: + + alias eth0 e100 + alias eth1 e100 + + Viewing Link Messages + --------------------- + In order to see link messages and other Intel driver information on your + console, you must set the dmesg level up to six. This can be done by + entering the following on the command line before loading the e100 driver: + + dmesg -n 8 + + If you wish to see all messages issued by the driver, including debug + messages, set the dmesg level to eight. + + NOTE: This setting is not saved across reboots. + + Ethtool + ------- + + The driver utilizes the ethtool interface for driver configuration and + diagnostics, as well as displaying statistical information. Ethtool + version 1.6 or later is required for this functionality. + + The latest release of ethtool can be found at: + http://sf.net/projects/gkernel. + + After ethtool is installed, ethtool-copy.h must be copied and renamed to + ethtool.h in your kernel source tree at /include/linux. + Backup the original ethtool.h as needed before copying. The driver then + must be recompiled in order to take advantage of the latest ethtool + features. + + NOTE: This driver uses mii support from the kernel. As a result, when + there is no link, ethtool will report speed/duplex to be 10/half. + + NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support + for a more complete ethtool feature set can be enabled by upgrading + ethtool to ethtool-1.8.1. + + Enabling Wake on LAN* (WoL) + --------------------------- + WoL is provided through the Ethtool* utility. Ethtool is included with Red + Hat* 8.0. For other Linux distributions, download and install Ethtool from + the following website: http://sourceforge.net/projects/gkernel. + + For instructions on enabling WoL with Ethtool, refer to the Ethtool man + page. + + WoL will be enabled on the system during the next shut down or reboot. For + this driver version, in order to enable WoL, the e100 driver must be + loaded when shutting down or rebooting the system. + + NAPI + ---- + + NAPI (Rx polling mode) is supported in the e100 driver. NAPI is enabled + or disabled based on the configuration of the kernel. + + See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI. Support ======= diff -Nru a/Documentation/networking/e1000.txt b/Documentation/networking/e1000.txt --- a/Documentation/networking/e1000.txt 2004-10-26 01:30:56 -04:00 +++ b/Documentation/networking/e1000.txt 2004-10-26 01:30:56 -04:00 @@ -1,14 +1,14 @@ Linux* Base Driver for the Intel(R) PRO/1000 Family of Adapters =============================================================== -January 8, 2003 +September 13, 2004 Contents ======== - In This Release -- Supported Adapters +- Identifying Your Adapter - Command Line Parameters - Speed and Duplex Configuration - Additional Configurations @@ -20,63 +20,29 @@ =============== This file describes the Linux* Base Driver for the Intel(R) PRO/1000 Family -of Adapters, version 5.0.x. This driver includes support for -Itanium(TM)-based systems. +of Adapters, version 5.x.x. This driver includes support for Itanium(TM)2 +and EM64T systems. +For questions related to hardware requirements, refer to the documentation +supplied with your Intel PRO/1000 adapter. All hardware requirements listed +apply to use with Linux. Native VLANs are now available with supported kernels. - -Supported Adapters -================== - -The following Intel network adapters are compatible with the drivers in this -release: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - - 82542 PRO/1000 Gigabit Server Adapter 700262-xxx, 717037-xxx - - 82543 PRO/1000 F Server Adapter 738640-xxx, A38888-xxx - - 82543 PRO/1000 T Server Adapter A19845-xxx, A33948-xxx - - 82544 PRO/1000 XT Server Adapter A51580-xxx - - 82544 PRO/1000 XF Server Adapter A50484-xxx - - 82544 PRO/1000 T Desktop Adapter A62947-xxx - - 82540 PRO/1000 MT Desktop Adapter A78408-xxx - 82541 C91016-xxx - - 82545 PRO/1000 MT Server Adapter A92165-xxx - - 82546 PRO/1000 MT Dual Port Server Adapter A92111-xxx - - 82545 PRO/1000 MF Server Adapter A91622-xxx - - 82545 PRO/1000 MF Server Adapter(LX) A91624-xxx - - 82546 PRO/1000 MF Dual Port Server Adapter A91620-xxx - - - -To verify your Intel adapter is supported, find the board ID number on the -adapter. Look for a label that has a barcode and a number in the format -A12345-001. Match this to the list of numbers above. +Identifying Your Adapter +======================== For more information on how to identify your adapter, go to the Adapter & Driver ID Guide at: http://support.intel.com/support/network/adapter/pro100/21397.htm -For the latest Intel network drivers for Linux, refer to the following +For the latest Intel network drivers for Linux, refer to the following +website. In the search field, enter your adapter name or type, or use the +networking link on the left to search for your adapter: http://downloadfinder.intel.com/scripts-df/support_intel.asp - Command Line Parameters ======================= @@ -92,27 +58,39 @@ insmod e1000 TxDescriptors=80,128 -loads the e1000 driver with 80 TX resources for the first adapter and 128 TX -resources for the second adapter. +loads the e1000 driver with 80 TX descriptors for the first adapter and 128 TX +descriptors for the second adapter. The default value for each parameter is generally the recommended setting, -unless otherwise noted. - -For more information about the AutoNeg, Duplex, and Speed parameters, see the -"Speed and Duplex Configuration" section in this document. +unless otherwise noted. Also, if the driver is statically built into the +kernel, the driver is loaded with the default values for all the parameters. +Ethtool can be used to change some of the parameters at runtime. + + NOTES: For more information about the AutoNeg, Duplex, and Speed + parameters, see the "Speed and Duplex Configuration" section in + this document. + + For more information about the InterruptThrottleRate, RxIntDelay, + TxIntDelay, RxAbsIntDelay, and TxAbsIntDelay parameters, see the + application note at: + http://www.intel.com/design/network/applnots/ap450.htm + A descriptor describes a data buffer and attributes related to the + data buffer. This information is accessed by the hardware. AutoNeg (adapters using copper connections only) Valid Range: 0x01-0x0F, 0x20-0x2F Default Value: 0x2F This parameter is a bit mask that specifies which speed and duplex settings the board advertises. When this parameter is used, the Speed and - Duplex parameters must not be specified. + Duplex parameters must not be specified. + NOTE: Refer to the Speed and Duplex section of this readme for more + information on the AutoNeg parameter. Duplex (adapters using copper connections only) Valid Range: 0-2 (0=auto-negotiate, 1=half, 2=full) Default Value: 0 - Defines the direction in which data is allowed to flow. Can by either one + Defines the direction in which data is allowed to flow. Can be either one or two-directional. If both Duplex and the link partner are set to auto- negotiate, the board auto-detects the correct duplex. If the link partner is forced (either full or half), Duplex defaults to half-duplex. @@ -125,22 +103,46 @@ InterruptThrottleRate Valid Range: 100-100000 (0=off, 1=dynamic) -Default Value: 1 +Default Value: 8000 This value represents the maximum number of interrupts per second the controller generates. InterruptThrottleRate is another setting used in interrupt moderation. Dynamic mode uses a heuristic algorithm to adjust InterruptThrottleRate based on the current traffic load. +Un-supported Adapters: InterruptThrottleRate is NOT supported by 82542, 82543 + or 82544-based adapters. NOTE: InterruptThrottleRate takes precedence over the TxAbsIntDelay and RxAbsIntDelay parameters. In other words, minimizing the receive and/or transmit absolute delays does not force the controller to generate more interrupts than what the Interrupt Throttle Rate allows. + CAUTION: If you are using the Intel PRO/1000 CT Network Connection + (controller 82547), setting InterruptThrottleRate to a value + greater than 75,000, may hang (stop transmitting) adapters under + certain network conditions. If this occurs a NETDEV WATCHDOG + message is logged in the system event log. In addition, the + controller is automatically reset, restoring the network + connection. To eliminate the potential for the hang, ensure + that InterruptThrottleRate is set no greater than 75,000 and is + not set to 0. + NOTE: When e1000 is loaded with default settings and multiple adapters are + in use simultaneously, the CPU utilization may increase non-linearly. + In order to limit the CPU utilization without impacting the overall + throughput, we recommend that you load the driver as follows: + + insmod e1000.o InterruptThrottleRate=3000,3000,3000 + + This sets the InterruptThrottleRate to 3000 interrupts/sec for the + first, second, and third instances of the driver. The range of 2000 to + 3000 interrupts per second works on a majority of systems and is a + good starting point, but the optimal value will be platform-specific. + If CPU utilization is not a concern, use RX_POLLING (NAPI) and default + driver settings. RxDescriptors Valid Range: 80-256 for 82542 and 82543-based adapters - 80-4096 for 82540, 82544, 82545, and 82546-based adapters -Default Value: 80 + 80-4096 for all other supported adapters +Default Value: 256 This value is the number of receive descriptors allocated by the driver. Increasing this value allows the driver to buffer more incoming packets. Each descriptor is 16 bytes. A receive buffer is also allocated for each @@ -149,6 +151,9 @@ NOTE: MTU designates the frame size. It only needs to be set for Jumbo Frames. + NOTE: Depending on the available system resources, the request for a + higher number of receive descriptors may be denied. In this case, + use a lower number. RxIntDelay Valid Range: 0-65535 (0=off) @@ -168,11 +173,11 @@ restoring the network connection. To eliminate the potential for the hang ensure that RxIntDelay is set to 0. -RxAbsIntDelay (82540, 82545, and 82546-based adapters only) +RxAbsIntDelay (82540, 82545 and later adapters only) Valid Range: 0-65535 (0=off) Default Value: 128 This value, in units of 1.024 microseconds, limits the delay in which a - transmit interrupt is generated. Useful only if RxIntDelay is non-zero, + receive interrupt is generated. Useful only if RxIntDelay is non-zero, this value ensures that an interrupt is generated after the initial packet is received within the set amount of time. Proper tuning, along with RxIntDelay, may improve traffic throughput in specific network @@ -188,12 +193,16 @@ TxDescriptors Valid Range: 80-256 for 82542 and 82543-based adapters - 80-4096 for 82540, 82544, 82545, and 82546-based adapters + 80-4096 for all other supported adapters Default Value: 256 This value is the number of transmit descriptors allocated by the driver. Increasing this value allows the driver to queue more transmits. Each descriptor is 16 bytes. + NOTE: Depending on the available system resources, the request for a + higher number of transmit descriptors may be denied. In this case, + use a lower number. + TxIntDelay Valid Range: 0-65535 (0=off) Default Value: 64 @@ -203,7 +212,7 @@ system is reporting dropped transmits, this value may be set too high causing the driver to run out of available transmit descriptors. -TxAbsIntDelay (82540, 82545, and 82546-based adapters only) +TxAbsIntDelay (82540, 82545 and later adapters only) Valid Range: 0-65535 (0=off) Default Value: 64 This value, in units of 1.024 microseconds, limits the delay in which a @@ -219,7 +228,6 @@ A value of '1' indicates that the driver should enable IP checksum offload for received packets (both UDP and TCP) to the adapter hardware. - Speed and Duplex Configuration ============================== @@ -251,6 +259,10 @@ Speed (Mbps) N/A N/A 1000 N/A 100 100 10 10 Duplex Full Full Half Full Half +For example to limit the negotiated speed/duplex on the interface to 10 Mbps +Half or Full duplex, set AutoNeg to 0x02: + insmod e1000 AutoNeg=0x02 + Note that setting AutoNeg does not guarantee that the board will link at the highest specified speed or duplex mode, but the board will link at the highest possible speed/duplex of the link partner IF the link partner is also @@ -261,6 +273,38 @@ Additional Configurations ========================= + Configuring the Driver on Different Distributions + ------------------------------------------------- + + Configuring a network driver to load properly when the system is started is + distribution dependent. Typically, the configuration process involves adding + an alias line to /etc/modules.conf as well as editing other system startup + scripts and/or configuration files. Many popular Linux distributions ship + with tools to make these changes for you. To learn the proper way to + configure a network device for your system, refer to your distribution + documentation. If during this process you are asked for the driver or module + name, the name for the Linux Base Driver for the Intel PRO/1000 Family of + Adapters is e1000. + + As an example, if you install the e1000 driver for two PRO/1000 adapters + (eth0 and eth1) and set the speed and duplex to 10full and 100half, add the + following to modules.conf: + + alias eth0 e1000 + alias eth1 e1000 + options e1000 Speed=10,100 Duplex=2,1 + + Viewing Link Messages + --------------------- + + Link messages will not be displayed to the console if the distribution is + restricting system messages. In order to see network driver link messages on + your console, set dmesg to eight by entering the following: + + dmesg -n 8 + + NOTE: This setting is not saved across reboots. + Jumbo Frames ------------ @@ -278,6 +322,51 @@ 10 or 100 Mbps may result in poor performance or loss of link. + NOTE: MTU designates the frame size. To enable Jumbo Frames, increase the + MTU size on the interface beyond 1500. + + Ethtool + ------- + + The driver utilizes the ethtool interface for driver configuration and + diagnostics, as well as displaying statistical information. Ethtool + version 1.6 or later is required for this functionality. + + The latest release of ethtool can be found from + http://sf.net/projects/gkernel. After ethtool is installed, + ethtool-copy.h must be copied and renamed to ethtool.h in your kernel + source tree at /include/linux. Backup the original + ethtool.h as needed before copying. The driver then must be recompiled + in order to take advantage of the latest ethtool features. + + NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support + for a more complete ethtool feature set can be enabled by upgrading + ethtool to ethtool-1.8.1. + + Enabling Wake on LAN* (WoL) + --------------------------- + + WoL is configured through the Ethtool* utility. Ethtool is included with + all versions of Red Hat after Red Hat 7.2. For other Linux distributions, + download and install Ethtool from the following website: + http://sourceforge.net/projects/gkernel. + + For instructions on enabling WoL with Ethtool, refer to the website listed + above. + + WoL will be enabled on the system during the next shut down or reboot. + For this driver version, in order to enable WoL, the e1000 driver must be + loaded when shutting down or rebooting the system. + + NAPI + ---- + + NAPI (Rx polling mode) is supported in the e1000 driver. NAPI is enabled + or disabled based on the configuration of the kernel. + + See www.cyberus.ca/~hadi/usenix-paper.tgz for more information on NAPI. + + Known Issues ============ @@ -285,9 +374,9 @@ ------------------------------- Memory allocation failures have been observed on Linux systems with 64 MB - of RAM or less that are running Jumbo Frames. If you are using Jumbo - Frames, your system may require more than the advertised minimum - requirement of 64 MB of system memory. + of RAM or less that are running Jumbo Frames. If you are using Jumbo Frames, + your system may require more than the advertised minimum requirement of 64 MB + of system memory. Support diff -Nru a/Documentation/networking/ixgb.txt b/Documentation/networking/ixgb.txt --- a/Documentation/networking/ixgb.txt 2004-10-26 01:30:56 -04:00 +++ b/Documentation/networking/ixgb.txt 2004-10-26 01:30:56 -04:00 @@ -1,14 +1,14 @@ Linux* Base Driver for the Intel(R) PRO/10GbE Family of Adapters ================================================================ -January 06, 2003 +September 13, 2004 Contents ======== - In This Release -- Supported Adapters +- Identifying Your Adapter - Command Line Parameters - Improving Performance - Support @@ -18,36 +18,23 @@ =============== This file describes the Linux* Base Driver for the Intel(R) PRO/10GbE Family -of Adapters, version 1.0.x. This driver is intended for 2.4.x kernels; it is -known to build properly on 2.4.x kernels through 2.4.18. Intel focused -testing on Intel architectures running kernels 2.4.18. This driver includes -support for Itanium(TM)-based systems. +of Adapters, version 1.0.x. This driver includes support for Itanium(TM)2 and +EM64T systems. For questions related to hardware requirements, refer to the documentation supplied with your Intel PRO/10GbE adapter. All hardware requirements listed apply to use with Linux. - -Supported Adapters -================== - -The following Intel network adapters are compatible with the drivers in this -release: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - - 82597EX Intel(R) PRO/10GbE LR Server Adapter A82505-xxx - +Identifying Your Adapter +======================== To verify your Intel adapter is supported, find the board ID number on the adapter. Look for a label that has a barcode and a number in the format -A12345-001. Match this to the list of numbers above. +A12345-001. -For more information on how to identify your adapter, go to the Adapter & -Driver ID Guide at: +Use the above information and the Adapter & Driver ID Guide at: - http://support.intel.com/support/network/adapter/pro100/21397.htm + http://support.intel.com/support/network/adapter/pro100/21397.htm For the latest Intel network drivers for Linux, go to: @@ -72,8 +59,9 @@ resources for the second adapter. The default value for each parameter is generally the recommended setting, -unless otherwise noted. - +unless otherwise noted. Also, if the driver is statically built into the +kernel, the driver is loaded with the default values for all the parameters. +Ethtool can be used to change some of the parameters at runtime. FlowControl Valid Range: 0-3 (0=none, 1=Rx only, 2=Tx only, 3=Rx&Tx) @@ -124,7 +112,6 @@ A value of '1' indicates that the driver should enable IP checksum offload for transmitted packets (both UDP and TCP) to the adapter hardware. - Improving Performance ===================== diff -Nru a/drivers/net/3c59x.c b/drivers/net/3c59x.c --- a/drivers/net/3c59x.c 2004-10-26 01:30:56 -04:00 +++ b/drivers/net/3c59x.c 2004-10-26 01:30:56 -04:00 @@ -2887,7 +2887,7 @@ } static struct ethtool_ops vortex_ethtool_ops = { - .get_drvinfo = vortex_get_drvinfo, + .get_drvinfo = vortex_get_drvinfo, }; #ifdef CONFIG_PCI diff -Nru a/drivers/net/Kconfig b/drivers/net/Kconfig --- a/drivers/net/Kconfig 2004-10-26 01:30:56 -04:00 +++ b/drivers/net/Kconfig 2004-10-26 01:30:56 -04:00 @@ -1413,66 +1413,17 @@ depends on NET_PCI && PCI select MII ---help--- - This driver supports Intel(R) PRO/100 family of adapters, which - includes: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - - 82558 PRO/100+ PCI Adapter 668081-xxx, - 689661-xxx - 82558 PRO/100+ Management Adapter 691334-xxx, - 701738-xxx, - 721383-xxx - 82558 PRO/100+ Dual Port Server Adapter 714303-xxx, - 711269-xxx, - A28276-xxx - 82558 PRO/100+ PCI Server Adapter 710550-xxx - 82550 PRO/100 S Server Adapter 752438-xxx - 82559 A56831-xxx, - A10563-xxx, - A12171-xxx, - A12321-xxx, - A12320-xxx, - A12170-xxx - 748568-xxx - 748565-xxx - 82550 PRO/100 S Desktop Adapter 751767-xxx - 82559 748592-xxx, - A12167-xxx, - A12318-xxx, - A12317-xxx, - A12165-xxx, - 748569-xxx - 82559 PRO/100+ Server Adapter 729757-xxx - 82559 PRO/100 S Management Adapter 748566-xxx, - 748564-xxx - 82550 PRO/100 S Dual Port Server Adapter A56831-xxx - 82551 PRO/100 M Desktop Adapter A80897-xxx - PRO/100 S Advanced Management Adapter - 747842-xxx, - 745171-xxx - CNR PRO/100 VE Desktop Adapter A10386-xxx, - A10725-xxx, - A23801-xxx, - A19716-xxx - PRO/100 VM Desktop Adapter A14323-xxx, - A19725-xxx, - A23801-xxx, - A22220-xxx, - A23796-xxx - - + This driver supports Intel(R) PRO/100 family of adapters. To verify that your adapter is supported, find the board ID number on the adapter. Look for a label that has a barcode and a number - in the format 123456-001 (six digits hyphen three digits). Match - this to the list of numbers above. + in the format 123456-001 (six digits hyphen three digits). - For more information on how to identify your adapter, go to the - Adapter & Driver ID Guide at: + Use the above information and the Adapter & Driver ID Guide at: http://support.intel.com/support/network/adapter/pro100/21397.htm + to identify the adapter. + For the latest Intel PRO/100 network driver for Linux, see: http://appsr.intel.com/scripts-df/support_intel.asp @@ -1730,7 +1681,7 @@ (e.g. VT8235). To compile this driver as a module, choose M here. The module - will be called via-rhine. + will be called via-velocity. config VIA_RHINE_MMIO bool "Use MMIO instead of PIO" @@ -1742,18 +1693,6 @@ If unsure, say Y. -config VIA_VELOCITY - tristate "VIA Velocity support" - depends on NET_PCI && PCI - select CRC32 - select CRC_CCITT - select MII - help - If you have a VIA "Velocity" based network card say Y here. - - To compile this driver as a module, choose M here. The module - will be called via-velocity. - config LAN_SAA9730 bool "Philips SAA9730 Ethernet support (EXPERIMENTAL)" depends on NET_PCI && EXPERIMENTAL && MIPS @@ -1933,29 +1872,8 @@ depends on PCI ---help--- This driver supports Intel(R) PRO/1000 gigabit ethernet family of - adapters, which includes: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - 82542 PRO/1000 Gigabit Server Adapter 700262-xxx, - 717037-xxx - 82543 PRO/1000 F Server Adapter 738640-xxx, - A38888-xxx - 82543 PRO/1000 T Server Adapter A19845-xxx, - A33948-xxx - 82544 PRO/1000 XT Server Adapter A51580-xxx - 82544 PRO/1000 XF Server Adapter A50484-xxx - 82544 PRO/1000 T Desktop Adapter A62947-xxx - 82540 PRO/1000 MT Desktop Adapter A78408-xxx - 82541 PRO/1000 MT Desktop Adapter C91016-xxx - 82545 PRO/1000 MT Server Adapter A92165-xxx - 82546 PRO/1000 MT Dual Port Server Adapter A92111-xxx - 82545 PRO/1000 MF Server Adapter A91622-xxx - 82545 PRO/1000 MF Server Adapter(LX) A91624-xxx - 82546 PRO/1000 MF Dual Port Server Adapter A91620-xxx - - For more information on how to identify your adapter, go to the - Adapter & Driver ID Guide at: + adapters. For more information on how to identify your adapter, go + to the Adapter & Driver ID Guide at: @@ -2140,6 +2058,18 @@ say M here and read Documentation/kbuild/modules.txt. The module will be called sk98lin. This is recommended. +config VIA_VELOCITY + tristate "VIA Velocity support" + depends on NET_PCI && PCI + select CRC32 + select CRC_CCITT + select MII + help + If you have a VIA "Velocity" based network card say Y here. + + To compile this driver as a module, choose M here. The module + will be called via-velocity. + config TIGON3 tristate "Broadcom Tigon3 support" depends on PCI @@ -2202,14 +2132,8 @@ depends on PCI ---help--- This driver supports Intel(R) PRO/10GbE family of - adapters, which includes: - - Controller Adapter Name Board IDs - ---------- ------------ --------- - 82597EX Intel(R) PRO/10GbE LR Server Adapter A82505-xxx - - For more information on how to identify your adapter, go to the - Adapter & Driver ID Guide at: + adapters. For more information on how to identify your adapter, go + to the Adapter & Driver ID Guide at: diff -Nru a/drivers/net/dummy.c b/drivers/net/dummy.c --- a/drivers/net/dummy.c 2004-10-26 01:30:56 -04:00 +++ b/drivers/net/dummy.c 2004-10-26 01:30:56 -04:00 @@ -77,7 +77,7 @@ static int dummy_xmit(struct sk_buff *skb, struct net_device *dev) { - struct net_device_stats *stats = dev->priv; + struct net_device_stats *stats = netdev_priv(dev); stats->tx_packets++; stats->tx_bytes+=skb->len; @@ -88,7 +88,7 @@ static struct net_device_stats *dummy_get_stats(struct net_device *dev) { - return dev->priv; + return netdev_priv(dev); } static struct net_device **dummies; diff -Nru a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h --- a/drivers/net/e1000/e1000.h 2004-10-26 01:30:56 -04:00 +++ b/drivers/net/e1000/e1000.h 2004-10-26 01:30:56 -04:00 @@ -64,7 +64,6 @@ #include #include #include -#include #include #ifdef NETIF_F_TSO #include @@ -73,7 +72,6 @@ #include #include #include -#include #define BAR_0 0 #define BAR_1 1 diff -Nru a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c --- a/drivers/net/e1000/e1000_ethtool.c 2004-10-26 01:30:56 -04:00 +++ b/drivers/net/e1000/e1000_ethtool.c 2004-10-26 01:30:56 -04:00 @@ -249,7 +249,8 @@ e1000_reset(adapter); } else - return e1000_force_mac_fc(hw); + return ((hw->media_type == e1000_media_type_fiber) ? + e1000_setup_link(hw) : e1000_force_mac_fc(hw)); return 0; } @@ -592,6 +593,9 @@ tx_old = adapter->tx_ring; rx_old = adapter->rx_ring; + if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) + return -EINVAL; + if(netif_running(adapter->netdev)) e1000_down(adapter); @@ -637,7 +641,6 @@ return err; } - #define REG_PATTERN_TEST(R, M, W) \ { \ uint32_t pat, value; \ @@ -1017,8 +1020,8 @@ struct e1000_rx_desc *rx_desc = E1000_RX_DESC(*rxdr, i); struct sk_buff *skb; - if(!(skb = alloc_skb(E1000_RXBUFFER_2048 + NET_IP_ALIGN, - GFP_KERNEL))) { + if(!(skb = alloc_skb(E1000_RXBUFFER_2048 + NET_IP_ALIGN, + GFP_KERNEL))) { ret_val = 6; goto err_nomem; } @@ -1442,6 +1445,8 @@ case E1000_DEV_ID_82543GC_COPPER: case E1000_DEV_ID_82544EI_FIBER: case E1000_DEV_ID_82546EB_QUAD_COPPER: + case E1000_DEV_ID_82545EM_FIBER: + case E1000_DEV_ID_82545EM_COPPER: wol->supported = 0; wol->wolopts = 0; return; diff -Nru a/drivers/net/e1000/e1000_hw.c b/drivers/net/e1000/e1000_hw.c --- a/drivers/net/e1000/e1000_hw.c 2004-10-26 01:30:56 -04:00 +++ b/drivers/net/e1000/e1000_hw.c 2004-10-26 01:30:56 -04:00 @@ -65,6 +65,7 @@ static void e1000_standby_eeprom(struct e1000_hw *hw); static int32_t e1000_id_led_init(struct e1000_hw * hw); static int32_t e1000_set_vco_speed(struct e1000_hw *hw); +static int32_t e1000_polarity_reversal_workaround(struct e1000_hw *hw); static int32_t e1000_set_phy_mode(struct e1000_hw *hw); /* IGP cable length table */ @@ -1594,6 +1595,15 @@ ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_data); if(ret_val) return ret_val; + + if((hw->mac_type == e1000_82544 || hw->mac_type == e1000_82543) && + (!hw->autoneg) && + (hw->forced_speed_duplex == e1000_10_full || + hw->forced_speed_duplex == e1000_10_half)) { + ret_val = e1000_polarity_reversal_workaround(hw); + if(ret_val) + return ret_val; + } } return E1000_SUCCESS; } @@ -1983,6 +1993,7 @@ uint32_t ctrl; uint32_t status; uint32_t rctl; + uint32_t icr; uint32_t signal = 0; int32_t ret_val; uint16_t phy_data; @@ -2032,6 +2043,25 @@ * link-up */ e1000_check_downshift(hw); + /* If we are on 82544 or 82543 silicon and speed/duplex + * are forced to 10H or 10F, then we will implement the polarity + * reversal workaround. We disable interrupts first, and upon + * returning, place the devices interrupt state to its previous + * value except for the link status change interrupt which will + * happen due to the execution of this workaround. + */ + + if((hw->mac_type == e1000_82544 || hw->mac_type == e1000_82543) && + (!hw->autoneg) && + (hw->forced_speed_duplex == e1000_10_full || + hw->forced_speed_duplex == e1000_10_half)) { + E1000_WRITE_REG(hw, IMC, 0xffffffff); + ret_val = e1000_polarity_reversal_workaround(hw); + icr = E1000_READ_REG(hw, ICR); + E1000_WRITE_REG(hw, ICS, (icr & ~E1000_ICS_LSC)); + E1000_WRITE_REG(hw, IMS, IMS_ENABLE_MASK); + } + } else { /* No link detected */ e1000_config_dsp_after_link_change(hw, FALSE); @@ -5191,28 +5221,88 @@ return E1000_SUCCESS; } -/****************************************************************************** - * Verifies the hardware needs to allow ARPs to be processed by the host - * - * hw - Struct containing variables accessed by shared code - * - * returns: - TRUE/FALSE - * - *****************************************************************************/ -uint32_t -e1000_enable_mng_pass_thru(struct e1000_hw *hw) +static int32_t +e1000_polarity_reversal_workaround(struct e1000_hw *hw) { - uint32_t manc; + int32_t ret_val; + uint16_t mii_status_reg; + uint16_t i; - if (hw->asf_firmware_present) { - manc = E1000_READ_REG(hw, MANC); + /* Polarity reversal workaround for forced 10F/10H links. */ + + /* Disable the transmitter on the PHY */ + + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_PAGE_SELECT, 0x0019); + if(ret_val) + return ret_val; + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xFFFF); + if(ret_val) + return ret_val; + + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_PAGE_SELECT, 0x0000); + if(ret_val) + return ret_val; + + /* This loop will early-out if the NO link condition has been met. */ + for(i = PHY_FORCE_TIME; i > 0; i--) { + /* Read the MII Status Register and wait for Link Status bit + * to be clear. + */ + + ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &mii_status_reg); + if(ret_val) + return ret_val; + + ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &mii_status_reg); + if(ret_val) + return ret_val; + + if((mii_status_reg & ~MII_SR_LINK_STATUS) == 0) break; + msec_delay_irq(100); + } + + /* Recommended delay time after link has been lost */ + msec_delay_irq(1000); + + /* Now we will re-enable th transmitter on the PHY */ + + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_PAGE_SELECT, 0x0019); + if(ret_val) + return ret_val; + msec_delay_irq(50); + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xFFF0); + if(ret_val) + return ret_val; + msec_delay_irq(50); + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0xFF00); + if(ret_val) + return ret_val; + msec_delay_irq(50); + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_GEN_CONTROL, 0x0000); + if(ret_val) + return ret_val; - if (!(manc & E1000_MANC_RCV_TCO_EN) || - !(manc & E1000_MANC_EN_MAC_ADDR_FILTER)) - return FALSE; - if ((manc & E1000_MANC_SMBUS_EN) && !(manc & E1000_MANC_ASF_EN)) - return TRUE; + ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_PAGE_SELECT, 0x0000); + if(ret_val) + return ret_val; + + /* This loop will early-out if the link condition has been met. */ + for(i = PHY_FORCE_TIME; i > 0; i--) { + /* Read the MII Status Register and wait for Link Status bit + * to be set. + */ + + ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &mii_status_reg); + if(ret_val) + return ret_val; + + ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &mii_status_reg); + if(ret_val) + return ret_val; + + if(mii_status_reg & MII_SR_LINK_STATUS) break; + msec_delay_irq(100); } - return FALSE; + return E1000_SUCCESS; } diff -Nru a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c --- a/drivers/net/e1000/e1000_main.c 2004-10-26 01:30:56 -04:00 +++ b/drivers/net/e1000/e1000_main.c 2004-10-26 01:30:56 -04:00 @@ -48,7 +48,7 @@ #else #define DRIVERNAPI "-NAPI" #endif -char e1000_driver_version[] = "5.3.19-k2"DRIVERNAPI; +char e1000_driver_version[] = "5.5.4-k2"DRIVERNAPI; char e1000_copyright[] = "Copyright (c) 1999-2004 Intel Corporation."; /* e1000_pci_tbl - PCI Device ID Table @@ -311,7 +311,8 @@ void e1000_reset(struct e1000_adapter *adapter) { - uint32_t pba, manc; + uint32_t pba; + /* Repartition Pba for greater than 9k mtu * To take effect CTRL.RST is required. */ @@ -354,12 +355,6 @@ e1000_reset_adaptive(&adapter->hw); e1000_phy_get_info(&adapter->hw, &adapter->phy_info); - - if(adapter->en_mng_pt) { - manc = E1000_READ_REG(&adapter->hw, MANC); - manc |= (E1000_MANC_ARP_EN | E1000_MANC_EN_MNG2HOST); - E1000_WRITE_REG(&adapter->hw, MANC, manc); - } } /** @@ -422,11 +417,6 @@ adapter->hw.back = adapter; adapter->msg_enable = (1 << debug) - 1; - rtnl_lock(); - /* we need to set the name early for the DPRINTK macro */ - if(dev_alloc_name(netdev, netdev->name) < 0) - goto err_free_unlock; - mmio_start = pci_resource_start(pdev, BAR_0); mmio_len = pci_resource_len(pdev, BAR_0); @@ -466,6 +456,7 @@ #ifdef CONFIG_NET_POLL_CONTROLLER netdev->poll_controller = e1000_netpoll; #endif + strcpy(netdev->name, pci_name(pdev)); netdev->mem_start = mmio_start; netdev->mem_end = mmio_start + mmio_len; @@ -502,8 +493,6 @@ /* hard_start_xmit is safe against parallel locking */ netdev->features |= NETIF_F_LLTX; - adapter->en_mng_pt = e1000_enable_mng_pass_thru(&adapter->hw); - /* before reading the EEPROM, reset the controller to * put the device in a known good starting state */ @@ -553,7 +542,6 @@ netif_carrier_off(netdev); netif_stop_queue(netdev); - DPRINTK(PROBE, INFO, "Intel(R) PRO/1000 Network Connection\n"); e1000_check_options(adapter); /* Initial Wake on LAN setting @@ -586,12 +574,13 @@ /* reset the hardware with the new settings */ e1000_reset(adapter); - /* We're already holding the rtnl lock; call the no-lock version */ - if((err = register_netdevice(netdev))) + strcpy(netdev->name, "eth%d"); + if((err = register_netdev(netdev))) goto err_register; + DPRINTK(PROBE, INFO, "Intel(R) PRO/1000 Network Connection\n"); + cards_found++; - rtnl_unlock(); return 0; err_register: @@ -599,8 +588,6 @@ err_eeprom: iounmap(adapter->hw.hw_addr); err_ioremap: -err_free_unlock: - rtnl_unlock(); free_netdev(netdev); err_alloc_etherdev: pci_release_regions(pdev); @@ -641,6 +628,8 @@ pci_release_regions(pdev); free_netdev(netdev); + + pci_disable_device(pdev); } /** @@ -2335,8 +2324,8 @@ if(unlikely(adapter->vlgrp && (rx_desc->status & E1000_RXD_STAT_VP))) { vlan_hwaccel_receive_skb(skb, adapter->vlgrp, - le16_to_cpu(rx_desc->special & - E1000_RXD_SPC_VLAN_MASK)); + le16_to_cpu(rx_desc->special) & + E1000_RXD_SPC_VLAN_MASK); } else { netif_receive_skb(skb); } @@ -2344,8 +2333,8 @@ if(unlikely(adapter->vlgrp && (rx_desc->status & E1000_RXD_STAT_VP))) { vlan_hwaccel_rx(skb, adapter->vlgrp, - le16_to_cpu(rx_desc->special & - E1000_RXD_SPC_VLAN_MASK)); + le16_to_cpu(rx_desc->special) & + E1000_RXD_SPC_VLAN_MASK); } else { netif_rx(skb); } @@ -2894,9 +2883,9 @@ { struct net_device *netdev = pci_get_drvdata(pdev); struct e1000_adapter *adapter = netdev->priv; - uint32_t manc; + uint32_t manc, ret; - pci_enable_device(pdev); + ret = pci_enable_device(pdev); pci_set_power_state(pdev, 0); pci_restore_state(pdev); diff -Nru a/drivers/net/e1000/e1000_osdep.h b/drivers/net/e1000/e1000_osdep.h --- a/drivers/net/e1000/e1000_osdep.h 2004-10-26 01:30:56 -04:00 +++ b/drivers/net/e1000/e1000_osdep.h 2004-10-26 01:30:56 -04:00 @@ -49,6 +49,12 @@ set_current_state(TASK_UNINTERRUPTIBLE); \ schedule_timeout((x * HZ)/1000 + 2); \ } } while(0) +/* Some workarounds require millisecond delays and are run during interrupt + * context. Most notably, when establishing link, the phy may need tweaking + * but cannot process phy register reads/writes faster than millisecond + * intervals...and we establish link due to a "link status change" interrupt. + */ +#define msec_delay_irq(x) mdelay(x) #endif #define PCI_COMMAND_REGISTER PCI_COMMAND diff -Nru a/drivers/net/e1000/e1000_param.c b/drivers/net/e1000/e1000_param.c --- a/drivers/net/e1000/e1000_param.c 2004-10-26 01:30:56 -04:00 +++ b/drivers/net/e1000/e1000_param.c 2004-10-26 01:30:56 -04:00 @@ -34,31 +34,21 @@ #define E1000_MAX_NIC 32 -#define OPTION_UNSET -1 +#define OPTION_UNSET -1 #define OPTION_DISABLED 0 #define OPTION_ENABLED 1 -/* Module Parameters are always initialized to -1, so that the driver - * can tell the difference between no user specified value or the - * user asking for the default value. - * The true default values are loaded in when e1000_check_options is called. - * - * This is a GCC extension to ANSI C. - * See the item "Labeled Elements in Initializers" in the section - * "Extensions to the C Language Family" of the GCC documentation. - */ - -#define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET } - /* All parameters are treated the same, as an integer array of values. * This macro just reduces the need to repeat the same declaration code * over and over (plus this helps to avoid typo bugs). */ -#define E1000_PARAM(X, S) \ -static const int __devinitdata X[E1000_MAX_NIC + 1] = E1000_PARAM_INIT; \ -MODULE_PARM(X, "1-" __MODULE_STRING(E1000_MAX_NIC) "i"); \ -MODULE_PARM_DESC(X, S); +#define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET } +#define E1000_PARAM(X, desc) \ + static int __devinitdata X[E1000_MAX_NIC+1] = E1000_PARAM_INIT; \ + static int num_##X = 0; \ + module_param_array(X, int, &num_##X, 0); \ + MODULE_PARM_DESC(X, desc); /* Transmit Descriptor Count * @@ -305,7 +295,6 @@ DPRINTK(PROBE, NOTICE, "Warning: no configuration for board #%i\n", bd); DPRINTK(PROBE, NOTICE, "Using defaults for all values\n"); - bd = E1000_MAX_NIC; } { /* Transmit Descriptor Count */ @@ -322,9 +311,14 @@ opt.arg.r.max = mac_type < e1000_82544 ? E1000_MAX_TXD : E1000_MAX_82544_TXD; - tx_ring->count = TxDescriptors[bd]; - e1000_validate_option(&tx_ring->count, &opt, adapter); - E1000_ROUNDUP(tx_ring->count, REQ_TX_DESCRIPTOR_MULTIPLE); + if (num_TxDescriptors > bd) { + tx_ring->count = TxDescriptors[bd]; + e1000_validate_option(&tx_ring->count, &opt, adapter); + E1000_ROUNDUP(tx_ring->count, + REQ_TX_DESCRIPTOR_MULTIPLE); + } else { + tx_ring->count = opt.def; + } } { /* Receive Descriptor Count */ struct e1000_option opt = { @@ -340,9 +334,14 @@ opt.arg.r.max = mac_type < e1000_82544 ? E1000_MAX_RXD : E1000_MAX_82544_RXD; - rx_ring->count = RxDescriptors[bd]; - e1000_validate_option(&rx_ring->count, &opt, adapter); - E1000_ROUNDUP(rx_ring->count, REQ_RX_DESCRIPTOR_MULTIPLE); + if (num_RxDescriptors > bd) { + rx_ring->count = RxDescriptors[bd]; + e1000_validate_option(&rx_ring->count, &opt, adapter); + E1000_ROUNDUP(rx_ring->count, + REQ_RX_DESCRIPTOR_MULTIPLE); + } else { + rx_ring->count = opt.def; + } } { /* Checksum Offload Enable/Disable */ struct e1000_option opt = { @@ -352,9 +351,13 @@ .def = OPTION_ENABLED }; - int rx_csum = XsumRX[bd]; - e1000_validate_option(&rx_csum, &opt, adapter); - adapter->rx_csum = rx_csum; + if (num_XsumRX > bd) { + int rx_csum = XsumRX[bd]; + e1000_validate_option(&rx_csum, &opt, adapter); + adapter->rx_csum = rx_csum; + } else { + adapter->rx_csum = opt.def; + } } { /* Flow Control */ @@ -374,9 +377,13 @@ .p = fc_list }} }; - int fc = FlowControl[bd]; - e1000_validate_option(&fc, &opt, adapter); - adapter->hw.fc = adapter->hw.original_fc = fc; + if (num_FlowControl > bd) { + int fc = FlowControl[bd]; + e1000_validate_option(&fc, &opt, adapter); + adapter->hw.fc = adapter->hw.original_fc = fc; + } else { + adapter->hw.fc = opt.def; + } } { /* Transmit Interrupt Delay */ struct e1000_option opt = { @@ -388,8 +395,13 @@ .max = MAX_TXDELAY }} }; - adapter->tx_int_delay = TxIntDelay[bd]; - e1000_validate_option(&adapter->tx_int_delay, &opt, adapter); + if (num_TxIntDelay > bd) { + adapter->tx_int_delay = TxIntDelay[bd]; + e1000_validate_option(&adapter->tx_int_delay, &opt, + adapter); + } else { + adapter->tx_int_delay = opt.def; + } } { /* Transmit Absolute Interrupt Delay */ struct e1000_option opt = { @@ -401,8 +413,13 @@ .max = MAX_TXABSDELAY }} }; - adapter->tx_abs_int_delay = TxAbsIntDelay[bd]; - e1000_validate_option(&adapter->tx_abs_int_delay, &opt, adapter); + if (num_TxAbsIntDelay > bd) { + adapter->tx_abs_int_delay = TxAbsIntDelay[bd]; + e1000_validate_option(&adapter->tx_abs_int_delay, &opt, + adapter); + } else { + adapter->tx_abs_int_delay = opt.def; + } } { /* Receive Interrupt Delay */ struct e1000_option opt = { @@ -414,8 +431,13 @@ .max = MAX_RXDELAY }} }; - adapter->rx_int_delay = RxIntDelay[bd]; - e1000_validate_option(&adapter->rx_int_delay, &opt, adapter); + if (num_RxIntDelay > bd) { + adapter->rx_int_delay = RxIntDelay[bd]; + e1000_validate_option(&adapter->rx_int_delay, &opt, + adapter); + } else { + adapter->rx_int_delay = opt.def; + } } { /* Receive Absolute Interrupt Delay */ struct e1000_option opt = { @@ -427,8 +449,13 @@ .max = MAX_RXABSDELAY }} }; - adapter->rx_abs_int_delay = RxAbsIntDelay[bd]; - e1000_validate_option(&adapter->rx_abs_int_delay, &opt, adapter); + if (num_RxAbsIntDelay > bd) { + adapter->rx_abs_int_delay = RxAbsIntDelay[bd]; + e1000_validate_option(&adapter->rx_abs_int_delay, &opt, + adapter); + } else { + adapter->rx_abs_int_delay = opt.def; + } } { /* Interrupt Throttling Rate */ struct e1000_option opt = { @@ -440,20 +467,27 @@ .max = MAX_ITR }} }; - adapter->itr = InterruptThrottleRate[bd]; - switch(adapter->itr) { - case -1: + if (num_InterruptThrottleRate > bd) { + adapter->itr = InterruptThrottleRate[bd]; + switch(adapter->itr) { + case -1: + adapter->itr = 1; + break; + case 0: + DPRINTK(PROBE, INFO, "%s turned off\n", + opt.name); + break; + case 1: + DPRINTK(PROBE, INFO, "%s set to dynamic mode\n", + opt.name); + break; + default: + e1000_validate_option(&adapter->itr, &opt, + adapter); + break; + } + } else { adapter->itr = 1; - break; - case 0: - DPRINTK(PROBE, INFO, "%s turned off\n", opt.name); - break; - case 1: - DPRINTK(PROBE, INFO, "%s set to dynamic mode\n", opt.name); - break; - default: - e1000_validate_option(&adapter->itr, &opt, adapter); - break; } } @@ -481,17 +515,17 @@ e1000_check_fiber_options(struct e1000_adapter *adapter) { int bd = adapter->bd_number; - bd = bd > E1000_MAX_NIC ? E1000_MAX_NIC : bd; - - if((Speed[bd] != OPTION_UNSET)) { + if(num_Speed > bd) { DPRINTK(PROBE, INFO, "Speed not valid for fiber adapters, " "parameter ignored\n"); } - if((Duplex[bd] != OPTION_UNSET)) { + + if(num_Duplex > bd) { DPRINTK(PROBE, INFO, "Duplex not valid for fiber adapters, " "parameter ignored\n"); } - if((AutoNeg[bd] != OPTION_UNSET) && (AutoNeg[bd] != 0x20)) { + + if((num_AutoNeg > bd) && (AutoNeg[bd] != 0x20)) { DPRINTK(PROBE, INFO, "AutoNeg other than 1000/Full is " "not valid for fiber adapters, " "parameter ignored\n"); @@ -510,7 +544,6 @@ { int speed, dplx; int bd = adapter->bd_number; - bd = bd > E1000_MAX_NIC ? E1000_MAX_NIC : bd; { /* Speed */ struct e1000_opt_list speed_list[] = {{ 0, "" }, @@ -527,8 +560,12 @@ .p = speed_list }} }; - speed = Speed[bd]; - e1000_validate_option(&speed, &opt, adapter); + if (num_Speed > bd) { + speed = Speed[bd]; + e1000_validate_option(&speed, &opt, adapter); + } else { + speed = opt.def; + } } { /* Duplex */ struct e1000_opt_list dplx_list[] = {{ 0, "" }, @@ -544,11 +581,15 @@ .p = dplx_list }} }; - dplx = Duplex[bd]; - e1000_validate_option(&dplx, &opt, adapter); + if (num_Duplex > bd) { + dplx = Duplex[bd]; + e1000_validate_option(&dplx, &opt, adapter); + } else { + dplx = opt.def; + } } - if(AutoNeg[bd] != OPTION_UNSET && (speed != 0 || dplx != 0)) { + if((num_AutoNeg > bd) && (speed != 0 || dplx != 0)) { DPRINTK(PROBE, INFO, "AutoNeg specified along with Speed or Duplex, " "parameter ignored\n"); @@ -605,7 +646,7 @@ switch (speed + dplx) { case 0: adapter->hw.autoneg = adapter->fc_autoneg = 1; - if(Speed[bd] != OPTION_UNSET || Duplex[bd] != OPTION_UNSET) + if((num_Speed > bd) && (speed != 0 || dplx != 0)) DPRINTK(PROBE, INFO, "Speed and duplex autonegotiation enabled\n"); break; diff -Nru a/drivers/net/eql.c b/drivers/net/eql.c --- a/drivers/net/eql.c 2004-10-26 01:30:56 -04:00 +++ b/drivers/net/eql.c 2004-10-26 01:30:56 -04:00 @@ -164,12 +164,12 @@ static void __init eql_setup(struct net_device *dev) { - equalizer_t *eql = dev->priv; + equalizer_t *eql = netdev_priv(dev); SET_MODULE_OWNER(dev); init_timer(&eql->timer); - eql->timer.data = (unsigned long) dev->priv; + eql->timer.data = (unsigned long) eql; eql->timer.expires = jiffies + EQL_DEFAULT_RESCHED_IVAL; eql->timer.function = eql_timer; @@ -197,7 +197,7 @@ static int eql_open(struct net_device *dev) { - equalizer_t *eql = dev->priv; + equalizer_t *eql = netdev_priv(dev); /* XXX We should force this off automatically for the user. */ printk(KERN_INFO "%s: remember to turn off Van-Jacobson compression on " @@ -241,7 +241,7 @@ static int eql_close(struct net_device *dev) { - equalizer_t *eql = dev->priv; + equalizer_t *eql = netdev_priv(dev); /* * The timer has to be stopped first before we start hacking away @@ -326,7 +326,7 @@ static int eql_slave_xmit(struct sk_buff *skb, struct net_device *dev) { - equalizer_t *eql = dev->priv; + equalizer_t *eql = netdev_priv(dev); slave_t *slave; spin_lock(&eql->queue.lock); @@ -352,7 +352,7 @@ static struct net_device_stats * eql_get_stats(struct net_device *dev) { - equalizer_t *eql = dev->priv; + equalizer_t *eql = netdev_priv(dev); return &eql->stats; } @@ -378,7 +378,7 @@ static inline int eql_is_full(slave_queue_t *queue) { - equalizer_t *eql = queue->master_dev->priv; + equalizer_t *eql = netdev_priv(queue->master_dev); if (queue->num_slaves >= eql->max_slaves) return 1; @@ -420,7 +420,7 @@ if (!eql_is_master(slave_dev) && !eql_is_slave(slave_dev)) { slave_t *s = kmalloc(sizeof(*s), GFP_KERNEL); - equalizer_t *eql = master_dev->priv; + equalizer_t *eql = netdev_priv(master_dev); int ret; if (!s) { @@ -453,7 +453,7 @@ static int eql_emancipate(struct net_device *master_dev, slaving_request_t __user *srqp) { - equalizer_t *eql = master_dev->priv; + equalizer_t *eql = netdev_priv(master_dev); struct net_device *slave_dev; slaving_request_t srq; int ret; @@ -485,7 +485,7 @@ static int eql_g_slave_cfg(struct net_device *dev, slave_config_t __user *scp) { - equalizer_t *eql = dev->priv; + equalizer_t *eql = netdev_priv(dev); slave_t *slave; struct net_device *slave_dev; slave_config_t sc; @@ -539,7 +539,7 @@ if (!slave_dev) return ret; - eql = dev->priv; + eql = netdev_priv(dev); spin_lock_bh(&eql->queue.lock); if (eql_is_slave(slave_dev)) { slave = __eql_find_slave_dev(&eql->queue, slave_dev); @@ -561,7 +561,7 @@ master_config_t mc; if (eql_is_master(dev)) { - eql = dev->priv; + eql = netdev_priv(dev); mc.max_slaves = eql->max_slaves; mc.min_slaves = eql->min_slaves; if (copy_to_user(mcp, &mc, sizeof (master_config_t))) @@ -580,7 +580,7 @@ return -EFAULT; if (eql_is_master(dev)) { - eql = dev->priv; + eql = netdev_priv(dev); eql->max_slaves = mc.max_slaves; eql->min_slaves = mc.min_slaves; return 0; diff -Nru a/drivers/net/hamradio/hdlcdrv.c b/drivers/net/hamradio/hdlcdrv.c --- a/drivers/net/hamradio/hdlcdrv.c 2004-10-26 01:30:56 -04:00 +++ b/drivers/net/hamradio/hdlcdrv.c 2004-10-26 01:30:56 -04:00 @@ -549,6 +549,8 @@ netif_stop_queue(dev); + netif_stop_queue(dev); + if (s->ops && s->ops->close) i = s->ops->close(dev); if (s->skb) diff -Nru a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c --- a/drivers/net/ixgb/ixgb_main.c 2004-10-26 01:30:56 -04:00 +++ b/drivers/net/ixgb/ixgb_main.c 2004-10-26 01:30:56 -04:00 @@ -30,7 +30,7 @@ char ixgb_driver_name[] = "ixgb"; char ixgb_driver_string[] = "Intel(R) PRO/10GbE Network Driver"; -char ixgb_driver_version[] = "1.0.66"; +char ixgb_driver_version[] = "1.0.66-k2"; char ixgb_copyright[] = "Copyright (c) 2001-2004 Intel Corporation."; /* ixgb_pci_tbl - PCI Device ID Table @@ -1614,8 +1614,12 @@ } #else for (i = 0; i < IXGB_MAX_INTR; i++) - if (!ixgb_clean_rx_irq(adapter) & !ixgb_clean_tx_irq(adapter)) + if (ixgb_clean_rx_irq(adapter) == FALSE) break; + for (i = 0; i < IXGB_MAX_INTR; i++) + if (ixgb_clean_tx_irq(adapter) == FALSE) + break; + /* if RAIDC:EN == 1 and ICR:RXDMT0 == 1, we need to * set IMS:RXDMT0 to 1 to restart the RBD timer (POLL) */ @@ -1676,7 +1680,7 @@ eop = tx_ring->buffer_info[i].next_to_watch; eop_desc = IXGB_TX_DESC(*tx_ring, eop); - while (eop_desc->status & cpu_to_le32(IXGB_TX_DESC_STATUS_DD)) { + while (eop_desc->status & IXGB_TX_DESC_STATUS_DD) { for (cleaned = FALSE; !cleaned;) { tx_desc = IXGB_TX_DESC(*tx_ring, i); diff -Nru a/drivers/net/mac8390.c b/drivers/net/mac8390.c --- a/drivers/net/mac8390.c 2004-10-26 01:30:56 -04:00 +++ b/drivers/net/mac8390.c 2004-10-26 01:30:56 -04:00 @@ -42,10 +42,6 @@ #include "8390.h" -#if (LINUX_VERSION_CODE < 0x02030e) -#define net_device device -#endif - #define WD_START_PG 0x00 /* First page of TX buffer */ #define CABLETRON_RX_START_PG 0x00 /* First page of RX buffer */ #define CABLETRON_RX_STOP_PG 0x30 /* Last page +1 of RX ring */ diff -Nru a/drivers/net/ne2k-pci.c b/drivers/net/ne2k-pci.c --- a/drivers/net/ne2k-pci.c 2004-10-26 01:30:56 -04:00 +++ b/drivers/net/ne2k-pci.c 2004-10-26 01:30:56 -04:00 @@ -653,12 +653,43 @@ pci_set_drvdata(pdev, NULL); } +#ifdef CONFIG_PM +static int ne2k_pci_suspend (struct pci_dev *pdev, u32 state) +{ + struct net_device *dev = pci_get_drvdata (pdev); + + netif_device_detach(dev); + pci_save_state(pdev); + pci_set_power_state(pdev, state); + + return 0; +} + +static int ne2k_pci_resume (struct pci_dev *pdev) +{ + struct net_device *dev = pci_get_drvdata (pdev); + + pci_set_power_state(pdev, 0); + pci_restore_state(pdev); + NS8390_init(dev, 1); + netif_device_attach(dev); + + return 0; +} + +#endif /* CONFIG_PM */ + static struct pci_driver ne2k_driver = { .name = DRV_NAME, .probe = ne2k_pci_init_one, .remove = __devexit_p(ne2k_pci_remove_one), .id_table = ne2k_pci_tbl, +#ifdef CONFIG_PM + .suspend = ne2k_pci_suspend, + .resume = ne2k_pci_resume, +#endif /* CONFIG_PM */ + }; diff -Nru a/drivers/net/ns83820.c b/drivers/net/ns83820.c --- a/drivers/net/ns83820.c 2004-10-26 01:30:56 -04:00 +++ b/drivers/net/ns83820.c 2004-10-26 01:30:56 -04:00 @@ -64,6 +64,8 @@ * tuning * 0.20 - fix stupid RFEN thinko. i am such a smurf. * + * 20040828 0.21 - add hardware vlan accleration + * by Neil Horman * Driver Overview * =============== * @@ -92,7 +94,9 @@ //#define dprintk printk #define dprintk(x...) do { } while (0) +#include #include +#include #include #include #include @@ -108,6 +112,7 @@ #include #include #include +#include #include #include @@ -115,7 +120,7 @@ #define DRV_NAME "ns83820" -/* Global parameters. See MODULE_PARM near the bottom. */ +/* Global parameters. See module_param near the bottom. */ static int ihr = 2; static int reset_phy = 0; static int lnksts = 0; /* CFG_LNKSTS bit polarity */ @@ -138,6 +143,9 @@ /* tunables */ #define RX_BUF_SIZE 1500 /* 8192 */ +#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) +#define NS83820_VLAN_ACCEL_SUPPORT +#endif /* Must not exceed ~65000. */ #define NR_RX_DESC 64 @@ -262,6 +270,8 @@ #define EXTSTS_UDPPKT 0x00200000 #define EXTSTS_TCPPKT 0x00080000 #define EXTSTS_IPPKT 0x00020000 +#define EXTSTS_VPKT 0x00010000 +#define EXTSTS_VTG_MASK 0x0000ffff #define SPDSTS_POLARITY (CFG_SPDSTS1 | CFG_SPDSTS0 | CFG_DUPSTS | (lnksts ? CFG_LNKSTS : 0)) @@ -403,6 +413,7 @@ #define CMDSTS_INTR 0x20000000 #define CMDSTS_ERR 0x10000000 #define CMDSTS_OK 0x08000000 +#define CMDSTS_RUNT 0x00200000 #define CMDSTS_LEN_MASK 0x0000ffff #define CMDSTS_DEST_MASK 0x01800000 @@ -432,6 +443,10 @@ struct pci_dev *pci_dev; +#ifdef NS83820_VLAN_ACCEL_SUPPORT + struct vlan_group *vlgrp; +#endif + struct rx_info rx_info; struct tasklet_struct rx_tasklet; @@ -494,6 +509,33 @@ (((NR_TX_DESC-2 + dev->tx_done_idx - dev->tx_free_idx) % NR_TX_DESC) > MIN_TX_DESC_FREE) +#ifdef NS83820_VLAN_ACCEL_SUPPORT +static void ns83820_vlan_rx_register(struct net_device *ndev, struct vlan_group *grp) +{ + struct ns83820 *dev = PRIV(ndev); + + spin_lock_irq(&dev->misc_lock); + spin_lock(&dev->tx_lock); + + dev->vlgrp = grp; + + spin_unlock(&dev->tx_lock); + spin_unlock_irq(&dev->misc_lock); +} + +static void ns83820_vlan_rx_kill_vid(struct net_device *ndev, unsigned short vid) +{ + struct ns83820 *dev = PRIV(ndev); + + spin_lock_irq(&dev->misc_lock); + spin_lock(&dev->tx_lock); + if (dev->vlgrp) + dev->vlgrp->vlan_devices[vid] = NULL; + spin_unlock(&dev->tx_lock); + spin_unlock_irq(&dev->misc_lock); +} +#endif + /* Packet Receiver * * The hardware supports linked lists of receive descriptors for @@ -836,6 +878,7 @@ struct ns83820 *dev = PRIV(ndev); struct rx_info *info = &dev->rx_info; unsigned next_rx; + int rx_rc, len; u32 cmdsts, *desc; unsigned long flags; int nr = 0; @@ -876,8 +919,24 @@ pci_unmap_single(dev->pci_dev, bufptr, RX_BUF_SIZE, PCI_DMA_FROMDEVICE); + len = cmdsts & CMDSTS_LEN_MASK; +#ifdef NS83820_VLAN_ACCEL_SUPPORT + /* NH: As was mentioned below, this chip is kinda + * brain dead about vlan tag stripping. Frames + * that are 64 bytes with a vlan header appended + * like arp frames, or pings, are flagged as Runts + * when the tag is stripped and hardware. This + * also means that the OK bit in the descriptor + * is cleared when the frame comes in so we have + * to do a specific length check here to make sure + * the frame would have been ok, had we not stripped + * the tag. + */ + if (likely((CMDSTS_OK & cmdsts) || + ((cmdsts & CMDSTS_RUNT) && len >= 56))) { +#else if (likely(CMDSTS_OK & cmdsts)) { - int len = cmdsts & 0xffff; +#endif skb_put(skb, len); if (unlikely(!skb)) goto netdev_mangle_me_harder_failed; @@ -891,7 +950,18 @@ skb->ip_summed = CHECKSUM_NONE; } skb->protocol = eth_type_trans(skb, ndev); - if (NET_RX_DROP == netif_rx(skb)) { +#ifdef NS83820_VLAN_ACCEL_SUPPORT + if(extsts & EXTSTS_VPKT) { + unsigned short tag; + tag = ntohs(extsts & EXTSTS_VTG_MASK); + rx_rc = vlan_hwaccel_rx(skb,dev->vlgrp,tag); + } else { + rx_rc = netif_rx(skb); + } +#else + rx_rc = netif_rx(skb); +#endif + if (NET_RX_DROP == rx_rc) { netdev_mangle_me_harder_failed: dev->stats.rx_dropped ++; } @@ -1099,6 +1169,17 @@ extsts |= EXTSTS_UDPPKT; } +#ifdef NS83820_VLAN_ACCEL_SUPPORT + if(vlan_tx_tag_present(skb)) { + /* fetch the vlan tag info out of the + * ancilliary data if the vlan code + * is using hw vlan acceleration + */ + short tag = vlan_tx_tag_get(skb); + extsts |= (EXTSTS_VPKT | htons(tag)); + } +#endif + len = skb->len; if (nr_frags) len -= skb->data_len; @@ -1854,7 +1935,6 @@ SET_ETHTOOL_OPS(ndev, &ops); ndev->tx_timeout = ns83820_tx_timeout; ndev->watchdog_timeo = 5 * HZ; - pci_set_drvdata(pci_dev, ndev); ns83820_do_reset(dev, CR_RST); @@ -1980,11 +2060,25 @@ * a ping with a VLAN header) then the card, strips the 4 byte VLAN * tag and then checks the packet size, so if RXCFG_ARP is not enabled, * it discrards it!. These guys...... + * also turn on tag stripping if hardware acceleration is enabled */ - writel(VRCR_IPEN | VRCR_VTDEN, dev->base + VRCR); +#ifdef NS83820_VLAN_ACCEL_SUPPORT +#define VRCR_INIT_VALUE (VRCR_IPEN|VRCR_VTDEN|VRCR_VTREN) +#else +#define VRCR_INIT_VALUE (VRCR_IPEN|VRCR_VTDEN) +#endif + writel(VRCR_INIT_VALUE, dev->base + VRCR); - /* Enable per-packet TCP/UDP/IP checksumming */ - writel(VTCR_PPCHK, dev->base + VTCR); + /* Enable per-packet TCP/UDP/IP checksumming + * and per packet vlan tag insertion if + * vlan hardware acceleration is enabled + */ +#ifdef NS83820_VLAN_ACCEL_SUPPORT +#define VTCR_INIT_VALUE (VTCR_PPCHK|VTCR_VPPTI) +#else +#define VTCR_INIT_VALUE VTCR_PPCHK +#endif + writel(VTCR_INIT_VALUE, dev->base + VTCR); /* Ramit : Enable async and sync pause frames */ /* writel(0, dev->base + PCR); */ @@ -2001,6 +2095,13 @@ ndev->features |= NETIF_F_SG; ndev->features |= NETIF_F_IP_CSUM; +#ifdef NS83820_VLAN_ACCEL_SUPPORT + /* We also support hardware vlan acceleration */ + ndev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; + ndev->vlan_rx_register = ns83820_vlan_rx_register; + ndev->vlan_rx_kill_vid = ns83820_vlan_rx_kill_vid; +#endif + if (using_dac) { printk(KERN_INFO "%s: using 64 bit addressing.\n", ndev->name); @@ -2109,13 +2210,13 @@ MODULE_DEVICE_TABLE(pci, ns83820_pci_tbl); -MODULE_PARM(lnksts, "i"); +module_param(lnksts, int, 0); MODULE_PARM_DESC(lnksts, "Polarity of LNKSTS bit"); -MODULE_PARM(ihr, "i"); +module_param(ihr, int, 0); MODULE_PARM_DESC(ihr, "Time in 100 us increments to delay interrupts (range 0-127)"); -MODULE_PARM(reset_phy, "i"); +module_param(reset_phy, int, 0); MODULE_PARM_DESC(reset_phy, "Set to 1 to reset the PHY on startup"); module_init(ns83820_init); diff -Nru a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c --- a/drivers/net/pcnet32.c 2004-10-26 01:30:56 -04:00 +++ b/drivers/net/pcnet32.c 2004-10-26 01:30:56 -04:00 @@ -359,9 +359,9 @@ struct net_device_stats stats; char tx_full; int options; - int shared_irq:1, /* shared irq possible */ - dxsuflo:1, /* disable transmit stop on uflo */ - mii:1; /* mii port available */ + unsigned int shared_irq:1, /* shared irq possible */ + dxsuflo:1, /* disable transmit stop on uflo */ + mii:1; /* mii port available */ struct net_device *next; struct mii_if_info mii_if; struct timer_list watchdog_timer; diff -Nru a/drivers/net/sis900.c b/drivers/net/sis900.c --- a/drivers/net/sis900.c 2004-10-26 01:30:56 -04:00 +++ b/drivers/net/sis900.c 2004-10-26 01:30:56 -04:00 @@ -262,13 +262,12 @@ u8 reg; int i; - isa_bridge = pci_find_device(PCI_VENDOR_ID_SI, 0x0008, isa_bridge); + isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0008, isa_bridge); + if (!isa_bridge) + isa_bridge = pci_get_device(PCI_VENDOR_ID_SI, 0x0018, isa_bridge); if (!isa_bridge) { - isa_bridge = pci_find_device(PCI_VENDOR_ID_SI, 0x0018, isa_bridge); - if (!isa_bridge) { - printk("%s: Can not find ISA bridge\n", net_dev->name); - return 0; - } + printk("%s: Can not find ISA bridge\n", net_dev->name); + return 0; } pci_read_config_byte(isa_bridge, 0x48, ®); pci_write_config_byte(isa_bridge, 0x48, reg | 0x40); @@ -278,6 +277,7 @@ ((u8 *)(net_dev->dev_addr))[i] = inb(0x71); } pci_write_config_byte(isa_bridge, 0x48, reg & ~0x40); + pci_dev_put(isa_bridge); return 1; } @@ -488,9 +488,11 @@ } /* save our host bridge revision */ - dev = pci_find_device(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_630, NULL); - if (dev) + dev = pci_get_device(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_630, NULL); + if (dev) { pci_read_config_byte(dev, PCI_CLASS_REVISION, &sis_priv->host_bridge_rev); + pci_dev_put(dev); + } /* print some information about our NIC */ printk(KERN_INFO "%s: %s at %#lx, IRQ %d, ", net_dev->name, diff -Nru a/drivers/net/skfp/hwmtm.c b/drivers/net/skfp/hwmtm.c --- a/drivers/net/skfp/hwmtm.c 2004-10-26 01:30:56 -04:00 +++ b/drivers/net/skfp/hwmtm.c 2004-10-26 01:30:56 -04:00 @@ -1901,7 +1901,8 @@ } if (!smc->hw.mac_ring_is_up || frag_count > queue->tx_free) { - if (frame_status &= ~LAN_TX) { + frame_status &= ~LAN_TX; + if (frame_status) { DB_TX("Ring is down: terminate LAN_TX",0,0,2) ; } else { diff -Nru a/drivers/net/slip.c b/drivers/net/slip.c --- a/drivers/net/slip.c 2004-10-26 01:30:56 -04:00 +++ b/drivers/net/slip.c 2004-10-26 01:30:56 -04:00 @@ -57,6 +57,7 @@ #define SL_CHECK_TRANSMIT #include #include +#include #include #include @@ -85,8 +86,8 @@ static struct net_device **slip_devs; -int slip_maxdev = SL_NRUNIT; /* Can be overridden with insmod! */ -MODULE_PARM(slip_maxdev, "i"); +static int slip_maxdev = SL_NRUNIT; +module_param(slip_maxdev, int, 0); MODULE_PARM_DESC(slip_maxdev, "Maximum number of slip devices"); static int slip_esc(unsigned char *p, unsigned char *d, int len); @@ -458,13 +459,11 @@ static void sl_tx_timeout(struct net_device *dev) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); spin_lock(&sl->lock); if (netif_queue_stopped(dev)) { - struct slip *sl = (struct slip*)(dev->priv); - if (!netif_running(dev)) goto out; @@ -494,7 +493,7 @@ static int sl_xmit(struct sk_buff *skb, struct net_device *dev) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); spin_lock(&sl->lock); if (!netif_running(dev)) { @@ -528,7 +527,7 @@ static int sl_close(struct net_device *dev) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); spin_lock_bh(&sl->lock); if (sl->tty) { @@ -547,7 +546,7 @@ static int sl_open(struct net_device *dev) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); if (sl->tty==NULL) return -ENODEV; @@ -561,7 +560,7 @@ static int sl_change_mtu(struct net_device *dev, int new_mtu) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); if (new_mtu < 68 || new_mtu > 65534) return -EINVAL; @@ -577,7 +576,7 @@ sl_get_stats(struct net_device *dev) { static struct net_device_stats stats; - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); #ifdef SL_INCLUDE_CSLIP struct slcompress *comp; #endif @@ -612,7 +611,7 @@ static int sl_init(struct net_device *dev) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); /* * Finish setting up the DEVICE info. @@ -630,7 +629,7 @@ static void sl_uninit(struct net_device *dev) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); sl_free_bufs(sl); } @@ -719,7 +718,7 @@ if ((dev = slip_devs[i]) == NULL) break; - sl = dev->priv; + sl = netdev_priv(dev); if (sl->tty || sl->leased) continue; if (dev->flags&IFF_UP) @@ -746,7 +745,7 @@ if (dev == NULL) break; - sl = dev->priv; + sl = netdev_priv(dev); if (sl->leased) { if (sl->line != line) continue; @@ -788,7 +787,7 @@ i = sel; dev = slip_devs[i]; if (score > 1) { - sl = dev->priv; + sl = netdev_priv(dev); sl->flags &= (1 << SLF_INUSE); return sl; } @@ -799,7 +798,7 @@ return NULL; if (dev) { - sl = dev->priv; + sl = netdev_priv(dev); if (test_bit(SLF_INUSE, &sl->flags)) { unregister_netdevice(dev); dev = NULL; @@ -817,7 +816,7 @@ dev->base_addr = i; } - sl = dev->priv; + sl = netdev_priv(dev); /* Initialize channel control data */ sl->magic = SLIP_MAGIC; @@ -1260,7 +1259,7 @@ static int sl_ioctl(struct net_device *dev,struct ifreq *rq,int cmd) { - struct slip *sl = (struct slip*)(dev->priv); + struct slip *sl = netdev_priv(dev); unsigned long *p = (unsigned long *)&rq->ifr_ifru; if (sl == NULL) /* Allocation failed ?? */ @@ -1406,7 +1405,7 @@ dev = slip_devs[i]; if (!dev) continue; - sl = dev->priv; + sl = netdev_priv(dev); spin_lock_bh(&sl->lock); if (sl->tty) { busy++; @@ -1423,7 +1422,7 @@ continue; slip_devs[i] = NULL; - sl = dev->priv; + sl = netdev_priv(dev); if (sl->tty) { printk(KERN_ERR "%s: tty discipline still running\n", dev->name); diff -Nru a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c --- a/drivers/net/tokenring/olympic.c 2004-10-26 01:30:56 -04:00 +++ b/drivers/net/tokenring/olympic.c 2004-10-26 01:30:56 -04:00 @@ -1401,7 +1401,6 @@ u16 lan_status = 0, lan_status_diff ; /* Initialize to stop compiler warning */ u8 fdx_prot_error ; u16 next_ptr; - int i ; arb_block = (olympic_priv->olympic_lap + olympic_priv->arb) ; asb_block = (olympic_priv->olympic_lap + olympic_priv->asb) ; diff -Nru a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c --- a/drivers/net/tulip/de2104x.c 2004-10-26 01:30:56 -04:00 +++ b/drivers/net/tulip/de2104x.c 2004-10-26 01:30:56 -04:00 @@ -1208,8 +1208,7 @@ pci_write_config_dword(de->pdev, PCIPM, pmctl); /* de4x5.c delays, so we do too */ - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(msecs_to_jiffies(10)); + msleep(10); } } diff -Nru a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c --- a/drivers/net/tulip/de4x5.c 2004-10-26 01:30:56 -04:00 +++ b/drivers/net/tulip/de4x5.c 2004-10-26 01:30:56 -04:00 @@ -5089,7 +5089,7 @@ lp->useMII = TRUE; /* Search the MII address space for possible PHY devices */ - for (n=0, lp->mii_cnt=0, i=1; !((i==1) && (n==1)); i=(++i)%DE4X5_MAX_MII) { + for (n=0, lp->mii_cnt=0, i=1; !((i==1) && (n==1)); i=(i+1)%DE4X5_MAX_MII) { lp->phy[lp->active].addr = i; if (i==0) n++; /* Count cycles */ while (de4x5_reset_phy(dev)<0) udelay(100);/* Wait for reset */ diff -Nru a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c --- a/drivers/net/tulip/tulip_core.c 2004-10-26 01:30:56 -04:00 +++ b/drivers/net/tulip/tulip_core.c 2004-10-26 01:30:56 -04:00 @@ -1221,6 +1221,11 @@ struct tulip_private *tp; /* See note below on the multiport cards. */ static unsigned char last_phys_addr[6] = {0x00, 'L', 'i', 'n', 'u', 'x'}; + static struct pci_device_id early_486_chipsets[] = { + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82424) }, + { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496) }, + { }, + }; static int last_irq; static int multiport_cnt; /* For four-port boards w/one EEPROM */ u8 chip_rev; @@ -1274,17 +1279,15 @@ * without the workarounds being on. */ - /* Intel Saturn. Switch to 8 long words burst, 8 long word cache aligned - Aries might need this too. The Saturn errata are not pretty reading but - thankfully it's an old 486 chipset. + /* 1. Intel Saturn. Switch to 8 long words burst, 8 long word cache + aligned. Aries might need this too. The Saturn errata are not + pretty reading but thankfully it's an old 486 chipset. + + 2. The dreaded SiS496 486 chipset. Same workaround as Intel + Saturn. */ - if (pci_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82424, NULL)) { - csr0 = MRL | MRM | (8 << BurstLenShift) | (1 << CALShift); - force_csr0 = 1; - } - /* The dreaded SiS496 486 chipset. Same workaround as above. */ - if (pci_find_device(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_496, NULL)) { + if (pci_dev_present(early_486_chipsets)) { csr0 = MRL | MRM | (8 << BurstLenShift) | (1 << CALShift); force_csr0 = 1; } diff -Nru a/drivers/net/tulip/xircom_cb.c b/drivers/net/tulip/xircom_cb.c --- a/drivers/net/tulip/xircom_cb.c 2004-10-26 01:30:56 -04:00 +++ b/drivers/net/tulip/xircom_cb.c 2004-10-26 01:30:56 -04:00 @@ -117,6 +117,9 @@ static int xircom_close(struct net_device *dev); static void xircom_up(struct xircom_private *card); static struct net_device_stats *xircom_get_stats(struct net_device *dev); +#if CONFIG_NET_POLL_CONTROLLER +static void xircom_poll_controller(struct net_device *dev); +#endif static void investigate_read_descriptor(struct net_device *dev,struct xircom_private *card, int descnr, unsigned int bufferoffset); static void investigate_write_descriptor(struct net_device *dev, struct xircom_private *card, int descnr, unsigned int bufferoffset); @@ -269,6 +272,9 @@ dev->stop = &xircom_close; dev->get_stats = &xircom_get_stats; dev->priv = private; +#ifdef CONFIG_NET_POLL_CONTROLLER + dev->poll_controller = &xircom_poll_controller; +#endif SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); pci_set_drvdata(pdev, dev); @@ -500,6 +506,14 @@ } +#ifdef CONFIG_NET_POLL_CONTROLLER +static void xircom_poll_controller(struct net_device *dev) +{ + disable_irq(dev->irq); + xircom_interrupt(dev->irq, dev, NULL); + enable_irq(dev->irq); +} +#endif static void initialize_card(struct xircom_private *card) diff -Nru a/include/linux/netdevice.h b/include/linux/netdevice.h --- a/include/linux/netdevice.h 2004-10-26 01:30:56 -04:00 +++ b/include/linux/netdevice.h 2004-10-26 01:30:56 -04:00 @@ -930,8 +930,6 @@ /* Load a device via the kmod */ extern void dev_load(const char *name); extern void dev_mcast_init(void); -extern int netdev_register_fc(struct net_device *dev, void (*stimul)(struct net_device *dev)); -extern void netdev_unregister_fc(int bit); extern int netdev_max_backlog; extern int weight_p; extern unsigned long netdev_fc_xoff; diff -Nru a/net/Kconfig b/net/Kconfig --- a/net/Kconfig 2004-10-26 01:30:56 -04:00 +++ b/net/Kconfig 2004-10-26 01:30:56 -04:00 @@ -564,24 +564,6 @@ If unsure, say N. -config NET_HW_FLOWCONTROL - bool "Forwarding between high speed interfaces" - depends on EXPERIMENTAL - ---help--- - This option enables NIC (Network Interface Card) hardware throttling - during periods of extreme congestion. At the moment only a couple - of device drivers support it (really only one -- tulip, a modified - 8390 driver can be found at - ). - - Really, this option is applicable to any machine attached to a fast - enough network, and even a 10 Mb NIC is able to kill a not very slow - box, such as a 120MHz Pentium. - - However, do not say Y here if you did not experience any serious - problems. - - menu "QoS and/or fair queueing" config NET_SCHED diff -Nru a/net/core/dev.c b/net/core/dev.c --- a/net/core/dev.c 2004-10-26 01:30:56 -04:00 +++ b/net/core/dev.c 2004-10-26 01:30:56 -04:00 @@ -1390,66 +1390,6 @@ DEFINE_PER_CPU(struct netif_rx_stats, netdev_rx_stat) = { 0, }; -#ifdef CONFIG_NET_HW_FLOWCONTROL -atomic_t netdev_dropping = ATOMIC_INIT(0); -static unsigned long netdev_fc_mask = 1; -unsigned long netdev_fc_xoff; -spinlock_t netdev_fc_lock = SPIN_LOCK_UNLOCKED; - -static struct -{ - void (*stimul)(struct net_device *); - struct net_device *dev; -} netdev_fc_slots[BITS_PER_LONG]; - -int netdev_register_fc(struct net_device *dev, - void (*stimul)(struct net_device *dev)) -{ - int bit = 0; - unsigned long flags; - - spin_lock_irqsave(&netdev_fc_lock, flags); - if (netdev_fc_mask != ~0UL) { - bit = ffz(netdev_fc_mask); - netdev_fc_slots[bit].stimul = stimul; - netdev_fc_slots[bit].dev = dev; - set_bit(bit, &netdev_fc_mask); - clear_bit(bit, &netdev_fc_xoff); - } - spin_unlock_irqrestore(&netdev_fc_lock, flags); - return bit; -} - -void netdev_unregister_fc(int bit) -{ - unsigned long flags; - - spin_lock_irqsave(&netdev_fc_lock, flags); - if (bit > 0) { - netdev_fc_slots[bit].stimul = NULL; - netdev_fc_slots[bit].dev = NULL; - clear_bit(bit, &netdev_fc_mask); - clear_bit(bit, &netdev_fc_xoff); - } - spin_unlock_irqrestore(&netdev_fc_lock, flags); -} - -static void netdev_wakeup(void) -{ - unsigned long xoff; - - spin_lock(&netdev_fc_lock); - xoff = netdev_fc_xoff; - netdev_fc_xoff = 0; - while (xoff) { - int i = ffz(~xoff); - xoff &= ~(1 << i); - netdev_fc_slots[i].stimul(netdev_fc_slots[i].dev); - } - spin_unlock(&netdev_fc_lock); -} -#endif - static void get_sample_stats(int cpu) { #ifdef RAND_LIE @@ -1559,13 +1499,8 @@ return queue->cng_level; } - if (queue->throttle) { + if (queue->throttle) queue->throttle = 0; -#ifdef CONFIG_NET_HW_FLOWCONTROL - if (atomic_dec_and_test(&netdev_dropping)) - netdev_wakeup(); -#endif - } netif_rx_schedule(&queue->backlog_dev); goto enqueue; @@ -1574,9 +1509,6 @@ if (!queue->throttle) { queue->throttle = 1; __get_cpu_var(netdev_rx_stat).throttled++; -#ifdef CONFIG_NET_HW_FLOWCONTROL - atomic_inc(&netdev_dropping); -#endif } drop: @@ -1848,16 +1780,6 @@ if (work >= quota || jiffies - start_time > 1) break; -#ifdef CONFIG_NET_HW_FLOWCONTROL - if (queue->throttle && - queue->input_pkt_queue.qlen < no_cong_thresh ) { - queue->throttle = 0; - if (atomic_dec_and_test(&netdev_dropping)) { - netdev_wakeup(); - break; - } - } -#endif } backlog_dev->quota -= work; @@ -1872,13 +1794,8 @@ smp_mb__before_clear_bit(); netif_poll_enable(backlog_dev); - if (queue->throttle) { + if (queue->throttle) queue->throttle = 0; -#ifdef CONFIG_NET_HW_FLOWCONTROL - if (atomic_dec_and_test(&netdev_dropping)) - netdev_wakeup(); -#endif - } local_irq_enable(); return 0; } @@ -3364,12 +3281,6 @@ #ifdef CONFIG_KMOD EXPORT_SYMBOL(dev_load); -#endif -#ifdef CONFIG_NET_HW_FLOWCONTROL -EXPORT_SYMBOL(netdev_dropping); -EXPORT_SYMBOL(netdev_fc_xoff); -EXPORT_SYMBOL(netdev_register_fc); -EXPORT_SYMBOL(netdev_unregister_fc); #endif #ifdef CONFIG_NET_CLS_ACT diff -Nru a/net/irda/irlan/irlan_client.c b/net/irda/irlan/irlan_client.c --- a/net/irda/irlan/irlan_client.c 2004-10-26 01:30:56 -04:00 +++ b/net/irda/irlan/irlan_client.c 2004-10-26 01:30:56 -04:00 @@ -234,7 +234,7 @@ ASSERT(tsap == self->client.tsap_ctrl, return;); /* Remove frames queued on the control channel */ - while ((skb = skb_dequeue(&self->client.txq))) { + while ((skb = skb_dequeue(&self->client.txq)) != NULL) { dev_kfree_skb(skb); } self->client.tx_busy = FALSE; From akpm@osdl.org Tue Oct 26 03:46:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 03:46:11 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QAk4qv031014 for ; Tue, 26 Oct 2004 03:46:05 -0700 Received: from bix (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i9QAji903599 for ; Tue, 26 Oct 2004 03:45:44 -0700 Date: Tue, 26 Oct 2004 03:43:47 -0700 From: Andrew Morton To: netdev@oss.sgi.com Subject: Fw: X.25 : Debug: sleeping function called from invalid context at net/core/sock.c:1203 Message-Id: <20041026034347.1ff35e3d.akpm@osdl.org> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10835 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 Content-Length: 2817 Lines: 76 gack. It looks like there are lots of things in x25_destroy_socket() which aren't safe from timer handler context. Should the whole thing be using schedule_work()? Begin forwarded message: Date: Mon, 25 Oct 2004 10:10:30 +1000 From: Andrew Hendry To: linux-x25@vger.kernel.org, eis@baty.hanse.de Cc: trivial@rustcorp.com.au, linux-kernel@vger.kernel.org Subject: X.25 : Debug: sleeping function called from invalid context at net/core/sock.c:1203 2.6.8.1 When called from x25_heartbeat_expiry, x25_destroy_socket trips the following: Oct 20 12:19:01 localhost kernel: Debug: sleeping function called from invalid context at net/core/sock.c:1203 Oct 20 12:19:01 localhost kernel: in_atomic():1, irqs_disabled():0 Oct 20 12:19:01 localhost kernel: [] __might_sleep+0x9a/0xa2 Oct 20 12:19:01 localhost kernel: [] lock_sock+0x12/0x3d Oct 20 12:19:01 localhost kernel: [] x25_heartbeat_expiry+0x0/0x4d [x25] Oct 20 12:19:01 localhost kernel: [] x25_destroy_socket+0x10/0xd5 [x25] Oct 20 12:19:01 localhost kernel: [] x25_heartbeat_expiry+0x0/0x4d [x25] Oct 20 12:19:01 localhost kernel: [] run_timer_softirq+0xa1/0x13c Oct 20 12:19:01 localhost kernel: [] do_timer+0xcd/0xd2 Oct 20 12:19:01 localhost kernel: [] __do_softirq+0x77/0x79 Oct 20 12:19:01 localhost kernel: [] do_softirq+0x26/0x28 Oct 20 12:19:01 localhost kernel: [] do_IRQ+0xd4/0x107 Oct 20 12:19:01 localhost kernel: [] common_interrupt+0x18/0x20 Oct 20 12:19:01 localhost kernel: [] acpi_processor_idle+0xd4/0x1c7 Oct 20 12:19:01 localhost kernel: [] cpu_idle+0x2c/0x35 Oct 20 12:19:01 localhost kernel: [] start_kernel+0x163/0x19f Oct 20 12:19:01 localhost kernel: [] unknown_bootoption+0x0/0x144 Looking at other protocols setup the same way, rose and ax25 dont have the lock_sock in destroy. Is the lock_sock needed here? diff -up linux-2.6.8.1/net/x25/af_x25.c.orig linux-2.6.8.1/net/x25/af_x25.c --- linux-2.6.8.1/net/x25/af_x25.c.orig 2004-10-25 08:49:40.780391664 +1000 +++ linux-2.6.8.1/net/x25/af_x25.c 2004-10-25 09:47:02.578158872 +1000 @@ -322,7 +322,6 @@ void x25_destroy_socket(struct sock *sk) struct sk_buff *skb; sock_hold(sk); - lock_sock(sk); x25_stop_heartbeat(sk); x25_stop_timer(sk); @@ -353,7 +352,6 @@ void x25_destroy_socket(struct sock *sk) __sock_put(sk); } - release_sock(sk); sock_put(sk); } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ From herbert@gondor.apana.org.au Tue Oct 26 04:19:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 04:20:08 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QBJv3A003238 for ; Tue, 26 Oct 2004 04:19:58 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CMPMR-0004sp-00; Tue, 26 Oct 2004 21:19:31 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CMPM9-0007bG-00; Tue, 26 Oct 2004 21:19:13 +1000 Date: Tue, 26 Oct 2004 21:19:12 +1000 To: "David S. Miller" Cc: thomas.spatzier@de.ibm.com, netdev@oss.sgi.com, Jeff Garzik Subject: Re: [PATCH] select appropriate skb size in tcp_sendmsg when TSO is used Message-ID: <20041026111912.GA18095@gondor.apana.org.au> References: <20041020163510.6d13e9c7.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041020163510.6d13e9c7.davem@davemloft.net> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10836 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 1532 Lines: 39 On Wed, Oct 20, 2004 at 04:35:10PM -0700, David S. Miller wrote: > > BTW, we allow mucking of all of these SG, TSO, CSUM settings > via ethtool yet the "X needs Y" rules are not enforced. I > can't think of an easy way to do this without touching a lot > of drivers. Perhaps something like: Well since they're all being invoked through ethtool, you can just enforce the policy there. So let's take set_tx_csum as the example again, you'd do this in ethtool_set_tx_csum: if (!dev->ethtool_ops->set_tx_csum) return -EOPNOTSUPP; if (copy_from_user(&edata, useraddr, sizeof(edata))) return -EFAULT; if (!edata.data && (dev->features & NETIF_F_SG)) __ethtool_set_sg(dev, 0); return dev->ethtool_ops->set_tx_csum(dev, edata.data); Where __ethtool_set_sg would be ethtool_set_sg with the second argument turned into a simple int. It can then do a similar check to turn off TSO. > It just occured to me that instead of manually clearing > dev->feature bits we should invoke the appropriate ethtool > op to accomplish that just in case the device needs to do > something implementation specific when disabling said features. > This implies that ethtool_feature_change() should be invoked > without any device locks set to prevent deadlocks. Absolutely. That sounds exactly like what I've just described :) -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From buytenh@wantstofly.org Tue Oct 26 06:47:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 06:47:25 -0700 (PDT) Received: from xi.wantstofly.org (alephnull.demon.nl [212.238.201.82]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QDlJve006915 for ; Tue, 26 Oct 2004 06:47:19 -0700 Received: by xi.wantstofly.org (Postfix, from userid 500) id EDE9A2B0EC; Tue, 26 Oct 2004 15:47:02 +0200 (MEST) Date: Tue, 26 Oct 2004 15:47:02 +0200 From: Lennert Buytenhek To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: way of figuring out total number of retransmitted packets on a TCP socket? Message-ID: <20041026134702.GA2891@xi.wantstofly.org> References: <20041020130134.GC24757@xi.wantstofly.org> <20041020151448.51209278.davem@davemloft.net> <20041020223547.GJ29583@xi.wantstofly.org> <20041020213739.6e669fdd.davem@davemloft.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="St7VIuEGZ6dlpu13" Content-Disposition: inline In-Reply-To: <20041020213739.6e669fdd.davem@davemloft.net> User-Agent: Mutt/1.4.1i X-archive-position: 10837 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: buytenh@wantstofly.org Precedence: bulk X-list: netdev Content-Length: 8688 Lines: 382 --St7VIuEGZ6dlpu13 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Oct 20, 2004 at 09:37:39PM -0700, David S. Miller wrote: > Please give this 2.6.x patch a spin: Works quite nicely, thank you very much. I've attached the sources of the tools that we're using in combination with this -- basically just a discard server and a client. (You need the libivykis async I/O lib installed to compile the server.) A 1GB cross-atlantic transfer (~715kpackets) over a proper provider typically shows something like this: (Discard server is on a GbE connection in LA, the transmitter on FastE in Amsterdam.) [...] tcpi_total_retrans 2 The same test done over a second-rate provider: [...] tcpi_total_retrans 3482 --L --St7VIuEGZ6dlpu13 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="eat.c" #include #include #include #include #include #include #include #include struct iv_fd master_fd; struct connection { struct iv_fd fd; }; void connection_handler(void *_conn) { struct connection *conn = (struct connection *)_conn; char buf[65536]; int len; len = iv_read(&(conn->fd), buf, sizeof(buf)); if (len <= 0) { if (len == 0 || errno != EAGAIN) { iv_unregister_fd(&(conn->fd)); close(conn->fd.fd); free(conn); } return; } } void new_connection(void *_dummy) { struct sockaddr_in addr; socklen_t addrlen; struct connection *conn; int fd; addrlen = sizeof(addr); fd = iv_accept(&master_fd, (struct sockaddr *)&addr, &addrlen); if (fd <= 0) { if (fd < 0 && errno == EAGAIN) return; perror("iv_accept"); exit(-1); } conn = malloc(sizeof(*conn)); if (conn == NULL) { syslog(LOG_ALERT, "new_connection: memory allocation error, dropping connection"); close(fd); return; } INIT_IV_FD(&(conn->fd)); conn->fd.fd = fd; conn->fd.cookie = (void *)conn; conn->fd.handler_in = connection_handler; iv_register_fd(&(conn->fd)); } int main() { struct sockaddr_in addr; int fd; fd = socket(AF_INET, SOCK_STREAM, 0); if (fd < 0) { perror("socket"); exit(-1); } addr.sin_family = AF_INET; addr.sin_addr.s_addr = htonl(INADDR_ANY); addr.sin_port = htons(9); if (bind(fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) { perror("bind"); exit(-1); } if (listen(fd, 1000) < 0) { perror("listen"); exit(-1); } iv_init(); INIT_IV_FD(&(master_fd)); master_fd.fd = fd; master_fd.handler_in = new_connection; iv_register_fd(&(master_fd)); iv_main(); return 0; } --St7VIuEGZ6dlpu13 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="feed.c" #include #include #include #include #include #include #include #include #include #include #ifndef SOL_TCP #define SOL_TCP 6 #endif struct tcp_info2 { u_int8_t tcpi_state; u_int8_t tcpi_ca_state; u_int8_t tcpi_retransmits; u_int8_t tcpi_probes; u_int8_t tcpi_backoff; u_int8_t tcpi_options; u_int8_t tcpi_snd_wscale:4, tcpi_rcv_wscale:4; u_int32_t tcpi_rto; u_int32_t tcpi_ato; u_int32_t tcpi_snd_mss; u_int32_t tcpi_rcv_mss; u_int32_t tcpi_unacked; u_int32_t tcpi_sacked; u_int32_t tcpi_lost; u_int32_t tcpi_retrans; u_int32_t tcpi_fackets; /* Times. */ u_int32_t tcpi_last_data_sent; u_int32_t tcpi_last_ack_sent; /* Not remembered, sorry. */ u_int32_t tcpi_last_data_recv; u_int32_t tcpi_last_ack_recv; /* Metrics. */ u_int32_t tcpi_pmtu; u_int32_t tcpi_rcv_ssthresh; u_int32_t tcpi_rtt; u_int32_t tcpi_rttvar; u_int32_t tcpi_snd_ssthresh; u_int32_t tcpi_snd_cwnd; u_int32_t tcpi_advmss; u_int32_t tcpi_reordering; u_int32_t tcpi_rcv_rtt; u_int32_t tcpi_rcv_space; u_int32_t tcpi_total_retrans; }; static unsigned char zeroes[65536]; static char *tcpi_state(int state) { switch (state) { case TCP_ESTABLISHED: return "ESTABLISHED"; case TCP_SYN_SENT: return "SYN_SENT"; case TCP_SYN_RECV: return "SYN_RECV"; case TCP_FIN_WAIT1: return "FIN_WAIT1"; case TCP_FIN_WAIT2: return "FIN_WAIT2"; case TCP_TIME_WAIT: return "TIME_WAIT"; case TCP_CLOSE: return "CLOSE"; case TCP_CLOSE_WAIT: return "CLOSE_WAIT"; case TCP_LAST_ACK: return "LAST_ACK"; case TCP_LISTEN: return "LISTEN"; case TCP_CLOSING: return "CLOSING"; } return "invalid"; } static char *tcpi_ca_state(int state) { switch (state) { case TCP_CA_Open: return "CA_Open"; case TCP_CA_Disorder: return "CA_Disorder"; case TCP_CA_CWR: return "CA_CWR"; case TCP_CA_Recovery: return "CA_Recovery"; case TCP_CA_Loss: return "CA_Loss"; } return "invalid"; } int main(int argc, char *argv[]) { struct sockaddr_in addr; struct tcp_info2 tcpi; struct hostent *he; int bytes; int port; int ret; int fd; if (argc <= 1) { fprintf(stderr, "syntax: %s [port] [megs]\n", argv[0]); exit(-1); } he = gethostbyname(argv[1]); if (he == NULL) { herror("gethostbyname"); exit(-1); } addr.sin_family = he->h_addrtype; memcpy(&(addr.sin_addr), he->h_addr_list[0], he->h_length); endhostent(); port = 9; if (argc > 2 && sscanf(argv[2], "%d", &port) != 1) { fprintf(stderr, "%s: second argument not numeric\n", argv[0]); exit(-1); } addr.sin_port = htons(port); bytes = 1024; if (argc > 3 && sscanf(argv[3], "%d", &bytes) != 1) { fprintf(stderr, "%s: third argument not numeric\n", argv[0]); exit(-1); } bytes <<= 20; fd = socket(AF_INET, SOCK_STREAM, 0); if (fd < 0) { perror("socket"); return 1; } ret = connect(fd, (struct sockaddr *)&addr, sizeof(addr)); if (ret < 0) { perror("connect"); return 1; } ret = sizeof(tcpi); if (getsockopt(fd, SOL_TCP, TCP_INFO, &tcpi, &ret) < 0) { perror("getsockopt(TCP_INFO)"); return 1; } while (bytes) { int tosend; tosend = bytes; if (tosend > sizeof(zeroes)) tosend = sizeof(zeroes); ret = write(fd, zeroes, tosend); if (ret < 0) { perror("write"); break; } bytes -= ret; } shutdown(fd, SHUT_RDWR); sleep(1); tcpi.tcpi_total_retrans = 0xdeadbeef; ret = sizeof(tcpi); if (getsockopt(fd, SOL_TCP, TCP_INFO, &tcpi, &ret) < 0) { perror("getsockopt(TCP_INFO)"); return 1; } printf("tcpi_state\t\t%d, %s\n", tcpi.tcpi_state, tcpi_state(tcpi.tcpi_state)); printf("tcpi_ca_state\t\t%d, %s\n", tcpi.tcpi_ca_state, tcpi_ca_state(tcpi.tcpi_ca_state)); printf("tcpi_retransmits\t%d\n", tcpi.tcpi_retransmits); printf("tcpi_probes\t\t%d\n", tcpi.tcpi_probes); printf("tcpi_backoff\t\t%d\n", tcpi.tcpi_backoff); printf("tcpi_options\t\t%d", tcpi.tcpi_options); if (tcpi.tcpi_options) { printf(" ["); if (tcpi.tcpi_options & TCPI_OPT_TIMESTAMPS) printf("TIMESTAMPS "); if (tcpi.tcpi_options & TCPI_OPT_SACK) printf("SACK "); if (tcpi.tcpi_options & TCPI_OPT_WSCALE) printf("WSCALE "); if (tcpi.tcpi_options & TCPI_OPT_ECN) printf("ECN "); printf("]"); } printf("\n"); if (tcpi.tcpi_options & TCPI_OPT_WSCALE) { printf("tcpi_snd_wscale\t\t%d\n", tcpi.tcpi_snd_wscale); printf("tcpi_rcv_wscale\t\t%d\n", tcpi.tcpi_rcv_wscale); } printf("\n"); printf("tcpi_rto\t\t%d\n", tcpi.tcpi_rto); printf("tcpi_ato\t\t%d\n", tcpi.tcpi_ato); printf("tcpi_snd_mss\t\t%d\n", tcpi.tcpi_snd_mss); printf("tcpi_rcv_mss\t\t%d\n", tcpi.tcpi_rcv_mss); printf("\n"); printf("tcpi_unacked\t\t%d\n", tcpi.tcpi_unacked); printf("tcpi_sacked\t\t%d\n", tcpi.tcpi_sacked); printf("tcpi_lost\t\t%d\n", tcpi.tcpi_lost); printf("tcpi_retrans\t\t%d\n", tcpi.tcpi_retrans); printf("tcpi_fackets\t\t%d\n", tcpi.tcpi_fackets); printf("\n"); printf("tcpi_last_data_sent\t%d\n", tcpi.tcpi_last_data_sent); printf("tcpi_last_ack_sent\t%d\n", tcpi.tcpi_last_ack_sent); printf("tcpi_last_data_recv\t%d\n", tcpi.tcpi_last_data_recv); printf("tcpi_last_ack_recv\t%d\n", tcpi.tcpi_last_ack_recv); printf("\n"); printf("tcpi_pmtu\t\t%d\n", tcpi.tcpi_pmtu); printf("tcpi_rcv_sstresh\t%d\n", tcpi.tcpi_rcv_ssthresh); printf("tcpi_rtt\t\t%d\n", tcpi.tcpi_rtt); printf("tcpi_rttvar\t\t%d\n", tcpi.tcpi_rttvar); printf("tcpi_snd_sstresh\t%d\n", tcpi.tcpi_snd_ssthresh); printf("tcpi_snd_cwnd\t\t%d\n", tcpi.tcpi_snd_cwnd); printf("tcpi_advmss\t\t%d\n", tcpi.tcpi_advmss); printf("tcpi_reordering\t\t%d\n", tcpi.tcpi_reordering); printf("\n"); printf("tcpi_rcv_rtt\t\t%d\n", tcpi.tcpi_rcv_rtt); printf("tcpi_rcv_space\t\t%d\n", tcpi.tcpi_rcv_space); printf("\n"); if (tcpi.tcpi_total_retrans != 0xdeadbeef) { printf("tcpi_total_retrans\t%d\n", tcpi.tcpi_total_retrans); printf("\n"); } close(fd); return 0; } --St7VIuEGZ6dlpu13-- From Brian.Haley@hp.com Tue Oct 26 07:30:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 07:30:42 -0700 (PDT) Received: from palrel13.hp.com (palrel13.hp.com [156.153.255.238]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QEUbk1008258 for ; Tue, 26 Oct 2004 07:30:37 -0700 Received: from mailrelay01.cac.cpqcorp.net (mailrelay01.cac.cpqcorp.net [16.47.132.152]) by palrel13.hp.com (Postfix) with ESMTP id E90321C12B51; Tue, 26 Oct 2004 07:30:21 -0700 (PDT) Received: from kitche.zk3.dec.com (kitche4.zk3.dec.com [16.140.160.166]) by mailrelay01.cac.cpqcorp.net (Postfix) with ESMTP id 7BD77691; Tue, 26 Oct 2004 07:30:21 -0700 (PDT) Received: from [127.0.0.1] by kitche.zk3.dec.com (8.9.3/1.1.27.5/27Oct00-1235PM) id KAA0002433373; Tue, 26 Oct 2004 10:30:20 -0400 (EDT) Message-ID: <417E5F37.4010501@hp.com> Date: Tue, 26 Oct 2004 10:29:11 -0400 From: Brian Haley Organization: Linux and Open Source Lab User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040803 X-Accept-Language: en-us, en MIME-Version: 1.0 To: yoshfuji@linux-ipv6.org Cc: netdev@oss.sgi.com Subject: Re: [PATCH, TAKE 2] [IPV6] XFRM: extract xfrm_lookup() from ip6_dst_lookup() (is Re: [PATCH][IPv6] separation xfrm_lookup from ip6_dst_lookup) References: <20040801195135.16734846.davem@redhat.com> <20040828.014935.131415609.yoshfuji@linux-ipv6.org> <417D6FD0.7010903@hp.com> <20041026.125539.84990576.yoshfuji@linux-ipv6.org> In-Reply-To: <20041026.125539.84990576.yoshfuji@linux-ipv6.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-archive-position: 10838 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Brian.Haley@hp.com Precedence: bulk X-list: netdev Content-Length: 511 Lines: 17 YOSHIFUJI Hideaki / å‰è—¤è‹±æ˜Ž wrote: >>Attached is a patch that fixes that and also brings the rt0_hdr struct >>in-line with RFC 3542 by removing the "bitmap" field. > > Good catch but please do not change bitmap. I understand that was more cosmetic since it's a kernel header, but can you explain it any further? I couldn't find any other occurences than those I fixed. The user-space version in netinet/ip6.h is even more broken and I'm pushing that to the glibc people now too. Thanks, -Brian From yoshfuji@linux-ipv6.org Tue Oct 26 08:43:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 08:43:37 -0700 (PDT) Received: from yue.st-paulia.net (yue.linux-ipv6.org [203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QFhW8V013512 for ; Tue, 26 Oct 2004 08:43:32 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 1E05E33CE5; Wed, 27 Oct 2004 00:44:04 +0900 (JST) Date: Wed, 27 Oct 2004 00:43:59 +0900 (JST) Message-Id: <20041027.004359.62730834.yoshfuji@linux-ipv6.org> To: Brian.Haley@hp.com Cc: netdev@oss.sgi.com, yoshfuji@linux-ipv6.org Subject: Re: [PATCH, TAKE 2] [IPV6] XFRM: extract xfrm_lookup() from ip6_dst_lookup() (is Re: [PATCH][IPv6] separation xfrm_lookup from ip6_dst_lookup) From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <417E5F37.4010501@hp.com> References: <417D6FD0.7010903@hp.com> <20041026.125539.84990576.yoshfuji@linux-ipv6.org> <417E5F37.4010501@hp.com> Organization: USAGI Project X-URL: http://www.yoshifuji.org/%7Ehideaki/ X-Fingerprint: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA X-PGP-Key-URL: http://www.yoshifuji.org/%7Ehideaki/hideaki@yoshifuji.org.asc X-Face: "5$Al-.M>NJ%a'@hhZdQm:."qn~PA^gq4o*>iCFToq*bAi#4FRtx}enhuQKz7fNqQz\BYU] $~O_5m-9'}MIs`XGwIEscw;e5b>n"B_?j/AkL~i/MEaZBLP X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 10839 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: yoshfuji@linux-ipv6.org Precedence: bulk X-list: netdev Content-Length: 864 Lines: 20 In article <417E5F37.4010501@hp.com> (at Tue, 26 Oct 2004 10:29:11 -0400), Brian Haley says: > >>Attached is a patch that fixes that and also brings the rt0_hdr struct > >>in-line with RFC 3542 by removing the "bitmap" field. > > > > Good catch but please do not change bitmap. > > I understand that was more cosmetic since it's a kernel header, but can > you explain it any further? I couldn't find any other occurences than > those I fixed. The user-space version in netinet/ip6.h is even more > broken and I'm pushing that to the glibc people now too. First, in general, please do not mix two things. Second, because we're not ready to migrate. Please do not do that (pushing it to the glibc people) until we're ready. We really need to do in consistent way; kernel header / glibc header, and even with other systems. --yoshfuji From shemminger@osdl.org Tue Oct 26 10:53:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 10:53:27 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QHrKwY016536 for ; Tue, 26 Oct 2004 10:53:21 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9QHqvWL026661 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 26 Oct 2004 10:52:58 -0700 Date: Tue, 26 Oct 2004 10:54:22 -0700 From: Stephen Hemminger To: Bill Ralph Cc: netdev@oss.sgi.com Subject: Re: [Bug 3610] New: kernel-2.6.9 breaks Amanda Message-Id: <20041026105422.56793912@zqx3.pdx.osdl.net> In-Reply-To: <417E3754.3050009@nswc.navy.mil> References: <200410211647.i9LGlnp1030223@fire-1.osdl.org> <20041021121205.30556eac@zqx3.pdx.osdl.net> <41793958.3050306@nswc.navy.mil> <20041025161632.55fa938b@zqx3.pdx.osdl.net> <417E3754.3050009@nswc.navy.mil> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10840 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 Content-Length: 1789 Lines: 65 Try the following patch to amanda that resolves potential issues with UDP and blocking receive. --- amanda-2.4.4p3/common-src/dgram.c.orig 2004-10-26 09:51:27.000000000 -0700 +++ amanda-2.4.4p3/common-src/dgram.c 2004-10-26 10:01:56.622775784 -0700 @@ -248,9 +248,31 @@ socklen_t addrlen; int nfound; int save_errno; + int flags; sock = dgram->socket; + /* Need to be in non-blocking mode before doing receive, + * because select on Linux will return true when there is + * a UDP message with checksum error, but receive will + * then hang. + */ + flags = fcntl(sock, F_GETFL); + if (flags < 0) { + save_errno = errno; + dbprintf(("%s: dgram_recv: fcntl get flags failed %s\n", + debug_prefix(NULL), strerror(save_errno))); + return -1; + } + + if(fcntl(sock, F_SETFL, flags|O_NONBLOCK) < 0) { + save_errno = errno; + dbprintf(("%s: dgram_recv: fcntl set flags failed %s\n", + debug_prefix(NULL), strerror(save_errno))); + return -1; + } + + retry: FD_ZERO(&ready); FD_SET(sock, &ready); to.tv_sec = timeout; @@ -284,6 +306,7 @@ nfound = -1; } errno = save_errno; + fcntl(sock, F_SETFL, flags); return nfound; } @@ -291,13 +314,19 @@ size = recvfrom(sock, dgram->data, MAX_DGRAM, 0, (struct sockaddr *)fromaddr, &addrlen); if(size == -1) { + if (errno == EINTR || errno == EAGAIN) + goto retry; save_errno = errno; dbprintf(("%s: dgram_recv: recvfrom() failed: %s\n", debug_prefix(NULL), strerror(save_errno))); errno = save_errno; + fcntl(sock, F_SETFL, flags); return -1; } + + fcntl(sock, F_SETFL, flags); + dgram->len = size; dgram->data[size] = '\0'; dgram->cur = dgram->data; From Brian.Haley@hp.com Tue Oct 26 11:10:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 11:10:59 -0700 (PDT) Received: from palrel13.hp.com (palrel13.hp.com [156.153.255.238]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QIAsYq017357 for ; Tue, 26 Oct 2004 11:10:54 -0700 Received: from mailrelay01.cac.cpqcorp.net (mailrelay01.cac.cpqcorp.net [16.47.132.152]) by palrel13.hp.com (Postfix) with ESMTP id 461CF1C001FC; Tue, 26 Oct 2004 11:10:39 -0700 (PDT) Received: from kitche.zk3.dec.com (kitche4.zk3.dec.com [16.140.160.166]) by mailrelay01.cac.cpqcorp.net (Postfix) with ESMTP id C083941D; Tue, 26 Oct 2004 11:10:38 -0700 (PDT) Received: from [127.0.0.1] by kitche.zk3.dec.com (8.9.3/1.1.27.5/27Oct00-1235PM) id OAA0002460938; Tue, 26 Oct 2004 14:10:37 -0400 (EDT) Message-ID: <417E92D9.1050305@hp.com> Date: Tue, 26 Oct 2004 14:09:29 -0400 From: Brian Haley Organization: Linux and Open Source Lab User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040803 X-Accept-Language: en-us, en MIME-Version: 1.0 To: yoshfuji@linux-ipv6.org Cc: netdev@oss.sgi.com Subject: Re: [PATCH, TAKE 2] [IPV6] XFRM: extract xfrm_lookup() from ip6_dst_lookup() (is Re: [PATCH][IPv6] separation xfrm_lookup from ip6_dst_lookup) References: <417D6FD0.7010903@hp.com> <20041026.125539.84990576.yoshfuji@linux-ipv6.org> <417E5F37.4010501@hp.com> <20041027.004359.62730834.yoshfuji@linux-ipv6.org> In-Reply-To: <20041027.004359.62730834.yoshfuji@linux-ipv6.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-archive-position: 10841 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Brian.Haley@hp.com Precedence: bulk X-list: netdev Content-Length: 609 Lines: 19 YOSHIFUJI Hideaki / å‰è—¤è‹±æ˜Ž wrote: > First, in general, please do not mix two things. Sorry, next time I'll split the patch. > Second, because we're not ready to migrate. > Please do not do that (pushing it to the glibc people) until we're ready. > We really need to do in consistent way; kernel header / glibc header, > and even with other systems. The kernel struct is the correct size (since addr[0] has no size), ip6_rthdr0 in ip6.h is not, it's 128 bits too big. Let me know the right steps to go through to correct this and I'll get it done, you can send it off-line if you like. -Brian From dcbw@redhat.com Tue Oct 26 11:12:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 11:12:30 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QICPm9017706 for ; Tue, 26 Oct 2004 11:12:25 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9QIBvK5005512; Tue, 26 Oct 2004 14:11:57 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9QIBur23027; Tue, 26 Oct 2004 14:11:57 -0400 Received: from dcbw.boston.redhat.com (dcbw.boston.redhat.com [172.16.80.23]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9QIBsPd010797; Tue, 26 Oct 2004 14:11:54 -0400 Subject: [PATCHES] wireless: Update in-kernel orinoco driver From: Dan Williams To: netdev@oss.sgi.com Cc: jgarzik@redhat.com, hermes@gibson.dropbear.id.au Content-Type: text/plain Date: Tue, 26 Oct 2004 14:12:00 -0400 Message-Id: <1098814320.3663.24.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-1) Content-Transfer-Encoding: 7bit X-archive-position: 10842 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcbw@redhat.com Precedence: bulk X-list: netdev Content-Length: 426 Lines: 14 This series of 15 patches updates the in-kernel orinoco wireless drivers to the level of current upstream orinoco CVS (from sourceforge). This level is "0.15rc2HEAD" as found in orinoco.h. The basis for this patchset was: upstream orinoco CVS from Mon, Oct 25 kernel sources from linux-2.6.9.tar.bz2 + patch-2.6.10-rc1.bz2 This is a revival of an effort to get the drivers up-to-date from earlier this year in July. Dan From dcbw@redhat.com Tue Oct 26 11:33:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 11:33:45 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QIXeUU018490 for ; Tue, 26 Oct 2004 11:33:40 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9QIXJw9011194; Tue, 26 Oct 2004 14:33:19 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9QIXJr29807; Tue, 26 Oct 2004 14:33:19 -0400 Received: from dcbw.boston.redhat.com (dcbw.boston.redhat.com [172.16.80.23]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9QIXHPd012851; Tue, 26 Oct 2004 14:33:17 -0400 Subject: [PATCH 2.6.10-rc1 1/15] wireless/orinoco: Use msleep() instead of hardcoded schedule_timeout()s From: Dan Williams To: netdev@oss.sgi.com Cc: jgarzik@redhat.com, hermes@gibson.dropbear.id.au In-Reply-To: <1098814320.3663.24.camel@dcbw.boston.redhat.com> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> Content-Type: text/plain Date: Tue, 26 Oct 2004 14:33:24 -0400 Message-Id: <1098815604.3663.35.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-1) Content-Transfer-Encoding: 7bit X-archive-position: 10843 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcbw@redhat.com Precedence: bulk X-list: netdev Content-Length: 2476 Lines: 87 Update in-kernel orinoco wireless drivers to upstream CVS. None of this is original code by Dan Williams, simply a broken down patch set split-out from upstream orinoco CVS. o Use msleep() instead of hardcoded schedule_timeout()s (Nishanth Aravamudan via kernel-janitors list). --- a/drivers/net/wireless/airport.c.1-msleep 2004-10-25 14:44:04.559958488 -0400 +++ b/drivers/net/wireless/airport.c 2004-10-25 14:44:51.372841848 -0400 @@ -28,7 +28,6 @@ #include #include #include -#include #include #include @@ -147,7 +146,7 @@ macio_release_resource(mdev, 0); pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE, macio_get_of_node(mdev), 0, 0); - ssleep(1); + msleep(1000); macio_set_drvdata(mdev, NULL); free_netdev(dev); @@ -173,12 +172,12 @@ disable_irq(dev->irq); pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE, macio_get_of_node(card->mdev), 0, 0); - ssleep(1); + msleep(1000); pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE, macio_get_of_node(card->mdev), 0, 1); - ssleep(1); + msleep(1000); enable_irq(dev->irq); - ssleep(1); + msleep(1000); #endif return 0; @@ -237,7 +236,7 @@ /* Power up card */ pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE, macio_get_of_node(mdev), 0, 1); - ssleep(1); + msleep(1000); /* Reset it before we get the interrupt */ hermes_init(hw); --- a/drivers/net/wireless/orinoco_cs.c.1-msleep 2004-10-25 14:44:04.558958640 -0400 +++ b/drivers/net/wireless/orinoco_cs.c 2004-10-25 14:44:51.374841544 -0400 @@ -136,6 +136,7 @@ if (err) return err; + msleep(100); clear_bit(0, &card->hard_reset_in_progress); return 0; --- a/drivers/net/wireless/orinoco_plx.c.1-msleep 2004-10-25 14:44:04.559958488 -0400 +++ b/drivers/net/wireless/orinoco_plx.c 2004-10-25 14:44:51.376841240 -0400 @@ -352,8 +352,7 @@ static void __exit orinoco_plx_exit(void) { pci_unregister_driver(&orinoco_plx_driver); - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(HZ); + msleep(1000); } module_init(orinoco_plx_init); --- a/drivers/net/wireless/orinoco_tmd.c.1-msleep 2004-10-25 14:44:04.557958792 -0400 +++ b/drivers/net/wireless/orinoco_tmd.c 2004-10-25 14:44:51.377841088 -0400 @@ -218,8 +218,7 @@ static void __exit orinoco_tmd_exit(void) { pci_unregister_driver(&orinoco_tmd_driver); - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(HZ); + msleep(1000); } module_init(orinoco_tmd_init); From juhl-lkml@dif.dk Tue Oct 26 11:36:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 11:36:44 -0700 (PDT) Received: from mail.dif.dk (mail.dif.dk [193.138.115.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QIabDv018840 for ; Tue, 26 Oct 2004 11:36:38 -0700 Received: from localhost (localhost [127.0.0.1]) by mail.dif.dk (Postfix) with ESMTP id B0F9AFF415 for ; Tue, 26 Oct 2004 20:53:36 +0200 (CEST) Received: from mail.dif.dk ([127.0.0.1]) by localhost (saerimmer [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25304-05 for ; Tue, 26 Oct 2004 20:53:34 +0200 (CEST) Received: from diftmgw2.backbone.dif.dk (diftmgw2.backbone.dif.dk [10.227.136.246]) by mail.dif.dk (Postfix) with ESMTP id 248A7FF413 for ; Tue, 26 Oct 2004 20:53:34 +0200 (CEST) Received: from DIFPST1A.backbone.dif.dk ([10.227.136.220]) by diftmgw2.backbone.dif.dk with InterScan Messaging Security Suite; Tue, 26 Oct 2004 20:35:31 +0200 Received: from [172.16.2.11] (10.227.136.29 [10.227.136.29]) by DIFPST1A.backbone.dif.dk with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id 43CQTMYY; Tue, 26 Oct 2004 20:36:11 +0200 Date: Tue, 26 Oct 2004 20:44:35 +0200 (CEST) From: Jesper Juhl To: linux-kernel Cc: netdev , Linux Kernel Trivial Patch Monkey Subject: [PATCH][Doc][Trivial] fix spelling error related to IPComp help in Kconfig Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at dif.dk X-archive-position: 10844 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: juhl-lkml@dif.dk Precedence: bulk X-list: netdev Content-Length: 1388 Lines: 37 Small patch that fixes a spelling error (Payload misspelled as Paylod)in the IPComp help text in Kconfig (also expands the text to "IP Payload Compression Protocol (IPComp)" which is the title of RFC3173). Please consider applying. Signed-off-by: Jesper Juhl diff -urp linux-2.6.10-rc1-bk5-orig/net/ipv4/Kconfig linux-2.6.10-rc1-bk5/net/ipv4/Kconfig --- linux-2.6.10-rc1-bk5-orig/net/ipv4/Kconfig 2004-10-18 23:54:55.000000000 +0200 +++ linux-2.6.10-rc1-bk5/net/ipv4/Kconfig 2004-10-26 20:30:35.000000000 +0200 @@ -331,8 +331,8 @@ config INET_IPCOMP select CRYPTO select CRYPTO_DEFLATE ---help--- - Support for IP Paylod Compression (RFC3173), typically needed - for IPsec. + Support for IP Payload Compression Protocol (IPComp) (RFC3173), + typically needed for IPsec. If unsure, say Y. diff -urp linux-2.6.10-rc1-bk5-orig/net/ipv6/Kconfig linux-2.6.10-rc1-bk5/net/ipv6/Kconfig --- linux-2.6.10-rc1-bk5-orig/net/ipv6/Kconfig 2004-10-18 23:54:08.000000000 +0200 +++ linux-2.6.10-rc1-bk5/net/ipv6/Kconfig 2004-10-26 20:31:19.000000000 +0200 @@ -52,8 +52,8 @@ config INET6_IPCOMP select CRYPTO select CRYPTO_DEFLATE ---help--- - Support for IP Paylod Compression (RFC3173), typically needed - for IPsec. + Support for IP Payload Compression Protocol (IPComp) (RFC3173), + typically needed for IPsec. If unsure, say Y. From titeras@two.research.nokia.com Tue Oct 26 11:36:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 11:36:53 -0700 (PDT) Received: from mgw-x2.nokia.com (mgw-x2.nokia.com [131.228.20.22]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QIak2X018882 for ; Tue, 26 Oct 2004 11:36:47 -0700 Received: from esdks001.ntc.nokia.com (esdks001.ntc.nokia.com [172.21.138.120]) by mgw-x2.nokia.com (Switch-2.2.8/Switch-2.2.8) with ESMTP id i9QIaPe25072; Tue, 26 Oct 2004 21:36:25 +0300 (EET DST) X-Scanned: Tue, 26 Oct 2004 21:35:29 +0300 Nokia Message Protector V1.3.31 2004060815 - RELEASE Received: (from root@localhost) by esdks001.ntc.nokia.com (8.12.9/8.12.9) id i9QIZTen024865; Tue, 26 Oct 2004 21:35:29 +0300 Received: from mgw-int2.ntc.nokia.com (172.21.143.97) by esdks001.ntc.nokia.com 00rVy8Dv; Tue, 26 Oct 2004 21:35:27 EEST Received: from two.research.nokia.com (two.research.nokia.com [172.21.50.14]) by mgw-int2.ntc.nokia.com (Switch-2.2.8/Switch-2.2.8) with ESMTP id i9QIZQS10946; Tue, 26 Oct 2004 21:35:26 +0300 (EET DST) Received: from titeras by two.research.nokia.com with local (Exim 3.36 #1 (Debian)) id 1CMWAI-00068F-00; Tue, 26 Oct 2004 21:35:26 +0300 Date: Tue, 26 Oct 2004 21:35:26 +0300 From: Timo =?iso-8859-1?Q?Ter=E4s?= To: davem@davemloft.net Cc: netdev@oss.sgi.com Subject: [PATCH] Add ability to register class interfaces for network class Message-ID: <20041026183526.GA23535@two.research.nokia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime User-Agent: Mutt/1.5.6+20040907i Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i9QIak2X018882 X-archive-position: 10845 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ext-timo.teras@nokia.com Precedence: bulk X-list: netdev Content-Length: 1198 Lines: 38 Add functions to register class interfaces for network class. Similar to the ones found in scsi subsystem. Originally posted on linux-net and related discussion can be found from http://marc.theaimsgroup.com/?l=linux-net&m=109758592121767&w=2. Signed-off-by: Timo Teräs --- linux-2.6.9-rc4.orig/net/core/net-sysfs.c 2004-10-12 13:23:35.106496312 +0300 +++ linux-2.6.9-rc4/net/core/net-sysfs.c 2004-10-12 13:24:29.177276304 +0300 @@ -448,3 +448,11 @@ { return class_register(&net_class); } + +int netdev_register_interface(struct class_interface *intf) +{ + intf->class = &net_class; + return class_interface_register(intf); +} + +EXPORT_SYMBOL_GPL(netdev_register_interface); --- linux-2.6.9-rc4.orig/include/linux/netdevice.h 2004-10-12 13:23:31.186092304 +0300 +++ linux-2.6.9-rc4/include/linux/netdevice.h 2004-10-12 13:24:29.179276000 +0300 @@ -951,6 +951,12 @@ extern char *net_sysctl_strdup(const char *s); #endif +#ifdef CONFIG_SYSFS +extern int netdev_register_interface(struct class_interface *intf); +#define netdev_unregister_interface(intf) \ + class_interface_unregister(intf) +#endif + #endif /* __KERNEL__ */ #endif /* _LINUX_DEV_H */ From dcbw@redhat.com Tue Oct 26 11:39:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 11:39:21 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QIdDRp019526 for ; Tue, 26 Oct 2004 11:39:14 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9QIcffT012684; Tue, 26 Oct 2004 14:38:46 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9QIcQr31348; Tue, 26 Oct 2004 14:38:26 -0400 Received: from dcbw.boston.redhat.com (dcbw.boston.redhat.com [172.16.80.23]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9QIcPPd013231; Tue, 26 Oct 2004 14:38:25 -0400 Subject: [PATCH 2.6.10-rc1 1/15] wireless/orinoco: use msleep()... From: Dan Williams To: netdev@oss.sgi.com Cc: jgarzik@redhat.com, hermes@gibson.dropbear.id.au In-Reply-To: <1098814320.3663.24.camel@dcbw.boston.redhat.com> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> Content-Type: text/plain Date: Tue, 26 Oct 2004 14:38:31 -0400 Message-Id: <1098815911.3663.40.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-1) Content-Transfer-Encoding: 7bit X-archive-position: 10846 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcbw@redhat.com Precedence: bulk X-list: netdev Content-Length: 100 Lines: 5 This first patch should also have in the comments: Signed-off-by: Dan Williams From dcbw@redhat.com Tue Oct 26 11:39:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 11:39:22 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QIdHTY019538 for ; Tue, 26 Oct 2004 11:39:17 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9QIcv7M012801; Tue, 26 Oct 2004 14:38:57 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9QIcvr31449; Tue, 26 Oct 2004 14:38:57 -0400 Received: from dcbw.boston.redhat.com (dcbw.boston.redhat.com [172.16.80.23]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9QIctPd013243; Tue, 26 Oct 2004 14:38:55 -0400 Subject: [PATCH 2.6.10-rc1 2/15] wireless/orinoco: fix up printk text From: Dan Williams To: netdev@oss.sgi.com Cc: jgarzik@redhat.com, hermes@gibson.dropbear.id.au In-Reply-To: <1098814320.3663.24.camel@dcbw.boston.redhat.com> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> Content-Type: text/plain Date: Tue, 26 Oct 2004 14:39:02 -0400 Message-Id: <1098815942.3663.42.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-1) Content-Transfer-Encoding: 7bit X-archive-position: 10847 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcbw@redhat.com Precedence: bulk X-list: netdev Content-Length: 9149 Lines: 266 Update in-kernel orinoco wireless drivers to upstream CVS. None of this is original code by Dan Williams, simply a broken down patch set split-out from upstream orinoco CVS. o Fix up printk text Signed-off-by: Dan Williams --- a/drivers/net/wireless/airport.c.2-printk-fixes 2004-10-25 14:46:53.203320800 -0400 +++ b/drivers/net/wireless/airport.c 2004-10-25 14:53:19.929529480 -0400 @@ -193,14 +193,14 @@ hermes_t *hw; if (macio_resource_count(mdev) < 1 || macio_irq_count(mdev) < 1) { - printk(KERN_ERR PFX "wrong interrupt/addresses in OF tree\n"); + printk(KERN_ERR PFX "Wrong interrupt/addresses in OF tree\n"); return -ENODEV; } /* Allocate space for private device-specific data */ dev = alloc_orinocodev(sizeof(*card), airport_hard_reset); if (! dev) { - printk(KERN_ERR PFX "can't allocate device datas\n"); + printk(KERN_ERR PFX "Cannot allocate network device\n"); return -ENODEV; } priv = netdev_priv(dev); @@ -223,11 +223,11 @@ /* Setup interrupts & base address */ dev->irq = macio_irq(mdev, 0); phys_addr = macio_resource_start(mdev, 0); /* Physical address */ - printk(KERN_DEBUG PFX "Airport at physical address %lx\n", phys_addr); + printk(KERN_DEBUG PFX "Physical address %lx\n", phys_addr); dev->base_addr = phys_addr; card->vaddr = ioremap(phys_addr, AIRPORT_IO_LEN); if (!card->vaddr) { - printk(PFX "ioremap() failed\n"); + printk(KERN_ERR PFX "ioremap() failed\n"); goto failed; } @@ -241,7 +241,7 @@ /* Reset it before we get the interrupt */ hermes_init(hw); - if (request_irq(dev->irq, orinoco_interrupt, 0, "Airport", dev)) { + if (request_irq(dev->irq, orinoco_interrupt, 0, dev->name, dev)) { printk(KERN_ERR PFX "Couldn't get IRQ %d\n", dev->irq); goto failed; } @@ -252,7 +252,7 @@ printk(KERN_ERR PFX "register_netdev() failed\n"); goto failed; } - printk(KERN_DEBUG PFX "card registered for interface %s\n", dev->name); + printk(KERN_DEBUG PFX "Card registered for interface %s\n", dev->name); card->ndev_registered = 1; return 0; failed: --- a/drivers/net/wireless/hermes.c.2-printk-fixes 2004-10-25 14:54:36.425900264 -0400 +++ b/drivers/net/wireless/hermes.c 2004-10-25 14:59:05.506993720 -0400 @@ -235,13 +235,17 @@ err = hermes_issue_cmd(hw, cmd, parm0); if (err) { if (! hermes_present(hw)) { - printk(KERN_WARNING "hermes @ %s0x%lx: " - "Card removed while issuing command.\n", - IO_TYPE(hw), hw->iobase); + if (net_ratelimit()) + printk(KERN_WARNING "hermes @ %s0x%lx: " + "Card removed while issuing command " + "0x%04x.\n", IO_TYPE(hw), hw->iobase, + cmd); err = -ENODEV; } else - printk(KERN_ERR "hermes @ %s0x%lx: Error %d issuing command.\n", - IO_TYPE(hw), hw->iobase, err); + if (net_ratelimit()) + printk(KERN_ERR "hermes @ %s0x%lx: " + "Error %d issuing command 0x%04x.\n", + IO_TYPE(hw), hw->iobase, err, cmd); goto out; } @@ -254,17 +258,17 @@ } if (! hermes_present(hw)) { - printk(KERN_WARNING "hermes @ %s0x%lx: " - "Card removed while waiting for command completion.\n", - IO_TYPE(hw), hw->iobase); + printk(KERN_WARNING "hermes @ %s0x%lx: Card removed " + "while waiting for command 0x%04x completion.\n", + IO_TYPE(hw), hw->iobase, cmd); err = -ENODEV; goto out; } if (! (reg & HERMES_EV_CMD)) { - printk(KERN_ERR "hermes @ %s0x%lx: " - "Timeout waiting for command completion.\n", - IO_TYPE(hw), hw->iobase); + printk(KERN_ERR "hermes @ %s0x%lx: Timeout waiting for " + "command 0x%04x completion.\n", IO_TYPE(hw), + hw->iobase, cmd); err = -ETIMEDOUT; goto out; } @@ -383,12 +387,18 @@ reg = hermes_read_reg(hw, oreg); } - if (reg & HERMES_OFFSET_BUSY) { - return -ETIMEDOUT; - } - - if (reg & HERMES_OFFSET_ERR) { - return -EIO; + if (reg != offset) { + printk(KERN_ERR "hermes @ %s0x%lx: BAP%d offset %s: " + "reg=0x%x id=0x%x offset=0x%x\n", IO_TYPE(hw), + hw->iobase, bap, + (reg & HERMES_OFFSET_BUSY) ? "timeout" : "error", + reg, id, offset); + + if (reg & HERMES_OFFSET_BUSY) { + return -ETIMEDOUT; + } + + return -EIO; /* error or wrong offset */ } return 0; @@ -484,9 +494,9 @@ *length = rlength; if (rtype != rid) - printk(KERN_WARNING "hermes @ %s0x%lx: " - "hermes_read_ltv(): rid (0x%04x) does not match type (0x%04x)\n", - IO_TYPE(hw), hw->iobase, rid, rtype); + printk(KERN_WARNING "hermes @ %s0x%lx: %s(): " + "rid (0x%04x) does not match type (0x%04x)\n", + IO_TYPE(hw), hw->iobase, __FUNCTION__, rid, rtype); if (HERMES_RECLEN_TO_BYTES(rlength) > bufsize) printk(KERN_WARNING "hermes @ %s0x%lx: " "Truncating LTV record from %d to %d bytes. " --- a/drivers/net/wireless/orinoco.c.2-printk-fixes 2004-10-25 15:00:16.087263888 -0400 +++ b/drivers/net/wireless/orinoco.c 2004-10-25 15:09:14.310441528 -0400 @@ -807,8 +807,9 @@ desc.tx_control = cpu_to_le16(HERMES_TXCTRL_TX_OK | HERMES_TXCTRL_TX_EX); err = hermes_bap_pwrite(hw, USER_BAP, &desc, sizeof(desc), txfid, 0); if (err) { - printk(KERN_ERR "%s: Error %d writing Tx descriptor to BAP\n", - dev->name, err); + if (net_ratelimit()) + printk(KERN_ERR "%s: Error %d writing Tx descriptor " + "to BAP\n", dev->name, err); stats->tx_errors++; goto fail; } @@ -838,8 +839,9 @@ err = hermes_bap_pwrite(hw, USER_BAP, &hdr, sizeof(hdr), txfid, HERMES_802_3_OFFSET); if (err) { - printk(KERN_ERR "%s: Error %d writing packet header to BAP\n", - dev->name, err); + if (net_ratelimit()) + printk(KERN_ERR "%s: Error %d writing packet " + "header to BAP\n", dev->name, err); stats->tx_errors++; goto fail; } @@ -1299,8 +1301,8 @@ } break; default: - printk(KERN_DEBUG "%s: Unknown information frame received " - "(type %04x).\n", dev->name, type); + printk(KERN_DEBUG "%s: Unknown information frame received: " + "type 0x%04x, length %d\n", dev->name, type, len); /* We don't actually do anything about it */ break; } @@ -1309,7 +1311,7 @@ static void __orinoco_ev_infdrop(struct net_device *dev, hermes_t *hw) { if (net_ratelimit()) - printk(KERN_WARNING "%s: Information frame lost.\n", dev->name); + printk(KERN_DEBUG "%s: Information frame lost.\n", dev->name); } /********************************************************************/ @@ -1787,7 +1789,8 @@ } if (p) - printk(KERN_WARNING "Multicast list is longer than mc_count\n"); + printk(KERN_WARNING "%s: Multicast list is " + "longer than mc_count\n", dev->name); err = hermes_write_ltv(hw, USER_BAP, HERMES_RID_CNFGROUPADDRESSES, HERMES_BYTES_TO_RECLEN(priv->mc_count * ETH_ALEN), @@ -2049,7 +2052,7 @@ /* Get the firmware version */ err = HERMES_READ_RECORD(hw, USER_BAP, HERMES_RID_STAID, &sta_id); if (err) { - printk(KERN_WARNING "%s: Error %d reading firmware info. Wildly guessing capabilities...\n", + printk(KERN_ERR "%s: Cannot read station identity: error %d\n", dev->name, err); memset(&sta_id, 0, sizeof(sta_id)); } @@ -2058,7 +2061,7 @@ le16_to_cpus(&sta_id.variant); le16_to_cpus(&sta_id.major); le16_to_cpus(&sta_id.minor); - printk(KERN_DEBUG "%s: Station identity %04x:%04x:%04x:%04x\n", + printk(KERN_DEBUG "%s: Station identity %04x:%04x:%04x:%04x\n", dev->name, sta_id.id, sta_id.variant, sta_id.major, sta_id.minor); @@ -3074,8 +3077,9 @@ priv->mwo_robust = 0; else { if (frq->fixed) - printk(KERN_WARNING "%s: Fixed fragmentation not \ -supported on this firmware. Using MWO robust instead.\n", dev->name); + printk(KERN_WARNING "%s: Fixed fragmentation is " + "not supported on this firmware. " + "Using MWO robust instead.\n", dev->name); priv->mwo_robust = 1; } } else { --- a/drivers/net/wireless/orinoco_cs.c.2-printk-fixes 2004-10-25 15:11:03.156894352 -0400 +++ b/drivers/net/wireless/orinoco_cs.c 2004-10-25 15:11:39.137424480 -0400 @@ -405,7 +405,7 @@ last_ret = pcmcia_get_next_tuple(handle, &tuple); if (last_ret == CS_NO_MORE_ITEMS) { printk(KERN_ERR PFX "GetNextTuple(): No matching " - "CIS configuration, maybe you need the " + "CIS configuration. Maybe you need the " "ignore_cis_vcc=1 parameter.\n"); goto cs_failed; } --- a/drivers/net/wireless/orinoco_pci.c.2-printk-fixes 2004-10-25 15:13:44.962296192 -0400 +++ b/drivers/net/wireless/orinoco_pci.c 2004-10-25 15:15:58.936928952 -0400 @@ -237,8 +237,7 @@ err = request_irq(pdev->irq, orinoco_interrupt, SA_SHIRQ, dev->name, dev); if (err) { - printk(KERN_ERR PFX "Error allocating IRQ %d.\n", - pdev->irq); + printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); err = -EBUSY; goto fail; } @@ -257,7 +256,7 @@ err = register_netdev(dev); if (err) { - printk(KERN_ERR "%s: Failed to register net device\n", dev->name); + printk(KERN_ERR PFX "Failed to register net device\n"); goto fail; } From dcbw@redhat.com Tue Oct 26 11:43:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 11:43:35 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QIhSg6020220 for ; Tue, 26 Oct 2004 11:43:29 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9QIh4sm014034; Tue, 26 Oct 2004 14:43:04 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9QIh4r00493; Tue, 26 Oct 2004 14:43:04 -0400 Received: from dcbw.boston.redhat.com (dcbw.boston.redhat.com [172.16.80.23]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9QIh2Pd013633; Tue, 26 Oct 2004 14:43:02 -0400 Subject: [PATCH 2.6.10-rc1 3/15] wireless/orinoco: encapsulate direct hardware operations From: Dan Williams To: netdev@oss.sgi.com Cc: jgarzik@redhat.com, hermes@gibson.dropbear.id.au In-Reply-To: <1098814320.3663.24.camel@dcbw.boston.redhat.com> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> Content-Type: text/plain Date: Tue, 26 Oct 2004 14:43:09 -0400 Message-Id: <1098816189.3663.47.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-1) Content-Transfer-Encoding: 7bit X-archive-position: 10848 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcbw@redhat.com Precedence: bulk X-list: netdev Content-Length: 9633 Lines: 311 Update in-kernel orinoco wireless drivers to upstream CVS. None of this is original code by Dan Williams, simply a broken down patch set split-out from upstream orinoco CVS. o Encapsulate direct hardware operations so those symbols don't need to be exported Signed-off-by: Dan Williams --- a/drivers/net/wireless/hermes.c.3-direct-ops 2004-10-25 15:36:28.669981112 -0400 +++ b/drivers/net/wireless/hermes.c 2004-10-25 15:49:38.064974832 -0400 @@ -48,6 +48,7 @@ #include #include #include +#include #include #include "hermes.h" @@ -83,6 +84,32 @@ #endif /* ! HERMES_DEBUG */ +static int hermes_init_direct(hermes_t *hw); +static int hermes_docmd_wait_direct(hermes_t *hw, u16 cmd, u16 parm0, + struct hermes_response *resp); +static int hermes_allocate_direct(hermes_t *hw, u16 size, u16 *fid); +static int hermes_bap_seek(hermes_t *hw, int bap, u16 id, u16 offset); +static int hermes_bap_pread_direct(hermes_t *hw, int bap, + void *buf, unsigned len, + u16 id, u16 offset); +static int hermes_bap_pwrite_direct(hermes_t *hw, int bap, + const void *buf, unsigned len, + u16 id, u16 offset); +static int hermes_read_ltv_direct(hermes_t *hw, int bap, u16 rid, + unsigned bufsize, u16 *length, void *buf); +static int hermes_write_ltv_direct(hermes_t *hw, int bap, u16 rid, + u16 length, const void *value); + +static const struct hermes_ops hermes_ops_direct = { + .init = hermes_init_direct, + .docmd_wait = hermes_docmd_wait_direct, + .allocate = hermes_allocate_direct, + .read_ltv = hermes_read_ltv_direct, + .write_ltv = hermes_write_ltv_direct, + .bap_pread = hermes_bap_pread_direct, + .bap_pwrite = hermes_bap_pwrite_direct +}; + /* * Internal functions @@ -130,6 +157,7 @@ hw->io_space = io_space; hw->reg_spacing = reg_spacing; hw->inten = 0x0; + hw->ops = &hermes_ops_direct; #ifdef HERMES_DEBUG_BUFFER hw->dbufp = 0; @@ -138,7 +166,7 @@ #endif } -int hermes_init(hermes_t *hw) +static int hermes_init_direct(hermes_t *hw) { u16 status, reg; int err = 0; @@ -176,7 +204,7 @@ reg = hermes_read_regn(hw, EVSTAT); hermes_write_regn(hw, EVACK, reg); - /* We don't use hermes_docmd_wait here, because the reset wipes + /* We don't use hermes_docmd_wait_direct here, because the reset wipes the magic constant in SWSUPPORT0 away, and it gets confused */ err = hermes_issue_cmd(hw, HERMES_CMD_INIT, 0); if (err) @@ -224,8 +252,8 @@ * Returns: < 0 on internal error, 0 on success, > 0 on error returned by the firmware * * Callable from any context, but locking is your problem. */ -int hermes_docmd_wait(hermes_t *hw, u16 cmd, u16 parm0, - struct hermes_response *resp) +static int hermes_docmd_wait_direct(hermes_t *hw, u16 cmd, u16 parm0, + struct hermes_response *resp) { int err; int k; @@ -290,7 +318,7 @@ return err; } -int hermes_allocate(hermes_t *hw, u16 size, u16 *fid) +static int hermes_allocate_direct(hermes_t *hw, u16 size, u16 *fid) { int err = 0; int k; @@ -299,7 +327,7 @@ if ( (size < HERMES_ALLOC_LEN_MIN) || (size > HERMES_ALLOC_LEN_MAX) ) return -EINVAL; - err = hermes_docmd_wait(hw, HERMES_CMD_ALLOC, size, NULL); + err = hermes_docmd_wait_direct(hw, HERMES_CMD_ALLOC, size, NULL); if (err) { return err; } @@ -397,7 +425,7 @@ if (reg & HERMES_OFFSET_BUSY) { return -ETIMEDOUT; } - + return -EIO; /* error or wrong offset */ } @@ -410,8 +438,8 @@ * * Returns: < 0 on internal failure (errno), 0 on success, > 0 on error from firmware */ -int hermes_bap_pread(hermes_t *hw, int bap, void *buf, unsigned len, - u16 id, u16 offset) +static int hermes_bap_pread_direct(hermes_t *hw, int bap, + void *buf, unsigned len, u16 id, u16 offset) { int dreg = bap ? HERMES_DATA1 : HERMES_DATA0; int err = 0; @@ -436,8 +464,9 @@ * * Returns: < 0 on internal failure (errno), 0 on success, > 0 on error from firmware */ -int hermes_bap_pwrite(hermes_t *hw, int bap, const void *buf, unsigned len, - u16 id, u16 offset) +static int hermes_bap_pwrite_direct(hermes_t *hw, int bap, + const void *buf, unsigned len, + u16 id, u16 offset) { int dreg = bap ? HERMES_DATA1 : HERMES_DATA0; int err = 0; @@ -464,8 +493,8 @@ * practice. * * Callable from user or bh context. */ -int hermes_read_ltv(hermes_t *hw, int bap, u16 rid, unsigned bufsize, - u16 *length, void *buf) +static int hermes_read_ltv_direct(hermes_t *hw, int bap, u16 rid, + unsigned bufsize, u16 *length, void *buf) { int err = 0; int dreg = bap ? HERMES_DATA1 : HERMES_DATA0; @@ -475,7 +504,7 @@ if ( (bufsize < 0) || (bufsize % 2) ) return -EINVAL; - err = hermes_docmd_wait(hw, HERMES_CMD_ACCESS, rid, NULL); + err = hermes_docmd_wait_direct(hw, HERMES_CMD_ACCESS, rid, NULL); if (err) return err; @@ -486,7 +515,7 @@ rlength = hermes_read_reg(hw, dreg); if (! rlength) - return -ENOENT; + return -ENODATA; rtype = hermes_read_reg(hw, dreg); @@ -510,8 +539,8 @@ return 0; } -int hermes_write_ltv(hermes_t *hw, int bap, u16 rid, - u16 length, const void *value) +static int hermes_write_ltv_direct(hermes_t *hw, int bap, u16 rid, + u16 length, const void *value) { int dreg = bap ? HERMES_DATA1 : HERMES_DATA0; int err = 0; @@ -531,21 +560,13 @@ hermes_write_words(hw, dreg, value, count); - err = hermes_docmd_wait(hw, HERMES_CMD_ACCESS | HERMES_CMD_WRITE, + err = hermes_docmd_wait_direct(hw, HERMES_CMD_ACCESS | HERMES_CMD_WRITE, rid, NULL); return err; } EXPORT_SYMBOL(hermes_struct_init); -EXPORT_SYMBOL(hermes_init); -EXPORT_SYMBOL(hermes_docmd_wait); -EXPORT_SYMBOL(hermes_allocate); - -EXPORT_SYMBOL(hermes_bap_pread); -EXPORT_SYMBOL(hermes_bap_pwrite); -EXPORT_SYMBOL(hermes_read_ltv); -EXPORT_SYMBOL(hermes_write_ltv); static int __init init_hermes(void) { --- a/drivers/net/wireless/hermes.h.3-direct-ops 2004-10-25 14:44:04.557958792 -0400 +++ b/drivers/net/wireless/hermes.h 2004-10-25 15:52:32.134512240 -0400 @@ -191,6 +191,8 @@ #define HERMES_RXSTAT_TUNNEL (0x4000) /* bridge-tunnel encoded frame */ #define HERMES_RXSTAT_WMP (0x6000) /* Wavelan-II Management Protocol frame */ +#define HERMES_RXSTAT_GET_MACPORT(s) (((s) & HERMES_RXSTAT_MACPORT) >> 8) + struct hermes_tx_descriptor { u16 status; u16 reserved1; @@ -340,7 +342,25 @@ #ifdef __KERNEL__ /* Timeouts */ -#define HERMES_BAP_BUSY_TIMEOUT (500) /* In iterations of ~1us */ +#define HERMES_BAP_BUSY_TIMEOUT (10000) /* In iterations of ~1us */ + +struct hermes; + +/* Functions to access hardware */ +struct hermes_ops { + int (*init)(struct hermes *hw); + int (*docmd_wait)(struct hermes *hw, u16 cmd, u16 parm0, + struct hermes_response *resp); + int (*allocate)(struct hermes *hw, u16 size, u16 *fid); + int (*read_ltv)(struct hermes *hw, int bap, u16 rid, unsigned buflen, + u16 *length, void *buf); + int (*write_ltv)(struct hermes *hw, int bap, u16 rid, + u16 length, const void *value); + int (*bap_pread)(struct hermes *hw, int bap, void *buf, unsigned len, + u16 id, u16 offset); + int (*bap_pwrite)(struct hermes *hw, int bap, const void *buf, + unsigned len, u16 id, u16 offset); +}; /* Basic control structure */ typedef struct hermes { @@ -353,6 +373,8 @@ #define HERMES_32BIT_REGSPACING 1 u16 inten; /* Which interrupts should be enabled? */ + const struct hermes_ops *ops; + void *priv; #ifdef HERMES_DEBUG_BUFFER struct hermes_debug_entry dbuf[HERMES_DEBUG_BUFSIZE]; @@ -375,21 +397,44 @@ #define hermes_write_regn(hw, name, val) hermes_write_reg((hw), HERMES_##name, (val)) /* Function prototypes */ -void hermes_struct_init(hermes_t *hw, ulong address, int io_space, - int reg_spacing); -int hermes_init(hermes_t *hw); -int hermes_docmd_wait(hermes_t *hw, u16 cmd, u16 parm0, - struct hermes_response *resp); -int hermes_allocate(hermes_t *hw, u16 size, u16 *fid); - -int hermes_bap_pread(hermes_t *hw, int bap, void *buf, unsigned len, - u16 id, u16 offset); -int hermes_bap_pwrite(hermes_t *hw, int bap, const void *buf, unsigned len, - u16 id, u16 offset); -int hermes_read_ltv(hermes_t *hw, int bap, u16 rid, unsigned buflen, - u16 *length, void *buf); -int hermes_write_ltv(hermes_t *hw, int bap, u16 rid, - u16 length, const void *value); +void hermes_struct_init(hermes_t *hw, ulong address, int io_space, int reg_spacing); + +static inline int hermes_init(hermes_t *hw) +{ + return hw->ops->init(hw); +} +static inline int hermes_docmd_wait(hermes_t *hw, u16 cmd, u16 parm0, + struct hermes_response *resp) +{ + return hw->ops->docmd_wait(hw, cmd, parm0, resp); +} +static inline int hermes_allocate(hermes_t *hw, u16 size, u16 *fid) +{ + return hw->ops->allocate(hw, size, fid); +} + +static inline int hermes_bap_pread(hermes_t *hw, int bap, + void *buf, unsigned len, + u16 id, s32 offset) +{ + return hw->ops->bap_pread(hw, bap, buf, len, id, offset); +} +static inline int hermes_bap_pwrite(hermes_t *hw, int bap, + const void *buf, unsigned len, + u16 id, u16 offset) +{ + return hw->ops->bap_pwrite(hw, bap, buf, len, id, offset); +} +static inline int hermes_read_ltv(hermes_t *hw, int bap, u16 rid, + unsigned buflen, u16 *length, void *buf) +{ + return hw->ops->read_ltv(hw, bap, rid, buflen, length, buf); +} +static inline int hermes_write_ltv(hermes_t *hw, int bap, u16 rid, + u16 length, const void *value) +{ + return hw->ops->write_ltv(hw, bap, rid, length, value); +} /* Inline functions */ From dcbw@redhat.com Tue Oct 26 11:46:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 11:46:22 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QIkFPF020607 for ; Tue, 26 Oct 2004 11:46:15 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9QIjp94014732; Tue, 26 Oct 2004 14:45:56 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9QIjor01243; Tue, 26 Oct 2004 14:45:50 -0400 Received: from dcbw.boston.redhat.com (dcbw.boston.redhat.com [172.16.80.23]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9QIjnPd013816; Tue, 26 Oct 2004 14:45:49 -0400 Subject: [PATCH 2.6.10-rc1 4/15] wireless/orinoco: Update orinoco changelog and module parameters From: Dan Williams To: netdev@oss.sgi.com Cc: jgarzik@redhat.com, hermes@gibson.dropbear.id.au In-Reply-To: <1098814320.3663.24.camel@dcbw.boston.redhat.com> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> Content-Type: text/plain Date: Tue, 26 Oct 2004 14:45:55 -0400 Message-Id: <1098816355.3663.50.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-1) Content-Transfer-Encoding: 7bit X-archive-position: 10849 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcbw@redhat.com Precedence: bulk X-list: netdev Content-Length: 5181 Lines: 115 Update in-kernel orinoco wireless drivers to upstream CVS. None of this is original code by Dan Williams, simply a broken down patch set split-out from upstream orinoco CVS. o Update orinoco changelog and module parameters Signed-off-by: Dan Williams --- a/drivers/net/wireless/orinoco.c.4-module-params 2004-10-26 10:40:47.498252680 -0400 +++ b/drivers/net/wireless/orinoco.c 2004-10-26 10:41:11.070669128 -0400 @@ -393,12 +393,67 @@ * in the rx_dropped statistics. * o Provided a module parameter to suppress linkstatus messages. * + * v0.13e -> v0.14alpha1 - 30 Sep 2003 - David Gibson + * o Replaced priv->connected logic with netif_carrier_on/off() + * calls. + * o Remove has_ibss_any and never set the CREATEIBSS RID when + * the ESSID is empty. Too many firmwares break if we do. + * o 2.6 merges: Replace pdev->slot_name with pci_name(), remove + * __devinitdata from PCI ID tables, use free_netdev(). + * o Enabled shared-key authentication for Agere firmware (from + * Robert J. Moore + * o Move netif_wake_queue() (back) to the Tx completion from the + * ALLOC event. This seems to prevent/mitigate the rolling + * error -110 problems at least on some Intersil firmwares. + * Theoretically reduces performance, but I can't measure it. + * Patch from Andrew Tridgell + * + * v0.14alpha1 -> v0.14alpha2 - 20 Oct 2003 - David Gibson + * o Correctly turn off shared-key authentication when requested + * (bugfix from Robert J. Moore). + * o Correct airport sleep interfaces for current 2.6 kernels. + * o Add code for key change without disabling/enabling the MAC + * port. This is supposed to allow 802.1x to work sanely, but + * doesn't seem to yet. + * + * v0.14alpha2 -> v0.15rc1 - 19 Apr 2004 - Pavel Roskin & David Gibson + * o Fix bug which prevented setting 32 character ESSIDs from + * iwconfig (Thomas Schulz). + * o Fix for incorrect CIS access in orinoco_plx (Pavel Roskin). + * o Fix setting WEP key if __orinoco_fastkeychange() is not + * supported (Pavel Roskin). + * o New wireless extensions API and scanning support (patch from + * Moustafa Youssef, updated by Jim Carter and Pavel Roskin). + * o Add minimal ethtool support (Pavel Roskin). + * o Replace CardServices() calls for compatibility with Linux + * 2.6.2 and above (Pavel Roskin). + * o Fix recognition of Intersil x.x.1 firmware (Pavel Roskin). + * o Replace dump_recs with more flexible get_rid ioctl (Pavel + * Roskin). + * o RF monitor mode support (Pavel Roskin). + * o Lots of bugfixes. + * + * v0.15rc1 -> v0.15rc2 - 28 Jul 2004 - Pavel Roskin & David Gibson + * o orinoco_pci saves PCI registers on suspend (Simon Huggins). + * o Monitor mode disabled on Agere 8.xx firmware - it's broken. + * o BAP timeout increased - needed for Intersil firmware. + * o Tx power is no longer reported - it's unreliable. + * o Use 802.11 header in rx path. Hide packets with ToDS flag + * from programs that don't need promiscous mode (John Denker). + * o Manual roaming implemented for Symbol and Intersil firmware. + * o Use netdev_priv() instead of directly dereferencing dev->priv. + * o Some simplification of pcmcia init code in orinoco_cs and + * spectrum_cs. + * o Numerous trivial cleanups, mainly arising from long-overdue + * merge with mainline. + * + * v0.15rc2 -> ???? - ???? - David Gibson + * o Use msleep() instead of hardcoded schedule_timeout()s + * (Nishanth Aravamudan via kernel-janitors list). + * * TODO - * o New wireless extensions API (patch from Moustafa - * Youssef, updated by Jim Carter and Pavel Roskin). * o Handle de-encapsulation within network layer, provide 802.11 * headers (patch from Thomas 'Dent' Mirlacher) - * o RF monitor mode support * o Fix possible races in SPY handling. * o Disconnect wireless extensions from fundamental configuration. * o (maybe) Software WEP support (patch from Stano Meduna). @@ -461,12 +516,17 @@ /* Level of debugging. Used in the macros in orinoco.h */ #ifdef ORINOCO_DEBUG int orinoco_debug = ORINOCO_DEBUG; -MODULE_PARM(orinoco_debug, "i"); +module_param(orinoco_debug, int, 0644); +MODULE_PARM_DESC(orinoco_debug, "Debug level"); EXPORT_SYMBOL(orinoco_debug); #endif static int suppress_linkstatus; /* = 0 */ -MODULE_PARM(suppress_linkstatus, "i"); +module_param(suppress_linkstatus, int, 0644); +MODULE_PARM_DESC(suppress_linkstatus, "Don't log link status changes"); +static int ignore_disconnect; /* = 0 */ +module_param(ignore_disconnect, int, 0644); +MODULE_PARM_DESC(ignore_disconnect, "Don't report lost link to the network layer"); /********************************************************************/ /* Compile time configuration and compatibility stuff */ --- a/drivers/net/wireless/orinoco.h.4-module-params 2004-10-26 10:43:24.213428352 -0400 +++ b/drivers/net/wireless/orinoco.h 2004-10-26 10:43:31.138375600 -0400 @@ -14,6 +14,9 @@ #include #include #include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 25) +#include +#endif #include "hermes.h" From SRS0+576856ad09181f45abb4+429+infradead.org+hch@phoenix.srs.infradead.org Tue Oct 26 11:48:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 11:48:12 -0700 (PDT) Received: from phoenix.infradead.org (phoenix.infradead.org [81.187.226.98]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QIm7ra020954 for ; Tue, 26 Oct 2004 11:48:08 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.42 #1 (Red Hat Linux)) id 1CMWMH-0004Kb-Ic; Tue, 26 Oct 2004 19:47:49 +0100 Date: Tue, 26 Oct 2004 19:47:49 +0100 From: Christoph Hellwig To: Dan Williams Cc: netdev@oss.sgi.com, jgarzik@redhat.com, hermes@gibson.dropbear.id.au Subject: Re: [PATCH 2.6.10-rc1 1/15] wireless/orinoco: Use msleep() instead of hardcoded schedule_timeout()s Message-ID: <20041026184749.GA16621@infradead.org> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> <1098815604.3663.35.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1098815604.3663.35.camel@dcbw.boston.redhat.com> User-Agent: Mutt/1.4.1i X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 10850 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: netdev Content-Length: 397 Lines: 10 On Tue, Oct 26, 2004 at 02:33:24PM -0400, Dan Williams wrote: > Update in-kernel orinoco wireless drivers to upstream CVS. > None of this is original code by Dan Williams, simply a > broken down patch set split-out from upstream orinoco CVS. > > o Use msleep() instead of hardcoded schedule_timeout()s > (Nishanth Aravamudan via kernel-janitors list). the patch doesn't match the description From dcbw@redhat.com Tue Oct 26 11:48:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 11:48:19 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QImDAs020967 for ; Tue, 26 Oct 2004 11:48:13 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9QIlscH015276; Tue, 26 Oct 2004 14:47:54 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9QIlir01918; Tue, 26 Oct 2004 14:47:44 -0400 Received: from dcbw.boston.redhat.com (dcbw.boston.redhat.com [172.16.80.23]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9QIlgPd013972; Tue, 26 Oct 2004 14:47:42 -0400 Subject: [PATCH 2.6.10-rc1 5/15] wireless/orinoco: Update orinoco pcmcia driver's IRQ handling From: Dan Williams To: netdev@oss.sgi.com Cc: jgarzik@redhat.com, hermes@gibson.dropbear.id.au In-Reply-To: <1098814320.3663.24.camel@dcbw.boston.redhat.com> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> Content-Type: text/plain Date: Tue, 26 Oct 2004 14:47:49 -0400 Message-Id: <1098816469.3663.52.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-1) Content-Transfer-Encoding: 7bit X-archive-position: 10851 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcbw@redhat.com Precedence: bulk X-list: netdev Content-Length: 4845 Lines: 148 Update in-kernel orinoco wireless drivers to upstream CVS. None of this is original code by Dan Williams, simply a broken down patch set split-out from upstream orinoco CVS. o Update orinoco pcmcia driver's IRQ handling Signed-off-by: Dan Williams --- a/drivers/net/wireless/orinoco_cs.c.5-irq-handling 2004-10-26 09:28:06.330250992 -0400 +++ b/drivers/net/wireless/orinoco_cs.c 2004-10-26 09:33:00.939463584 -0400 @@ -54,19 +54,11 @@ /* Module parameters */ -/* The old way: bit map of interrupts to choose from */ -/* This means pick from 15, 14, 12, 11, 10, 9, 7, 5, 4, and 3 */ -static uint irq_mask = 0xdeb8; -/* Newer, simpler way of listing specific interrupts */ -static int irq_list[4] = { -1 }; - /* Some D-Link cards have buggy CIS. They do work at 5v properly, but * don't have any CIS entry for it. This workaround it... */ static int ignore_cis_vcc; /* = 0 */ - -MODULE_PARM(irq_mask, "i"); -MODULE_PARM(irq_list, "1-4i"); -MODULE_PARM(ignore_cis_vcc, "i"); +module_param(ignore_cis_vcc, int, 0644); +MODULE_PARM_DESC(ignore_cis_vcc, "Allow voltage mismatch between card and socket"); /********************************************************************/ /* Magic constants */ @@ -162,7 +154,7 @@ struct orinoco_pccard *card; dev_link_t *link; client_reg_t client_reg; - int ret, i; + int ret; dev = alloc_orinocodev(sizeof(*card), orinoco_cs_hard_reset); if (! dev) @@ -175,14 +167,11 @@ link->priv = dev; /* Interrupt setup */ - link->irq.Attributes = IRQ_TYPE_EXCLUSIVE; + link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT; link->irq.IRQInfo1 = IRQ_INFO2_VALID | IRQ_LEVEL_ID; - if (irq_list[0] == -1) - link->irq.IRQInfo2 = irq_mask; - else - for (i = 0; i < 4; i++) - link->irq.IRQInfo2 |= 1 << irq_list[i]; - link->irq.Handler = NULL; + link->irq.IRQInfo2 = 0xffffffff; /* Any ISA IRQ */ + link->irq.Handler = orinoco_interrupt; + link->irq.Instance = dev; /* General socket configuration defaults can go here. In this * client, we assume very little, and rely on the CIS for @@ -263,6 +252,9 @@ last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; \ } while (0) +#define CFG_CHECK(fn, ret) \ + if (ret != 0) goto next_entry + static void orinoco_cs_config(dev_link_t *link) { @@ -323,9 +315,8 @@ cistpl_cftable_entry_t *cfg = &(parse.cftable_entry); cistpl_cftable_entry_t dflt = { .index = 0 }; - if (pcmcia_get_tuple_data(handle, &tuple) != 0 || - pcmcia_parse_tuple(handle, &tuple, &parse) != 0) - goto next_entry; + CFG_CHECK(GetTupleData, pcmcia_get_tuple_data(handle, &tuple)); + CFG_CHECK(ParseTuple, pcmcia_parse_tuple(handle, &tuple, &parse)); if (cfg->flags & CISTPL_CFTABLE_DEFAULT) dflt = *cfg; @@ -363,8 +354,7 @@ dflt.vpp1.param[CISTPL_POWER_VNOM] / 10000; /* Do we need to allocate an interrupt? */ - if (cfg->irq.IRQInfo1 || dflt.irq.IRQInfo1) - link->conf.Attributes |= CONF_ENABLE_IRQ; + link->conf.Attributes |= CONF_ENABLE_IRQ; /* IO window settings */ link->io.NumPorts1 = link->io.NumPorts2 = 0; @@ -390,8 +380,8 @@ } /* This reserves IO space but doesn't actually enable it */ - if (pcmcia_request_io(link->handle, &link->io) != 0) - goto next_entry; + CFG_CHECK(RequestIO, + pcmcia_request_io(link->handle, &link->io)); } @@ -416,22 +406,7 @@ * a handler to the interrupt, unless the 'Handler' member of * the irq structure is initialized. */ - if (link->conf.Attributes & CONF_ENABLE_IRQ) { - int i; - - link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT; - link->irq.IRQInfo1 = IRQ_INFO2_VALID | IRQ_LEVEL_ID; - if (irq_list[0] == -1) - link->irq.IRQInfo2 = irq_mask; - else - for (i=0; i<4; i++) - link->irq.IRQInfo2 |= 1 << irq_list[i]; - - link->irq.Handler = orinoco_interrupt; - link->irq.Instance = dev; - - CS_CHECK(RequestIRQ, pcmcia_request_irq(link->handle, &link->irq)); - } + CS_CHECK(RequestIRQ, pcmcia_request_irq(link->handle, &link->irq)); /* We initialize the hermes structure before completing PCMCIA * configuration just in case the interrupt handler gets @@ -453,8 +428,6 @@ SET_MODULE_OWNER(dev); card->node.major = card->node.minor = 0; - /* register_netdev will give us an ethX name */ - dev->name[0] = '\0'; /* Tell the stack we exist */ if (register_netdev(dev) != 0) { printk(KERN_ERR PFX "register_netdev() failed\n"); @@ -476,8 +449,7 @@ if (link->conf.Vpp1) printk(", Vpp %d.%d", link->conf.Vpp1 / 10, link->conf.Vpp1 % 10); - if (link->conf.Attributes & CONF_ENABLE_IRQ) - printk(", irq %d", link->irq.AssignedIRQ); + printk(", irq %d", link->irq.AssignedIRQ); if (link->io.NumPorts1) printk(", io 0x%04x-0x%04x", link->io.BasePort1, link->io.BasePort1 + link->io.NumPorts1 - 1); From SRS0+576856ad09181f45abb4+429+infradead.org+hch@phoenix.srs.infradead.org Tue Oct 26 11:48:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 11:49:01 -0700 (PDT) Received: from phoenix.infradead.org (phoenix.infradead.org [81.187.226.98]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QImtH7021584 for ; Tue, 26 Oct 2004 11:48:56 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.42 #1 (Red Hat Linux)) id 1CMWN4-0004L1-Nn; Tue, 26 Oct 2004 19:48:38 +0100 Date: Tue, 26 Oct 2004 19:48:38 +0100 From: Christoph Hellwig To: Timo =?iso-8859-1?Q?Ter=E4s?= Cc: davem@davemloft.net, netdev@oss.sgi.com Subject: Re: [PATCH] Add ability to register class interfaces for network class Message-ID: <20041026184838.GB16621@infradead.org> References: <20041026183526.GA23535@two.research.nokia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20041026183526.GA23535@two.research.nokia.com> User-Agent: Mutt/1.4.1i X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 10852 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: netdev Content-Length: 448 Lines: 11 On Tue, Oct 26, 2004 at 09:35:26PM +0300, Timo Teräs wrote: > Add functions to register class interfaces for network class. > Similar to the ones found in scsi subsystem. > > Originally posted on linux-net and related discussion can be found > from http://marc.theaimsgroup.com/?l=linux-net&m=109758592121767&w=2. > > Signed-off-by: Timo Teräs And you still haven't told why this makes sense nor shown a user for it. From dcbw@redhat.com Tue Oct 26 11:51:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 11:52:04 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QIpwu0022005 for ; Tue, 26 Oct 2004 11:51:58 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9QIpUf7016518; Tue, 26 Oct 2004 14:51:30 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9QIpUr03307; Tue, 26 Oct 2004 14:51:30 -0400 Received: from dcbw.boston.redhat.com (dcbw.boston.redhat.com [172.16.80.23]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9QIpTPd014359; Tue, 26 Oct 2004 14:51:29 -0400 Subject: [PATCH 2.6.10-rc1 6/15] wireless/orinoco: New device data release function From: Dan Williams To: netdev@oss.sgi.com Cc: jgarzik@redhat.com, hermes@gibson.dropbear.id.au In-Reply-To: <1098814320.3663.24.camel@dcbw.boston.redhat.com> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> Content-Type: text/plain Date: Tue, 26 Oct 2004 14:51:35 -0400 Message-Id: <1098816695.3663.57.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-1) Content-Transfer-Encoding: 7bit X-archive-position: 10853 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcbw@redhat.com Precedence: bulk X-list: netdev Content-Length: 3457 Lines: 123 Update in-kernel orinoco wireless drivers to upstream CVS. None of this is original code by Dan Williams, simply a broken down patch set split-out from upstream orinoco CVS. o New device data release function, in preparation for device-specific data like scan results Signed-off-by: Dan Williams --- a/drivers/net/wireless/orinoco_cs.c.6-free-orinocodev 2004-10-26 10:44:27.100868008 -0400 +++ b/drivers/net/wireless/orinoco_cs.c 2004-10-26 10:44:41.440688024 -0400 @@ -239,7 +239,7 @@ dev); unregister_netdev(dev); } - free_netdev(dev); + free_orinocodev(dev); } /* orinoco_cs_detach */ /* --- a/drivers/net/wireless/orinoco.c.6-free-orinocodev 2004-10-26 10:41:11.070669128 -0400 +++ b/drivers/net/wireless/orinoco.c 2004-10-26 10:44:41.444687416 -0400 @@ -2463,6 +2463,13 @@ } +void free_orinocodev(struct net_device *dev) +{ + struct orinoco_private *priv = netdev_priv(dev); + + free_netdev(dev); +} + /********************************************************************/ /* Wireless extensions */ /********************************************************************/ @@ -4240,6 +4247,7 @@ /********************************************************************/ EXPORT_SYMBOL(alloc_orinocodev); +EXPORT_SYMBOL(free_orinocodev); EXPORT_SYMBOL(__orinoco_up); EXPORT_SYMBOL(__orinoco_down); --- a/drivers/net/wireless/orinoco.h.6-free-orinocodev 2004-10-26 10:43:31.138375600 -0400 +++ b/drivers/net/wireless/orinoco.h 2004-10-26 10:44:41.445687264 -0400 @@ -111,6 +111,7 @@ extern struct net_device *alloc_orinocodev(int sizeof_card, int (*hard_reset)(struct orinoco_private *)); +extern void free_orinocodev(struct net_device *dev); extern int __orinoco_up(struct net_device *dev); extern int __orinoco_down(struct net_device *dev); extern int orinoco_stop(struct net_device *dev); --- a/drivers/net/wireless/orinoco_pci.c.6-free-orinocodev 2004-10-26 10:40:47.501252224 -0400 +++ b/drivers/net/wireless/orinoco_pci.c 2004-10-26 10:44:41.447686960 -0400 @@ -267,7 +267,7 @@ if (dev->irq) free_irq(dev->irq, dev); - free_netdev(dev); + free_orinocodev(dev); } if (pci_ioaddr) @@ -292,8 +292,8 @@ iounmap((unsigned char *) priv->hw.iobase); pci_set_drvdata(pdev, NULL); - free_netdev(dev); + free_orinocodev(dev); pci_disable_device(pdev); } --- a/drivers/net/wireless/orinoco_plx.c.6-free-orinocodev 2004-10-26 10:40:36.392940944 -0400 +++ b/drivers/net/wireless/orinoco_plx.c 2004-10-26 10:44:41.448686808 -0400 @@ -273,7 +273,7 @@ if (dev->irq) free_irq(dev->irq, dev); - free_netdev(dev); + free_orinocodev(dev); } if (pccard_ioaddr) @@ -300,10 +300,9 @@ pci_set_drvdata(pdev, NULL); - free_netdev(dev); - release_region(pci_resource_start(pdev, 3), pci_resource_len(pdev, 3)); + free_orinocodev(dev); pci_disable_device(pdev); } --- a/drivers/net/wireless/orinoco_tmd.c.6-free-orinocodev 2004-10-26 10:40:36.393940792 -0400 +++ b/drivers/net/wireless/orinoco_tmd.c 2004-10-26 10:44:41.449686656 -0400 @@ -157,7 +157,7 @@ if (dev->irq) free_irq(dev->irq, dev); - free_netdev(dev); + free_orinocodev(dev); } if (pccard_ioaddr) @@ -181,10 +181,9 @@ pci_set_drvdata(pdev, NULL); - free_netdev(dev); - release_region(pci_resource_start(pdev, 2), pci_resource_len(pdev, 2)); + free_orinocodev(dev); pci_disable_device(pdev); } From dcbw@redhat.com Tue Oct 26 11:56:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 11:56:42 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QIuZJo022479 for ; Tue, 26 Oct 2004 11:56:36 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9QIuF7r017691; Tue, 26 Oct 2004 14:56:16 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9QIuFr04900; Tue, 26 Oct 2004 14:56:15 -0400 Received: from dcbw.boston.redhat.com (dcbw.boston.redhat.com [172.16.80.23]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9QIuEPd014749; Tue, 26 Oct 2004 14:56:14 -0400 Subject: [PATCH 2.6.10-rc1 7/15] wireless/orinoco: Update card reset/init code and add card-specific data structures From: Dan Williams To: netdev@oss.sgi.com Cc: jgarzik@redhat.com, hermes@gibson.dropbear.id.au In-Reply-To: <1098814320.3663.24.camel@dcbw.boston.redhat.com> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> Content-Type: text/plain Date: Tue, 26 Oct 2004 14:56:20 -0400 Message-Id: <1098816980.3663.62.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-1) Content-Transfer-Encoding: 7bit X-archive-position: 10854 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcbw@redhat.com Precedence: bulk X-list: netdev Content-Length: 20346 Lines: 760 Update in-kernel orinoco wireless drivers to upstream CVS. None of this is original code by Dan Williams, simply a broken down patch set split-out from upstream orinoco CVS. o Update card reset/init code and add card-specific data structures. Also bind to Samsung MagicLAN SWL-2210P cards. Signed-off-by: Dan Williams --- a/drivers/net/wireless/orinoco_pci.c.7-card-data 2004-10-26 09:52:07.125216864 -0400 +++ b/drivers/net/wireless/orinoco_pci.c 2004-10-26 10:00:36.855726048 -0400 @@ -129,6 +129,11 @@ #define HERMES_PCI_COR_OFFT (500) /* ms */ #define HERMES_PCI_COR_BUSYT (500) /* ms */ +/* Orinoco PCI specific data */ +struct orinoco_pci_card { + u32 pci_state[16]; /* PCI suspend/resume state */ +}; + /* * Do a soft reset of the PCI card using the Configuration Option Register * We need this to get going... @@ -151,25 +156,15 @@ /* Assert the reset until the card notice */ hermes_write_regn(hw, PCI_COR, HERMES_PCI_COR_MASK); - printk(KERN_NOTICE "Reset done"); timeout = jiffies + (HERMES_PCI_COR_ONT * HZ / 1000); - while(time_before(jiffies, timeout)) { - printk("."); + while(time_before(jiffies, timeout)) mdelay(1); - } - printk(";\n"); - //mdelay(HERMES_PCI_COR_ONT); /* Give time for the card to recover from this hard effort */ hermes_write_regn(hw, PCI_COR, 0x0000); - printk(KERN_NOTICE "Clear Reset"); timeout = jiffies + (HERMES_PCI_COR_OFFT * HZ / 1000); - while(time_before(jiffies, timeout)) { - printk("."); + while(time_before(jiffies, timeout)) mdelay(1); - } - printk(";\n"); - //mdelay(HERMES_PCI_COR_OFFT); /* The card is ready when it's no longer busy */ timeout = jiffies + (HERMES_PCI_COR_BUSYT * HZ / 1000); @@ -178,12 +173,12 @@ mdelay(1); reg = hermes_read_regn(hw, CMD); } - /* Did we timeout ? */ - if(time_after_eq(jiffies, timeout)) { + + /* Still busy? */ + if (reg & HERMES_CMD_BUSY) { printk(KERN_ERR PFX "Busy timeout\n"); return -ETIMEDOUT; } - printk(KERN_NOTICE "pci_cor : reg = 0x%X - %lX - %lX\n", reg, timeout, jiffies); return 0; } @@ -199,61 +194,68 @@ u16 *pci_ioaddr = NULL; unsigned long pci_iolen; struct orinoco_private *priv = NULL; + struct orinoco_pci_card *card; struct net_device *dev = NULL; err = pci_enable_device(pdev); - if (err) - return -EIO; + if (err) { + printk(KERN_ERR PFX "Cannot enable PCI device\n"); + return -err; + } + + err = pci_request_regions(pdev, DRIVER_NAME); + if (err != 0) { + printk(KERN_ERR PFX "Cannot obtain PCI resources\n"); + goto fail_resources; + } /* Resource 0 is mapped to the hermes registers */ pci_iorange = pci_resource_start(pdev, 0); pci_iolen = pci_resource_len(pdev, 0); pci_ioaddr = ioremap(pci_iorange, pci_iolen); - if (! pci_iorange) - goto fail; + if (!pci_iorange) { + printk(KERN_ERR PFX "Cannot remap hardware registers\n"); + goto fail_map; + } /* Allocate network device */ - dev = alloc_orinocodev(0, NULL); + dev = alloc_orinocodev(sizeof(*card), orinoco_pci_cor_reset); if (! dev) { err = -ENOMEM; - goto fail; + goto fail_alloc; } priv = netdev_priv(dev); - dev->base_addr = (unsigned long) pci_ioaddr; + card = priv->card; dev->mem_start = pci_iorange; dev->mem_end = pci_iorange + pci_iolen - 1; SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); - printk(KERN_DEBUG PFX - "Detected Orinoco/Prism2 PCI device at %s, mem:0x%lX to 0x%lX -> 0x%p, irq:%d\n", - pci_name(pdev), dev->mem_start, dev->mem_end, pci_ioaddr, pdev->irq); - - hermes_struct_init(&priv->hw, dev->base_addr, + hermes_struct_init(&priv->hw, (unsigned long) pci_ioaddr, HERMES_MEM, HERMES_32BIT_REGSPACING); pci_set_drvdata(pdev, dev); + printk(KERN_DEBUG PFX "Detected PCI device %s, memory 0x%lx-0x%lx, " + "irq %d\n", pci_name(pdev), dev->mem_start, dev->mem_end, + pdev->irq); + err = request_irq(pdev->irq, orinoco_interrupt, SA_SHIRQ, dev->name, dev); if (err) { printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); err = -EBUSY; - goto fail; + goto fail_irq; } dev->irq = pdev->irq; /* Perform a COR reset to start the card */ - if(orinoco_pci_cor_reset(priv) != 0) { - printk(KERN_ERR "%s: Failed to start the card\n", dev->name); - err = -ETIMEDOUT; + err = orinoco_pci_cor_reset(priv); + if (err) { + printk(KERN_ERR PFX "Initial reset failed\n"); goto fail; } - /* Override the normal firmware detection - the Prism 2.5 PCI - * cards look like Lucent firmware but are actually Intersil */ - priv->firmware_type = FIRMWARE_TYPE_INTERSIL; - err = register_netdev(dev); if (err) { printk(KERN_ERR PFX "Failed to register net device\n"); @@ -263,16 +265,19 @@ return 0; fail: - if (dev) { - if (dev->irq) - free_irq(dev->irq, dev); + free_irq(pdev->irq, dev); - free_orinocodev(dev); - } + fail_irq: + pci_set_drvdata(pdev, NULL); + free_orinocodev(dev); - if (pci_ioaddr) - iounmap(pci_ioaddr); + fail_alloc: + iounmap(pci_ioaddr); + fail_map: + pci_release_regions(pdev); + + fail_resources: pci_disable_device(pdev); return err; @@ -282,18 +287,14 @@ { struct net_device *dev = pci_get_drvdata(pdev); struct orinoco_private *priv = netdev_priv(dev); + void *pci_ioaddr = (void *) priv->hw.iobase; unregister_netdev(dev); - - if (dev->irq) - free_irq(dev->irq, dev); - - if (priv->hw.iobase) - iounmap((unsigned char *) priv->hw.iobase); - + free_irq(dev->irq, dev); pci_set_drvdata(pdev, NULL); - free_orinocodev(dev); + iounmap(pci_ioaddr); + pci_release_regions(pdev); pci_disable_device(pdev); } @@ -301,6 +302,7 @@ { struct net_device *dev = pci_get_drvdata(pdev); struct orinoco_private *priv = netdev_priv(dev); + struct orinoco_pci_card *card = priv->card; unsigned long flags; int err; @@ -325,6 +327,9 @@ orinoco_unlock(priv, &flags); + pci_save_state(pdev, card->pci_state); + pci_set_power_state(pdev, 3); + return 0; } @@ -332,11 +337,15 @@ { struct net_device *dev = pci_get_drvdata(pdev); struct orinoco_private *priv = netdev_priv(dev); + struct orinoco_pci_card *card = priv->card; unsigned long flags; int err; printk(KERN_DEBUG "%s: Orinoco-PCI waking up\n", dev->name); + pci_set_power_state(pdev, 0); + pci_restore_state(pdev, card->pci_state); + err = orinoco_reinit_firmware(dev); if (err) { printk(KERN_ERR "%s: Error %d re-initializing firmware on orinoco_pci_resume()\n", @@ -367,6 +376,8 @@ {0x1260, 0x3872, PCI_ANY_ID, PCI_ANY_ID,}, /* Intersil Prism 2.5 */ {0x1260, 0x3873, PCI_ANY_ID, PCI_ANY_ID,}, + /* Samsung MagicLAN SWL-2210P */ + {0x167d, 0xa000, PCI_ANY_ID, PCI_ANY_ID,}, {0,}, }; --- a/drivers/net/wireless/orinoco_plx.c.7-card-data 2004-10-26 09:52:13.354269904 -0400 +++ b/drivers/net/wireless/orinoco_plx.c 2004-10-26 10:07:51.854596168 -0400 @@ -142,146 +142,189 @@ #include "hermes.h" #include "orinoco.h" -#define COR_OFFSET (0x3e0/2) /* COR attribute offset of Prism2 PC card */ +#define COR_OFFSET (0x3e0) /* COR attribute offset of Prism2 PC card */ #define COR_VALUE (COR_LEVEL_REQ | COR_FUNC_ENA) /* Enable PC card with interrupt in level trigger */ +#define COR_RESET (0x80) /* reset bit in the COR register */ +#define PLX_RESET_TIME (500) /* milliseconds */ #define PLX_INTCSR 0x4c /* Interrupt Control & Status Register */ #define PLX_INTCSR_INTEN (1<<6) /* Interrupt Enable bit */ -static const u16 cis_magic[] = { - 0x0001, 0x0003, 0x0000, 0x0000, 0x00ff, 0x0017, 0x0004, 0x0067 +static const u8 cis_magic[] = { + 0x01, 0x03, 0x00, 0x00, 0xff, 0x17, 0x04, 0x67 }; +/* Orinoco PLX specific data */ +struct orinoco_plx_card { + u8 *attr_mem; +}; + +/* + * Do a soft reset of the card using the Configuration Option Register + */ +static int orinoco_plx_cor_reset(struct orinoco_private *priv) +{ + hermes_t *hw = &priv->hw; + struct orinoco_plx_card *card = priv->card; + u8 *attr_mem = card->attr_mem; + unsigned long timeout; + u16 reg; + + attr_mem[COR_OFFSET] = COR_VALUE | COR_RESET; + mdelay(1); + + attr_mem[COR_OFFSET] = COR_VALUE; + mdelay(1); + + /* Just in case, wait more until the card is no longer busy */ + timeout = jiffies + (PLX_RESET_TIME * HZ / 1000); + reg = hermes_read_regn(hw, CMD); + while (time_before(jiffies, timeout) && (reg & HERMES_CMD_BUSY)) { + mdelay(1); + reg = hermes_read_regn(hw, CMD); + } + + /* Did we timeout ? */ + if (reg & HERMES_CMD_BUSY) { + printk(KERN_ERR PFX "Busy timeout\n"); + return -ETIMEDOUT; + } + + return 0; +} + + static int orinoco_plx_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { int err = 0; - u16 *attr_mem = NULL; - u32 reg, addr; + u8 *attr_mem = NULL; + u32 csr_reg, plx_addr; struct orinoco_private *priv = NULL; + struct orinoco_plx_card *card; unsigned long pccard_ioaddr = 0; unsigned long pccard_iolen = 0; struct net_device *dev = NULL; int i; err = pci_enable_device(pdev); - if (err) - return -EIO; - - /* Resource 2 is mapped to the PCMCIA space */ - attr_mem = ioremap(pci_resource_start(pdev, 2), PAGE_SIZE); - if (! attr_mem) - goto fail; - - printk(KERN_DEBUG "orinoco_plx: CIS: "); - for (i = 0; i < 16; i++) { - printk("%02X:", (int)attr_mem[i]); + if (err) { + printk(KERN_ERR PFX "Cannot enable PCI device\n"); + return -err; } - printk("\n"); - /* Verify whether PC card is present */ - /* FIXME: we probably need to be smarted about this */ - if (memcmp(attr_mem, cis_magic, sizeof(cis_magic)) != 0) { - printk(KERN_ERR "orinoco_plx: The CIS value of Prism2 PC card is invalid.\n"); - err = -EIO; - goto fail; + err = pci_request_regions(pdev, DRIVER_NAME); + if (err != 0) { + printk(KERN_ERR PFX "Cannot obtain PCI resources\n"); + goto fail_resources; } - /* PCMCIA COR is the first byte following CIS: this write should - * enable I/O mode and select level-triggered interrupts */ - attr_mem[COR_OFFSET] = COR_VALUE; - mdelay(1); - reg = attr_mem[COR_OFFSET]; - if (reg != COR_VALUE) { - printk(KERN_ERR "orinoco_plx: Error setting COR value (reg=%x)\n", reg); - goto fail; - } + /* Resource 1 is mapped to PLX-specific registers */ + plx_addr = pci_resource_start(pdev, 1); - iounmap(attr_mem); - attr_mem = NULL; /* done with this now, it seems */ - - /* bjoern: We need to tell the card to enable interrupts, in - case the serial eprom didn't do this already. See the - PLX9052 data book, p8-1 and 8-24 for reference. */ - addr = pci_resource_start(pdev, 1); - reg = 0; - reg = inl(addr+PLX_INTCSR); - if (reg & PLX_INTCSR_INTEN) - printk(KERN_DEBUG "orinoco_plx: " - "Local Interrupt already enabled\n"); - else { - reg |= PLX_INTCSR_INTEN; - outl(reg, addr+PLX_INTCSR); - reg = inl(addr+PLX_INTCSR); - if(!(reg & PLX_INTCSR_INTEN)) { - printk(KERN_ERR "orinoco_plx: " - "Couldn't enable Local Interrupts\n"); - goto fail; - } + /* Resource 2 is mapped to the PCMCIA attribute memory */ + attr_mem = ioremap(pci_resource_start(pdev, 2), + pci_resource_len(pdev, 2)); + if (!attr_mem) { + printk(KERN_ERR PFX "Cannot remap PCMCIA space\n"); + goto fail_map; } - /* and 3 to the PCMCIA slot I/O address space */ + /* Resource 3 is mapped to the PCMCIA I/O address space */ pccard_ioaddr = pci_resource_start(pdev, 3); pccard_iolen = pci_resource_len(pdev, 3); - if (! request_region(pccard_ioaddr, pccard_iolen, DRIVER_NAME)) { - printk(KERN_ERR "orinoco_plx: I/O resource 0x%lx @ 0x%lx busy\n", - pccard_iolen, pccard_ioaddr); - pccard_ioaddr = 0; - err = -EBUSY; - goto fail; - } /* Allocate network device */ - dev = alloc_orinocodev(0, NULL); - if (! dev) { + dev = alloc_orinocodev(sizeof(*card), orinoco_plx_cor_reset); + if (!dev) { + printk(KERN_ERR PFX "Cannot allocate network device\n"); err = -ENOMEM; - goto fail; + goto fail_alloc; } priv = netdev_priv(dev); + card = priv->card; + card->attr_mem = attr_mem; dev->base_addr = pccard_ioaddr; SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); - printk(KERN_DEBUG PFX "Detected Orinoco/Prism2 PLX device " - "at %s irq:%d, io addr:0x%lx\n", pci_name(pdev), pdev->irq, - pccard_ioaddr); - hermes_struct_init(&(priv->hw), dev->base_addr, HERMES_IO, HERMES_16BIT_REGSPACING); pci_set_drvdata(pdev, dev); + printk(KERN_DEBUG PFX "Detected Orinoco/Prism2 PLX device " + "at %s irq:%d, io addr:0x%lx\n", pci_name(pdev), pdev->irq, + pccard_ioaddr); + err = request_irq(pdev->irq, orinoco_interrupt, SA_SHIRQ, dev->name, dev); if (err) { - printk(KERN_ERR PFX "Error allocating IRQ %d.\n", pdev->irq); + printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); err = -EBUSY; - goto fail; + goto fail_irq; } dev->irq = pdev->irq; + /* bjoern: We need to tell the card to enable interrupts, in + case the serial eprom didn't do this already. See the + PLX9052 data book, p8-1 and 8-24 for reference. */ + csr_reg = inl(plx_addr + PLX_INTCSR); + if (!(csr_reg & PLX_INTCSR_INTEN)) { + csr_reg |= PLX_INTCSR_INTEN; + outl(csr_reg, plx_addr + PLX_INTCSR); + csr_reg = inl(plx_addr + PLX_INTCSR); + if (!(csr_reg & PLX_INTCSR_INTEN)) { + printk(KERN_ERR PFX "Cannot enable interrupts\n"); + goto fail; + } + } + + err = orinoco_plx_cor_reset(priv); + if (err) { + printk(KERN_ERR PFX "Initial reset failed\n"); + goto fail; + } + + printk(KERN_DEBUG PFX "CIS: "); + for (i = 0; i < 16; i++) { + printk("%02X:", attr_mem[2 * i]); + } + printk("\n"); + + /* Verify whether a supported PC card is present */ + /* FIXME: we probably need to be smarted about this */ + for (i = 0; i < sizeof(cis_magic); i++) { + if (cis_magic[i] != attr_mem[2 * i]) { + printk(KERN_ERR PFX "The CIS value of Prism2 PC " + "card is unexpected\n"); + err = -EIO; + goto fail; + } + } + err = register_netdev(dev); - if (err) + if (err) { + printk(KERN_ERR PFX "Cannot register network device\n"); goto fail; + } return 0; fail: - printk(KERN_DEBUG PFX "init_one(), FAIL!\n"); + free_irq(pdev->irq, dev); - if (dev) { - if (dev->irq) - free_irq(dev->irq, dev); - - free_orinocodev(dev); - } + fail_irq: + pci_set_drvdata(pdev, NULL); + free_orinocodev(dev); - if (pccard_ioaddr) - release_region(pccard_ioaddr, pccard_iolen); + fail_alloc: + iounmap(attr_mem); - if (attr_mem) - iounmap(attr_mem); + fail_map: + pci_release_regions(pdev); + fail_resources: pci_disable_device(pdev); return err; @@ -290,19 +333,18 @@ static void __devexit orinoco_plx_remove_one(struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); + struct orinoco_private *priv = netdev_priv(dev); + struct orinoco_plx_card *card = priv->card; + u8 *attr_mem = card->attr_mem; BUG_ON(! dev); unregister_netdev(dev); - - if (dev->irq) - free_irq(dev->irq, dev); - + free_irq(dev->irq, dev); pci_set_drvdata(pdev, NULL); - - release_region(pci_resource_start(pdev, 3), pci_resource_len(pdev, 3)); - free_orinocodev(dev); + iounmap(attr_mem); + pci_release_regions(pdev); pci_disable_device(pdev); } @@ -332,6 +374,8 @@ .id_table = orinoco_plx_pci_id_table, .probe = orinoco_plx_init_one, .remove = __devexit_p(orinoco_plx_remove_one), + .suspend = 0, + .resume = 0, }; static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION --- a/drivers/net/wireless/orinoco_tmd.c.7-card-data 2004-10-26 09:52:19.009410192 -0400 +++ b/drivers/net/wireless/orinoco_tmd.c 2004-10-26 10:15:59.469467440 -0400 @@ -79,90 +79,127 @@ #include "orinoco.h" #define COR_VALUE (COR_LEVEL_REQ | COR_FUNC_ENA) /* Enable PC card with interrupt in level trigger */ +#define COR_RESET (0x80) /* reset bit in the COR register */ +#define TMD_RESET_TIME (500) /* milliseconds */ + +/* Orinoco TMD specific data */ +struct orinoco_tmd_card { + u32 tmd_io; +}; + + +/* + * Do a soft reset of the card using the Configuration Option Register + */ +static int orinoco_tmd_cor_reset(struct orinoco_private *priv) +{ + hermes_t *hw = &priv->hw; + struct orinoco_tmd_card *card = priv->card; + u32 addr = card->tmd_io; + unsigned long timeout; + u16 reg; + + outb(COR_VALUE | COR_RESET, addr); + mdelay(1); + + outb(COR_VALUE, addr); + mdelay(1); + + /* Just in case, wait more until the card is no longer busy */ + timeout = jiffies + (TMD_RESET_TIME * HZ / 1000); + reg = hermes_read_regn(hw, CMD); + while (time_before(jiffies, timeout) && (reg & HERMES_CMD_BUSY)) { + mdelay(1); + reg = hermes_read_regn(hw, CMD); + } + + /* Did we timeout ? */ + if (reg & HERMES_CMD_BUSY) { + printk(KERN_ERR PFX "Busy timeout\n"); + return -ETIMEDOUT; + } + + return 0; +} + static int orinoco_tmd_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { int err = 0; - u32 reg, addr; struct orinoco_private *priv = NULL; - unsigned long pccard_ioaddr = 0; - unsigned long pccard_iolen = 0; + struct orinoco_tmd_card *card; struct net_device *dev = NULL; err = pci_enable_device(pdev); - if (err) - return -EIO; - - printk(KERN_DEBUG PFX "TMD setup\n"); - pccard_ioaddr = pci_resource_start(pdev, 2); - pccard_iolen = pci_resource_len(pdev, 2); - if (! request_region(pccard_ioaddr, pccard_iolen, DRIVER_NAME)) { - printk(KERN_ERR PFX "I/O resource at 0x%lx len 0x%lx busy\n", - pccard_ioaddr, pccard_iolen); - pccard_ioaddr = 0; - err = -EBUSY; - goto fail; + if (err) { + printk(KERN_ERR PFX "Cannot enable PCI device\n"); + return -err; } - addr = pci_resource_start(pdev, 1); - outb(COR_VALUE, addr); - mdelay(1); - reg = inb(addr); - if (reg != COR_VALUE) { - printk(KERN_ERR PFX "Error setting TMD COR values %x should be %x\n", reg, COR_VALUE); - err = -EIO; - goto fail; + + err = pci_request_regions(pdev, DRIVER_NAME); + if (err != 0) { + printk(KERN_ERR PFX "Cannot obtain PCI resources\n"); + goto fail_resources; } /* Allocate network device */ - dev = alloc_orinocodev(0, NULL); + dev = alloc_orinocodev(sizeof(*card), orinoco_tmd_cor_reset); if (! dev) { + printk(KERN_ERR PFX "Cannot allocate network device\n"); err = -ENOMEM; - goto fail; + goto fail_alloc; } priv = netdev_priv(dev); - dev->base_addr = pccard_ioaddr; + card = priv->card; + card->tmd_io = pci_resource_start(pdev, 1); + dev->base_addr = pci_resource_start(pdev, 2); SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); - printk(KERN_DEBUG PFX "Detected Orinoco/Prism2 TMD device " - "at %s irq:%d, io addr:0x%lx\n", pci_name(pdev), pdev->irq, - pccard_ioaddr); - hermes_struct_init(&(priv->hw), dev->base_addr, HERMES_IO, HERMES_16BIT_REGSPACING); pci_set_drvdata(pdev, dev); + printk(KERN_DEBUG PFX "Detected Orinoco/Prism2 TMD device " + "at %s irq:%d, io addr:0x%lx\n", pci_name(pdev), pdev->irq, + dev->base_addr); + err = request_irq(pdev->irq, orinoco_interrupt, SA_SHIRQ, dev->name, dev); if (err) { - printk(KERN_ERR PFX "Error allocating IRQ %d.\n", - pdev->irq); + printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); err = -EBUSY; - goto fail; + goto fail_irq; } dev->irq = pdev->irq; + err = orinoco_tmd_cor_reset(priv); + if (err) { + printk(KERN_ERR PFX "Initial reset failed\n"); + goto fail; + } + err = register_netdev(dev); - if (err) + if (err) { + printk(KERN_ERR PFX "Cannot register network device\n"); goto fail; + } return 0; fail: - printk(KERN_DEBUG PFX "init_one(), FAIL!\n"); + free_irq(pdev->irq, dev); - if (dev) { - if (dev->irq) - free_irq(dev->irq, dev); - - free_orinocodev(dev); - } + fail_irq: + pci_set_drvdata(pdev, NULL); + free_orinocodev(dev); - if (pccard_ioaddr) - release_region(pccard_ioaddr, pccard_iolen); + fail_alloc: + pci_release_regions(pdev); + fail_resources: pci_disable_device(pdev); return err; @@ -175,15 +212,10 @@ BUG_ON(! dev); unregister_netdev(dev); - - if (dev->irq) - free_irq(dev->irq, dev); - + free_irq(dev->irq, dev); pci_set_drvdata(pdev, NULL); - - release_region(pci_resource_start(pdev, 2), pci_resource_len(pdev, 2)); - free_orinocodev(dev); + pci_release_regions(pdev); pci_disable_device(pdev); } @@ -200,6 +232,8 @@ .id_table = orinoco_tmd_pci_id_table, .probe = orinoco_tmd_init_one, .remove = __devexit_p(orinoco_tmd_remove_one), + .suspend = 0, + .resume = 0, }; static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION From shemminger@osdl.org Tue Oct 26 11:57:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 11:57:55 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QIvomb022673 for ; Tue, 26 Oct 2004 11:57:51 -0700 Received: from guest-251-240.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9QIvOWL032484 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Tue, 26 Oct 2004 11:57:24 -0700 Date: Tue, 26 Oct 2004 11:58:50 -0700 From: Stephen Hemminger To: Jeff Garzik , John Ronciak , Ganesh Venkatesan Cc: netdev@oss.sgi.com Subject: e100 driver startup problem Message-Id: <20041026115850.7b981aac@guest-251-240.pdx.osdl.net> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10855 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 Content-Length: 339 Lines: 7 Something changed recently in the e100 driver. On my SuSe 9.1 driver it no longer automatically brings up the networking on the e100 (it did before). The change happened in the latest e100 driver that went in after 2.6.9. I can start network manually and it appears to be an e100 specific problem because other ethernet card comes okay. From davem@davemloft.net Tue Oct 26 12:03:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 12:03:53 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QJ3mpc023223 for ; Tue, 26 Oct 2004 12:03:48 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CMWU8-00023Z-00; Tue, 26 Oct 2004 11:55:56 -0700 Date: Tue, 26 Oct 2004 11:55:55 -0700 From: "David S. Miller" To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: Re: [BK PATCHES] misc tg3 stuff Message-Id: <20041026115555.390fcbbb.davem@davemloft.net> In-Reply-To: <20041026165955.GA27136@havoc.gtf.org> References: <20041026165955.GA27136@havoc.gtf.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10856 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 506 Lines: 18 On Tue, 26 Oct 2004 12:59:55 -0400 Jeff Garzik wrote: > Please do a > > bk pull bk://kernel.bkbits.net/jgarzik/tg3-2.6 > > This will update the following files: > > drivers/net/tg3.c | 22 +++++++++++----------- > 1 files changed, 11 insertions(+), 11 deletions(-) Your attached patch was full of e100 stuff and many other totally unrelated changes, there were even crypto layer diffs in there as well :-) When you do range diffs with bitkeeper you have to be really careful. From dcbw@redhat.com Tue Oct 26 12:04:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 12:05:01 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QJ4tqM023556 for ; Tue, 26 Oct 2004 12:04:55 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9QJ4Rof019446; Tue, 26 Oct 2004 15:04:27 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9QJ4Qr06948; Tue, 26 Oct 2004 15:04:26 -0400 Received: from dcbw.boston.redhat.com (dcbw.boston.redhat.com [172.16.80.23]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9QJ4PPd015251; Tue, 26 Oct 2004 15:04:25 -0400 Subject: R[PATCH 2.6.10-rc1 8/15] wireless/orinoco: Refactor spinlocks so we don't necessarily have to disable interrupts From: Dan Williams To: netdev@oss.sgi.com Cc: jgarzik@redhat.com, hermes@gibson.dropbear.id.au In-Reply-To: <1098814320.3663.24.camel@dcbw.boston.redhat.com> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> Content-Type: text/plain Date: Tue, 26 Oct 2004 15:04:32 -0400 Message-Id: <1098817472.3663.66.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-1) Content-Transfer-Encoding: 7bit X-archive-position: 10857 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcbw@redhat.com Precedence: bulk X-list: netdev Content-Length: 3718 Lines: 137 Update in-kernel orinoco wireless drivers to upstream CVS. None of this is original code by Dan Williams, simply a broken down patch set split-out from upstream orinoco CVS. o Refactor spinlocks so we don't necessarily have to disable interrupts Signed-off-by: Dan Williams --- a/drivers/net/wireless/orinoco.h.8-orinoco-spinlock 2004-10-26 10:44:41.445687264 -0400 +++ b/drivers/net/wireless/orinoco.h 2004-10-26 10:45:39.296892544 -0400 @@ -71,6 +71,8 @@ u16 channel_mask; int broken_disableport; + unsigned int irq_no_disable:1; + /* Configuration paramaters */ u32 iw_mode; int prefer_port3; @@ -129,11 +131,17 @@ extern inline int orinoco_lock(struct orinoco_private *priv, unsigned long *flags) { - spin_lock_irqsave(&priv->lock, *flags); + if (priv->irq_no_disable) + spin_lock_bh(&priv->lock); + else + spin_lock_irqsave(&priv->lock, *flags); if (priv->hw_unavailable) { - printk(KERN_DEBUG "orinoco_lock() called with hw_unavailable (dev=%p)\n", + DEBUG(1, "orinoco_lock() called with hw_unavailable (dev=%p)\n", priv->ndev); - spin_unlock_irqrestore(&priv->lock, *flags); + if (priv->irq_no_disable) + spin_unlock_bh(&priv->lock); + else + spin_unlock_irqrestore(&priv->lock, *flags); return -EBUSY; } return 0; @@ -142,7 +150,27 @@ extern inline void orinoco_unlock(struct orinoco_private *priv, unsigned long *flags) { - spin_unlock_irqrestore(&priv->lock, *flags); + if (priv->irq_no_disable) + spin_unlock_bh(&priv->lock); + else + spin_unlock_irqrestore(&priv->lock, *flags); +} + +extern inline void orinoco_spin_lock(struct orinoco_private *priv) +{ + if (priv->irq_no_disable) + spin_lock_bh(&priv->lock); + else + spin_lock_irq(&priv->lock); } +extern inline void orinoco_spin_unlock(struct orinoco_private *priv) +{ + if (priv->irq_no_disable) + spin_unlock_bh(&priv->lock); + else + spin_unlock_irq(&priv->lock); +} + + #endif /* _ORINOCO_H */ --- a/drivers/net/wireless/orinoco.c.8-orinoco-spinlock 2004-10-26 10:44:41.444687416 -0400 +++ b/drivers/net/wireless/orinoco.c 2004-10-26 10:45:39.301891784 -0400 @@ -699,13 +699,13 @@ /* We mustn't use orinoco_lock() here, because we need to be able to close the interface even if hw_unavailable is set (e.g. as we're released after a PC Card removal) */ - spin_lock_irq(&priv->lock); + orinoco_spin_lock(priv); priv->open = 0; err = __orinoco_down(dev); - spin_unlock_irq(&priv->lock); + orinoco_spin_unlock(priv); return err; } @@ -1966,7 +1966,7 @@ return; } - spin_lock_irq(&priv->lock); /* This has to be called from user context */ + orinoco_spin_lock(priv); /* This has to be called from user context */ priv->hw_unavailable--; @@ -1981,7 +1981,7 @@ dev->trans_start = jiffies; } - spin_unlock_irq(&priv->lock); + orinoco_spin_unlock(priv); return; } @@ -2404,9 +2404,9 @@ /* Make the hardware available, as long as it hasn't been * removed elsewhere (e.g. by PCMCIA hot unplug) */ - spin_lock_irq(&priv->lock); + orinoco_spin_lock(priv); priv->hw_unavailable--; - spin_unlock_irq(&priv->lock); + orinoco_spin_unlock(priv); printk(KERN_DEBUG "%s: ready\n", dev->name); --- ./orinoco_cs.c.8-orinoco-spinlock 2004-10-26 10:44:41.440688024 -0400 +++ ./orinoco_cs.c 2004-10-26 10:45:39.303891480 -0400 @@ -513,12 +513,12 @@ case CS_EVENT_CARD_REMOVAL: link->state &= ~DEV_PRESENT; if (link->state & DEV_CONFIG) { - orinoco_lock(priv, &flags); + unsigned long flags; + spin_lock_irqsave(&priv->lock, flags); netif_device_detach(dev); priv->hw_unavailable++; - - orinoco_unlock(priv, &flags); + spin_unlock_irqrestore(&priv->lock, flags); } break; From dcbw@redhat.com Tue Oct 26 12:07:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 12:07:21 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QJ7GG1023990 for ; Tue, 26 Oct 2004 12:07:16 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9QJ6uol020223; Tue, 26 Oct 2004 15:06:56 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9QJ6ur07931; Tue, 26 Oct 2004 15:06:56 -0400 Received: from dcbw.boston.redhat.com (dcbw.boston.redhat.com [172.16.80.23]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9QJ6sPd015542; Tue, 26 Oct 2004 15:06:54 -0400 Subject: [PATCH 2.6.10-rc1 9/15] wireless/orinoco: Remove dump_recs in preparation for a more flexible replacement From: Dan Williams To: netdev@oss.sgi.com Cc: jgarzik@redhat.com, hermes@gibson.dropbear.id.au In-Reply-To: <1098814320.3663.24.camel@dcbw.boston.redhat.com> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> Content-Type: text/plain Date: Tue, 26 Oct 2004 15:07:01 -0400 Message-Id: <1098817621.3663.70.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-1) Content-Transfer-Encoding: 7bit X-archive-position: 10858 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcbw@redhat.com Precedence: bulk X-list: netdev Content-Length: 6728 Lines: 222 Update in-kernel orinoco wireless drivers to upstream CVS. None of this is original code by Dan Williams, simply a broken down patch set split-out from upstream orinoco CVS. o Remove dump_recs in preparation for a more flexible replacement Signed-off-by: Dan Williams --- a/drivers/net/wireless/orinoco.c.9-no-debug-dump-recs 2004-10-26 10:30:12.685758848 -0400 +++ b/drivers/net/wireless/orinoco.c 2004-10-26 10:33:04.220681576 -0400 @@ -639,7 +639,6 @@ static int orinoco_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); static int __orinoco_program_rids(struct net_device *dev); static void __orinoco_set_multicast_list(struct net_device *dev); -static int orinoco_debug_dump_recs(struct net_device *dev); /********************************************************************/ /* Internal helper functions */ @@ -3976,13 +3975,6 @@ err = orinoco_ioctl_getibssport(dev, wrq); break; - case SIOCIWLASTPRIV: - err = orinoco_debug_dump_recs(dev); - if (err) - printk(KERN_ERR "%s: Unable to dump records (%d)\n", - dev->name, err); - break; - default: err = -EOPNOTSUPP; @@ -3997,187 +3989,6 @@ return err; } -struct { - u16 rid; - char *name; - int displaytype; -#define DISPLAY_WORDS 0 -#define DISPLAY_BYTES 1 -#define DISPLAY_STRING 2 -#define DISPLAY_XSTRING 3 -} record_table[] = { -#define DEBUG_REC(name,type) { HERMES_RID_##name, #name, DISPLAY_##type } - DEBUG_REC(CNFPORTTYPE,WORDS), - DEBUG_REC(CNFOWNMACADDR,BYTES), - DEBUG_REC(CNFDESIREDSSID,STRING), - DEBUG_REC(CNFOWNCHANNEL,WORDS), - DEBUG_REC(CNFOWNSSID,STRING), - DEBUG_REC(CNFOWNATIMWINDOW,WORDS), - DEBUG_REC(CNFSYSTEMSCALE,WORDS), - DEBUG_REC(CNFMAXDATALEN,WORDS), - DEBUG_REC(CNFPMENABLED,WORDS), - DEBUG_REC(CNFPMEPS,WORDS), - DEBUG_REC(CNFMULTICASTRECEIVE,WORDS), - DEBUG_REC(CNFMAXSLEEPDURATION,WORDS), - DEBUG_REC(CNFPMHOLDOVERDURATION,WORDS), - DEBUG_REC(CNFOWNNAME,STRING), - DEBUG_REC(CNFOWNDTIMPERIOD,WORDS), - DEBUG_REC(CNFMULTICASTPMBUFFERING,WORDS), - DEBUG_REC(CNFWEPENABLED_AGERE,WORDS), - DEBUG_REC(CNFMANDATORYBSSID_SYMBOL,WORDS), - DEBUG_REC(CNFWEPDEFAULTKEYID,WORDS), - DEBUG_REC(CNFDEFAULTKEY0,BYTES), - DEBUG_REC(CNFDEFAULTKEY1,BYTES), - DEBUG_REC(CNFMWOROBUST_AGERE,WORDS), - DEBUG_REC(CNFDEFAULTKEY2,BYTES), - DEBUG_REC(CNFDEFAULTKEY3,BYTES), - DEBUG_REC(CNFWEPFLAGS_INTERSIL,WORDS), - DEBUG_REC(CNFWEPKEYMAPPINGTABLE,WORDS), - DEBUG_REC(CNFAUTHENTICATION,WORDS), - DEBUG_REC(CNFMAXASSOCSTA,WORDS), - DEBUG_REC(CNFKEYLENGTH_SYMBOL,WORDS), - DEBUG_REC(CNFTXCONTROL,WORDS), - DEBUG_REC(CNFROAMINGMODE,WORDS), - DEBUG_REC(CNFHOSTAUTHENTICATION,WORDS), - DEBUG_REC(CNFRCVCRCERROR,WORDS), - DEBUG_REC(CNFMMLIFE,WORDS), - DEBUG_REC(CNFALTRETRYCOUNT,WORDS), - DEBUG_REC(CNFBEACONINT,WORDS), - DEBUG_REC(CNFAPPCFINFO,WORDS), - DEBUG_REC(CNFSTAPCFINFO,WORDS), - DEBUG_REC(CNFPRIORITYQUSAGE,WORDS), - DEBUG_REC(CNFTIMCTRL,WORDS), - DEBUG_REC(CNFTHIRTY2TALLY,WORDS), - DEBUG_REC(CNFENHSECURITY,WORDS), - DEBUG_REC(CNFGROUPADDRESSES,BYTES), - DEBUG_REC(CNFCREATEIBSS,WORDS), - DEBUG_REC(CNFFRAGMENTATIONTHRESHOLD,WORDS), - DEBUG_REC(CNFRTSTHRESHOLD,WORDS), - DEBUG_REC(CNFTXRATECONTROL,WORDS), - DEBUG_REC(CNFPROMISCUOUSMODE,WORDS), - DEBUG_REC(CNFBASICRATES_SYMBOL,WORDS), - DEBUG_REC(CNFPREAMBLE_SYMBOL,WORDS), - DEBUG_REC(CNFSHORTPREAMBLE,WORDS), - DEBUG_REC(CNFWEPKEYS_AGERE,BYTES), - DEBUG_REC(CNFEXCLUDELONGPREAMBLE,WORDS), - DEBUG_REC(CNFTXKEY_AGERE,WORDS), - DEBUG_REC(CNFAUTHENTICATIONRSPTO,WORDS), - DEBUG_REC(CNFBASICRATES,WORDS), - DEBUG_REC(CNFSUPPORTEDRATES,WORDS), - DEBUG_REC(CNFTICKTIME,WORDS), - DEBUG_REC(CNFSCANREQUEST,WORDS), - DEBUG_REC(CNFJOINREQUEST,WORDS), - DEBUG_REC(CNFAUTHENTICATESTATION,WORDS), - DEBUG_REC(CNFCHANNELINFOREQUEST,WORDS), - DEBUG_REC(MAXLOADTIME,WORDS), - DEBUG_REC(DOWNLOADBUFFER,WORDS), - DEBUG_REC(PRIID,WORDS), - DEBUG_REC(PRISUPRANGE,WORDS), - DEBUG_REC(CFIACTRANGES,WORDS), - DEBUG_REC(NICSERNUM,XSTRING), - DEBUG_REC(NICID,WORDS), - DEBUG_REC(MFISUPRANGE,WORDS), - DEBUG_REC(CFISUPRANGE,WORDS), - DEBUG_REC(CHANNELLIST,WORDS), - DEBUG_REC(REGULATORYDOMAINS,WORDS), - DEBUG_REC(TEMPTYPE,WORDS), -/* DEBUG_REC(CIS,BYTES), */ - DEBUG_REC(STAID,WORDS), - DEBUG_REC(CURRENTSSID,STRING), - DEBUG_REC(CURRENTBSSID,BYTES), - DEBUG_REC(COMMSQUALITY,WORDS), - DEBUG_REC(CURRENTTXRATE,WORDS), - DEBUG_REC(CURRENTBEACONINTERVAL,WORDS), - DEBUG_REC(CURRENTSCALETHRESHOLDS,WORDS), - DEBUG_REC(PROTOCOLRSPTIME,WORDS), - DEBUG_REC(SHORTRETRYLIMIT,WORDS), - DEBUG_REC(LONGRETRYLIMIT,WORDS), - DEBUG_REC(MAXTRANSMITLIFETIME,WORDS), - DEBUG_REC(MAXRECEIVELIFETIME,WORDS), - DEBUG_REC(CFPOLLABLE,WORDS), - DEBUG_REC(AUTHENTICATIONALGORITHMS,WORDS), - DEBUG_REC(PRIVACYOPTIONIMPLEMENTED,WORDS), - DEBUG_REC(OWNMACADDR,BYTES), - DEBUG_REC(SCANRESULTSTABLE,WORDS), - DEBUG_REC(PHYTYPE,WORDS), - DEBUG_REC(CURRENTCHANNEL,WORDS), - DEBUG_REC(CURRENTPOWERSTATE,WORDS), - DEBUG_REC(CCAMODE,WORDS), - DEBUG_REC(SUPPORTEDDATARATES,WORDS), - DEBUG_REC(BUILDSEQ,BYTES), - DEBUG_REC(FWID,XSTRING) -#undef DEBUG_REC -}; - -#define DEBUG_LTV_SIZE 128 - -static int orinoco_debug_dump_recs(struct net_device *dev) -{ - struct orinoco_private *priv = netdev_priv(dev); - hermes_t *hw = &priv->hw; - u8 *val8; - u16 *val16; - int i,j; - u16 length; - int err; - - /* I'm not sure: we might have a lock here, so we'd better go - atomic, just in case. */ - val8 = kmalloc(DEBUG_LTV_SIZE + 2, GFP_ATOMIC); - if (! val8) - return -ENOMEM; - val16 = (u16 *)val8; - - for (i = 0; i < ARRAY_SIZE(record_table); i++) { - u16 rid = record_table[i].rid; - int len; - - memset(val8, 0, DEBUG_LTV_SIZE + 2); - - err = hermes_read_ltv(hw, USER_BAP, rid, DEBUG_LTV_SIZE, - &length, val8); - if (err) { - DEBUG(0, "Error %d reading RID 0x%04x\n", err, rid); - continue; - } - val16 = (u16 *)val8; - if (length == 0) - continue; - - printk(KERN_DEBUG "%-15s (0x%04x): length=%d (%d bytes)\tvalue=", - record_table[i].name, - rid, length, (length-1)*2); - len = min(((int)length-1)*2, DEBUG_LTV_SIZE); - - switch (record_table[i].displaytype) { - case DISPLAY_WORDS: - for (j = 0; j < len / 2; j++) - printk("%04X-", le16_to_cpu(val16[j])); - break; - - case DISPLAY_BYTES: - default: - for (j = 0; j < len; j++) - printk("%02X:", val8[j]); - break; - - case DISPLAY_STRING: - len = min(len, le16_to_cpu(val16[0])+2); - val8[len] = '\0'; - printk("\"%s\"", (char *)&val16[1]); - break; - - case DISPLAY_XSTRING: - printk("'%s'", (char *)val8); - } - - printk("\n"); - } - - kfree(val8); - - return 0; -} /********************************************************************/ /* Debugging */ From dcbw@redhat.com Tue Oct 26 12:14:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 12:14:15 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QJE4qd024444 for ; Tue, 26 Oct 2004 12:14:04 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9QJDgdd022187; Tue, 26 Oct 2004 15:13:42 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9QJDfr10243; Tue, 26 Oct 2004 15:13:41 -0400 Received: from dcbw.boston.redhat.com (dcbw.boston.redhat.com [172.16.80.23]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9QJDdPd016239; Tue, 26 Oct 2004 15:13:39 -0400 Subject: [PATCH 2.6.10-rc1 10/15] wireless/orinoco: Use wireless handlers rather than ioctl()s From: Dan Williams To: netdev@oss.sgi.com Cc: jgarzik@redhat.com, hermes@gibson.dropbear.id.au In-Reply-To: <1098814320.3663.24.camel@dcbw.boston.redhat.com> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> Content-Type: text/plain Date: Tue, 26 Oct 2004 15:13:45 -0400 Message-Id: <1098818025.3663.78.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-1) Content-Transfer-Encoding: 7bit X-archive-position: 10859 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcbw@redhat.com Precedence: bulk X-list: netdev Content-Length: 72199 Lines: 2707 Update in-kernel orinoco wireless drivers to upstream CVS. None of this is original code by Dan Williams, simply a broken down patch set split-out from upstream orinoco CVS. o Convert to use wireless handler API rather than ioctl() calls. o Clean up the locking and return -EBUSY if we can't lock the device o Move some of our driver private data into bitfields rather than 'int's o Add more flexible get_rid() debug method in place of dump_recs Signed-off-by: Dan Williams --- a/drivers/net/wireless/orinoco.c.10-wireless-handlers 2004-10-26 11:06:54.294063512 -0400 +++ b/drivers/net/wireless/orinoco.c 2004-10-26 12:55:37.443394080 -0400 @@ -495,6 +495,9 @@ #include #include #include +#if WIRELESS_EXT > 12 +#include +#endif /* WIRELESS_EXT > 12 */ #include #include @@ -569,6 +572,12 @@ | HERMES_EV_WTERR | HERMES_EV_INFO \ | HERMES_EV_INFDROP ) +#define MAX_RID_LEN 1024 + +#if WIRELESS_EXT > 12 +static const struct iw_handler_def orinoco_handler_def; +#endif + /********************************************************************/ /* Data tables */ /********************************************************************/ @@ -676,9 +685,8 @@ unsigned long flags; int err; - err = orinoco_lock(priv, &flags); - if (err) - return err; + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; err = __orinoco_up(dev); @@ -721,7 +729,7 @@ struct orinoco_private *priv = netdev_priv(dev); hermes_t *hw = &priv->hw; struct iw_statistics *wstats = &priv->wstats; - int err = 0; + int err; unsigned long flags; if (! netif_device_present(dev)) { @@ -730,10 +738,17 @@ return NULL; /* FIXME: Can we do better than this? */ } - err = orinoco_lock(priv, &flags); - if (err) - return NULL; /* FIXME: Erg, we've been signalled, how - * do we propagate this back up? */ + /* If busy, return the old stats. Returning NULL may cause + * the interface to disappear from /proc/net/wireless */ + if (orinoco_lock(priv, &flags) != 0) + return wstats; + + /* We can't really wait for the tallies inquiry command to + * complete, so we just use the previous results and trigger + * a new tallies inquiry command for next time - Jean II */ + /* FIXME: We're in user context (I think?), so we should just + wait for the tallies to come through */ + hermes_inquire(hw, HERMES_INQ_TALLIES); if (priv->iw_mode == IW_MODE_ADHOC) { memset(&wstats->qual, 0, sizeof(wstats->qual)); @@ -752,25 +767,16 @@ err = HERMES_READ_RECORD(hw, USER_BAP, HERMES_RID_COMMSQUALITY, &cq); - - wstats->qual.qual = (int)le16_to_cpu(cq.qual); - wstats->qual.level = (int)le16_to_cpu(cq.signal) - 0x95; - wstats->qual.noise = (int)le16_to_cpu(cq.noise) - 0x95; - wstats->qual.updated = 7; + + if (!err) { + wstats->qual.qual = (int)le16_to_cpu(cq.qual); + wstats->qual.level = (int)le16_to_cpu(cq.signal) - 0x95; + wstats->qual.noise = (int)le16_to_cpu(cq.noise) - 0x95; + wstats->qual.updated = 7; + } } - /* We can't really wait for the tallies inquiry command to - * complete, so we just use the previous results and trigger - * a new tallies inquiry command for next time - Jean II */ - /* FIXME: We're in user context (I think?), so we should just - wait for the tallies to come through */ - err = hermes_inquire(hw, HERMES_INQ_TALLIES); - orinoco_unlock(priv, &flags); - - if (err) - return NULL; - return wstats; } @@ -1493,55 +1499,76 @@ return err; } -static int __orinoco_hw_setup_wep(struct orinoco_private *priv) +/* Set fixed AP address */ +static int __orinoco_hw_set_wap(struct orinoco_private *priv) +{ + int roaming_flag; + int err = 0; + hermes_t *hw = &priv->hw; + + switch (priv->firmware_type) { + case FIRMWARE_TYPE_AGERE: + /* not supported */ + break; + case FIRMWARE_TYPE_INTERSIL: + if (priv->bssid_fixed) + roaming_flag = 2; + else + roaming_flag = 1; + + err = hermes_write_wordrec(hw, USER_BAP, + HERMES_RID_CNFROAMINGMODE, + roaming_flag); + break; + case FIRMWARE_TYPE_SYMBOL: + err = HERMES_WRITE_RECORD(hw, USER_BAP, + HERMES_RID_CNFMANDATORYBSSID_SYMBOL, + &priv->desired_bssid); + break; + } + return err; +} + +/* Change the WEP keys and/or the current keys. Can be called + * either from __orinoco_hw_setup_wep() or directly from + * orinoco_ioctl_setiwencode(). In the later case the association + * with the AP is not broken (if the firmware can handle it), + * which is needed for 802.1x implementations. */ +static int __orinoco_hw_setup_wepkeys(struct orinoco_private *priv) { hermes_t *hw = &priv->hw; int err = 0; - int master_wep_flag; - int auth_flag; switch (priv->firmware_type) { - case FIRMWARE_TYPE_AGERE: /* Agere style WEP */ - if (priv->wep_on) { - err = hermes_write_wordrec(hw, USER_BAP, - HERMES_RID_CNFTXKEY_AGERE, - priv->tx_key); - if (err) - return err; - - err = HERMES_WRITE_RECORD(hw, USER_BAP, - HERMES_RID_CNFWEPKEYS_AGERE, - &priv->keys); - if (err) - return err; - } + case FIRMWARE_TYPE_AGERE: + err = HERMES_WRITE_RECORD(hw, USER_BAP, + HERMES_RID_CNFWEPKEYS_AGERE, + &priv->keys); + if (err) + return err; err = hermes_write_wordrec(hw, USER_BAP, - HERMES_RID_CNFWEPENABLED_AGERE, - priv->wep_on); + HERMES_RID_CNFTXKEY_AGERE, + priv->tx_key); if (err) return err; break; - - case FIRMWARE_TYPE_INTERSIL: /* Intersil style WEP */ - case FIRMWARE_TYPE_SYMBOL: /* Symbol style WEP */ - master_wep_flag = 0; /* Off */ - if (priv->wep_on) { + case FIRMWARE_TYPE_INTERSIL: + case FIRMWARE_TYPE_SYMBOL: + { int keylen; int i; - /* Fudge around firmware weirdness */ + /* Force uniform key length to work around firmware bugs */ keylen = le16_to_cpu(priv->keys[priv->tx_key].len); + if (keylen > LARGE_KEY_SIZE) { + printk(KERN_ERR "%s: BUG: Key %d has oversize length %d.\n", + priv->ndev->name, priv->tx_key, keylen); + return -E2BIG; + } + /* Write all 4 keys */ for(i = 0; i < ORINOCO_MAX_KEYS; i++) { -/* int keylen = le16_to_cpu(priv->keys[i].len); */ - - if (keylen > LARGE_KEY_SIZE) { - printk(KERN_ERR "%s: BUG: Key %d has oversize length %d.\n", - priv->ndev->name, i, keylen); - return -E2BIG; - } - err = hermes_write_ltv(hw, USER_BAP, HERMES_RID_CNFDEFAULTKEY0 + i, HERMES_BYTES_TO_RECLEN(keylen), @@ -1556,27 +1583,60 @@ priv->tx_key); if (err) return err; - - if (priv->wep_restrict) { - auth_flag = 2; - master_wep_flag = 3; - } else { - /* Authentication is where Intersil and Symbol - * firmware differ... */ - auth_flag = 1; - if (priv->firmware_type == FIRMWARE_TYPE_SYMBOL) - master_wep_flag = 3; /* Symbol */ - else - master_wep_flag = 1; /* Intersil */ - } + } + break; + } + + return 0; +} + +static int __orinoco_hw_setup_wep(struct orinoco_private *priv) +{ + hermes_t *hw = &priv->hw; + int err = 0; + int master_wep_flag; + int auth_flag; + + if (priv->wep_on) + __orinoco_hw_setup_wepkeys(priv); + + if (priv->wep_restrict) + auth_flag = HERMES_AUTH_SHARED_KEY; + else + auth_flag = HERMES_AUTH_OPEN; + + switch (priv->firmware_type) { + case FIRMWARE_TYPE_AGERE: /* Agere style WEP */ + if (priv->wep_on) { + /* Enable the shared-key authentication. */ + err = hermes_write_wordrec(hw, USER_BAP, + HERMES_RID_CNFAUTHENTICATION_AGERE, + auth_flag); + } + err = hermes_write_wordrec(hw, USER_BAP, + HERMES_RID_CNFWEPENABLED_AGERE, + priv->wep_on); + if (err) + return err; + break; + case FIRMWARE_TYPE_INTERSIL: /* Intersil style WEP */ + case FIRMWARE_TYPE_SYMBOL: /* Symbol style WEP */ + if (priv->wep_on) { + if (priv->wep_restrict || + (priv->firmware_type == FIRMWARE_TYPE_SYMBOL)) + master_wep_flag = HERMES_WEP_PRIVACY_INVOKED | + HERMES_WEP_EXCL_UNENCRYPTED; + else + master_wep_flag = HERMES_WEP_PRIVACY_INVOKED; err = hermes_write_wordrec(hw, USER_BAP, HERMES_RID_CNFAUTHENTICATION, auth_flag); if (err) return err; - } + } else + master_wep_flag = 0; /* Master WEP setting : on/off */ err = hermes_write_wordrec(hw, USER_BAP, @@ -1586,13 +1646,6 @@ return err; break; - - default: - if (priv->wep_on) { - printk(KERN_ERR "%s: WEP enabled, although not supported!\n", - priv->ndev->name); - return -EINVAL; - } } return 0; @@ -1623,38 +1676,49 @@ return err; } /* Set the channel/frequency */ - if (priv->channel == 0) { - printk(KERN_DEBUG "%s: Channel is 0 in __orinoco_program_rids()\n", dev->name); - if (priv->createibss) - priv->channel = 10; - } - err = hermes_write_wordrec(hw, USER_BAP, HERMES_RID_CNFOWNCHANNEL, - priv->channel); - if (err) { - printk(KERN_ERR "%s: Error %d setting channel\n", - dev->name, err); - return err; - } - - if (priv->has_ibss) { + if (priv->channel != 0 && priv->iw_mode != IW_MODE_INFRA) { err = hermes_write_wordrec(hw, USER_BAP, - HERMES_RID_CNFCREATEIBSS, - priv->createibss); + HERMES_RID_CNFOWNCHANNEL, + priv->channel); if (err) { - printk(KERN_ERR "%s: Error %d setting CREATEIBSS\n", dev->name, err); + printk(KERN_ERR "%s: Error %d setting channel %d\n", + dev->name, err, priv->channel); return err; } + } + + if (priv->has_ibss) { + u16 createibss; - if ((strlen(priv->desired_essid) == 0) && (priv->createibss) - && (!priv->has_ibss_any)) { + if ((strlen(priv->desired_essid) == 0) && (priv->createibss)) { printk(KERN_WARNING "%s: This firmware requires an " "ESSID in IBSS-Ad-Hoc mode.\n", dev->name); /* With wvlan_cs, in this case, we would crash. * hopefully, this driver will behave better... * Jean II */ + createibss = 0; + } else { + createibss = priv->createibss; + } + + err = hermes_write_wordrec(hw, USER_BAP, + HERMES_RID_CNFCREATEIBSS, + createibss); + if (err) { + printk(KERN_ERR "%s: Error %d setting CREATEIBSS\n", + dev->name, err); + return err; } } + /* Set the desired BSSID */ + err = __orinoco_hw_set_wap(priv); + if (err) { + printk(KERN_ERR "%s: Error %d setting AP address\n", + dev->name, err); + return err; + } + /* Set the desired ESSID */ idbuf.len = cpu_to_le16(strlen(priv->desired_essid)); memcpy(&idbuf.val, priv->desired_essid, sizeof(idbuf.val)); @@ -1869,57 +1933,6 @@ dev->flags &= ~IFF_PROMISC; } -static int orinoco_reconfigure(struct net_device *dev) -{ - struct orinoco_private *priv = netdev_priv(dev); - struct hermes *hw = &priv->hw; - unsigned long flags; - int err = 0; - - if (priv->broken_disableport) { - schedule_work(&priv->reset_work); - return 0; - } - - err = orinoco_lock(priv, &flags); - if (err) - return err; - - - err = hermes_disable_port(hw, 0); - if (err) { - printk(KERN_WARNING "%s: Unable to disable port while reconfiguring card\n", - dev->name); - priv->broken_disableport = 1; - goto out; - } - - err = __orinoco_program_rids(dev); - if (err) { - printk(KERN_WARNING "%s: Unable to reconfigure card\n", - dev->name); - goto out; - } - - err = hermes_enable_port(hw, 0); - if (err) { - printk(KERN_WARNING "%s: Unable to enable port while reconfiguring card\n", - dev->name); - goto out; - } - - out: - if (err) { - printk(KERN_WARNING "%s: Resetting instead...\n", dev->name); - schedule_work(&priv->reset_work); - err = 0; - } - - orinoco_unlock(priv, &flags); - return err; - -} - /* This must be called from user context, without locks held - use * schedule_work() */ static void orinoco_reset(struct net_device *dev) @@ -1929,8 +1942,7 @@ int err; unsigned long flags; - err = orinoco_lock(priv, &flags); - if (err) + if (orinoco_lock(priv, &flags) != 0) /* When the hardware becomes available again, whatever * detects that is responsible for re-initializing * it. So no need for anything further */ @@ -1949,20 +1961,20 @@ orinoco_unlock(priv, &flags); - if (priv->hard_reset) + if (priv->hard_reset) { err = (*priv->hard_reset)(priv); - if (err) { - printk(KERN_ERR "%s: orinoco_reset: Error %d " - "performing hard reset\n", dev->name, err); - /* FIXME: shutdown of some sort */ - return; + if (err) { + printk(KERN_ERR "%s: orinoco_reset: Error %d " + "performing hard reset\n", dev->name, err); + goto disable; + } } err = orinoco_reinit_firmware(dev); if (err) { printk(KERN_ERR "%s: orinoco_reset: Error %d re-initializing firmware\n", dev->name, err); - return; + goto disable; } orinoco_spin_lock(priv); /* This has to be called from user context */ @@ -1983,6 +1995,11 @@ orinoco_spin_unlock(priv); return; + + disable: + hermes_set_irqmask(hw, 0); + netif_device_detach(dev); + printk(KERN_ERR "%s: Device has been disabled!\n", dev->name); } /********************************************************************/ @@ -2133,7 +2150,6 @@ priv->has_preamble = 0; priv->has_port3 = 1; priv->has_ibss = 1; - priv->has_ibss_any = 0; priv->has_wep = 0; priv->has_big_wep = 0; @@ -2149,7 +2165,6 @@ firmver = ((unsigned long)sta_id.major << 16) | sta_id.minor; priv->has_ibss = (firmver >= 0x60006); - priv->has_ibss_any = (firmver >= 0x60010); priv->has_wep = (firmver >= 0x40020); priv->has_big_wep = 1; /* FIXME: this is wrong - how do we tell Gold cards from the others? */ @@ -2426,7 +2441,7 @@ priv = netdev_priv(dev); priv->ndev = dev; if (sizeof_card) - priv->card = (void *)((unsigned long)netdev_priv(dev) + priv->card = (void *)((unsigned long)priv + sizeof(struct orinoco_private)); else priv->card = NULL; @@ -2438,6 +2453,9 @@ dev->watchdog_timeo = HZ; /* 1 second timeout */ dev->get_stats = orinoco_get_stats; dev->get_wireless_stats = orinoco_get_wireless_stats; +#if WIRELESS_EXT > 12 + dev->wireless_handlers = (struct iw_handler_def *)&orinoco_handler_def; +#endif dev->do_ioctl = orinoco_ioctl; dev->change_mtu = orinoco_change_mtu; dev->set_multicast_list = orinoco_set_multicast_list; @@ -2473,25 +2491,6 @@ /* Wireless extensions */ /********************************************************************/ -static int orinoco_hw_get_bssid(struct orinoco_private *priv, - char buf[ETH_ALEN]) -{ - hermes_t *hw = &priv->hw; - int err = 0; - unsigned long flags; - - err = orinoco_lock(priv, &flags); - if (err) - return err; - - err = hermes_read_ltv(hw, USER_BAP, HERMES_RID_CURRENTBSSID, - ETH_ALEN, NULL, buf); - - orinoco_unlock(priv, &flags); - - return err; -} - static int orinoco_hw_get_essid(struct orinoco_private *priv, int *active, char buf[IW_ESSID_MAX_SIZE+1]) { @@ -2502,9 +2501,8 @@ int len; unsigned long flags; - err = orinoco_lock(priv, &flags); - if (err) - return err; + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; if (strlen(priv->desired_essid) > 0) { /* We read the desired SSID from the hardware rather @@ -2535,6 +2533,7 @@ } len = le16_to_cpu(essidbuf.len); + BUG_ON(len > IW_ESSID_MAX_SIZE); memset(buf, 0, IW_ESSID_MAX_SIZE+1); memcpy(buf, p, len); @@ -2555,9 +2554,8 @@ long freq = 0; unsigned long flags; - err = orinoco_lock(priv, &flags); - if (err) - return err; + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CURRENTCHANNEL, &channel); if (err) @@ -2597,9 +2595,8 @@ int i; unsigned long flags; - err = orinoco_lock(priv, &flags); - if (err) - return err; + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; err = hermes_read_ltv(hw, USER_BAP, HERMES_RID_SUPPORTEDDATARATES, sizeof(list), NULL, &list); @@ -2619,143 +2616,265 @@ return 0; } -static int orinoco_ioctl_getiwrange(struct net_device *dev, struct iw_point *rrq) +static int orinoco_ioctl_getname(struct net_device *dev, + struct iw_request_info *info, + char *name, + char *extra) { struct orinoco_private *priv = netdev_priv(dev); - int err = 0; - int mode; - struct iw_range range; int numrates; - int i, k; - unsigned long flags; - - TRACE_ENTER(dev->name); - - err = verify_area(VERIFY_WRITE, rrq->pointer, sizeof(range)); - if (err) - return err; + int err; - rrq->length = sizeof(range); + err = orinoco_hw_get_bitratelist(priv, &numrates, NULL, 0); - err = orinoco_lock(priv, &flags); - if (err) - return err; + if (!err && (numrates > 2)) + strcpy(name, "IEEE 802.11b"); + else + strcpy(name, "IEEE 802.11-DS"); - mode = priv->iw_mode; - orinoco_unlock(priv, &flags); + return 0; +} - memset(&range, 0, sizeof(range)); +static int orinoco_ioctl_setwap(struct net_device *dev, + struct iw_request_info *info, + struct sockaddr *ap_addr, + char *extra) +{ + struct orinoco_private *priv = netdev_priv(dev); + int err = -EINPROGRESS; /* Call commit handler */ + unsigned long flags; + static const u8 off_addr[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + static const u8 any_addr[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; - /* Much of this shamelessly taken from wvlan_cs.c. No idea - * what it all means -dgibson */ - range.we_version_compiled = WIRELESS_EXT; - range.we_version_source = 11; + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; - range.min_nwid = range.max_nwid = 0; /* We don't use nwids */ + /* Enable automatic roaming - no sanity checks are needed */ + if (memcmp(&ap_addr->sa_data, off_addr, ETH_ALEN) == 0 || + memcmp(&ap_addr->sa_data, any_addr, ETH_ALEN) == 0) { + priv->bssid_fixed = 0; + memset(priv->desired_bssid, 0, ETH_ALEN); - /* Set available channels/frequencies */ - range.num_channels = NUM_CHANNELS; - k = 0; - for (i = 0; i < NUM_CHANNELS; i++) { - if (priv->channel_mask & (1 << i)) { - range.freq[k].i = i + 1; - range.freq[k].m = channel_frequency[i] * 100000; - range.freq[k].e = 1; - k++; + /* "off" means keep existing connection */ + if (ap_addr->sa_data[0] == 0) { + __orinoco_hw_set_wap(priv); + err = 0; } - - if (k >= IW_MAX_FREQUENCIES) - break; + goto out; } - range.num_frequency = k; - range.sensitivity = 3; + if (priv->firmware_type == FIRMWARE_TYPE_AGERE) { + printk(KERN_WARNING "%s: Lucent/Agere firmware doesn't " + "support manual roaming\n", + dev->name); + err = -EOPNOTSUPP; + goto out; + } - if ((mode == IW_MODE_ADHOC) && (priv->spy_number == 0)){ - /* Quality stats meaningless in ad-hoc mode */ - range.max_qual.qual = 0; - range.max_qual.level = 0; - range.max_qual.noise = 0; - range.avg_qual.qual = 0; - range.avg_qual.level = 0; - range.avg_qual.noise = 0; - } else { - range.max_qual.qual = 0x8b - 0x2f; - range.max_qual.level = 0x2f - 0x95 - 1; - range.max_qual.noise = 0x2f - 0x95 - 1; - /* Need to get better values */ - range.avg_qual.qual = 0x24; - range.avg_qual.level = 0xC2; - range.avg_qual.noise = 0x9E; + if (priv->iw_mode != IW_MODE_INFRA) { + printk(KERN_WARNING "%s: Manual roaming supported only in " + "managed mode\n", dev->name); + err = -EOPNOTSUPP; + goto out; } - err = orinoco_hw_get_bitratelist(priv, &numrates, - range.bitrate, IW_MAX_BITRATES); - if (err) - return err; - range.num_bitrates = numrates; - - /* Set an indication of the max TCP throughput in bit/s that we can - * expect using this interface. May be use for QoS stuff... - * Jean II */ - if(numrates > 2) - range.throughput = 5 * 1000 * 1000; /* ~5 Mb/s */ - else - range.throughput = 1.5 * 1000 * 1000; /* ~1.5 Mb/s */ + /* Intersil firmware hangs without Desired ESSID */ + if (priv->firmware_type == FIRMWARE_TYPE_INTERSIL && + strlen(priv->desired_essid) == 0) { + printk(KERN_WARNING "%s: Desired ESSID must be set for " + "manual roaming\n", dev->name); + err = -EOPNOTSUPP; + goto out; + } - range.min_rts = 0; - range.max_rts = 2347; - range.min_frag = 256; - range.max_frag = 2346; + /* Finally, enable manual roaming */ + priv->bssid_fixed = 1; + memcpy(priv->desired_bssid, &ap_addr->sa_data, ETH_ALEN); - err = orinoco_lock(priv, &flags); - if (err) - return err; - if (priv->has_wep) { - range.max_encoding_tokens = ORINOCO_MAX_KEYS; + out: + orinoco_unlock(priv, &flags); + return err; +} + +static int orinoco_ioctl_getwap(struct net_device *dev, + struct iw_request_info *info, + struct sockaddr *ap_addr, + char *extra) +{ + struct orinoco_private *priv = netdev_priv(dev); + + hermes_t *hw = &priv->hw; + int err = 0; + unsigned long flags; + + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; + + ap_addr->sa_family = ARPHRD_ETHER; + err = hermes_read_ltv(hw, USER_BAP, HERMES_RID_CURRENTBSSID, + ETH_ALEN, NULL, ap_addr->sa_data); + + orinoco_unlock(priv, &flags); + + return err; +} + +static int orinoco_ioctl_setmode(struct net_device *dev, + struct iw_request_info *info, + u32 *mode, + char *extra) +{ + struct orinoco_private *priv = netdev_priv(dev); + int err = -EINPROGRESS; /* Call commit handler */ + unsigned long flags; + + if (priv->iw_mode == *mode) + return 0; - range.encoding_size[0] = SMALL_KEY_SIZE; - range.num_encoding_sizes = 1; + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; + + switch (*mode) { + case IW_MODE_ADHOC: + if (!priv->has_ibss && !priv->has_port3) + err = -EOPNOTSUPP; + break; + + case IW_MODE_INFRA: + break; + + default: + err = -EOPNOTSUPP; + break; + } + + if (err == -EINPROGRESS) { + priv->iw_mode = *mode; + set_port_type(priv); + } + + orinoco_unlock(priv, &flags); + + return err; +} + +static int orinoco_ioctl_getmode(struct net_device *dev, + struct iw_request_info *info, + u32 *mode, + char *extra) +{ + struct orinoco_private *priv = netdev_priv(dev); + + *mode = priv->iw_mode; + return 0; +} + + +static int orinoco_ioctl_getiwrange(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *rrq, + char *extra) +{ + struct orinoco_private *priv = netdev_priv(dev); + int err = 0; + struct iw_range *range = (struct iw_range *) extra; + int numrates; + int i, k; + + TRACE_ENTER(dev->name); + + rrq->length = sizeof(struct iw_range); + memset(range, 0, sizeof(struct iw_range)); + + range->we_version_compiled = WIRELESS_EXT; + range->we_version_source = 14; + + /* Set available channels/frequencies */ + range->num_channels = NUM_CHANNELS; + k = 0; + for (i = 0; i < NUM_CHANNELS; i++) { + if (priv->channel_mask & (1 << i)) { + range->freq[k].i = i + 1; + range->freq[k].m = channel_frequency[i] * 100000; + range->freq[k].e = 1; + k++; + } + + if (k >= IW_MAX_FREQUENCIES) + break; + } + range->num_frequency = k; + range->sensitivity = 3; + + if (priv->has_wep) { + range->max_encoding_tokens = ORINOCO_MAX_KEYS; + range->encoding_size[0] = SMALL_KEY_SIZE; + range->num_encoding_sizes = 1; if (priv->has_big_wep) { - range.encoding_size[1] = LARGE_KEY_SIZE; - range.num_encoding_sizes = 2; + range->encoding_size[1] = LARGE_KEY_SIZE; + range->num_encoding_sizes = 2; } + } + + if ((priv->iw_mode == IW_MODE_ADHOC) && (priv->spy_number == 0)){ + /* Quality stats meaningless in ad-hoc mode */ } else { - range.num_encoding_sizes = 0; - range.max_encoding_tokens = 0; + range->max_qual.qual = 0x8b - 0x2f; + range->max_qual.level = 0x2f - 0x95 - 1; + range->max_qual.noise = 0x2f - 0x95 - 1; +#if WIRELESS_EXT > 11 + /* Need to get better values */ + range->avg_qual.qual = 0x24; + range->avg_qual.level = 0xC2; + range->avg_qual.noise = 0x9E; +#endif /* WIRELESS_EXT > 11 */ } - orinoco_unlock(priv, &flags); - - range.min_pmp = 0; - range.max_pmp = 65535000; - range.min_pmt = 0; - range.max_pmt = 65535 * 1000; /* ??? */ - range.pmp_flags = IW_POWER_PERIOD; - range.pmt_flags = IW_POWER_TIMEOUT; - range.pm_capa = IW_POWER_PERIOD | IW_POWER_TIMEOUT | IW_POWER_UNICAST_R; - - range.num_txpower = 1; - range.txpower[0] = 15; /* 15dBm */ - range.txpower_capa = IW_TXPOW_DBM; - - range.retry_capa = IW_RETRY_LIMIT | IW_RETRY_LIFETIME; - range.retry_flags = IW_RETRY_LIMIT; - range.r_time_flags = IW_RETRY_LIFETIME; - range.min_retry = 0; - range.max_retry = 65535; /* ??? */ - range.min_r_time = 0; - range.max_r_time = 65535 * 1000; /* ??? */ - if (copy_to_user(rrq->pointer, &range, sizeof(range))) - return -EFAULT; + err = orinoco_hw_get_bitratelist(priv, &numrates, + range->bitrate, IW_MAX_BITRATES); + if (err) + return err; + range->num_bitrates = numrates; + + /* Set an indication of the max TCP throughput in bit/s that we can + * expect using this interface. May be use for QoS stuff... + * Jean II */ + if (numrates > 2) + range->throughput = 5 * 1000 * 1000; /* ~5 Mb/s */ + else + range->throughput = 1.5 * 1000 * 1000; /* ~1.5 Mb/s */ + + range->min_rts = 0; + range->max_rts = 2347; + range->min_frag = 256; + range->max_frag = 2346; + + range->min_pmp = 0; + range->max_pmp = 65535000; + range->min_pmt = 0; + range->max_pmt = 65535 * 1000; /* ??? */ + range->pmp_flags = IW_POWER_PERIOD; + range->pmt_flags = IW_POWER_TIMEOUT; + range->pm_capa = IW_POWER_PERIOD | IW_POWER_TIMEOUT | IW_POWER_UNICAST_R; + + range->retry_capa = IW_RETRY_LIMIT | IW_RETRY_LIFETIME; + range->retry_flags = IW_RETRY_LIMIT; + range->r_time_flags = IW_RETRY_LIFETIME; + range->min_retry = 0; + range->max_retry = 65535; /* ??? */ + range->min_r_time = 0; + range->max_r_time = 65535 * 1000; /* ??? */ TRACE_EXIT(dev->name); return 0; } -static int orinoco_ioctl_setiwencode(struct net_device *dev, struct iw_point *erq) +static int orinoco_ioctl_setiwencode(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *erq, + char *keybuf) { struct orinoco_private *priv = netdev_priv(dev); int index = (erq->flags & IW_ENCODE_INDEX) - 1; @@ -2763,35 +2882,25 @@ int enable = priv->wep_on; int restricted = priv->wep_restrict; u16 xlen = 0; - int err = 0; - char keybuf[ORINOCO_MAX_KEY_SIZE]; + int err = -EINPROGRESS; /* Call commit handler */ unsigned long flags; + if (! priv->has_wep) + return -EOPNOTSUPP; + if (erq->pointer) { - /* We actually have a key to set */ - if ( (erq->length < SMALL_KEY_SIZE) || (erq->length > ORINOCO_MAX_KEY_SIZE) ) - return -EINVAL; - - if (copy_from_user(keybuf, erq->pointer, erq->length)) - return -EFAULT; + /* We actually have a key to set - check its length */ + if (erq->length > LARGE_KEY_SIZE) + return -E2BIG; + + if ( (erq->length > SMALL_KEY_SIZE) && !priv->has_big_wep ) + return -E2BIG; } - err = orinoco_lock(priv, &flags); - if (err) - return err; + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; if (erq->pointer) { - if (erq->length > ORINOCO_MAX_KEY_SIZE) { - err = -E2BIG; - goto out; - } - - if ( (erq->length > LARGE_KEY_SIZE) - || ( ! priv->has_big_wep && (erq->length > SMALL_KEY_SIZE)) ) { - err = -EINVAL; - goto out; - } - if ((index < 0) || (index >= ORINOCO_MAX_KEYS)) index = priv->tx_key; @@ -2829,7 +2938,6 @@ if (erq->flags & IW_ENCODE_DISABLED) enable = 0; - /* Only for Prism2 & Symbol cards (so far) - Jean II */ if (erq->flags & IW_ENCODE_OPEN) restricted = 0; if (erq->flags & IW_ENCODE_RESTRICTED) @@ -2842,6 +2950,15 @@ memcpy(priv->keys[index].data, keybuf, erq->length); } priv->tx_key = setindex; + + /* Try fast key change if connected and only keys are changed */ + if (priv->wep_on && enable && (priv->wep_restrict == restricted) && + netif_carrier_ok(dev)) { + err = __orinoco_hw_setup_wepkeys(priv); + /* No need to commit if successful */ + goto out; + } + priv->wep_on = enable; priv->wep_restrict = restricted; @@ -2851,18 +2968,21 @@ return err; } -static int orinoco_ioctl_getiwencode(struct net_device *dev, struct iw_point *erq) +static int orinoco_ioctl_getiwencode(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *erq, + char *keybuf) { struct orinoco_private *priv = netdev_priv(dev); int index = (erq->flags & IW_ENCODE_INDEX) - 1; u16 xlen = 0; - char keybuf[ORINOCO_MAX_KEY_SIZE]; - int err; unsigned long flags; - - err = orinoco_lock(priv, &flags); - if (err) - return err; + + if (! priv->has_wep) + return -EOPNOTSUPP; + + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; if ((index < 0) || (index >= ORINOCO_MAX_KEYS)) index = priv->tx_key; @@ -2872,69 +2992,60 @@ erq->flags |= IW_ENCODE_DISABLED; erq->flags |= index + 1; - /* Only for symbol cards - Jean II */ - if (priv->firmware_type != FIRMWARE_TYPE_AGERE) { - if(priv->wep_restrict) - erq->flags |= IW_ENCODE_RESTRICTED; - else - erq->flags |= IW_ENCODE_OPEN; - } + if (priv->wep_restrict) + erq->flags |= IW_ENCODE_RESTRICTED; + else + erq->flags |= IW_ENCODE_OPEN; xlen = le16_to_cpu(priv->keys[index].len); erq->length = xlen; - if (erq->pointer) { - memcpy(keybuf, priv->keys[index].data, ORINOCO_MAX_KEY_SIZE); - } - - orinoco_unlock(priv, &flags); + memcpy(keybuf, priv->keys[index].data, ORINOCO_MAX_KEY_SIZE); - if (erq->pointer) { - if (copy_to_user(erq->pointer, keybuf, xlen)) - return -EFAULT; - } + orinoco_unlock(priv, &flags); return 0; } -static int orinoco_ioctl_setessid(struct net_device *dev, struct iw_point *erq) +static int orinoco_ioctl_setessid(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *erq, + char *essidbuf) { struct orinoco_private *priv = netdev_priv(dev); - char essidbuf[IW_ESSID_MAX_SIZE+1]; - int err; unsigned long flags; /* Note : ESSID is ignored in Ad-Hoc demo mode, but we can set it * anyway... - Jean II */ - memset(&essidbuf, 0, sizeof(essidbuf)); - - if (erq->flags) { - if (erq->length > IW_ESSID_MAX_SIZE) - return -E2BIG; - - if (copy_from_user(&essidbuf, erq->pointer, erq->length)) - return -EFAULT; + /* Hum... Should not use Wireless Extension constant (may change), + * should use our own... - Jean II */ + if (erq->length > IW_ESSID_MAX_SIZE) + return -E2BIG; - essidbuf[erq->length] = '\0'; - } + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; - err = orinoco_lock(priv, &flags); - if (err) - return err; + /* NULL the string (for NULL termination & ESSID = ANY) - Jean II */ + memset(priv->desired_essid, 0, sizeof(priv->desired_essid)); - memcpy(priv->desired_essid, essidbuf, sizeof(priv->desired_essid)); + /* If not ANY, get the new ESSID */ + if (erq->flags) { + memcpy(priv->desired_essid, essidbuf, erq->length); + } orinoco_unlock(priv, &flags); - return 0; + return -EINPROGRESS; /* Call commit handler */ } -static int orinoco_ioctl_getessid(struct net_device *dev, struct iw_point *erq) +static int orinoco_ioctl_getessid(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *erq, + char *essidbuf) { struct orinoco_private *priv = netdev_priv(dev); - char essidbuf[IW_ESSID_MAX_SIZE+1]; int active; int err = 0; unsigned long flags; @@ -2946,86 +3057,74 @@ if (err) return err; } else { - err = orinoco_lock(priv, &flags); - if (err) - return err; - memcpy(essidbuf, priv->desired_essid, sizeof(essidbuf)); + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; + memcpy(essidbuf, priv->desired_essid, IW_ESSID_MAX_SIZE + 1); orinoco_unlock(priv, &flags); } erq->flags = 1; erq->length = strlen(essidbuf) + 1; - if (erq->pointer) - if (copy_to_user(erq->pointer, essidbuf, erq->length)) - return -EFAULT; TRACE_EXIT(dev->name); return 0; } -static int orinoco_ioctl_setnick(struct net_device *dev, struct iw_point *nrq) +static int orinoco_ioctl_setnick(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *nrq, + char *nickbuf) { struct orinoco_private *priv = netdev_priv(dev); - char nickbuf[IW_ESSID_MAX_SIZE+1]; - int err; unsigned long flags; if (nrq->length > IW_ESSID_MAX_SIZE) return -E2BIG; - memset(nickbuf, 0, sizeof(nickbuf)); + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; - if (copy_from_user(nickbuf, nrq->pointer, nrq->length)) - return -EFAULT; - - nickbuf[nrq->length] = '\0'; - - err = orinoco_lock(priv, &flags); - if (err) - return err; - - memcpy(priv->nick, nickbuf, sizeof(priv->nick)); + memset(priv->nick, 0, sizeof(priv->nick)); + memcpy(priv->nick, nickbuf, nrq->length); orinoco_unlock(priv, &flags); - return 0; + return -EINPROGRESS; /* Call commit handler */ } -static int orinoco_ioctl_getnick(struct net_device *dev, struct iw_point *nrq) +static int orinoco_ioctl_getnick(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *nrq, + char *nickbuf) { struct orinoco_private *priv = netdev_priv(dev); - char nickbuf[IW_ESSID_MAX_SIZE+1]; - int err; unsigned long flags; - err = orinoco_lock(priv, &flags); - if (err) - return err; + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; memcpy(nickbuf, priv->nick, IW_ESSID_MAX_SIZE+1); orinoco_unlock(priv, &flags); nrq->length = strlen(nickbuf)+1; - if (copy_to_user(nrq->pointer, nickbuf, sizeof(nickbuf))) - return -EFAULT; - return 0; } -static int orinoco_ioctl_setfreq(struct net_device *dev, struct iw_freq *frq) +static int orinoco_ioctl_setfreq(struct net_device *dev, + struct iw_request_info *info, + struct iw_freq *frq, + char *extra) { struct orinoco_private *priv = netdev_priv(dev); int chan = -1; - int err; unsigned long flags; + int err = -EINPROGRESS; /* Call commit handler */ - /* We can only use this in Ad-Hoc demo mode to set the operating - * frequency, or in IBSS mode to set the frequency where the IBSS - * will be created - Jean II */ - if (priv->iw_mode != IW_MODE_ADHOC) - return -EOPNOTSUPP; + /* In infrastructure mode the AP sets the channel */ + if (priv->iw_mode == IW_MODE_INFRA) + return -EBUSY; if ( (frq->e == 0) && (frq->m <= 1000) ) { /* Setting by channel number */ @@ -3047,16 +3146,39 @@ ! (priv->channel_mask & (1 << (chan-1)) ) ) return -EINVAL; - err = orinoco_lock(priv, &flags); - if (err) - return err; + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; + priv->channel = chan; orinoco_unlock(priv, &flags); + return err; +} + +static int orinoco_ioctl_getfreq(struct net_device *dev, + struct iw_request_info *info, + struct iw_freq *frq, + char *extra) +{ + struct orinoco_private *priv = netdev_priv(dev); + int tmp; + + /* Locking done in there */ + tmp = orinoco_hw_get_freq(priv); + if (tmp < 0) { + return tmp; + } + + frq->m = tmp; + frq->e = 1; + return 0; } -static int orinoco_ioctl_getsens(struct net_device *dev, struct iw_param *srq) +static int orinoco_ioctl_getsens(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *srq, + char *extra) { struct orinoco_private *priv = netdev_priv(dev); hermes_t *hw = &priv->hw; @@ -3067,9 +3189,9 @@ if (!priv->has_sensitivity) return -EOPNOTSUPP; - err = orinoco_lock(priv, &flags); - if (err) - return err; + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; + err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CNFSYSTEMSCALE, &val); orinoco_unlock(priv, &flags); @@ -3083,11 +3205,13 @@ return 0; } -static int orinoco_ioctl_setsens(struct net_device *dev, struct iw_param *srq) +static int orinoco_ioctl_setsens(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *srq, + char *extra) { struct orinoco_private *priv = netdev_priv(dev); int val = srq->value; - int err; unsigned long flags; if (!priv->has_sensitivity) @@ -3096,20 +3220,22 @@ if ((val < 1) || (val > 3)) return -EINVAL; - err = orinoco_lock(priv, &flags); - if (err) - return err; + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; + priv->ap_density = val; orinoco_unlock(priv, &flags); - return 0; + return -EINPROGRESS; /* Call commit handler */ } -static int orinoco_ioctl_setrts(struct net_device *dev, struct iw_param *rrq) +static int orinoco_ioctl_setrts(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *rrq, + char *extra) { struct orinoco_private *priv = netdev_priv(dev); int val = rrq->value; - int err; unsigned long flags; if (rrq->disabled) @@ -3118,25 +3244,39 @@ if ( (val < 0) || (val > 2347) ) return -EINVAL; - err = orinoco_lock(priv, &flags); - if (err) - return err; + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; priv->rts_thresh = val; orinoco_unlock(priv, &flags); + return -EINPROGRESS; /* Call commit handler */ +} + +static int orinoco_ioctl_getrts(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *rrq, + char *extra) +{ + struct orinoco_private *priv = netdev_priv(dev); + + rrq->value = priv->rts_thresh; + rrq->disabled = (rrq->value == 2347); + rrq->fixed = 1; return 0; } -static int orinoco_ioctl_setfrag(struct net_device *dev, struct iw_param *frq) +static int orinoco_ioctl_setfrag(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *frq, + char *extra) { struct orinoco_private *priv = netdev_priv(dev); - int err = 0; + int err = -EINPROGRESS; /* Call commit handler */ unsigned long flags; - err = orinoco_lock(priv, &flags); - if (err) - return err; + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; if (priv->has_mwo) { if (frq->disabled) @@ -3164,18 +3304,20 @@ return err; } -static int orinoco_ioctl_getfrag(struct net_device *dev, struct iw_param *frq) +static int orinoco_ioctl_getfrag(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *frq, + char *extra) { struct orinoco_private *priv = netdev_priv(dev); hermes_t *hw = &priv->hw; - int err = 0; + int err; u16 val; unsigned long flags; - err = orinoco_lock(priv, &flags); - if (err) - return err; - + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; + if (priv->has_mwo) { err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CNFMWOROBUST_AGERE, @@ -3187,7 +3329,8 @@ frq->disabled = ! val; frq->fixed = 0; } else { - err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CNFFRAGMENTATIONTHRESHOLD, + err = hermes_read_wordrec(hw, USER_BAP, + HERMES_RID_CNFFRAGMENTATIONTHRESHOLD, &val); if (err) val = 0; @@ -3202,10 +3345,12 @@ return err; } -static int orinoco_ioctl_setrate(struct net_device *dev, struct iw_param *rrq) +static int orinoco_ioctl_setrate(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *rrq, + char *extra) { struct orinoco_private *priv = netdev_priv(dev); - int err = 0; int ratemode = -1; int bitrate; /* 100s of kilobits */ int i; @@ -3236,16 +3381,19 @@ if (ratemode == -1) return -EINVAL; - err = orinoco_lock(priv, &flags); - if (err) - return err; + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; + priv->bitratemode = ratemode; orinoco_unlock(priv, &flags); - return err; + return -EINPROGRESS; } -static int orinoco_ioctl_getrate(struct net_device *dev, struct iw_param *rrq) +static int orinoco_ioctl_getrate(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *rrq, + char *extra) { struct orinoco_private *priv = netdev_priv(dev); hermes_t *hw = &priv->hw; @@ -3255,9 +3403,8 @@ u16 val; unsigned long flags; - err = orinoco_lock(priv, &flags); - if (err) - return err; + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; ratemode = priv->bitratemode; @@ -3311,15 +3458,17 @@ return err; } -static int orinoco_ioctl_setpower(struct net_device *dev, struct iw_param *prq) +static int orinoco_ioctl_setpower(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *prq, + char *extra) { struct orinoco_private *priv = netdev_priv(dev); - int err = 0; + int err = -EINPROGRESS; /* Call commit handler */ unsigned long flags; - err = orinoco_lock(priv, &flags); - if (err) - return err; + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; if (prq->disabled) { priv->pm_on = 0; @@ -3364,7 +3513,10 @@ return err; } -static int orinoco_ioctl_getpower(struct net_device *dev, struct iw_param *prq) +static int orinoco_ioctl_getpower(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *prq, + char *extra) { struct orinoco_private *priv = netdev_priv(dev); hermes_t *hw = &priv->hw; @@ -3372,9 +3524,8 @@ u16 enable, period, timeout, mcast; unsigned long flags; - err = orinoco_lock(priv, &flags); - if (err) - return err; + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_CNFPMENABLED, &enable); if (err) @@ -3413,7 +3564,10 @@ return err; } -static int orinoco_ioctl_getretry(struct net_device *dev, struct iw_param *rrq) +static int orinoco_ioctl_getretry(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *rrq, + char *extra) { struct orinoco_private *priv = netdev_priv(dev); hermes_t *hw = &priv->hw; @@ -3421,9 +3575,8 @@ u16 short_limit, long_limit, lifetime; unsigned long flags; - err = orinoco_lock(priv, &flags); - if (err) - return err; + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; err = hermes_read_wordrec(hw, USER_BAP, HERMES_RID_SHORTRETRYLIMIT, &short_limit); @@ -3465,16 +3618,41 @@ return err; } -static int orinoco_ioctl_setibssport(struct net_device *dev, struct iwreq *wrq) +static int orinoco_ioctl_reset(struct net_device *dev, + struct iw_request_info *info, + void *wrqu, + char *extra) { struct orinoco_private *priv = netdev_priv(dev); - int val = *( (int *) wrq->u.name ); - int err; + + if (! capable(CAP_NET_ADMIN)) + return -EPERM; + + if (info->cmd == (SIOCIWFIRSTPRIV + 0x1)) { + printk(KERN_DEBUG "%s: Forcing reset!\n", dev->name); + + /* Firmware reset */ + orinoco_reset(dev); + } else { + printk(KERN_DEBUG "%s: Force scheduling reset!\n", dev->name); + + schedule_work(&priv->reset_work); + } + + return 0; +} + +static int orinoco_ioctl_setibssport(struct net_device *dev, + struct iw_request_info *info, + void *wrqu, + char *extra) +{ + struct orinoco_private *priv = netdev_priv(dev); + int val = *( (int *) extra ); unsigned long flags; - err = orinoco_lock(priv, &flags); - if (err) - return err; + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; priv->ibss_port = val ; @@ -3482,36 +3660,33 @@ set_port_type(priv); orinoco_unlock(priv, &flags); - return 0; + return -EINPROGRESS; /* Call commit handler */ } -static int orinoco_ioctl_getibssport(struct net_device *dev, struct iwreq *wrq) +static int orinoco_ioctl_getibssport(struct net_device *dev, + struct iw_request_info *info, + void *wrqu, + char *extra) { struct orinoco_private *priv = netdev_priv(dev); - int *val = (int *)wrq->u.name; - int err; - unsigned long flags; - - err = orinoco_lock(priv, &flags); - if (err) - return err; + int *val = (int *) extra; *val = priv->ibss_port; - orinoco_unlock(priv, &flags); - return 0; } -static int orinoco_ioctl_setport3(struct net_device *dev, struct iwreq *wrq) +static int orinoco_ioctl_setport3(struct net_device *dev, + struct iw_request_info *info, + void *wrqu, + char *extra) { struct orinoco_private *priv = netdev_priv(dev); - int val = *( (int *) wrq->u.name ); + int val = *( (int *) extra ); int err = 0; unsigned long flags; - err = orinoco_lock(priv, &flags); - if (err) - return err; + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; switch (val) { case 0: /* Try to do IEEE ad-hoc mode */ @@ -3535,57 +3710,133 @@ err = -EINVAL; } - if (! err) + if (! err) { /* Actually update the mode we are using */ set_port_type(priv); + err = -EINPROGRESS; + } orinoco_unlock(priv, &flags); return err; } -static int orinoco_ioctl_getport3(struct net_device *dev, struct iwreq *wrq) +static int orinoco_ioctl_getport3(struct net_device *dev, + struct iw_request_info *info, + void *wrqu, + char *extra) +{ + struct orinoco_private *priv = netdev_priv(dev); + int *val = (int *) extra; + + *val = priv->prefer_port3; + return 0; +} + +static int orinoco_ioctl_setpreamble(struct net_device *dev, + struct iw_request_info *info, + void *wrqu, + char *extra) +{ + struct orinoco_private *priv = netdev_priv(dev); + unsigned long flags; + int val; + + if (! priv->has_preamble) + return -EOPNOTSUPP; + + /* 802.11b has recently defined some short preamble. + * Basically, the Phy header has been reduced in size. + * This increase performance, especially at high rates + * (the preamble is transmitted at 1Mb/s), unfortunately + * this give compatibility troubles... - Jean II */ + val = *( (int *) extra ); + + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; + + if (val) + priv->preamble = 1; + else + priv->preamble = 0; + + orinoco_unlock(priv, &flags); + + return -EINPROGRESS; /* Call commit handler */ +} + +static int orinoco_ioctl_getpreamble(struct net_device *dev, + struct iw_request_info *info, + void *wrqu, + char *extra) +{ + struct orinoco_private *priv = netdev_priv(dev); + int *val = (int *) extra; + + if (! priv->has_preamble) + return -EOPNOTSUPP; + + *val = priv->preamble; + return 0; +} + +/* ioctl interface to hermes_read_ltv() + * To use with iwpriv, pass the RID as the token argument, e.g. + * iwpriv get_rid [0xfc00] + * At least Wireless Tools 25 is required to use iwpriv. + * For Wireless Tools 25 and 26 append "dummy" are the end. */ +static int orinoco_ioctl_getrid(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *data, + char *extra) { struct orinoco_private *priv = netdev_priv(dev); - int *val = (int *)wrq->u.name; + hermes_t *hw = &priv->hw; + int rid = data->flags; + u16 length; int err; unsigned long flags; - err = orinoco_lock(priv, &flags); + /* It's a "get" function, but we don't want users to access the + * WEP key and other raw firmware data */ + if (! capable(CAP_NET_ADMIN)) + return -EPERM; + + if (rid < 0xfc00 || rid > 0xffff) + return -EINVAL; + + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; + + err = hermes_read_ltv(hw, USER_BAP, rid, MAX_RID_LEN, &length, + extra); if (err) - return err; + goto out; - *val = priv->prefer_port3; + data->length = min_t(u16, HERMES_RECLEN_TO_BYTES(length), + MAX_RID_LEN); + + out: orinoco_unlock(priv, &flags); - return 0; + return err; } /* Spy is used for link quality/strength measurements in Ad-Hoc mode * Jean II */ -static int orinoco_ioctl_setspy(struct net_device *dev, struct iw_point *srq) +static int orinoco_ioctl_setspy(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *srq, + char *extra) { struct orinoco_private *priv = netdev_priv(dev); - struct sockaddr address[IW_MAX_SPY]; + struct sockaddr *address = (struct sockaddr *) extra; int number = srq->length; int i; - int err = 0; unsigned long flags; - /* Check the number of addresses */ - if (number > IW_MAX_SPY) - return -E2BIG; - - /* Get the data in the driver */ - if (srq->pointer) { - if (copy_from_user(address, srq->pointer, - sizeof(struct sockaddr) * number)) - return -EFAULT; - } - /* Make sure nobody mess with the structure while we do */ - err = orinoco_lock(priv, &flags); - if (err) - return err; + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; /* orinoco_lock() doesn't disable interrupts, so make sure the * interrupt rx path don't get confused while we copy */ @@ -3606,25 +3857,32 @@ /* Now, let the others play */ orinoco_unlock(priv, &flags); - return err; + /* Do NOT call commit handler */ + return 0; } -static int orinoco_ioctl_getspy(struct net_device *dev, struct iw_point *srq) +static int orinoco_ioctl_getspy(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *srq, + char *extra) { struct orinoco_private *priv = netdev_priv(dev); - struct sockaddr address[IW_MAX_SPY]; - struct iw_quality spy_stat[IW_MAX_SPY]; + struct sockaddr *address = (struct sockaddr *) extra; int number; int i; - int err; unsigned long flags; - err = orinoco_lock(priv, &flags); - if (err) - return err; + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; number = priv->spy_number; - if ((number > 0) && (srq->pointer)) { + /* Create address struct */ + for (i = 0; i < number; i++) { + memcpy(address[i].sa_data, priv->spy_address[i], + ETH_ALEN); + address[i].sa_family = AF_UNIX; + } + if (number > 0) { /* Create address struct */ for (i = 0; i < number; i++) { memcpy(address[i].sa_data, priv->spy_address[i], @@ -3633,217 +3891,380 @@ } /* Copy stats */ /* In theory, we should disable irqs while copying the stats - * because the rx path migh update it in the middle... + * because the rx path might update it in the middle... * Bah, who care ? - Jean II */ - memcpy(&spy_stat, priv->spy_stat, - sizeof(struct iw_quality) * IW_MAX_SPY); - for (i=0; i < number; i++) - priv->spy_stat[i].updated = 0; + memcpy(extra + (sizeof(struct sockaddr) * number), + priv->spy_stat, sizeof(struct iw_quality) * number); } + /* Reset updated flags. */ + for (i = 0; i < number; i++) + priv->spy_stat[i].updated = 0; orinoco_unlock(priv, &flags); - /* Push stuff to user space */ srq->length = number; - if(copy_to_user(srq->pointer, address, - sizeof(struct sockaddr) * number)) - return -EFAULT; - if(copy_to_user(srq->pointer + (sizeof(struct sockaddr)*number), - &spy_stat, sizeof(struct iw_quality) * number)) - return -EFAULT; return 0; } -static int -orinoco_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) +/* Commit handler, called after set operations */ +static int orinoco_ioctl_commit(struct net_device *dev, + struct iw_request_info *info, + void *wrqu, + char *extra) { struct orinoco_private *priv = netdev_priv(dev); + struct hermes *hw = &priv->hw; + unsigned long flags; + int err = 0; + + if (!priv->open) + return 0; + + if (priv->broken_disableport) { + orinoco_reset(dev); + return 0; + } + + if (orinoco_lock(priv, &flags) != 0) + return err; + + err = hermes_disable_port(hw, 0); + if (err) { + printk(KERN_WARNING "%s: Unable to disable port " + "while reconfiguring card\n", dev->name); + priv->broken_disableport = 1; + goto out; + } + + err = __orinoco_program_rids(dev); + if (err) { + printk(KERN_WARNING "%s: Unable to reconfigure card\n", + dev->name); + goto out; + } + + err = hermes_enable_port(hw, 0); + if (err) { + printk(KERN_WARNING "%s: Unable to enable port while reconfiguring card\n", + dev->name); + goto out; + } + + out: + if (err) { + printk(KERN_WARNING "%s: Resetting instead...\n", dev->name); + schedule_work(&priv->reset_work); + err = 0; + } + + orinoco_unlock(priv, &flags); + return err; +} + +static const struct iw_priv_args orinoco_privtab[] = { + { SIOCIWFIRSTPRIV + 0x0, 0, 0, "force_reset" }, + { SIOCIWFIRSTPRIV + 0x1, 0, 0, "card_reset" }, + { SIOCIWFIRSTPRIV + 0x2, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, + 0, "set_port3" }, + { SIOCIWFIRSTPRIV + 0x3, 0, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, + "get_port3" }, + { SIOCIWFIRSTPRIV + 0x4, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, + 0, "set_preamble" }, + { SIOCIWFIRSTPRIV + 0x5, 0, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, + "get_preamble" }, + { SIOCIWFIRSTPRIV + 0x6, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, + 0, "set_ibssport" }, + { SIOCIWFIRSTPRIV + 0x7, 0, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, + "get_ibssport" }, + { SIOCIWFIRSTPRIV + 0x9, 0, + IW_PRIV_TYPE_BYTE | MAX_RID_LEN, + "get_rid" }, +}; + +#if WIRELESS_EXT > 12 + +/* + * Structures to export the Wireless Handlers + */ + +static const iw_handler orinoco_handler[] = +{ + (iw_handler) orinoco_ioctl_commit, /* SIOCSIWCOMMIT */ + (iw_handler) orinoco_ioctl_getname, /* SIOCGIWNAME */ + (iw_handler) NULL, /* SIOCSIWNWID */ + (iw_handler) NULL, /* SIOCGIWNWID */ + (iw_handler) orinoco_ioctl_setfreq, /* SIOCSIWFREQ */ + (iw_handler) orinoco_ioctl_getfreq, /* SIOCGIWFREQ */ + (iw_handler) orinoco_ioctl_setmode, /* SIOCSIWMODE */ + (iw_handler) orinoco_ioctl_getmode, /* SIOCGIWMODE */ + (iw_handler) orinoco_ioctl_setsens, /* SIOCSIWSENS */ + (iw_handler) orinoco_ioctl_getsens, /* SIOCGIWSENS */ + (iw_handler) NULL, /* SIOCSIWRANGE */ + (iw_handler) orinoco_ioctl_getiwrange, /* SIOCGIWRANGE */ + (iw_handler) NULL, /* SIOCSIWPRIV */ + (iw_handler) NULL, /* SIOCGIWPRIV */ + (iw_handler) NULL, /* SIOCSIWSTATS */ + (iw_handler) NULL, /* SIOCGIWSTATS */ + (iw_handler) orinoco_ioctl_setspy, /* SIOCSIWSPY */ + (iw_handler) orinoco_ioctl_getspy, /* SIOCGIWSPY */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) orinoco_ioctl_setwap, /* SIOCSIWAP */ + (iw_handler) orinoco_ioctl_getwap, /* SIOCGIWAP */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) NULL, /* SIOCGIWAPLIST */ +#if WIRELESS_EXT > 13 + (iw_handler) NULL, /* SIOCSIWSCAN */ + (iw_handler) NULL, /* SIOCGIWSCAN */ +#else /* WIRELESS_EXT > 13 */ + (iw_handler) NULL, /* SIOCSIWSCAN */ + (iw_handler) NULL, /* SIOCGIWSCAN */ +#endif /* WIRELESS_EXT > 13 */ + (iw_handler) orinoco_ioctl_setessid, /* SIOCSIWESSID */ + (iw_handler) orinoco_ioctl_getessid, /* SIOCGIWESSID */ + (iw_handler) orinoco_ioctl_setnick, /* SIOCSIWNICKN */ + (iw_handler) orinoco_ioctl_getnick, /* SIOCGIWNICKN */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) NULL, /* -- hole -- */ + (iw_handler) orinoco_ioctl_setrate, /* SIOCSIWRATE */ + (iw_handler) orinoco_ioctl_getrate, /* SIOCGIWRATE */ + (iw_handler) orinoco_ioctl_setrts, /* SIOCSIWRTS */ + (iw_handler) orinoco_ioctl_getrts, /* SIOCGIWRTS */ + (iw_handler) orinoco_ioctl_setfrag, /* SIOCSIWFRAG */ + (iw_handler) orinoco_ioctl_getfrag, /* SIOCGIWFRAG */ + (iw_handler) NULL, /* SIOCSIWTXPOW */ + (iw_handler) NULL, /* SIOCGIWTXPOW */ + (iw_handler) NULL, /* SIOCSIWRETRY */ + (iw_handler) orinoco_ioctl_getretry, /* SIOCGIWRETRY */ + (iw_handler) orinoco_ioctl_setiwencode, /* SIOCSIWENCODE */ + (iw_handler) orinoco_ioctl_getiwencode, /* SIOCGIWENCODE */ + (iw_handler) orinoco_ioctl_setpower, /* SIOCSIWPOWER */ + (iw_handler) orinoco_ioctl_getpower, /* SIOCGIWPOWER */ +}; + +/* + Added typecasting since we no longer use iwreq_data -- Moustafa + */ +static const iw_handler orinoco_private_handler[] = +{ + (iw_handler) orinoco_ioctl_reset, /* SIOCIWFIRSTPRIV */ + (iw_handler) orinoco_ioctl_reset, /* SIOCIWFIRSTPRIV + 1 */ + (iw_handler) orinoco_ioctl_setport3, /* SIOCIWFIRSTPRIV + 2 */ + (iw_handler) orinoco_ioctl_getport3, /* SIOCIWFIRSTPRIV + 3 */ + (iw_handler) orinoco_ioctl_setpreamble, /* SIOCIWFIRSTPRIV + 4 */ + (iw_handler) orinoco_ioctl_getpreamble, /* SIOCIWFIRSTPRIV + 5 */ + (iw_handler) orinoco_ioctl_setibssport, /* SIOCIWFIRSTPRIV + 6 */ + (iw_handler) orinoco_ioctl_getibssport, /* SIOCIWFIRSTPRIV + 7 */ + (iw_handler) NULL, /* SIOCIWFIRSTPRIV + 8 */ + (iw_handler) orinoco_ioctl_getrid /* SIOCIWFIRSTPRIV + 9 */ +}; + +static const struct iw_handler_def orinoco_handler_def = +{ + .num_standard = sizeof(orinoco_handler) / sizeof(iw_handler), + .num_private = sizeof(orinoco_private_handler) / sizeof(iw_handler), + .num_private_args = sizeof(orinoco_privtab) / sizeof(struct iw_priv_args), + .standard = (iw_handler *) orinoco_handler, + .private = (iw_handler *) orinoco_private_handler, + .private_args = (struct iw_priv_args *) orinoco_privtab, +}; +#endif /* WIRELESS_EXT > 12 */ + +#if WIRELESS_EXT <= 12 +/* Old style support for wireless extensions */ +static int orinoco_ioctl_we_old(struct net_device *dev, struct ifreq *rq, int cmd) +{ struct iwreq *wrq = (struct iwreq *)rq; int err = 0; - int tmp; - int changed = 0; - unsigned long flags; TRACE_ENTER(dev->name); - /* In theory, we could allow most of the the SET stuff to be - * done. In practice, the lapse of time at startup when the - * card is not ready is very short, so why bother... Note - * that netif_device_present is different from up/down - * (ifconfig), when the device is not yet up, it is usually - * already ready... Jean II */ - if (! netif_device_present(dev)) - return -ENODEV; - switch (cmd) { case SIOCGIWNAME: - strcpy(wrq->u.name, "IEEE 802.11-DS"); + err = orinoco_ioctl_getname(dev, NULL, wrq->u.name, NULL); break; case SIOCGIWAP: - wrq->u.ap_addr.sa_family = ARPHRD_ETHER; - err = orinoco_hw_get_bssid(priv, wrq->u.ap_addr.sa_data); + err = orinoco_ioctl_getwap(dev, NULL, &wrq->u.ap_addr, NULL); break; case SIOCGIWRANGE: - err = orinoco_ioctl_getiwrange(dev, &wrq->u.data); + { + struct iw_range range; + err = orinoco_ioctl_getiwrange(dev, NULL, + &(wrq->u.data), + (char *) &range); + if (copy_to_user(wrq->u.data.pointer, &range, + sizeof(struct iw_range))) + err = -EFAULT; + } break; case SIOCSIWMODE: - err = orinoco_lock(priv, &flags); - if (err) - return err; - switch (wrq->u.mode) { - case IW_MODE_ADHOC: - if (! (priv->has_ibss || priv->has_port3) ) - err = -EINVAL; - else { - priv->iw_mode = IW_MODE_ADHOC; - changed = 1; - } - break; - - case IW_MODE_INFRA: - priv->iw_mode = IW_MODE_INFRA; - changed = 1; - break; - - default: - err = -EINVAL; - break; - } - set_port_type(priv); - orinoco_unlock(priv, &flags); + err = orinoco_ioctl_setmode(dev, NULL, &wrq->u.mode, NULL); break; case SIOCGIWMODE: - err = orinoco_lock(priv, &flags); - if (err) - return err; - wrq->u.mode = priv->iw_mode; - orinoco_unlock(priv, &flags); + err = orinoco_ioctl_getmode(dev, NULL, &wrq->u.mode, NULL); break; case SIOCSIWENCODE: - if (! priv->has_wep) { - err = -EOPNOTSUPP; - break; + { + char keybuf[ORINOCO_MAX_KEY_SIZE]; + if (wrq->u.encoding.pointer) { + /* We actually have a key to set */ + if (wrq->u.encoding.length > ORINOCO_MAX_KEY_SIZE) { + err = -E2BIG; + break; + } + if (copy_from_user(keybuf, + wrq->u.encoding.pointer, + wrq->u.encoding.length)) { + err = -EFAULT; + break; + } + } else if (wrq->u.encoding.length != 0) { + err = -EINVAL; + break; + } + err = orinoco_ioctl_setiwencode(dev, NULL, + &(wrq->u.encoding), + keybuf); } - - err = orinoco_ioctl_setiwencode(dev, &wrq->u.encoding); - if (! err) - changed = 1; break; case SIOCGIWENCODE: - if (! priv->has_wep) { - err = -EOPNOTSUPP; - break; - } - - if (! capable(CAP_NET_ADMIN)) { - err = -EPERM; - break; + { + char keybuf[ORINOCO_MAX_KEY_SIZE]; + err = orinoco_ioctl_getiwencode(dev, NULL, + &(wrq->u.encoding), + keybuf); + if (wrq->u.encoding.pointer) { + if (copy_to_user(wrq->u.encoding.pointer, + keybuf, + wrq->u.encoding.length)) + err = -EFAULT; + } } - - err = orinoco_ioctl_getiwencode(dev, &wrq->u.encoding); break; case SIOCSIWESSID: - err = orinoco_ioctl_setessid(dev, &wrq->u.essid); - if (! err) - changed = 1; + { + char essidbuf[IW_ESSID_MAX_SIZE+1]; + if (wrq->u.essid.length > IW_ESSID_MAX_SIZE) { + err = -E2BIG; + break; + } + if (copy_from_user(essidbuf, wrq->u.essid.pointer, + wrq->u.essid.length)) { + err = -EFAULT; + break; + } + err = orinoco_ioctl_setessid(dev, NULL, + &(wrq->u.essid), + essidbuf); + } break; case SIOCGIWESSID: - err = orinoco_ioctl_getessid(dev, &wrq->u.essid); + { + char essidbuf[IW_ESSID_MAX_SIZE+1]; + err = orinoco_ioctl_getessid(dev, NULL, + &(wrq->u.essid), + essidbuf); + if (wrq->u.essid.pointer) + if ( copy_to_user(wrq->u.essid.pointer, + essidbuf, + wrq->u.essid.length) ) + err = -EFAULT; + } break; case SIOCSIWNICKN: - err = orinoco_ioctl_setnick(dev, &wrq->u.data); - if (! err) - changed = 1; + { + char nickbuf[IW_ESSID_MAX_SIZE+1]; + if (wrq->u.essid.length > IW_ESSID_MAX_SIZE) { + err = -E2BIG; + break; + } + if (copy_from_user(nickbuf, wrq->u.essid.pointer, + wrq->u.essid.length)) { + err = -EFAULT; + break; + } + err = orinoco_ioctl_setnick(dev, NULL, &(wrq->u.essid), + nickbuf); + } break; case SIOCGIWNICKN: - err = orinoco_ioctl_getnick(dev, &wrq->u.data); + { + char nickbuf[IW_ESSID_MAX_SIZE+1]; + err = orinoco_ioctl_getnick(dev, NULL, &(wrq->u.essid), + nickbuf); + if (wrq->u.essid.pointer) + if ( copy_to_user(wrq->u.essid.pointer, + nickbuf, + wrq->u.essid.length) ) + err = -EFAULT; + } break; case SIOCGIWFREQ: - tmp = orinoco_hw_get_freq(priv); - if (tmp < 0) { - err = tmp; - } else { - wrq->u.freq.m = tmp; - wrq->u.freq.e = 1; - } + err = orinoco_ioctl_getfreq(dev, NULL, &(wrq->u.freq), NULL); break; case SIOCSIWFREQ: - err = orinoco_ioctl_setfreq(dev, &wrq->u.freq); - if (! err) - changed = 1; + err = orinoco_ioctl_setfreq(dev, NULL, &(wrq->u.freq), NULL); break; case SIOCGIWSENS: - err = orinoco_ioctl_getsens(dev, &wrq->u.sens); + err = orinoco_ioctl_getsens(dev, NULL, &(wrq->u.sens), NULL); break; case SIOCSIWSENS: - err = orinoco_ioctl_setsens(dev, &wrq->u.sens); - if (! err) - changed = 1; + err = orinoco_ioctl_setsens(dev, NULL, &(wrq->u.sens), NULL); break; case SIOCGIWRTS: - wrq->u.rts.value = priv->rts_thresh; - wrq->u.rts.disabled = (wrq->u.rts.value == 2347); - wrq->u.rts.fixed = 1; + err = orinoco_ioctl_getrts(dev, NULL, &(wrq->u.rts), NULL); break; case SIOCSIWRTS: - err = orinoco_ioctl_setrts(dev, &wrq->u.rts); - if (! err) - changed = 1; + err = orinoco_ioctl_setrts(dev, NULL, &(wrq->u.rts), NULL); break; case SIOCSIWFRAG: - err = orinoco_ioctl_setfrag(dev, &wrq->u.frag); - if (! err) - changed = 1; + err = orinoco_ioctl_setfrag(dev, NULL, &(wrq->u.frag), NULL); break; case SIOCGIWFRAG: - err = orinoco_ioctl_getfrag(dev, &wrq->u.frag); + err = orinoco_ioctl_getfrag(dev, NULL, &(wrq->u.frag), NULL); break; case SIOCSIWRATE: - err = orinoco_ioctl_setrate(dev, &wrq->u.bitrate); - if (! err) - changed = 1; + err = orinoco_ioctl_setrate(dev, NULL, &(wrq->u.bitrate), + NULL); break; case SIOCGIWRATE: - err = orinoco_ioctl_getrate(dev, &wrq->u.bitrate); + err = orinoco_ioctl_getrate(dev, NULL, &(wrq->u.bitrate), + NULL); break; case SIOCSIWPOWER: - err = orinoco_ioctl_setpower(dev, &wrq->u.power); - if (! err) - changed = 1; + err = orinoco_ioctl_setpower(dev, NULL, &(wrq->u.power), NULL); break; case SIOCGIWPOWER: - err = orinoco_ioctl_getpower(dev, &wrq->u.power); - break; - - case SIOCGIWTXPOW: - /* The card only supports one tx power, so this is easy */ - wrq->u.txpower.value = 15; /* dBm */ - wrq->u.txpower.fixed = 1; - wrq->u.txpower.disabled = 0; - wrq->u.txpower.flags = IW_TXPOW_DBM; + err = orinoco_ioctl_getpower(dev, NULL, &(wrq->u.power), NULL); break; case SIOCSIWRETRY: @@ -3851,143 +4272,173 @@ break; case SIOCGIWRETRY: - err = orinoco_ioctl_getretry(dev, &wrq->u.retry); + err = orinoco_ioctl_getretry(dev, NULL, &(wrq->u.retry), NULL); break; case SIOCSIWSPY: - err = orinoco_ioctl_setspy(dev, &wrq->u.data); + { + struct sockaddr address[IW_MAX_SPY]; + /* Check the number of addresses */ + if (wrq->u.data.length > IW_MAX_SPY) { + err = -E2BIG; + break; + } + /* Get the data in the driver */ + if (wrq->u.data.pointer) { + if (copy_from_user((char *) address, + wrq->u.data.pointer, + sizeof(struct sockaddr) * + wrq->u.data.length)) { + err = -EFAULT; + break; + } + } else if (wrq->u.data.length != 0) { + err = -EINVAL; + break; + } + err = orinoco_ioctl_setspy(dev, NULL, &(wrq->u.data), + (char *) address); + } break; case SIOCGIWSPY: - err = orinoco_ioctl_getspy(dev, &wrq->u.data); + { + char buffer[IW_MAX_SPY * (sizeof(struct sockaddr) + + sizeof(struct iw_quality))]; + err = orinoco_ioctl_getspy(dev, NULL, &(wrq->u.data), + buffer); + if (wrq->u.data.pointer) { + if (copy_to_user(wrq->u.data.pointer, + buffer, + (wrq->u.data.length * + (sizeof(struct sockaddr) + + sizeof(struct iw_quality))) + )) + err = -EFAULT; + } + } break; case SIOCGIWPRIV: if (wrq->u.data.pointer) { - struct iw_priv_args privtab[] = { - { SIOCIWFIRSTPRIV + 0x0, 0, 0, "force_reset" }, - { SIOCIWFIRSTPRIV + 0x1, 0, 0, "card_reset" }, - { SIOCIWFIRSTPRIV + 0x2, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, - 0, "set_port3" }, - { SIOCIWFIRSTPRIV + 0x3, 0, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, - "get_port3" }, - { SIOCIWFIRSTPRIV + 0x4, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, - 0, "set_preamble" }, - { SIOCIWFIRSTPRIV + 0x5, 0, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, - "get_preamble" }, - { SIOCIWFIRSTPRIV + 0x6, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, - 0, "set_ibssport" }, - { SIOCIWFIRSTPRIV + 0x7, 0, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, - "get_ibssport" }, - { SIOCIWLASTPRIV, 0, 0, "dump_recs" }, - }; - - wrq->u.data.length = sizeof(privtab) / sizeof(privtab[0]); - if (copy_to_user(wrq->u.data.pointer, privtab, sizeof(privtab))) + wrq->u.data.length = ARRAY_SIZE(orinoco_privtab); + if (copy_to_user(wrq->u.data.pointer, + orinoco_privtab, + sizeof(orinoco_privtab))) err = -EFAULT; } break; case SIOCIWFIRSTPRIV + 0x0: /* force_reset */ case SIOCIWFIRSTPRIV + 0x1: /* card_reset */ - if (! capable(CAP_NET_ADMIN)) { - err = -EPERM; - break; + { + struct iw_request_info info; + info.cmd = cmd; + err = orinoco_ioctl_reset(dev, &info, &(wrq->u), + (char *) &(wrq->u)); } - - printk(KERN_DEBUG "%s: Force scheduling reset!\n", dev->name); - - schedule_work(&priv->reset_work); break; case SIOCIWFIRSTPRIV + 0x2: /* set_port3 */ - if (! capable(CAP_NET_ADMIN)) { - err = -EPERM; - break; - } - - err = orinoco_ioctl_setport3(dev, wrq); - if (! err) - changed = 1; + err = orinoco_ioctl_setport3(dev, NULL, &(wrq->u), + (char *) &(wrq->u)); break; case SIOCIWFIRSTPRIV + 0x3: /* get_port3 */ - err = orinoco_ioctl_getport3(dev, wrq); + err = orinoco_ioctl_getport3(dev, NULL, &(wrq->u), + (char *) &(wrq->u)); break; case SIOCIWFIRSTPRIV + 0x4: /* set_preamble */ - if (! capable(CAP_NET_ADMIN)) { - err = -EPERM; - break; - } - - /* 802.11b has recently defined some short preamble. - * Basically, the Phy header has been reduced in size. - * This increase performance, especially at high rates - * (the preamble is transmitted at 1Mb/s), unfortunately - * this give compatibility troubles... - Jean II */ - if(priv->has_preamble) { - int val = *( (int *) wrq->u.name ); - - err = orinoco_lock(priv, &flags); - if (err) - return err; - if (val) - priv->preamble = 1; - else - priv->preamble = 0; - orinoco_unlock(priv, &flags); - changed = 1; - } else - err = -EOPNOTSUPP; + err = orinoco_ioctl_setpreamble(dev, NULL, &(wrq->u), + (char *) &(wrq->u)); break; case SIOCIWFIRSTPRIV + 0x5: /* get_preamble */ - if(priv->has_preamble) { - int *val = (int *)wrq->u.name; - - err = orinoco_lock(priv, &flags); - if (err) - return err; - *val = priv->preamble; - orinoco_unlock(priv, &flags); - } else - err = -EOPNOTSUPP; + err = orinoco_ioctl_getpreamble(dev, NULL, &(wrq->u), + (char *) &(wrq->u)); break; - case SIOCIWFIRSTPRIV + 0x6: /* set_ibssport */ - if (! capable(CAP_NET_ADMIN)) { - err = -EPERM; - break; - } - err = orinoco_ioctl_setibssport(dev, wrq); - if (! err) - changed = 1; + case SIOCIWFIRSTPRIV + 0x6: /* set_ibssport */ + err = orinoco_ioctl_setibssport(dev, NULL, &(wrq->u), + (char *) &(wrq->u)); break; case SIOCIWFIRSTPRIV + 0x7: /* get_ibssport */ - err = orinoco_ioctl_getibssport(dev, wrq); + err = orinoco_ioctl_getibssport(dev, NULL, &(wrq->u), + (char *) &(wrq->u)); break; + case SIOCIWFIRSTPRIV + 0x9: /* get_rid */ + { + u16 lenght; + char *buffer = kmalloc(MAX_RID_LEN, GFP_KERNEL); + + if (!buffer) { + err = -ENOMEM; + break; + } + err = orinoco_ioctl_getrid(dev, NULL, &wrq->u.data, + buffer); + if (err) { + kfree(buffer); + break; + } + + lenght = min_t(u16, wrq->u.data.length, MAX_RID_LEN); + if (copy_to_user(wrq->u.data.pointer, buffer, + lenght) != 0) + err = -EFAULT; + + kfree(buffer); + } + break; default: err = -EOPNOTSUPP; } - if (! err && changed && netif_running(dev)) { - err = orinoco_reconfigure(dev); - } - + if (err == -EINPROGRESS) { + if (netif_running(dev)) + err = orinoco_ioctl_commit(dev, NULL, NULL, NULL); + else + err = 0; + } TRACE_EXIT(dev->name); return err; } +#endif /* WIRELESS_EXT > 12 */ + +static int orinoco_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) +{ + int err = 0; + + TRACE_ENTER(dev->name); + + /* In theory, we could allow most of the the SET stuff to be + * done. In practice, the lapse of time at startup when the + * card is not ready is very short, so why bother... Note + * that netif_device_present is different from up/down + * (ifconfig), when the device is not yet up, it is usually + * already ready... Jean II */ + if (! netif_device_present(dev)) + return -ENODEV; + +#if WIRELESS_EXT <= 12 + /* Old style wireless extensions support */ + if (cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST) + err = orinoco_ioctl_we_old(dev, rq, cmd); + else +#endif /* WIRELESS_EXT <= 12 */ + switch (cmd) { + default: + err = -EOPNOTSUPP; + } + + TRACE_EXIT(dev->name); + return err; +} /********************************************************************/ --- a/drivers/net/wireless/orinoco.h.10-wireless-handlers 2004-10-26 11:10:25.446963392 -0400 +++ b/drivers/net/wireless/orinoco.h 2004-10-26 12:42:22.112302784 -0400 @@ -23,6 +23,9 @@ /* To enable debug messages */ //#define ORINOCO_DEBUG 3 +#if (! defined (WIRELESS_EXT)) || (WIRELESS_EXT < 11) +#error "orinoco driver requires Wireless extensions v11 or later." +#endif /* (! defined (WIRELESS_EXT)) || (WIRELESS_EXT < 11) */ #define WIRELESS_SPY // enable iwspy support #define ORINOCO_MAX_KEY_SIZE 14 @@ -61,16 +64,21 @@ #define FIRMWARE_TYPE_AGERE 1 #define FIRMWARE_TYPE_INTERSIL 2 #define FIRMWARE_TYPE_SYMBOL 3 - int has_ibss, has_port3, has_ibss_any, ibss_port; - int has_wep, has_big_wep; - int has_mwo; - int has_pm; - int has_preamble; - int has_sensitivity; + int ibss_port; + int has_ibss_any; int nicbuf_size; u16 channel_mask; - int broken_disableport; + /* Boolean capabilities */ + unsigned int has_ibss:1; + unsigned int has_port3:1; + unsigned int has_wep:1; + unsigned int has_big_wep:1; + unsigned int has_mwo:1; + unsigned int has_pm:1; + unsigned int has_preamble:1; + unsigned int has_sensitivity:1; + unsigned int broken_disableport:1; unsigned int irq_no_disable:1; /* Configuration paramaters */ @@ -81,6 +89,8 @@ int bitratemode; char nick[IW_ESSID_MAX_SIZE+1]; char desired_essid[IW_ESSID_MAX_SIZE+1]; + char desired_bssid[ETH_ALEN]; + int bssid_fixed; u16 frag_thresh, mwo_robust; u16 channel; u16 ap_density, rts_thresh; From jgarzik@pobox.com Tue Oct 26 12:15:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 12:15:39 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QJFWlw024805 for ; Tue, 26 Oct 2004 12:15:33 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CMWmq-0003Zb-4M; Tue, 26 Oct 2004 20:15:16 +0100 Message-ID: <417EA235.5070700@pobox.com> Date: Tue, 26 Oct 2004 15:15:01 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" CC: netdev@oss.sgi.com Subject: Re: [BK PATCHES] misc tg3 stuff References: <20041026165955.GA27136@havoc.gtf.org> <20041026115555.390fcbbb.davem@davemloft.net> In-Reply-To: <20041026115555.390fcbbb.davem@davemloft.net> Content-Type: multipart/mixed; boundary="------------070800080703090807010501" X-archive-position: 10860 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: 5166 Lines: 172 This is a multi-part message in MIME format. --------------070800080703090807010501 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit David S. Miller wrote: > On Tue, 26 Oct 2004 12:59:55 -0400 > Jeff Garzik wrote: > > >>Please do a >> >> bk pull bk://kernel.bkbits.net/jgarzik/tg3-2.6 >> >>This will update the following files: >> >> drivers/net/tg3.c | 22 +++++++++++----------- >> 1 files changed, 11 insertions(+), 11 deletions(-) > > > Your attached patch was full of e100 stuff and many > other totally unrelated changes, there were even crypto > layer diffs in there as well :-) > > When you do range diffs with bitkeeper you have to > be really careful. Looks like I attached the wrong diff, sorry. The repository itself has the correct stuff in it :) Attached new one... Jeff --------------070800080703090807010501 Content-Type: text/plain; name="linus.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="linus.txt" Please do a bk pull bk://kernel.bkbits.net/jgarzik/tg3-2.6 This will update the following files: drivers/net/tg3.c | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-) through these ChangeSets: (04/10/15 1.1988.105.3) [PATCH] tg3: make driver only data static Several data structures should have been marked static because the are local to this driver. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik (04/10/15 1.1988.105.2) [PATCH] tg3: use netdev_priv use netdev_priv Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik (04/10/15 1.1988.105.1) [PATCH] tg3: use module_param get rid of deprecated use of MODULE_PARM Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik diff -Nru a/drivers/net/tg3.c b/drivers/net/tg3.c --- a/drivers/net/tg3.c 2004-10-26 15:14:02 -04:00 +++ b/drivers/net/tg3.c 2004-10-26 15:14:02 -04:00 @@ -12,7 +12,7 @@ #include #include - +#include #include #include #include @@ -141,11 +141,11 @@ MODULE_AUTHOR("David S. Miller (davem@redhat.com) and Jeff Garzik (jgarzik@pobox.com)"); MODULE_DESCRIPTION("Broadcom Tigon3 ethernet driver"); MODULE_LICENSE("GPL"); -MODULE_PARM(tg3_debug, "i"); -MODULE_PARM_DESC(tg3_debug, "Tigon3 bitmapped debugging message enable value"); MODULE_VERSION(DRV_MODULE_VERSION); static int tg3_debug = -1; /* -1 == use TG3_DEF_MSG_ENABLE as value */ +module_param(tg3_debug, int, 0); +MODULE_PARM_DESC(tg3_debug, "Tigon3 bitmapped debugging message enable value"); static struct pci_device_id tg3_pci_tbl[] = { { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5700, @@ -225,8 +225,8 @@ MODULE_DEVICE_TABLE(pci, tg3_pci_tbl); -struct { - char string[ETH_GSTRING_LEN]; +static struct { + const char string[ETH_GSTRING_LEN]; } ethtool_stats_keys[TG3_NUM_STATS] = { { "rx_octets" }, { "rx_fragments" }, @@ -4505,7 +4505,7 @@ 0xac470014, 0xac4a0018, 0x03e00008, 0xac4b001c, 0x00000000, 0x00000000, }; -u32 tg3TsoFwRodata[] = { +static u32 tg3TsoFwRodata[] = { 0x4d61696e, 0x43707542, 0x00000000, 0x4d61696e, 0x43707541, 0x00000000, 0x00000000, 0x00000000, 0x73746b6f, 0x66666c64, 0x496e0000, 0x73746b6f, 0x66662a2a, 0x00000000, 0x53774576, 0x656e7430, 0x00000000, 0x00000000, @@ -4513,7 +4513,7 @@ 0x00000000, }; -u32 tg3TsoFwData[] = { +static u32 tg3TsoFwData[] = { 0x00000000, 0x73746b6f, 0x66666c64, 0x5f76312e, 0x362e3000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, @@ -4694,14 +4694,14 @@ 0x00000000, 0x00000000, 0x00000000, }; -u32 tg3Tso5FwRodata[(TG3_TSO5_FW_RODATA_LEN / 4) + 1] = { +static u32 tg3Tso5FwRodata[(TG3_TSO5_FW_RODATA_LEN / 4) + 1] = { 0x4d61696e, 0x43707542, 0x00000000, 0x4d61696e, 0x43707541, 0x00000000, 0x00000000, 0x00000000, 0x73746b6f, 0x66666c64, 0x00000000, 0x00000000, 0x73746b6f, 0x66666c64, 0x00000000, 0x00000000, 0x66617461, 0x6c457272, 0x00000000, 0x00000000, 0x00000000, }; -u32 tg3Tso5FwData[(TG3_TSO5_FW_DATA_LEN / 4) + 1] = { +static u32 tg3Tso5FwData[(TG3_TSO5_FW_DATA_LEN / 4) + 1] = { 0x00000000, 0x73746b6f, 0x66666c64, 0x5f76312e, 0x322e3000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, }; @@ -6324,7 +6324,7 @@ u32 offset, u32 *val); static int tg3_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, u8 *data) { - struct tg3 *tp = dev->priv; + struct tg3 *tp = netdev_priv(dev); int ret; u8 *pd; u32 i, offset, len, val, b_offset, b_count; @@ -6686,7 +6686,7 @@ static void tg3_get_ethtool_stats (struct net_device *dev, struct ethtool_stats *estats, u64 *tmp_stats) { - struct tg3 *tp = dev->priv; + struct tg3 *tp = netdev_priv(dev); memcpy(tmp_stats, tg3_get_estats(tp), sizeof(tp->estats)); } --------------070800080703090807010501-- From dcbw@redhat.com Tue Oct 26 12:18:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 12:19:01 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QJIssq025244 for ; Tue, 26 Oct 2004 12:18:55 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9QJIRuv023208; Tue, 26 Oct 2004 15:18:27 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9QJIQr11883; Tue, 26 Oct 2004 15:18:26 -0400 Received: from dcbw.boston.redhat.com (dcbw.boston.redhat.com [172.16.80.23]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9QJIPPd016711; Tue, 26 Oct 2004 15:18:25 -0400 Subject: [PATCH 2.6.10-rc1 11/15] wireless/orinoco: Clean up firmware version & capability detection From: Dan Williams To: netdev@oss.sgi.com Cc: jgarzik@redhat.com, hermes@gibson.dropbear.id.au In-Reply-To: <1098814320.3663.24.camel@dcbw.boston.redhat.com> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> Content-Type: text/plain Date: Tue, 26 Oct 2004 15:18:31 -0400 Message-Id: <1098818311.3663.81.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-1) Content-Transfer-Encoding: 7bit X-archive-position: 10861 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcbw@redhat.com Precedence: bulk X-list: netdev Content-Length: 8265 Lines: 261 Update in-kernel orinoco wireless drivers to upstream CVS. None of this is original code by Dan Williams, simply a broken down patch set split-out from upstream orinoco CVS. o Clean up firmware version & capability detection Signed-off-by: Dan Williams --- a/drivers/net/wireless/orinoco.c.11-firmware-fixes 2004-10-26 15:15:11.454350912 -0400 +++ b/drivers/net/wireless/orinoco.c 2004-10-26 15:15:11.456350608 -0400 @@ -1452,7 +1452,7 @@ return err; err = hermes_allocate(hw, priv->nicbuf_size, &priv->txfid); - if (err == -EIO) { + if (err == -EIO && priv->nicbuf_size > TX_NICBUF_SIZE_BUG) { /* Try workaround for old Symbol firmware bug */ printk(KERN_WARNING "%s: firmware ALLOC bug detected " "(old Symbol firmware?). Trying to work around... ", @@ -2098,39 +2098,54 @@ /* Initialization */ /********************************************************************/ -struct sta_id { +struct comp_id { u16 id, variant, major, minor; } __attribute__ ((packed)); -static int determine_firmware_type(struct net_device *dev, struct sta_id *sta_id) +static inline fwtype_t determine_firmware_type(struct comp_id *nic_id) { - /* FIXME: this is fundamentally broken */ - unsigned int firmver = ((u32)sta_id->major << 16) | sta_id->minor; - - if (sta_id->variant == 1) + if (nic_id->id < 0x8000) return FIRMWARE_TYPE_AGERE; - else if ((sta_id->variant == 2) && - ((firmver == 0x10001) || (firmver == 0x20001))) + else if (nic_id->id == 0x8000 && nic_id->major == 0) return FIRMWARE_TYPE_SYMBOL; else return FIRMWARE_TYPE_INTERSIL; } -static void determine_firmware(struct net_device *dev) +/* Set priv->firmware type, determine firmware properties */ +static int determine_firmware(struct net_device *dev) { struct orinoco_private *priv = netdev_priv(dev); hermes_t *hw = &priv->hw; int err; - struct sta_id sta_id; + struct comp_id nic_id, sta_id; unsigned int firmver; char tmp[SYMBOL_MAX_VER_LEN+1]; + /* Get the hardware version */ + err = HERMES_READ_RECORD(hw, USER_BAP, HERMES_RID_NICID, &nic_id); + if (err) { + printk(KERN_ERR "%s: Cannot read hardware identity: error %d\n", + dev->name, err); + return err; + } + + le16_to_cpus(&nic_id.id); + le16_to_cpus(&nic_id.variant); + le16_to_cpus(&nic_id.major); + le16_to_cpus(&nic_id.minor); + printk(KERN_DEBUG "%s: Hardware identity %04x:%04x:%04x:%04x\n", + dev->name, nic_id.id, nic_id.variant, + nic_id.major, nic_id.minor); + + priv->firmware_type = determine_firmware_type(&nic_id); + /* Get the firmware version */ err = HERMES_READ_RECORD(hw, USER_BAP, HERMES_RID_STAID, &sta_id); if (err) { printk(KERN_ERR "%s: Cannot read station identity: error %d\n", dev->name, err); - memset(&sta_id, 0, sizeof(sta_id)); + return err; } le16_to_cpus(&sta_id.id); @@ -2141,8 +2156,23 @@ dev->name, sta_id.id, sta_id.variant, sta_id.major, sta_id.minor); - if (! priv->firmware_type) - priv->firmware_type = determine_firmware_type(dev, &sta_id); + switch (sta_id.id) { + case 0x15: + printk(KERN_ERR "%s: Primary firmware is active\n", + dev->name); + return -ENODEV; + case 0x14b: + printk(KERN_ERR "%s: Tertiary firmware is active\n", + dev->name); + return -ENODEV; + case 0x1f: /* Intersil, Agere, Symbol Spectrum24 */ + case 0x21: /* Symbol Spectrum24 Trilogy */ + break; + default: + printk(KERN_NOTICE "%s: Unknown station ID, please report\n", + dev->name); + break; + } /* Default capabilities */ priv->has_sensitivity = 1; @@ -2158,9 +2188,8 @@ case FIRMWARE_TYPE_AGERE: /* Lucent Wavelan IEEE, Lucent Orinoco, Cabletron RoamAbout, ELSA, Melco, HP, IBM, Dell 1150, Compaq 110/210 */ - printk(KERN_DEBUG "%s: Looks like a Lucent/Agere firmware " - "version %d.%02d\n", dev->name, - sta_id.major, sta_id.minor); + snprintf(priv->fw_name, sizeof(priv->fw_name) - 1, + "Lucent/Agere %d.%02d", sta_id.major, sta_id.minor); firmver = ((unsigned long)sta_id.major << 16) | sta_id.minor; @@ -2203,16 +2232,19 @@ tmp[SYMBOL_MAX_VER_LEN] = '\0'; } - printk(KERN_DEBUG "%s: Looks like a Symbol firmware " - "version [%s] (parsing to %X)\n", dev->name, - tmp, firmver); + snprintf(priv->fw_name, sizeof(priv->fw_name) - 1, + "Symbol %s", tmp); priv->has_ibss = (firmver >= 0x20000); priv->has_wep = (firmver >= 0x15012); priv->has_big_wep = (firmver >= 0x20000); - priv->has_pm = (firmver >= 0x20000) && (firmver < 0x22000); + priv->has_pm = (firmver >= 0x20000 && firmver < 0x22000) || + (firmver >= 0x29000 && firmver < 0x30000) || + firmver >= 0x31000; priv->has_preamble = (firmver >= 0x20000); priv->ibss_port = 4; + priv->broken_disableport = (firmver == 0x25013) || + (firmver >= 0x30000 && firmver <= 0x31000); /* Tested with Intel firmware : 0x20015 => Jean II */ /* Tested with 3Com firmware : 0x15012 & 0x22001 => Jean II */ break; @@ -2222,9 +2254,9 @@ * different and less well tested */ /* D-Link MAC : 00:40:05:* */ /* Addtron MAC : 00:90:D1:* */ - printk(KERN_DEBUG "%s: Looks like an Intersil firmware " - "version %d.%d.%d\n", dev->name, - sta_id.major, sta_id.minor, sta_id.variant); + snprintf(priv->fw_name, sizeof(priv->fw_name) - 1, + "Intersil %d.%d.%d", sta_id.major, sta_id.minor, + sta_id.variant); firmver = ((unsigned long)sta_id.major << 16) | ((unsigned long)sta_id.minor << 8) | sta_id.variant; @@ -2242,9 +2274,11 @@ priv->ibss_port = 1; } break; - default: - break; } + printk(KERN_DEBUG "%s: Firmware determined as %s\n", dev->name, + priv->fw_name); + + return 0; } static int orinoco_init(struct net_device *dev) @@ -2263,14 +2297,19 @@ priv->nicbuf_size = IEEE802_11_FRAME_LEN + ETH_HLEN; /* Initialize the firmware */ - err = hermes_init(hw); + err = orinoco_reinit_firmware(dev); if (err != 0) { printk(KERN_ERR "%s: failed to initialize firmware (err = %d)\n", dev->name, err); goto out; } - determine_firmware(dev); + err = determine_firmware(dev); + if (err != 0) { + printk(KERN_ERR "%s: Incompatible firmware, aborting\n", + dev->name); + goto out; + } if (priv->has_port3) printk(KERN_DEBUG "%s: Ad-hoc demo mode supported\n", dev->name); @@ -2391,31 +2430,12 @@ /* By default use IEEE/IBSS ad-hoc mode if we have it */ priv->prefer_port3 = priv->has_port3 && (! priv->has_ibss); set_port_type(priv); - priv->channel = 10; /* default channel, more-or-less arbitrary */ + priv->channel = 0; /* use firmware default */ priv->promiscuous = 0; priv->wep_on = 0; priv->tx_key = 0; - err = hermes_allocate(hw, priv->nicbuf_size, &priv->txfid); - if (err == -EIO) { - /* Try workaround for old Symbol firmware bug */ - printk(KERN_WARNING "%s: firmware ALLOC bug detected " - "(old Symbol firmware?). Trying to work around... ", - dev->name); - - priv->nicbuf_size = TX_NICBUF_SIZE_BUG; - err = hermes_allocate(hw, priv->nicbuf_size, &priv->txfid); - if (err) - printk("failed!\n"); - else - printk("ok.\n"); - } - if (err) { - printk("%s: Error %d allocating Tx buffer\n", dev->name, err); - goto out; - } - /* Make the hardware available, as long as it hasn't been * removed elsewhere (e.g. by PCMCIA hot unplug) */ orinoco_spin_lock(priv); --- a/drivers/net/wireless/orinoco.h.11-firmware-fixes 2004-10-26 15:15:11.454350912 -0400 +++ b/drivers/net/wireless/orinoco.h 2004-10-26 15:15:11.456350608 -0400 @@ -36,6 +36,12 @@ char data[ORINOCO_MAX_KEY_SIZE]; } __attribute__ ((packed)); +typedef enum { + FIRMWARE_TYPE_AGERE, + FIRMWARE_TYPE_INTERSIL, + FIRMWARE_TYPE_SYMBOL +} fwtype_t; + struct orinoco_private { void *card; /* Pointer to card dependent structure */ int (*hard_reset)(struct orinoco_private *); @@ -60,12 +66,9 @@ u16 txfid; /* Capabilities of the hardware/firmware */ - int firmware_type; -#define FIRMWARE_TYPE_AGERE 1 -#define FIRMWARE_TYPE_INTERSIL 2 -#define FIRMWARE_TYPE_SYMBOL 3 + fwtype_t firmware_type; + char fw_name[32]; int ibss_port; - int has_ibss_any; int nicbuf_size; u16 channel_mask; From dcbw@redhat.com Tue Oct 26 12:20:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 12:20:49 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QJKi2P028867 for ; Tue, 26 Oct 2004 12:20:44 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9QJKOMI023580; Tue, 26 Oct 2004 15:20:24 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9QJKOr12354; Tue, 26 Oct 2004 15:20:24 -0400 Received: from dcbw.boston.redhat.com (dcbw.boston.redhat.com [172.16.80.23]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9QJKNPd016842; Tue, 26 Oct 2004 15:20:23 -0400 Subject: [PATCH 2.6.10-rc1 12/15] wireless/orinoco: Use netif routines rather than keeping link state ourselves From: Dan Williams To: netdev@oss.sgi.com Cc: jgarzik@redhat.com, hermes@gibson.dropbear.id.au In-Reply-To: <1098814320.3663.24.camel@dcbw.boston.redhat.com> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> Content-Type: text/plain Date: Tue, 26 Oct 2004 15:20:29 -0400 Message-Id: <1098818429.3663.84.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-1) Content-Transfer-Encoding: 7bit X-archive-position: 10862 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcbw@redhat.com Precedence: bulk X-list: netdev Content-Length: 3782 Lines: 144 Update in-kernel orinoco wireless drivers to upstream CVS. None of this is original code by Dan Williams, simply a broken down patch set split-out from upstream orinoco CVS. o Use netif routines rather than keeping link state ourselves Signed-off-by: Dan Williams --- a/drivers/net/wireless/orinoco.c.12-netif 2004-10-26 13:09:22.313994688 -0400 +++ b/drivers/net/wireless/orinoco.c 2004-10-26 13:20:51.649199808 -0400 @@ -851,7 +851,7 @@ return 1; } - if (! priv->connected) { + if (! netif_carrier_ok(dev)) { /* Oops, the firmware hasn't established a connection, silently drop the packet (this seems to be the safest approach). */ @@ -966,8 +966,6 @@ printk(KERN_WARNING "%s: Allocate event on unexpected fid (%04X)\n", dev->name, fid); return; - } else { - netif_wake_queue(dev); } hermes_write_regn(hw, ALLOCFID, DUMMY_FID); @@ -980,6 +978,8 @@ stats->tx_packets++; + netif_wake_queue(dev); + hermes_write_regn(hw, TXCOMPLFID, DUMMY_FID); } @@ -1006,6 +1006,8 @@ stats->tx_errors++; + netif_wake_queue(dev); + hermes_write_regn(hw, TXCOMPLFID, DUMMY_FID); } @@ -1338,6 +1340,7 @@ case HERMES_INQ_LINKSTATUS: { struct hermes_linkstatus linkstatus; u16 newstatus; + int connected; if (len != sizeof(linkstatus)) { printk(KERN_WARNING "%s: Unexpected size for linkstatus frame (%d bytes)\n", @@ -1345,24 +1348,26 @@ break; } - hermes_read_words(hw, HERMES_DATA1, (void *) &linkstatus, - len / 2); + err = hermes_bap_pread(hw, IRQ_BAP, &linkstatus, len, + infofid, sizeof(info)); + if (err) + break; + newstatus = le16_to_cpu(linkstatus.linkstatus); - if ( (newstatus == HERMES_LINKSTATUS_CONNECTED) + connected = (newstatus == HERMES_LINKSTATUS_CONNECTED) || (newstatus == HERMES_LINKSTATUS_AP_CHANGE) - || (newstatus == HERMES_LINKSTATUS_AP_IN_RANGE) ) - priv->connected = 1; - else if ( (newstatus == HERMES_LINKSTATUS_NOT_CONNECTED) - || (newstatus == HERMES_LINKSTATUS_DISCONNECTED) - || (newstatus == HERMES_LINKSTATUS_AP_OUT_OF_RANGE) - || (newstatus == HERMES_LINKSTATUS_ASSOC_FAILED) ) - priv->connected = 0; + || (newstatus == HERMES_LINKSTATUS_AP_IN_RANGE); - if (newstatus != priv->last_linkstatus) - print_linkstatus(dev, newstatus); + if (connected) + netif_carrier_on(dev); + else if (!ignore_disconnect) + netif_carrier_off(dev); - priv->last_linkstatus = newstatus; + if (newstatus != priv->last_linkstatus) { + priv->last_linkstatus = newstatus; + print_linkstatus(dev, newstatus); + } } break; default: @@ -1389,6 +1394,8 @@ struct hermes *hw = &priv->hw; int err; + netif_carrier_off(dev); /* just to make sure */ + err = __orinoco_program_rids(dev); if (err) { printk(KERN_ERR "%s: Error %d configuring card\n", @@ -1435,8 +1442,8 @@ } /* firmware will have to reassociate */ + netif_carrier_off(dev); priv->last_linkstatus = 0xffff; - priv->connected = 0; return 0; } @@ -1957,7 +1964,7 @@ priv->hw_unavailable++; priv->last_linkstatus = 0xffff; /* firmware will have to reassociate */ - priv->connected = 0; + netif_carrier_off(dev); orinoco_unlock(priv, &flags); @@ -2493,8 +2500,8 @@ * hardware */ INIT_WORK(&priv->reset_work, (void (*)(void *))orinoco_reset, dev); + netif_carrier_off(dev); priv->last_linkstatus = 0xffff; - priv->connected = 0; return dev; --- a/drivers/net/wireless/orinoco.h.12-netif 2004-10-26 13:09:29.785858792 -0400 +++ b/drivers/net/wireless/orinoco.h 2004-10-26 13:09:38.486536088 -0400 @@ -54,7 +54,6 @@ /* driver state */ int open; u16 last_linkstatus; - int connected; /* Net device stuff */ struct net_device *ndev; From dcbw@redhat.com Tue Oct 26 12:22:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 12:22:50 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QJMhHb029209 for ; Tue, 26 Oct 2004 12:22:43 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9QJMNIV024172; Tue, 26 Oct 2004 15:22:23 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9QJMMr13061; Tue, 26 Oct 2004 15:22:22 -0400 Received: from dcbw.boston.redhat.com (dcbw.boston.redhat.com [172.16.80.23]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9QJMLPd017003; Tue, 26 Oct 2004 15:22:21 -0400 Subject: [PATCH 2.6.10-rc1 13/15] wireless/orinoco: RF monitor mode support From: Dan Williams To: netdev@oss.sgi.com Cc: jgarzik@redhat.com, hermes@gibson.dropbear.id.au In-Reply-To: <1098814320.3663.24.camel@dcbw.boston.redhat.com> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> Content-Type: text/plain Date: Tue, 26 Oct 2004 15:22:27 -0400 Message-Id: <1098818547.3663.87.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-1) Content-Transfer-Encoding: 7bit X-archive-position: 10863 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcbw@redhat.com Precedence: bulk X-list: netdev Content-Length: 20062 Lines: 706 Update in-kernel orinoco wireless drivers to upstream CVS. None of this is original code by Dan Williams, simply a broken down patch set split-out from upstream orinoco CVS. o o RF monitor mode support (Pavel Roskin) Signed-off-by: Dan Williams --- a/drivers/net/wireless/orinoco.c.13-monitor-mode 2004-10-26 13:22:02.674402336 -0400 +++ b/drivers/net/wireless/orinoco.c 2004-10-26 13:38:35.020542792 -0400 @@ -612,26 +612,45 @@ /* Data types */ /********************************************************************/ -struct header_struct { - /* 802.3 */ - u8 dest[ETH_ALEN]; - u8 src[ETH_ALEN]; - u16 len; - /* 802.2 */ +/* Used in Event handling. + * We avoid nested structres as they break on ARM -- Moustafa */ +struct hermes_tx_descriptor_802_11 { + /* hermes_tx_descriptor */ + u16 status; + u16 reserved1; + u16 reserved2; + u32 sw_support; + u8 retry_count; + u8 tx_rate; + u16 tx_control; + + /* ieee802_11_hdr */ + u16 frame_ctl; + u16 duration_id; + u8 addr1[ETH_ALEN]; + u8 addr2[ETH_ALEN]; + u8 addr3[ETH_ALEN]; + u16 seq_ctl; + u8 addr4[ETH_ALEN]; + u16 data_len; + + /* ethhdr */ + unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ + unsigned char h_source[ETH_ALEN]; /* source ether addr */ + unsigned short h_proto; /* packet type ID field */ + + /* p8022_hdr */ u8 dsap; u8 ssap; u8 ctrl; - /* SNAP */ u8 oui[3]; + u16 ethertype; } __attribute__ ((packed)); -/* 802.2 LLC/SNAP header used for Ethernet encapsulation over 802.11 */ -u8 encaps_hdr[] = {0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00}; - -#define ENCAPS_OVERHEAD (sizeof(encaps_hdr) + 2) - +/* Rx frame header except compatibility 802.3 header */ struct hermes_rx_descriptor { + /* Control */ u16 status; u32 time; u8 silence; @@ -639,6 +658,18 @@ u8 rate; u8 rxflow; u32 reserved; + + /* 802.11 header */ + u16 frame_ctl; + u16 duration_id; + u8 addr1[ETH_ALEN]; + u8 addr2[ETH_ALEN]; + u8 addr3[ETH_ALEN]; + u16 seq_ctl; + u8 addr4[ETH_ALEN]; + + /* Data length */ + u16 data_len; } __attribute__ ((packed)); /********************************************************************/ @@ -669,6 +700,10 @@ priv->createibss = 1; } break; + case IW_MODE_MONITOR: + priv->port_type = 3; + priv->createibss = 0; + break; default: printk(KERN_ERR "%s: Invalid priv->iw_mode in set_port_type()\n", priv->ndev->name); @@ -851,7 +886,7 @@ return 1; } - if (! netif_carrier_ok(dev)) { + if (! netif_carrier_ok(dev) || (priv->iw_mode == IW_MODE_MONITOR)) { /* Oops, the firmware hasn't established a connection, silently drop the packet (this seems to be the safest approach). */ @@ -988,27 +1023,57 @@ struct orinoco_private *priv = netdev_priv(dev); struct net_device_stats *stats = &priv->stats; u16 fid = hermes_read_regn(hw, TXCOMPLFID); - struct hermes_tx_descriptor desc; + struct hermes_tx_descriptor_802_11 hdr; int err = 0; if (fid == DUMMY_FID) return; /* Nothing's really happened */ - err = hermes_bap_pread(hw, IRQ_BAP, &desc, sizeof(desc), fid, 0); + /* Read the frame header */ + err = hermes_bap_pread(hw, IRQ_BAP, &hdr, + sizeof(struct hermes_tx_descriptor) + + sizeof(struct ieee802_11_hdr), + fid, 0); + + hermes_write_regn(hw, TXCOMPLFID, DUMMY_FID); + stats->tx_errors++; + if (err) { printk(KERN_WARNING "%s: Unable to read descriptor on Tx error " "(FID=%04X error %d)\n", dev->name, fid, err); - } else { - DEBUG(1, "%s: Tx error, status %d\n", - dev->name, le16_to_cpu(desc.status)); + return; } - stats->tx_errors++; + DEBUG(1, "%s: Tx error, err %d (FID=%04X)\n", dev->name, + err, fid); + +#if WIRELESS_EXT > 13 + /* We produce a TXDROP event only for retry or lifetime + * exceeded, because that's the only status that really mean + * that this particular node went away. + * Other errors means that *we* screwed up. - Jean II */ + hdr.status = le16_to_cpu(hdr.status); + if (hdr.status & (HERMES_TXSTAT_RETRYERR | HERMES_TXSTAT_AGEDERR)) { + union iwreq_data wrqu; + + /* Copy 802.11 dest address. + * We use the 802.11 header because the frame may + * not be 802.3 or may be mangled... + * In Ad-Hoc mode, it will be the node address. + * In managed mode, it will be most likely the AP addr + * User space will figure out how to convert it to + * whatever it needs (IP address or else). + * - Jean II */ + memcpy(wrqu.addr.sa_data, hdr.addr1, ETH_ALEN); + wrqu.addr.sa_family = ARPHRD_ETHER; - netif_wake_queue(dev); + /* Send event to user space */ + wireless_send_event(dev, IWEVTXDROP, &wrqu, NULL); + } +#endif /* WIRELESS_EXT > 13 */ - hermes_write_regn(hw, TXCOMPLFID, DUMMY_FID); + netif_wake_queue(dev); } static void orinoco_tx_timeout(struct net_device *dev) @@ -1033,15 +1098,17 @@ /* Does the frame have a SNAP header indicating it should be * de-encapsulated to Ethernet-II? */ -static inline int is_ethersnap(struct header_struct *hdr) +static inline int is_ethersnap(void *_hdr) { + u8 *hdr = _hdr; + /* We de-encapsulate all packets which, a) have SNAP headers * (i.e. SSAP=DSAP=0xaa and CTRL=0x3 in the 802.2 LLC header * and where b) the OUI of the SNAP header is 00:00:00 or * 00:00:f8 - we need both because different APs appear to use * different OUIs for some reason */ - return (memcmp(&hdr->dsap, &encaps_hdr, 5) == 0) - && ( (hdr->oui[2] == 0x00) || (hdr->oui[2] == 0xf8) ); + return (memcmp(hdr, &encaps_hdr, 5) == 0) + && ( (hdr[5] == 0x00) || (hdr[5] == 0xf8) ); } static inline void orinoco_spy_gather(struct net_device *dev, u_char *mac, @@ -1083,18 +1150,124 @@ } } -static void __orinoco_ev_rx(struct net_device *dev, hermes_t *hw) +/* + * orinoco_rx_monitor - handle received monitor frames. + * + * Arguments: + * dev network device + * rxfid received FID + * desc rx descriptor of the frame + * + * Call context: interrupt + */ +static void orinoco_rx_monitor(struct net_device *dev, u16 rxfid, + struct hermes_rx_descriptor *desc) +{ + u32 hdrlen = 30; /* return full header by default */ + u32 datalen = 0; + u16 fc; + int err; + int len; + struct sk_buff *skb; + struct orinoco_private *priv = netdev_priv(dev); + struct net_device_stats *stats = &priv->stats; + hermes_t *hw = &priv->hw; + + len = le16_to_cpu(desc->data_len); + + /* Determine the size of the header and the data */ + fc = le16_to_cpu(desc->frame_ctl); + switch (fc & IEEE802_11_FCTL_FTYPE) { + case IEEE802_11_FTYPE_DATA: + if ((fc & IEEE802_11_FCTL_TODS) + && (fc & IEEE802_11_FCTL_FROMDS)) + hdrlen = 30; + else + hdrlen = 24; + datalen = len; + break; + case IEEE802_11_FTYPE_MGMT: + hdrlen = 24; + datalen = len; + break; + case IEEE802_11_FTYPE_CTL: + switch (fc & IEEE802_11_FCTL_STYPE) { + case IEEE802_11_STYPE_PSPOLL: + case IEEE802_11_STYPE_RTS: + case IEEE802_11_STYPE_CFEND: + case IEEE802_11_STYPE_CFENDACK: + hdrlen = 16; + break; + case IEEE802_11_STYPE_CTS: + case IEEE802_11_STYPE_ACK: + hdrlen = 10; + break; + } + break; + default: + /* Unknown frame type */ + break; + } + + /* sanity check the length */ + if (datalen > IEEE802_11_DATA_LEN + 12) { + printk(KERN_DEBUG "%s: oversized monitor frame, " + "data length = %d\n", dev->name, datalen); + err = -EIO; + goto drop; + } + + skb = dev_alloc_skb(hdrlen + datalen); + if (!skb) { + printk(KERN_WARNING "%s: Cannot allocate skb for monitor frame\n", + dev->name); + err = -ENOMEM; + goto drop; + } + + /* Copy the 802.11 header to the skb */ + memcpy(skb_put(skb, hdrlen), &(desc->frame_ctl), hdrlen); + skb->mac.raw = skb->data; + + /* If any, copy the data from the card to the skb */ + if (datalen > 0) { + err = hermes_bap_pread(hw, IRQ_BAP, skb_put(skb, datalen), + ALIGN(datalen, 2), rxfid, + HERMES_802_2_OFFSET); + if (err) { + printk(KERN_ERR "%s: error %d reading monitor frame\n", + dev->name, err); + goto drop; + } + } + + skb->dev = dev; + skb->ip_summed = CHECKSUM_NONE; + skb->pkt_type = PACKET_OTHERHOST; + skb->protocol = __constant_htons(ETH_P_802_2); + + dev->last_rx = jiffies; + stats->rx_packets++; + stats->rx_bytes += skb->len; + + netif_rx(skb); + return; + + drop: + stats->rx_errors++; + stats->rx_dropped++; +} + +void __orinoco_ev_rx(struct net_device *dev, hermes_t *hw) { struct orinoco_private *priv = netdev_priv(dev); struct net_device_stats *stats = &priv->stats; struct iw_statistics *wstats = &priv->wstats; struct sk_buff *skb = NULL; - u16 rxfid, status; - int length, data_len, data_off; - char *p; + u16 rxfid, status, fc; + int length; struct hermes_rx_descriptor desc; - struct header_struct hdr; - struct ethhdr *eh; + struct ethhdr *hdr; int err; rxfid = hermes_read_regn(hw, RXFID); @@ -1110,33 +1283,31 @@ status = le16_to_cpu(desc.status); - if (status & HERMES_RXSTAT_ERR) { - if (status & HERMES_RXSTAT_UNDECRYPTABLE) { - wstats->discard.code++; - DEBUG(1, "%s: Undecryptable frame on Rx. Frame dropped.\n", - dev->name); - } else { - stats->rx_crc_errors++; - DEBUG(1, "%s: Bad CRC on Rx. Frame dropped.\n", dev->name); - } + if (status & HERMES_RXSTAT_BADCRC) { + DEBUG(1, "%s: Bad CRC on Rx. Frame dropped.\n", + dev->name); + stats->rx_crc_errors++; stats->rx_errors++; goto drop; } - /* For now we ignore the 802.11 header completely, assuming - that the card's firmware has handled anything vital */ + /* Handle frames in monitor mode */ + if (priv->iw_mode == IW_MODE_MONITOR) { + orinoco_rx_monitor(dev, rxfid, &desc); + return; + } - err = hermes_bap_pread(hw, IRQ_BAP, &hdr, sizeof(hdr), - rxfid, HERMES_802_3_OFFSET); - if (err) { - printk(KERN_ERR "%s: error %d reading frame header. " - "Frame dropped.\n", dev->name, err); + if (status & HERMES_RXSTAT_UNDECRYPTABLE) { + DEBUG(1, "%s: Undecryptable frame on Rx. Frame dropped.\n", + dev->name); + wstats->discard.code++; stats->rx_errors++; goto drop; } - length = ntohs(hdr.len); - + length = le16_to_cpu(desc.data_len); + fc = le16_to_cpu(desc.frame_ctl); + /* Sanity checks */ if (length < 3) { /* No for even an 802.2 LLC header */ /* At least on Symbol firmware with PCF we get quite a @@ -1165,57 +1336,51 @@ goto drop; } - skb_reserve(skb, 2); /* This way the IP header is aligned */ + /* We'll prepend the header, so reserve space for it. The worst + case is no decapsulation, when 802.3 header is prepended and + nothing is removed. 2 is for aligning the IP header. */ + skb_reserve(skb, ETH_HLEN + 2); + + err = hermes_bap_pread(hw, IRQ_BAP, skb_put(skb, length), + ALIGN(length, 2), rxfid, + HERMES_802_2_OFFSET); + if (err) { + printk(KERN_ERR "%s: error %d reading frame. " + "Frame dropped.\n", dev->name, err); + stats->rx_errors++; + goto drop; + } /* Handle decapsulation * In most cases, the firmware tell us about SNAP frames. * For some reason, the SNAP frames sent by LinkSys APs * are not properly recognised by most firmwares. * So, check ourselves */ - if (((status & HERMES_RXSTAT_MSGTYPE) == HERMES_RXSTAT_1042) || - ((status & HERMES_RXSTAT_MSGTYPE) == HERMES_RXSTAT_TUNNEL) || - is_ethersnap(&hdr)) { + if (length >= ENCAPS_OVERHEAD && + (((status & HERMES_RXSTAT_MSGTYPE) == HERMES_RXSTAT_1042) || + ((status & HERMES_RXSTAT_MSGTYPE) == HERMES_RXSTAT_TUNNEL) || + is_ethersnap(skb->data))) { /* These indicate a SNAP within 802.2 LLC within 802.11 frame which we'll need to de-encapsulate to the original EthernetII frame. */ - - if (length < ENCAPS_OVERHEAD) { /* No room for full LLC+SNAP */ - stats->rx_length_errors++; - goto drop; - } - - /* Remove SNAP header, reconstruct EthernetII frame */ - data_len = length - ENCAPS_OVERHEAD; - data_off = HERMES_802_3_OFFSET + sizeof(hdr); - - eh = (struct ethhdr *)skb_put(skb, ETH_HLEN); - - memcpy(eh, &hdr, 2 * ETH_ALEN); - eh->h_proto = hdr.ethertype; + hdr = (struct ethhdr *)skb_push(skb, ETH_HLEN - ENCAPS_OVERHEAD); } else { - /* All other cases indicate a genuine 802.3 frame. No - decapsulation needed. We just throw the whole - thing in, and hope the protocol layer can deal with - it as 802.3 */ - data_len = length; - data_off = HERMES_802_3_OFFSET; - /* FIXME: we re-read from the card data we already read here */ - } - - p = skb_put(skb, data_len); - err = hermes_bap_pread(hw, IRQ_BAP, p, ALIGN(data_len, 2), - rxfid, data_off); - if (err) { - printk(KERN_ERR "%s: error %d reading frame. " - "Frame dropped.\n", dev->name, err); - stats->rx_errors++; - goto drop; - } + /* 802.3 frame - prepend 802.3 header as is */ + hdr = (struct ethhdr *)skb_push(skb, ETH_HLEN); + hdr->h_proto = htons(length); + } + memcpy(hdr->h_dest, desc.addr1, ETH_ALEN); + if (fc & IEEE802_11_FCTL_FROMDS) + memcpy(hdr->h_source, desc.addr3, ETH_ALEN); + else + memcpy(hdr->h_source, desc.addr2, ETH_ALEN); dev->last_rx = jiffies; skb->dev = dev; skb->protocol = eth_type_trans(skb, dev); skb->ip_summed = CHECKSUM_NONE; + if (fc & IEEE802_11_FCTL_TODS) + skb->pkt_type = PACKET_OTHERHOST; /* Process the wireless stats if needed */ orinoco_stat_gather(dev, skb, &desc); @@ -1276,7 +1441,33 @@ dev->name, s, status); } -static void __orinoco_ev_info(struct net_device *dev, hermes_t *hw) +#if WIRELESS_EXT > 13 +/* Send new BSSID to userspace */ +static void orinoco_send_wevents(struct net_device *dev) +{ + struct orinoco_private *priv = netdev_priv(dev); + struct hermes *hw = &priv->hw; + union iwreq_data wrqu; + int err; + unsigned long flags; + + if (orinoco_lock(priv, &flags) != 0) + return; + + err = hermes_read_ltv(hw, IRQ_BAP, HERMES_RID_CURRENTBSSID, + ETH_ALEN, NULL, wrqu.ap_addr.sa_data); + if (err != 0) + return; + + wrqu.ap_addr.sa_family = ARPHRD_ETHER; + + /* Send event to user space */ + wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL); + orinoco_unlock(priv, &flags); +} +#endif + +void __orinoco_ev_info(struct net_device *dev, hermes_t *hw) { struct orinoco_private *priv = netdev_priv(dev); u16 infofid; @@ -1316,10 +1507,11 @@ len = sizeof(tallies); } - /* Read directly the data (no seek) */ - hermes_read_words(hw, HERMES_DATA1, (void *) &tallies, - len / 2); /* FIXME: blech! */ - + err = hermes_bap_pread(hw, IRQ_BAP, &tallies, len, + infofid, sizeof(info)); + if (err) + break; + /* Increment our various counters */ /* wstats->discard.nwid - no wrong BSSID stuff */ wstats->discard.code += @@ -1330,11 +1522,13 @@ le16_to_cpu(tallies.RxDiscards_WEPExcluded); wstats->discard.misc += le16_to_cpu(tallies.TxDiscardsWrongSA); +#if WIRELESS_EXT > 11 wstats->discard.fragment += le16_to_cpu(tallies.RxMsgInBadMsgFragments); wstats->discard.retries += le16_to_cpu(tallies.TxRetryLimitExceeded); /* wstats->miss.beacon - no match */ +#endif /* WIRELESS_EXT > 11 */ } break; case HERMES_INQ_LINKSTATUS: { @@ -1342,6 +1536,9 @@ u16 newstatus; int connected; + if (priv->iw_mode == IW_MODE_MONITOR) + break; + if (len != sizeof(linkstatus)) { printk(KERN_WARNING "%s: Unexpected size for linkstatus frame (%d bytes)\n", dev->name, len); @@ -1370,6 +1567,12 @@ } } break; + case HERMES_INQ_SEC_STAT_AGERE: + /* Security status (Agere specific) */ + /* Ignore this frame for now */ + if (priv->firmware_type == FIRMWARE_TYPE_AGERE) + break; + /* fall through */ default: printk(KERN_DEBUG "%s: Unknown information frame received: " "type 0x%04x, length %d\n", dev->name, type, len); @@ -1645,6 +1848,9 @@ } else master_wep_flag = 0; + if (priv->iw_mode == IW_MODE_MONITOR) + master_wep_flag |= HERMES_WEP_HOST_DECRYPT; + /* Master WEP setting : on/off */ err = hermes_write_wordrec(hw, USER_BAP, HERMES_RID_CNFWEPFLAGS_INTERSIL, @@ -1864,6 +2070,20 @@ } } + if (priv->iw_mode == IW_MODE_MONITOR) { + /* Enable monitor mode */ + dev->type = ARPHRD_IEEE80211; + err = hermes_docmd_wait(hw, HERMES_CMD_TEST | + HERMES_TEST_MONITOR, 0, NULL); + } else { + /* Disable monitor mode */ + dev->type = ARPHRD_ETHER; + err = hermes_docmd_wait(hw, HERMES_CMD_TEST | + HERMES_TEST_STOP, 0, NULL); + } + if (err) + return err; + /* Set promiscuity / multicast*/ priv->promiscuous = 0; priv->mc_count = 0; @@ -2091,7 +2311,7 @@ if (events & HERMES_EV_ALLOC) __orinoco_ev_alloc(dev, hw); - hermes_write_regn(hw, EVACK, events); + hermes_write_regn(hw, EVACK, evstat); evstat = hermes_read_regn(hw, EVSTAT); events = evstat & hw->inten; @@ -2207,6 +2427,7 @@ priv->has_mwo = (firmver >= 0x60000); priv->has_pm = (firmver >= 0x40020); /* Don't work in 7.52 ? */ priv->ibss_port = 1; + priv->broken_monitor = (firmver >= 0x80000); /* Tested with Agere firmware : * 1.16 ; 4.08 ; 4.52 ; 6.04 ; 6.16 ; 7.28 => Jean II @@ -2499,6 +2720,9 @@ * before anything else touches the * hardware */ INIT_WORK(&priv->reset_work, (void (*)(void *))orinoco_reset, dev); +#if WIRELESS_EXT > 13 + INIT_WORK(&priv->wevent_work, (void (*)(void *))orinoco_send_wevents, dev); +#endif netif_carrier_off(dev); priv->last_linkstatus = 0xffff; @@ -2770,6 +2994,15 @@ case IW_MODE_INFRA: break; + case IW_MODE_MONITOR: + if (priv->broken_monitor) { + printk(KERN_WARNING "%s: Monitor mode support is " + "buggy in this firmware, not enabling\n", + dev->name); + err = -EOPNOTSUPP; + } + break; + default: err = -EOPNOTSUPP; break; @@ -3177,6 +3410,13 @@ return -EBUSY; priv->channel = chan; + if (priv->iw_mode == IW_MODE_MONITOR) { + /* Fast channel change - no commit if successful */ + hermes_t *hw = &priv->hw; + err = hermes_docmd_wait(hw, HERMES_CMD_TEST | + HERMES_TEST_SET_CHANNEL, + chan, NULL); + } orinoco_unlock(priv, &flags); return err; @@ -4544,6 +4784,8 @@ EXPORT_SYMBOL(orinoco_reinit_firmware); EXPORT_SYMBOL(orinoco_interrupt); +EXPORT_SYMBOL(__orinoco_ev_rx); +EXPORT_SYMBOL(__orinoco_ev_info); /* Can't be declared "const" or the whole __initdata section will * become const */ --- a/drivers/net/wireless/orinoco.h.13-monitor-mode 2004-10-26 13:22:08.011590960 -0400 +++ b/drivers/net/wireless/orinoco.h 2004-10-26 13:35:27.978977432 -0400 @@ -36,6 +36,25 @@ char data[ORINOCO_MAX_KEY_SIZE]; } __attribute__ ((packed)); +struct header_struct { + /* 802.3 */ + u8 dest[ETH_ALEN]; + u8 src[ETH_ALEN]; + u16 len; + /* 802.2 */ + u8 dsap; + u8 ssap; + u8 ctrl; + /* SNAP */ + u8 oui[3]; + u16 ethertype; +} __attribute__ ((packed)); + +/* 802.2 LLC/SNAP header used for Ethernet encapsulation over 802.11 */ +#define encaps_hdr ((u8[]){0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00}) + +#define ENCAPS_OVERHEAD (sizeof(encaps_hdr) + 2) + typedef enum { FIRMWARE_TYPE_AGERE, FIRMWARE_TYPE_INTERSIL, @@ -54,6 +73,10 @@ /* driver state */ int open; u16 last_linkstatus; + struct work_struct join_work; +#if WIRELESS_EXT > 13 + struct work_struct wevent_work; +#endif /* Net device stuff */ struct net_device *ndev; @@ -81,6 +104,7 @@ unsigned int has_preamble:1; unsigned int has_sensitivity:1; unsigned int broken_disableport:1; + unsigned int broken_monitor:1; unsigned int irq_no_disable:1; /* Configuration paramaters */ @@ -131,6 +155,8 @@ extern int orinoco_stop(struct net_device *dev); extern int orinoco_reinit_firmware(struct net_device *dev); extern irqreturn_t orinoco_interrupt(int irq, void * dev_id, struct pt_regs *regs); +extern void __orinoco_ev_info(struct net_device *dev, hermes_t *hw); +extern void __orinoco_ev_rx(struct net_device *dev, hermes_t *hw); /********************************************************************/ /* Locking and synchronization functions */ From dcbw@redhat.com Tue Oct 26 12:25:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 12:25:19 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QJPEsx029591 for ; Tue, 26 Oct 2004 12:25:15 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9QJOeLu025136; Tue, 26 Oct 2004 15:24:40 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9QJOdr13919; Tue, 26 Oct 2004 15:24:39 -0400 Received: from dcbw.boston.redhat.com (dcbw.boston.redhat.com [172.16.80.23]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9QJOcPd017196; Tue, 26 Oct 2004 15:24:38 -0400 Subject: [PATCH 2.6.10-rc1 14/15] wireless/orinoco: add minimal ethtool support From: Dan Williams To: netdev@oss.sgi.com Cc: jgarzik@redhat.com, hermes@gibson.dropbear.id.au In-Reply-To: <1098814320.3663.24.camel@dcbw.boston.redhat.com> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> Content-Type: text/plain Date: Tue, 26 Oct 2004 15:24:44 -0400 Message-Id: <1098818684.9874.1.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-1) Content-Transfer-Encoding: 7bit X-archive-position: 10864 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcbw@redhat.com Precedence: bulk X-list: netdev Content-Length: 2230 Lines: 80 Update in-kernel orinoco wireless drivers to upstream CVS. None of this is original code by Dan Williams, simply a broken down patch set split-out from upstream orinoco CVS. o Add minimal ethtool support (Pavel Roskin) Signed-off-by: Dan Williams --- a/drivers/net/wireless/orinoco.c.14-ethtool 2004-10-26 13:40:22.388220424 -0400 +++ b/drivers/net/wireless/orinoco.c 2004-10-26 13:44:23.281599064 -0400 @@ -494,6 +494,7 @@ #include #include #include +#include #include #if WIRELESS_EXT > 12 #include @@ -4229,6 +4230,48 @@ return err; } +static int orinoco_ioctl_ethtool(struct net_device *dev, void *useraddr) +{ + u32 ethcmd; + struct orinoco_private *priv = netdev_priv(dev); + + if (copy_from_user(ðcmd, useraddr, sizeof(ethcmd))) + return -EFAULT; + + switch (ethcmd) { + case ETHTOOL_GDRVINFO: { + struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO }; + strncpy(info.driver, DRIVER_NAME, sizeof(info.driver) - 1); + strncpy(info.version, DRIVER_VERSION, + sizeof(info.version) - 1); + strncpy(info.fw_version, priv->fw_name, + sizeof(info.fw_version) - 1); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 0) + if (dev->class_dev.dev) + strncpy(info.bus_info, dev->class_dev.dev->bus_id, + sizeof(info.bus_info) - 1); + else + snprintf(info.bus_info, sizeof(info.bus_info) - 1, + "PCMCIA 0x%lx", priv->hw.iobase); +#endif + if (copy_to_user(useraddr, &info, sizeof(info))) + return -EFAULT; + return 0; + } +#ifdef ETHTOOL_GLINK + case ETHTOOL_GLINK: { + struct ethtool_value edata = { ETHTOOL_GLINK }; + edata.data = netif_carrier_ok(dev) ? 1 : 0; + if (copy_to_user (useraddr, &edata, sizeof(edata))) + return -EFAULT; + return 0; + } +#endif + } + + return -EOPNOTSUPP; +} + static const struct iw_priv_args orinoco_privtab[] = { { SIOCIWFIRSTPRIV + 0x0, 0, 0, "force_reset" }, { SIOCIWFIRSTPRIV + 0x1, 0, 0, "card_reset" }, @@ -4699,6 +4742,10 @@ else #endif /* WIRELESS_EXT <= 12 */ switch (cmd) { + case SIOCETHTOOL: + err = orinoco_ioctl_ethtool(dev, (void *) rq->ifr_data); + break; + default: err = -EOPNOTSUPP; } From dcbw@redhat.com Tue Oct 26 12:28:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 12:28:29 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QJSNLN030091 for ; Tue, 26 Oct 2004 12:28:23 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9QJS3ki025963; Tue, 26 Oct 2004 15:28:03 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9QJS3r14881; Tue, 26 Oct 2004 15:28:03 -0400 Received: from dcbw.boston.redhat.com (dcbw.boston.redhat.com [172.16.80.23]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9QJS1Pd017440; Tue, 26 Oct 2004 15:28:01 -0400 Subject: [PATCH 2.6.10-rc1 15/15] wireless/orinoco: Wireless scanning support From: Dan Williams To: netdev@oss.sgi.com Cc: jgarzik@redhat.com, hermes@gibson.dropbear.id.au In-Reply-To: <1098814320.3663.24.camel@dcbw.boston.redhat.com> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> Content-Type: text/plain Date: Tue, 26 Oct 2004 15:28:08 -0400 Message-Id: <1098818888.9874.6.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-1) Content-Transfer-Encoding: 7bit X-archive-position: 10865 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcbw@redhat.com Precedence: bulk X-list: netdev Content-Length: 19464 Lines: 637 Update in-kernel orinoco wireless drivers to upstream CVS. None of this is original code by Dan Williams, simply a broken down patch set split-out from upstream orinoco CVS. o New wireless extensions API and scanning support (patch from Moustafa Youssef, updated by Jim Carter and Pavel Roskin) Signed-off-by: Dan Williams --- a/drivers/net/wireless/orinoco.c 2004-10-26 13:44:23.281599064 -0400 +++ b/drivers/net/wireless/orinoco.c 2004-08-17 17:26:31.000000000 -0400 @@ -1442,6 +1442,80 @@ dev->name, s, status); } +/* Search scan results for requested BSSID, join it if found */ +static void orinoco_join_ap(struct net_device *dev) +{ + struct orinoco_private *priv = netdev_priv(dev); + struct hermes *hw = &priv->hw; + int err; + unsigned long flags; + struct join_req { + u8 bssid[ETH_ALEN]; + u16 channel; + } __attribute__ ((packed)) req; + const int atom_len = offsetof(struct prism2_scan_apinfo, atim); + struct prism2_scan_apinfo *atom; + int offset = 4; + int found = 0; + u8 *buf = NULL; + u16 len; + + /* Allocate buffer for scan results */ + buf = kmalloc(MAX_SCAN_LEN, GFP_KERNEL); + if (!buf) + return; + + if (orinoco_lock(priv, &flags) != 0) + return; + + /* Sanity checks in case user changed something in the meantime */ + if (!priv->bssid_fixed) + goto out; + + if (strlen(priv->desired_essid) == 0) + goto out; + + /* Read scan results from the firmware */ + err = hermes_read_ltv(hw, USER_BAP, + HERMES_RID_SCANRESULTSTABLE, + MAX_SCAN_LEN, &len, buf); + if (err) { + printk(KERN_ERR "%s: Cannot read scan results\n", + dev->name); + goto out; + } + + len = HERMES_RECLEN_TO_BYTES(len); + + /* Go through the scan results looking for the channel of the AP + * we were requested to join */ + for (; offset + atom_len <= len; offset += atom_len) { + atom = (struct prism2_scan_apinfo *) (buf + offset); + if (memcmp(&atom->bssid, priv->desired_bssid, ETH_ALEN) == 0) { + found = 1; + break; + } + } + + if (!found) { + DEBUG(1, "%s: Requested AP not found in scan results\n", + dev->name); + goto out; + } + + memcpy(req.bssid, priv->desired_bssid, ETH_ALEN); + req.channel = atom->channel; /* both are little-endian */ + err = HERMES_WRITE_RECORD(hw, USER_BAP, HERMES_RID_CNFJOINREQUEST, + &req); + if (err) + printk(KERN_ERR "%s: Error issuing join request\n", dev->name); + + out: + if (buf) + kfree(buf); + orinoco_unlock(priv, &flags); +} + #if WIRELESS_EXT > 13 /* Send new BSSID to userspace */ static void orinoco_send_wevents(struct net_device *dev) @@ -1553,6 +1627,15 @@ newstatus = le16_to_cpu(linkstatus.linkstatus); + /* Symbol firmware uses "out of range" to signal that + * the hostscan frame can be requested. */ + if (newstatus == HERMES_LINKSTATUS_AP_OUT_OF_RANGE && + priv->firmware_type == FIRMWARE_TYPE_SYMBOL && + priv->has_hostscan && priv->scan_inprogress) { + hermes_inquire(hw, HERMES_INQ_HOSTSCAN_SYMBOL); + break; + } + connected = (newstatus == HERMES_LINKSTATUS_CONNECTED) || (newstatus == HERMES_LINKSTATUS_AP_CHANGE) || (newstatus == HERMES_LINKSTATUS_AP_IN_RANGE); @@ -1565,7 +1648,82 @@ if (newstatus != priv->last_linkstatus) { priv->last_linkstatus = newstatus; print_linkstatus(dev, newstatus); +#if WIRELESS_EXT > 13 + /* The info frame contains only one word which is the + * status (see hermes.h). The status is pretty boring + * in itself, that's why we export the new BSSID... + * Jean II */ + schedule_work(&priv->wevent_work); +#endif + } + } + break; + case HERMES_INQ_SCAN: + if (!priv->scan_inprogress && priv->bssid_fixed && + priv->firmware_type == FIRMWARE_TYPE_INTERSIL) { + schedule_work(&priv->join_work); + break; + } + /* fall through */ + case HERMES_INQ_HOSTSCAN: + case HERMES_INQ_HOSTSCAN_SYMBOL: { + /* Result of a scanning. Contains information about + * cells in the vicinity - Jean II */ +#if WIRELESS_EXT > 13 + union iwreq_data wrqu; + unsigned char *buf; + + /* Sanity check */ + if (len > 4096) { + printk(KERN_WARNING "%s: Scan results too large (%d bytes)\n", + dev->name, len); + break; + } + + /* We are a strict producer. If the previous scan results + * have not been consumed, we just have to drop this + * frame. We can't remove the previous results ourselves, + * that would be *very* racy... Jean II */ + if (priv->scan_result != NULL) { + printk(KERN_WARNING "%s: Previous scan results not consumed, dropping info frame.\n", dev->name); + break; } + + /* Allocate buffer for results */ + buf = kmalloc(len, GFP_ATOMIC); + if (buf == NULL) + /* No memory, so can't printk()... */ + break; + + /* Read scan data */ + err = hermes_bap_pread(hw, IRQ_BAP, (void *) buf, len, + infofid, sizeof(info)); + if (err) + break; + +#ifdef ORINOCO_DEBUG + { + int i; + printk(KERN_DEBUG "Scan result [%02X", buf[0]); + for(i = 1; i < (len * 2); i++) + printk(":%02X", buf[i]); + printk("]\n"); + } +#endif /* ORINOCO_DEBUG */ + + /* Allow the clients to access the results */ + priv->scan_len = len; + priv->scan_result = buf; + + /* Send an empty event to user space. + * We don't send the received data on the event because + * it would require us to do complex transcoding, and + * we want to minimise the work done in the irq handler + * Use a request to extract the data - Jean II */ + wrqu.data.length = 0; + wrqu.data.flags = 0; + wireless_send_event(dev, SIOCGIWSCAN, &wrqu, NULL); +#endif /* WIRELESS_EXT > 13 */ } break; case HERMES_INQ_SEC_STAT_AGERE: @@ -2189,6 +2347,13 @@ orinoco_unlock(priv, &flags); + /* Scanning support: Cleanup of driver struct */ + if (priv->scan_result != NULL) { + kfree(priv->scan_result); + priv->scan_result = NULL; + } + priv->scan_inprogress = 0; + if (priv->hard_reset) { err = (*priv->hard_reset)(priv); if (err) { @@ -2428,6 +2593,7 @@ priv->has_mwo = (firmver >= 0x60000); priv->has_pm = (firmver >= 0x40020); /* Don't work in 7.52 ? */ priv->ibss_port = 1; + priv->has_hostscan = (firmver >= 0x8000a); priv->broken_monitor = (firmver >= 0x80000); /* Tested with Agere firmware : @@ -2474,6 +2640,8 @@ priv->ibss_port = 4; priv->broken_disableport = (firmver == 0x25013) || (firmver >= 0x30000 && firmver <= 0x31000); + priv->has_hostscan = (firmver >= 0x31001) || + (firmver >= 0x29057 && firmver < 0x30000); /* Tested with Intel firmware : 0x20015 => Jean II */ /* Tested with 3Com firmware : 0x15012 & 0x22001 => Jean II */ break; @@ -2493,6 +2661,7 @@ priv->has_ibss = (firmver >= 0x000700); /* FIXME */ priv->has_big_wep = priv->has_wep = (firmver >= 0x000800); priv->has_pm = (firmver >= 0x000700); + priv->has_hostscan = (firmver >= 0x010301); if (firmver >= 0x000800) priv->ibss_port = 0; @@ -2721,6 +2890,7 @@ * before anything else touches the * hardware */ INIT_WORK(&priv->reset_work, (void (*)(void *))orinoco_reset, dev); + INIT_WORK(&priv->join_work, (void (*)(void *))orinoco_join_ap, dev); #if WIRELESS_EXT > 13 INIT_WORK(&priv->wevent_work, (void (*)(void *))orinoco_send_wevents, dev); #endif @@ -2736,6 +2906,9 @@ { struct orinoco_private *priv = netdev_priv(dev); + if (priv->scan_result) + kfree(priv->scan_result); + free_netdev(dev); } @@ -4175,6 +4348,334 @@ return 0; } +#if WIRELESS_EXT > 13 +/* Trigger a scan (look for other cells in the vicinity */ +static int orinoco_ioctl_setscan(struct net_device *dev, + struct iw_request_info *info, + struct iw_param *srq, + char *extra) +{ + struct orinoco_private *priv = netdev_priv(dev); + hermes_t *hw = &priv->hw; + int err = 0; + unsigned long flags; + + /* Note : you may have realised that, as this is a SET operation, + * this is priviledged and therefore a normal user can't + * perform scanning. + * This is not an error, while the device perform scanning, + * traffic doesn't flow, so it's a perfect DoS... + * Jean II */ + + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; + + /* Scanning with port 0 disabled would fail */ + if (!netif_running(dev)) { + err = -ENETDOWN; + goto out; + } + + /* In monitor mode, the scan results are always empty. + * Probe responses are passed to the driver as received + * frames and could be processed in software. */ + if (priv->iw_mode == IW_MODE_MONITOR) { + err = -EOPNOTSUPP; + goto out; + } + + /* Note : because we don't lock out the irq handler, the way + * we access scan variables in priv is critical. + * o scan_inprogress : not touched by irq handler + * o scan_mode : not touched by irq handler + * o scan_result : irq is strict producer, non-irq is strict + * consumer. + * o scan_len : synchronised with scan_result + * Before modifying anything on those variables, please think hard ! + * Jean II */ + + /* If there is still some left-over scan results, get rid of it */ + if (priv->scan_result != NULL) { + /* What's likely is that a client did crash or was killed + * between triggering the scan request and reading the + * results, so we need to reset everything. + * Some clients that are too slow may suffer from that... + * Jean II */ + kfree(priv->scan_result); + priv->scan_result = NULL; + } + + /* Save flags */ + priv->scan_mode = srq->flags; + + /* Always trigger scanning, even if it's in progress. + * This way, if the info frame get lost, we will recover somewhat + * gracefully - Jean II */ + + if (priv->has_hostscan) { + switch (priv->firmware_type) { + case FIRMWARE_TYPE_SYMBOL: + err = hermes_write_wordrec(hw, USER_BAP, + HERMES_RID_CNFHOSTSCAN_SYMBOL, + HERMES_HOSTSCAN_SYMBOL_ONCE | + HERMES_HOSTSCAN_SYMBOL_BCAST); + break; + case FIRMWARE_TYPE_INTERSIL: { + u16 req[3]; + + req[0] = cpu_to_le16(0x3fff); /* All channels */ + req[1] = cpu_to_le16(0x0001); /* rate 1 Mbps */ + req[2] = 0; /* Any ESSID */ + err = HERMES_WRITE_RECORD(hw, USER_BAP, + HERMES_RID_CNFHOSTSCAN, &req); + } + break; + case FIRMWARE_TYPE_AGERE: + err = hermes_write_wordrec(hw, USER_BAP, + HERMES_RID_CNFSCANSSID_AGERE, + 0); /* Any ESSID */ + if (err) + break; + + err = hermes_inquire(hw, HERMES_INQ_SCAN); + break; + } + } else + err = hermes_inquire(hw, HERMES_INQ_SCAN); + + /* One more client */ + if (! err) + priv->scan_inprogress = 1; + + out: + orinoco_unlock(priv, &flags); + return err; +} + +/* Translate scan data returned from the card to a card independant + * format that the Wireless Tools will understand - Jean II */ +static inline int orinoco_translate_scan(struct net_device *dev, + char *buffer, + char *scan, + int scan_len) +{ + struct orinoco_private *priv = netdev_priv(dev); + int offset; /* In the scan data */ + union hermes_scan_info *atom; + int atom_len; + u16 capabilities; + u16 channel; + struct iw_event iwe; /* Temporary buffer */ + char * current_ev = buffer; + char * end_buf = buffer + IW_SCAN_MAX_DATA; + + switch (priv->firmware_type) { + case FIRMWARE_TYPE_AGERE: + atom_len = sizeof(struct agere_scan_apinfo); + offset = 0; + break; + case FIRMWARE_TYPE_SYMBOL: + /* Lack of documentation necessitates this hack. + * Different firmwares have 68 or 76 byte long atoms. + * We try modulo first. If the length divides by both, + * we check what would be the channel in the second + * frame for a 68-byte atom. 76-byte atoms have 0 there. + * Valid channel cannot be 0. */ + if (scan_len % 76) + atom_len = 68; + else if (scan_len % 68) + atom_len = 76; + else if (scan_len >= 1292 && scan[68] == 0) + atom_len = 76; + else + atom_len = 68; + offset = 0; + break; + case FIRMWARE_TYPE_INTERSIL: + offset = 4; + if (priv->has_hostscan) + atom_len = scan[0] + (scan[1] << 8); + else + atom_len = offsetof(struct prism2_scan_apinfo, atim); + break; + default: + return 0; + } + + /* Check that we got an whole number of atoms */ + if ((scan_len - offset) % atom_len) { + printk(KERN_ERR "%s: Unexpected scan data length %d, " + "atom_len %d, offset %d\n", dev->name, scan_len, + atom_len, offset); + return 0; + } + + /* Read the entries one by one */ + for (; offset + atom_len <= scan_len; offset += atom_len) { + /* Get next atom */ + atom = (union hermes_scan_info *) (scan + offset); + + /* First entry *MUST* be the AP MAC address */ + iwe.cmd = SIOCGIWAP; + iwe.u.ap_addr.sa_family = ARPHRD_ETHER; + memcpy(iwe.u.ap_addr.sa_data, atom->a.bssid, ETH_ALEN); + current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_ADDR_LEN); + + /* Other entries will be displayed in the order we give them */ + + /* Add the ESSID */ + iwe.u.data.length = le16_to_cpu(atom->a.essid_len); + if (iwe.u.data.length > 32) + iwe.u.data.length = 32; + iwe.cmd = SIOCGIWESSID; + iwe.u.data.flags = 1; + current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, atom->a.essid); + + /* Add mode */ + iwe.cmd = SIOCGIWMODE; + capabilities = le16_to_cpu(atom->a.capabilities); + if (capabilities & 0x3) { + if (capabilities & 0x1) + iwe.u.mode = IW_MODE_MASTER; + else + iwe.u.mode = IW_MODE_ADHOC; + current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_UINT_LEN); + } + + channel = atom->s.channel; + if ( (channel >= 1) && (channel <= NUM_CHANNELS) ) { + /* Add frequency */ + iwe.cmd = SIOCGIWFREQ; + iwe.u.freq.m = channel_frequency[channel-1] * 100000; + iwe.u.freq.e = 1; + current_ev = iwe_stream_add_event(current_ev, end_buf, + &iwe, IW_EV_FREQ_LEN); + } + + /* Add quality statistics */ + iwe.cmd = IWEVQUAL; + iwe.u.qual.updated = 0x10; /* no link quality */ + iwe.u.qual.level = (__u8) le16_to_cpu(atom->a.level) - 0x95; + iwe.u.qual.noise = (__u8) le16_to_cpu(atom->a.noise) - 0x95; + /* Wireless tools prior to 27.pre22 will show link quality + * anyway, so we provide a reasonable value. */ + if (iwe.u.qual.level > iwe.u.qual.noise) + iwe.u.qual.qual = iwe.u.qual.level - iwe.u.qual.noise; + else + iwe.u.qual.qual = 0; + current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_QUAL_LEN); + + /* Add encryption capability */ + iwe.cmd = SIOCGIWENCODE; + if (capabilities & 0x10) + iwe.u.data.flags = IW_ENCODE_ENABLED | IW_ENCODE_NOKEY; + else + iwe.u.data.flags = IW_ENCODE_DISABLED; + iwe.u.data.length = 0; + current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, atom->a.essid); + + /* Bit rate is not available in Lucent/Agere firmwares */ + if (priv->firmware_type != FIRMWARE_TYPE_AGERE) { + char * current_val = current_ev + IW_EV_LCP_LEN; + int i; + int step; + + if (priv->firmware_type == FIRMWARE_TYPE_SYMBOL) + step = 2; + else + step = 1; + + iwe.cmd = SIOCGIWRATE; + /* Those two flags are ignored... */ + iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0; + /* Max 10 values */ + for (i = 0; i < 10; i += step) { + /* NULL terminated */ + if (atom->p.rates[i] == 0x0) + break; + /* Bit rate given in 500 kb/s units (+ 0x80) */ + iwe.u.bitrate.value = ((atom->p.rates[i] & 0x7f) * 500000); + current_val = iwe_stream_add_value(current_ev, current_val, + end_buf, &iwe, + IW_EV_PARAM_LEN); + } + /* Check if we added any event */ + if ((current_val - current_ev) > IW_EV_LCP_LEN) + current_ev = current_val; + } + + /* The other data in the scan result are not really + * interesting, so for now drop it - Jean II */ + } + return current_ev - buffer; +} + +/* Return results of a scan */ +static int orinoco_ioctl_getscan(struct net_device *dev, + struct iw_request_info *info, + struct iw_point *srq, + char *extra) +{ + struct orinoco_private *priv = netdev_priv(dev); + int err = 0; + unsigned long flags; + + if (orinoco_lock(priv, &flags) != 0) + return -EBUSY; + + /* If no results yet, ask to try again later */ + if (priv->scan_result == NULL) { + if (priv->scan_inprogress) + /* Important note : we don't want to block the caller + * until results are ready for various reasons. + * First, managing wait queues is complex and racy. + * Second, we grab some rtnetlink lock before comming + * here (in dev_ioctl()). + * Third, we generate an Wireless Event, so the + * caller can wait itself on that - Jean II */ + err = -EAGAIN; + else + /* Client error, no scan results... + * The caller need to restart the scan. */ + err = -ENODATA; + } else { + /* We have some results to push back to user space */ + + /* Translate to WE format */ + srq->length = orinoco_translate_scan(dev, extra, + priv->scan_result, + priv->scan_len); + + /* Return flags */ + srq->flags = (__u16) priv->scan_mode; + + /* Results are here, so scan no longer in progress */ + priv->scan_inprogress = 0; + + /* In any case, Scan results will be cleaned up in the + * reset function and when exiting the driver. + * The person triggering the scanning may never come to + * pick the results, so we need to do it in those places. + * Jean II */ + +#ifdef SCAN_SINGLE_READ + /* If you enable this option, only one client (the first + * one) will be able to read the result (and only one + * time). If there is multiple concurent clients that + * want to read scan results, this behavior is not + * advisable - Jean II */ + kfree(priv->scan_result); + priv->scan_result = NULL; +#endif /* SCAN_SINGLE_READ */ + /* Here, if too much time has elapsed since last scan, + * we may want to clean up scan results... - Jean II */ + } + + orinoco_unlock(priv, &flags); + return err; +} +#endif /* WIRELESS_EXT > 13 */ + /* Commit handler, called after set operations */ static int orinoco_ioctl_commit(struct net_device *dev, struct iw_request_info *info, @@ -4331,8 +4832,8 @@ (iw_handler) NULL, /* -- hole -- */ (iw_handler) NULL, /* SIOCGIWAPLIST */ #if WIRELESS_EXT > 13 - (iw_handler) NULL, /* SIOCSIWSCAN */ - (iw_handler) NULL, /* SIOCGIWSCAN */ + (iw_handler) orinoco_ioctl_setscan, /* SIOCSIWSCAN */ + (iw_handler) orinoco_ioctl_getscan, /* SIOCGIWSCAN */ #else /* WIRELESS_EXT > 13 */ (iw_handler) NULL, /* SIOCSIWSCAN */ (iw_handler) NULL, /* SIOCGIWSCAN */ --- a/drivers/net/wireless/orinoco.h 2004-10-26 13:35:27.978977432 -0400 +++ b/drivers/net/wireless/orinoco.h 2004-07-28 02:19:49.000000000 -0400 @@ -7,7 +7,7 @@ #ifndef _ORINOCO_H #define _ORINOCO_H -#define DRIVER_VERSION "0.13e" +#define DRIVER_VERSION "0.15rc2HEAD" #include #include @@ -28,6 +29,8 @@ #endif /* (! defined (WIRELESS_EXT)) || (WIRELESS_EXT < 11) */ #define WIRELESS_SPY // enable iwspy support +#define MAX_SCAN_LEN 4096 + #define ORINOCO_MAX_KEY_SIZE 14 #define ORINOCO_MAX_KEYS 4 @@ -103,6 +106,7 @@ unsigned int has_pm:1; unsigned int has_preamble:1; unsigned int has_sensitivity:1; + unsigned int has_hostscan:1; unsigned int broken_disableport:1; unsigned int broken_monitor:1; unsigned int irq_no_disable:1; @@ -131,6 +135,12 @@ /* Configuration dependent variables */ int port_type, createibss; int promiscuous, mc_count; + + /* Scanning support */ + int scan_inprogress; /* Scan pending... */ + u32 scan_mode; /* Type of scan done */ + char * scan_result; /* Result of previous scan */ + int scan_len; /* Lenght of result */ }; #ifdef ORINOCO_DEBUG From romieu@fr.zoreil.com Tue Oct 26 12:35:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 12:35:26 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QJZJnT030620 for ; Tue, 26 Oct 2004 12:35:20 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i9QJXuvr024000; Tue, 26 Oct 2004 21:33:56 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i9QJXuf1023999; Tue, 26 Oct 2004 21:33:56 +0200 Date: Tue, 26 Oct 2004 21:33:56 +0200 From: Francois Romieu To: Dan Williams Cc: netdev@oss.sgi.com, jgarzik@redhat.com, hermes@gibson.dropbear.id.au Subject: Re: [PATCH 2.6.10-rc1 15/15] wireless/orinoco: Wireless scanning support Message-ID: <20041026193355.GA22696@electric-eye.fr.zoreil.com> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> <1098818888.9874.6.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1098818888.9874.6.camel@dcbw.boston.redhat.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 10867 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 Content-Length: 950 Lines: 37 [...] > --- a/drivers/net/wireless/orinoco.c 2004-10-26 13:44:23.281599064 -0400 > +++ b/drivers/net/wireless/orinoco.c 2004-08-17 17:26:31.000000000 -0400 > @@ -1442,6 +1442,80 @@ > dev->name, s, status); > } > > +/* Search scan results for requested BSSID, join it if found */ > +static void orinoco_join_ap(struct net_device *dev) > +{ > + struct orinoco_private *priv = netdev_priv(dev); > + struct hermes *hw = &priv->hw; > + int err; > + unsigned long flags; > + struct join_req { > + u8 bssid[ETH_ALEN]; > + u16 channel; > + } __attribute__ ((packed)) req; > + const int atom_len = offsetof(struct prism2_scan_apinfo, atim); > + struct prism2_scan_apinfo *atom; > + int offset = 4; > + int found = 0; > + u8 *buf = NULL; > + u16 len; > + > + /* Allocate buffer for scan results */ > + buf = kmalloc(MAX_SCAN_LEN, GFP_KERNEL); > + if (!buf) > + return; > + > + if (orinoco_lock(priv, &flags) != 0) > + return; Leak. -- Ueimor From jgarzik@pobox.com Tue Oct 26 12:34:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 12:34:57 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QJYoED030500 for ; Tue, 26 Oct 2004 12:34:50 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CMX5U-0003rs-Qj; Tue, 26 Oct 2004 20:34:33 +0100 Message-ID: <417EA6BC.5020208@pobox.com> Date: Tue, 26 Oct 2004 15:34:20 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dan Williams CC: netdev@oss.sgi.com, jgarzik@redhat.com, hermes@gibson.dropbear.id.au Subject: Re: [PATCH 2.6.10-rc1 1/15] wireless/orinoco: Use msleep() instead of hardcoded schedule_timeout()s References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> <1098815604.3663.35.camel@dcbw.boston.redhat.com> In-Reply-To: <1098815604.3663.35.camel@dcbw.boston.redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10866 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: 2390 Lines: 83 Dan Williams wrote: > --- a/drivers/net/wireless/airport.c.1-msleep 2004-10-25 14:44:04.559958488 -0400 > +++ b/drivers/net/wireless/airport.c 2004-10-25 14:44:51.372841848 -0400 > @@ -28,7 +28,6 @@ > #include > #include > #include > -#include > > #include > #include > @@ -147,7 +146,7 @@ > macio_release_resource(mdev, 0); > > pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE, macio_get_of_node(mdev), 0, 0); > - ssleep(1); > + msleep(1000); > > macio_set_drvdata(mdev, NULL); > free_netdev(dev); > @@ -173,12 +172,12 @@ > disable_irq(dev->irq); > > pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE, macio_get_of_node(card->mdev), 0, 0); > - ssleep(1); > + msleep(1000); > pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE, macio_get_of_node(card->mdev), 0, 1); > - ssleep(1); > + msleep(1000); > > enable_irq(dev->irq); > - ssleep(1); > + msleep(1000); > #endif > > return 0; > @@ -237,7 +236,7 @@ > > /* Power up card */ > pmac_call_feature(PMAC_FTR_AIRPORT_ENABLE, macio_get_of_node(mdev), 0, 1); > - ssleep(1); > + msleep(1000); > > /* Reset it before we get the interrupt */ > hermes_init(hw); these changes are all regressions > --- a/drivers/net/wireless/orinoco_cs.c.1-msleep 2004-10-25 14:44:04.558958640 -0400 > +++ b/drivers/net/wireless/orinoco_cs.c 2004-10-25 14:44:51.374841544 -0400 > @@ -136,6 +136,7 @@ > if (err) > return err; > > + msleep(100); > clear_bit(0, &card->hard_reset_in_progress); > > return 0; > --- a/drivers/net/wireless/orinoco_plx.c.1-msleep 2004-10-25 14:44:04.559958488 -0400 > +++ b/drivers/net/wireless/orinoco_plx.c 2004-10-25 14:44:51.376841240 -0400 > @@ -352,8 +352,7 @@ > static void __exit orinoco_plx_exit(void) > { > pci_unregister_driver(&orinoco_plx_driver); > - current->state = TASK_UNINTERRUPTIBLE; > - schedule_timeout(HZ); > + msleep(1000); > } > > module_init(orinoco_plx_init); > --- a/drivers/net/wireless/orinoco_tmd.c.1-msleep 2004-10-25 14:44:04.557958792 -0400 > +++ b/drivers/net/wireless/orinoco_tmd.c 2004-10-25 14:44:51.377841088 -0400 > @@ -218,8 +218,7 @@ > static void __exit orinoco_tmd_exit(void) > { > pci_unregister_driver(&orinoco_tmd_driver); > - current->state = TASK_UNINTERRUPTIBLE; > - schedule_timeout(HZ); > + msleep(1000); use ssleep() not msleep() From dcbw@redhat.com Tue Oct 26 12:36:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 12:36:11 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QJa6we031068 for ; Tue, 26 Oct 2004 12:36:06 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9QJZVkc028163; Tue, 26 Oct 2004 15:35:31 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9QJZVr17241; Tue, 26 Oct 2004 15:35:31 -0400 Received: from dcbw.boston.redhat.com (dcbw.boston.redhat.com [172.16.80.23]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9QJZTPd018011; Tue, 26 Oct 2004 15:35:29 -0400 Subject: Re: [PATCH 2.6.10-rc1 1/15] wireless/orinoco: Use msleep() instead of hardcoded schedule_timeout()s From: Dan Williams To: Christoph Hellwig Cc: netdev@oss.sgi.com, jgarzik@redhat.com, hermes@gibson.dropbear.id.au In-Reply-To: <20041026184749.GA16621@infradead.org> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> <1098815604.3663.35.camel@dcbw.boston.redhat.com> <20041026184749.GA16621@infradead.org> Content-Type: text/plain Date: Tue, 26 Oct 2004 15:35:36 -0400 Message-Id: <1098819336.9874.11.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-1) Content-Transfer-Encoding: 7bit X-archive-position: 10868 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcbw@redhat.com Precedence: bulk X-list: netdev Content-Length: 131 Lines: 7 New description: o Use msleep() instead of hardcoded schedule_timeout()s o Normalize sleep calls to use msleep() everywhere Dan From jgarzik@pobox.com Tue Oct 26 12:36:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 12:36: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.13.0/8.13.0) with ESMTP id i9QJaoMO031461 for ; Tue, 26 Oct 2004 12:36:50 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CMX7S-0003uI-6H; Tue, 26 Oct 2004 20:36:34 +0100 Message-ID: <417EA736.9010602@pobox.com> Date: Tue, 26 Oct 2004 15:36:22 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dan Williams CC: netdev@oss.sgi.com, jgarzik@redhat.com, hermes@gibson.dropbear.id.au Subject: Re: [PATCH 2.6.10-rc1 4/15] wireless/orinoco: Update orinoco changelog and module parameters References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> <1098816355.3663.50.camel@dcbw.boston.redhat.com> In-Reply-To: <1098816355.3663.50.camel@dcbw.boston.redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10869 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: 448 Lines: 15 Dan Williams wrote: > --- a/drivers/net/wireless/orinoco.h.4-module-params 2004-10-26 10:43:24.213428352 -0400 > +++ b/drivers/net/wireless/orinoco.h 2004-10-26 10:43:31.138375600 -0400 > @@ -14,6 +14,9 @@ > #include > #include > #include > +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 25) > +#include > +#endif > this is for out-of-tree drivers and patches From davem@davemloft.net Tue Oct 26 12:41:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 12:41:35 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QJfUrY031859 for ; Tue, 26 Oct 2004 12:41:31 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CMX4e-0002QQ-00; Tue, 26 Oct 2004 12:33:40 -0700 Date: Tue, 26 Oct 2004 12:33:39 -0700 From: "David S. Miller" To: Jeff Garzik Cc: netdev@oss.sgi.com Subject: Re: [BK PATCHES] misc tg3 stuff Message-Id: <20041026123339.02c4f05b.davem@davemloft.net> In-Reply-To: <417EA235.5070700@pobox.com> References: <20041026165955.GA27136@havoc.gtf.org> <20041026115555.390fcbbb.davem@davemloft.net> <417EA235.5070700@pobox.com> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10870 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 227 Lines: 10 On Tue, 26 Oct 2004 15:15:01 -0400 Jeff Garzik wrote: > Looks like I attached the wrong diff, sorry. > > The repository itself has the correct stuff in it :) > > Attached new one... Pulled, thanks Jeff. From SRS0+576856ad09181f45abb4+429+infradead.org+hch@phoenix.srs.infradead.org Tue Oct 26 12:42:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 12:42:40 -0700 (PDT) Received: from phoenix.infradead.org (phoenix.infradead.org [81.187.226.98]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QJgZNB032191 for ; Tue, 26 Oct 2004 12:42:35 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.42 #1 (Red Hat Linux)) id 1CMXD1-0004Vy-SV; Tue, 26 Oct 2004 20:42:19 +0100 Date: Tue, 26 Oct 2004 20:42:19 +0100 From: Christoph Hellwig To: Dan Williams Cc: Christoph Hellwig , netdev@oss.sgi.com, jgarzik@redhat.com, hermes@gibson.dropbear.id.au Subject: Re: [PATCH 2.6.10-rc1 1/15] wireless/orinoco: Use msleep() instead of hardcoded schedule_timeout()s Message-ID: <20041026194219.GA17343@infradead.org> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> <1098815604.3663.35.camel@dcbw.boston.redhat.com> <20041026184749.GA16621@infradead.org> <1098819336.9874.11.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1098819336.9874.11.camel@dcbw.boston.redhat.com> User-Agent: Mutt/1.4.1i X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 10871 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: netdev Content-Length: 245 Lines: 8 On Tue, Oct 26, 2004 at 03:35:36PM -0400, Dan Williams wrote: > New description: > > o Use msleep() instead of hardcoded schedule_timeout()s > o Normalize sleep calls to use msleep() everywhere care to explain what's the point of the latter? From jgarzik@pobox.com Tue Oct 26 12:43:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 12:44:02 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QJhma5032533 for ; Tue, 26 Oct 2004 12:43:48 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CMXEC-00041B-3W; Tue, 26 Oct 2004 20:43:32 +0100 Message-ID: <417EA8D8.3060403@pobox.com> Date: Tue, 26 Oct 2004 15:43:20 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dan Williams CC: netdev@oss.sgi.com, jgarzik@redhat.com, hermes@gibson.dropbear.id.au Subject: Re: [PATCH 2.6.10-rc1 7/15] wireless/orinoco: Update card reset/init code and add card-specific data structures References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> <1098816980.3663.62.camel@dcbw.boston.redhat.com> In-Reply-To: <1098816980.3663.62.camel@dcbw.boston.redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10872 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: 6534 Lines: 251 Dan Williams wrote: > +/* Orinoco PCI specific data */ > +struct orinoco_pci_card { > + u32 pci_state[16]; /* PCI suspend/resume state */ > +}; no need with GregKH's latest upstream changes > - printk(KERN_NOTICE "Reset done"); > timeout = jiffies + (HERMES_PCI_COR_ONT * HZ / 1000); > - while(time_before(jiffies, timeout)) { > - printk("."); > + while(time_before(jiffies, timeout)) > mdelay(1); the loop is non-sensical... at this point use msleep() or actually mdelay() for the correct period, rather than looping on mdelay(1) > - printk(KERN_NOTICE "Clear Reset"); > timeout = jiffies + (HERMES_PCI_COR_OFFT * HZ / 1000); > - while(time_before(jiffies, timeout)) { > - printk("."); > + while(time_before(jiffies, timeout)) > mdelay(1); > - } > - printk(";\n"); > - //mdelay(HERMES_PCI_COR_OFFT); ditto > @@ -199,61 +194,68 @@ > u16 *pci_ioaddr = NULL; > unsigned long pci_iolen; > struct orinoco_private *priv = NULL; > + struct orinoco_pci_card *card; > struct net_device *dev = NULL; > > err = pci_enable_device(pdev); > - if (err) > - return -EIO; > + if (err) { > + printk(KERN_ERR PFX "Cannot enable PCI device\n"); > + return -err; > + } incorrect... err is already negative. > @@ -325,6 +327,9 @@ > > orinoco_unlock(priv, &flags); > > + pci_save_state(pdev, card->pci_state); > + pci_set_power_state(pdev, 3); > + > return 0; > } > > @@ -332,11 +337,15 @@ > { > struct net_device *dev = pci_get_drvdata(pdev); > struct orinoco_private *priv = netdev_priv(dev); > + struct orinoco_pci_card *card = priv->card; > unsigned long flags; > int err; > > printk(KERN_DEBUG "%s: Orinoco-PCI waking up\n", dev->name); > > + pci_set_power_state(pdev, 0); > + pci_restore_state(pdev, card->pci_state); > + > err = orinoco_reinit_firmware(dev); > if (err) { > printk(KERN_ERR "%s: Error %d re-initializing firmware on orinoco_pci_resume()\n", These two don't build in the latest 2.6.x kernel. > --- a/drivers/net/wireless/orinoco_plx.c.7-card-data 2004-10-26 09:52:13.354269904 -0400 > +++ b/drivers/net/wireless/orinoco_plx.c 2004-10-26 10:07:51.854596168 -0400 > @@ -142,146 +142,189 @@ > #include "hermes.h" > #include "orinoco.h" > > -#define COR_OFFSET (0x3e0/2) /* COR attribute offset of Prism2 PC card */ > +#define COR_OFFSET (0x3e0) /* COR attribute offset of Prism2 PC card */ > #define COR_VALUE (COR_LEVEL_REQ | COR_FUNC_ENA) /* Enable PC card with interrupt in level trigger */ > +#define COR_RESET (0x80) /* reset bit in the COR register */ > +#define PLX_RESET_TIME (500) /* milliseconds */ > > #define PLX_INTCSR 0x4c /* Interrupt Control & Status Register */ > #define PLX_INTCSR_INTEN (1<<6) /* Interrupt Enable bit */ > > -static const u16 cis_magic[] = { > - 0x0001, 0x0003, 0x0000, 0x0000, 0x00ff, 0x0017, 0x0004, 0x0067 > +static const u8 cis_magic[] = { > + 0x01, 0x03, 0x00, 0x00, 0xff, 0x17, 0x04, 0x67 > }; > > +/* Orinoco PLX specific data */ > +struct orinoco_plx_card { > + u8 *attr_mem; > +}; > + > +/* > + * Do a soft reset of the card using the Configuration Option Register > + */ > +static int orinoco_plx_cor_reset(struct orinoco_private *priv) > +{ > + hermes_t *hw = &priv->hw; > + struct orinoco_plx_card *card = priv->card; > + u8 *attr_mem = card->attr_mem; > + unsigned long timeout; > + u16 reg; > + > + attr_mem[COR_OFFSET] = COR_VALUE | COR_RESET; > + mdelay(1); > + > + attr_mem[COR_OFFSET] = COR_VALUE; > + mdelay(1); > + > + /* Just in case, wait more until the card is no longer busy */ > + timeout = jiffies + (PLX_RESET_TIME * HZ / 1000); > + reg = hermes_read_regn(hw, CMD); > + while (time_before(jiffies, timeout) && (reg & HERMES_CMD_BUSY)) { > + mdelay(1); > + reg = hermes_read_regn(hw, CMD); > + } > + > + /* Did we timeout ? */ > + if (reg & HERMES_CMD_BUSY) { > + printk(KERN_ERR PFX "Busy timeout\n"); > + return -ETIMEDOUT; > + } > + > + return 0; > +} > + > + > static int orinoco_plx_init_one(struct pci_dev *pdev, > const struct pci_device_id *ent) > { > int err = 0; > - u16 *attr_mem = NULL; > - u32 reg, addr; > + u8 *attr_mem = NULL; > + u32 csr_reg, plx_addr; > struct orinoco_private *priv = NULL; > + struct orinoco_plx_card *card; > unsigned long pccard_ioaddr = 0; > unsigned long pccard_iolen = 0; > struct net_device *dev = NULL; > int i; > > err = pci_enable_device(pdev); > - if (err) > - return -EIO; > - > - /* Resource 2 is mapped to the PCMCIA space */ > - attr_mem = ioremap(pci_resource_start(pdev, 2), PAGE_SIZE); > - if (! attr_mem) > - goto fail; > - > - printk(KERN_DEBUG "orinoco_plx: CIS: "); > - for (i = 0; i < 16; i++) { > - printk("%02X:", (int)attr_mem[i]); > + if (err) { > + printk(KERN_ERR PFX "Cannot enable PCI device\n"); > + return -err; ditto earlier comment, same bug here > @@ -332,6 +374,8 @@ > .id_table = orinoco_plx_pci_id_table, > .probe = orinoco_plx_init_one, > .remove = __devexit_p(orinoco_plx_remove_one), > + .suspend = 0, > + .resume = 0, > }; superfluous change > + * Do a soft reset of the card using the Configuration Option Register > + */ > +static int orinoco_tmd_cor_reset(struct orinoco_private *priv) > +{ > + hermes_t *hw = &priv->hw; > + struct orinoco_tmd_card *card = priv->card; > + u32 addr = card->tmd_io; > + unsigned long timeout; > + u16 reg; > + > + outb(COR_VALUE | COR_RESET, addr); > + mdelay(1); > + > + outb(COR_VALUE, addr); > + mdelay(1); PCI posting bugs? > + /* Just in case, wait more until the card is no longer busy */ > + timeout = jiffies + (TMD_RESET_TIME * HZ / 1000); > + reg = hermes_read_regn(hw, CMD); > + while (time_before(jiffies, timeout) && (reg & HERMES_CMD_BUSY)) { > + mdelay(1); > + reg = hermes_read_regn(hw, CMD); > + } max delay without sleep way too long > err = pci_enable_device(pdev); > - if (err) > - return -EIO; > - > - printk(KERN_DEBUG PFX "TMD setup\n"); > - pccard_ioaddr = pci_resource_start(pdev, 2); > - pccard_iolen = pci_resource_len(pdev, 2); > - if (! request_region(pccard_ioaddr, pccard_iolen, DRIVER_NAME)) { > - printk(KERN_ERR PFX "I/O resource at 0x%lx len 0x%lx busy\n", > - pccard_ioaddr, pccard_iolen); > - pccard_ioaddr = 0; > - err = -EBUSY; > - goto fail; > + if (err) { > + printk(KERN_ERR PFX "Cannot enable PCI device\n"); > + return -err; same bug yet again > @@ -200,6 +232,8 @@ > .id_table = orinoco_tmd_pci_id_table, > .probe = orinoco_tmd_init_one, > .remove = __devexit_p(orinoco_tmd_remove_one), > + .suspend = 0, > + .resume = 0, superfluous From jgarzik@pobox.com Tue Oct 26 12:44:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 12:44: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.13.0/8.13.0) with ESMTP id i9QJioss000406 for ; Tue, 26 Oct 2004 12:44:50 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CMXFC-00042R-DA; Tue, 26 Oct 2004 20:44:34 +0100 Message-ID: <417EA915.9090500@pobox.com> Date: Tue, 26 Oct 2004 15:44:21 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dan Williams CC: netdev@oss.sgi.com, jgarzik@redhat.com, hermes@gibson.dropbear.id.au Subject: Re: R[PATCH 2.6.10-rc1 8/15] wireless/orinoco: Refactor spinlocks so we don't necessarily have to disable interrupts References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> <1098817472.3663.66.camel@dcbw.boston.redhat.com> In-Reply-To: <1098817472.3663.66.camel@dcbw.boston.redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10873 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: 1557 Lines: 49 Dan Williams wrote: > Update in-kernel orinoco wireless drivers to upstream CVS. > None of this is original code by Dan Williams, simply a > broken down patch set split-out from upstream orinoco CVS. > > o Refactor spinlocks so we don't necessarily have to disable interrupts > > Signed-off-by: Dan Williams > > --- a/drivers/net/wireless/orinoco.h.8-orinoco-spinlock 2004-10-26 10:44:41.445687264 -0400 > +++ b/drivers/net/wireless/orinoco.h 2004-10-26 10:45:39.296892544 -0400 > @@ -71,6 +71,8 @@ > u16 channel_mask; > int broken_disableport; > > + unsigned int irq_no_disable:1; > + > /* Configuration paramaters */ > u32 iw_mode; > int prefer_port3; > @@ -129,11 +131,17 @@ > extern inline int orinoco_lock(struct orinoco_private *priv, > unsigned long *flags) > { > - spin_lock_irqsave(&priv->lock, *flags); > + if (priv->irq_no_disable) > + spin_lock_bh(&priv->lock); > + else > + spin_lock_irqsave(&priv->lock, *flags); > if (priv->hw_unavailable) { > - printk(KERN_DEBUG "orinoco_lock() called with hw_unavailable (dev=%p)\n", > + DEBUG(1, "orinoco_lock() called with hw_unavailable (dev=%p)\n", > priv->ndev); > - spin_unlock_irqrestore(&priv->lock, *flags); > + if (priv->irq_no_disable) > + spin_unlock_bh(&priv->lock); > + else > + spin_unlock_irqrestore(&priv->lock, *flags); > return -EBUSY; This entire area has problems. Orinoco doesn't need to invent its own locking primitives, nor does it need to be inventing functions that take *flags as an argument. Jeff From jgarzik@pobox.com Tue Oct 26 12:46:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 12:46:37 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QJkW0I000762 for ; Tue, 26 Oct 2004 12:46:32 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CMXGq-000442-4G; Tue, 26 Oct 2004 20:46:16 +0100 Message-ID: <417EA97C.3070303@pobox.com> Date: Tue, 26 Oct 2004 15:46:04 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dan Williams CC: netdev@oss.sgi.com, jgarzik@redhat.com, hermes@gibson.dropbear.id.au Subject: Re: [PATCH 2.6.10-rc1 14/15] wireless/orinoco: add minimal ethtool support References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> <1098818684.9874.1.camel@dcbw.boston.redhat.com> In-Reply-To: <1098818684.9874.1.camel@dcbw.boston.redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10874 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: 316 Lines: 10 Dan Williams wrote: > Update in-kernel orinoco wireless drivers to upstream CVS. > None of this is original code by Dan Williams, simply a > broken down patch set split-out from upstream orinoco CVS. > > o Add minimal ethtool support (Pavel Roskin) should use ethtool_ops rather than manually handling the ioctl From davem@davemloft.net Tue Oct 26 12:50:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 12:50:47 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QJogRm001177 for ; Tue, 26 Oct 2004 12:50:42 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CMXDP-0002db-00; Tue, 26 Oct 2004 12:42:43 -0700 Date: Tue, 26 Oct 2004 12:42:43 -0700 From: "David S. Miller" To: Herbert Xu Cc: netdev@oss.sgi.com Subject: Re: [TCP] Move tcp_get_info out of tcp_diag Message-Id: <20041026124243.6dd71e9f.davem@davemloft.net> In-Reply-To: <20041026045701.GA10365@gondor.apana.org.au> References: <20041026045701.GA10365@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10875 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 262 Lines: 9 On Tue, 26 Oct 2004 14:57:01 +1000 Herbert Xu wrote: > This patch move tcp_get_info from tcp_diag.c into > the site of the other caller, tcp.c. > > Signed-off-by: Herbert Xu Applied, thanks Herbert. From davem@davemloft.net Tue Oct 26 12:55:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 12:55:26 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QJtJe1001560 for ; Tue, 26 Oct 2004 12:55:21 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CMXHw-0002ef-00; Tue, 26 Oct 2004 12:47:24 -0700 Date: Tue, 26 Oct 2004 12:47:24 -0700 From: "David S. Miller" To: Jesper Juhl Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, trivial@rustcorp.com.au Subject: Re: [PATCH][Doc][Trivial] fix spelling error related to IPComp help in Kconfig Message-Id: <20041026124724.023962cc.davem@davemloft.net> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10876 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 399 Lines: 11 On Tue, 26 Oct 2004 20:44:35 +0200 (CEST) Jesper Juhl wrote: > Small patch that fixes a spelling error (Payload misspelled as Paylod)in > the IPComp help text in Kconfig (also expands the text to "IP Payload > Compression Protocol (IPComp)" which is the title of RFC3173). > Please consider applying. > > Signed-off-by: Jesper Juhl Applied, thanks Jasper. From dcbw@redhat.com Tue Oct 26 12:55:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 12:55:44 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QJtbv6001625 for ; Tue, 26 Oct 2004 12:55:39 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9QJt86A001339; Tue, 26 Oct 2004 15:55:08 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9QJt7r24174; Tue, 26 Oct 2004 15:55:07 -0400 Received: from dcbw.boston.redhat.com (dcbw.boston.redhat.com [172.16.80.23]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9QJt6Pd019766; Tue, 26 Oct 2004 15:55:06 -0400 Subject: Re: [PATCH 2.6.10-rc1 1/15] wireless/orinoco: Use msleep() instead of hardcoded schedule_timeout()s From: Dan Williams To: Christoph Hellwig Cc: netdev@oss.sgi.com, jgarzik@redhat.com, hermes@gibson.dropbear.id.au In-Reply-To: <20041026194219.GA17343@infradead.org> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> <1098815604.3663.35.camel@dcbw.boston.redhat.com> <20041026184749.GA16621@infradead.org> <1098819336.9874.11.camel@dcbw.boston.redhat.com> <20041026194219.GA17343@infradead.org> Content-Type: text/plain Date: Tue, 26 Oct 2004 15:55:12 -0400 Message-Id: <1098820512.9874.13.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-1) Content-Transfer-Encoding: 7bit X-archive-position: 10877 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcbw@redhat.com Precedence: bulk X-list: netdev Content-Length: 443 Lines: 15 I will leave that do David/jgarzik since I didn't actually write any of this code, I just broke the megadiff down. Dan On Tue, 2004-10-26 at 20:42 +0100, Christoph Hellwig wrote: > On Tue, Oct 26, 2004 at 03:35:36PM -0400, Dan Williams wrote: > > New description: > > > > o Use msleep() instead of hardcoded schedule_timeout()s > > o Normalize sleep calls to use msleep() everywhere > > care to explain what's the point of the latter? > From titeras@two.research.nokia.com Tue Oct 26 14:09:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 14:09:36 -0700 (PDT) Received: from mgw-x2.nokia.com (mgw-x2.nokia.com [131.228.20.22]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QL9Ut1003395 for ; Tue, 26 Oct 2004 14:09:31 -0700 Received: from esdks002.ntc.nokia.com (esdks002.ntc.nokia.com [172.21.138.121]) by mgw-x2.nokia.com (Switch-2.2.8/Switch-2.2.8) with ESMTP id i9QL91e16784; Wed, 27 Oct 2004 00:09:02 +0300 (EET DST) X-Scanned: Wed, 27 Oct 2004 00:07:14 +0300 Nokia Message Protector V1.3.31 2004060815 - RELEASE Received: (from root@localhost) by esdks002.ntc.nokia.com (8.12.9/8.12.9) id i9QL7E0A021742; Wed, 27 Oct 2004 00:07:14 +0300 Received: from mgw-int1.ntc.nokia.com (172.21.143.96) by esdks002.ntc.nokia.com 00AJTCNd; Wed, 27 Oct 2004 00:07:13 EEST Received: from two.research.nokia.com (two.research.nokia.com [172.21.50.14]) by mgw-int1.ntc.nokia.com (Switch-2.2.8/Switch-2.2.8) with ESMTP id i9QKqda06500; Tue, 26 Oct 2004 23:52:39 +0300 (EET DST) Received: from titeras by two.research.nokia.com with local (Exim 3.36 #1 (Debian)) id 1CMYJ5-0006CN-00; Tue, 26 Oct 2004 23:52:39 +0300 Date: Tue, 26 Oct 2004 23:52:39 +0300 From: "Teras Timo (EXT-YomiGroup/Helsinki)" To: ext Christoph Hellwig Cc: davem@davemloft.net, netdev@oss.sgi.com Subject: Re: [PATCH] Add ability to register class interfaces for network class Message-ID: <20041026205239.GA23825@two.research.nokia.com> References: <20041026183526.GA23535@two.research.nokia.com> <20041026184838.GB16621@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20041026184838.GB16621@infradead.org> User-Agent: Mutt/1.5.6+20040907i X-MIME-Autoconverted: from 8bit to quoted-printable by mgw-int1.ntc.nokia.com id i9QKqda06500 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i9QL9Ut1003395 X-archive-position: 10878 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Ext-Timo.Teras@nokia.com Precedence: bulk X-list: netdev Content-Length: 1255 Lines: 32 On Tue, Oct 26, 2004 at 07:48:38PM +0100, ext Christoph Hellwig wrote: > On Tue, Oct 26, 2004 at 09:35:26PM +0300, Timo Teräs wrote: > > Add functions to register class interfaces for network class. > > Similar to the ones found in scsi subsystem. > > > > Originally posted on linux-net and related discussion can be found > > from http://marc.theaimsgroup.com/?l=linux-net&m=109758592121767&w=2. > > > > Signed-off-by: Timo Teräs > > And you still haven't told why this makes sense nor shown a user for it. Did you read my original reply to your earlier mail? I pointed out the reason why I need it: to add an attribute: /sys/class/net//. Others might want to do this too. Also the interface subsystem is used in many places (eg. i2o) to create all the sysfs entries. Maybe it'd be useful to do in net class as well. And if'd make separate interfaces for standard attributes and wireless attributes. That way you'd get rid of the #ifdefs of WIRELESS_EXT in net-sysfs.c. On the other hand you didn't answer my question: why the interface registration should not be possible? Documentation/driver-model/interface.txt states that this is exactly the thing it should be used for. Regards, Timo From tgraf@suug.ch Tue Oct 26 15:21:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 15:21:54 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QMLkTj004698 for ; Tue, 26 Oct 2004 15:21:47 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 0650B87; Wed, 27 Oct 2004 00:21:06 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id C11B01C0E9; Wed, 27 Oct 2004 00:21:48 +0200 (CEST) Date: Wed, 27 Oct 2004 00:21:48 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCHSET 0/11] PKT_SCHED: overall net/pkt_cls.h and net/pkt_sched.h cleanup Message-ID: <20041026222148.GA12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 10879 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 891 Lines: 25 Dave, This patchset attempts to clean up the mess in net/pkt_sched.h and net/pkt_cls.h grown over the last years. It introduces net/sch_generic.h containing all generic sch/cls bits and act_api.h containing pubic action/policer bits. The current architecture which is basically to have net/pkt_sched.h include net/pkt_cls.h and everyone just including net/pkt_sched.h makes it impossible to add any generic classifer bits into pkt_cls.h and acted just like if we had put it into one big file. Tested for nearly a week with various combinations of action/policer configurations. See patch descriptions for more details. Dave, Jamal: The only difference to the previous patchset is that it doesn't touch qdisc_tree_lock and qdisc_lookup anymore but let cls_api.c include net/pkt_sched.h which makes more sense. I splitted up the patches a bit more to improve readability for the review. From tgraf@suug.ch Tue Oct 26 15:22:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 15:22:31 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QMMQes004798 for ; Tue, 26 Oct 2004 15:22:26 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id BC60987; Wed, 27 Oct 2004 00:21:48 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 198851C0E9; Wed, 27 Oct 2004 00:22:32 +0200 (CEST) Date: Wed, 27 Oct 2004 00:22:32 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 1/11] PKT_SCHED: linux/pkt_cls.h depends on linux/pkt_sched.h Message-ID: <20041026222232.GB12289@postel.suug.ch> References: <20041026222148.GA12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041026222148.GA12289@postel.suug.ch> X-archive-position: 10880 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 387 Lines: 11 --- linux-2.6.10-rc1-bk1.orig/include/linux/pkt_cls.h 2004-10-24 10:58:48.000000000 +0200 +++ linux-2.6.10-rc1-bk1/include/linux/pkt_cls.h 2004-10-24 15:02:28.000000000 +0200 @@ -1,6 +1,8 @@ #ifndef __LINUX_PKT_CLS_H #define __LINUX_PKT_CLS_H +#include + /* I think i could have done better macros ; for now this is stolen from * some arch/mips code - jhs */ From tgraf@suug.ch Tue Oct 26 15:23:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 15:23:39 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QMNVVj005166 for ; Tue, 26 Oct 2004 15:23:31 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id ADFE787; Wed, 27 Oct 2004 00:22:53 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 0F9A81C0E9; Wed, 27 Oct 2004 00:23:37 +0200 (CEST) Date: Wed, 27 Oct 2004 00:23:36 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 2/11] PKT_SCHED: Add net/sch_generic.h with generic sched definitions Message-ID: <20041026222336.GC12289@postel.suug.ch> References: <20041026222148.GA12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041026222148.GA12289@postel.suug.ch> X-archive-position: 10881 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 6429 Lines: 230 Adds net/sch_generic.h containing all bits directly referenced by schedulers and classifiers. Map of users: Group 1) struct qdisc_rate_table sch_*, tcf_police -> cls_* Could theoretically be moved to pkt_sched.h with Patch 4 but the long term goal it so make net/act_api.h to being dependent on net/pkt_sched.h Group 2) struct Qdisc sch_*, tcf_proto -> cls_* struct Qdisc_ops sch_*, tcf_proto -> cls_* struct Qdisc_class_ops sch_*, tcf_proto -> cls_* struct tcf_proto_ops sch_*, cls_* struct tcf_proto sch_*, cls_* Obviously used by schedulers but also by classifiers to bind classes (tcf_proto -> Qdisc -> Qdisc_ops -> Qdisc_class_ops). tcf_proto OTOH is used by schedulers, (neat cross usage). Group 3) struct tcf_result sch_*, cls_* Used to communicate between scheduler and classifer to report classify result. Group 4) sch_tree_(un)lock sch_*, cls_* tcf_tree_(un)lock sch_*, cls_* qdisc(un)lock_tree sch_*, cls_* Randomly used in schedulers and classifiers. Group 5) tcf_destroy sch_*, cls_api.c Coud theoretically be moved to pkt_sched.h if we include pkt_sched.h in cls_api.c but this is really generic and it seemd cleaner to have it here. This would be the only classifier related action in pkt_sched.h The following types are referenced in sch_generic.h but defined in either pkt_cls.h or pkt_sched.h because they will never be used by the other side: - qdisc_walker (pkt_sched.h) - tcf_walker (pkt_cls.h) Signed-off-by: Thomas Graf --- linux-2.6.10-rc1-bk1.orig/include/net/sch_generic.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.10-rc1-bk1/include/net/sch_generic.h 2004-10-26 23:18:41.000000000 +0200 @@ -0,0 +1,175 @@ +#ifndef __NET_SCHED_GENERIC_H +#define __NET_SCHED_GENERIC_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct Qdisc_ops; +struct qdisc_walker; +struct tcf_walker; +struct module; + +struct qdisc_rate_table +{ + struct tc_ratespec rate; + u32 data[256]; + struct qdisc_rate_table *next; + int refcnt; +}; + +struct Qdisc +{ + int (*enqueue)(struct sk_buff *skb, struct Qdisc *dev); + struct sk_buff * (*dequeue)(struct Qdisc *dev); + unsigned flags; +#define TCQ_F_BUILTIN 1 +#define TCQ_F_THROTTLED 2 +#define TCQ_F_INGRESS 4 + int padded; + struct Qdisc_ops *ops; + u32 handle; + u32 parent; + atomic_t refcnt; + struct sk_buff_head q; + struct net_device *dev; + struct list_head list; + + struct gnet_stats_basic bstats; + struct gnet_stats_queue qstats; + struct gnet_stats_rate_est rate_est; + spinlock_t *stats_lock; + struct rcu_head q_rcu; + int (*reshape_fail)(struct sk_buff *skb, + struct Qdisc *q); + + /* This field is deprecated, but it is still used by CBQ + * and it will live until better solution will be invented. + */ + struct Qdisc *__parent; +}; + +struct Qdisc_class_ops +{ + /* Child qdisc manipulation */ + int (*graft)(struct Qdisc *, unsigned long cl, + struct Qdisc *, struct Qdisc **); + struct Qdisc * (*leaf)(struct Qdisc *, unsigned long cl); + + /* Class manipulation routines */ + unsigned long (*get)(struct Qdisc *, u32 classid); + void (*put)(struct Qdisc *, unsigned long); + int (*change)(struct Qdisc *, u32, u32, + struct rtattr **, unsigned long *); + int (*delete)(struct Qdisc *, unsigned long); + void (*walk)(struct Qdisc *, struct qdisc_walker * arg); + + /* Filter manipulation */ + struct tcf_proto ** (*tcf_chain)(struct Qdisc *, unsigned long); + unsigned long (*bind_tcf)(struct Qdisc *, unsigned long, + u32 classid); + void (*unbind_tcf)(struct Qdisc *, unsigned long); + + /* rtnetlink specific */ + int (*dump)(struct Qdisc *, unsigned long, + struct sk_buff *skb, struct tcmsg*); + int (*dump_stats)(struct Qdisc *, unsigned long, + struct gnet_dump *); +}; + +struct Qdisc_ops +{ + struct Qdisc_ops *next; + struct Qdisc_class_ops *cl_ops; + char id[IFNAMSIZ]; + int priv_size; + + int (*enqueue)(struct sk_buff *, struct Qdisc *); + struct sk_buff * (*dequeue)(struct Qdisc *); + int (*requeue)(struct sk_buff *, struct Qdisc *); + unsigned int (*drop)(struct Qdisc *); + + int (*init)(struct Qdisc *, struct rtattr *arg); + void (*reset)(struct Qdisc *); + void (*destroy)(struct Qdisc *); + int (*change)(struct Qdisc *, struct rtattr *arg); + + int (*dump)(struct Qdisc *, struct sk_buff *); + int (*dump_stats)(struct Qdisc *, struct gnet_dump *); + + struct module *owner; +}; + + +struct tcf_result +{ + unsigned long class; + u32 classid; +}; + +struct tcf_proto_ops +{ + struct tcf_proto_ops *next; + char kind[IFNAMSIZ]; + + int (*classify)(struct sk_buff*, struct tcf_proto*, + struct tcf_result *); + int (*init)(struct tcf_proto*); + void (*destroy)(struct tcf_proto*); + + unsigned long (*get)(struct tcf_proto*, u32 handle); + void (*put)(struct tcf_proto*, unsigned long); + int (*change)(struct tcf_proto*, unsigned long, + u32 handle, struct rtattr **, + unsigned long *); + int (*delete)(struct tcf_proto*, unsigned long); + void (*walk)(struct tcf_proto*, struct tcf_walker *arg); + + /* rtnetlink specific */ + int (*dump)(struct tcf_proto*, unsigned long, + struct sk_buff *skb, struct tcmsg*); + + struct module *owner; +}; + +struct tcf_proto +{ + /* Fast access part */ + struct tcf_proto *next; + void *root; + int (*classify)(struct sk_buff*, struct tcf_proto*, + struct tcf_result *); + u32 protocol; + + /* All the rest */ + u32 prio; + u32 classid; + struct Qdisc *q; + void *data; + struct tcf_proto_ops *ops; +}; + + +extern void qdisc_lock_tree(struct net_device *dev); +extern void qdisc_unlock_tree(struct net_device *dev); + +#define sch_tree_lock(q) qdisc_lock_tree((q)->dev) +#define sch_tree_unlock(q) qdisc_unlock_tree((q)->dev) +#define tcf_tree_lock(tp) qdisc_lock_tree((tp)->q->dev) +#define tcf_tree_unlock(tp) qdisc_unlock_tree((tp)->q->dev) + +static inline void +tcf_destroy(struct tcf_proto *tp) +{ + tp->ops->destroy(tp); + module_put(tp->ops->owner); + kfree(tp); +} + +#endif From tgraf@suug.ch Tue Oct 26 15:24:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 15:24:26 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QMOJmw005677 for ; Tue, 26 Oct 2004 15:24:20 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 0040087; Wed, 27 Oct 2004 00:23:42 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 582FA1C0E9; Wed, 27 Oct 2004 00:24:25 +0200 (CEST) Date: Wed, 27 Oct 2004 00:24:25 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 3/11] PKT_SCHED: Remove obsolete definitions in pkt_cls.h Message-ID: <20041026222425.GD12289@postel.suug.ch> References: <20041026222148.GA12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041026222148.GA12289@postel.suug.ch> X-archive-position: 10882 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 2278 Lines: 94 Removes all obsolete definitions in pkt_cls.h now in sch_generic.h and includes them via sch_generic.h. Signed-off-by: Thomas Graf --- linux-2.6.10-rc1-bk1.orig/include/net/pkt_cls.h 2004-10-26 22:57:15.000000000 +0200 +++ linux-2.6.10-rc1-bk1/include/net/pkt_cls.h 2004-10-26 22:58:45.000000000 +0200 @@ -1,36 +1,11 @@ #ifndef __NET_PKT_CLS_H #define __NET_PKT_CLS_H - #include - -struct rtattr; -struct tcmsg; +#include /* Basic packet classifier frontend definitions. */ -struct tcf_result -{ - unsigned long class; - u32 classid; -}; - -struct tcf_proto -{ - /* Fast access part */ - struct tcf_proto *next; - void *root; - int (*classify)(struct sk_buff*, struct tcf_proto*, struct tcf_result *); - u32 protocol; - - /* All the rest */ - u32 prio; - u32 classid; - struct Qdisc *q; - void *data; - struct tcf_proto_ops *ops; -}; - struct tcf_walker { int stop; @@ -39,29 +14,6 @@ int (*fn)(struct tcf_proto *, unsigned long node, struct tcf_walker *); }; -struct module; - -struct tcf_proto_ops -{ - struct tcf_proto_ops *next; - char kind[IFNAMSIZ]; - - int (*classify)(struct sk_buff*, struct tcf_proto*, struct tcf_result *); - int (*init)(struct tcf_proto*); - void (*destroy)(struct tcf_proto*); - - unsigned long (*get)(struct tcf_proto*, u32 handle); - void (*put)(struct tcf_proto*, unsigned long); - int (*change)(struct tcf_proto*, unsigned long, u32 handle, struct rtattr **, unsigned long *); - int (*delete)(struct tcf_proto*, unsigned long); - void (*walk)(struct tcf_proto*, struct tcf_walker *arg); - - /* rtnetlink specific */ - int (*dump)(struct tcf_proto*, unsigned long, struct sk_buff *skb, struct tcmsg*); - - struct module *owner; -}; - /* Main classifier routine: scans classifier chain attached to this qdisc, (optionally) tests for protocol and asks specific classifiers. @@ -107,18 +59,8 @@ return -1; } -static inline void tcf_destroy(struct tcf_proto *tp) -{ - tp->ops->destroy(tp); - module_put(tp->ops->owner); - kfree(tp); -} - extern int register_tcf_proto_ops(struct tcf_proto_ops *ops); extern int unregister_tcf_proto_ops(struct tcf_proto_ops *ops); extern int ing_filter(struct sk_buff *skb); - - - #endif From tgraf@suug.ch Tue Oct 26 15:25:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 15:25:10 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QMP3Z3006006 for ; Tue, 26 Oct 2004 15:25:04 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id CE16A87; Wed, 27 Oct 2004 00:24:25 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 29FAF1C0E9; Wed, 27 Oct 2004 00:25:09 +0200 (CEST) Date: Wed, 27 Oct 2004 00:25:09 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 4/11] PKT_SCHED: Add net/act_api.h with public action/policer bits Message-ID: <20041026222509.GE12289@postel.suug.ch> References: <20041026222148.GA12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041026222148.GA12289@postel.suug.ch> X-archive-position: 10883 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 3973 Lines: 130 Adds net/act_api.h containing all public action/policer bits used by schedulers and classifiers Signed-off-by: Thomas Graf --- linux-2.6.10-rc1-bk1.orig/include/net/act_api.h 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.10-rc1-bk1/include/net/act_api.h 2004-10-26 23:04:24.000000000 +0200 @@ -0,0 +1,122 @@ +#ifndef __NET_ACT_API_H +#define __NET_ACT_API_H + +/* + * Public police action API for classifiers/qdiscs + */ + +#include +#include + +struct tcf_police +{ + struct tcf_police *next; + int refcnt; +#ifdef CONFIG_NET_CLS_ACT + int bindcnt; +#endif + u32 index; + int action; + int result; + u32 ewma_rate; + u32 burst; + u32 mtu; + u32 toks; + u32 ptoks; + psched_time_t t_c; + spinlock_t lock; + struct qdisc_rate_table *R_tab; + struct qdisc_rate_table *P_tab; + + struct tc_stats stats; + spinlock_t *stats_lock; +}; + +#ifdef CONFIG_NET_CLS_ACT + +#define ACT_P_CREATED 1 +#define ACT_P_DELETED 1 +#define tca_gen(name) \ +struct tcf_##name *next; \ + u32 index; \ + int refcnt; \ + int bindcnt; \ + u32 capab; \ + int action; \ + struct tcf_t tm; \ + struct tc_stats stats; \ + spinlock_t *stats_lock; \ + spinlock_t lock + + +struct tc_action +{ + void *priv; + struct tc_action_ops *ops; + __u32 type; /* for backward compat(TCA_OLD_COMPAT) */ + __u32 order; + struct tc_action *next; +}; + +#define TCA_CAP_NONE 0 +struct tc_action_ops +{ + struct tc_action_ops *next; + char kind[IFNAMSIZ]; + __u32 type; /* TBD to match kind */ + __u32 capab; /* capabilities includes 4 bit version */ + struct module *owner; + int (*act)(struct sk_buff **, struct tc_action *); + int (*get_stats)(struct sk_buff *, struct tc_action *); + int (*dump)(struct sk_buff *, struct tc_action *,int , int); + int (*cleanup)(struct tc_action *, int bind); + int (*lookup)(struct tc_action *, u32 ); + int (*init)(struct rtattr *,struct rtattr *,struct tc_action *, int , int ); + int (*walk)(struct sk_buff *, struct netlink_callback *, int , struct tc_action *); +}; + +extern int tcf_register_action(struct tc_action_ops *a); +extern int tcf_unregister_action(struct tc_action_ops *a); +extern void tcf_action_destroy(struct tc_action *a, int bind); +extern int tcf_action_exec(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res); +extern int tcf_action_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a,char *n, int ovr, int bind); +extern int tcf_action_init_1(struct rtattr *rta, struct rtattr *est, struct tc_action *a,char *n, int ovr, int bind); +extern int tcf_action_dump(struct sk_buff *skb, struct tc_action *a, int, int); +extern int tcf_action_dump_old(struct sk_buff *skb, struct tc_action *a, int, int); +extern int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int); +extern int tcf_action_copy_stats (struct sk_buff *,struct tc_action *); +extern int tcf_act_police_locate(struct rtattr *rta, struct rtattr *est,struct tc_action *,int , int ); +extern int tcf_act_police_dump(struct sk_buff *, struct tc_action *, int, int); +extern int tcf_act_police(struct sk_buff **skb, struct tc_action *a); +#endif /* CONFIG_NET_CLS_ACT */ + +extern int tcf_police(struct sk_buff *skb, struct tcf_police *p); +extern int qdisc_copy_stats(struct sk_buff *skb, struct tc_stats *st, spinlock_t *lock); +extern void tcf_police_destroy(struct tcf_police *p); +extern struct tcf_police * tcf_police_locate(struct rtattr *rta, struct rtattr *est); +extern int tcf_police_dump(struct sk_buff *skb, struct tcf_police *p); + +static inline int +tcf_police_release(struct tcf_police *p, int bind) +{ + int ret = 0; +#ifdef CONFIG_NET_CLS_ACT + if (p) { + if (bind) { + p->bindcnt--; + } + p->refcnt--; + if (p->refcnt <= 0 && !p->bindcnt) { + tcf_police_destroy(p); + ret = 1; + } + } +#else + if (p && --p->refcnt == 0) + tcf_police_destroy(p); + +#endif /* CONFIG_NET_CLS_ACT */ + return ret; +} + +#endif From tgraf@suug.ch Tue Oct 26 15:25:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 15:25:57 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QMPoEB006341 for ; Tue, 26 Oct 2004 15:25:50 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 6620087; Wed, 27 Oct 2004 00:25:09 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id B89D81C0E9; Wed, 27 Oct 2004 00:25:52 +0200 (CEST) Date: Wed, 27 Oct 2004 00:25:52 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 5/11] PKT_SCHED: Remove obsolete definitions in pkt_sched.h Message-ID: <20041026222552.GF12289@postel.suug.ch> References: <20041026222148.GA12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041026222148.GA12289@postel.suug.ch> X-archive-position: 10884 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 7701 Lines: 256 Removes all obsolete definitions in pkt_sched.h now in sch_generic.h or act_api.h. Signed-off-by: Thomas Graf --- linux-2.6.10-rc1-bk1.orig/include/net/pkt_sched.h 2004-10-26 22:57:13.000000000 +0200 +++ linux-2.6.10-rc1-bk1/include/net/pkt_sched.h 2004-10-26 23:16:18.000000000 +0200 @@ -1,18 +1,7 @@ #ifndef __NET_PKT_SCHED_H #define __NET_PKT_SCHED_H -#include -#include -#include -#include -#include -#include -#include -#include -#include - -struct rtattr; -struct Qdisc; +#include struct qdisc_walker { @@ -22,86 +11,8 @@ int (*fn)(struct Qdisc *, unsigned long cl, struct qdisc_walker *); }; -struct Qdisc_class_ops -{ - /* Child qdisc manipulation */ - int (*graft)(struct Qdisc *, unsigned long cl, struct Qdisc *, struct Qdisc **); - struct Qdisc * (*leaf)(struct Qdisc *, unsigned long cl); - - /* Class manipulation routines */ - unsigned long (*get)(struct Qdisc *, u32 classid); - void (*put)(struct Qdisc *, unsigned long); - int (*change)(struct Qdisc *, u32, u32, struct rtattr **, unsigned long *); - int (*delete)(struct Qdisc *, unsigned long); - void (*walk)(struct Qdisc *, struct qdisc_walker * arg); - - /* Filter manipulation */ - struct tcf_proto ** (*tcf_chain)(struct Qdisc *, unsigned long); - unsigned long (*bind_tcf)(struct Qdisc *, unsigned long, u32 classid); - void (*unbind_tcf)(struct Qdisc *, unsigned long); - - /* rtnetlink specific */ - int (*dump)(struct Qdisc *, unsigned long, struct sk_buff *skb, struct tcmsg*); - int (*dump_stats)(struct Qdisc *, unsigned long, struct gnet_dump *); -}; - -struct module; - -struct Qdisc_ops -{ - struct Qdisc_ops *next; - struct Qdisc_class_ops *cl_ops; - char id[IFNAMSIZ]; - int priv_size; - - int (*enqueue)(struct sk_buff *, struct Qdisc *); - struct sk_buff * (*dequeue)(struct Qdisc *); - int (*requeue)(struct sk_buff *, struct Qdisc *); - unsigned int (*drop)(struct Qdisc *); - - int (*init)(struct Qdisc *, struct rtattr *arg); - void (*reset)(struct Qdisc *); - void (*destroy)(struct Qdisc *); - int (*change)(struct Qdisc *, struct rtattr *arg); - - int (*dump)(struct Qdisc *, struct sk_buff *); - int (*dump_stats)(struct Qdisc *, struct gnet_dump *); - - struct module *owner; -}; - extern rwlock_t qdisc_tree_lock; -struct Qdisc -{ - int (*enqueue)(struct sk_buff *skb, struct Qdisc *dev); - struct sk_buff * (*dequeue)(struct Qdisc *dev); - unsigned flags; -#define TCQ_F_BUILTIN 1 -#define TCQ_F_THROTTLED 2 -#define TCQ_F_INGRESS 4 - int padded; - struct Qdisc_ops *ops; - u32 handle; - u32 parent; - atomic_t refcnt; - struct sk_buff_head q; - struct net_device *dev; - struct list_head list; - - struct gnet_stats_basic bstats; - struct gnet_stats_queue qstats; - struct gnet_stats_rate_est rate_est; - spinlock_t *stats_lock; - struct rcu_head q_rcu; - int (*reshape_fail)(struct sk_buff *skb, struct Qdisc *q); - - /* This field is deprecated, but it is still used by CBQ - * and it will live until better solution will be invented. - */ - struct Qdisc *__parent; -}; - #define QDISC_ALIGN 32 #define QDISC_ALIGN_CONST (QDISC_ALIGN - 1) @@ -111,22 +22,6 @@ & ~QDISC_ALIGN_CONST); } -struct qdisc_rate_table -{ - struct tc_ratespec rate; - u32 data[256]; - struct qdisc_rate_table *next; - int refcnt; -}; - -extern void qdisc_lock_tree(struct net_device *dev); -extern void qdisc_unlock_tree(struct net_device *dev); - -#define sch_tree_lock(q) qdisc_lock_tree((q)->dev) -#define sch_tree_unlock(q) qdisc_unlock_tree((q)->dev) -#define tcf_tree_lock(tp) qdisc_lock_tree((tp)->q->dev) -#define tcf_tree_unlock(tp) qdisc_unlock_tree((tp)->q->dev) - #define cls_set_class(tp, clp, cl) tcf_set_class(tp, clp, cl) static inline unsigned long __cls_set_class(unsigned long *clp, unsigned long cl) @@ -311,118 +206,6 @@ #endif /* !CONFIG_NET_SCH_CLK_GETTIMEOFDAY */ -struct tcf_police -{ - struct tcf_police *next; - int refcnt; -#ifdef CONFIG_NET_CLS_ACT - int bindcnt; -#endif - u32 index; - int action; - int result; - u32 ewma_rate; - u32 burst; - u32 mtu; - u32 toks; - u32 ptoks; - psched_time_t t_c; - spinlock_t lock; - struct qdisc_rate_table *R_tab; - struct qdisc_rate_table *P_tab; - - struct tc_stats stats; - spinlock_t *stats_lock; -}; - -#ifdef CONFIG_NET_CLS_ACT - -#define ACT_P_CREATED 1 -#define ACT_P_DELETED 1 -#define tca_gen(name) \ -struct tcf_##name *next; \ - u32 index; \ - int refcnt; \ - int bindcnt; \ - u32 capab; \ - int action; \ - struct tcf_t tm; \ - struct tc_stats stats; \ - spinlock_t *stats_lock; \ - spinlock_t lock - - -struct tc_action -{ - void *priv; - struct tc_action_ops *ops; - __u32 type; /* for backward compat(TCA_OLD_COMPAT) */ - __u32 order; - struct tc_action *next; -}; - -#define TCA_CAP_NONE 0 -struct tc_action_ops -{ - struct tc_action_ops *next; - char kind[IFNAMSIZ]; - __u32 type; /* TBD to match kind */ - __u32 capab; /* capabilities includes 4 bit version */ - struct module *owner; - int (*act)(struct sk_buff **, struct tc_action *); - int (*get_stats)(struct sk_buff *, struct tc_action *); - int (*dump)(struct sk_buff *, struct tc_action *,int , int); - int (*cleanup)(struct tc_action *, int bind); - int (*lookup)(struct tc_action *, u32 ); - int (*init)(struct rtattr *,struct rtattr *,struct tc_action *, int , int ); - int (*walk)(struct sk_buff *, struct netlink_callback *, int , struct tc_action *); -}; - -extern int tcf_register_action(struct tc_action_ops *a); -extern int tcf_unregister_action(struct tc_action_ops *a); -extern void tcf_action_destroy(struct tc_action *a, int bind); -extern int tcf_action_exec(struct sk_buff *skb, struct tc_action *a, struct tcf_result *res); -extern int tcf_action_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a,char *n, int ovr, int bind); -extern int tcf_action_init_1(struct rtattr *rta, struct rtattr *est, struct tc_action *a,char *n, int ovr, int bind); -extern int tcf_action_dump(struct sk_buff *skb, struct tc_action *a, int, int); -extern int tcf_action_dump_old(struct sk_buff *skb, struct tc_action *a, int, int); -extern int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int); -extern int tcf_action_copy_stats (struct sk_buff *,struct tc_action *); -extern int tcf_act_police_locate(struct rtattr *rta, struct rtattr *est,struct tc_action *,int , int ); -extern int tcf_act_police_dump(struct sk_buff *, struct tc_action *, int, int); -extern int tcf_act_police(struct sk_buff **skb, struct tc_action *a); -#endif - -extern unsigned long tcf_set_class(struct tcf_proto *tp, unsigned long *clp, - unsigned long cl); -extern int tcf_police(struct sk_buff *skb, struct tcf_police *p); -extern int qdisc_copy_stats(struct sk_buff *skb, struct tc_stats *st, spinlock_t *lock); -extern void tcf_police_destroy(struct tcf_police *p); -extern struct tcf_police * tcf_police_locate(struct rtattr *rta, struct rtattr *est); -extern int tcf_police_dump(struct sk_buff *skb, struct tcf_police *p); - -static inline int tcf_police_release(struct tcf_police *p, int bind) -{ - int ret = 0; -#ifdef CONFIG_NET_CLS_ACT - if (p) { - if (bind) { - p->bindcnt--; - } - p->refcnt--; - if (p->refcnt <= 0 && !p->bindcnt) { - tcf_police_destroy(p); - ret = 1; - } - } -#else - if (p && --p->refcnt == 0) - tcf_police_destroy(p); - -#endif - return ret; -} - extern struct Qdisc noop_qdisc; extern struct Qdisc_ops noop_qdisc_ops; extern struct Qdisc_ops pfifo_qdisc_ops; From tgraf@suug.ch Tue Oct 26 15:26:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 15:26:27 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QMQLTp006564 for ; Tue, 26 Oct 2004 15:26:21 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 8B61987; Wed, 27 Oct 2004 00:25:43 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id DE5641C0E9; Wed, 27 Oct 2004 00:26:26 +0200 (CEST) Date: Wed, 27 Oct 2004 00:26:26 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 6/11] PKT_SCHED: Transform prototypes to be extern Message-ID: <20041026222626.GG12289@postel.suug.ch> References: <20041026222148.GA12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041026222148.GA12289@postel.suug.ch> X-archive-position: 10885 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 2212 Lines: 44 Signed-off-by: Thomas Graf --- linux-2.6.10-rc1-bk1.orig/include/net/pkt_sched.h 2004-10-26 23:19:32.000000000 +0200 +++ linux-2.6.10-rc1-bk1/include/net/pkt_sched.h 2004-10-26 23:30:36.000000000 +0200 @@ -211,21 +211,24 @@ extern struct Qdisc_ops pfifo_qdisc_ops; extern struct Qdisc_ops bfifo_qdisc_ops; -int register_qdisc(struct Qdisc_ops *qops); -int unregister_qdisc(struct Qdisc_ops *qops); -struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle); -struct Qdisc *qdisc_lookup_class(struct net_device *dev, u32 handle); -void dev_init_scheduler(struct net_device *dev); -void dev_shutdown(struct net_device *dev); -void dev_activate(struct net_device *dev); -void dev_deactivate(struct net_device *dev); -void qdisc_reset(struct Qdisc *qdisc); -void qdisc_destroy(struct Qdisc *qdisc); -struct Qdisc * qdisc_create_dflt(struct net_device *dev, struct Qdisc_ops *ops); -int qdisc_new_estimator(struct tc_stats *stats, spinlock_t *stats_lock, struct rtattr *opt); -void qdisc_kill_estimator(struct tc_stats *stats); -struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r, struct rtattr *tab); -void qdisc_put_rtab(struct qdisc_rate_table *tab); +extern int register_qdisc(struct Qdisc_ops *qops); +extern int unregister_qdisc(struct Qdisc_ops *qops); +extern struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle); +extern struct Qdisc *qdisc_lookup_class(struct net_device *dev, u32 handle); +extern void dev_init_scheduler(struct net_device *dev); +extern void dev_shutdown(struct net_device *dev); +extern void dev_activate(struct net_device *dev); +extern void dev_deactivate(struct net_device *dev); +extern void qdisc_reset(struct Qdisc *qdisc); +extern void qdisc_destroy(struct Qdisc *qdisc); +extern struct Qdisc * qdisc_create_dflt(struct net_device *dev, + struct Qdisc_ops *ops); +extern int qdisc_new_estimator(struct tc_stats *stats, spinlock_t *stats_lock, + struct rtattr *opt); +extern void qdisc_kill_estimator(struct tc_stats *stats); +extern struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r, + struct rtattr *tab); +extern void qdisc_put_rtab(struct qdisc_rate_table *tab); extern int qdisc_restart(struct net_device *dev); From tgraf@suug.ch Tue Oct 26 15:26:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 15:27:03 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QMQtI3006919 for ; Tue, 26 Oct 2004 15:26:56 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 2138587; Wed, 27 Oct 2004 00:26:18 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 6F1AC1C0E9; Wed, 27 Oct 2004 00:27:01 +0200 (CEST) Date: Wed, 27 Oct 2004 00:27:01 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 7/11] PKT_SCHED: Move tc_classify from pkt_cls.h to sch_api.c Message-ID: <20041026222701.GH12289@postel.suug.ch> References: <20041026222148.GA12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041026222148.GA12289@postel.suug.ch> X-archive-position: 10886 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 3713 Lines: 131 tc_classiy has grown too big to be inlined, move it to sch_api.c and export it. Signed-off-by: Thomas Graf --- linux-2.6.10-rc1-bk1.orig/include/net/pkt_cls.h 2004-10-26 23:19:23.000000000 +0200 +++ linux-2.6.10-rc1-bk1/include/net/pkt_cls.h 2004-10-26 23:27:03.000000000 +0200 @@ -14,51 +14,6 @@ int (*fn)(struct tcf_proto *, unsigned long node, struct tcf_walker *); }; -/* Main classifier routine: scans classifier chain attached - to this qdisc, (optionally) tests for protocol and asks - specific classifiers. - */ - -static inline int tc_classify(struct sk_buff *skb, struct tcf_proto *tp, struct tcf_result *res) -{ - int err = 0; - u32 protocol = skb->protocol; -#ifdef CONFIG_NET_CLS_ACT - struct tcf_proto *otp = tp; -reclassify: -#endif - protocol = skb->protocol; - - for ( ; tp; tp = tp->next) { - if ((tp->protocol == protocol || - tp->protocol == __constant_htons(ETH_P_ALL)) && - (err = tp->classify(skb, tp, res)) >= 0) { -#ifdef CONFIG_NET_CLS_ACT - if ( TC_ACT_RECLASSIFY == err) { - __u32 verd = (__u32) G_TC_VERD(skb->tc_verd); - tp = otp; - - if (MAX_REC_LOOP < verd++) { - printk("rule prio %d protocol %02x reclassify is buggy packet dropped\n",tp->prio&0xffff, ntohs(tp->protocol)); - return TC_ACT_SHOT; - } - skb->tc_verd = SET_TC_VERD(skb->tc_verd,verd); - goto reclassify; - } else { - if (skb->tc_verd) - skb->tc_verd = SET_TC_VERD(skb->tc_verd,0); - return err; - } -#else - - return err; -#endif - } - - } - return -1; -} - extern int register_tcf_proto_ops(struct tcf_proto_ops *ops); extern int unregister_tcf_proto_ops(struct tcf_proto_ops *ops); extern int ing_filter(struct sk_buff *skb); --- linux-2.6.10-rc1-bk1.orig/include/net/pkt_sched.h 2004-10-26 23:31:17.000000000 +0200 +++ linux-2.6.10-rc1-bk1/include/net/pkt_sched.h 2004-10-26 23:31:50.000000000 +0200 @@ -232,6 +232,9 @@ extern int qdisc_restart(struct net_device *dev); +extern int tc_classify(struct sk_buff *skb, struct tcf_proto *tp, + struct tcf_result *res); + /* Calculate maximal size of packet seen by hard_start_xmit routine of this device. */ --- linux-2.6.10-rc1-bk1.orig/net/sched/sch_api.c 2004-10-26 22:57:06.000000000 +0200 +++ linux-2.6.10-rc1-bk1/net/sched/sch_api.c 2004-10-26 23:34:40.000000000 +0200 @@ -1099,6 +1099,52 @@ return skb->len; } +/* Main classifier routine: scans classifier chain attached + to this qdisc, (optionally) tests for protocol and asks + specific classifiers. + */ +int tc_classify(struct sk_buff *skb, struct tcf_proto *tp, + struct tcf_result *res) +{ + int err = 0; + u32 protocol = skb->protocol; +#ifdef CONFIG_NET_CLS_ACT + struct tcf_proto *otp = tp; +reclassify: +#endif + protocol = skb->protocol; + + for ( ; tp; tp = tp->next) { + if ((tp->protocol == protocol || + tp->protocol == __constant_htons(ETH_P_ALL)) && + (err = tp->classify(skb, tp, res)) >= 0) { +#ifdef CONFIG_NET_CLS_ACT + if ( TC_ACT_RECLASSIFY == err) { + __u32 verd = (__u32) G_TC_VERD(skb->tc_verd); + tp = otp; + + if (MAX_REC_LOOP < verd++) { + printk("rule prio %d protocol %02x reclassify is buggy packet dropped\n", + tp->prio&0xffff, ntohs(tp->protocol)); + return TC_ACT_SHOT; + } + skb->tc_verd = SET_TC_VERD(skb->tc_verd,verd); + goto reclassify; + } else { + if (skb->tc_verd) + skb->tc_verd = SET_TC_VERD(skb->tc_verd,0); + return err; + } +#else + + return err; +#endif + } + + } + return -1; +} + int psched_us_per_tick = 1; int psched_tick_per_us = 1; @@ -1246,3 +1292,4 @@ EXPORT_SYMBOL(qdisc_put_rtab); EXPORT_SYMBOL(register_qdisc); EXPORT_SYMBOL(unregister_qdisc); +EXPORT_SYMBOL(tc_classify); From tgraf@suug.ch Tue Oct 26 15:27:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 15:27:37 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QMRWO5007256 for ; Tue, 26 Oct 2004 15:27:32 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 688FE87; Wed, 27 Oct 2004 00:26:54 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id B949C1C0E9; Wed, 27 Oct 2004 00:27:37 +0200 (CEST) Date: Wed, 27 Oct 2004 00:27:37 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 8/11] PKT_SCHED: psched_*_per_* can be static Message-ID: <20041026222737.GI12289@postel.suug.ch> References: <20041026222148.GA12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041026222148.GA12289@postel.suug.ch> X-archive-position: 10887 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 461 Lines: 15 Signed-off-by: Thomas Graf --- linux-2.6.10-rc1-bk1.orig/net/sched/sch_api.c 2004-10-26 23:36:12.000000000 +0200 +++ linux-2.6.10-rc1-bk1/net/sched/sch_api.c 2004-10-26 23:36:47.000000000 +0200 @@ -1145,8 +1145,8 @@ return -1; } -int psched_us_per_tick = 1; -int psched_tick_per_us = 1; +static int psched_us_per_tick = 1; +static int psched_tick_per_us = 1; #ifdef CONFIG_PROC_FS static int psched_show(struct seq_file *seq, void *v) From tgraf@suug.ch Tue Oct 26 15:28:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 15:28:15 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QMS8FM007608 for ; Tue, 26 Oct 2004 15:28:08 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 82A2387; Wed, 27 Oct 2004 00:27:30 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id D05171C0E9; Wed, 27 Oct 2004 00:28:13 +0200 (CEST) Date: Wed, 27 Oct 2004 00:28:13 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 9/11] PKT_SCHED: Cleanup cls_set_class Message-ID: <20041026222813.GJ12289@postel.suug.ch> References: <20041026222148.GA12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041026222148.GA12289@postel.suug.ch> X-archive-position: 10888 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 2340 Lines: 89 Clean up a really messy cross reference where a macro cls_set_class in pkt_sched.h would point to a function tcf_set_class in cls_api.c that uses a inlined function __cls_set_class in pkt_sched.h again. Make tcf_set_class be cls_set_class since it was never used and inline it as well. Signed-off-by: Thomas Graf --- linux-2.6.10-rc1-bk1.orig/include/net/pkt_cls.h 2004-10-26 23:36:12.000000000 +0200 +++ linux-2.6.10-rc1-bk1/include/net/pkt_cls.h 2004-10-26 23:39:34.000000000 +0200 @@ -18,4 +18,29 @@ extern int unregister_tcf_proto_ops(struct tcf_proto_ops *ops); extern int ing_filter(struct sk_buff *skb); +static inline unsigned long +__cls_set_class(unsigned long *clp, unsigned long cl) +{ + unsigned long old_cl; + + old_cl = *clp; + *clp = cl; + return old_cl; +} + +static inline long +cls_set_class(struct tcf_proto *tp, unsigned long *clp, + unsigned long cl) +{ + unsigned long old_cl; + + qdisc_lock_tree(tp->q->dev); + + tcf_tree_lock(tp); + old_cl = __cls_set_class(clp, cl); + tcf_tree_unlock(tp); + + return old_cl; +} + #endif --- linux-2.6.10-rc1-bk1.orig/include/net/pkt_sched.h 2004-10-26 23:36:12.000000000 +0200 +++ linux-2.6.10-rc1-bk1/include/net/pkt_sched.h 2004-10-26 23:40:20.000000000 +0200 @@ -22,18 +22,6 @@ & ~QDISC_ALIGN_CONST); } -#define cls_set_class(tp, clp, cl) tcf_set_class(tp, clp, cl) -static inline unsigned long -__cls_set_class(unsigned long *clp, unsigned long cl) -{ - unsigned long old_cl; - - old_cl = *clp; - *clp = cl; - return old_cl; -} - - /* Timer resolution MUST BE < 10% of min_schedulable_packet_size/bandwidth --- linux-2.6.10-rc1-bk1.orig/net/sched/cls_api.c 2004-10-26 22:57:08.000000000 +0200 +++ linux-2.6.10-rc1-bk1/net/sched/cls_api.c 2004-10-26 23:41:23.000000000 +0200 @@ -297,19 +297,6 @@ return err; } -unsigned long tcf_set_class(struct tcf_proto *tp, unsigned long *clp, - unsigned long cl) -{ - unsigned long old_cl; - - tcf_tree_lock(tp); - old_cl = __cls_set_class(clp, cl); - tcf_tree_unlock(tp); - - return old_cl; -} - - static int tcf_fill_node(struct sk_buff *skb, struct tcf_proto *tp, unsigned long fh, u32 pid, u32 seq, unsigned flags, int event) @@ -475,4 +462,3 @@ EXPORT_SYMBOL(register_tcf_proto_ops); EXPORT_SYMBOL(unregister_tcf_proto_ops); -EXPORT_SYMBOL(tcf_set_class); From tgraf@suug.ch Tue Oct 26 15:28:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 15:28:54 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QMSm3a007885 for ; Tue, 26 Oct 2004 15:28:49 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 2770287; Wed, 27 Oct 2004 00:28:11 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 7DEEE1C0E9; Wed, 27 Oct 2004 00:28:54 +0200 (CEST) Date: Wed, 27 Oct 2004 00:28:54 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 10/11] PKT_SCHED: Inline psched_tod_diff Message-ID: <20041026222854.GK12289@postel.suug.ch> References: <20041026222148.GA12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041026222148.GA12289@postel.suug.ch> X-archive-position: 10889 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 1233 Lines: 48 Signed-off-by: Thomas Graf --- linux-2.6.10-rc1-bk1.orig/include/net/pkt_sched.h 2004-10-26 23:42:10.000000000 +0200 +++ linux-2.6.10-rc1-bk1/include/net/pkt_sched.h 2004-10-26 23:42:59.000000000 +0200 @@ -132,7 +132,18 @@ __delta; \ }) -extern int psched_tod_diff(int delta_sec, int bound); +static inline int +psched_tod_diff(int delta_sec, int bound) +{ + int delta; + + if (bound <= 1000000 || delta_sec > (0x7FFFFFFF/1000000)-1) + return bound; + delta = delta_sec * 1000000; + if (delta > bound) + delta = bound; + return delta; +} #define PSCHED_TDIFF_SAFE(tv1, tv2, bound) \ ({ \ --- linux-2.6.10-rc1-bk1.orig/net/sched/sch_api.c 2004-10-26 23:37:57.000000000 +0200 +++ linux-2.6.10-rc1-bk1/net/sched/sch_api.c 2004-10-26 23:44:05.000000000 +0200 @@ -1172,21 +1172,6 @@ }; #endif -#ifdef CONFIG_NET_SCH_CLK_GETTIMEOFDAY -int psched_tod_diff(int delta_sec, int bound) -{ - int delta; - - if (bound <= 1000000 || delta_sec > (0x7FFFFFFF/1000000)-1) - return bound; - delta = delta_sec * 1000000; - if (delta > bound) - delta = bound; - return delta; -} -EXPORT_SYMBOL(psched_tod_diff); -#endif - #ifdef CONFIG_NET_SCH_CLK_CPU psched_tdiff_t psched_clock_per_hz; int psched_clock_scale; From tgraf@suug.ch Tue Oct 26 15:29:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 15:29:27 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QMTJYV008201 for ; Tue, 26 Oct 2004 15:29:20 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id D4E1987; Wed, 27 Oct 2004 00:28:41 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 33C7B1C0E9; Wed, 27 Oct 2004 00:29:25 +0200 (CEST) Date: Wed, 27 Oct 2004 00:29:25 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 11/11]: PKT_SCHED: Use new header architecture Message-ID: <20041026222925.GL12289@postel.suug.ch> References: <20041026222148.GA12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041026222148.GA12289@postel.suug.ch> X-archive-position: 10890 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 5278 Lines: 139 Signed-off-by: Thomas Graf diff -Nru linux-2.6.10-rc1-bk1.orig/include/net/tc_act/tc_gact.h linux-2.6.10-rc1-bk1/include/net/tc_act/tc_gact.h --- linux-2.6.10-rc1-bk1.orig/include/net/tc_act/tc_gact.h 2004-10-26 14:51:02.000000000 +0200 +++ linux-2.6.10-rc1-bk1/include/net/tc_act/tc_gact.h 2004-10-25 20:07:54.000000000 +0200 @@ -1,7 +1,7 @@ #ifndef __NET_TC_GACT_H #define __NET_TC_GACT_H -#include +#include struct tcf_gact { diff -Nru linux-2.6.10-rc1-bk1.orig/include/net/tc_act/tc_mirred.h linux-2.6.10-rc1-bk1/include/net/tc_act/tc_mirred.h --- linux-2.6.10-rc1-bk1.orig/include/net/tc_act/tc_mirred.h 2004-10-26 14:51:02.000000000 +0200 +++ linux-2.6.10-rc1-bk1/include/net/tc_act/tc_mirred.h 2004-10-25 20:07:54.000000000 +0200 @@ -1,7 +1,7 @@ #ifndef __NET_TC_MIR_H #define __NET_TC_MIR_H -#include +#include struct tcf_mirred { diff -Nru linux-2.6.10-rc1-bk1.orig/net/sched/act_api.c linux-2.6.10-rc1-bk1/net/sched/act_api.c --- linux-2.6.10-rc1-bk1.orig/net/sched/act_api.c 2004-10-26 14:51:02.000000000 +0200 +++ linux-2.6.10-rc1-bk1/net/sched/act_api.c 2004-10-25 20:07:54.000000000 +0200 @@ -31,7 +31,8 @@ #include #include #include -#include +#include +#include #if 1 /* control */ #define DPRINTK(format,args...) printk(KERN_DEBUG format,##args) --- linux-2.6.10-rc1-bk1.orig/net/sched/cls_api.c 2004-10-26 23:42:10.000000000 +0200 +++ linux-2.6.10-rc1-bk1/net/sched/cls_api.c 2004-10-26 23:55:48.000000000 +0200 @@ -36,6 +36,7 @@ #include #include #include +#include #if 0 /* control */ #define DPRINTK(format,args...) printk(KERN_DEBUG format,##args) diff -Nru linux-2.6.10-rc1-bk1.orig/net/sched/cls_fw.c linux-2.6.10-rc1-bk1/net/sched/cls_fw.c --- linux-2.6.10-rc1-bk1.orig/net/sched/cls_fw.c 2004-10-26 14:51:02.000000000 +0200 +++ linux-2.6.10-rc1-bk1/net/sched/cls_fw.c 2004-10-25 20:07:54.000000000 +0200 @@ -43,7 +43,8 @@ #include #include #include -#include +#include +#include struct fw_head { diff -Nru linux-2.6.10-rc1-bk1.orig/net/sched/cls_route.c linux-2.6.10-rc1-bk1/net/sched/cls_route.c --- linux-2.6.10-rc1-bk1.orig/net/sched/cls_route.c 2004-10-26 14:51:02.000000000 +0200 +++ linux-2.6.10-rc1-bk1/net/sched/cls_route.c 2004-10-25 20:07:54.000000000 +0200 @@ -33,7 +33,8 @@ #include #include #include -#include +#include +#include /* 1. For now we assume that route tags < 256. diff -Nru linux-2.6.10-rc1-bk1.orig/net/sched/cls_rsvp.c linux-2.6.10-rc1-bk1/net/sched/cls_rsvp.c --- linux-2.6.10-rc1-bk1.orig/net/sched/cls_rsvp.c 2004-10-26 14:51:02.000000000 +0200 +++ linux-2.6.10-rc1-bk1/net/sched/cls_rsvp.c 2004-10-25 20:07:54.000000000 +0200 @@ -32,7 +32,8 @@ #include #include #include -#include +#include +#include #define RSVP_DST_LEN 1 #define RSVP_ID "rsvp" diff -Nru linux-2.6.10-rc1-bk1.orig/net/sched/cls_rsvp6.c linux-2.6.10-rc1-bk1/net/sched/cls_rsvp6.c --- linux-2.6.10-rc1-bk1.orig/net/sched/cls_rsvp6.c 2004-10-26 14:51:02.000000000 +0200 +++ linux-2.6.10-rc1-bk1/net/sched/cls_rsvp6.c 2004-10-25 20:07:54.000000000 +0200 @@ -33,7 +33,8 @@ #include #include #include -#include +#include +#include #define RSVP_DST_LEN 4 #define RSVP_ID "rsvp6" diff -Nru linux-2.6.10-rc1-bk1.orig/net/sched/cls_tcindex.c linux-2.6.10-rc1-bk1/net/sched/cls_tcindex.c --- linux-2.6.10-rc1-bk1.orig/net/sched/cls_tcindex.c 2004-10-26 14:51:02.000000000 +0200 +++ linux-2.6.10-rc1-bk1/net/sched/cls_tcindex.c 2004-10-26 13:55:46.000000000 +0200 @@ -12,7 +12,8 @@ #include #include #include -#include +#include +#include #include diff -Nru linux-2.6.10-rc1-bk1.orig/net/sched/cls_u32.c linux-2.6.10-rc1-bk1/net/sched/cls_u32.c --- linux-2.6.10-rc1-bk1.orig/net/sched/cls_u32.c 2004-10-26 14:51:02.000000000 +0200 +++ linux-2.6.10-rc1-bk1/net/sched/cls_u32.c 2004-10-25 20:07:54.000000000 +0200 @@ -54,7 +54,8 @@ #include #include #include -#include +#include +#include struct tc_u_knode diff -Nru linux-2.6.10-rc1-bk1.orig/net/sched/police.c linux-2.6.10-rc1-bk1/net/sched/police.c --- linux-2.6.10-rc1-bk1.orig/net/sched/police.c 2004-10-26 14:51:02.000000000 +0200 +++ linux-2.6.10-rc1-bk1/net/sched/police.c 2004-10-25 20:07:54.000000000 +0200 @@ -31,7 +31,7 @@ #include #include #include -#include +#include #define L2T(p,L) ((p)->R_tab->data[(L)>>(p)->R_tab->rate.cell_log]) #define L2T_P(p,L) ((p)->P_tab->data[(L)>>(p)->P_tab->rate.cell_log]) From davem@davemloft.net Tue Oct 26 16:30:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 16:30:32 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QNUR32013284 for ; Tue, 26 Oct 2004 16:30:27 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CMae6-000328-00; Tue, 26 Oct 2004 16:22:30 -0700 Date: Tue, 26 Oct 2004 16:22:29 -0700 From: "David S. Miller" To: Thomas Graf Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: Re: [PATCHSET 0/11] PKT_SCHED: overall net/pkt_cls.h and net/pkt_sched.h cleanup Message-Id: <20041026162229.4641743d.davem@davemloft.net> In-Reply-To: <20041026222148.GA12289@postel.suug.ch> References: <20041026222148.GA12289@postel.suug.ch> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10892 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 722 Lines: 20 On Wed, 27 Oct 2004 00:21:48 +0200 Thomas Graf wrote: > This patchset attempts to clean up the mess in net/pkt_sched.h > and net/pkt_cls.h grown over the last years. > > It introduces net/sch_generic.h containing all generic > sch/cls bits and act_api.h containing pubic action/policer > bits. > > The current architecture which is basically to have > net/pkt_sched.h include net/pkt_cls.h and everyone just > including net/pkt_sched.h makes it impossible to add > any generic classifer bits into pkt_cls.h and acted > just like if we had put it into one big file. > > Tested for nearly a week with various combinations of > action/policer configurations. Very nice work, all applied. Thanks Thomas. From akpm@osdl.org Tue Oct 26 16:34:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 16:34:26 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QNYI5T013689 for ; Tue, 26 Oct 2004 16:34:19 -0700 Received: from akpm.pao.digeo.com (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i9QNXv914799 for ; Tue, 26 Oct 2004 16:33:57 -0700 Date: Tue, 26 Oct 2004 16:38:02 -0700 From: Andrew Morton To: netdev@oss.sgi.com Subject: Fw: 2.6.9 Oops in tcp_time_to_recover + 0x6d/0x1b0 Message-Id: <20041026163802.6eefd7a6.akpm@osdl.org> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i586-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10893 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 Content-Length: 4379 Lines: 103 Begin forwarded message: Date: Mon, 25 Oct 2004 19:11:04 -0400 From: George Glover To: linux-kernel@vger.kernel.org Subject: 2.6.9 Oops in tcp_time_to_recover + 0x6d/0x1b0 Hi all. I've had this happen twice now with mostly the same Oops message. Maybe a third time, however the screen was blanked. They occur at the very same instruction pointer, and from the mprime process context. Unable to handle kernel NULL pointer dereference at virtual address 00000050 printing eip: *pde = 00000000 Oops: 0000 [#1] PREEMT SMP Modules link in: sbp2 ohci1394 ieee1394 CPU: 1 EIP: 0060:[] Not tainted : VLI EFLAGS: 00210246 (2.6.9) EIP is at tcp_time_to_recover+0x6d/0x1b0 eax: 19eeb26a ebx: cc2d97f0 ecx: 00000001 edx: 00000000 esi: 00000006 edi: cc2d9600 ebp: 0000003 esp: c04c2d3c ds: 007b es: 007b ss: 0068 Process mprime (pid: 2845, threadinfo=c04c2000 task=ee66a310) Stack: cc2d97f0 00000000 00000000 00000003 c032d62f 00200002 c74fc00c 0000000 e2fca91c 00000000 00000006 00000003 a5861ecc cc2d9600 00000002 cc2d97f0 a58628d8 00000006 c032ea24 00000006 0000000 00000000 00200292 00000001 Call Trace: Stack pointer is garbage, not printing trace Code: 01 00 00 00 39 cd 0f 8f 00 01 00 00 8b 8b 98 00 00 00 85 c9 74 24 8b 57 64 0d 47 64 39 c2 b8 00 00 00 00 0f 44 d0 a1 e0 84 3e c0 <2b> 42 50 3b 83 94 00 00 00 0f 87 d5 00 00 00 89 f2 0f b6 c2 39 There may be numerous typos since it's typed from a poor digital camera image. The code disassmbles to: c032c951: b9 01 00 00 00 mov $0x1,%ecx c032c956: 39 c2 cmp %eax,%edx c032c958: 0f 8f 08 01 00 00 jg c032ca66 c032c95e: 8b 8b 98 00 00 00 mov 0x98(%ebx),%ecx c032c964: 85 c9 test %ecx,%ecx c032c966: 74 24 je c032c98c c032c968: 8b 57 64 mov 0x64(%edi),%edx c032c96b: 8d 47 64 lea 0x64(%edi),%eax c032c96e: 39 c2 cmp %eax,%edx c032c970: b8 00 00 00 00 mov $0x0,%eax c032c975: 0f 44 d0 cmove %eax,%edx c032c978: a1 e0 84 3e c0 mov 0xc03e84e0,%eax c032c97d: 2b 42 50 sub 0x50(%edx),%eax <-- Oops is here c032c980: 3b 83 94 00 00 00 cmp 0x94(%ebx),%eax c032c986: 0f 87 d5 00 00 00 ja c032ca61 c032c98c: 89 f2 mov %esi,%edx c032c98e: 0f b6 c2 movzbl %dl,%eax c032c991: 39 c1 cmp %eax,%ecx Punching in the addresses I see on the stack gives a back trace of: tcp_time_to_recover tcp_fastretrans_alert tcp_ack gcc version 3.3.4 Hardware is a dual 1.2Ghz Athlon MP with 768MB of register ecc lspci: 00:00.0 Host bridge: Advanced Micro Devices [AMD] AMD-760 MP [IGD4-2P] System Controller (rev 20) 00:01.0 PCI bridge: Advanced Micro Devices [AMD] AMD-760 MP [IGD4-2P] AGP Bridge 00:07.0 ISA bridge: Advanced Micro Devices [AMD] AMD-768 [Opus] ISA (rev 05) 00:07.1 IDE interface: Advanced Micro Devices [AMD] AMD-768 [Opus] IDE (rev 04) 00:07.3 Bridge: Advanced Micro Devices [AMD] AMD-768 [Opus] ACPI (rev 03) 00:08.0 SCSI storage controller: LSI Logic / Symbios Logic 53c1010 Ultra3 SCSI Adapter (rev 01) 00:08.1 SCSI storage controller: LSI Logic / Symbios Logic 53c1010 Ultra3 SCSI Adapter (rev 01) 00:10.0 PCI bridge: Advanced Micro Devices [AMD] AMD-768 [Opus] PCI (rev 05) 01:05.0 VGA compatible controller: nVidia Corporation NV20 [GeForce3] (rev a3) 02:00.0 USB Controller: Advanced Micro Devices [AMD] AMD-768 [Opus] USB (rev 07) 02:05.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 08) 02:05.1 Input device controller: Creative Labs SB Live! MIDI/Game Port (rev 08) 02:06.0 FireWire (IEEE 1394): Texas Instruments TSB12LV26 IEEE-1394 Controller (Link) 02:07.0 Ethernet controller: Intel Corp. 82557/8/9 [Ethernet Pro 100] (rev 0d) 02:08.0 RAID bus controller: Promise Technology, Inc. PDC20276 IDE (rev 01) Hope any of this helps, George - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ From herbert@gondor.apana.org.au Tue Oct 26 16:52:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 16:52:23 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QNqDrT014194 for ; Tue, 26 Oct 2004 16:52:14 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CMb6N-0002Ib-00; Wed, 27 Oct 2004 09:51:43 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CMb66-0001Eg-00; Wed, 27 Oct 2004 09:51:26 +1000 Date: Wed, 27 Oct 2004 09:51:26 +1000 To: "David S. Miller" Cc: thomas.spatzier@de.ibm.com, netdev@oss.sgi.com, Jeff Garzik Subject: Re: [PATCH] select appropriate skb size in tcp_sendmsg when TSO is used Message-ID: <20041026235126.GA4733@gondor.apana.org.au> References: <20041020163510.6d13e9c7.davem@davemloft.net> <20041026111912.GA18095@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="pf9I7BMVVzbSWLtt" Content-Disposition: inline In-Reply-To: <20041026111912.GA18095@gondor.apana.org.au> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10894 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 2588 Lines: 98 --pf9I7BMVVzbSWLtt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Oct 26, 2004 at 09:19:12PM +1000, herbert wrote: > On Wed, Oct 20, 2004 at 04:35:10PM -0700, David S. Miller wrote: > > > > BTW, we allow mucking of all of these SG, TSO, CSUM settings > > via ethtool yet the "X needs Y" rules are not enforced. I > > can't think of an easy way to do this without touching a lot > > of drivers. Perhaps something like: > > Well since they're all being invoked through ethtool, you can > just enforce the policy there. So let's take set_tx_csum Alright, here is a patch to do exactly that. Signed-off-by: Herbert Xu Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --pf9I7BMVVzbSWLtt Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== net/core/ethtool.c 1.15 vs edited ===== --- 1.15/net/core/ethtool.c 2004-06-14 05:59:15 +10:00 +++ edited/net/core/ethtool.c 2004-10-27 09:39:09 +10:00 @@ -452,9 +452,23 @@ return 0; } +static int __ethtool_set_sg(struct net_device *dev, u32 data) +{ + int err; + + if (!data && dev->ethtool_ops->set_tso) { + err = dev->ethtool_ops->set_tso(dev, 0); + if (err) + return err; + } + + return dev->ethtool_ops->set_sg(dev, data); +} + static int ethtool_set_tx_csum(struct net_device *dev, char __user *useraddr) { struct ethtool_value edata; + int err; if (!dev->ethtool_ops->set_tx_csum) return -EOPNOTSUPP; @@ -462,6 +476,12 @@ if (copy_from_user(&edata, useraddr, sizeof(edata))) return -EFAULT; + if (!edata.data && dev->ethtool_ops->set_sg) { + err = __ethtool_set_sg(dev, 0); + if (err) + return err; + } + return dev->ethtool_ops->set_tx_csum(dev, edata.data); } @@ -489,7 +509,13 @@ if (copy_from_user(&edata, useraddr, sizeof(edata))) return -EFAULT; - return dev->ethtool_ops->set_sg(dev, edata.data); + if (edata.data && + !(dev->features & (NETIF_F_IP_CSUM | + NETIF_F_NO_CSUM | + NETIF_F_HW_CSUM))) + return -EINVAL; + + return __ethtool_set_sg(dev, edata.data); } static int ethtool_get_tso(struct net_device *dev, char __user *useraddr) @@ -515,6 +541,9 @@ if (copy_from_user(&edata, useraddr, sizeof(edata))) return -EFAULT; + + if (edata.data && !(dev->features & NETIF_F_SG)) + return -EINVAL; return dev->ethtool_ops->set_tso(dev, edata.data); } --pf9I7BMVVzbSWLtt-- From davem@davemloft.net Tue Oct 26 16:54:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 16:54:49 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QNsj4A014620 for ; Tue, 26 Oct 2004 16:54:45 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CMb1e-00034M-00; Tue, 26 Oct 2004 16:46:50 -0700 Date: Tue, 26 Oct 2004 16:46:50 -0700 From: "David S. Miller" To: Andrew Morton Cc: netdev@oss.sgi.com Subject: Re: Fw: 2.6.9 Oops in tcp_time_to_recover + 0x6d/0x1b0 Message-Id: <20041026164650.50bc2a9c.davem@davemloft.net> In-Reply-To: <20041026163802.6eefd7a6.akpm@osdl.org> References: <20041026163802.6eefd7a6.akpm@osdl.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10895 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 56 Lines: 2 Current BK should have a fix for this from Herbert Xu. From jgarzik@pobox.com Tue Oct 26 16:55:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 16:55:15 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9QNt8bh014771 for ; Tue, 26 Oct 2004 16:55:09 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CMb9L-0007tn-Q2; Wed, 27 Oct 2004 00:54:47 +0100 Message-ID: <417EE3BB.6040902@pobox.com> Date: Tue, 26 Oct 2004 19:54:35 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Herbert Xu CC: "David S. Miller" , thomas.spatzier@de.ibm.com, netdev@oss.sgi.com Subject: Re: [PATCH] select appropriate skb size in tcp_sendmsg when TSO is used References: <20041020163510.6d13e9c7.davem@davemloft.net> <20041026111912.GA18095@gondor.apana.org.au> <20041026235126.GA4733@gondor.apana.org.au> In-Reply-To: <20041026235126.GA4733@gondor.apana.org.au> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10896 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: 327 Lines: 16 Herbert Xu wrote: > +static int __ethtool_set_sg(struct net_device *dev, u32 data) > +{ > + int err; > + > + if (!data && dev->ethtool_ops->set_tso) { > + err = dev->ethtool_ops->set_tso(dev, 0); > + if (err) > + return err; > + } > + > + return dev->ethtool_ops->set_sg(dev, data); > +} you want to disable tx-csum also From herbert@gondor.apana.org.au Tue Oct 26 17:08:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 17:08:12 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R081PM015550 for ; Tue, 26 Oct 2004 17:08:02 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CMbLg-0002O9-00; Wed, 27 Oct 2004 10:07:32 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CMbLY-0001Gu-00; Wed, 27 Oct 2004 10:07:24 +1000 Date: Wed, 27 Oct 2004 10:07:24 +1000 To: Jeff Garzik Cc: "David S. Miller" , thomas.spatzier@de.ibm.com, netdev@oss.sgi.com Subject: Re: [PATCH] select appropriate skb size in tcp_sendmsg when TSO is used Message-ID: <20041027000724.GA4869@gondor.apana.org.au> References: <20041020163510.6d13e9c7.davem@davemloft.net> <20041026111912.GA18095@gondor.apana.org.au> <20041026235126.GA4733@gondor.apana.org.au> <417EE3BB.6040902@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <417EE3BB.6040902@pobox.com> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10897 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 680 Lines: 23 On Tue, Oct 26, 2004 at 07:54:35PM -0400, Jeff Garzik wrote: > Herbert Xu wrote: > >+static int __ethtool_set_sg(struct net_device *dev, u32 data) > >+{ > >+ int err; > >+ > >+ if (!data && dev->ethtool_ops->set_tso) { > >+ err = dev->ethtool_ops->set_tso(dev, 0); > >+ if (err) > >+ return err; > >+ } > >+ > >+ return dev->ethtool_ops->set_sg(dev, data); > >+} > > you want to disable tx-csum also IMHO it is valid to disable SG without disabling checksums, no? -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From yoshfuji@linux-ipv6.org Tue Oct 26 17:10:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 17:10:14 -0700 (PDT) Received: from yue.st-paulia.net (yue.linux-ipv6.org [203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R0A7Ah015886 for ; Tue, 26 Oct 2004 17:10:08 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 7AE4C33CE5; Wed, 27 Oct 2004 09:10:40 +0900 (JST) Date: Wed, 27 Oct 2004 09:10:39 +0900 (JST) Message-Id: <20041027.091039.56337914.yoshfuji@linux-ipv6.org> To: Brian.Haley@hp.com Cc: netdev@oss.sgi.com, yoshfuji@linux-ipv6.org Subject: Re: [PATCH, TAKE 2] [IPV6] XFRM: extract xfrm_lookup() from ip6_dst_lookup() (is Re: [PATCH][IPv6] separation xfrm_lookup from ip6_dst_lookup) From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <417E92D9.1050305@hp.com> References: <417E5F37.4010501@hp.com> <20041027.004359.62730834.yoshfuji@linux-ipv6.org> <417E92D9.1050305@hp.com> Organization: USAGI Project X-URL: http://www.yoshifuji.org/%7Ehideaki/ X-Fingerprint: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA X-PGP-Key-URL: http://www.yoshifuji.org/%7Ehideaki/hideaki@yoshifuji.org.asc X-Face: "5$Al-.M>NJ%a'@hhZdQm:."qn~PA^gq4o*>iCFToq*bAi#4FRtx}enhuQKz7fNqQz\BYU] $~O_5m-9'}MIs`XGwIEscw;e5b>n"B_?j/AkL~i/MEaZBLP X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 10898 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: yoshfuji@linux-ipv6.org Precedence: bulk X-list: netdev Content-Length: 684 Lines: 15 In article <417E92D9.1050305@hp.com> (at Tue, 26 Oct 2004 14:09:29 -0400), Brian Haley says: > > Second, because we're not ready to migrate. > > Please do not do that (pushing it to the glibc people) until we're ready. > > We really need to do in consistent way; kernel header / glibc header, > > and even with other systems. > > The kernel struct is the correct size (since addr[0] has no size), > ip6_rthdr0 in ip6.h is not, it's 128 bits too big. Let me know the > right steps to go through to correct this and I'll get it done, you can > send it off-line if you like. Because we do not support RFC3542, extra 128bits is definitely correct. --yoshfuji From davem@davemloft.net Tue Oct 26 17:11:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 17:11:59 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R0BsWN016224 for ; Tue, 26 Oct 2004 17:11:54 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CMbI0-00036v-00; Tue, 26 Oct 2004 17:03:44 -0700 Date: Tue, 26 Oct 2004 17:03:44 -0700 From: "David S. Miller" To: Herbert Xu Cc: jgarzik@pobox.com, thomas.spatzier@de.ibm.com, netdev@oss.sgi.com Subject: Re: [PATCH] select appropriate skb size in tcp_sendmsg when TSO is used Message-Id: <20041026170344.262bb3ec.davem@davemloft.net> In-Reply-To: <20041027000724.GA4869@gondor.apana.org.au> References: <20041020163510.6d13e9c7.davem@davemloft.net> <20041026111912.GA18095@gondor.apana.org.au> <20041026235126.GA4733@gondor.apana.org.au> <417EE3BB.6040902@pobox.com> <20041027000724.GA4869@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10899 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 771 Lines: 27 On Wed, 27 Oct 2004 10:07:24 +1000 Herbert Xu wrote: > On Tue, Oct 26, 2004 at 07:54:35PM -0400, Jeff Garzik wrote: > > Herbert Xu wrote: > > >+static int __ethtool_set_sg(struct net_device *dev, u32 data) > > >+{ > > >+ int err; > > >+ > > >+ if (!data && dev->ethtool_ops->set_tso) { > > >+ err = dev->ethtool_ops->set_tso(dev, 0); > > >+ if (err) > > >+ return err; > > >+ } > > >+ > > >+ return dev->ethtool_ops->set_sg(dev, data); > > >+} > > > > you want to disable tx-csum also > > IMHO it is valid to disable SG without disabling checksums, no? Yes and no. SG support requires TX csum support. See the tests we make at register_netdev() time. So as long as you enforce that rule, which I believe you are, things are fine. From garzik@havoc.gtf.org Tue Oct 26 17:15:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 17:16:01 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [69.28.190.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R0Fti6016621 for ; Tue, 26 Oct 2004 17:15:55 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id D52E57928; Tue, 26 Oct 2004 20:15:31 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i9R0FVw6030338; Tue, 26 Oct 2004 20:15:31 -0400 Date: Tue, 26 Oct 2004 20:15:31 -0400 From: Jeff Garzik To: Herbert Xu Cc: "David S. Miller" , thomas.spatzier@de.ibm.com, netdev@oss.sgi.com Subject: Re: [PATCH] select appropriate skb size in tcp_sendmsg when TSO is used Message-ID: <20041027001531.GA29973@havoc.gtf.org> References: <20041020163510.6d13e9c7.davem@davemloft.net> <20041026111912.GA18095@gondor.apana.org.au> <20041026235126.GA4733@gondor.apana.org.au> <417EE3BB.6040902@pobox.com> <20041027000724.GA4869@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041027000724.GA4869@gondor.apana.org.au> User-Agent: Mutt/1.4.1i X-archive-position: 10900 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: 774 Lines: 28 On Wed, Oct 27, 2004 at 10:07:24AM +1000, Herbert Xu wrote: > On Tue, Oct 26, 2004 at 07:54:35PM -0400, Jeff Garzik wrote: > > Herbert Xu wrote: > > >+static int __ethtool_set_sg(struct net_device *dev, u32 data) > > >+{ > > >+ int err; > > >+ > > >+ if (!data && dev->ethtool_ops->set_tso) { > > >+ err = dev->ethtool_ops->set_tso(dev, 0); > > >+ if (err) > > >+ return err; > > >+ } > > >+ > > >+ return dev->ethtool_ops->set_sg(dev, data); > > >+} > > > > you want to disable tx-csum also > > IMHO it is valid to disable SG without disabling checksums, no? It's useless: The packet header is always in a separate memory location from the packet data, when using zerocopy sendfile(2). When not using zerocopy sendfile, you are copying the data _anyway_. Jeff From herbert@gondor.apana.org.au Tue Oct 26 17:22:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 17:22:53 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R0MiJS017065 for ; Tue, 26 Oct 2004 17:22:45 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CMbZx-0002WW-00; Wed, 27 Oct 2004 10:22:17 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CMbZp-0001JT-00; Wed, 27 Oct 2004 10:22:09 +1000 Date: Wed, 27 Oct 2004 10:22:09 +1000 To: Jeff Garzik Cc: "David S. Miller" , thomas.spatzier@de.ibm.com, netdev@oss.sgi.com Subject: Re: [PATCH] select appropriate skb size in tcp_sendmsg when TSO is used Message-ID: <20041027002209.GA5002@gondor.apana.org.au> References: <20041020163510.6d13e9c7.davem@davemloft.net> <20041026111912.GA18095@gondor.apana.org.au> <20041026235126.GA4733@gondor.apana.org.au> <417EE3BB.6040902@pobox.com> <20041027000724.GA4869@gondor.apana.org.au> <20041027001531.GA29973@havoc.gtf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041027001531.GA29973@havoc.gtf.org> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10901 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 713 Lines: 18 On Tue, Oct 26, 2004 at 08:15:31PM -0400, Jeff Garzik wrote: > > > IMHO it is valid to disable SG without disabling checksums, no? > > It's useless: The packet header is always in a separate memory > location from the packet data, when using zerocopy sendfile(2). > > When not using zerocopy sendfile, you are copying the data _anyway_. I'm fine with adding this check. However I think that belongs in another patch since we don't check that in register_netdev currently. Dave, what do you think? -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From davem@davemloft.net Tue Oct 26 18:04:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 18:04:06 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R140rH018131 for ; Tue, 26 Oct 2004 18:04:00 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CMc6T-0003Cc-00; Tue, 26 Oct 2004 17:55:53 -0700 Date: Tue, 26 Oct 2004 17:55:53 -0700 From: "David S. Miller" To: Herbert Xu Cc: jgarzik@pobox.com, thomas.spatzier@de.ibm.com, netdev@oss.sgi.com Subject: Re: [PATCH] select appropriate skb size in tcp_sendmsg when TSO is used Message-Id: <20041026175553.55a1b72d.davem@davemloft.net> In-Reply-To: <20041027002209.GA5002@gondor.apana.org.au> References: <20041020163510.6d13e9c7.davem@davemloft.net> <20041026111912.GA18095@gondor.apana.org.au> <20041026235126.GA4733@gondor.apana.org.au> <417EE3BB.6040902@pobox.com> <20041027000724.GA4869@gondor.apana.org.au> <20041027001531.GA29973@havoc.gtf.org> <20041027002209.GA5002@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10902 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 998 Lines: 27 On Wed, 27 Oct 2004 10:22:09 +1000 Herbert Xu wrote: > On Tue, Oct 26, 2004 at 08:15:31PM -0400, Jeff Garzik wrote: > > > > > IMHO it is valid to disable SG without disabling checksums, no? > > > > It's useless: The packet header is always in a separate memory > > location from the packet data, when using zerocopy sendfile(2). > > > > When not using zerocopy sendfile, you are copying the data _anyway_. > > I'm fine with adding this check. However I think that belongs in > another patch since we don't check that in register_netdev currently. > > Dave, what do you think? I believe that allowing TX csum support without SG _is_ useful even though it is not _effective_. It is quite desirable for a driver author to be able to test out his TX csum offload support first, then add SG support next. Similarly, if a driver author suspects some issues with either SG or TX csum support, he can better isolate the problem if we allow this. Jeff do you agree? From davem@davemloft.net Tue Oct 26 18:10:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 18:10:40 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R1AZRD018546 for ; Tue, 26 Oct 2004 18:10:35 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CMcCz-0003DX-00; Tue, 26 Oct 2004 18:02:37 -0700 Date: Tue, 26 Oct 2004 18:02:37 -0700 From: "David S. Miller" To: Ben Greear Cc: netdev@oss.sgi.com, davem@redhat.com Subject: Re: [PATCH] 802.1Q VLAN Message-Id: <20041026180237.1c56bcc9.davem@davemloft.net> In-Reply-To: <417D929A.2090809@candelatech.com> References: <41797696.9070905@candelatech.com> <20041022214611.GA4948@electric-eye.fr.zoreil.com> <41798506.1030909@candelatech.com> <417D675F.3000909@candelatech.com> <417D929A.2090809@candelatech.com> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10903 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 255 Lines: 7 On Mon, 25 Oct 2004 16:56:10 -0700 Ben Greear wrote: > DaveM, please consider accepting this patch (it's in a previous email to netdev, > just ask if you want it re-sent.) I'll review this either tonight or tomorrow afternoon. From herbert@gondor.apana.org.au Tue Oct 26 18:41:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 18:41:53 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R1fjbJ019328 for ; Tue, 26 Oct 2004 18:41:45 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CMcoS-00035j-00; Wed, 27 Oct 2004 11:41:20 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CMcoJ-0001Rj-00; Wed, 27 Oct 2004 11:41:11 +1000 Date: Wed, 27 Oct 2004 11:41:11 +1000 To: "David S. Miller" Cc: jgarzik@pobox.com, thomas.spatzier@de.ibm.com, netdev@oss.sgi.com Subject: Re: [PATCH] select appropriate skb size in tcp_sendmsg when TSO is used Message-ID: <20041027014111.GA5548@gondor.apana.org.au> References: <20041020163510.6d13e9c7.davem@davemloft.net> <20041026111912.GA18095@gondor.apana.org.au> <20041026235126.GA4733@gondor.apana.org.au> <417EE3BB.6040902@pobox.com> <20041027000724.GA4869@gondor.apana.org.au> <20041026170344.262bb3ec.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041026170344.262bb3ec.davem@davemloft.net> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10904 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 622 Lines: 17 On Tue, Oct 26, 2004 at 05:03:44PM -0700, David S. Miller wrote: > > Yes and no. SG support requires TX csum support. See the tests we > make at register_netdev() time. > > So as long as you enforce that rule, which I believe you are, > things are fine. That's right, the patch will turn off SG whenever TX csum is turned off. And if you try to turn SG on while TX csum is off, it'll return EINVAL. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From dgibson@ozlabs.org Tue Oct 26 20:14:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 20:14:35 -0700 (PDT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R3ER1I022276 for ; Tue, 26 Oct 2004 20:14:27 -0700 Received: by ozlabs.org (Postfix, from userid 1007) id B150E2BC0F; Wed, 27 Oct 2004 13:14:05 +1000 (EST) Date: Wed, 27 Oct 2004 12:05:36 +1000 From: David Gibson To: Dan Williams Cc: netdev@oss.sgi.com, jgarzik@redhat.com, Pavel Roskin Subject: Re: [PATCHES] wireless: Update in-kernel orinoco driver Message-ID: <20041027020536.GF7925@zax> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1098814320.3663.24.camel@dcbw.boston.redhat.com> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10907 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hermes@gibson.dropbear.id.au Precedence: bulk X-list: netdev Content-Length: 1422 Lines: 33 On Tue, Oct 26, 2004 at 02:12:00PM -0400, Dan Williams wrote: > This series of 15 patches updates the in-kernel orinoco wireless drivers > to the level of current upstream orinoco CVS (from sourceforge). This > level is "0.15rc2HEAD" as found in orinoco.h. > > The basis for this patchset was: > > upstream orinoco CVS from Mon, Oct 25 > kernel sources from linux-2.6.9.tar.bz2 + patch-2.6.10-rc1.bz2 > > This is a revival of an effort to get the drivers up-to-date from > earlier this year in July. This is a much better effort at splitting up the CVS differences than the last one I saw, but there are still some problems. In particular, you've aimed the patch series at the CVS HEAD branch, which isn't what we want to do. We want to merge to mainline the "for_linus" branch , not HEAD. The HEAD branch has a bunch of compatibility code so that the code can work standalone against a range of kernels - this should not be merge. Also it has several things that are there because they kind-of work, but are really too ugly to live and should not be merged to mainline. Some more specific comments coming, on the individual patches. Oh, and CCing Pavel Roskin the other orinoco maintainer would be a good idea, too. -- David Gibson | For every complex problem there is a david AT gibson.dropbear.id.au | solution which is simple, neat and | wrong. http://www.ozlabs.org/people/dgibson From dgibson@ozlabs.org Tue Oct 26 20:41:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 20:41:48 -0700 (PDT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R3fenG026322 for ; Tue, 26 Oct 2004 20:41:41 -0700 Received: by ozlabs.org (Postfix, from userid 1007) id BBE122BDA0; Wed, 27 Oct 2004 13:41:19 +1000 (EST) Date: Wed, 27 Oct 2004 13:13:05 +1000 From: David Gibson To: Dan Williams Cc: Christoph Hellwig , netdev@oss.sgi.com, jgarzik@redhat.com Subject: Re: [PATCH 2.6.10-rc1 1/15] wireless/orinoco: Use msleep() instead of hardcoded schedule_timeout()s Message-ID: <20041027031305.GG7925@zax> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> <1098815604.3663.35.camel@dcbw.boston.redhat.com> <20041026184749.GA16621@infradead.org> <1098819336.9874.11.camel@dcbw.boston.redhat.com> <20041026194219.GA17343@infradead.org> <1098820512.9874.13.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1098820512.9874.13.camel@dcbw.boston.redhat.com> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10909 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hermes@gibson.dropbear.id.au Precedence: bulk X-list: netdev Content-Length: 1150 Lines: 28 On Tue, Oct 26, 2004 at 03:55:12PM -0400, Dan Williams wrote: > I will leave that do David/jgarzik since I didn't actually write any of > this code, I just broke the megadiff down. What's happened is that the old explicit schedule_timeout() constructs were replaced in CVS with msleep() (ssleep() didn't exist at the time). In the meantime, at least some of them were replaced with ssleep() in mainline. I'm about to commit a patch to CVS replacing the msleep()s with ssleep()s. In the for_linus branch, at least, HEAD will take longer because we'll need to come up with something to maintain compatibility with pre-ssleep() kernels. > On Tue, 2004-10-26 at 20:42 +0100, Christoph Hellwig wrote: > > On Tue, Oct 26, 2004 at 03:35:36PM -0400, Dan Williams wrote: > > > New description: > > > > > > o Use msleep() instead of hardcoded schedule_timeout()s > > > o Normalize sleep calls to use msleep() everywhere > > > > care to explain what's the point of the latter? -- David Gibson | For every complex problem there is a david AT gibson.dropbear.id.au | solution which is simple, neat and | wrong. http://www.ozlabs.org/people/dgibson From dgibson@ozlabs.org Tue Oct 26 20:41:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 20:41:49 -0700 (PDT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R3feWA026324 for ; Tue, 26 Oct 2004 20:41:41 -0700 Received: by ozlabs.org (Postfix, from userid 1007) id DA5BB2BDA5; Wed, 27 Oct 2004 13:41:19 +1000 (EST) Date: Wed, 27 Oct 2004 13:15:16 +1000 From: David Gibson To: Dan Williams Cc: netdev@oss.sgi.com, jgarzik@redhat.com Subject: Re: [PATCH 2.6.10-rc1 3/15] wireless/orinoco: encapsulate direct hardware operations Message-ID: <20041027031516.GH7925@zax> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> <1098816189.3663.47.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1098816189.3663.47.camel@dcbw.boston.redhat.com> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10910 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hermes@gibson.dropbear.id.au Precedence: bulk X-list: netdev Content-Length: 786 Lines: 19 On Tue, Oct 26, 2004 at 02:43:09PM -0400, Dan Williams wrote: > Update in-kernel orinoco wireless drivers to upstream CVS. > None of this is original code by Dan Williams, simply a > broken down patch set split-out from upstream orinoco CVS. > > o Encapsulate direct hardware operations so those symbols > don't need to be exported No! Don't apply this. This abstraction is only needed for the orinoco_usb driver (so is in HEAD, but not the for_linus branch), but IMO the abstraction is in the wrong place, and should not go upstream. Of course, patches to make the abstraction not suck are welcome. -- David Gibson | For every complex problem there is a david AT gibson.dropbear.id.au | solution which is simple, neat and | wrong. http://www.ozlabs.org/people/dgibson From dgibson@ozlabs.org Tue Oct 26 20:41:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 20:41:48 -0700 (PDT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R3feFR026323 for ; Tue, 26 Oct 2004 20:41:41 -0700 Received: by ozlabs.org (Postfix, from userid 1007) id E8C2F2BDF2; Wed, 27 Oct 2004 13:41:19 +1000 (EST) Date: Wed, 27 Oct 2004 13:15:51 +1000 From: David Gibson To: Dan Williams Cc: netdev@oss.sgi.com, jgarzik@redhat.com Subject: Re: [PATCH 2.6.10-rc1 4/15] wireless/orinoco: Update orinoco changelog and module parameters Message-ID: <20041027031551.GI7925@zax> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> <1098816355.3663.50.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1098816355.3663.50.camel@dcbw.boston.redhat.com> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10908 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hermes@gibson.dropbear.id.au Precedence: bulk X-list: netdev Content-Length: 631 Lines: 16 On Tue, Oct 26, 2004 at 02:45:55PM -0400, Dan Williams wrote: > Update in-kernel orinoco wireless drivers to upstream CVS. > None of this is original code by Dan Williams, simply a > broken down patch set split-out from upstream orinoco CVS. > > o Update orinoco changelog and module parameters I don't think it's a good idea to apply this in the middle of the others - it implies all the things in the changelog have gone in, which they haven't, yet. -- David Gibson | For every complex problem there is a david AT gibson.dropbear.id.au | solution which is simple, neat and | wrong. http://www.ozlabs.org/people/dgibson From dgibson@ozlabs.org Tue Oct 26 21:38:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 21:38:16 -0700 (PDT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R4c1oC028404 for ; Tue, 26 Oct 2004 21:38:02 -0700 Received: by ozlabs.org (Postfix, from userid 1007) id E26DA2BC0F; Wed, 27 Oct 2004 14:37:40 +1000 (EST) Date: Wed, 27 Oct 2004 14:00:10 +1000 From: David Gibson To: Jeff Garzik Cc: Dan Williams , netdev@oss.sgi.com, jgarzik@redhat.com Subject: Re: [PATCH 2.6.10-rc1 7/15] wireless/orinoco: Update card reset/init code and add card-specific data structures Message-ID: <20041027040010.GA1676@zax> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> <1098816980.3663.62.camel@dcbw.boston.redhat.com> <417EA8D8.3060403@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <417EA8D8.3060403@pobox.com> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10913 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hermes@gibson.dropbear.id.au Precedence: bulk X-list: netdev Content-Length: 3808 Lines: 130 On Tue, Oct 26, 2004 at 03:43:20PM -0400, Jeff Garzik wrote: > Dan Williams wrote: > >+/* Orinoco PCI specific data */ > >+struct orinoco_pci_card { > >+ u32 pci_state[16]; /* PCI suspend/resume state */ > >+}; > > no need with GregKH's latest upstream changes And recently removed from the for_linus branch. > >- printk(KERN_NOTICE "Reset done"); > > timeout = jiffies + (HERMES_PCI_COR_ONT * HZ / 1000); > >- while(time_before(jiffies, timeout)) { > >- printk("."); > >+ while(time_before(jiffies, timeout)) > > mdelay(1); > > the loop is non-sensical... at this point use msleep() or actually > mdelay() for the correct period, rather than looping on mdelay(1) Oh, yes, that really shouldn't have survived this long. Now fixed in CVS (for_linus branch, merge to HEAD coming shortly). > >@@ -199,61 +194,68 @@ > > u16 *pci_ioaddr = NULL; > > unsigned long pci_iolen; > > struct orinoco_private *priv = NULL; > >+ struct orinoco_pci_card *card; > > struct net_device *dev = NULL; > > > > err = pci_enable_device(pdev); > >- if (err) > >- return -EIO; > >+ if (err) { > >+ printk(KERN_ERR PFX "Cannot enable PCI device\n"); > >+ return -err; > >+ } > > incorrect... err is already negative. Also now fixed in CVS. > >@@ -325,6 +327,9 @@ > > > > orinoco_unlock(priv, &flags); > > > >+ pci_save_state(pdev, card->pci_state); > >+ pci_set_power_state(pdev, 3); > >+ > > return 0; > > } > > > >@@ -332,11 +337,15 @@ > > { > > struct net_device *dev = pci_get_drvdata(pdev); > > struct orinoco_private *priv = netdev_priv(dev); > >+ struct orinoco_pci_card *card = priv->card; > > unsigned long flags; > > int err; > > > > printk(KERN_DEBUG "%s: Orinoco-PCI waking up\n", dev->name); > > > >+ pci_set_power_state(pdev, 0); > >+ pci_restore_state(pdev, card->pci_state); > >+ > > err = orinoco_reinit_firmware(dev); > > if (err) { > > printk(KERN_ERR "%s: Error %d re-initializing firmware on > > orinoco_pci_resume()\n", > > These two don't build in the latest 2.6.x kernel. This was fixed by Pavel in the last day or so. > >@@ -332,6 +374,8 @@ > > .id_table = orinoco_plx_pci_id_table, > > .probe = orinoco_plx_init_one, > > .remove = __devexit_p(orinoco_plx_remove_one), > >+ .suspend = 0, > >+ .resume = 0, > > }; > > superfluous change Removed from CVS. > >+ * Do a soft reset of the card using the Configuration Option Register > >+ */ > >+static int orinoco_tmd_cor_reset(struct orinoco_private *priv) > >+{ > >+ hermes_t *hw = &priv->hw; > >+ struct orinoco_tmd_card *card = priv->card; > >+ u32 addr = card->tmd_io; > >+ unsigned long timeout; > >+ u16 reg; > >+ > >+ outb(COR_VALUE | COR_RESET, addr); > >+ mdelay(1); > >+ > >+ outb(COR_VALUE, addr); > >+ mdelay(1); > > PCI posting bugs? That I don't know. Unfortunately a lot of these cards are rather nasty and fragile, so I don't really want to mess with it. > >+ /* Just in case, wait more until the card is no longer busy */ > >+ timeout = jiffies + (TMD_RESET_TIME * HZ / 1000); > >+ reg = hermes_read_regn(hw, CMD); > >+ while (time_before(jiffies, timeout) && (reg & HERMES_CMD_BUSY)) { > >+ mdelay(1); > >+ reg = hermes_read_regn(hw, CMD); > >+ } > > max delay without sleep way too long Yes, yes it is. However, we've had a lot of trouble with timeouts and locking and sleeping in the driver. On the grounds that the bad case usually won't be hit, I'd rather not mess with that until someone has a rather better insight on how to organize this stuff to ensure we give the cards the delays they need, without the blocks-in-sleep. I don't have a TMD card myself, so I'm extra wary about changing it. -- David Gibson | For every complex problem there is a david AT gibson.dropbear.id.au | solution which is simple, neat and | wrong. http://www.ozlabs.org/people/dgibson From dgibson@ozlabs.org Tue Oct 26 21:38:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 21:38:16 -0700 (PDT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R4c13i028403 for ; Tue, 26 Oct 2004 21:38:02 -0700 Received: by ozlabs.org (Postfix, from userid 1007) id EFB8D2BDA0; Wed, 27 Oct 2004 14:37:40 +1000 (EST) Date: Wed, 27 Oct 2004 14:01:30 +1000 From: David Gibson To: Jeff Garzik Cc: Dan Williams , netdev@oss.sgi.com, jgarzik@redhat.com Subject: Re: [PATCH 2.6.10-rc1 14/15] wireless/orinoco: add minimal ethtool support Message-ID: <20041027040130.GB1676@zax> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> <1098818684.9874.1.camel@dcbw.boston.redhat.com> <417EA97C.3070303@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <417EA97C.3070303@pobox.com> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10912 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hermes@gibson.dropbear.id.au Precedence: bulk X-list: netdev Content-Length: 719 Lines: 19 On Tue, Oct 26, 2004 at 03:46:04PM -0400, Jeff Garzik wrote: > Dan Williams wrote: > >Update in-kernel orinoco wireless drivers to upstream CVS. > >None of this is original code by Dan Williams, simply a > >broken down patch set split-out from upstream orinoco CVS. > > > >o Add minimal ethtool support (Pavel Roskin) > > should use ethtool_ops rather than manually handling the ioctl Yes, we should, but no-one's done to work for the change. I really don't have time or resources myself - hence the long overdue merge in the first place. -- David Gibson | For every complex problem there is a david AT gibson.dropbear.id.au | solution which is simple, neat and | wrong. http://www.ozlabs.org/people/dgibson From dgibson@ozlabs.org Tue Oct 26 21:38:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 21:38:16 -0700 (PDT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R4c1qu028406 for ; Tue, 26 Oct 2004 21:38:02 -0700 Received: by ozlabs.org (Postfix, from userid 1007) id 134B52BF06; Wed, 27 Oct 2004 14:37:41 +1000 (EST) Date: Wed, 27 Oct 2004 14:14:28 +1000 From: David Gibson To: Jeff Garzik Cc: Dan Williams , netdev@oss.sgi.com, jgarzik@redhat.com Subject: Re: R[PATCH 2.6.10-rc1 8/15] wireless/orinoco: Refactor spinlocks so we don't necessarily have to disable interrupts Message-ID: <20041027041428.GD1676@zax> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> <1098817472.3663.66.camel@dcbw.boston.redhat.com> <417EA915.9090500@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <417EA915.9090500@pobox.com> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10911 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hermes@gibson.dropbear.id.au Precedence: bulk X-list: netdev Content-Length: 2546 Lines: 68 On Tue, Oct 26, 2004 at 03:44:21PM -0400, Jeff Garzik wrote: > Dan Williams wrote: > >Update in-kernel orinoco wireless drivers to upstream CVS. > >None of this is original code by Dan Williams, simply a > >broken down patch set split-out from upstream orinoco CVS. > > > >o Refactor spinlocks so we don't necessarily have to disable > interrupts No, this should *not* be applied. This again is orinoco_usb stuff, which is in HEAD but not for_linus and which should not go upstream. > >10:44:41.445687264 -0400 > >+++ b/drivers/net/wireless/orinoco.h 2004-10-26 10:45:39.296892544 -0400 > >@@ -71,6 +71,8 @@ > > u16 channel_mask; > > int broken_disableport; > > > >+ unsigned int irq_no_disable:1; > >+ > > /* Configuration paramaters */ > > u32 iw_mode; > > int prefer_port3; > >@@ -129,11 +131,17 @@ > > extern inline int orinoco_lock(struct orinoco_private *priv, > > unsigned long *flags) > > { > >- spin_lock_irqsave(&priv->lock, *flags); > >+ if (priv->irq_no_disable) > >+ spin_lock_bh(&priv->lock); > >+ else > >+ spin_lock_irqsave(&priv->lock, *flags); > > if (priv->hw_unavailable) { > >- printk(KERN_DEBUG "orinoco_lock() called with hw_unavailable > >(dev=%p)\n", > >+ DEBUG(1, "orinoco_lock() called with hw_unavailable > >(dev=%p)\n", > > priv->ndev); > >- spin_unlock_irqrestore(&priv->lock, *flags); > >+ if (priv->irq_no_disable) > >+ spin_unlock_bh(&priv->lock); > >+ else > >+ spin_unlock_irqrestore(&priv->lock, *flags); > > return -EBUSY; > > This entire area has problems. Yes, it does. > Orinoco doesn't need to invent its own locking primitives, nor does it > need to be inventing functions that take *flags as an argument. The (already existing) orinoco_lock()/unlock() functions are somewhat yucky, though I don't think abolishing them is an urgent item. This conditional locking stuff is completely insane. It was added in HEAD as part of the orinco_usb support, because I got sick of people whinging about me not merging the usb support - in the hope that the vile hacks would get removed over time. I've told the USB folks on several occasions that this conditional locking stuff is absolutely too ugly to live, and needs to be done differently, but I've got nothing but the "but it works!" argument. I have neither the hardware nor the time to figure out how to fix it properly myself. -- David Gibson | For every complex problem there is a david AT gibson.dropbear.id.au | solution which is simple, neat and | wrong. http://www.ozlabs.org/people/dgibson From dgibson@ozlabs.org Tue Oct 26 21:38:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 21:38:18 -0700 (PDT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R4c1ET028405 for ; Tue, 26 Oct 2004 21:38:03 -0700 Received: by ozlabs.org (Postfix, from userid 1007) id 077342BDF2; Wed, 27 Oct 2004 14:37:41 +1000 (EST) Date: Wed, 27 Oct 2004 14:06:24 +1000 From: David Gibson To: Francois Romieu Cc: Dan Williams , netdev@oss.sgi.com, jgarzik@redhat.com Subject: Re: [PATCH 2.6.10-rc1 15/15] wireless/orinoco: Wireless scanning support Message-ID: <20041027040624.GC1676@zax> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> <1098818888.9874.6.camel@dcbw.boston.redhat.com> <20041026193355.GA22696@electric-eye.fr.zoreil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041026193355.GA22696@electric-eye.fr.zoreil.com> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10914 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hermes@gibson.dropbear.id.au Precedence: bulk X-list: netdev Content-Length: 1204 Lines: 42 On Tue, Oct 26, 2004 at 09:33:56PM +0200, Francois Romieu wrote: > [...] > > +++ b/drivers/net/wireless/orinoco.c 2004-08-17 17:26:31.000000000 -0400 > > @@ -1442,6 +1442,80 @@ > > dev->name, s, status); > > } > > > > +/* Search scan results for requested BSSID, join it if found */ > > +static void orinoco_join_ap(struct net_device *dev) > > +{ > > + struct orinoco_private *priv = netdev_priv(dev); > > + struct hermes *hw = &priv->hw; > > + int err; > > + unsigned long flags; > > + struct join_req { > > + u8 bssid[ETH_ALEN]; > > + u16 channel; > > + } __attribute__ ((packed)) req; > > + const int atom_len = offsetof(struct prism2_scan_apinfo, atim); > > + struct prism2_scan_apinfo *atom; > > + int offset = 4; > > + int found = 0; > > + u8 *buf = NULL; > > + u16 len; > > + > > + /* Allocate buffer for scan results */ > > + buf = kmalloc(MAX_SCAN_LEN, GFP_KERNEL); > > + if (!buf) > > + return; > > + > > + if (orinoco_lock(priv, &flags) != 0) > > + return; > > Leak. Indeed. Fix committed to CVS. -- David Gibson | For every complex problem there is a david AT gibson.dropbear.id.au | solution which is simple, neat and | wrong. http://www.ozlabs.org/people/dgibson From herbert@gondor.apana.org.au Tue Oct 26 22:11:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 22:11:38 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R5BTdx030658 for ; Tue, 26 Oct 2004 22:11:29 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CMg5W-0004Bg-00; Wed, 27 Oct 2004 15:11:10 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CMg5T-0002IG-00; Wed, 27 Oct 2004 15:11:07 +1000 Date: Wed, 27 Oct 2004 15:11:07 +1000 To: "David S. Miller" , netdev@oss.sgi.com Subject: [NETLINK] Remove netlink_sock_nr Message-ID: <20041027051107.GA8784@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="bg08WKrSYDhXBjb5" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10915 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 1737 Lines: 61 --bg08WKrSYDhXBjb5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi: This patch removes netlink_sock_nr which is only used by a printk statement in af_netlink.c. Even that's only there if NETLINK_REFCNT_DEBUG is defined. If we were really looking for netlink refcnt bugs there are probably better places to do that anyway. Signed-off-by: Herbert Xu Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --bg08WKrSYDhXBjb5 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== net/netlink/af_netlink.c 1.57 vs edited ===== --- 1.57/net/netlink/af_netlink.c 2004-10-20 15:10:40 +10:00 +++ edited/net/netlink/af_netlink.c 2004-10-27 15:01:47 +10:00 @@ -80,8 +80,6 @@ static int netlink_dump(struct sock *sk); static void netlink_destroy_callback(struct netlink_callback *cb); -atomic_t netlink_sock_nr; - static rwlock_t nl_table_lock = RW_LOCK_UNLOCKED; static atomic_t nl_table_users = ATOMIC_INIT(0); @@ -100,11 +98,6 @@ BUG_TRAP(!nlk_sk(sk)->cb); kfree(nlk_sk(sk)); - - atomic_dec(&netlink_sock_nr); -#ifdef NETLINK_REFCNT_DEBUG - printk(KERN_DEBUG "NETLINK %p released, %d are still alive\n", sk, atomic_read(&netlink_sock_nr)); -#endif } /* This lock without WQ_FLAG_EXCLUSIVE is good on UP and it is _very_ bad on SMP. @@ -240,7 +233,6 @@ spin_lock_init(&nlk->cb_lock); init_waitqueue_head(&nlk->wait); sk->sk_destruct = netlink_sock_destruct; - atomic_inc(&netlink_sock_nr); sk->sk_protocol = protocol; return 0; --bg08WKrSYDhXBjb5-- From davem@davemloft.net Tue Oct 26 22:13:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 22:13:17 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R5DCw4030951 for ; Tue, 26 Oct 2004 22:13:13 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CMfzh-0003xr-00; Tue, 26 Oct 2004 22:05:09 -0700 Date: Tue, 26 Oct 2004 22:05:09 -0700 From: "David S. Miller" To: Herbert Xu Cc: netdev@oss.sgi.com Subject: Re: [NETLINK] Remove netlink_sock_nr Message-Id: <20041026220509.2289223c.davem@davemloft.net> In-Reply-To: <20041027051107.GA8784@gondor.apana.org.au> References: <20041027051107.GA8784@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10916 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 439 Lines: 13 On Wed, 27 Oct 2004 15:11:07 +1000 Herbert Xu wrote: > This patch removes netlink_sock_nr which is only used by a printk > statement in af_netlink.c. Even that's only there if > NETLINK_REFCNT_DEBUG is defined. > > If we were really looking for netlink refcnt bugs there are probably > better places to do that anyway. > > Signed-off-by: Herbert Xu Applied, thanks Herbert. From yoshfuji@linux-ipv6.org Tue Oct 26 22:17:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 22:17:16 -0700 (PDT) Received: from yue.st-paulia.net (yue.linux-ipv6.org [203.178.140.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R5HBP7031518 for ; Tue, 26 Oct 2004 22:17:11 -0700 Received: from localhost (localhost [127.0.0.1]) by yue.st-paulia.net (Postfix) with ESMTP id 4342B33CE5; Wed, 27 Oct 2004 14:17:44 +0900 (JST) Date: Wed, 27 Oct 2004 14:17:38 +0900 (JST) Message-Id: <20041027.141738.132559035.yoshfuji@linux-ipv6.org> To: herbert@gondor.apana.org.au, davem@davemloft.net Cc: netdev@oss.sgi.com Subject: Re: [NETLINK] Remove netlink_sock_nr From: YOSHIFUJI Hideaki / =?iso-2022-jp?B?GyRCNUhGIzFRTEAbKEI=?= In-Reply-To: <20041027051107.GA8784@gondor.apana.org.au> References: <20041027051107.GA8784@gondor.apana.org.au> Organization: USAGI Project X-URL: http://www.yoshifuji.org/%7Ehideaki/ X-Fingerprint: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA X-PGP-Key-URL: http://www.yoshifuji.org/%7Ehideaki/hideaki@yoshifuji.org.asc X-Face: "5$Al-.M>NJ%a'@hhZdQm:."qn~PA^gq4o*>iCFToq*bAi#4FRtx}enhuQKz7fNqQz\BYU] $~O_5m-9'}MIs`XGwIEscw;e5b>n"B_?j/AkL~i/MEaZBLP X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 10917 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: yoshfuji@linux-ipv6.org Precedence: bulk X-list: netdev Content-Length: 510 Lines: 13 In article <20041027051107.GA8784@gondor.apana.org.au> (at Wed, 27 Oct 2004 15:11:07 +1000), Herbert Xu says: > This patch removes netlink_sock_nr which is only used by a printk > statement in af_netlink.c. Even that's only there if > NETLINK_REFCNT_DEBUG is defined. > > If we were really looking for netlink refcnt bugs there are probably > better places to do that anyway. Alternatively, how about enclosing them with NETLINK_REFCNT_DEBUG for future reference? --yoshfuji From herbert@gondor.apana.org.au Tue Oct 26 22:32:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Tue, 26 Oct 2004 22:32:54 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R5Whho032155 for ; Tue, 26 Oct 2004 22:32:45 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CMgPr-0004Ic-00; Wed, 27 Oct 2004 15:32:11 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CMgPo-0002Kw-00; Wed, 27 Oct 2004 15:32:08 +1000 Date: Wed, 27 Oct 2004 15:32:08 +1000 To: "YOSHIFUJI Hideaki / ?$B5HF#1QL@" Cc: davem@davemloft.net, netdev@oss.sgi.com Subject: Re: [NETLINK] Remove netlink_sock_nr Message-ID: <20041027053208.GA8971@gondor.apana.org.au> References: <20041027051107.GA8784@gondor.apana.org.au> <20041027.141738.132559035.yoshfuji@linux-ipv6.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041027.141738.132559035.yoshfuji@linux-ipv6.org> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10918 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 502 Lines: 14 On Wed, Oct 27, 2004 at 02:17:38PM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote: > > Alternatively, how about enclosing them with NETLINK_REFCNT_DEBUG > for future reference? Well if we really wanted to do refcnt debugging there then there are much better ways to do it than this. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From vda@port.imtp.ilyichevsk.odessa.ua Wed Oct 27 00:01:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 00:01:11 -0700 (PDT) Received: from port.imtp.ilyichevsk.odessa.ua (168.imtp.Ilyichevsk.Odessa.UA [195.66.192.168] (may be forged)) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9R70p31001855 for ; Wed, 27 Oct 2004 00:00:56 -0700 Received: (qmail 2914 invoked by alias); 27 Oct 2004 07:00:29 -0000 Received: from unknown (195.66.192.167) by 0 (195.66.192.168) with ESMTP; 27 Oct 2004 07:00:29 -0000 From: Denis Vlasenko To: linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: 2.6.9 SMP: via-rhine cannot be upped Date: Wed, 27 Oct 2004 10:00:24 +0300 User-Agent: KMail/1.5.4 Cc: Stephen Hemminger , Jeff Garzik MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410271000.24390.vda@port.imtp.ilyichevsk.odessa.ua> X-archive-position: 10919 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: vda@port.imtp.ilyichevsk.odessa.ua Precedence: bulk X-list: netdev Content-Length: 9505 Lines: 217 [sorry, threading will be broken] >>I have an onboard VIA eth: >> >># lspci >>00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 74) >> >>It cannot be upped: >> >># ip l set dev if up >>SIOCSIFFLAGS: Function not implemented >># ifconfig if up >>SIOCSIFFLAGS: Function not implemented >># busybox ip l set dev if up >>SIOCSIFFLAGS: Function not implemented > >My suspicion is that the eth0 device is not actually the VIA driver >at all. Since your config builds many drivers directly into the kernel, >probably one of the others created an eth0 device. There is no >guarantee of initialization order about which device gets created first >(at least the way network devices are done in 2.6). > >You should investigate if there are multiple devices present >(ifconfig -a or ls /sys/class/net). Perhaps one of the other drivers >does not correctly handle the case of hardware not being present >and leaves a ghost behind.. > >One way to find out would be to look at: > /sys/class/net/eth0/device/vendor > /sys/class/net/eth0/device/device > /sys/class/net/eth0/device/subsystem_vendor > /sys/class/net/eth0/device/subsystem_device Thanks! This was an excellent advice. 2.6.9-smp did get right the device as Via Rhine, but IRQ is 16 now! This must be source of my problems. I had to check dmesg in the first place instead of mailing lkml... Below are boot messages of SMP and preempt kernels. --- dmesg Wed Oct 27 07:46:04 2004 +++ dmesg-smp Wed Oct 27 09:53:42 2004 @@ -1,4 +1,4 @@ -Linux version 2.6.9-preempt (root@shadow) (gcc version 3.3.3) #1 Sat Oct 23 15:40:47 EEST 2004 +Linux version 2.6.9 (root@shadow) (gcc version 3.3.3) #1 SMP Fri Oct 22 22:54:32 EEST 2004 BIOS-provided physical RAM map: BIOS-e820: 0000000000000000 - 000000000009fc00 (usable) BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved) @@ -8,23 +8,32 @@ BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved) BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved) 256MB LOWMEM available. +found SMP MP-table at 000f5470 On node 0 totalpages: 65536 DMA zone: 4096 pages, LIFO batch:1 Normal zone: 61440 pages, LIFO batch:15 HighMem zone: 0 pages, LIFO batch:1 DMI 2.2 present. +ACPI: Unable to locate RSDP +Intel MultiProcessor Specification v1.1 + Virtual Wire compatibility mode. +OEM ID: OEM00000 Product ID: PROD00000000 APIC at: 0xFEE00000 +Processor #0 6:8 APIC version 17 +I/O APIC #2 Version 17 at 0xFEC00000. +Enabling APIC mode: Flat. Using 1 I/O APICs +Processors: 1 Built 1 zonelists Kernel command line: root=/dev/ram init=/linuxrc devfs=nomount ROOTFS=/dev/ide/host0/bus0/target0/lun0/part7 IPCFG=mac,100mbit INIT=/init idebus=40 ide_setup: idebus=40 Initializing CPU#0 -CPU 0 irqstacks, hard=c066d000 soft=c066c000 +CPU 0 irqstacks, hard=c0698000 soft=c0690000 PID hash table entries: 2048 (order: 11, 32768 bytes) -Detected 1743.758 MHz processor. +Detected 1743.632 MHz processor. Using tsc for high-res timesource Console: colour dummy device 80x25 Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) -Memory: 251928k/262144k available (3165k kernel code, 9720k reserved, 1703k data, 656k init, 0k highmem) +Memory: 251432k/262144k available (3191k kernel code, 10216k reserved, 1772k data, 708k init, 0k highmem) Checking if this processor honours the WP bit even in supervisor mode... Ok. Calibrating delay loop... 3432.44 BogoMIPS (lpj=1716224) Mount-cache hash table entries: 512 (order: 0, 4096 bytes) @@ -36,10 +45,16 @@ CPU: After all inits, caps: 0383fbff c1c3fbff 00000000 00000020 Intel machine check architecture supported. Intel machine check reporting enabled on CPU#0. -CPU: AMD Unknown CPU Typ stepping 01 Enabling fast FPU save and restore... done. Enabling unmasked SIMD FPU exception support... done. Checking 'hlt' instruction... OK. +CPU0: AMD Unknown CPU Typ stepping 01 +per-CPU timeslice cutoff: 182.84 usecs. +task migration cache decay timeout: 1 msecs. +Total of 1 processors activated (3432.44 BogoMIPS). +ENABLING IO-APIC IRQs +..TIMER: vector=0x31 pin1=2 pin2=0 +Brought up 1 CPUs checking if image is initramfs...it isn't (no cpio magic); looks like an initrd Freeing initrd memory: 1393k freed NET: Registered protocol family 16 @@ -58,23 +73,17 @@ PCI: Probing PCI hardware PCI: Probing PCI hardware (bus 00) PCI: Using IRQ router VIA [1106/3177] at 0000:00:11.0 -PCI: IRQ 0 for device 0000:00:10.0 doesn't match PIRQ mask - try pci=usepirqmask -PCI: Found IRQ 11 for device 0000:00:10.0 -PCI: Sharing IRQ 11 with 0000:00:0c.0 -PCI: Sharing IRQ 11 with 0000:00:12.0 -PCI: IRQ 0 for device 0000:00:10.1 doesn't match PIRQ mask - try pci=usepirqmask -PCI: IRQ 0 for device 0000:00:10.2 doesn't match PIRQ mask - try pci=usepirqmask -PCI: Found IRQ 10 for device 0000:00:10.2 -PCI: Sharing IRQ 10 with 0000:00:0a.0 -PCI: Sharing IRQ 10 with 0000:00:11.5 -PCI: IRQ 0 for device 0000:00:10.3 doesn't match PIRQ mask - try pci=usepirqmask +PCI->APIC IRQ transform: (B0,I10,P0) -> 18 +PCI->APIC IRQ transform: (B0,I12,P0) -> 16 +PCI->APIC IRQ transform: (B0,I17,P0) -> 27 +PCI->APIC IRQ transform: (B0,I17,P2) -> 22 +PCI->APIC IRQ transform: (B0,I18,P0) -> 16 +PCI->APIC IRQ transform: (B1,I0,P0) -> 16 Machine check exception polling timer started. Total HugeTLB memory allocated, 0 devfs: 2004-01-31 Richard Gooch (rgooch@atnf.csiro.au) devfs: boot_options: 0x0 Initializing Cryptographic API -PCI: Via IRQ fixup for 0000:00:10.0, from 0 to 11 -PCI: Via IRQ fixup for 0000:00:10.2, from 0 to 10 cpci_hotplug: CompactPCI Hot Plug Core version: 0.2 pci_hotplug: PCI Hot Plug PCI Core version: 0.5 cpqphp: Compaq Hot Plug PCI Controller Driver version: 0.9.8 @@ -114,10 +123,7 @@ TLAN: 0 devices installed, PCI: 0 EISA: 0 ns83820.c: National Semiconductor DP83820 10/100/1000 driver. via-rhine.c:v1.10-LK1.2.0-2.6 June-10-2004 Written by Donald Becker -PCI: Found IRQ 11 for device 0000:00:12.0 -PCI: Sharing IRQ 11 with 0000:00:0c.0 -PCI: Sharing IRQ 11 with 0000:00:10.0 -eth0: VIA Rhine II at 0xe400, 00:0a:e6:7c:dd:79, IRQ 11. +eth0: VIA Rhine II at 0xe400, 00:0a:e6:7c:dd:79, IRQ 16. eth0: MII PHY found at address 1, status 0x784d advertising 01e1 Link 0000. smc-ultra.c: No ISAPnP cards found, trying standard ones... cs89x0:cs89x0_probe(0x0) @@ -182,14 +188,14 @@ Intel ISA PCIC probe: not found. Device 'i823650' does not have a release() function, it is broken and must be fixed. Badness in device_release at /.1/usr/srcdevel/kernel/linux-2.6.9.src/drivers/base/core.c:85 - [] dump_stack+0x17/0x1b - [] kobject_cleanup+0x77/0x7a - [] kref_put+0x2a/0x70 - [] kobject_put+0x18/0x1e - [] init_i82365+0x191/0x1a5 - [] do_initcalls+0x27/0xa5 - [] init+0x35/0x125 - [] kernel_thread_helper+0x5/0xb + [] dump_stack+0x17/0x1b + [] kobject_cleanup+0x77/0x7a + [] kref_put+0x2b/0x6f + [] kobject_put+0x18/0x1e + [] init_i82365+0x19b/0x1af + [] do_initcalls+0x27/0xa5 + [] init+0x8a/0x199 + [] kernel_thread_helper+0x5/0xb Databook TCIC-2 PCMCIA probe: not found. mice: PS/2 mouse device common for all mice input: AT Translated Set 2 keyboard on isa0060/serio0 @@ -198,7 +204,7 @@ EISA: Detected 0 cards. NET: Registered protocol family 2 IP: routing cache hash table of 2048 buckets, 16Kbytes -TCP: Hash tables configured (established 16384 bind 32768) +TCP: Hash tables configured (established 16384 bind 16384) Initializing IPsec netlink socket NET: Registered protocol family 1 NET: Registered protocol family 17 @@ -206,14 +212,14 @@ Bridge firewalling registered RAMDISK: Compressed image found at block 0 VFS: Mounted root (ext2 filesystem) readonly. -Freeing unused kernel memory: 656k freed +Freeing unused kernel memory: 708k freed ReiserFS: hda7: warning: sh-2021: reiserfs_fill_super: can not find reiserfs on hda7 ext3: No journal on filesystem on hda7 ReiserFS: hda8: found reiserfs format "3.6" with standard journal ReiserFS: hda8: using ordered data mode ReiserFS: hda8: journal params: device hda8, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30 ReiserFS: hda8: checking transaction log (hda8) -ReiserFS: hda8: replayed 27 transactions in 1 seconds +ReiserFS: hda8: replayed 22 transactions in 1 seconds ReiserFS: hda8: Using r5 hash to sort names ReiserFS: hda9: found reiserfs format "3.6" with standard journal ReiserFS: hda9: using ordered data mode @@ -221,14 +227,10 @@ ReiserFS: hda9: checking transaction log (hda9) ReiserFS: hda9: Using r5 hash to sort names Loaded prism54 driver, version 1.2 -PCI: Found IRQ 11 for device 0000:00:0c.0 -PCI: Sharing IRQ 11 with 0000:00:10.0 -PCI: Sharing IRQ 11 with 0000:00:12.0 +eth0: could not install IRQ handler +prism54: probe of 0000:00:0c.0 failed with error -5 Universal TUN/TAP device driver 1.5 (C)1999-2002 Maxim Krasnyansky -ip_conntrack version 2.1 (2048 buckets, 16384 max) - 300 bytes per conntrack +ip_conntrack version 2.1 (2048 buckets, 16384 max) - 304 bytes per conntrack ip_tables: (C) 2000-2002 Netfilter core team Adding 262136k swap on /var/swap. Priority:-1 extents:1114 -PCI: Found IRQ 10 for device 0000:00:11.5 -PCI: Sharing IRQ 10 with 0000:00:0a.0 -PCI: Sharing IRQ 10 with 0000:00:10.2 PCI: Setting latency timer of device 0000:00:11.5 to 64 -- vda From laforge@netfilter.org Wed Oct 27 00:43:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 00:43:39 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R7hW99006106 for ; Wed, 27 Oct 2004 00:43:32 -0700 Received: from dsl-082-083-224-036.arcor-ip.net ([82.83.224.36] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1CMiSf-0007kt-Gh; Wed, 27 Oct 2004 09:43:14 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1CMiSZ-0002L3-Uq; Wed, 27 Oct 2004 09:43:08 +0200 Date: Wed, 27 Oct 2004 09:43:07 +0200 From: Harald Welte To: "David S. Miller" Cc: Linux Netdev List Subject: Re: BTW Message-ID: <20041027074307.GT18934@sunbeam.de.gnumonks.org> References: <20041020214305.4dc40449.davem@davemloft.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="E0QWZJXrJvPb9tCa" Content-Disposition: inline In-Reply-To: <20041020214305.4dc40449.davem@davemloft.net> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10920 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@netfilter.org Precedence: bulk X-list: netdev Content-Length: 3504 Lines: 108 --E0QWZJXrJvPb9tCa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 20, 2004 at 09:43:05PM -0700, David S. Miller wrote: > Linus has the tcp_diag changes in his tree from Herbert. > So you can work on the updated version of your netlink > changes if you wish. Here you go. Please note I know that code way too little in order to determine if it fully fixes all cases. Signed-off-by: Harald Welte diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-bk7/net/ipv4/tcp_diag.c linux-2.6.9-bk7-netlink_f_multi/net/ipv4/tcp_d= iag.c --- linux-2.6.9-bk7/net/ipv4/tcp_diag.c 2004-10-22 18:18:52.000000000 +0200 +++ linux-2.6.9-bk7-netlink_f_multi/net/ipv4/tcp_diag.c 2004-10-22 19:50:43= =2E000000000 +0200 @@ -108,7 +108,7 @@ } =20 static int tcpdiag_fill(struct sk_buff *skb, struct sock *sk, - int ext, u32 pid, u32 seq) + int ext, u32 pid, u32 seq, u16 nlmsg_flags) { struct inet_opt *inet =3D inet_sk(sk); struct tcp_opt *tp =3D tcp_sk(sk); @@ -235,6 +235,7 @@ } =20 nlh->nlmsg_len =3D skb->tail - b; + nlh->nlmsg_flags =3D nlmsg_flags; return skb->len; =20 nlmsg_failure: @@ -291,7 +292,7 @@ =20 if (tcpdiag_fill(rep, sk, req->tcpdiag_ext, NETLINK_CB(in_skb).pid, - nlh->nlmsg_seq) <=3D 0) + nlh->nlmsg_seq, 0) <=3D 0) BUG(); =20 err =3D netlink_unicast(tcpnl, rep, NETLINK_CB(in_skb).pid, MSG_DONTWAIT); @@ -497,7 +498,7 @@ } =20 return tcpdiag_fill(skb, sk, r->tcpdiag_ext, NETLINK_CB(cb->skb).pid, - cb->nlh->nlmsg_seq); + cb->nlh->nlmsg_seq, NLM_F_MULTI); } =20 static int tcpdiag_fill_req(struct sk_buff *skb, struct sock *sk, @@ -512,6 +513,7 @@ =20 nlh =3D NLMSG_PUT(skb, pid, seq, TCPDIAG_GETSOCK, sizeof(*r)); r =3D NLMSG_DATA(nlh); + nlh->nlmsg_flags =3D NLM_F_MULTI; =20 r->tcpdiag_family =3D sk->sk_family; r->tcpdiag_state =3D TCP_SYN_RECV; diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-bk7/net/xfrm/xfrm_user.c linux-2.6.9-bk7-netlink_f_multi/net/xfrm/xfrm= _user.c --- linux-2.6.9-bk7/net/xfrm/xfrm_user.c 2004-10-18 23:54:32.000000000 +0200 +++ linux-2.6.9-bk7-netlink_f_multi/net/xfrm/xfrm_user.c 2004-10-22 18:17:4= 2.000000000 +0200 @@ -351,7 +351,10 @@ nlh =3D NLMSG_PUT(skb, NETLINK_CB(in_skb).pid, sp->nlmsg_seq, XFRM_MSG_NEWSA, sizeof(*p)); - nlh->nlmsg_flags =3D 0; + if (NETLINK_CB(in_skb).pid && (count || sp->this_idx)) + nlh->nlmsg_flags =3D NLM_F_MULTI; + else + nlh->nlmsg_flags =3D 0; =20 p =3D NLMSG_DATA(nlh); copy_to_user_state(x, p); --=20 - Harald Welte http://www.netfilter.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie --E0QWZJXrJvPb9tCa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBf1GLXaXGVTD0i/8RAhdOAJ9UHxgMjL9Av6voX1gt+Yd3wRlWtACgrkkd kBtfrVPlGv6VJThvpfhtfH4= =+1IW -----END PGP SIGNATURE----- --E0QWZJXrJvPb9tCa-- From herbert@gondor.apana.org.au Wed Oct 27 01:30:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 01:30:32 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R8UJ9T007268 for ; Wed, 27 Oct 2004 01:30:22 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CMjAo-0005Q8-00; Wed, 27 Oct 2004 18:28:50 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CMjAM-0002aJ-00; Wed, 27 Oct 2004 18:28:22 +1000 From: Herbert Xu To: laforge@netfilter.org (Harald Welte) Subject: Re: BTW Cc: davem@davemloft.net, netdev@oss.sgi.com Organization: Core In-Reply-To: <20041027074307.GT18934@sunbeam.de.gnumonks.org> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) Message-Id: Date: Wed, 27 Oct 2004 18:28:22 +1000 X-archive-position: 10921 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 1429 Lines: 44 Harald Welte wrote: > > +++ linux-2.6.9-bk7-netlink_f_multi/net/ipv4/tcp_diag.c 2004-10-22 19:50:43.000000000 +0200 > @@ -108,7 +108,7 @@ > } > > static int tcpdiag_fill(struct sk_buff *skb, struct sock *sk, > - int ext, u32 pid, u32 seq) > + int ext, u32 pid, u32 seq, u16 nlmsg_flags) > { > struct inet_opt *inet = inet_sk(sk); > struct tcp_opt *tp = tcp_sk(sk); > @@ -235,6 +235,7 @@ > } > > nlh->nlmsg_len = skb->tail - b; > + nlh->nlmsg_flags = nlmsg_flags; This doesn't set it for the tw sockets. So just set it at the top of the function instead. The rest of the tcp_diag stuff looks good. > @@ -351,7 +351,10 @@ > nlh = NLMSG_PUT(skb, NETLINK_CB(in_skb).pid, > sp->nlmsg_seq, > XFRM_MSG_NEWSA, sizeof(*p)); > - nlh->nlmsg_flags = 0; > + if (NETLINK_CB(in_skb).pid && (count || sp->this_idx)) > + nlh->nlmsg_flags = NLM_F_MULTI; > + else > + nlh->nlmsg_flags = 0; Yuck. Please put this into xfrm_dump_info. And it would be good to fix the other dumper in this file (xfrm_dump_policy) as well. Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From laforge@netfilter.org Wed Oct 27 01:52:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 01:52:10 -0700 (PDT) Received: from ganesha.gnumonks.org (Debian-exim@ganesha.gnumonks.org [213.95.27.120]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R8q2AM008088 for ; Wed, 27 Oct 2004 01:52:03 -0700 Received: from dsl-082-083-224-036.arcor-ip.net ([82.83.224.36] helo=sunbeam.gnumonks.org) by ganesha.gnumonks.org with asmtp (TLSv1:RC4-SHA:128) (Exim 4.30) id 1CMjWz-0001AJ-Jn; Wed, 27 Oct 2004 10:51:45 +0200 Received: from laforge by sunbeam.gnumonks.org with local (Exim 4.34) id 1CMjWv-0002Sn-9s; Wed, 27 Oct 2004 10:51:41 +0200 Date: Wed, 27 Oct 2004 10:51:41 +0200 From: Harald Welte To: Herbert Xu Cc: davem@davemloft.net, netdev@oss.sgi.com Subject: [PATCH 2.6] fix NLM_F_MULTI in tcp_diag and xfrm_user (was Re: BTW) Message-ID: <20041027085141.GW18934@sunbeam.de.gnumonks.org> References: <20041027074307.GT18934@sunbeam.de.gnumonks.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gwj7ZfuSpvxprVSd" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10922 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: laforge@netfilter.org Precedence: bulk X-list: netdev Content-Length: 4858 Lines: 162 --gwj7ZfuSpvxprVSd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Sorry for submitting incomplete/stupid patches, but as indicated before, I'm not familiar with that code at all. > This doesn't set it for the tw sockets. So just set it at the top > of the function instead. done > Yuck. Please put this into xfrm_dump_info. done. > And it would be good to fix the other dumper in this file (xfrm_dump_poli= cy) > as well. done. diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-bk7/net/ipv4/tcp_diag.c linux-2.6.9-bk7-netlink_f_multi/net/ipv4/tcp_d= iag.c --- linux-2.6.9-bk7/net/ipv4/tcp_diag.c 2004-10-22 18:18:52.000000000 +0200 +++ linux-2.6.9-bk7-netlink_f_multi/net/ipv4/tcp_diag.c 2004-10-27 10:46:21= =2E677098691 +0200 @@ -108,7 +108,7 @@ } =20 static int tcpdiag_fill(struct sk_buff *skb, struct sock *sk, - int ext, u32 pid, u32 seq) + int ext, u32 pid, u32 seq, u16 nlmsg_flags) { struct inet_opt *inet =3D inet_sk(sk); struct tcp_opt *tp =3D tcp_sk(sk); @@ -120,6 +120,7 @@ unsigned char *b =3D skb->tail; =20 nlh =3D NLMSG_PUT(skb, pid, seq, TCPDIAG_GETSOCK, sizeof(*r)); + nlh->nlmsg_flags =3D nlmsg_flags; r =3D NLMSG_DATA(nlh); if (sk->sk_state !=3D TCP_TIME_WAIT) { if (ext & (1<<(TCPDIAG_MEMINFO-1))) @@ -291,7 +292,7 @@ =20 if (tcpdiag_fill(rep, sk, req->tcpdiag_ext, NETLINK_CB(in_skb).pid, - nlh->nlmsg_seq) <=3D 0) + nlh->nlmsg_seq, 0) <=3D 0) BUG(); =20 err =3D netlink_unicast(tcpnl, rep, NETLINK_CB(in_skb).pid, MSG_DONTWAIT); @@ -497,7 +498,7 @@ } =20 return tcpdiag_fill(skb, sk, r->tcpdiag_ext, NETLINK_CB(cb->skb).pid, - cb->nlh->nlmsg_seq); + cb->nlh->nlmsg_seq, NLM_F_MULTI); } =20 static int tcpdiag_fill_req(struct sk_buff *skb, struct sock *sk, @@ -511,6 +512,7 @@ long tmo; =20 nlh =3D NLMSG_PUT(skb, pid, seq, TCPDIAG_GETSOCK, sizeof(*r)); + nlh->nlmsg_flags =3D NLM_F_MULTI; r =3D NLMSG_DATA(nlh); =20 r->tcpdiag_family =3D sk->sk_family; diff -Nru --exclude-from=3D/sunbeam/home/laforge/scripts/dontdiff linux-2.6= =2E9-bk7/net/xfrm/xfrm_user.c linux-2.6.9-bk7-netlink_f_multi/net/xfrm/xfrm= _user.c --- linux-2.6.9-bk7/net/xfrm/xfrm_user.c 2004-10-18 23:54:32.000000000 +0200 +++ linux-2.6.9-bk7-netlink_f_multi/net/xfrm/xfrm_user.c 2004-10-27 10:45:0= 9.780597181 +0200 @@ -332,6 +332,7 @@ struct sk_buff *in_skb; struct sk_buff *out_skb; u32 nlmsg_seq; + u16 nlmsg_flags; int start_idx; int this_idx; }; @@ -351,7 +352,7 @@ nlh =3D NLMSG_PUT(skb, NETLINK_CB(in_skb).pid, sp->nlmsg_seq, XFRM_MSG_NEWSA, sizeof(*p)); - nlh->nlmsg_flags =3D 0; + nlh->nlmsg_flags =3D sp->nlmsg_flags; =20 p =3D NLMSG_DATA(nlh); copy_to_user_state(x, p); @@ -386,6 +387,7 @@ info.in_skb =3D cb->skb; info.out_skb =3D skb; info.nlmsg_seq =3D cb->nlh->nlmsg_seq; + info.nlmsg_flags =3D NLM_F_MULTI; info.this_idx =3D 0; info.start_idx =3D cb->args[0]; (void) xfrm_state_walk(IPSEC_PROTO_ANY, dump_one_state, &info); @@ -408,6 +410,7 @@ info.in_skb =3D in_skb; info.out_skb =3D skb; info.nlmsg_seq =3D seq; + info.nlmsg_flags =3D 0; info.this_idx =3D info.start_idx =3D 0; =20 if (dump_one_state(x, 0, &info)) { @@ -743,7 +746,7 @@ sp->nlmsg_seq, XFRM_MSG_NEWPOLICY, sizeof(*p)); p =3D NLMSG_DATA(nlh); - nlh->nlmsg_flags =3D 0; + nlh->nlmsg_flags =3D sp->nlmsg_flags; =20 copy_to_user_policy(xp, p, dir); if (copy_to_user_tmpl(xp, skb) < 0) @@ -766,6 +769,7 @@ info.in_skb =3D cb->skb; info.out_skb =3D skb; info.nlmsg_seq =3D cb->nlh->nlmsg_seq; + info.nlmsg_flags =3D NLM_F_MULTI; info.this_idx =3D 0; info.start_idx =3D cb->args[0]; (void) xfrm_policy_walk(dump_one_policy, &info); @@ -789,6 +793,7 @@ info.in_skb =3D in_skb; info.out_skb =3D skb; info.nlmsg_seq =3D seq; + info.nlmsg_flags =3D 0; info.this_idx =3D info.start_idx =3D 0; =20 if (dump_one_policy(xp, dir, 0, &info) < 0) { --=20 - Harald Welte http://www.netfilter.org/ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie --gwj7ZfuSpvxprVSd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBf2GdXaXGVTD0i/8RAnTJAJ9TZBUfN+WZjRqFNbBw6G5JatYVQwCgpoaq KxKAq290ZKeSvyF3IphTtRA= =T/SS -----END PGP SIGNATURE----- --gwj7ZfuSpvxprVSd-- From tommy.christensen@tpack.net Wed Oct 27 01:57:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 01:57:59 -0700 (PDT) Received: from mail.tpack.net (ip18.tpack.net [213.173.228.18]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9R8vrms008554 for ; Wed, 27 Oct 2004 01:57:53 -0700 Received: (qmail 28314 invoked from network); 27 Oct 2004 08:57:31 -0000 Received: from cyan.cph.tpack.net (192.168.3.101) by 0 with SMTP; 27 Oct 2004 08:57:31 -0000 Subject: Re: [PATCH 9/11] PKT_SCHED: Cleanup cls_set_class From: Tommy Christensen To: Thomas Graf Cc: "David S. Miller" , netdev@oss.sgi.com, hadi@cyberus.ca In-Reply-To: <20041026222813.GJ12289@postel.suug.ch> References: <20041026222148.GA12289@postel.suug.ch> <20041026222813.GJ12289@postel.suug.ch> Content-Type: text/plain Organization: Message-Id: <1098867450.1813.37.camel@cyan.cph.tpack.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.0 Date: 27 Oct 2004 10:57:31 +0200 Content-Transfer-Encoding: 7bit X-archive-position: 10923 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tommy.christensen@tpack.net Precedence: bulk X-list: netdev Content-Length: 418 Lines: 22 On Wed, 2004-10-27 at 00:28, Thomas Graf wrote: > +static inline long > +cls_set_class(struct tcf_proto *tp, unsigned long *clp, > + unsigned long cl) > +{ > + unsigned long old_cl; > + > + qdisc_lock_tree(tp->q->dev); > + > + tcf_tree_lock(tp); > + old_cl = __cls_set_class(clp, cl); > + tcf_tree_unlock(tp); > + > + return old_cl; > +} > + This locks once too many. (And it returns an *unsigned* long.) -Tommy From shawn.starr@rogers.com Wed Oct 27 02:22:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 02:22:27 -0700 (PDT) Received: from smtp104.rog.mail.re2.yahoo.com (smtp104.rog.mail.re2.yahoo.com [206.190.36.82]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9R9MLEP009602 for ; Wed, 27 Oct 2004 02:22:21 -0700 Received: from unknown (HELO segfault.sh0n.net) (shawn.starr@69.196.113.59 with plain) by smtp104.rog.mail.re2.yahoo.com with SMTP; 27 Oct 2004 09:22:00 -0000 From: Shawn Starr Organization: sh0n.net To: linux-kernel@vger.kernel.org Subject: Re: [2.6.10-rc1-bk5] e1000 broken badly on IBM T42 Date: Wed, 27 Oct 2004 05:21:56 -0400 User-Agent: KMail/1.7 Cc: netdev@oss.sgi.com References: <200410270033.22804.shawn.starr@rogers.com> <200410270054.30313.shawn.starr@rogers.com> In-Reply-To: <200410270054.30313.shawn.starr@rogers.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410270521.56816.shawn.starr@rogers.com> X-archive-position: 10924 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: shawn.starr@rogers.com Precedence: bulk X-list: netdev Content-Length: 1284 Lines: 33 I should just answer it myself, restarting fixed the interface negotiation 'blip'. Perhaps the driver somehow did not reset and retry negotiation? That did look interesting though :) On October 27, 2004 00:54, Shawn Starr wrote: > I should also note, there is no gigabit interface on a linksys router ;-) > it doesn't negotiate as 100Mbit now? > > Shawn. > > On October 27, 2004 00:33, Shawn Starr wrote: > > NETDEV WATCHDOG: eth0: transmit timed out > > e1000: eth0: e1000_watchdog: NIC Link is Up 1000 Mbps Full Duplex > > NETDEV WATCHDOG: eth0: transmit timed out > > > > eth0 Link encap:Ethernet HWaddr 00:0D:60:CA:C1:97 > > inet addr:192.168.10.5 Bcast:192.168.10.255 > > Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > > RX packets:4294883167 errors:4294370903 dropped:4294796898 > > overruns:4294882097 frame:4294711699 TX packets:4294883949 > > errors:4294796898 dropped:0 overruns:0 carrier:4294711699 > > collisions:4294882097 txqueuelen:1000 > > RX bytes:470309 (459.2 KiB) TX bytes:108971 (106.4 KiB) > > Base address:0x8000 Memory:c0220000-c0240000 > > > > > > I can't even use the interface, some counters are going up others going > > backwards? ;-) > > > > Anyone notice this? > > > > Shawn. From herbert@gondor.apana.org.au Wed Oct 27 02:41:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 02:41:47 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R9fcJ9012039 for ; Wed, 27 Oct 2004 02:41:38 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CMkIg-0005rB-00; Wed, 27 Oct 2004 19:41:02 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CMkIb-0002h3-00; Wed, 27 Oct 2004 19:40:57 +1000 Date: Wed, 27 Oct 2004 19:40:57 +1000 To: Harald Welte Cc: davem@davemloft.net, netdev@oss.sgi.com Subject: Re: [PATCH 2.6] fix NLM_F_MULTI in tcp_diag and xfrm_user (was Re: BTW) Message-ID: <20041027094057.GA10305@gondor.apana.org.au> References: <20041027074307.GT18934@sunbeam.de.gnumonks.org> <20041027085141.GW18934@sunbeam.de.gnumonks.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041027085141.GW18934@sunbeam.de.gnumonks.org> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10925 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 517 Lines: 14 On Wed, Oct 27, 2004 at 10:51:41AM +0200, Harald Welte wrote: > Sorry for submitting incomplete/stupid patches, but as indicated before, > I'm not familiar with that code at all. Thank you very much for persisting in this. It looks great. Signed-off-by: Herbert Xu Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From tgraf@suug.ch Wed Oct 27 02:42:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 02:42:41 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9R9gZD4012256 for ; Wed, 27 Oct 2004 02:42:36 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id CBF3B87; Wed, 27 Oct 2004 11:41:56 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 47EC11C0E9; Wed, 27 Oct 2004 11:42:38 +0200 (CEST) Date: Wed, 27 Oct 2004 11:42:38 +0200 From: Thomas Graf To: Tommy Christensen Cc: "David S. Miller" , netdev@oss.sgi.com, hadi@cyberus.ca Subject: Re: [PATCH 9/11] PKT_SCHED: Cleanup cls_set_class Message-ID: <20041027094238.GM12289@postel.suug.ch> References: <20041026222148.GA12289@postel.suug.ch> <20041026222813.GJ12289@postel.suug.ch> <1098867450.1813.37.camel@cyan.cph.tpack.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1098867450.1813.37.camel@cyan.cph.tpack.net> X-archive-position: 10926 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 714 Lines: 29 > This locks once too many. > (And it returns an *unsigned* long.) Thanks. I wonder how this lock could get in there. Remove bogus lock and make cls_set_class return unsigned long. Signed-off-by: Thomas Graf --- linux-2.6.10-rc1-bk1.orig/include/net/pkt_cls.h 2004-10-26 23:42:10.000000000 +0200 +++ linux-2.6.10-rc1-bk1/include/net/pkt_cls.h 2004-10-27 11:35:05.000000000 +0200 @@ -28,14 +28,12 @@ return old_cl; } -static inline long +static inline unsigned long cls_set_class(struct tcf_proto *tp, unsigned long *clp, unsigned long cl) { unsigned long old_cl; - qdisc_lock_tree(tp->q->dev); - tcf_tree_lock(tp); old_cl = __cls_set_class(clp, cl); tcf_tree_unlock(tp); From penberg@cs.helsinki.fi Wed Oct 27 03:28:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 03:28:57 -0700 (PDT) Received: from mail.cs.helsinki.fi (courier.cs.helsinki.fi [128.214.9.1]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9RASoZv014239 for ; Wed, 27 Oct 2004 03:28:51 -0700 Received: from cs78191253.pp.htv.fi (cs78191253.pp.htv.fi [62.78.191.253]) (AUTH: LOGIN penberg, SSL: TLSv1/SSLv3,128bits,RC4-MD5) by mail.cs.helsinki.fi with esmtp; Wed, 27 Oct 2004 13:28:33 +0300 id 0007406E.417F7851.00003B38 Subject: [PATCH] net: 8139too netdev_priv conversion From: Pekka Enberg To: netdev@oss.sgi.com Date: Wed, 27 Oct 2004 13:29:32 +0300 Message-Id: <1098872973.9269.1.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Mailer: Evolution 2.0.2 X-archive-position: 10927 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: penberg@cs.helsinki.fi Precedence: bulk X-list: netdev Content-Length: 9389 Lines: 326 Hi, Use netdev_priv() in 8139too driver instead of dev->priv. Signed-off-by: Pekka Enberg --- 8139too.c | 72 +++++++++++++++++++++++++++++++------------------------------- 1 files changed, 36 insertions(+), 36 deletions(-) Index: 2.6.10-rc1-bk1/drivers/net/8139too.c =================================================================== --- 2.6.10-rc1-bk1.orig/drivers/net/8139too.c 2004-10-24 10:58:03.000000000 +0300 +++ 2.6.10-rc1-bk1/drivers/net/8139too.c 2004-10-27 13:25:23.846685248 +0300 @@ -731,9 +731,9 @@ struct pci_dev *pdev; assert (dev != NULL); - assert (dev->priv != NULL); - tp = dev->priv; + tp = netdev_priv(dev); + assert (tp != NULL); assert (tp->pci_dev != NULL); pdev = tp->pci_dev; @@ -794,7 +794,7 @@ SET_MODULE_OWNER(dev); SET_NETDEV_DEV(dev, &pdev->dev); - tp = dev->priv; + tp = netdev_priv(dev); tp->pci_dev = pdev; /* enable device (incl. PCI PM wakeup and hotplug setup) */ @@ -976,7 +976,7 @@ return i; assert (dev != NULL); - tp = dev->priv; + tp = netdev_priv(dev); assert (tp != NULL); ioaddr = tp->mmio_addr; assert (ioaddr != NULL); @@ -1011,7 +1011,7 @@ dev->irq = pdev->irq; /* dev->priv/tp zeroed and aligned in alloc_etherdev */ - tp = dev->priv; + tp = netdev_priv(dev); /* note: tp->chipset set in rtl8139_init_board */ tp->drv_flags = board_info[ent->driver_data].hw_flags; @@ -1119,7 +1119,7 @@ struct rtl8139_private *np; assert (dev != NULL); - np = dev->priv; + np = netdev_priv(dev); assert (np != NULL); unregister_netdev (dev); @@ -1234,7 +1234,7 @@ static int mdio_read (struct net_device *dev, int phy_id, int location) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); int retval = 0; #ifdef CONFIG_8139TOO_8129 void *mdio_addr = tp->mmio_addr + Config4; @@ -1276,7 +1276,7 @@ static void mdio_write (struct net_device *dev, int phy_id, int location, int value) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); #ifdef CONFIG_8139TOO_8129 void *mdio_addr = tp->mmio_addr + Config4; int mii_cmd = (0x5002 << 16) | (phy_id << 23) | (location << 18) | value; @@ -1319,7 +1319,7 @@ static int rtl8139_open (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); int retval; void *ioaddr = tp->mmio_addr; @@ -1367,7 +1367,7 @@ static void rtl_check_media (struct net_device *dev, unsigned int init_media) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); if (tp->phys[0] >= 0) { mii_check_media(&tp->mii, netif_msg_link(tp), init_media); @@ -1377,7 +1377,7 @@ /* Start the hardware at open or resume. */ static void rtl8139_hw_start (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; u32 i; u8 tmp; @@ -1446,7 +1446,7 @@ /* Initialize the Rx and Tx rings, along with various 'dev' bits. */ static void rtl8139_init_ring (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); int i; tp->cur_rx = 0; @@ -1613,7 +1613,7 @@ static int rtl8139_thread (void *data) { struct net_device *dev = data; - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); unsigned long timeout; daemonize("%s", dev->name); @@ -1645,7 +1645,7 @@ static void rtl8139_start_thread(struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); tp->thr_pid = -1; tp->twistie = 0; @@ -1673,7 +1673,7 @@ static void rtl8139_tx_timeout (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; int i; u8 tmp8; @@ -1718,7 +1718,7 @@ static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; unsigned int entry; unsigned int len = skb->len; @@ -2125,7 +2125,7 @@ static int rtl8139_poll(struct net_device *dev, int *budget) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; int orig_budget = min(*budget, dev->quota); int done = 1; @@ -2163,7 +2163,7 @@ struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_instance; - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; u16 status, ackstat; int link_changed = 0; /* avoid bogus "uninit" warning */ @@ -2239,7 +2239,7 @@ static int rtl8139_close (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; int ret = 0; unsigned long flags; @@ -2302,7 +2302,7 @@ other threads or interrupts aren't messing with the 8139. */ static void rtl8139_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); void *ioaddr = np->mmio_addr; spin_lock_irq(&np->lock); @@ -2336,7 +2336,7 @@ aren't messing with the 8139. */ static int rtl8139_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); void *ioaddr = np->mmio_addr; u32 support; u8 cfg3, cfg5; @@ -2376,7 +2376,7 @@ static void rtl8139_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); strcpy(info->driver, DRV_NAME); strcpy(info->version, DRV_VERSION); strcpy(info->bus_info, pci_name(np->pci_dev)); @@ -2385,7 +2385,7 @@ static int rtl8139_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); spin_lock_irq(&np->lock); mii_ethtool_gset(&np->mii, cmd); spin_unlock_irq(&np->lock); @@ -2394,7 +2394,7 @@ static int rtl8139_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); int rc; spin_lock_irq(&np->lock); rc = mii_ethtool_sset(&np->mii, cmd); @@ -2404,25 +2404,25 @@ static int rtl8139_nway_reset(struct net_device *dev) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); return mii_nway_restart(&np->mii); } static u32 rtl8139_get_link(struct net_device *dev) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); return mii_link_ok(&np->mii); } static u32 rtl8139_get_msglevel(struct net_device *dev) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); return np->msg_enable; } static void rtl8139_set_msglevel(struct net_device *dev, u32 datum) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); np->msg_enable = datum; } @@ -2433,13 +2433,13 @@ #else static int rtl8139_get_regs_len(struct net_device *dev) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); return np->regs_len; } static void rtl8139_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *regbuf) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(priv); regs->version = RTL_REGS_VER; @@ -2456,7 +2456,7 @@ static void rtl8139_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *stats, u64 *data) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); data[0] = np->xstats.early_rx; data[1] = np->xstats.tx_buf_mapped; @@ -2488,7 +2488,7 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { - struct rtl8139_private *np = dev->priv; + struct rtl8139_private *np = netdev_priv(dev); int rc; if (!netif_running(dev)) @@ -2504,7 +2504,7 @@ static struct net_device_stats *rtl8139_get_stats (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; unsigned long flags; @@ -2523,7 +2523,7 @@ static void __set_rx_mode (struct net_device *dev) { - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; u32 mc_filter[2]; /* Multicast hash filter */ int i, rx_mode; @@ -2572,7 +2572,7 @@ static void rtl8139_set_rx_mode (struct net_device *dev) { unsigned long flags; - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); spin_lock_irqsave (&tp->lock, flags); __set_rx_mode(dev); @@ -2584,7 +2584,7 @@ static int rtl8139_suspend (struct pci_dev *pdev, u32 state) { struct net_device *dev = pci_get_drvdata (pdev); - struct rtl8139_private *tp = dev->priv; + struct rtl8139_private *tp = netdev_priv(dev); void *ioaddr = tp->mmio_addr; unsigned long flags; From tgraf@suug.ch Wed Oct 27 03:58:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 03:58:40 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9RAwZ6s015137 for ; Wed, 27 Oct 2004 03:58:36 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id CAA5C87; Wed, 27 Oct 2004 12:57:56 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 131281C0E9; Wed, 27 Oct 2004 12:58:39 +0200 (CEST) Date: Wed, 27 Oct 2004 12:58:38 +0200 From: Thomas Graf To: Tommy Christensen Cc: "David S. Miller" , netdev@oss.sgi.com, hadi@cyberus.ca Subject: Re: [PATCH 9/11] PKT_SCHED: Cleanup cls_set_class Message-ID: <20041027105838.GO12289@postel.suug.ch> References: <20041026222148.GA12289@postel.suug.ch> <20041026222813.GJ12289@postel.suug.ch> <1098867450.1813.37.camel@cyan.cph.tpack.net> <20041027094238.GM12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041027094238.GM12289@postel.suug.ch> X-archive-position: 10928 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Content-Length: 383 Lines: 12 > cls_set_class(struct tcf_proto *tp, unsigned long *clp, > unsigned long cl) > { > unsigned long old_cl; > > - qdisc_lock_tree(tp->q->dev); > - I investigated this bug a bit more to find out why the kernel didn't lock up during my tests and it seems this lock somehow made it into while rediffing to split it up into multiple patches. Sorry folks and thanks again Tommy. From vandrove@vc.cvut.cz Wed Oct 27 04:06:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 04:06:43 -0700 (PDT) Received: from vana.vc.cvut.cz (root@vana.vc.cvut.cz [147.32.240.58]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9RB6YMP015995 for ; Wed, 27 Oct 2004 04:06:35 -0700 Received: from vana.vc.cvut.cz (smmsp@localhost [127.0.0.1]) by vana.vc.cvut.cz (8.13.1/8.13.1/Debian-15) with ESMTP id i9RB6HNI031513 for ; Wed, 27 Oct 2004 13:06:17 +0200 Received: (from root@localhost) by vana.vc.cvut.cz (8.13.1/8.13.1/Submit) id i9RB6HMN031512 for netdev@oss.sgi.com; Wed, 27 Oct 2004 13:06:17 +0200 Date: Wed, 27 Oct 2004 13:06:17 +0200 From: Petr Vandrovec To: netdev@oss.sgi.com Subject: Known problems with TCP window size on 2.6.7? Message-ID: <20041027110617.GA28757@vana.vc.cvut.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10929 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: vandrove@vc.cvut.cz Precedence: bulk X-list: netdev Content-Length: 2682 Lines: 43 Hello, are there some known problems with 2.6.7 and TCP window growing up over limits? usermap is running 2.6.7-bk1, regata1 is running some AIX5. It seems that at startup they do not agree on using window scaling, yet Linux grows window above 64KB, throwing away high window size bit, and very bad things happen after that - AIX is confused that our window shrunk (which is illegal, I'd say) and switches to some strange "1 packet every 200ms" mode. In this state connection stays until it is closed (which takes over 10 hours with transfer we want to perform). Our window never goes back from 449 anywhere (and values depend on tranfered data; sometime it ends up with window size 328 and others; I saw different values in range 200-500). I was using this kernel since middle of June, and it worked flawlessly until about three weeks ago when large SQL transfer started needing over 10 hours instead of less than 1 minute they were taking just day before. 12:44:17.564459 IP regata1.1526 > usermap.52501: P 588189:588844(655) ack 43805 win 65535 12:44:17.568496 IP usermap.52501 > regata1.1526: P 43805:43853(48) ack 588844 win 63040 12:44:17.646162 IP regata1.1526 > usermap.52501: . ack 43853 win 65535 12:44:17.706182 IP regata1.1526 > usermap.52501: P 588844:589508(664) ack 43853 win 65535 12:44:17.710367 IP usermap.52501 > regata1.1526: P 43853:43901(48) ack 589508 win 63040 12:44:17.846308 IP regata1.1526 > usermap.52501: . ack 43901 win 65535 12:44:17.893726 IP regata1.1526 > usermap.52501: P 589508:590203(695) ack 43901 win 65535 12:44:17.897917 IP usermap.52501 > regata1.1526: P 43901:43949(48) ack 590203 win 64395 ^^^^^ 12:44:18.046237 IP regata1.1526 > usermap.52501: . ack 43949 win 65535 12:44:18.080419 IP regata1.1526 > usermap.52501: P 590203:590980(777) ack 43949 win 65535 12:44:18.084746 IP usermap.52501 > regata1.1526: P 43949:43997(48) ack 590980 win 449 ^^^ 12:44:18.246438 IP regata1.1526 > usermap.52501: . 590980:591429(449) ack 43997 win 65535 12:44:18.288637 IP usermap.52501 > regata1.1526: . ack 591429 win 449 12:44:18.288863 IP regata1.1526 > usermap.52501: P 591429:591670(241) ack 43997 win 65535 12:44:18.289094 IP usermap.52501 > regata1.1526: . ack 591670 win 449 12:44:18.292995 IP usermap.52501 > regata1.1526: P 43997:44045(48) ack 591670 win 449 12:44:18.446430 IP regata1.1526 > usermap.52501: . 591670:592119(449) ack 44045 win 65535 12:44:18.488626 IP usermap.52501 > regata1.1526: . ack 592119 win 449 Thanks, Petr Vandrovec From SRS0+f5e6dda50bd019e1a1b1+430+infradead.org+hch@phoenix.srs.infradead.org Wed Oct 27 04:13:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 04:14:12 -0700 (PDT) Received: from phoenix.infradead.org (phoenix.infradead.org [81.187.226.98]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9RBDpRA016473 for ; Wed, 27 Oct 2004 04:13:52 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.42 #1 (Red Hat Linux)) id 1CMljy-00075S-4Q; Wed, 27 Oct 2004 12:13:18 +0100 Date: Wed, 27 Oct 2004 12:13:17 +0100 From: ext Christoph Hellwig To: "Teras Timo (EXT-YomiGroup/Helsinki)" Cc: ext Christoph Hellwig , davem@davemloft.net, netdev@oss.sgi.com Subject: Re: [PATCH] Add ability to register class interfaces for network class Message-ID: <20041027111317.GA27240@infradead.org> References: <20041026183526.GA23535@two.research.nokia.com> <20041026184838.GB16621@infradead.org> <20041026205239.GA23825@two.research.nokia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041026205239.GA23825@two.research.nokia.com> User-Agent: Mutt/1.4.1i X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 10930 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: netdev Content-Length: 840 Lines: 18 > I pointed out the reason why I need it: to add an attribute: > /sys/class/net//. Others might want to do this > too. > > Also the interface subsystem is used in many places (eg. i2o) to create > all the sysfs entries. Maybe it'd be useful to do in net class as well. > And if'd make separate interfaces for standard attributes and wireless > attributes. That way you'd get rid of the #ifdefs of WIRELESS_EXT in > net-sysfs.c. > > On the other hand you didn't answer my question: why the > interface registration should not be possible? > Documentation/driver-model/interface.txt states that this is exactly the > thing it should be used for. Because we don't add interfaces for the sake of it. You still haven't show the user that wants this. i you presented a sane user the review would be quite different. From Ext-Timo.Teras@nokia.com Wed Oct 27 04:38:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 04:38:35 -0700 (PDT) Received: from mgw-x2.nokia.com (mgw-x2.nokia.com [131.228.20.22]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9RBcSmL020902 for ; Wed, 27 Oct 2004 04:38:28 -0700 Received: from esdks002.ntc.nokia.com (esdks002.ntc.nokia.com [172.21.138.121]) by mgw-x2.nokia.com (Switch-2.2.8/Switch-2.2.8) with ESMTP id i9RBcBe01654; Wed, 27 Oct 2004 14:38:11 +0300 (EET DST) X-Scanned: Wed, 27 Oct 2004 14:34:23 +0300 Nokia Message Protector V1.3.31 2004060815 - RELEASE Received: (from root@localhost) by esdks002.ntc.nokia.com (8.12.9/8.12.9) id i9RBYNXo027040; Wed, 27 Oct 2004 14:34:23 +0300 Received: from mgw-int1.ntc.nokia.com (172.21.143.96) by esdks002.ntc.nokia.com 00k2ETpf; Wed, 27 Oct 2004 14:34:21 EEST Received: from esebh002.NOE.Nokia.com (esebh002.ntc.nokia.com [172.21.138.77]) by mgw-int1.ntc.nokia.com (Switch-2.2.8/Switch-2.2.8) with ESMTP id i9RBYKa10166; Wed, 27 Oct 2004 14:34:20 +0300 (EET DST) Received: from esebe018.NOE.Nokia.com ([172.21.138.57]) by esebh002.NOE.Nokia.com with Microsoft SMTPSVC(5.0.2195.6881); Wed, 27 Oct 2004 14:34:19 +0300 Received: from esebe052.NOE.Nokia.com ([172.21.138.217]) by esebe018.NOE.Nokia.com with Microsoft SMTPSVC(5.0.2195.6881); Wed, 27 Oct 2004 14:34:20 +0300 Received: from [172.21.42.112] ([172.21.42.112]) by esebe052.NOE.Nokia.com with Microsoft SMTPSVC(5.0.2195.6881); Wed, 27 Oct 2004 14:34:19 +0300 Message-ID: <417F86F8.6020004@nokia.com> Date: Wed, 27 Oct 2004 14:31:04 +0300 From: =?ISO-8859-1?Q?Timo_Ter=E4s?= User-Agent: Mozilla Thunderbird 0.8 (X11/20040926) X-Accept-Language: en-us, en MIME-Version: 1.0 To: ext ext Christoph Hellwig CC: davem@davemloft.net, netdev@oss.sgi.com Subject: Re: [PATCH] Add ability to register class interfaces for network class References: <20041026183526.GA23535@two.research.nokia.com> <20041026184838.GB16621@infradead.org> <20041026205239.GA23825@two.research.nokia.com> <20041027111317.GA27240@infradead.org> In-Reply-To: <20041027111317.GA27240@infradead.org> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigF26ACBB8F9D29D435ABCCE2D" X-OriginalArrivalTime: 27 Oct 2004 11:34:19.0437 (UTC) FILETIME=[E5D49DD0:01C4BC18] X-archive-position: 10931 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ext-timo.teras@nokia.com Precedence: bulk X-list: netdev Content-Length: 2227 Lines: 55 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF26ACBB8F9D29D435ABCCE2D Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit ext ext Christoph Hellwig wrote: >>I pointed out the reason why I need it: to add an attribute: >>/sys/class/net//. Others might want to do this >>too. >> >>Also the interface subsystem is used in many places (eg. i2o) to create >>all the sysfs entries. Maybe it'd be useful to do in net class as well. >>And if'd make separate interfaces for standard attributes and wireless >>attributes. That way you'd get rid of the #ifdefs of WIRELESS_EXT in >>net-sysfs.c. >> >>On the other hand you didn't answer my question: why the >>interface registration should not be possible? >>Documentation/driver-model/interface.txt states that this is exactly the >>thing it should be used for. > > Because we don't add interfaces for the sake of it. You still haven't show > the user that wants this. i you presented a sane user the review would be > quite different. I am the user wanting it :) If you want to look more detailed what I'm trying to accomplish you could check: http://seclists.org/lists/linux-kernel/2004/Oct/1373.html http://seclists.org/lists/linux-kernel/2004/Sep/8685.html http://lists.netfilter.org/pipermail/netfilter-devel/2004-August/016342.html Of course the ideal way to do this would be adding a timer to net_device and modifying net-sysfs.c. But I don't think that is going to happen so I want to do as unintrusive implementation as possible. And currently I think it'd be adding an interface to network class device which creates the related attribute. Cheers, Timo --------------enigF26ACBB8F9D29D435ABCCE2D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBf4b7FlRU9HaAsIcRAi+eAJ9nAvogeAtnzf2cZQvkG9jMQrOr4gCgj0Mj byuParE9unKFM1DAr7HJTxs= =KsDp -----END PGP SIGNATURE----- --------------enigF26ACBB8F9D29D435ABCCE2D-- From herbert@gondor.apana.org.au Wed Oct 27 05:18:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 05:19:07 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9RCIvID024522 for ; Wed, 27 Oct 2004 05:18:57 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CMmlA-0007F7-00; Wed, 27 Oct 2004 22:18:36 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CMml4-0001Cm-00; Wed, 27 Oct 2004 22:18:30 +1000 From: Herbert Xu To: vandrove@vc.cvut.cz (Petr Vandrovec) Subject: Re: Known problems with TCP window size on 2.6.7? Cc: netdev@oss.sgi.com Organization: Core In-Reply-To: <20041027110617.GA28757@vana.vc.cvut.cz> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) Message-Id: Date: Wed, 27 Oct 2004 22:18:30 +1000 X-archive-position: 10932 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 613 Lines: 16 Petr Vandrovec wrote: > are there some known problems with 2.6.7 and TCP window growing up over limits? No. > usermap is running 2.6.7-bk1, regata1 is running some AIX5. You need to show us the SYN packets as well. More importantly, you need to show us dumps on both sides of the connection since there may be a router/firewall in the middle that's fiddling with the bits. -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From dcbw@redhat.com Wed Oct 27 06:11:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 06:11:39 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9RDBX2W031100 for ; Wed, 27 Oct 2004 06:11:34 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9RDB7m3004051; Wed, 27 Oct 2004 09:11:08 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9RDB7r12011; Wed, 27 Oct 2004 09:11:07 -0400 Received: from dcbw.boston.redhat.com (dcbw.boston.redhat.com [172.16.80.23]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9RDB5Pd017845; Wed, 27 Oct 2004 09:11:05 -0400 Subject: Re: [PATCH 2.6.10-rc1 1/15] wireless/orinoco: Use msleep() instead of hardcoded schedule_timeout()s From: Dan Williams To: David Gibson Cc: Christoph Hellwig , netdev@oss.sgi.com, jgarzik@redhat.com In-Reply-To: <20041027031305.GG7925@zax> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> <1098815604.3663.35.camel@dcbw.boston.redhat.com> <20041026184749.GA16621@infradead.org> <1098819336.9874.11.camel@dcbw.boston.redhat.com> <20041026194219.GA17343@infradead.org> <1098820512.9874.13.camel@dcbw.boston.redhat.com> <20041027031305.GG7925@zax> Content-Type: text/plain Date: Wed, 27 Oct 2004 09:11:11 -0400 Message-Id: <1098882671.13459.2.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 (2.0.2-1) Content-Transfer-Encoding: 7bit X-archive-position: 10933 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dcbw@redhat.com Precedence: bulk X-list: netdev Content-Length: 1459 Lines: 38 Ok, so in my zeal to get the kernel orinoco drivers to _not_ _suck_, what branch is the most up-to-date? Have you been commiting the stuff here that you say is "committed to CVS" to _both_ HEAD and for_linus? The things I care about (to bring orinoco drivers up to par with others like prism54 & aironet): 1) Scanning support 2) monitor mode 3) the better firmware handling Dan On Wed, 2004-10-27 at 13:13 +1000, David Gibson wrote: > On Tue, Oct 26, 2004 at 03:55:12PM -0400, Dan Williams wrote: > > I will leave that do David/jgarzik since I didn't actually write any of > > this code, I just broke the megadiff down. > > What's happened is that the old explicit schedule_timeout() constructs > were replaced in CVS with msleep() (ssleep() didn't exist at the > time). In the meantime, at least some of them were replaced with > ssleep() in mainline. > > I'm about to commit a patch to CVS replacing the msleep()s with > ssleep()s. In the for_linus branch, at least, HEAD will take longer > because we'll need to come up with something to maintain compatibility > with pre-ssleep() kernels. > > > On Tue, 2004-10-26 at 20:42 +0100, Christoph Hellwig wrote: > > > On Tue, Oct 26, 2004 at 03:35:36PM -0400, Dan Williams wrote: > > > > New description: > > > > > > > > o Use msleep() instead of hardcoded schedule_timeout()s > > > > o Normalize sleep calls to use msleep() everywhere > > > > > > care to explain what's the point of the latter? > From klassert@mathematik.tu-chemnitz.de Wed Oct 27 07:08:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 07:08:11 -0700 (PDT) Received: from john.hrz.tu-chemnitz.de (john.hrz.tu-chemnitz.de [134.109.132.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9RE85TK001221 for ; Wed, 27 Oct 2004 07:08:06 -0700 Received: from gareth.mathematik.tu-chemnitz.de ([134.109.40.156]) by john.hrz.tu-chemnitz.de with esmtp (Exim 4.41) id 1CMoSr-0000Eh-L3; Wed, 27 Oct 2004 16:07:49 +0200 Received: by gareth.mathematik.tu-chemnitz.de (Postfix, from userid 274) id 76C2094C5; Wed, 27 Oct 2004 16:07:49 +0200 (CEST) Date: Wed, 27 Oct 2004 16:07:49 +0200 From: Steffen Klassert To: Pekka Enberg Cc: netdev@oss.sgi.com Subject: Re: [PATCH] net: 8139too netdev_priv conversion Message-ID: <20041027140749.GA31398@gareth.mathematik.tu-chemnitz.de> Mail-Followup-To: Pekka Enberg , netdev@oss.sgi.com References: <1098872973.9269.1.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1098872973.9269.1.camel@localhost> User-Agent: Mutt/1.4.2.1i X-Scan-Signature: fa2f669640f85c70e7180e050ec8e211 X-archive-position: 10936 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: klassert@mathematik.tu-chemnitz.de Precedence: bulk X-list: netdev Content-Length: 237 Lines: 9 On Wed, Oct 27, 2004 at 01:29:32PM +0300 or thereabouts, Pekka Enberg wrote: > Hi, > > Use netdev_priv() in 8139too driver instead of dev->priv. Stephen Hemminger actually did a patch to do just that. Look at the netdev list. Steffen From chas@cmf.nrl.navy.mil Wed Oct 27 07:33:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 07:33:22 -0700 (PDT) Received: from ginger.cmf.nrl.navy.mil (ginger.cmf.nrl.navy.mil [134.207.10.161]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9REXDSi002083 for ; Wed, 27 Oct 2004 07:33:14 -0700 Received: from cmf.nrl.navy.mil (thirdoffive.cmf.nrl.navy.mil [134.207.10.180]) by ginger.cmf.nrl.navy.mil (8.12.11/8.12.11) with ESMTP id i9REWql8004243; Wed, 27 Oct 2004 10:32:52 -0400 (EDT) Message-Id: <200410271432.i9REWql8004243@ginger.cmf.nrl.navy.mil> To: netdev@oss.sgi.com Cc: davem@redhat.com Subject: [PATCH][ATM]: don't leak skb on as_indicate failure; don't wakeup twice on as_close Date: Wed, 27 Oct 2004 10:32:54 -0400 From: "chas williams (contractor)" X-Virus-Scanned: NAI Completed X-Scanned-By: MIMEDefang 2.30 (www . roaringpenguin . com / mimedefang) X-archive-position: 10937 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chas@cmf.nrl.navy.mil Precedence: bulk X-list: netdev Content-Length: 1184 Lines: 44 please apply to 2.6. thanks! Signed-off-by: Chas Williams # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/27 09:58:17-04:00 chas@relax.cmf.nrl.navy.mil # [ATM]: don't leak skb on as_indicate failure; don't wakeup twice on as_close # # net/atm/signaling.c # 2004/10/27 09:58:00-04:00 chas@relax.cmf.nrl.navy.mil +3 -1 # [ATM]: don't leak skb on as_indicate failure; don't wakeup twice on as_close # diff -Nru a/net/atm/signaling.c b/net/atm/signaling.c --- a/net/atm/signaling.c 2004-10-27 10:30:12 -04:00 +++ b/net/atm/signaling.c 2004-10-27 10:30:12 -04:00 @@ -136,6 +136,7 @@ if (vcc->sk->sk_ack_backlog == vcc->sk->sk_max_ack_backlog) { sigd_enq(NULL,as_reject,vcc,NULL,NULL); + dev_kfree_skb(skb); goto as_indicate_complete; } vcc->sk->sk_ack_backlog++; @@ -148,7 +149,7 @@ case as_close: set_bit(ATM_VF_RELEASED,&vcc->flags); vcc_release_async(vcc, msg->reply); - break; + goto out; case as_modify: modify_qos(vcc,msg); break; @@ -163,6 +164,7 @@ return -EINVAL; } vcc->sk->sk_state_change(vcc->sk); +out: dev_kfree_skb(skb); return 0; } From Brian.Haley@hp.com Wed Oct 27 08:21:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 08:21:58 -0700 (PDT) Received: from zmamail03.zma.compaq.com (mailout.zma.compaq.com [161.114.64.103]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9RFLr0O007096 for ; Wed, 27 Oct 2004 08:21:53 -0700 Received: from taynzmail03.nz-tay.cpqcorp.net (taynzmail03.nz-tay.cpqcorp.net [16.47.4.103]) by zmamail03.zma.compaq.com (Postfix) with ESMTP id 6558247; Wed, 27 Oct 2004 11:21:32 -0400 (EDT) Received: from kitche.zk3.dec.com (kitche1.zk3.dec.com [16.140.160.161]) by taynzmail03.nz-tay.cpqcorp.net (Postfix) with ESMTP id 3704A2DEB; Wed, 27 Oct 2004 11:21:32 -0400 (EDT) Received: from hp.com by kitche.zk3.dec.com (8.9.3/1.1.27.5/27Oct00-1235PM) id LAA0000668360; Wed, 27 Oct 2004 11:21:30 -0400 (EDT) Message-ID: <417FBCF9.5070808@hp.com> Date: Wed, 27 Oct 2004 11:21:29 -0400 From: Brian Haley Organization: Linux Open Source Lab User-Agent: Mozilla/5.0 (X11; U; OSF1 alpha; en-US; rv:1.2) Gecko/20021205 X-Accept-Language: en-us, en MIME-Version: 1.0 To: yoshfuji@linux-ipv6.org Cc: netdev@oss.sgi.com Subject: Re: [PATCH, TAKE 2] [IPV6] XFRM: extract xfrm_lookup() from ip6_dst_lookup() (is Re: [PATCH][IPv6] separation xfrm_lookup from ip6_dst_lookup) References: <417E5F37.4010501@hp.com> <20041027.004359.62730834.yoshfuji@linux-ipv6.org> <417E92D9.1050305@hp.com> <20041027.091039.56337914.yoshfuji@linux-ipv6.org> In-Reply-To: <20041027.091039.56337914.yoshfuji@linux-ipv6.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10938 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Brian.Haley@hp.com Precedence: bulk X-list: netdev Content-Length: 259 Lines: 10 > Because we do not support RFC3542, extra 128bits is definitely correct. 2292 was deprecated by 3542 in May 2003, when do we plan on supporting it? I am willing to do this update, just please tell me the way you want me to go about it. Thanks, -Brian From rlrevell@joe-job.com Wed Oct 27 08:52:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 08:52:12 -0700 (PDT) Received: from viper.oldcity.dca.net (viper.oldcity.dca.net [216.158.38.4]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9RFq7wq008096 for ; Wed, 27 Oct 2004 08:52:08 -0700 Received: (qmail 6783 invoked from network); 27 Oct 2004 15:51:51 -0000 Received: from unknown (HELO krustophenia.net) (207.245.115.154) by viper with SMTP; 27 Oct 2004 15:51:51 -0000 Subject: Re: [2.6.10-rc1-bk5] e1000 broken badly on IBM T42 From: Lee Revell To: Shawn Starr Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com In-Reply-To: <200410270521.56816.shawn.starr@rogers.com> References: <200410270033.22804.shawn.starr@rogers.com> <200410270054.30313.shawn.starr@rogers.com> <200410270521.56816.shawn.starr@rogers.com> Content-Type: text/plain Date: Wed, 27 Oct 2004 11:51:50 -0400 Message-Id: <1098892310.8313.1.camel@krustophenia.net> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 Content-Transfer-Encoding: 7bit X-archive-position: 10939 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rlrevell@joe-job.com Precedence: bulk X-list: netdev Content-Length: 424 Lines: 12 On Wed, 2004-10-27 at 05:21 -0400, Shawn Starr wrote: > I should just answer it myself, restarting fixed the interface negotiation > 'blip'. Perhaps the driver somehow did not reset and retry negotiation? > > That did look interesting though :) AIUI it's impossible to do 100% reliable autonegotiation with Ethernet. The best you can do is try to detect when you might have gotten it wrong and reset the interface. Lee From shemminger@osdl.org Wed Oct 27 08:58:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 08:58:22 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9RFwDd1008564 for ; Wed, 27 Oct 2004 08:58:15 -0700 Received: from guest-251-240.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9RFvZWL013196 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 27 Oct 2004 08:57:36 -0700 Date: Wed, 27 Oct 2004 08:59:06 -0700 From: Stephen Hemminger To: Timo =?ISO-8859-1?B?VGVy5HM=?= Cc: ext ext Christoph Hellwig , davem@davemloft.net, netdev@oss.sgi.com Subject: Re: [PATCH] Add ability to register class interfaces for network class Message-Id: <20041027085906.665d0125@guest-251-240.pdx.osdl.net> In-Reply-To: <417F86F8.6020004@nokia.com> References: <20041026183526.GA23535@two.research.nokia.com> <20041026184838.GB16621@infradead.org> <20041026205239.GA23825@two.research.nokia.com> <20041027111317.GA27240@infradead.org> <417F86F8.6020004@nokia.com> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i9RFwDd1008564 X-archive-position: 10940 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 Content-Length: 1440 Lines: 39 On Wed, 27 Oct 2004 14:31:04 +0300 Timo Teräs wrote: > ext ext Christoph Hellwig wrote: > >>I pointed out the reason why I need it: to add an attribute: > >>/sys/class/net//. Others might want to do this > >>too. > >> > >>Also the interface subsystem is used in many places (eg. i2o) to create > >>all the sysfs entries. Maybe it'd be useful to do in net class as well. > >>And if'd make separate interfaces for standard attributes and wireless > >>attributes. That way you'd get rid of the #ifdefs of WIRELESS_EXT in > >>net-sysfs.c. > >> > >>On the other hand you didn't answer my question: why the > >>interface registration should not be possible? > >>Documentation/driver-model/interface.txt states that this is exactly the > >>thing it should be used for. > > > > Because we don't add interfaces for the sake of it. You still haven't show > > the user that wants this. i you presented a sane user the review would be > > quite different. The Ethernet bridge code creates attribute groups in several places without additional interfaces. How hard is it to do: int br_sysfs_addbr(struct net_device *dev) { struct kobject *brobj = &dev->class_dev.kobj; struct net_bridge *br = netdev_priv(dev); int err; err = sysfs_create_group(brobj, &bridge_group); if (err) { pr_info("%s: can't create group %s/%s\n", __FUNCTION__, dev->name, bridge_group.name); goto out1; } From shemminger@osdl.org Wed Oct 27 09:14:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 09:14:58 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9RGEpdH009294 for ; Wed, 27 Oct 2004 09:14:52 -0700 Received: from guest-251-240.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9RGEUWL014779 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 27 Oct 2004 09:14:30 -0700 Date: Wed, 27 Oct 2004 09:16:01 -0700 From: Stephen Hemminger To: Denis Vlasenko Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, Jeff Garzik Subject: Re: 2.6.9 SMP: via-rhine cannot be upped Message-Id: <20041027091601.476ee3ca@guest-251-240.pdx.osdl.net> In-Reply-To: <200410271000.24390.vda@port.imtp.ilyichevsk.odessa.ua> References: <200410271000.24390.vda@port.imtp.ilyichevsk.odessa.ua> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10941 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 Content-Length: 2389 Lines: 74 On Wed, 27 Oct 2004 10:00:24 +0300 Denis Vlasenko wrote: > [sorry, threading will be broken] > > >>I have an onboard VIA eth: > >> > >># lspci > >>00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 74) > >> > >>It cannot be upped: > >> > >># ip l set dev if up > >>SIOCSIFFLAGS: Function not implemented > >># ifconfig if up > >>SIOCSIFFLAGS: Function not implemented > >># busybox ip l set dev if up > >>SIOCSIFFLAGS: Function not implemented > > > >My suspicion is that the eth0 device is not actually the VIA driver > >at all. Since your config builds many drivers directly into the kernel, > >probably one of the others created an eth0 device. There is no > >guarantee of initialization order about which device gets created first > >(at least the way network devices are done in 2.6). > > > >You should investigate if there are multiple devices present > >(ifconfig -a or ls /sys/class/net). Perhaps one of the other drivers > >does not correctly handle the case of hardware not being present > >and leaves a ghost behind.. > > > >One way to find out would be to look at: > > /sys/class/net/eth0/device/vendor > > /sys/class/net/eth0/device/device > > /sys/class/net/eth0/device/subsystem_vendor > > /sys/class/net/eth0/device/subsystem_device > > Thanks! This was an excellent advice. > > 2.6.9-smp did get right the device as Via Rhine, but IRQ is 16 > now! This must be source of my problems. > > I had to check dmesg in the first place instead of > mailing lkml... So the summary is the via-rhine could not get irq so it was not any attempt bring it up would fail. > +eth0: VIA Rhine II at 0xe400, 00:0a:e6:7c:dd:79, IRQ 16. ... > +eth0: could not install IRQ handler > +prism54: probe of 0000:00:0c.0 failed with error -5 The failure -ENOSYS comes from: int setup_irq(unsigned int irq, struct irqaction * new) { struct irq_desc *desc = irq_desc + irq; struct irqaction *old, **p; unsigned long flags; int shared = 0; if (desc->handler == &no_irq_type) return -ENOSYS; Looks like IRQ 16 is not a valid interrupt source. Since SMP kernel needs an APIC (an UP doesn't). +PCI->APIC IRQ transform: (B0,I12,P0) -> 16 Maybe either your motherboard APIC support doesn't work, or ACPI is confused. Do you really need to run SMP kernels on this board? From shemminger@osdl.org Wed Oct 27 10:24:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 10:24:16 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9RHOA4s011162 for ; Wed, 27 Oct 2004 10:24:10 -0700 Received: from guest-251-240.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9RHNmWL022539 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 27 Oct 2004 10:23:49 -0700 Date: Wed, 27 Oct 2004 10:25:19 -0700 From: Stephen Hemminger To: Mirko Lindner Cc: netdev@oss.sgi.com, jgarzik@pobox.com Subject: Re: [PATCH] sk98lin: Driver update v7.09 Message-Id: <20041027102519.0fc3c7a9@guest-251-240.pdx.osdl.net> In-Reply-To: <417907C1.6050407@syskonnect.de> References: <417907C1.6050407@syskonnect.de> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10942 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 Content-Length: 800 Lines: 21 On Fri, 22 Oct 2004 15:14:41 +0200 Mirko Lindner wrote: > Hi dev-list, > Hi Jeff, > > here is the new version (v7.09) from our sk98lin driver for Kernel 2.6. > Sorry for this huge patch but this version has a lot of new functions > and changes. The driver was tested by our Test & Verification group and > our OEM customers and include all kernel changes during the latest > kernel release. > > Please send me an email if you like a version of the driver for kernel > 2.4 or if you have any problems or questions. > > The new patch for BK version 2.6.9 bk6 can be find at: > http://www.syskonnect.de/support/temp/sk98lin_v7.09_2.6.9-bk6_patch Since you won't... I'll break this up in pieces (and merge in my changes), and get rid of the UglyReDefineTheWorld style. From titeras@two.research.nokia.com Wed Oct 27 11:40:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 11:40:53 -0700 (PDT) Received: from mgw-x1.nokia.com (mgw-x1.nokia.com [131.228.20.21]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9RIej4A013430 for ; Wed, 27 Oct 2004 11:40:46 -0700 Received: from esdks002.ntc.nokia.com (esdks002.ntc.nokia.com [172.21.138.121]) by mgw-x1.nokia.com (Switch-2.2.8/Switch-2.2.8) with ESMTP id i9RIeB315354; Wed, 27 Oct 2004 21:40:11 +0300 (EET DST) X-Scanned: Wed, 27 Oct 2004 21:38:12 +0300 Nokia Message Protector V1.3.31 2004060815 - RELEASE Received: (from root@localhost) by esdks002.ntc.nokia.com (8.12.9/8.12.9) id i9RIcCbl003817; Wed, 27 Oct 2004 21:38:12 +0300 Received: from mgw-int2.ntc.nokia.com (172.21.143.97) by esdks002.ntc.nokia.com 001n70nA; Wed, 27 Oct 2004 21:38:10 EEST Received: from two.research.nokia.com (two.research.nokia.com [172.21.50.14]) by mgw-int2.ntc.nokia.com (Switch-2.2.8/Switch-2.2.8) with ESMTP id i9RIc5S19373; Wed, 27 Oct 2004 21:38:05 +0300 (EET DST) Received: from titeras by two.research.nokia.com with local (Exim 3.36 #1 (Debian)) id 1CMsgP-0003Jp-00; Wed, 27 Oct 2004 21:38:05 +0300 Date: Wed, 27 Oct 2004 21:38:04 +0300 From: "Teras Timo (EXT-YomiGroup/Helsinki)" To: ext Stephen Hemminger Cc: ext ext Christoph Hellwig , davem@davemloft.net, netdev@oss.sgi.com Subject: Re: [PATCH] Add ability to register class interfaces for network class Message-ID: <20041027183804.GA12585@two.research.nokia.com> References: <20041026183526.GA23535@two.research.nokia.com> <20041026184838.GB16621@infradead.org> <20041026205239.GA23825@two.research.nokia.com> <20041027111317.GA27240@infradead.org> <417F86F8.6020004@nokia.com> <20041027085906.665d0125@guest-251-240.pdx.osdl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041027085906.665d0125@guest-251-240.pdx.osdl.net> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10943 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Ext-Timo.Teras@nokia.com Precedence: bulk X-list: netdev Content-Length: 923 Lines: 30 On Wed, Oct 27, 2004 at 08:59:06AM -0700, ext Stephen Hemminger wrote: > The Ethernet bridge code creates attribute groups in several places > without additional interfaces. How hard is it to do: > > int br_sysfs_addbr(struct net_device *dev) > { > struct kobject *brobj = &dev->class_dev.kobj; > struct net_bridge *br = netdev_priv(dev); > int err; > > err = sysfs_create_group(brobj, &bridge_group); > if (err) { > pr_info("%s: can't create group %s/%s\n", > __FUNCTION__, dev->name, bridge_group.name); > goto out1; > } This way the problem is that I have to know which devices I will add the attributes. But the point is to add attributes to all netdevs. Using this approach I'd have to enumerate all the interfaces every now and then. If I have my class interface I get a callback whenever an interface is created or deleted and I can automatically add the attribute to all netdevs. Cheers, Timo From shemminger@osdl.org Wed Oct 27 11:54:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 11:54:44 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9RIsdYr013967 for ; Wed, 27 Oct 2004 11:54:39 -0700 Received: from guest-251-240.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9RIs7WL030340 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Wed, 27 Oct 2004 11:54:08 -0700 Date: Wed, 27 Oct 2004 11:55:38 -0700 From: Stephen Hemminger To: "Teras Timo (EXT-YomiGroup/Helsinki)" Cc: ext ext Christoph Hellwig , davem@davemloft.net, netdev@oss.sgi.com Subject: Re: [PATCH] Add ability to register class interfaces for network class Message-Id: <20041027115538.540de19e@guest-251-240.pdx.osdl.net> In-Reply-To: <20041027183804.GA12585@two.research.nokia.com> References: <20041026183526.GA23535@two.research.nokia.com> <20041026184838.GB16621@infradead.org> <20041026205239.GA23825@two.research.nokia.com> <20041027111317.GA27240@infradead.org> <417F86F8.6020004@nokia.com> <20041027085906.665d0125@guest-251-240.pdx.osdl.net> <20041027183804.GA12585@two.research.nokia.com> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 10944 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 Content-Length: 1295 Lines: 36 On Wed, 27 Oct 2004 21:38:04 +0300 "Teras Timo (EXT-YomiGroup/Helsinki)" wrote: > On Wed, Oct 27, 2004 at 08:59:06AM -0700, ext Stephen Hemminger wrote: > > The Ethernet bridge code creates attribute groups in several places > > without additional interfaces. How hard is it to do: > > > > int br_sysfs_addbr(struct net_device *dev) > > { > > struct kobject *brobj = &dev->class_dev.kobj; > > struct net_bridge *br = netdev_priv(dev); > > int err; > > > > err = sysfs_create_group(brobj, &bridge_group); > > if (err) { > > pr_info("%s: can't create group %s/%s\n", > > __FUNCTION__, dev->name, bridge_group.name); > > goto out1; > > } > > This way the problem is that I have to know which devices I will > add the attributes. But the point is to add attributes to > all netdevs. > > Using this approach I'd have to enumerate all the interfaces every > now and then. > > If I have my class interface I get a callback whenever an > interface is created or deleted and I can automatically add the > attribute to all netdevs. > If you are doing something to all interfaces, then it probably should either be part of the common net-sysfs layer, or you can dynamically discover and do it by following device transitions with register_device_notifier. From titeras@two.research.nokia.com Wed Oct 27 12:21:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 12:21:57 -0700 (PDT) Received: from mgw-x2.nokia.com (mgw-x2.nokia.com [131.228.20.22]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9RJLhKk018270 for ; Wed, 27 Oct 2004 12:21:43 -0700 Received: from esdks002.ntc.nokia.com (esdks002.ntc.nokia.com [172.21.138.121]) by mgw-x2.nokia.com (Switch-2.2.8/Switch-2.2.8) with ESMTP id i9RJL5e17012; Wed, 27 Oct 2004 22:21:05 +0300 (EET DST) X-Scanned: Wed, 27 Oct 2004 22:20:20 +0300 Nokia Message Protector V1.3.31 2004060815 - RELEASE Received: (from root@localhost) by esdks002.ntc.nokia.com (8.12.9/8.12.9) id i9RJKKxX004402; Wed, 27 Oct 2004 22:20:20 +0300 Received: from mgw-int1.ntc.nokia.com (172.21.143.96) by esdks002.ntc.nokia.com 00mviI20; Wed, 27 Oct 2004 22:20:19 EEST Received: from two.research.nokia.com (two.research.nokia.com [172.21.50.14]) by mgw-int1.ntc.nokia.com (Switch-2.2.8/Switch-2.2.8) with ESMTP id i9RJKIa25883; Wed, 27 Oct 2004 22:20:18 +0300 (EET DST) Received: from titeras by two.research.nokia.com with local (Exim 3.36 #1 (Debian)) id 1CMtLG-0003N9-00; Wed, 27 Oct 2004 22:20:18 +0300 Date: Wed, 27 Oct 2004 22:20:18 +0300 From: "Teras Timo (EXT-YomiGroup/Helsinki)" To: ext Stephen Hemminger Cc: ext ext Christoph Hellwig , davem@davemloft.net, netdev@oss.sgi.com Subject: Re: [PATCH] Add ability to register class interfaces for network class Message-ID: <20041027192018.GA12845@two.research.nokia.com> References: <20041026183526.GA23535@two.research.nokia.com> <20041026184838.GB16621@infradead.org> <20041026205239.GA23825@two.research.nokia.com> <20041027111317.GA27240@infradead.org> <417F86F8.6020004@nokia.com> <20041027085906.665d0125@guest-251-240.pdx.osdl.net> <20041027183804.GA12585@two.research.nokia.com> <20041027115538.540de19e@guest-251-240.pdx.osdl.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041027115538.540de19e@guest-251-240.pdx.osdl.net> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10945 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Ext-Timo.Teras@nokia.com Precedence: bulk X-list: netdev Content-Length: 1494 Lines: 37 On Wed, Oct 27, 2004 at 11:55:38AM -0700, ext Stephen Hemminger wrote: > On Wed, 27 Oct 2004 21:38:04 +0300 > "Teras Timo (EXT-YomiGroup/Helsinki)" wrote: > > This way the problem is that I have to know which devices I will > > add the attributes. But the point is to add attributes to > > all netdevs. > > > > Using this approach I'd have to enumerate all the interfaces every > > now and then. > > > > If I have my class interface I get a callback whenever an > > interface is created or deleted and I can automatically add the > > attribute to all netdevs. > > > > If you are doing something to all interfaces, then it probably should > either be part of the common net-sysfs layer, or you can dynamically > discover and do it by following device transitions with > register_device_notifier. I'd like my code to be available as module also so common net-sysfs is not an option. Hmm... I could use device transitions hooks. But I'm still a bit puzzled why the interface registration should not be public? After all it is only a mechanism to get callbacks whenever a class device is created or removed. Why to even implement a class interface system if you are not allowed to use it (except in one special place where it is considered to be an ugly hack by Christoph Hellwig)? I understood that the whole point for interfaces is the ability to extend functionality without core (i.e. common net-sysfs) changes. Why to lose that modularity? Cheers, Timo From shawn.starr@rogers.com Wed Oct 27 14:42:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 14:42:24 -0700 (PDT) Received: from smtp100.rog.mail.re2.yahoo.com (smtp100.rog.mail.re2.yahoo.com [206.190.36.78]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9RLgI0A023958 for ; Wed, 27 Oct 2004 14:42:18 -0700 Received: from unknown (HELO segfault.sh0n.net) (shawn.starr@69.196.113.59 with plain) by smtp100.rog.mail.re2.yahoo.com with SMTP; 27 Oct 2004 21:41:57 -0000 From: Shawn Starr Organization: sh0n.net To: Lee Revell , Pavel Machek Subject: Re: [2.6.10-rc1-bk5] e1000 broken badly on IBM T42 Date: Wed, 27 Oct 2004 17:41:54 -0400 User-Agent: KMail/1.7 Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com References: <200410270033.22804.shawn.starr@rogers.com> <200410270521.56816.shawn.starr@rogers.com> <1098892310.8313.1.camel@krustophenia.net> In-Reply-To: <1098892310.8313.1.camel@krustophenia.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410271741.55039.shawn.starr@rogers.com> X-archive-position: 10946 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: shawn.starr@rogers.com Precedence: bulk X-list: netdev Content-Length: 648 Lines: 21 Actually, there is a bug, when suspending the laptop its not storing the negotiated link status and resets to gigabit. This looks to be a bug :-) Shawn. On October 27, 2004 11:51, Lee Revell wrote: > On Wed, 2004-10-27 at 05:21 -0400, Shawn Starr wrote: > > I should just answer it myself, restarting fixed the interface > > negotiation 'blip'. Perhaps the driver somehow did not reset and retry > > negotiation? > > > > That did look interesting though :) > > AIUI it's impossible to do 100% reliable autonegotiation with Ethernet. > The best you can do is try to detect when you might have gotten it wrong > and reset the interface. > > Lee From davem@davemloft.net Wed Oct 27 14:46:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 14:46:45 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9RLkeO5024347 for ; Wed, 27 Oct 2004 14:46:40 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CMvUp-0005Qe-00; Wed, 27 Oct 2004 14:38:19 -0700 Date: Wed, 27 Oct 2004 14:38:19 -0700 From: "David S. Miller" To: Thomas Graf Cc: tommy.christensen@tpack.net, netdev@oss.sgi.com, hadi@cyberus.ca Subject: Re: [PATCH 9/11] PKT_SCHED: Cleanup cls_set_class Message-Id: <20041027143819.3c92655a.davem@davemloft.net> In-Reply-To: <20041027094238.GM12289@postel.suug.ch> References: <20041026222148.GA12289@postel.suug.ch> <20041026222813.GJ12289@postel.suug.ch> <1098867450.1813.37.camel@cyan.cph.tpack.net> <20041027094238.GM12289@postel.suug.ch> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10947 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 335 Lines: 14 On Wed, 27 Oct 2004 11:42:38 +0200 Thomas Graf wrote: > > This locks once too many. > > (And it returns an *unsigned* long.) > > Thanks. I wonder how this lock could get in there. > > > Remove bogus lock and make cls_set_class return unsigned long. > > Signed-off-by: Thomas Graf Applied, thanks. From davem@davemloft.net Wed Oct 27 14:50:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 14:50:55 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9RLomw3024775 for ; Wed, 27 Oct 2004 14:50:48 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CMvYY-0005Rq-00; Wed, 27 Oct 2004 14:42:10 -0700 Date: Wed, 27 Oct 2004 14:42:10 -0700 From: "David S. Miller" To: Herbert Xu Cc: laforge@netfilter.org, netdev@oss.sgi.com Subject: Re: [PATCH 2.6] fix NLM_F_MULTI in tcp_diag and xfrm_user (was Re: BTW) Message-Id: <20041027144210.03b95b4b.davem@davemloft.net> In-Reply-To: <20041027094057.GA10305@gondor.apana.org.au> References: <20041027074307.GT18934@sunbeam.de.gnumonks.org> <20041027085141.GW18934@sunbeam.de.gnumonks.org> <20041027094057.GA10305@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10948 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 426 Lines: 12 On Wed, 27 Oct 2004 19:40:57 +1000 Herbert Xu wrote: > On Wed, Oct 27, 2004 at 10:51:41AM +0200, Harald Welte wrote: > > Sorry for submitting incomplete/stupid patches, but as indicated before, > > I'm not familiar with that code at all. > > Thank you very much for persisting in this. It looks great. > > Signed-off-by: Herbert Xu Applied, thanks everyone :-) From davem@davemloft.net Wed Oct 27 14:58:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 14:58:29 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9RLwN2N025348 for ; Wed, 27 Oct 2004 14:58:23 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CMvg3-0005TM-00; Wed, 27 Oct 2004 14:49:55 -0700 Date: Wed, 27 Oct 2004 14:49:55 -0700 From: "David S. Miller" To: "chas williams (contractor)" Cc: netdev@oss.sgi.com, davem@redhat.com Subject: Re: [PATCH][ATM]: don't leak skb on as_indicate failure; don't wakeup twice on as_close Message-Id: <20041027144955.2a824e22.davem@davemloft.net> In-Reply-To: <200410271432.i9REWql8004243@ginger.cmf.nrl.navy.mil> References: <200410271432.i9REWql8004243@ginger.cmf.nrl.navy.mil> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10949 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 305 Lines: 10 On Wed, 27 Oct 2004 10:32:54 -0400 "chas williams (contractor)" wrote: > please apply to 2.6. ... > # ChangeSet > # 2004/10/27 09:58:17-04:00 chas@relax.cmf.nrl.navy.mil > # [ATM]: don't leak skb on as_indicate failure; don't wakeup twice on as_close Applied, thanks Chas. From davem@davemloft.net Wed Oct 27 15:02:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 15:02:25 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9RM2KAV025752 for ; Wed, 27 Oct 2004 15:02:20 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CMvjx-0005UW-00; Wed, 27 Oct 2004 14:53:57 -0700 Date: Wed, 27 Oct 2004 14:53:56 -0700 From: "David S. Miller" To: Herbert Xu Cc: vandrove@vc.cvut.cz, netdev@oss.sgi.com Subject: Re: Known problems with TCP window size on 2.6.7? Message-Id: <20041027145356.6c22959e.davem@davemloft.net> In-Reply-To: References: <20041027110617.GA28757@vana.vc.cvut.cz> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10950 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 1372 Lines: 44 On Wed, 27 Oct 2004 22:18:30 +1000 Herbert Xu wrote: > Petr Vandrovec wrote: > > are there some known problems with 2.6.7 and TCP window growing up over limits? > > No. Actually Herbert, we did have a window 16-bit overflow problem in 2.6.7 which I believe was first fixed in 2.6.8 or so. It was fixed by this patch: # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/07/22 14:01:38-07:00 davem@nuts.davemloft.net # [TCP]: Do not overflow 16-bit window field in tcp_select_window(). # # Signed-off-by: David S. Miller # # net/ipv4/tcp_output.c # 2004/07/22 14:01:10-07:00 davem@nuts.davemloft.net +8 -0 # [TCP]: Do not overflow 16-bit window field in tcp_select_window(). # # Signed-off-by: David S. Miller # diff -Nru a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c --- a/net/ipv4/tcp_output.c 2004-10-27 14:39:15 -07:00 +++ b/net/ipv4/tcp_output.c 2004-10-27 14:39:15 -07:00 @@ -168,6 +168,14 @@ tp->rcv_wnd = new_win; tp->rcv_wup = tp->rcv_nxt; + /* Make sure we do not exceed the maximum possible + * scaled window. + */ + if (!tp->rcv_wscale) + new_win = min(new_win, MAX_TCP_WINDOW); + else + new_win = min(new_win, (65535U << tp->rcv_wscale)); + /* RFC1323 scaling applied */ new_win >>= tp->rcv_wscale; From herbert@gondor.apana.org.au Wed Oct 27 15:07:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 15:07:47 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9RM7cXc026192 for ; Wed, 27 Oct 2004 15:07:39 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CMvwr-0003sw-00; Thu, 28 Oct 2004 08:07:17 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CMvwn-0000eB-00; Thu, 28 Oct 2004 08:07:13 +1000 Date: Thu, 28 Oct 2004 08:07:13 +1000 To: "David S. Miller" Cc: vandrove@vc.cvut.cz, netdev@oss.sgi.com Subject: Re: Known problems with TCP window size on 2.6.7? Message-ID: <20041027220713.GA2468@gondor.apana.org.au> References: <20041027110617.GA28757@vana.vc.cvut.cz> <20041027145356.6c22959e.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041027145356.6c22959e.davem@davemloft.net> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10951 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 497 Lines: 12 On Wed, Oct 27, 2004 at 02:53:56PM -0700, David S. Miller wrote: > > Actually Herbert, we did have a window 16-bit overflow problem in 2.6.7 > which I believe was first fixed in 2.6.8 or so. It was fixed by this > patch: Sorry, you're right. This is probably what's causing it then. -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From greearb@candelatech.com Wed Oct 27 16:18:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 16:18:22 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9RNIHj7031755 for ; Wed, 27 Oct 2004 16:18:17 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i9RNPTLH018353 for ; Wed, 27 Oct 2004 16:25:30 -0700 Message-ID: <41802CA8.8070900@candelatech.com> Date: Wed, 27 Oct 2004 16:18:00 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "'netdev@oss.sgi.com'" Subject: 8169 driver with NetGear GA511 card. Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10952 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Content-Length: 940 Lines: 30 I got one of the new GigE cardbus nics today, and it just started working when I put it in (uses 8169 chipset evidently). How refreshing! I tried stressing it, and it can handle about 30Mbps bi-directional (1514 byte pkts). I was hoping for better...but not too bad. A bit later, my keyboard just stopped working. The scratch pad and USB mouse continued to work. System wouldn't shut down all the way either...forced fsck, system is back online. The keyboard hang is reproducible...seems to happen as soon as I insert the NIC. Kernel is 2.6.9 + my networking patches, compiled for pentium-M NAPI for 8169 is enabled. hardware is nx5000 laptop My thanks to the 8169 driver writer(s). I will continue to debug this, and will be happy to try any suggestions for improving performance and/or stability of this NIC. Take it easy, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From vandrove@vc.cvut.cz Wed Oct 27 16:19:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 16:19:47 -0700 (PDT) Received: from vana.vc.cvut.cz (root@vana.vc.cvut.cz [147.32.240.58]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9RNJeA8002753 for ; Wed, 27 Oct 2004 16:19:40 -0700 Received: from vana.vc.cvut.cz (smmsp@localhost [127.0.0.1]) by vana.vc.cvut.cz (8.13.1/8.13.1/Debian-15) with ESMTP id i9RNJCPq009396; Thu, 28 Oct 2004 01:19:12 +0200 Received: (from root@localhost) by vana.vc.cvut.cz (8.13.1/8.13.1/Submit) id i9RNJ7No009380; Thu, 28 Oct 2004 01:19:07 +0200 Date: Thu, 28 Oct 2004 01:19:07 +0200 From: Petr Vandrovec To: "David S. Miller" Cc: Herbert Xu , netdev@oss.sgi.com Subject: Re: Known problems with TCP window size on 2.6.7? Message-ID: <20041027231907.GA9093@vana.vc.cvut.cz> References: <20041027110617.GA28757@vana.vc.cvut.cz> <20041027145356.6c22959e.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041027145356.6c22959e.davem@davemloft.net> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10953 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: vandrove@vc.cvut.cz Precedence: bulk X-list: netdev Content-Length: 517 Lines: 16 On Wed, Oct 27, 2004 at 02:53:56PM -0700, David S. Miller wrote: > On Wed, 27 Oct 2004 22:18:30 +1000 > Herbert Xu wrote: > > > Petr Vandrovec wrote: > > > are there some known problems with 2.6.7 and TCP window growing up over limits? > > > > No. > > Actually Herbert, we did have a window 16-bit overflow problem in 2.6.7 > which I believe was first fixed in 2.6.8 or so. It was fixed by this > patch: Thanks a lot. Time to upgrade, then. Petr From davem@davemloft.net Wed Oct 27 16:57:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 16:57:41 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9RNvZFq003911 for ; Wed, 27 Oct 2004 16:57:35 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CMxXU-0005nY-00; Wed, 27 Oct 2004 16:49:12 -0700 Date: Wed, 27 Oct 2004 16:49:12 -0700 From: "David S. Miller" To: Ben Greear Cc: netdev@oss.sgi.com Subject: Re: [PATCH] 802.1Q VLAN Message-Id: <20041027164912.09cc63f8.davem@davemloft.net> In-Reply-To: <417D929A.2090809@candelatech.com> References: <41797696.9070905@candelatech.com> <20041022214611.GA4948@electric-eye.fr.zoreil.com> <41798506.1030909@candelatech.com> <417D675F.3000909@candelatech.com> <417D929A.2090809@candelatech.com> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10954 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 607 Lines: 17 On Mon, 25 Oct 2004 16:56:10 -0700 Ben Greear wrote: > DaveM, please consider accepting this patch (it's in a previous email to netdev, > just ask if you want it re-sent.) Applied, but I had to apply it by hand. It gave a large reject. For some reason, patch barfed at the end of the vlan_dev.c parts and refused to interpreter the parts of the diffs for the other files. Did you try to apply that patch to a tree before sending it off? Anyways, I put it in by hand nevertheless. Also, what is up with the magic "23" constant in the get realdev name function strncpy() call? From greearb@candelatech.com Wed Oct 27 18:28:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 18:28:44 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S1Sc2v006500 for ; Wed, 27 Oct 2004 18:28:38 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i9S1ZpLH019962; Wed, 27 Oct 2004 18:35:51 -0700 Message-ID: <41804B35.1080306@candelatech.com> Date: Wed, 27 Oct 2004 18:28:21 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" CC: netdev@oss.sgi.com Subject: Re: [PATCH] 802.1Q VLAN References: <41797696.9070905@candelatech.com> <20041022214611.GA4948@electric-eye.fr.zoreil.com> <41798506.1030909@candelatech.com> <417D675F.3000909@candelatech.com> <417D929A.2090809@candelatech.com> <20041027164912.09cc63f8.davem@davemloft.net> In-Reply-To: <20041027164912.09cc63f8.davem@davemloft.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10955 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Content-Length: 1104 Lines: 36 David S. Miller wrote: > On Mon, 25 Oct 2004 16:56:10 -0700 > Ben Greear wrote: > > >>DaveM, please consider accepting this patch (it's in a previous email to netdev, >>just ask if you want it re-sent.) > > > Applied, but I had to apply it by hand. It gave a large reject. > For some reason, patch barfed at the end of the vlan_dev.c parts > and refused to interpreter the parts of the diffs for the other > files. > > Did you try to apply that patch to a tree before sending it off? > > Anyways, I put it in by hand nevertheless. I appreciate it. I had edited the original patch, removing some diffs of files that were not vlan related. I guess that doesn't work so well. Will be more careful next time. > > Also, what is up with the magic "23" constant in the get realdev > name function strncpy() call? Well, the fields are 24-bytes long, as defined in the include/linux/if_vlan.h file. I could change it to a #define and/or use sizeof if you prefer. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From dgibson@ozlabs.org Wed Oct 27 18:50:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 18:51:05 -0700 (PDT) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S1oxNX007348 for ; Wed, 27 Oct 2004 18:50:59 -0700 Received: by ozlabs.org (Postfix, from userid 1007) id EE2912BE83; Thu, 28 Oct 2004 11:50:37 +1000 (EST) Date: Thu, 28 Oct 2004 11:42:25 +1000 From: David Gibson To: Dan Williams Cc: Christoph Hellwig , netdev@oss.sgi.com, jgarzik@redhat.com Subject: Re: [PATCH 2.6.10-rc1 1/15] wireless/orinoco: Use msleep() instead of hardcoded schedule_timeout()s Message-ID: <20041028014225.GD2216@zax> References: <1098814320.3663.24.camel@dcbw.boston.redhat.com> <1098815604.3663.35.camel@dcbw.boston.redhat.com> <20041026184749.GA16621@infradead.org> <1098819336.9874.11.camel@dcbw.boston.redhat.com> <20041026194219.GA17343@infradead.org> <1098820512.9874.13.camel@dcbw.boston.redhat.com> <20041027031305.GG7925@zax> <1098882671.13459.2.camel@dcbw.boston.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1098882671.13459.2.camel@dcbw.boston.redhat.com> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 10956 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hermes@gibson.dropbear.id.au Precedence: bulk X-list: netdev Content-Length: 1392 Lines: 36 On Wed, Oct 27, 2004 at 09:11:11AM -0400, Dan Williams wrote: > Ok, so in my zeal to get the kernel orinoco drivers to _not_ _suck_, > what branch is the most up-to-date? Have you been commiting the stuff > here that you say is "committed to CVS" to _both_ HEAD and for_linus? They are all equally up-to-date, more or less. The difference between the three branches is: HEAD - Has backwards compatibility code and experimental code notready for merging (at preset, just USB support) standalone - Has backwards compatibility code, but not the experimental code (so no USB support) for_linus - Has neither backwards compatibility code nor experimental code. Apart from the differences noted, the branches are kept merged. I'm well aware that this merge with mainline is long, long overdue, and frankly I've been a completely slack-arse maintainer. Unfortunately, I really don't have the time or energy to spend on this, and there doesn't seem to be anyone else eager to take over maintainership. > The things I care about (to bring orinoco drivers up to par with others > like prism54 & aironet): > > 1) Scanning support > 2) monitor mode > 3) the better firmware handling All these are in all 3 branches. -- David Gibson | For every complex problem there is a david AT gibson.dropbear.id.au | solution which is simple, neat and | wrong. http://www.ozlabs.org/people/dgibson From greearb@candelatech.com Wed Oct 27 18:58:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 18:58:48 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S1wgx4007984 for ; Wed, 27 Oct 2004 18:58:43 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i9S25uLH020328 for ; Wed, 27 Oct 2004 19:05:56 -0700 Message-ID: <41805243.6090702@candelatech.com> Date: Wed, 27 Oct 2004 18:58:27 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "'netdev@oss.sgi.com'" Subject: Re: 8169 driver with NetGear GA511 card. References: <41802CA8.8070900@candelatech.com> In-Reply-To: <41802CA8.8070900@candelatech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10957 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Content-Length: 498 Lines: 20 Ben Greear wrote: > Kernel is 2.6.9 + my networking patches, compiled for pentium-M > NAPI for 8169 is enabled. > > hardware is nx5000 laptop I recompiled w/out NAPI and no more problems, though performance is horrible (about 5Mbps bi-directional). If the developer/maintainer could use one of these cardbus NICs, I'm willing to donate one to help further development and stability. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From andre@tomt.net Wed Oct 27 19:08:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 19:08:42 -0700 (PDT) Received: from mail.skjellin.no (ns1.skjellin.no [80.239.42.66]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9S28br3008497 for ; Wed, 27 Oct 2004 19:08:37 -0700 Received: (qmail 896 invoked from network); 28 Oct 2004 02:08:20 -0000 Received: from unknown (HELO ?10.255.1.10?) (andre@tomt.net@80.239.42.1) by mail.skjellin.no with SMTP; 28 Oct 2004 02:08:20 -0000 Message-ID: <41805418.9030209@tomt.net> Date: Thu, 28 Oct 2004 04:06:16 +0200 From: Andre Tomt User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: netdev@oss.sgi.com CC: "David S. Miller" , akpm@osdl.org Subject: Re: Fw: 2.6.9 Oops in tcp_time_to_recover + 0x6d/0x1b0 References: <20041026163802.6eefd7a6.akpm@osdl.org> <20041026164650.50bc2a9c.davem@davemloft.net> <417F158E.4010109@tomt.net> In-Reply-To: <417F158E.4010109@tomt.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10958 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: andre@tomt.net Precedence: bulk X-list: netdev Content-Length: 414 Lines: 16 Andre Tomt wrote: > David S. Miller wrote: > >> Current BK should have a fix for this from Herbert Xu. >> > > is this what the > > [TCP]: Handle real partial-ACKs of TSO frames correctly. > [TCP]: Only re-set TSO size for packet which was TSO to begin with. > [TCP]: Fix tcp_trim_head() calculations. > > changesets fixed? Sigh, I'm retarded. I was meaning to send this on-list, not off-list. Silly fingers. From herbert@gondor.apana.org.au Wed Oct 27 20:07:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 20:07:30 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S37Mh3009880 for ; Wed, 27 Oct 2004 20:07:22 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CN0cw-0005jM-00; Thu, 28 Oct 2004 13:07:02 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CN0cu-0003hS-00; Thu, 28 Oct 2004 13:07:00 +1000 Date: Thu, 28 Oct 2004 13:07:00 +1000 To: "David S. Miller" , netdev@oss.sgi.com Subject: [NETLINK] Check netlink_insert in kernel_create Message-ID: <20041028030700.GA14181@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="AqsLC8rIMeq19msA" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10959 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 1030 Lines: 41 --AqsLC8rIMeq19msA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi: This patch checks the return value of netlink_insert() in netlink_kernel_create(). It could fail if someone loads the same module twice for instance. Signed-off-by: Herbert Xu ~{PmV>HI~} Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --AqsLC8rIMeq19msA Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== net/netlink/af_netlink.c 1.57 vs edited ===== --- 1.57/net/netlink/af_netlink.c 2004-10-20 15:10:40 +10:00 +++ edited/net/netlink/af_netlink.c 2004-10-28 13:00:33 +10:00 @@ -876,7 +876,10 @@ if (input) nlk_sk(sk)->data_ready = input; - netlink_insert(sk, 0); + if (netlink_insert(sk, 0)) { + sock_release(sock); + return NULL; + } return sk; } --AqsLC8rIMeq19msA-- From herbert@gondor.apana.org.au Wed Oct 27 20:17:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 20:17:12 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S3H3I9010376 for ; Wed, 27 Oct 2004 20:17:03 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CN0mK-0005lN-00; Thu, 28 Oct 2004 13:16:44 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CN0mG-0003jO-00; Thu, 28 Oct 2004 13:16:40 +1000 Date: Thu, 28 Oct 2004 13:16:40 +1000 To: "David S. Miller" , netdev@oss.sgi.com Subject: [XFRM] Don't panic in xfrm_user_init Message-ID: <20041028031640.GA14317@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="3V7upXqbjpZ4EhLz" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10960 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 1075 Lines: 39 --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi: Since xfrm_user can be built as a module it's best not to panic when something goes wrong in xfrm_user_init. Call me a wimp for not fixing netlink_kernel_init's return value :) Signed-off-by: Herbert Xu Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== net/xfrm/xfrm_user.c 1.48 vs edited ===== --- 1.48/net/xfrm/xfrm_user.c 2004-09-11 07:35:53 +10:00 +++ edited/net/xfrm/xfrm_user.c 2004-10-28 13:13:01 +10:00 @@ -1232,8 +1232,7 @@ xfrm_nl = netlink_kernel_create(NETLINK_XFRM, xfrm_netlink_rcv); if (xfrm_nl == NULL) - panic("xfrm_user_init: cannot initialize xfrm_nl\n"); - + return -ENOMEM; xfrm_register_km(&netlink_mgr); --3V7upXqbjpZ4EhLz-- From jgarzik@pobox.com Wed Oct 27 21:17:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 21:17:18 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S4HBVI015318 for ; Wed, 27 Oct 2004 21:17:11 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CN1iU-00050w-Qx; Thu, 28 Oct 2004 05:16:50 +0100 Message-ID: <418072A1.9020509@pobox.com> Date: Thu, 28 Oct 2004 00:16:33 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" CC: Herbert Xu , thomas.spatzier@de.ibm.com, netdev@oss.sgi.com Subject: Re: [PATCH] select appropriate skb size in tcp_sendmsg when TSO is used References: <20041020163510.6d13e9c7.davem@davemloft.net> <20041026111912.GA18095@gondor.apana.org.au> <20041026235126.GA4733@gondor.apana.org.au> <417EE3BB.6040902@pobox.com> <20041027000724.GA4869@gondor.apana.org.au> <20041027001531.GA29973@havoc.gtf.org> <20041027002209.GA5002@gondor.apana.org.au> <20041026175553.55a1b72d.davem@davemloft.net> In-Reply-To: <20041026175553.55a1b72d.davem@davemloft.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10961 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: 1243 Lines: 41 David S. Miller wrote: > On Wed, 27 Oct 2004 10:22:09 +1000 > Herbert Xu wrote: > > >>On Tue, Oct 26, 2004 at 08:15:31PM -0400, Jeff Garzik wrote: >> >>>>IMHO it is valid to disable SG without disabling checksums, no? >>> >>>It's useless: The packet header is always in a separate memory >>>location from the packet data, when using zerocopy sendfile(2). >>> >>>When not using zerocopy sendfile, you are copying the data _anyway_. >> >>I'm fine with adding this check. However I think that belongs in >>another patch since we don't check that in register_netdev currently. >> >>Dave, what do you think? > > > I believe that allowing TX csum support without SG _is_ > useful even though it is not _effective_. > > It is quite desirable for a driver author to be able to > test out his TX csum offload support first, then add > SG support next. Similarly, if a driver author suspects > some issues with either SG or TX csum support, he can > better isolate the problem if we allow this. > > Jeff do you agree? it's never used that way in practice AFAIK, only used by confused sysadmins :) I won't object if you preserve the behavior, but I still don't see much value in allowing it. Jeff From jgarzik@pobox.com Wed Oct 27 21:36:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 21:36:53 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S4al2N015992 for ; Wed, 27 Oct 2004 21:36:47 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CN21T-0005hx-L3; Thu, 28 Oct 2004 05:36:27 +0100 Message-ID: <4180773F.3060307@pobox.com> Date: Thu, 28 Oct 2004 00:36:15 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: yoshfuji@linux-ipv6.org CC: jgarzik@pobox.com, nakasima@kumin.ne.jp, linux-kernel@vger.kernel.org, netdev@oss.sgi.com Subject: Re: linux-2.6.9 eepro100 warning References: <200410232313.AA00003@prism.kumin.ne.jp> <417C9A4E.3030909@pobox.com> <20041025.152749.00307602.yoshfuji@linux-ipv6.org> In-Reply-To: <20041025.152749.00307602.yoshfuji@linux-ipv6.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-archive-position: 10962 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: 705 Lines: 23 YOSHIFUJI Hideaki / å‰è—¤è‹±æ˜Ž wrote: > In article <417C9A4E.3030909@pobox.com> (at Mon, 25 Oct 2004 02:16:46 -0400), Jeff Garzik says: > > >>Note that eepro100 driver will be deleted soon. > > > I'm afraid that e100 does not work well on some systems (e.g. my ThinkPad > T30 on 2.4.x) while eepro100 does. > (I also know there're systems which does not work well > with eepro100 but e100.) > > Has all of such kind of issues been solved? My overall position is, -almost all- the issues have been solved in e100, so this should flush the last remaining ones out of the woodwork. Otherwise nobody will ever notice much less test e100 on these various edge cases. Jeff From jgarzik@pobox.com Wed Oct 27 21:38:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 21:38:54 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S4cm5P016325 for ; Wed, 27 Oct 2004 21:38:49 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CN23U-0005js-Lg; Thu, 28 Oct 2004 05:38:32 +0100 Message-ID: <418077BC.10806@pobox.com> Date: Thu, 28 Oct 2004 00:38:20 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Terje Kvernes CC: Seiichi Nakashima , linux-kernel@vger.kernel.org, Netdev Subject: Re: linux-2.6.9 eepro100 warning References: <200410232313.AA00003@prism.kumin.ne.jp> <417C9A4E.3030909@pobox.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10963 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: 1003 Lines: 35 Terje Kvernes wrote: > Jeff Garzik writes: > > [ ... ] > > >>Note that eepro100 driver will be deleted soon. > > > we have several systems where e100 produces netdev watchdog errors, > while eepro100 works without problems. I can understand the desire > to migrate, but what timeframe are we looking at? roughly > translated, when do I _have_ to start help debugging the e100 > driver? ;-) > > I can do another attempt at rolling out the e100 driver, see what > breaks, and try to report it around 2.6.1[01] or something like that > if that helps? If there are e100 problems, report them to the maintainers so we can get them resolved ASAP... INTEL PRO/100 ETHERNET SUPPORT P: John Ronciak M: john.ronciak@intel.com P: Ganesh Venkatesan M: ganesh.venkatesan@intel.com P: Scott Feldman M: scott.feldman@intel.com W: http://sourceforge.net/projects/e1000/ S: Supported (and of course netdev@oss.sgi.com as well) From davem@davemloft.net Wed Oct 27 21:51:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 21:51:22 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S4pF3A016845 for ; Wed, 27 Oct 2004 21:51:15 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CN27l-0006NC-00; Wed, 27 Oct 2004 21:42:57 -0700 Date: Wed, 27 Oct 2004 21:42:57 -0700 From: "David S. Miller" To: Ben Greear Cc: netdev@oss.sgi.com Subject: Re: [PATCH] 802.1Q VLAN Message-Id: <20041027214257.24637a9f.davem@davemloft.net> In-Reply-To: <41804B35.1080306@candelatech.com> References: <41797696.9070905@candelatech.com> <20041022214611.GA4948@electric-eye.fr.zoreil.com> <41798506.1030909@candelatech.com> <417D675F.3000909@candelatech.com> <417D929A.2090809@candelatech.com> <20041027164912.09cc63f8.davem@davemloft.net> <41804B35.1080306@candelatech.com> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10964 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 382 Lines: 10 On Wed, 27 Oct 2004 18:28:21 -0700 Ben Greear wrote: > > Also, what is up with the magic "23" constant in the get realdev > > name function strncpy() call? > > Well, the fields are 24-bytes long, as defined in the include/linux/if_vlan.h > file. I could change it to a #define and/or use sizeof if you prefer. You could also use "sizeof(obj->member)". From davem@davemloft.net Wed Oct 27 21:53:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 21:53:11 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S4r5nP017099 for ; Wed, 27 Oct 2004 21:53:05 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CN29P-0006Na-00; Wed, 27 Oct 2004 21:44:39 -0700 Date: Wed, 27 Oct 2004 21:44:38 -0700 From: "David S. Miller" To: Herbert Xu Cc: netdev@oss.sgi.com Subject: Re: [NETLINK] Check netlink_insert in kernel_create Message-Id: <20041027214438.6f4a9210.davem@davemloft.net> In-Reply-To: <20041028030700.GA14181@gondor.apana.org.au> References: <20041028030700.GA14181@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10965 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 217 Lines: 7 On Thu, 28 Oct 2004 13:07:00 +1000 Herbert Xu wrote: > Signed-off-by: Herbert Xu ~{PmV>HI~} ^^^^^^^^^^ Hehe, what's that? :-) From davem@davemloft.net Wed Oct 27 21:54:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 21:54:19 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S4sFXP017487 for ; Wed, 27 Oct 2004 21:54:15 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CN2Aa-0006Np-00; Wed, 27 Oct 2004 21:45:52 -0700 Date: Wed, 27 Oct 2004 21:45:52 -0700 From: "David S. Miller" To: Herbert Xu Cc: netdev@oss.sgi.com Subject: Re: [NETLINK] Check netlink_insert in kernel_create Message-Id: <20041027214552.43125ae5.davem@davemloft.net> In-Reply-To: <20041028030700.GA14181@gondor.apana.org.au> References: <20041028030700.GA14181@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10966 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 332 Lines: 10 On Thu, 28 Oct 2004 13:07:00 +1000 Herbert Xu wrote: > This patch checks the return value of netlink_insert() in > netlink_kernel_create(). It could fail if someone loads > the same module twice for instance. > > Signed-off-by: Herbert Xu ~{PmV>HI~} Applied, thanks. From davem@davemloft.net Wed Oct 27 21:55:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 21:55:08 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S4t34V017865 for ; Wed, 27 Oct 2004 21:55:03 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CN2BN-0006O4-00; Wed, 27 Oct 2004 21:46:41 -0700 Date: Wed, 27 Oct 2004 21:46:41 -0700 From: "David S. Miller" To: Herbert Xu Cc: netdev@oss.sgi.com Subject: Re: [XFRM] Don't panic in xfrm_user_init Message-Id: <20041027214641.0a0f6d6c.davem@davemloft.net> In-Reply-To: <20041028031640.GA14317@gondor.apana.org.au> References: <20041028031640.GA14317@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10967 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 355 Lines: 10 On Thu, 28 Oct 2004 13:16:40 +1000 Herbert Xu wrote: > Since xfrm_user can be built as a module it's best not to panic > when something goes wrong in xfrm_user_init. Call me a wimp for > not fixing netlink_kernel_init's return value :) > > Signed-off-by: Herbert Xu Applied, thanks Herbert. From herbert@gondor.apana.org.au Wed Oct 27 22:09:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 22:09:08 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S58xLi018590 for ; Wed, 27 Oct 2004 22:09:00 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CN2We-0006Bd-00; Thu, 28 Oct 2004 15:08:40 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CN2Wb-0003wL-00; Thu, 28 Oct 2004 15:08:37 +1000 Date: Thu, 28 Oct 2004 15:08:37 +1000 To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: [NETLINK] Check netlink_insert in kernel_create Message-ID: <20041028050837.GA15128@gondor.apana.org.au> References: <20041028030700.GA14181@gondor.apana.org.au> <20041027214438.6f4a9210.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041027214438.6f4a9210.davem@davemloft.net> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 10968 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Content-Length: 603 Lines: 15 On Wed, Oct 27, 2004 at 09:44:38PM -0700, David S. Miller wrote: > On Thu, 28 Oct 2004 13:07:00 +1000 > Herbert Xu wrote: > > > Signed-off-by: Herbert Xu ~{PmV>HI~} > ^^^^^^^^^^ > Hehe, what's that? :-) That's my name in Chinese. Forgot to clip it out when I did the cut-n-paste from the signature :) -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From davem@davemloft.net Wed Oct 27 22:10:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 22:10:51 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S5Ak2s018827 for ; Wed, 27 Oct 2004 22:10:46 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CN2QY-0006P7-00; Wed, 27 Oct 2004 22:02:22 -0700 Date: Wed, 27 Oct 2004 22:02:22 -0700 From: "David S. Miller" To: Herbert Xu Cc: netdev@oss.sgi.com Subject: Re: [NETLINK] Check netlink_insert in kernel_create Message-Id: <20041027220222.49a9d68d.davem@davemloft.net> In-Reply-To: <20041028050837.GA15128@gondor.apana.org.au> References: <20041028030700.GA14181@gondor.apana.org.au> <20041027214438.6f4a9210.davem@davemloft.net> <20041028050837.GA15128@gondor.apana.org.au> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10969 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 517 Lines: 15 On Thu, 28 Oct 2004 15:08:37 +1000 Herbert Xu wrote: > On Wed, Oct 27, 2004 at 09:44:38PM -0700, David S. Miller wrote: > > On Thu, 28 Oct 2004 13:07:00 +1000 > > Herbert Xu wrote: > > > > > Signed-off-by: Herbert Xu ~{PmV>HI~} > > ^^^^^^^^^^ > > Hehe, what's that? :-) > > That's my name in Chinese. Forgot to clip it out when I did the > cut-n-paste from the signature :) Oh, ok, xiexie :-) From pmeda@akamai.com Wed Oct 27 22:14:58 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 22:15:02 -0700 (PDT) Received: from smtp3.akamai.com (smtp3.akamai.com [63.116.109.25]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S5EvDX019344 for ; Wed, 27 Oct 2004 22:14:58 -0700 Received: from smtp3.akamai.com (vwall3.sanmateo.corp.akamai.com [172.23.1.73]) by smtp3.akamai.com (8.12.10/8.12.10) with ESMTP id i9S5EYHK012344 for ; Wed, 27 Oct 2004 22:14:34 -0700 (PDT) Received: from USCA1EX-GATE1.sanmateo.corp.akamai.com (usca1ex-gate1.sanmateo.corp.akamai.com [172.23.1.110]) by smtp3.akamai.com (8.12.10/8.12.10) with ESMTP id i9S5EX0P012341; Wed, 27 Oct 2004 22:14:33 -0700 (PDT) Received: from USCA1EX-PRIV1.sanmateo.corp.akamai.com ([172.23.1.113]) by USCA1EX-GATE1.sanmateo.corp.akamai.com with Microsoft SMTPSVC(5.0.2195.6713); Wed, 27 Oct 2004 22:14:33 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: rcv_wnd = init_cwnd*mss Date: Wed, 27 Oct 2004 22:14:33 -0700 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: rcv_wnd = init_cwnd*mss Thread-Index: AcS8rM7hUF59s+QmQiiGoDvV2MwyDw== From: "Meda, Prasanna" To: Cc: , X-OriginalArrivalTime: 28 Oct 2004 05:14:33.0611 (UTC) FILETIME=[02D53DB0:01C4BCAD] Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i9S5EvDX019344 X-archive-position: 10970 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pmeda@akamai.com Precedence: bulk X-list: netdev Content-Length: 882 Lines: 34 What is the reason for checking mss with 1< (1<<*rcv_wscale)) { int init_cwnd = 4; if (mss > 1460*3) init_cwnd = 2; else if (mss > 1460) init_cwnd = 3; if (*rcv_wnd > init_cwnd*mss) *rcv_wnd = init_cwnd*mss; } ...... } --------- Perhaps the motivation was checking for if (mss > rcv_wnd * (1<<*rcv_wscale)) { Thanks, Prasanna. From davem@davemloft.net Wed Oct 27 22:29:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 22:29:52 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S5Tm6q019836 for ; Wed, 27 Oct 2004 22:29:48 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CN2j2-0006Ra-00; Wed, 27 Oct 2004 22:21:28 -0700 Date: Wed, 27 Oct 2004 22:21:28 -0700 From: "David S. Miller" To: "Meda, Prasanna" Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, davem@redhat.com Subject: Re: rcv_wnd = init_cwnd*mss Message-Id: <20041027222128.365536e7.davem@davemloft.net> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10971 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Content-Length: 254 Lines: 9 On Wed, 27 Oct 2004 22:14:33 -0700 "Meda, Prasanna" wrote: > > What is the reason for checking mss with 1< include/net/tcp.h: Because the advertised window field is 16-bits. It is interpreted as "value << rcv_wscale" From pmeda@akamai.com Wed Oct 27 23:16:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Wed, 27 Oct 2004 23:16:17 -0700 (PDT) Received: from smtp3.akamai.com (smtp3.akamai.com [63.116.109.25]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S6GBXO021063 for ; Wed, 27 Oct 2004 23:16:11 -0700 Received: from smtp3.akamai.com (vwall1.sanmateo.corp.akamai.com [172.23.1.71]) by smtp3.akamai.com (8.12.10/8.12.10) with ESMTP id i9S6FnHM014535 for ; Wed, 27 Oct 2004 23:15:50 -0700 (PDT) Received: from USCA1EX-GATE1.sanmateo.corp.akamai.com (usca1ex-gate1.sanmateo.corp.akamai.com [172.23.1.110]) by smtp3.akamai.com (8.12.10/8.12.10) with ESMTP id i9S6Fm0P014532; Wed, 27 Oct 2004 23:15:48 -0700 (PDT) Received: from USCA1EX-PRIV1.sanmateo.corp.akamai.com ([172.23.1.113]) by USCA1EX-GATE1.sanmateo.corp.akamai.com with Microsoft SMTPSVC(5.0.2195.6713); Wed, 27 Oct 2004 23:15:48 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: RE: rcv_wnd = init_cwnd*mss Date: Wed, 27 Oct 2004 23:15:48 -0700 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: rcv_wnd = init_cwnd*mss Thread-Index: AcS8rx0lII4RnMC0R0WeBsZWJg685QABCWEw From: "Meda, Prasanna" To: "David S. Miller" Cc: , , X-OriginalArrivalTime: 28 Oct 2004 06:15:48.0916 (UTC) FILETIME=[917C4740:01C4BCB5] Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i9S6GBXO021063 X-archive-position: 10972 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pmeda@akamai.com Precedence: bulk X-list: netdev Content-Length: 1274 Lines: 41 > From: David S. Miller [mailto:davem@davemloft.net] > Sent: Wednesday, October 27, 2004 10:21 PM > To: Meda, Prasanna > Cc: linux-kernel@vger.kernel.org; netdev@oss.sgi.com; davem@redhat.com > Subject: Re: rcv_wnd = init_cwnd*mss > > > On Wed, 27 Oct 2004 22:14:33 -0700 > "Meda, Prasanna" wrote: > > > > > What is the reason for checking mss with 1< > include/net/tcp.h: > Because the advertised window field is 16-bits. It is > interpreted as "value << rcv_wscale" Thanks, still it is unclear to me why are we downsizing the advertised window(rcv_wnd) to cwnd? To defeat disobeying sender, or something like below? Suppose when wscale is zero, it is now checking mss > 1, and perhaps the intention was to check mss > rcv_wnd, where mss is greater than advertised, and we still want to advertise window to spwan 2 to 4 cwnd packets. And also in the following line, if (*rcv_wscale && sysctl_tcp_app_win && space>=mss && space - max((space>>sysctl_tcp_app_win), mss>>*rcv_wscale) < 65536/2) space is actual_space>>rcv_wscale, mss is actual value. Why are we checking space>=mss, which are in different scales? The second line is doing max on space and mss on same scales, and looks right. Thanks, Prasanna. From akpm@osdl.org Thu Oct 28 00:21:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 00:21:52 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S7LlG7025888 for ; Thu, 28 Oct 2004 00:21:48 -0700 Received: from bix (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i9S7LJ907831; Thu, 28 Oct 2004 00:21:19 -0700 Date: Thu, 28 Oct 2004 00:19:20 -0700 From: Andrew Morton To: "David S. Miller" , Jeff Garzik Cc: netdev@oss.sgi.com Subject: incoming Message-Id: <20041028001920.48d02de4.akpm@osdl.org> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 10973 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 Content-Length: 96 Lines: 3 A bunch of net patches which I've accumulated. I've made no effort to test or review these... From akpm@osdl.org Thu Oct 28 00:22:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 00:22:26 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S7MDOP025930 for ; Thu, 28 Oct 2004 00:22:13 -0700 Received: from localhost.localdomain (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9S7Lj908010; Thu, 28 Oct 2004 00:21:45 -0700 Message-Id: <200410280721.i9S7Lj908010@mail.osdl.org> Subject: [patch 7/9] X.25: Dont log "unknown frame type" when receiving clear confirm To: davem@redhat.com Cc: jgarzik@pobox.com, netdev@oss.sgi.com, akpm@osdl.org, ahendry@tusc.com.au From: akpm@osdl.org Date: Thu, 28 Oct 2004 00:19:46 -0700 X-archive-position: 10977 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 Content-Length: 901 Lines: 28 From: Andrew Hendry There is no need to log "unknown frame type" when remote X.25 sends clear confirms. Signed-off-by: Andrew Hendry Signed-off-by: Andrew Morton --- 25-akpm/net/x25/x25_dev.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) diff -puN net/x25/x25_dev.c~x25-dont-log-unknown-frame-type-when net/x25/x25_dev.c --- 25/net/x25/x25_dev.c~x25-dont-log-unknown-frame-type-when 2004-10-28 00:17:08.407525848 -0700 +++ 25-akpm/net/x25/x25_dev.c 2004-10-28 00:17:08.410525392 -0700 @@ -92,7 +92,9 @@ static int x25_receive_data(struct sk_bu /* x25_transmit_clear_request(nb, lci, 0x0D); */ - printk(KERN_DEBUG "x25_receive_data(): unknown frame type %2x\n",frametype); + + if (frametype != X25_CLEAR_CONFIRMATION) + printk(KERN_DEBUG "x25_receive_data(): unknown frame type %2x\n",frametype); return 0; } _ From akpm@osdl.org Thu Oct 28 00:22:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 00:22:25 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S7MBV6025918 for ; Thu, 28 Oct 2004 00:22:11 -0700 Received: from localhost.localdomain (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9S7Lh908000; Thu, 28 Oct 2004 00:21:43 -0700 Message-Id: <200410280721.i9S7Lh908000@mail.osdl.org> Subject: [patch 5/9] ethertap debug no newline To: davem@redhat.com Cc: jgarzik@pobox.com, netdev@oss.sgi.com, akpm@osdl.org, ahendry@tusc.com.au From: akpm@osdl.org Date: Thu, 28 Oct 2004 00:19:44 -0700 X-archive-position: 10975 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 Content-Length: 883 Lines: 25 From: Andrew Hendry Very trivial, ethertap debug missing a newline. Signed-off-by: Andrew Hendry Signed-off-by: Andrew Morton --- 25-akpm/drivers/net/ethertap.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/net/ethertap.c~ethertap-debug-no-newline drivers/net/ethertap.c --- 25/drivers/net/ethertap.c~ethertap-debug-no-newline 2004-10-28 00:17:08.041581480 -0700 +++ 25-akpm/drivers/net/ethertap.c 2004-10-28 00:17:08.045580872 -0700 @@ -124,7 +124,7 @@ static int ethertap_open(struct net_devi struct net_local *lp = netdev_priv(dev); if (ethertap_debug > 2) - printk(KERN_DEBUG "%s: Doing ethertap_open()...", dev->name); + printk(KERN_DEBUG "%s: Doing ethertap_open()...\n", dev->name); lp->nl = netlink_kernel_create(dev->base_addr, ethertap_rx); if (lp->nl == NULL) _ From akpm@osdl.org Thu Oct 28 00:22:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 00:22:27 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S7MDMs025929 for ; Thu, 28 Oct 2004 00:22:13 -0700 Received: from localhost.localdomain (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9S7Ld907983; Thu, 28 Oct 2004 00:21:39 -0700 Message-Id: <200410280721.i9S7Ld907983@mail.osdl.org> Subject: [patch 2/9] use mmiowb in tg3.c To: davem@redhat.com Cc: jgarzik@pobox.com, netdev@oss.sgi.com, akpm@osdl.org, jbarnes@engr.sgi.com, gnb@sgi.com, jbarnes@sgi.com From: akpm@osdl.org Date: Thu, 28 Oct 2004 00:19:40 -0700 X-archive-position: 10978 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 Content-Length: 1277 Lines: 40 From: Jesse Barnes This patch originally from Greg Banks. Some parts of the tg3 driver depend on PIO writes arriving in order. This patch ensures that in two key places using the new mmiowb macro. This not only prevents bugs (the queues can be corrupted), but is much faster than ensuring ordering using PIO reads (which involve a few round trips to the target bus on some platforms). Arthur has another patch that uses mmiowb in tg3 that he posted earlier as well. Signed-off-by: Greg Banks Signed-off-by: Jesse Barnes Signed-off-by: Andrew Morton --- 25-akpm/drivers/net/tg3.c | 2 ++ 1 files changed, 2 insertions(+) diff -puN drivers/net/tg3.c~use-mmiowb-in-tg3c drivers/net/tg3.c --- 25/drivers/net/tg3.c~use-mmiowb-in-tg3c 2004-10-28 00:17:07.520660672 -0700 +++ 25-akpm/drivers/net/tg3.c 2004-10-28 00:18:16.861119320 -0700 @@ -2730,6 +2730,7 @@ next_pkt_nopost: tw32_rx_mbox(MAILBOX_RCV_JUMBO_PROD_IDX + TG3_64BIT_REG_LOW, sw_idx); } + mmiowb(); return received; } @@ -3177,6 +3178,7 @@ static int tg3_start_xmit(struct sk_buff netif_stop_queue(dev); out_unlock: + mmiowb(); spin_unlock_irqrestore(&tp->tx_lock, flags); dev->trans_start = jiffies; _ From akpm@osdl.org Thu Oct 28 00:22:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 00:22:15 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S7M9iw025916 for ; Thu, 28 Oct 2004 00:22:09 -0700 Received: from localhost.localdomain (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9S7Le907988; Thu, 28 Oct 2004 00:21:40 -0700 Message-Id: <200410280721.i9S7Le907988@mail.osdl.org> Subject: [patch 3/9] use mmiowb in tg3_poll To: davem@redhat.com Cc: jgarzik@pobox.com, netdev@oss.sgi.com, akpm@osdl.org, akepner@sgi.com From: akpm@osdl.org Date: Thu, 28 Oct 2004 00:19:41 -0700 X-archive-position: 10974 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 Content-Length: 1478 Lines: 49 From: Returning from tg3_poll() without flushing the PIO write which reenables interrupts can result in lower cpu utilization and higher throughput. So use a memory barrier, mmiowb(), instead of flushing the write with a PIO read. Signed-off-by: Arthur Kepner Signed-off-by: Andrew Morton --- 25-akpm/drivers/net/tg3.c | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletion(-) diff -puN drivers/net/tg3.c~use-mmiowb-in-tg3_poll drivers/net/tg3.c --- 25/drivers/net/tg3.c~use-mmiowb-in-tg3_poll 2004-10-28 00:17:07.705632552 -0700 +++ 25-akpm/drivers/net/tg3.c 2004-10-28 00:17:07.715631032 -0700 @@ -418,6 +418,20 @@ static void tg3_enable_ints(struct tg3 * tg3_cond_int(tp); } +/* tg3_restart_ints + * similar to tg3_enable_ints, but it can return without flushing the + * PIO write which reenables interrupts + */ +static void tg3_restart_ints(struct tg3 *tp) +{ + tw32(TG3PCI_MISC_HOST_CTRL, + (tp->misc_host_ctrl & ~MISC_HOST_CTRL_MASK_PCI_INT)); + tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x00000000); + mmiowb(); + + tg3_cond_int(tp); +} + static inline void tg3_netif_stop(struct tg3 *tp) { netif_poll_disable(tp->dev); @@ -2789,7 +2803,7 @@ static int tg3_poll(struct net_device *n if (done) { spin_lock_irqsave(&tp->lock, flags); __netif_rx_complete(netdev); - tg3_enable_ints(tp); + tg3_restart_ints(tp); spin_unlock_irqrestore(&tp->lock, flags); } _ From akpm@osdl.org Thu Oct 28 00:22:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 00:22:25 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S7MBS5025917 for ; Thu, 28 Oct 2004 00:22:11 -0700 Received: from localhost.localdomain (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9S7Lf907993; Thu, 28 Oct 2004 00:21:41 -0700 Message-Id: <200410280721.i9S7Lf907993@mail.osdl.org> Subject: [patch 4/9] X.25: Stop x25_destroy_socket timer looping To: davem@redhat.com Cc: jgarzik@pobox.com, netdev@oss.sgi.com, akpm@osdl.org, ahendry@tusc.com.au From: akpm@osdl.org Date: Thu, 28 Oct 2004 00:19:42 -0700 X-archive-position: 10976 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 Content-Length: 1004 Lines: 26 From: Andrew Hendry The sk_timer.data for the x.25 destroy_socket timer went missing at some stage, causing a timer loop where x25_destroy_socket would keep setting up timers to call itself. This patch puts the sk_timer.data back. Signed-off-by: Andrew Hendry Signed-off-by: Andrew Morton --- 25-akpm/net/x25/af_x25.c | 1 + 1 files changed, 1 insertion(+) diff -puN net/x25/af_x25.c~x25-stop-x25_destroy_socket-timer-looping net/x25/af_x25.c --- 25/net/x25/af_x25.c~x25-stop-x25_destroy_socket-timer-looping 2004-10-28 00:17:07.879606104 -0700 +++ 25-akpm/net/x25/af_x25.c 2004-10-28 00:17:07.883605496 -0700 @@ -347,6 +347,7 @@ void x25_destroy_socket(struct sock *sk) /* Defer: outstanding buffers */ sk->sk_timer.expires = jiffies + 10 * HZ; sk->sk_timer.function = x25_destroy_timer; + sk->sk_timer.data = (unsigned long)sk; add_timer(&sk->sk_timer); } else { /* drop last reference so sock_put will free */ _ From akpm@osdl.org Thu Oct 28 00:22:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 00:22:32 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S7ML3k025970 for ; Thu, 28 Oct 2004 00:22:21 -0700 Received: from localhost.localdomain (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9S7Ll908021; Thu, 28 Oct 2004 00:21:47 -0700 Message-Id: <200410280721.i9S7Ll908021@mail.osdl.org> Subject: [patch 9/9] Avoid warning on CONNTRACK_STAT_INC in destroy_conntrack() To: davem@redhat.com Cc: jgarzik@pobox.com, netdev@oss.sgi.com, akpm@osdl.org, rusty@rustcorp.com.au From: akpm@osdl.org Date: Thu, 28 Oct 2004 00:19:48 -0700 X-archive-position: 10981 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 Content-Length: 1396 Lines: 36 From: Rusty Russell ip_conntrack_put can be called in any context in theory: in particular, MASQUERADE will can call it (via ip_ct_selective_cleanup) when an interface comes up with a different address. Move the CONNTRACK_STAT_INC inside the lock: it needs preemption disabled. Signed-off-by: Rusty Russell Signed-off-by: Andrew Morton --- 25-akpm/net/ipv4/netfilter/ip_conntrack_core.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN net/ipv4/netfilter/ip_conntrack_core.c~avoid-warning-on-conntrack_stat_inc-in-destroy_conntrack net/ipv4/netfilter/ip_conntrack_core.c --- 25/net/ipv4/netfilter/ip_conntrack_core.c~avoid-warning-on-conntrack_stat_inc-in-destroy_conntrack 2004-10-28 00:17:08.778469456 -0700 +++ 25-akpm/net/ipv4/netfilter/ip_conntrack_core.c 2004-10-28 00:17:08.782468848 -0700 @@ -312,6 +312,7 @@ destroy_conntrack(struct nf_conntrack *n } kmem_cache_free(ip_conntrack_expect_cachep, ct->master); } + CONNTRACK_STAT_INC(delete); WRITE_UNLOCK(&ip_conntrack_lock); if (master) @@ -320,7 +321,6 @@ destroy_conntrack(struct nf_conntrack *n DEBUGP("destroy_conntrack: returning ct=%p to slab\n", ct); kmem_cache_free(ip_conntrack_cachep, ct); atomic_dec(&ip_conntrack_count); - CONNTRACK_STAT_INC(delete); } static void death_by_timeout(unsigned long ul_conntrack) _ From akpm@osdl.org Thu Oct 28 00:22:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 00:22:29 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S7MEN1025936 for ; Thu, 28 Oct 2004 00:22:14 -0700 Received: from localhost.localdomain (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9S7Lk908015; Thu, 28 Oct 2004 00:21:46 -0700 Message-Id: <200410280721.i9S7Lk908015@mail.osdl.org> Subject: [patch 8/9] AES: allow modular build To: davem@redhat.com Cc: jgarzik@pobox.com, netdev@oss.sgi.com, akpm@osdl.org, pluto@pld-linux.org From: akpm@osdl.org Date: Thu, 28 Oct 2004 00:19:47 -0700 X-archive-position: 10980 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 Content-Length: 569 Lines: 20 From: Signed-off-by: Andrew Morton --- 25-akpm/arch/i386/crypto/Makefile | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN arch/i386/crypto/Makefile~aes-allow-modular-build arch/i386/crypto/Makefile --- 25/arch/i386/crypto/Makefile~aes-allow-modular-build 2004-10-28 00:17:08.598496816 -0700 +++ 25-akpm/arch/i386/crypto/Makefile 2004-10-28 00:17:08.603496056 -0700 @@ -6,4 +6,4 @@ obj-$(CONFIG_CRYPTO_AES_586) += aes-i586.o -aes-i586-y := aes-i586-asm.o aes.o +aes-i586-objs := aes-i586-asm.o aes.o _ From akpm@osdl.org Thu Oct 28 00:22:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 00:22:38 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S7ME8W025931 for ; Thu, 28 Oct 2004 00:22:14 -0700 Received: from localhost.localdomain (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9S7Lb907978; Thu, 28 Oct 2004 00:21:37 -0700 Message-Id: <200410280721.i9S7Lb907978@mail.osdl.org> Subject: [patch 1/9] arcnet fixes To: davem@redhat.com Cc: jgarzik@pobox.com, netdev@oss.sgi.com, akpm@osdl.org, simlo@phys.au.dk From: akpm@osdl.org Date: Thu, 28 Oct 2004 00:19:38 -0700 X-archive-position: 10982 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 Content-Length: 43799 Lines: 1323 From: Esben Nielsen As previously reported the ArcNet driver didn't work with Preempt and SMB on. They do now. I have changed the locking system from being a global arcnet lock to being a lock per device. I used the lock in dev->hard_start_xmit = arcnet_send_packet. Furthermore I added the "CAP mode" encapsulation. As far as I see it it is the only encapsulation which actually makes ArcNet usefull over ethernet. Previously, the driver just ignored the hardware transmit status, now you can get hardware acknowledge and excessive nacks back to userspace via a raw socket. The capmode.c is nearly just a copy of arc-rawmode.c. The difference is that it inserts a ack_tx() handle into the general driver framework. Signed-off-by: Andrew Morton --- 25-akpm/drivers/net/arcnet/Kconfig | 19 + 25-akpm/drivers/net/arcnet/Makefile | 1 25-akpm/drivers/net/arcnet/arc-rawmode.c | 9 25-akpm/drivers/net/arcnet/arcnet.c | 253 +++++++++++++++++-------- 25-akpm/drivers/net/arcnet/capmode.c | 296 ++++++++++++++++++++++++++++++ 25-akpm/drivers/net/arcnet/com20020-isa.c | 1 25-akpm/drivers/net/arcnet/com20020.c | 28 +- 25-akpm/drivers/net/arcnet/rfc1051.c | 3 25-akpm/drivers/net/arcnet/rfc1201.c | 2 25-akpm/include/linux/arcdevice.h | 21 +- 25-akpm/include/linux/com20020.h | 30 +-- 25-akpm/include/linux/if_arcnet.h | 14 + 25-akpm/include/linux/if_ether.h | 1 25-akpm/include/linux/net.h | 2 14 files changed, 575 insertions(+), 105 deletions(-) diff -puN drivers/net/arcnet/arcnet.c~arcnet-fixes drivers/net/arcnet/arcnet.c --- 25/drivers/net/arcnet/arcnet.c~arcnet-fixes 2004-10-28 00:17:07.206708400 -0700 +++ 25-akpm/drivers/net/arcnet/arcnet.c 2004-10-28 00:17:07.239703384 -0700 @@ -53,7 +53,6 @@ #include #include - /* "do nothing" functions for protocol drivers */ static void null_rx(struct net_device *dev, int bufnum, struct archdr *pkthdr, int length); @@ -69,25 +68,28 @@ static int null_prepare_tx(struct net_de * arc_proto_default instead. It also must not be NULL; if you would like * to set it to NULL, set it to &arc_proto_null instead. */ -struct ArcProto *arc_proto_map[256], *arc_proto_default, *arc_bcast_proto; + struct ArcProto *arc_proto_map[256], *arc_proto_default, + *arc_bcast_proto, *arc_raw_proto; struct ArcProto arc_proto_null = { .suffix = '?', .mtu = XMTU, + .is_ip = 0, .rx = null_rx, .build_header = null_build_header, .prepare_tx = null_prepare_tx, + .continue_tx = NULL, + .ack_tx = NULL }; -static spinlock_t arcnet_lock = SPIN_LOCK_UNLOCKED; - /* Exported function prototypes */ int arcnet_debug = ARCNET_DEBUG; EXPORT_SYMBOL(arc_proto_map); EXPORT_SYMBOL(arc_proto_default); EXPORT_SYMBOL(arc_bcast_proto); +EXPORT_SYMBOL(arc_raw_proto); EXPORT_SYMBOL(arc_proto_null); EXPORT_SYMBOL(arcnet_unregister_proto); EXPORT_SYMBOL(arcnet_debug); @@ -131,7 +133,7 @@ static int __init arcnet_init(void) #endif /* initialize the protocol map */ - arc_proto_default = arc_bcast_proto = &arc_proto_null; + arc_raw_proto = arc_proto_default = arc_bcast_proto = &arc_proto_null; for (count = 0; count < 256; count++) arc_proto_map[count] = arc_proto_default; @@ -155,7 +157,8 @@ module_exit(arcnet_exit); * Dump the contents of an sk_buff */ #if ARCNET_DEBUG_MAX & D_SKB -void arcnet_dump_skb(struct net_device *dev, struct sk_buff *skb, char *desc) +void arcnet_dump_skb(struct net_device *dev, + struct sk_buff *skb, char *desc) { int i; @@ -176,18 +179,22 @@ EXPORT_SYMBOL(arcnet_dump_skb); * Dump the contents of an ARCnet buffer */ #if (ARCNET_DEBUG_MAX & (D_RX | D_TX)) -void arcnet_dump_packet(struct net_device *dev, int bufnum, char *desc) +void arcnet_dump_packet(struct net_device *dev, int bufnum, char *desc, + int take_arcnet_lock) { struct arcnet_local *lp = (struct arcnet_local *) dev->priv; int i, length; - unsigned long flags; + unsigned long flags = 0; static uint8_t buf[512]; /* hw.copy_from_card expects IRQ context so take the IRQ lock to keep it single threaded */ - spin_lock_irqsave(&arcnet_lock, flags); + if(take_arcnet_lock) + spin_lock_irqsave(&lp->lock, flags); + lp->hw.copy_from_card(dev, bufnum, 0, buf, 512); - spin_unlock_irqrestore(&arcnet_lock, flags); + if(take_arcnet_lock) + spin_unlock_irqrestore(&lp->lock, flags); /* if the offset[0] byte is nonzero, this is a 256-byte packet */ length = (buf[2] ? 256 : 512); @@ -219,6 +226,8 @@ void arcnet_unregister_proto(struct ArcP arc_proto_default = &arc_proto_null; if (arc_bcast_proto == proto) arc_bcast_proto = arc_proto_default; + if (arc_raw_proto == proto) + arc_raw_proto = arc_proto_default; for (count = 0; count < 256; count++) { if (arc_proto_map[count] == proto) @@ -261,8 +270,11 @@ static int get_arcbuf(struct net_device struct arcnet_local *lp = (struct arcnet_local *) dev->priv; int buf = -1, i; - if (!atomic_dec_and_test(&lp->buf_lock)) /* already in this function */ - BUGMSG(D_NORMAL, "get_arcbuf: overlap (%d)!\n", lp->buf_lock.counter); + if (!atomic_dec_and_test(&lp->buf_lock)) { + /* already in this function */ + BUGMSG(D_NORMAL, "get_arcbuf: overlap (%d)!\n", + lp->buf_lock.counter); + } else { /* we can continue */ if (lp->next_buf >= 5) lp->next_buf -= 5; @@ -312,7 +324,7 @@ void arcdev_setup(struct net_device *dev dev->mtu = choose_mtu(); dev->addr_len = ARCNET_ALEN; - dev->tx_queue_len = 30; + dev->tx_queue_len = 100; dev->broadcast[0] = 0x00; /* for us, broadcasts are address 0 */ dev->watchdog_timeo = TX_TIMEOUT; @@ -334,8 +346,16 @@ void arcdev_setup(struct net_device *dev struct net_device *alloc_arcdev(char *name) { - return alloc_netdev(sizeof(struct arcnet_local), - name && *name ? name : "arc%d", arcdev_setup); + struct net_device *dev; + + dev = alloc_netdev(sizeof(struct arcnet_local), + name && *name ? name : "arc%d", arcdev_setup); + if(dev) { + struct arcnet_local *lp = (struct arcnet_local *) dev->priv; + lp->lock = SPIN_LOCK_UNLOCKED; + } + + return dev; } /* @@ -351,6 +371,8 @@ static int arcnet_open(struct net_device struct arcnet_local *lp = (struct arcnet_local *) dev->priv; int count, newmtu, error; + BUGMSG(D_INIT,"opened."); + if (!try_module_get(lp->hw.owner)) return -ENODEV; @@ -377,6 +399,8 @@ static int arcnet_open(struct net_device if (newmtu < dev->mtu) dev->mtu = newmtu; + BUGMSG(D_INIT, "arcnet_open: mtu: %d.\n", dev->mtu); + /* autodetect the encapsulation for each host. */ memset(lp->default_proto, 0, sizeof(lp->default_proto)); @@ -390,6 +414,7 @@ static int arcnet_open(struct net_device /* initialize buffers */ atomic_set(&lp->buf_lock, 1); + lp->next_buf = lp->first_free_buf = 0; release_arcbuf(dev, 0); release_arcbuf(dev, 1); @@ -411,17 +436,24 @@ static int arcnet_open(struct net_device BUGMSG(D_NORMAL, "WARNING! Station address FF may confuse " "DOS networking programs!\n"); - if (ASTATUS() & RESETflag) + BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__); + if (ASTATUS() & RESETflag) { + BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__); ACOMMAND(CFLAGScmd | RESETclear); + } + + BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__); /* make sure we're ready to receive IRQ's. */ AINTMASK(0); udelay(1); /* give it time to set the mask before * we reset it again. (may not even be * necessary) */ + BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__); lp->intmask = NORXflag | RECONflag; AINTMASK(lp->intmask); + BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__); netif_start_queue(dev); @@ -467,32 +499,41 @@ static int arcnet_header(struct sk_buff daddr ? *(uint8_t *) daddr : -1, type, type, len); - if (len != skb->len) + if (skb->len!=0 && len != skb->len) BUGMSG(D_NORMAL, "arcnet_header: Yikes! skb->len(%d) != len(%d)!\n", skb->len, len); - /* - * if the dest addr isn't provided, we can't choose an encapsulation! - * Store the packet type (eg. ETH_P_IP) for now, and we'll push on a - * real header when we do rebuild_header. - */ - if (!daddr) { + + /* Type is host order - ? */ + if(type == ETH_P_ARCNET) { + proto = arc_raw_proto; + BUGMSG(D_DEBUG, "arc_raw_proto used. proto='%c'\n",proto->suffix); + _daddr = daddr ? *(uint8_t *) daddr : 0; + } + else if (!daddr) { + /* + * if the dest addr isn't provided, we can't choose an encapsulation! + * Store the packet type (eg. ETH_P_IP) for now, and we'll push on a + * real header when we do rebuild_header. + */ *(uint16_t *) skb_push(skb, 2) = type; if (skb->nh.raw - skb->mac.raw != 2) BUGMSG(D_NORMAL, "arcnet_header: Yikes! diff (%d) is not 2!\n", (int)(skb->nh.raw - skb->mac.raw)); return -2; /* return error -- can't transmit yet! */ } - /* otherwise, we can just add the header as usual. */ - _daddr = *(uint8_t *) daddr; - proto_num = lp->default_proto[_daddr]; - proto = arc_proto_map[proto_num]; - BUGMSG(D_DURING, "building header for %02Xh using protocol '%c'\n", - proto_num, proto->suffix); - if (proto == &arc_proto_null && arc_bcast_proto != proto) { - BUGMSG(D_DURING, "actually, let's use '%c' instead.\n", - arc_bcast_proto->suffix); - proto = arc_bcast_proto; + else { + /* otherwise, we can just add the header as usual. */ + _daddr = *(uint8_t *) daddr; + proto_num = lp->default_proto[_daddr]; + proto = arc_proto_map[proto_num]; + BUGMSG(D_DURING, "building header for %02Xh using protocol '%c'\n", + proto_num, proto->suffix); + if (proto == &arc_proto_null && arc_bcast_proto != proto) { + BUGMSG(D_DURING, "actually, let's use '%c' instead.\n", + arc_bcast_proto->suffix); + proto = arc_bcast_proto; + } } return proto->build_header(skb, dev, type, _daddr); } @@ -519,6 +560,7 @@ static int arcnet_rebuild_header(struct return 0; } type = *(uint16_t *) skb_pull(skb, 2); + BUGMSG(D_DURING, "rebuild header for protocol %Xh\n", type); if (type == ETH_P_IP) { #ifdef CONFIG_INET @@ -555,10 +597,12 @@ static int arcnet_send_packet(struct sk_ struct arc_rfc1201 *soft; struct ArcProto *proto; int txbuf; + unsigned long flags; + int freeskb = 0; BUGMSG(D_DURING, - "transmit requested (status=%Xh, txbufs=%d/%d, len=%d)\n", - ASTATUS(), lp->cur_tx, lp->next_tx, skb->len); + "transmit requested (status=%Xh, txbufs=%d/%d, len=%d, protocol %x)\n", + ASTATUS(), lp->cur_tx, lp->next_tx, skb->len,skb->protocol); pkt = (struct archdr *) skb->data; soft = &pkt->soft.rfc1201; @@ -578,38 +622,49 @@ static int arcnet_send_packet(struct sk_ /* We're busy transmitting a packet... */ netif_stop_queue(dev); + spin_lock_irqsave(&lp->lock, flags); AINTMASK(0); txbuf = get_arcbuf(dev); if (txbuf != -1) { - if (proto->prepare_tx(dev, pkt, skb->len, txbuf)) { - /* done right away */ + if (proto->prepare_tx(dev, pkt, skb->len, txbuf) && + !proto->ack_tx) { + /* done right away and we don't want to acknowledge + the package later - forget about it now */ lp->stats.tx_bytes += skb->len; - dev_kfree_skb(skb); + freeskb = 1; } else { /* do it the 'split' way */ lp->outgoing.proto = proto; lp->outgoing.skb = skb; lp->outgoing.pkt = pkt; - if (!proto->continue_tx) - BUGMSG(D_NORMAL, "bug! prep_tx==0, but no continue_tx!\n"); - else if (proto->continue_tx(dev, txbuf)) { - BUGMSG(D_NORMAL, - "bug! continue_tx finished the first time! " - "(proto='%c')\n", proto->suffix); + if (proto->continue_tx && + proto->continue_tx(dev, txbuf)) { + BUGMSG(D_NORMAL, + "bug! continue_tx finished the first time! " + "(proto='%c')\n", proto->suffix); } } lp->next_tx = txbuf; - } else - dev_kfree_skb(skb); + } else { + freeskb = 1; + } + BUGMSG(D_DEBUG, "%s: %d: %s, status: %x\n",__FILE__,__LINE__,__FUNCTION__,ASTATUS()); /* make sure we didn't ignore a TX IRQ while we were in here */ AINTMASK(0); - lp->intmask |= TXFREEflag; + + BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__); + lp->intmask |= TXFREEflag|EXCNAKflag; AINTMASK(lp->intmask); + BUGMSG(D_DEBUG, "%s: %d: %s, status: %x\n",__FILE__,__LINE__,__FUNCTION__,ASTATUS()); + spin_unlock_irqrestore(&lp->lock, flags); + if (freeskb) { + dev_kfree_skb(skb); + } return 0; /* no need to try again */ } @@ -628,7 +683,7 @@ static int go_tx(struct net_device *dev) if (lp->cur_tx != -1 || lp->next_tx == -1) return 0; - BUGLVL(D_TX) arcnet_dump_packet(dev, lp->next_tx, "go_tx"); + BUGLVL(D_TX) arcnet_dump_packet(dev, lp->next_tx, "go_tx", 0); lp->cur_tx = lp->next_tx; lp->next_tx = -1; @@ -640,7 +695,8 @@ static int go_tx(struct net_device *dev) lp->stats.tx_packets++; lp->lasttrans_dest = lp->lastload_dest; lp->lastload_dest = 0; - lp->intmask |= TXFREEflag; + lp->excnak_pending = 0; + lp->intmask |= TXFREEflag|EXCNAKflag; return 1; } @@ -654,7 +710,7 @@ static void arcnet_timeout(struct net_de int status = ASTATUS(); char *msg; - spin_lock_irqsave(&arcnet_lock, flags); + spin_lock_irqsave(&lp->lock, flags); if (status & TXFREEflag) { /* transmit _DID_ finish */ msg = " - missed IRQ?"; } else { @@ -665,12 +721,12 @@ static void arcnet_timeout(struct net_de } lp->stats.tx_errors++; - /* make sure we didn't miss a TX IRQ */ + /* make sure we didn't miss a TX or a EXC NAK IRQ */ AINTMASK(0); - lp->intmask |= TXFREEflag; + lp->intmask |= TXFREEflag|EXCNAKflag; AINTMASK(lp->intmask); - spin_unlock_irqrestore(&arcnet_lock, flags); + spin_unlock_irqrestore(&lp->lock, flags); if (jiffies - lp->last_timeout > 10*HZ) { BUGMSG(D_EXTRA, "tx timed out%s (status=%Xh, intmask=%Xh, dest=%02Xh)\n", @@ -692,18 +748,19 @@ irqreturn_t arcnet_interrupt(int irq, vo { struct net_device *dev = dev_id; struct arcnet_local *lp; - int recbuf, status, didsomething, boguscount; + int recbuf, status, diagstatus, didsomething, boguscount; + int retval = IRQ_NONE; BUGMSG(D_DURING, "\n"); BUGMSG(D_DURING, "in arcnet_interrupt\n"); - - spin_lock(&arcnet_lock); lp = (struct arcnet_local *) dev->priv; if (!lp) BUG(); + spin_lock(&lp->lock); + /* * RESET flag was enabled - if device is not running, we must clear it right * away (but nothing else). @@ -712,7 +769,7 @@ irqreturn_t arcnet_interrupt(int irq, vo if (ASTATUS() & RESETflag) ACOMMAND(CFLAGScmd | RESETclear); AINTMASK(0); - spin_unlock(&arcnet_lock); + spin_unlock(&lp->lock); return IRQ_HANDLED; } @@ -722,6 +779,10 @@ irqreturn_t arcnet_interrupt(int irq, vo boguscount = 5; do { status = ASTATUS(); + diagstatus = (status >> 8) & 0xFF; + + BUGMSG(D_DEBUG, "%s: %d: %s: status=%x\n", + __FILE__,__LINE__,__FUNCTION__,status); didsomething = 0; /* @@ -761,24 +822,55 @@ irqreturn_t arcnet_interrupt(int irq, vo } didsomething++; } + + if((diagstatus & EXCNAKflag)) { + BUGMSG(D_DURING, "EXCNAK IRQ (diagstat=%Xh)\n", + diagstatus); + + ACOMMAND(NOTXcmd); /* disable transmit */ + lp->excnak_pending = 1; + + ACOMMAND(EXCNAKclear); + lp->intmask &= ~(EXCNAKflag); + didsomething++; + } + + /* a transmit finished, and we're interested in it. */ if ((status & lp->intmask & TXFREEflag) || lp->timed_out) { - lp->intmask &= ~TXFREEflag; + lp->intmask &= ~(TXFREEflag|EXCNAKflag); BUGMSG(D_DURING, "TX IRQ (stat=%Xh)\n", status); - if (lp->cur_tx != -1 && !(status & TXACKflag) && !lp->timed_out) { - if (lp->lasttrans_dest != 0) { - BUGMSG(D_EXTRA, "transmit was not acknowledged! " - "(status=%Xh, dest=%02Xh)\n", - status, lp->lasttrans_dest); - lp->stats.tx_errors++; - lp->stats.tx_carrier_errors++; - } else { - BUGMSG(D_DURING, - "broadcast was not acknowledged; that's normal " - "(status=%Xh, dest=%02Xh)\n", - status, lp->lasttrans_dest); + if (lp->cur_tx != -1 && !lp->timed_out) { + if(!(status & TXACKflag)) { + if (lp->lasttrans_dest != 0) { + BUGMSG(D_EXTRA, + "transmit was not acknowledged! " + "(status=%Xh, dest=%02Xh)\n", + status, lp->lasttrans_dest); + lp->stats.tx_errors++; + lp->stats.tx_carrier_errors++; + } else { + BUGMSG(D_DURING, + "broadcast was not acknowledged; that's normal " + "(status=%Xh, dest=%02Xh)\n", + status, lp->lasttrans_dest); + } + } + + if (lp->outgoing.proto && + lp->outgoing.proto->ack_tx) { + int ackstatus; + if(status & TXACKflag) + ackstatus=2; + else if(lp->excnak_pending) + ackstatus=1; + else + ackstatus=0; + + lp->outgoing.proto + ->ack_tx(dev, ackstatus); } } if (lp->cur_tx != -1) @@ -798,8 +890,11 @@ irqreturn_t arcnet_interrupt(int irq, vo if (lp->outgoing.proto->continue_tx(dev, txbuf)) { /* that was the last segment */ lp->stats.tx_bytes += lp->outgoing.skb->len; - dev_kfree_skb_irq(lp->outgoing.skb); - lp->outgoing.proto = NULL; + if(!lp->outgoing.proto->ack_tx) + { + dev_kfree_skb_irq(lp->outgoing.skb); + lp->outgoing.proto = NULL; + } } lp->next_tx = txbuf; } @@ -810,7 +905,7 @@ irqreturn_t arcnet_interrupt(int irq, vo } /* now process the received packet, if any */ if (recbuf != -1) { - BUGLVL(D_RX) arcnet_dump_packet(dev, recbuf, "rx irq"); + BUGLVL(D_RX) arcnet_dump_packet(dev, recbuf, "rx irq", 0); arcnet_rx(dev, recbuf); release_arcbuf(dev, recbuf); @@ -868,6 +963,10 @@ irqreturn_t arcnet_interrupt(int irq, vo BUGMSG(D_DURING, "not recon: clearing counters anyway.\n"); } + + if(didsomething) { + retval |= IRQ_HANDLED; + } } while (--boguscount && didsomething); @@ -880,8 +979,8 @@ irqreturn_t arcnet_interrupt(int irq, vo udelay(1); AINTMASK(lp->intmask); - spin_unlock(&arcnet_lock); - return IRQ_RETVAL(didsomething); + spin_unlock(&lp->lock); + return retval; } @@ -908,7 +1007,7 @@ void arcnet_rx(struct net_device *dev, i } /* get the full header, if possible */ - if (sizeof(pkt.soft) < length) + if (sizeof(pkt.soft) <= length) lp->hw.copy_from_card(dev, bufnum, ofs, soft, sizeof(pkt.soft)); else { memset(&pkt.soft, 0, sizeof(pkt.soft)); @@ -923,7 +1022,7 @@ void arcnet_rx(struct net_device *dev, i lp->stats.rx_bytes += length + ARC_HDR_SIZE; /* call the right receiver for the protocol */ - if (arc_proto_map[soft->proto] != &arc_proto_null) { + if (arc_proto_map[soft->proto]->is_ip) { BUGLVL(D_PROTO) { struct ArcProto *oldp = arc_proto_map[lp->default_proto[pkt.hard.source]], diff -puN drivers/net/arcnet/arc-rawmode.c~arcnet-fixes drivers/net/arcnet/arc-rawmode.c --- 25/drivers/net/arcnet/arc-rawmode.c~arcnet-fixes 2004-10-28 00:17:07.207708248 -0700 +++ 25-akpm/drivers/net/arcnet/arc-rawmode.c 2004-10-28 00:17:07.239703384 -0700 @@ -42,7 +42,6 @@ static int build_header(struct sk_buff * static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length, int bufnum); - struct ArcProto rawmode_proto = { .suffix = 'r', @@ -50,6 +49,8 @@ struct ArcProto rawmode_proto = .rx = rx, .build_header = build_header, .prepare_tx = prepare_tx, + .continue_tx = NULL, + .ack_tx = NULL }; @@ -121,7 +122,8 @@ static void rx(struct net_device *dev, i BUGLVL(D_SKB) arcnet_dump_skb(dev, skb, "rx"); - skb->protocol = 0; + skb->protocol = __constant_htons(ETH_P_ARCNET); +; netif_rx(skb); dev->last_rx = jiffies; } @@ -190,6 +192,9 @@ static int prepare_tx(struct net_device } else hard->offset[0] = ofs = 256 - length; + BUGMSG(D_DURING, "prepare_tx: length=%d ofs=%d\n", + length,ofs); + lp->hw.copy_to_card(dev, bufnum, 0, hard, ARC_HDR_SIZE); lp->hw.copy_to_card(dev, bufnum, ofs, &pkt->soft, length); diff -puN /dev/null drivers/net/arcnet/capmode.c --- /dev/null 2003-09-15 06:40:47.000000000 -0700 +++ 25-akpm/drivers/net/arcnet/capmode.c 2004-10-28 00:17:07.241703080 -0700 @@ -0,0 +1,296 @@ +/* + * Linux ARCnet driver - "cap mode" packet encapsulation. + * It adds sequence numbers to packets for communicating between a user space + * application and the driver. After a transmit it sends a packet with protocol + * byte 0 back up to the userspace containing the sequence number of the packet + * plus the transmit-status on the ArcNet. + * + * Written 2002-4 by Esben Nielsen, Vestas Wind Systems A/S + * Derived from arc-rawmode.c by Avery Pennarun. + * arc-rawmode was in turned based on skeleton.c, see below. + * + * ********************** + * + * The original copyright of skeleton.c was as follows: + * + * skeleton.c Written 1993 by Donald Becker. + * Copyright 1993 United States Government as represented by the + * Director, National Security Agency. This software may only be used + * and distributed according to the terms of the GNU General Public License as + * modified by SRC, incorporated herein by reference. + * + * ********************** + * + * For more details, see drivers/net/arcnet.c + * + * ********************** + */ + +#include +#include +#include +#include +#include +#include +#include + +#define VERSION "arcnet: cap mode (`c') encapsulation support loaded.\n" + + +static void rx(struct net_device *dev, int bufnum, + struct archdr *pkthdr, int length); +static int build_header(struct sk_buff *skb, + struct net_device *dev, + unsigned short type, + uint8_t daddr); +static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length, + int bufnum); +static int ack_tx(struct net_device *dev, int acked); + + +struct ArcProto capmode_proto = +{ + 'r', + XMTU, + 0, + rx, + build_header, + prepare_tx, + NULL, + ack_tx +}; + + +void arcnet_cap_init(void) +{ + int count; + + for (count = 1; count <= 8; count++) + if (arc_proto_map[count] == arc_proto_default) + arc_proto_map[count] = &capmode_proto; + + /* for cap mode, we only set the bcast proto if there's no better one */ + if (arc_bcast_proto == arc_proto_default) + arc_bcast_proto = &capmode_proto; + + arc_proto_default = &capmode_proto; + arc_raw_proto = &capmode_proto; +} + + +#ifdef MODULE + +int __init init_module(void) +{ + printk(VERSION); + arcnet_cap_init(); + return 0; +} + +void cleanup_module(void) +{ + arcnet_unregister_proto(&capmode_proto); +} + +MODULE_LICENSE("GPL"); +#endif /* MODULE */ + + + +/* packet receiver */ +static void rx(struct net_device *dev, int bufnum, + struct archdr *pkthdr, int length) +{ + struct arcnet_local *lp = (struct arcnet_local *) dev->priv; + struct sk_buff *skb; + struct archdr *pkt = pkthdr; + char *pktbuf, *pkthdrbuf; + int ofs; + + BUGMSG(D_DURING, "it's a raw(cap) packet (length=%d)\n", length); + + if (length >= MinTU) + ofs = 512 - length; + else + ofs = 256 - length; + + skb = alloc_skb(length + ARC_HDR_SIZE + sizeof(int), GFP_ATOMIC); + if (skb == NULL) { + BUGMSG(D_NORMAL, "Memory squeeze, dropping packet.\n"); + lp->stats.rx_dropped++; + return; + } + skb_put(skb, length + ARC_HDR_SIZE + sizeof(int)); + skb->dev = dev; + + pkt = (struct archdr *) skb->data; + + skb->mac.raw = skb->data; + skb_pull(skb, ARC_HDR_SIZE); + + /* up to sizeof(pkt->soft) has already been copied from the card */ + /* squeeze in an int for the cap encapsulation */ + + /* use these variables to be sure we count in bytes, not in + sizeof(struct archdr) */ + pktbuf=(char*)pkt; + pkthdrbuf=(char*)pkthdr; + memcpy(pktbuf, pkthdrbuf, ARC_HDR_SIZE+sizeof(pkt->soft.cap.proto)); + memcpy(pktbuf+ARC_HDR_SIZE+sizeof(pkt->soft.cap.proto)+sizeof(int), + pkthdrbuf+ARC_HDR_SIZE+sizeof(pkt->soft.cap.proto), + sizeof(struct archdr)-ARC_HDR_SIZE-sizeof(pkt->soft.cap.proto)); + + if (length > sizeof(pkt->soft)) + lp->hw.copy_from_card(dev, bufnum, ofs + sizeof(pkt->soft), + pkt->soft.raw + sizeof(pkt->soft) + + sizeof(int), + length - sizeof(pkt->soft)); + + BUGLVL(D_SKB) arcnet_dump_skb(dev, skb, "rx"); + + skb->protocol = __constant_htons(ETH_P_ARCNET); +; + netif_rx(skb); + dev->last_rx = jiffies; +} + + +/* + * Create the ARCnet hard/soft headers for cap mode. + * There aren't any soft headers in cap mode - not even the protocol id. + */ +static int build_header(struct sk_buff *skb, + struct net_device *dev, + unsigned short type, + uint8_t daddr) +{ + int hdr_size = ARC_HDR_SIZE; + struct archdr *pkt = (struct archdr *) skb_push(skb, hdr_size); + + BUGMSG(D_PROTO, "Preparing header for cap packet %x.\n", + *((int*)&pkt->soft.cap.cookie[0])); + /* + * Set the source hardware address. + * + * This is pretty pointless for most purposes, but it can help in + * debugging. ARCnet does not allow us to change the source address in + * the actual packet sent) + */ + pkt->hard.source = *dev->dev_addr; + + /* see linux/net/ethernet/eth.c to see where I got the following */ + + if (dev->flags & (IFF_LOOPBACK | IFF_NOARP)) { + /* + * FIXME: fill in the last byte of the dest ipaddr here to better + * comply with RFC1051 in "noarp" mode. + */ + pkt->hard.dest = 0; + return hdr_size; + } + /* otherwise, just fill it in and go! */ + pkt->hard.dest = daddr; + + return hdr_size; /* success */ +} + + +static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length, + int bufnum) +{ + struct arcnet_local *lp = (struct arcnet_local *) dev->priv; + struct arc_hardware *hard = &pkt->hard; + int ofs; + + + /* hard header is not included in packet length */ + length -= ARC_HDR_SIZE; + /* And neither is the cookie field */ + length -= sizeof(int); + + BUGMSG(D_DURING, "prepare_tx: txbufs=%d/%d/%d\n", + lp->next_tx, lp->cur_tx, bufnum); + + BUGMSG(D_PROTO, "Sending for cap packet %x.\n", + *((int*)&pkt->soft.cap.cookie[0])); + + if (length > XMTU) { + /* should never happen! other people already check for this. */ + BUGMSG(D_NORMAL, "Bug! prepare_tx with size %d (> %d)\n", + length, XMTU); + length = XMTU; + } + if (length > MinTU) { + hard->offset[0] = 0; + hard->offset[1] = ofs = 512 - length; + } else if (length > MTU) { + hard->offset[0] = 0; + hard->offset[1] = ofs = 512 - length - 3; + } else + hard->offset[0] = ofs = 256 - length; + + BUGMSG(D_DURING, "prepare_tx: length=%d ofs=%d\n", + length,ofs); + + // Copy the arcnet-header + the protocol byte down: + lp->hw.copy_to_card(dev, bufnum, 0, hard, ARC_HDR_SIZE); + lp->hw.copy_to_card(dev, bufnum, ofs, &pkt->soft.cap.proto, + sizeof(pkt->soft.cap.proto)); + + // Skip the extra integer we have written into it as a cookie + // but write the rest of the message: + lp->hw.copy_to_card(dev, bufnum, ofs+1, + ((unsigned char*)&pkt->soft.cap.mes),length-1); + + lp->lastload_dest = hard->dest; + + return 1; /* done */ +} + + +static int ack_tx(struct net_device *dev, int acked) +{ + struct arcnet_local *lp = (struct arcnet_local *) dev->priv; + struct sk_buff *ackskb; + struct archdr *ackpkt; + int length=sizeof(struct arc_cap); + + BUGMSG(D_DURING, "capmode: ack_tx: protocol: %x: result: %d\n", + lp->outgoing.skb->protocol, acked); + + BUGLVL(D_SKB) arcnet_dump_skb(dev, lp->outgoing.skb, "ack_tx"); + + /* Now alloc a skb to send back up through the layers: */ + ackskb = alloc_skb(length + ARC_HDR_SIZE , GFP_ATOMIC); + if (ackskb == NULL) { + BUGMSG(D_NORMAL, "Memory squeeze, can't acknowledge.\n"); + goto free_outskb; + } + + skb_put(ackskb, length + ARC_HDR_SIZE ); + ackskb->dev = dev; + + ackpkt = (struct archdr *) ackskb->data; + + ackskb->mac.raw = ackskb->data; + /* skb_pull(ackskb, ARC_HDR_SIZE); */ + + + memcpy(ackpkt, lp->outgoing.skb->data, ARC_HDR_SIZE+sizeof(struct arc_cap)); + ackpkt->soft.cap.proto=0; /* using protocol 0 for acknowledge */ + ackpkt->soft.cap.mes.ack=acked; + + BUGMSG(D_PROTO, "Ackknowledge for cap packet %x.\n", + *((int*)&ackpkt->soft.cap.cookie[0])); + + ackskb->protocol = __constant_htons(ETH_P_ARCNET); + + BUGLVL(D_SKB) arcnet_dump_skb(dev, ackskb, "ack_tx_recv"); + netif_rx(ackskb); + + free_outskb: + dev_kfree_skb_irq(lp->outgoing.skb); + lp->outgoing.proto = NULL; /* We are always finished when in this protocol */ + + return 0; +} diff -puN drivers/net/arcnet/com20020.c~arcnet-fixes drivers/net/arcnet/com20020.c --- 25/drivers/net/arcnet/com20020.c~arcnet-fixes 2004-10-28 00:17:07.210707792 -0700 +++ 25-akpm/drivers/net/arcnet/com20020.c 2004-10-28 00:17:07.242702928 -0700 @@ -117,7 +117,7 @@ int com20020_check(struct net_device *de lp->config = 0x21 | (lp->timeout << 3) | (lp->backplane << 2); /* set node ID to 0x42 (but transmitter is disabled, so it's okay) */ SETCONF; - outb(0x42, ioaddr + 7); + outb(0x42, ioaddr + BUS_ALIGN*7); status = ASTATUS(); @@ -129,7 +129,7 @@ int com20020_check(struct net_device *de /* Enable TX */ outb(0x39, _CONFIG); - outb(inb(ioaddr + 8), ioaddr + 7); + outb(inb(ioaddr + BUS_ALIGN*8), ioaddr + BUS_ALIGN*7); ACOMMAND(CFLAGScmd | RESETclear | CONFIGclear); @@ -173,7 +173,7 @@ int com20020_found(struct net_device *de dev->set_multicast_list = com20020_set_mc_list; if (!dev->dev_addr[0]) - dev->dev_addr[0] = inb(ioaddr + 8); /* FIXME: do this some other way! */ + dev->dev_addr[0] = inb(ioaddr + BUS_ALIGN*8); /* FIXME: do this some other way! */ SET_SUBADR(SUB_SETUP1); outb(lp->setup, _XREG); @@ -188,7 +188,6 @@ int com20020_found(struct net_device *de outb(0x18, _COMMAND); } - lp->config = 0x20 | (lp->timeout << 3) | (lp->backplane << 2) | 1; /* Default 0x38 + register: Node ID */ SETCONF; @@ -235,15 +234,19 @@ int com20020_found(struct net_device *de static int com20020_reset(struct net_device *dev, int really_reset) { struct arcnet_local *lp = (struct arcnet_local *) dev->priv; - short ioaddr = dev->base_addr; + u_int ioaddr = dev->base_addr; u_char inbyte; + BUGMSG(D_DEBUG, "%s: %d: %s: dev: %p, lp: %p, dev->name: %s\n", + __FILE__,__LINE__,__FUNCTION__,dev,lp,dev->name); BUGMSG(D_INIT, "Resetting %s (status=%02Xh)\n", dev->name, ASTATUS()); + BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__); lp->config = TXENcfg | (lp->timeout << 3) | (lp->backplane << 2); /* power-up defaults */ SETCONF; + BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__); if (really_reset) { /* reset the card */ @@ -251,17 +254,22 @@ static int com20020_reset(struct net_dev mdelay(RESETtime * 2); /* COM20020 seems to be slower sometimes */ } /* clear flags & end reset */ + BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__); ACOMMAND(CFLAGScmd | RESETclear | CONFIGclear); /* verify that the ARCnet signature byte is present */ + BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__); com20020_copy_from_card(dev, 0, 0, &inbyte, 1); + BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__); if (inbyte != TESTvalue) { + BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__); BUGMSG(D_NORMAL, "reset failed: TESTvalue not present.\n"); return 1; } /* enable extended (512-byte) packets */ ACOMMAND(CONFIGcmd | EXTconf); + BUGMSG(D_DEBUG, "%s: %d: %s\n",__FILE__,__LINE__,__FUNCTION__); /* done! return success. */ return 0; @@ -270,22 +278,24 @@ static int com20020_reset(struct net_dev static void com20020_setmask(struct net_device *dev, int mask) { - short ioaddr = dev->base_addr; + u_int ioaddr = dev->base_addr; + BUGMSG(D_DURING, "Setting mask to %x at %x\n",mask,ioaddr); AINTMASK(mask); } static void com20020_command(struct net_device *dev, int cmd) { - short ioaddr = dev->base_addr; + u_int ioaddr = dev->base_addr; ACOMMAND(cmd); } static int com20020_status(struct net_device *dev) { - short ioaddr = dev->base_addr; - return ASTATUS(); + u_int ioaddr = dev->base_addr; + + return ASTATUS() + (ADIAGSTATUS()<<8); } static void com20020_close(struct net_device *dev) diff -puN drivers/net/arcnet/com20020-isa.c~arcnet-fixes drivers/net/arcnet/com20020-isa.c --- 25/drivers/net/arcnet/com20020-isa.c~arcnet-fixes 2004-10-28 00:17:07.212707488 -0700 +++ 25-akpm/drivers/net/arcnet/com20020-isa.c 2004-10-28 00:17:07.242702928 -0700 @@ -41,7 +41,6 @@ #include - #define VERSION "arcnet: COM20020 ISA support (by David Woodhouse et al.)\n" diff -puN drivers/net/arcnet/Kconfig~arcnet-fixes drivers/net/arcnet/Kconfig --- 25/drivers/net/arcnet/Kconfig~arcnet-fixes 2004-10-28 00:17:07.214707184 -0700 +++ 25-akpm/drivers/net/arcnet/Kconfig 2004-10-28 00:17:07.243702776 -0700 @@ -59,6 +59,25 @@ config ARCNET_RAW to work unless talking to a copy of the same Linux arcnet driver, but perhaps marginally faster in that case. +config ARCNET_CAP + tristate "Enable CAP mode packet interface" + depends on ARCNET + help + ARCnet "cap mode" packet encapsulation. Used to get the hardware + acknowledge back to userspace. After the initial protocol byte every + packet is stuffed with an extra 4 byte "cookie" which doesn't + actually appear on the network. After transmit the driver will send + back a packet with protocol byte 0 containing the status of the + transmition: + 0=no hardware acknowledge + 1=excessive nak + 2=transmition accepted by the reciever hardware + + Received packets are also stuffed with the extra 4 bytes but it will + be random data. + + Cap only listens to protocol 1-8. + config ARCNET_COM90xx tristate "ARCnet COM90xx (normal) chipset driver" depends on ARCNET diff -puN drivers/net/arcnet/Makefile~arcnet-fixes drivers/net/arcnet/Makefile --- 25/drivers/net/arcnet/Makefile~arcnet-fixes 2004-10-28 00:17:07.216706880 -0700 +++ 25-akpm/drivers/net/arcnet/Makefile 2004-10-28 00:17:07.243702776 -0700 @@ -5,6 +5,7 @@ obj-$(CONFIG_ARCNET) += arcnet.o obj-$(CONFIG_ARCNET_1201) += rfc1201.o obj-$(CONFIG_ARCNET_1051) += rfc1051.o obj-$(CONFIG_ARCNET_RAW) += arc-rawmode.o +obj-$(CONFIG_ARCNET_CAP) += capmode.o obj-$(CONFIG_ARCNET_COM90xx) += com90xx.o obj-$(CONFIG_ARCNET_COM90xxIO) += com90io.o obj-$(CONFIG_ARCNET_RIM_I) += arc-rimi.o diff -puN drivers/net/arcnet/rfc1051.c~arcnet-fixes drivers/net/arcnet/rfc1051.c --- 25/drivers/net/arcnet/rfc1051.c~arcnet-fixes 2004-10-28 00:17:07.218706576 -0700 +++ 25-akpm/drivers/net/arcnet/rfc1051.c 2004-10-28 00:17:07.243702776 -0700 @@ -47,9 +47,12 @@ struct ArcProto rfc1051_proto = { .suffix = 's', .mtu = XMTU - RFC1051_HDR_SIZE, + .is_ip = 1, .rx = rx, .build_header = build_header, .prepare_tx = prepare_tx, + .continue_tx = NULL, + .ack_tx = NULL }; diff -puN drivers/net/arcnet/rfc1201.c~arcnet-fixes drivers/net/arcnet/rfc1201.c --- 25/drivers/net/arcnet/rfc1201.c~arcnet-fixes 2004-10-28 00:17:07.220706272 -0700 +++ 25-akpm/drivers/net/arcnet/rfc1201.c 2004-10-28 00:17:07.244702624 -0700 @@ -47,10 +47,12 @@ struct ArcProto rfc1201_proto = { .suffix = 'a', .mtu = 1500, /* could be more, but some receivers can't handle it... */ + .is_ip = 1, /* This is for sending IP and ARP packages */ .rx = rx, .build_header = build_header, .prepare_tx = prepare_tx, .continue_tx = continue_tx, + .ack_tx = NULL }; diff -puN include/linux/arcdevice.h~arcnet-fixes include/linux/arcdevice.h --- 25/include/linux/arcdevice.h~arcnet-fixes 2004-10-28 00:17:07.222705968 -0700 +++ 25-akpm/include/linux/arcdevice.h 2004-10-28 00:17:07.245702472 -0700 @@ -25,7 +25,6 @@ #define bool int #endif - /* * RECON_THRESHOLD is the maximum number of RECON messages to receive * within one minute before printing a "cabling problem" warning. The @@ -74,6 +73,7 @@ #define D_SKB 1024 /* show skb's */ #define D_SKB_SIZE 2048 /* show skb sizes */ #define D_TIMING 4096 /* show time needed to copy buffers to card */ +#define D_DEBUG 8192 /* Very detailed debug line for line */ #ifndef ARCNET_DEBUG_MAX #define ARCNET_DEBUG_MAX (127) /* change to ~0 if you want detailed debugging */ @@ -135,6 +135,7 @@ extern int arcnet_debug; #define TXACKflag 0x02 /* transmitted msg. ackd */ #define RECONflag 0x04 /* network reconfigured */ #define TESTflag 0x08 /* test flag */ +#define EXCNAKflag 0x08 /* excesive nak flag */ #define RESETflag 0x10 /* power-on-reset */ #define RES1flag 0x20 /* reserved - usually set by jumper */ #define RES2flag 0x40 /* reserved - usually set by jumper */ @@ -162,6 +163,8 @@ extern int arcnet_debug; #define RESETclear 0x08 /* power-on-reset */ #define CONFIGclear 0x10 /* system reconfigured */ +#define EXCNAKclear 0x0E /* Clear and acknowledge the excive nak bit */ + /* flags for "load test flags" command */ #define TESTload 0x08 /* test flag (diagnostic) */ @@ -187,6 +190,7 @@ extern int arcnet_debug; struct ArcProto { char suffix; /* a for RFC1201, e for ether-encap, etc. */ int mtu; /* largest possible packet */ + int is_ip; /* This is a ip plugin - not a raw thing */ void (*rx) (struct net_device * dev, int bufnum, struct archdr * pkthdr, int length); @@ -197,9 +201,11 @@ struct ArcProto { int (*prepare_tx) (struct net_device * dev, struct archdr * pkt, int length, int bufnum); int (*continue_tx) (struct net_device * dev, int bufnum); + int (*ack_tx) (struct net_device * dev, int acked); }; -extern struct ArcProto *arc_proto_map[256], *arc_proto_default, *arc_bcast_proto; +extern struct ArcProto *arc_proto_map[256], *arc_proto_default, + *arc_bcast_proto, *arc_raw_proto; extern struct ArcProto arc_proto_null; @@ -251,6 +257,10 @@ struct arcnet_local { char *card_name; /* card ident string */ int card_flags; /* special card features */ + + /* On preemtive and SMB a lock is needed */ + spinlock_t lock; + /* * Buffer management: an ARCnet card has 4 x 512-byte buffers, each of * which can be used for either sending or receiving. The new dynamic @@ -279,6 +289,8 @@ struct arcnet_local { int num_recons; /* number of RECONs between first and last. */ bool network_down; /* do we think the network is down? */ + bool excnak_pending; /* We just got an excesive nak interrupt */ + struct { uint16_t sequence; /* sequence number (incs with each packet) */ uint16_t aborted_seq; @@ -323,9 +335,10 @@ void arcnet_dump_skb(struct net_device * #endif #if (ARCNET_DEBUG_MAX & D_RX) || (ARCNET_DEBUG_MAX & D_TX) -void arcnet_dump_packet(struct net_device *dev, int bufnum, char *desc); +void arcnet_dump_packet(struct net_device *dev, int bufnum, char *desc, + int take_arcnet_lock); #else -#define arcnet_dump_packet(dev, bufnum, desc) ; +#define arcnet_dump_packet(dev, bufnum, desc,take_arcnet_lock) ; #endif void arcnet_unregister_proto(struct ArcProto *proto); diff -puN include/linux/com20020.h~arcnet-fixes include/linux/com20020.h --- 25/include/linux/com20020.h~arcnet-fixes 2004-10-28 00:17:07.224705664 -0700 +++ 25-akpm/include/linux/com20020.h 2004-10-28 00:17:07.246702320 -0700 @@ -34,17 +34,24 @@ int com20020_found(struct net_device *de #define ARCNET_TOTAL_SIZE 8 /* various register addresses */ -#define _INTMASK (ioaddr+0) /* writable */ -#define _STATUS (ioaddr+0) /* readable */ -#define _COMMAND (ioaddr+1) /* standard arcnet commands */ -#define _DIAGSTAT (ioaddr+1) /* diagnostic status register */ -#define _ADDR_HI (ioaddr+2) /* control registers for IO-mapped memory */ -#define _ADDR_LO (ioaddr+3) -#define _MEMDATA (ioaddr+4) /* data port for IO-mapped memory */ -#define _SUBADR (ioaddr+5) /* the extended port _XREG refers to */ -#define _CONFIG (ioaddr+6) /* configuration register */ -#define _XREG (ioaddr+7) /* extra registers (indexed by _CONFIG - or _SUBADR) */ +#ifdef CONFIG_SA1100_CT6001 +#define BUS_ALIGN 2 /* 8 bit device on a 16 bit bus - needs padding */ +#else +#define BUS_ALIGN 1 +#endif + + +#define _INTMASK (ioaddr+BUS_ALIGN*0) /* writable */ +#define _STATUS (ioaddr+BUS_ALIGN*0) /* readable */ +#define _COMMAND (ioaddr+BUS_ALIGN*1) /* standard arcnet commands */ +#define _DIAGSTAT (ioaddr+BUS_ALIGN*1) /* diagnostic status register */ +#define _ADDR_HI (ioaddr+BUS_ALIGN*2) /* control registers for IO-mapped memory */ +#define _ADDR_LO (ioaddr+BUS_ALIGN*3) +#define _MEMDATA (ioaddr+BUS_ALIGN*4) /* data port for IO-mapped memory */ +#define _SUBADR (ioaddr+BUS_ALIGN*5) /* the extended port _XREG refers to */ +#define _CONFIG (ioaddr+BUS_ALIGN*6) /* configuration register */ +#define _XREG (ioaddr+BUS_ALIGN*7) /* extra registers (indexed by _CONFIG + or _SUBADR) */ /* in the ADDR_HI register */ #define RDDATAflag 0x80 /* next access is a read (not a write) */ @@ -99,6 +106,7 @@ int com20020_found(struct net_device *de } #define ASTATUS() inb(_STATUS) +#define ADIAGSTATUS() inb(_DIAGSTAT) #define ACOMMAND(cmd) outb((cmd),_COMMAND) #define AINTMASK(msk) outb((msk),_INTMASK) diff -puN include/linux/if_arcnet.h~arcnet-fixes include/linux/if_arcnet.h --- 25/include/linux/if_arcnet.h~arcnet-fixes 2004-10-28 00:17:07.229704904 -0700 +++ 25-akpm/include/linux/if_arcnet.h 2004-10-28 00:17:07.247702168 -0700 @@ -23,6 +23,9 @@ * These are the defined ARCnet Protocol ID's. */ +/* CAP mode */ +/* No macro but uses 1-8 */ + /* RFC1201 Protocol ID's */ #define ARC_P_IP 212 /* 0xD4 */ #define ARC_P_IPV6 196 /* 0xC4: RFC2497 */ @@ -86,6 +89,16 @@ struct arc_eth_encap #define ETH_ENCAP_HDR_SIZE 14 +struct arc_cap +{ + uint8_t proto; + uint8_t cookie[sizeof(int)]; /* Actually NOT sent over the network */ + union { + uint8_t ack; + uint8_t raw[0]; /* 507 bytes */ + } mes; +}; + /* * The data needed by the actual arcnet hardware. * @@ -116,6 +129,7 @@ struct archdr struct arc_rfc1201 rfc1201; struct arc_rfc1051 rfc1051; struct arc_eth_encap eth_encap; + struct arc_cap cap; uint8_t raw[0]; /* 508 bytes */ } soft; }; diff -puN include/linux/if_ether.h~arcnet-fixes include/linux/if_ether.h --- 25/include/linux/if_ether.h~arcnet-fixes 2004-10-28 00:17:07.230704752 -0700 +++ 25-akpm/include/linux/if_ether.h 2004-10-28 00:17:07.247702168 -0700 @@ -91,6 +91,7 @@ #define ETH_P_IRDA 0x0017 /* Linux-IrDA */ #define ETH_P_ECONET 0x0018 /* Acorn Econet */ #define ETH_P_HDLC 0x0019 /* HDLC frames */ +#define ETH_P_ARCNET 0x0020 /* ArcNet */ /* * This is an Ethernet frame header. diff -puN include/linux/net.h~arcnet-fixes include/linux/net.h --- 25/include/linux/net.h~arcnet-fixes 2004-10-28 00:17:07.232704448 -0700 +++ 25-akpm/include/linux/net.h 2004-10-28 00:17:07.248702016 -0700 @@ -26,7 +26,7 @@ struct poll_table_struct; struct inode; -#define NPROTO 32 /* should be enough for now.. */ +#define NPROTO 33 /* should be enough for now.. */ #define SYS_SOCKET 1 /* sys_socket(2) */ #define SYS_BIND 2 /* sys_bind(2) */ _ From akpm@osdl.org Thu Oct 28 00:22:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 00:22:27 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S7MDDl025928 for ; Thu, 28 Oct 2004 00:22:13 -0700 Received: from localhost.localdomain (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i9S7Li908005; Thu, 28 Oct 2004 00:21:44 -0700 Message-Id: <200410280721.i9S7Li908005@mail.osdl.org> Subject: [patch 6/9] X.25: Stop /proc/net/x25/route infinitely reading To: davem@redhat.com Cc: jgarzik@pobox.com, netdev@oss.sgi.com, akpm@osdl.org, ahendry@tusc.com.au From: akpm@osdl.org Date: Thu, 28 Oct 2004 00:19:45 -0700 X-archive-position: 10979 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 Content-Length: 952 Lines: 36 From: Andrew Hendry route add --x25 0/0 eth0 cat /proc/net/x25/route reads the single routing entry forever. This patch makes x25_get_route_idx behave the same as x25_get_socket_idx which works correctly. Signed-off-by: Andrew Hendry Signed-off-by: Andrew Morton --- 25-akpm/net/x25/x25_proc.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff -puN net/x25/x25_proc.c~x25-stop-proc-net-x25-route-infinitely net/x25/x25_proc.c --- 25/net/x25/x25_proc.c~x25-stop-proc-net-x25-route-infinitely 2004-10-28 00:17:08.225553512 -0700 +++ 25-akpm/net/x25/x25_proc.c 2004-10-28 00:17:08.228553056 -0700 @@ -32,10 +32,11 @@ static __inline__ struct x25_route *x25_ list_for_each(route_entry, &x25_route_list) { rt = list_entry(route_entry, struct x25_route, node); - if (--pos) - break; + if (!pos--) + goto found; } - + rt = NULL; +found: return rt; } _ From romieu@fr.zoreil.com Thu Oct 28 00:51:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 00:51:12 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S7p6wo029705 for ; Thu, 28 Oct 2004 00:51:07 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i9S7mRvr004321; Thu, 28 Oct 2004 09:48:28 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i9S7mRAO004320; Thu, 28 Oct 2004 09:48:27 +0200 Date: Thu, 28 Oct 2004 09:48:27 +0200 From: Francois Romieu To: Ben Greear Cc: "'netdev@oss.sgi.com'" Subject: Re: 8169 driver with NetGear GA511 card. Message-ID: <20041028074827.GA3572@electric-eye.fr.zoreil.com> References: <41802CA8.8070900@candelatech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41802CA8.8070900@candelatech.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 10983 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 Content-Length: 1751 Lines: 50 Ben Greear : [...] > I tried stressing it, and it can handle about 30Mbps bi-directional > (1514 byte pkts). I was hoping for better...but not too bad. There is a direction for which a 2x factor has been reported. It does not look like a completely dysfunctional setup. [...] > Kernel is 2.6.9 + my networking patches, compiled for pentium-M > NAPI for 8169 is enabled. > > hardware is nx5000 laptop > > My thanks to the 8169 driver writer(s). I will continue to debug Many people help. > this, and will be happy to try any suggestions for improving performance > and/or stability of this NIC. The r8169 in -mm and in -netdev includes some extra buzzword-compliant features (TX csum/SG and TSO mainly). The changes are isolated in a single patch against 2.6.9 available at: http://www.fr.zoreil.com/people/francois/misc/20041020-2.6.9-r8169.c-test.patch I will not claim it is as stable as vanilla 2.6.9 should be. The frequency of requests for jumbo frames went higher lately ("Realtek driver does it"). There is some code I need to test before it is pushed to -mm. Btw: [...] > I recompiled w/out NAPI and no more problems, though performance is > horrible (about 5Mbps bi-directional). Please send the usuals 'lspci -vx' + /proc/interrupts contents during activity + complete dmesg + short description of the generated traffic. I will hardly dissect it before the week end but there is a problem. :o( > If the developer/maintainer could use one of these cardbus NICs, I'm > willing to donate one to help further development and stability. I work with the plain PCI version of the GA 511 but I can use a laptop for testing. Please contact me offline if you can send an adapter and accept euro. -- Ueimor From SRS0+f5938c0c3cfc721392a3+431+infradead.org+hch@phoenix.srs.infradead.org Thu Oct 28 02:04:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 02:05:05 -0700 (PDT) Received: from phoenix.infradead.org (phoenix.infradead.org [81.187.226.98]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9S94wiT008146 for ; Thu, 28 Oct 2004 02:04:59 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.42 #1 (Red Hat Linux)) id 1CN6Ct-0002A5-VS; Thu, 28 Oct 2004 10:04:32 +0100 Date: Thu, 28 Oct 2004 10:04:31 +0100 From: Christoph Hellwig To: akpm@osdl.org Cc: davem@redhat.com, jgarzik@pobox.com, netdev@oss.sgi.com, pluto@pld-linux.org Subject: Re: [patch 8/9] AES: allow modular build Message-ID: <20041028090431.GA8193@infradead.org> References: <200410280721.i9S7Lk908015@mail.osdl.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200410280721.i9S7Lk908015@mail.osdl.org> User-Agent: Mutt/1.4.1i X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 10984 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: netdev Content-Length: 1002 Lines: 31 On Thu, Oct 28, 2004 at 12:19:47AM -0700, akpm@osdl.org wrote: > > From: > > > Signed-off-by: Andrew Morton > --- > > 25-akpm/arch/i386/crypto/Makefile | 2 +- > 1 files changed, 1 insertion(+), 1 deletion(-) > > diff -puN arch/i386/crypto/Makefile~aes-allow-modular-build arch/i386/crypto/Makefile > --- 25/arch/i386/crypto/Makefile~aes-allow-modular-build 2004-10-28 00:17:08.598496816 -0700 > +++ 25-akpm/arch/i386/crypto/Makefile 2004-10-28 00:17:08.603496056 -0700 > @@ -6,4 +6,4 @@ > > obj-$(CONFIG_CRYPTO_AES_586) += aes-i586.o > > -aes-i586-y := aes-i586-asm.o aes.o > +aes-i586-objs := aes-i586-asm.o aes.o This doesn't make any sense to me. foo-objs and foo-y are treated equivalent by the build system, and not related to modular builds at all. In fact -y is preffered these days as it allows to build parts of the multi-object module conditionally using expressions like: foo-y += foo_main.o foo-$(CONFIG_FOO_BAR) += foo_bar.o From webvenza@libero.it Thu Oct 28 03:21:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 03:21:27 -0700 (PDT) Received: from gateway.milesteg.arr (venza@adsl-ull-223-137.44-151.net24.it [151.44.137.223]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SALJSR011825 for ; Thu, 28 Oct 2004 03:21:20 -0700 Date: Thu, 28 Oct 2004 12:21:02 +0200 From: Daniele Venzano To: Jeff Garzik , NetDev Subject: [PATCH] Add Altimata PHY to sis900 driver Message-ID: <20041028102102.GD3806@picchio.gall.it> Mail-Followup-To: Jeff Garzik , NetDev Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="p2kqVDKq5asng8Dg" Content-Disposition: inline X-Operating-System: Debian GNU/Linux on kernel Linux 2.4.26 X-Copyright: Forwarding or publishing without permission is prohibited. X-Truth: La vita e' una questione di culo, o ce l'hai o te lo fanno. X-GPG-Fingerprint: 642A A345 1CEF B6E3 925C 23CE DAB9 8764 25B3 57ED X-archive-position: 10985 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: webvenza@libero.it Precedence: bulk X-list: netdev Content-Length: 1779 Lines: 62 --p2kqVDKq5asng8Dg Content-Type: multipart/mixed; boundary="xXmbgvnjoT4axfJE" Content-Disposition: inline --xXmbgvnjoT4axfJE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable The attached patch fixes a long standing detection problem with the sis900 driver. This PHY chip is used on some Pentium 4 with SiS chipset and on the Acer Aspire 1705SMi (at least) notebook. The patch is made against kernel 2.6.9 and is available also on http://teg.homeunix.org/sis900.html Please, consider for inclusion. Signed-Off-By: Daniele Venzano --=20 ----------------------------- Daniele Venzano Web: http://teg.homeunix.org --xXmbgvnjoT4axfJE Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="sis900-new-altimata-phy.diff" Index: sis900.c =================================================================== --- a/drivers/net/sis900.c (revision 12) +++ b/drivers/net/sis900.c (working copy) @@ -120,6 +120,7 @@ } mii_chip_table[] = { { "SiS 900 Internal MII PHY", 0x001d, 0x8000, LAN }, { "SiS 7014 Physical Layer Solution", 0x0016, 0xf830, LAN }, + { "Altimata AC101LF PHY", 0x0022, 0x5520, LAN }, { "AMD 79C901 10BASE-T PHY", 0x0000, 0x6B70, LAN }, { "AMD 79C901 HomePNA PHY", 0x0000, 0x6B90, HOME}, { "ICS LAN PHY", 0x0015, 0xF440, LAN }, --xXmbgvnjoT4axfJE-- --p2kqVDKq5asng8Dg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBgMgN2rmHZCWzV+0RAjCmAKCdIPKBXO5IQkW81RxFN7nA4/uRkgCfRHkP vvGATLCvtCud6L5uk6gQ0Sg= =Yjk4 -----END PGP SIGNATURE----- --p2kqVDKq5asng8Dg-- From terjekv@nommo.uio.no Thu Oct 28 08:46:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 08:46:14 -0700 (PDT) Received: from pat.uio.no (IDENT:7411@pat.uio.no [129.240.130.16]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SFk7km030502 for ; Thu, 28 Oct 2004 08:46:08 -0700 Received: from mail-mx1.uio.no ([129.240.10.29]) by pat.uio.no with esmtp (Exim 4.34) id 1CNCTA-000456-Cx; Thu, 28 Oct 2004 17:45:44 +0200 Received: from nommo.uio.no ([129.240.222.179]) by smtp.uio.no with esmtp (Exim 4.34) id 1CNCT6-0007fm-2z; Thu, 28 Oct 2004 17:45:40 +0200 Received: from terjekv by nommo.uio.no with local (Exim 4.30) id 1CNCT3-0001ls-6E; Thu, 28 Oct 2004 17:45:37 +0200 To: Jeff Garzik Cc: Seiichi Nakashima , linux-kernel@vger.kernel.org, Netdev Subject: Re: linux-2.6.9 eepro100 warning References: <200410232313.AA00003@prism.kumin.ne.jp> <417C9A4E.3030909@pobox.com> <418077BC.10806@pobox.com> From: Terje Kvernes Organization: The friends of mr. Tux X-URL: http://terje.kvernes.no/ Date: Thu, 28 Oct 2004 17:45:37 +0200 In-Reply-To: <418077BC.10806@pobox.com> (Jeff Garzik's message of "Thu, 28 Oct 2004 00:38:20 -0400") Message-ID: User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-Information: This message has been scanned for viruses/spam. Contact postmaster@uio.no if you have questions about this scanning X-UiO-MailScanner: No virus found X-UiO-Spam-info: not spam, SpamAssassin (score=-5, required 12, UIO_MAIL_IS_INTERNAL -5.00) X-archive-position: 10986 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: terjekv@math.uio.no Precedence: bulk X-list: netdev Content-Length: 847 Lines: 29 Jeff Garzik writes: [ ... ] > If there are e100 problems, report them to the maintainers so we can > get them resolved ASAP... I got a very nice mail from Jesse Brandeburg saying pretty much the same thing... so, I've pushed kernels for around 75 boxen over to e100 today, from eepro100. I'm not _quite_ sure when I'll have the chance to boot them all, but when they do, and if they have problems, I'll report back. > INTEL PRO/100 ETHERNET SUPPORT > P: John Ronciak > M: john.ronciak@intel.com > P: Ganesh Venkatesan > M: ganesh.venkatesan@intel.com > P: Scott Feldman > M: scott.feldman@intel.com > W: http://sourceforge.net/projects/e1000/ > S: Supported > > (and of course netdev@oss.sgi.com as well) ack. -- Terje - still waiting to test hotswap SATA. =) From wensong@linux-vs.org Thu Oct 28 09:24:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 09:24:30 -0700 (PDT) Received: from lb1.ctrip.com ([218.244.111.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SGOLpI003761 for ; Thu, 28 Oct 2004 09:24:23 -0700 Received: from penguin.linux-vs.org ([221.219.27.137]) by lb1.ctrip.com (8.12.10/8.12.10) with ESMTP id i9SGNGMh020516 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Fri, 29 Oct 2004 00:23:16 +0800 Received: from penguin.linux-vs.org (localhost.localdomain [127.0.0.1]) by penguin.linux-vs.org (8.12.8/8.12.8) with ESMTP id i9SGLYRX006234; Fri, 29 Oct 2004 00:21:34 +0800 Received: from localhost (wensong@localhost) by penguin.linux-vs.org (8.12.8/8.12.8/Submit) with ESMTP id i9SGLSXF006230; Fri, 29 Oct 2004 00:21:31 +0800 X-Authentication-Warning: penguin.linux-vs.org: wensong owned process doing -bs Date: Fri, 29 Oct 2004 00:21:27 +0800 (CST) From: Wensong Zhang To: netdev@oss.sgi.com cc: "David S. Miller" Subject: [PATCH] Update IPVS version number Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-1463811584-128716279-1098980487=:5836" X-archive-position: 10987 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: wensong@linux-vs.org Precedence: bulk X-list: netdev Content-Length: 3161 Lines: 68 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. ---1463811584-128716279-1098980487=:5836 Content-Type: TEXT/PLAIN; charset=US-ASCII Hi Dave, Since there are some fixes in the IPVS code, it's good to update its version number. Please help apply the version number patch to kernel 2.6 and 2.4 respectively. Thanks, Wensong ---1463811584-128716279-1098980487=:5836 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="linux-2.4-ipvs-version.patch" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="linux-2.4-ipvs-version.patch" IyBUaGlzIGlzIGEgQml0S2VlcGVyIGdlbmVyYXRlZCBkaWZmIC1OcnUgc3R5 bGUgcGF0Y2guDQojDQojIENoYW5nZVNldA0KIyAgIDIwMDQvMTAvMjkgMDA6 MDc6MzIrMDg6MDAgd2Vuc29uZ0BsaW51eC12cy5vcmcgDQojICAgW0lQVlNd IHVwZGF0ZSB2ZXJzaW9uIHRvIDEuMC4xMg0KIyANCiMgaW5jbHVkZS9uZXQv aXBfdnMuaA0KIyAgIDIwMDQvMTAvMjkgMDA6MDc6MjYrMDg6MDAgd2Vuc29u Z0BsaW51eC12cy5vcmcgKzEgLTENCiMgICBbSVBWU10gdXBkYXRlIHZlcnNp b24gdG8gMS4wLjEyDQojIA0KZGlmZiAtTnJ1IGEvaW5jbHVkZS9uZXQvaXBf dnMuaCBiL2luY2x1ZGUvbmV0L2lwX3ZzLmgNCi0tLSBhL2luY2x1ZGUvbmV0 L2lwX3ZzLmgJMjAwNC0xMC0yOSAwMDoxNTo1MCArMDg6MDANCisrKyBiL2lu Y2x1ZGUvbmV0L2lwX3ZzLmgJMjAwNC0xMC0yOSAwMDoxNTo1MCArMDg6MDAN CkBAIC04LDcgKzgsNyBAQA0KIA0KICNpbmNsdWRlIDxhc20vdHlwZXMuaD4g ICAgICAgICAgLyogRm9yIF9fdVhYIHR5cGVzICovDQogDQotI2RlZmluZSBJ UF9WU19WRVJTSU9OX0NPREUgICAgICAgICAgICAweDAxMDAwQg0KKyNkZWZp bmUgSVBfVlNfVkVSU0lPTl9DT0RFICAgICAgICAgICAgMHgwMTAwMEMNCiAj ZGVmaW5lIE5WRVJTSU9OKHZlcnNpb24pICAgICAgICAgICAgICAgICAgICAg ICBcDQogCSh2ZXJzaW9uID4+IDE2KSAmIDB4RkYsICAgICAgICAgICAgICAg ICBcDQogCSh2ZXJzaW9uID4+IDgpICYgMHhGRiwgICAgICAgICAgICAgICAg ICBcDQo= ---1463811584-128716279-1098980487=:5836 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="linux-2.6-ipvs-version.patch" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="linux-2.6-ipvs-version.patch" IyBUaGlzIGlzIGEgQml0S2VlcGVyIGdlbmVyYXRlZCBkaWZmIC1OcnUgc3R5 bGUgcGF0Y2guDQojDQojIENoYW5nZVNldA0KIyAgIDIwMDQvMTAvMjkgMDA6 MTQ6MTMrMDg6MDAgd2Vuc29uZ0BsaW51eC12cy5vcmcgDQojICAgW0lQVlNd IFVwZGF0ZSB2ZXJzaW9uIHRvIDEuMi4xDQojIA0KIyBpbmNsdWRlL25ldC9p cF92cy5oDQojICAgMjAwNC8xMC8yOSAwMDoxMzo1NSswODowMCB3ZW5zb25n QGxpbnV4LXZzLm9yZyArMSAtMQ0KIyAgIFtJUFZTXSBVcGRhdGUgdmVyc2lv biB0byAxLjIuMQ0KIyANCmRpZmYgLU5ydSBhL2luY2x1ZGUvbmV0L2lwX3Zz LmggYi9pbmNsdWRlL25ldC9pcF92cy5oDQotLS0gYS9pbmNsdWRlL25ldC9p cF92cy5oCTIwMDQtMTAtMjkgMDA6MTU6MDcgKzA4OjAwDQorKysgYi9pbmNs dWRlL25ldC9pcF92cy5oCTIwMDQtMTAtMjkgMDA6MTU6MDcgKzA4OjAwDQpA QCAtOCw3ICs4LDcgQEANCiANCiAjaW5jbHVkZSA8YXNtL3R5cGVzLmg+CQkv KiBGb3IgX191WFggdHlwZXMgKi8NCiANCi0jZGVmaW5lIElQX1ZTX1ZFUlNJ T05fQ09ERQkweDAxMDIwMA0KKyNkZWZpbmUgSVBfVlNfVkVSU0lPTl9DT0RF CTB4MDEwMjAxDQogI2RlZmluZSBOVkVSU0lPTih2ZXJzaW9uKQkJCVwNCiAJ KHZlcnNpb24gPj4gMTYpICYgMHhGRiwJCQlcDQogCSh2ZXJzaW9uID4+IDgp ICYgMHhGRiwJCQlcDQo= ---1463811584-128716279-1098980487=:5836-- From jdmason@us.ibm.com Thu Oct 28 09:45:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 09:45:54 -0700 (PDT) Received: from e6.ny.us.ibm.com (e6.ny.us.ibm.com [32.97.182.106]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SGjhPH004495 for ; Thu, 28 Oct 2004 09:45:50 -0700 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e6.ny.us.ibm.com (8.12.10/8.12.9) with ESMTP id i9SGjHsZ511854; Thu, 28 Oct 2004 12:45:17 -0400 Received: from dreadnought.austin.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay04.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i9SGjGYd280712; Thu, 28 Oct 2004 12:45:16 -0400 From: Jon Mason Organization: IBM To: Ben Greear Subject: Re: 8169 driver with NetGear GA511 card. Date: Thu, 28 Oct 2004 11:45:10 -0500 User-Agent: KMail/1.6.2 Cc: "'netdev@oss.sgi.com'" References: <41802CA8.8070900@candelatech.com> In-Reply-To: <41802CA8.8070900@candelatech.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200410281145.10600.jdmason@us.ibm.com> X-archive-position: 10988 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jdmason@us.ibm.com Precedence: bulk X-list: netdev Content-Length: 392 Lines: 11 On Wednesday 27 October 2004 06:18 pm, Ben Greear wrote: > A bit later, my keyboard just stopped working. The scratch pad > and USB mouse continued to work. System wouldn't shut down all > the way either...forced fsck, system is back online. I was seeing similar behavior with high workloads and TSO. Can you confirm that you are running with TSO on? -- Jon Mason jdmason@us.ibm.com From greearb@candelatech.com Thu Oct 28 09:53:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 09:53:14 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SGr8jO005011 for ; Thu, 28 Oct 2004 09:53:08 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i9SH0QLH030981; Thu, 28 Oct 2004 10:00:26 -0700 Message-ID: <418123E4.2010105@candelatech.com> Date: Thu, 28 Oct 2004 09:52:52 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jon Mason CC: "'netdev@oss.sgi.com'" Subject: Re: 8169 driver with NetGear GA511 card. References: <41802CA8.8070900@candelatech.com> <200410281145.10600.jdmason@us.ibm.com> In-Reply-To: <200410281145.10600.jdmason@us.ibm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10989 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Content-Length: 607 Lines: 18 Jon Mason wrote: > On Wednesday 27 October 2004 06:18 pm, Ben Greear wrote: > >>A bit later, my keyboard just stopped working. The scratch pad >>and USB mouse continued to work. System wouldn't shut down all >>the way either...forced fsck, system is back online. > > > I was seeing similar behavior with high workloads and TSO. Can you confirm > that you are running with TSO on? I'll have to check, but I do know that the traffic I was sending was at the ethernet frame level and it was UDP packets. -- Ben Greear Candela Technologies Inc http://www.candelatech.com From pluto@pld-linux.org Thu Oct 28 09:59:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 09:59:37 -0700 (PDT) Received: from plus.ds14.agh.edu.pl (chello083144090118.chello.pl [83.144.90.118]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SGxVqA005553 for ; Thu, 28 Oct 2004 09:59:32 -0700 Received: from localhost ([127.0.0.1]) by plus.ds14.agh.edu.pl with esmtp (Exim 4.42) id 1CNDbr-0003ww-Li; Thu, 28 Oct 2004 18:58:47 +0200 From: =?utf-8?q?Pawe=C5=82_Sikora?= To: Christoph Hellwig Subject: Re: [patch 8/9] AES: allow modular build Date: Thu, 28 Oct 2004 18:57:49 +0200 User-Agent: KMail/1.7.1 Cc: akpm@osdl.org, davem@redhat.com, jgarzik@pobox.com, netdev@oss.sgi.com References: <200410280721.i9S7Lk908015@mail.osdl.org> <20041028090431.GA8193@infradead.org> In-Reply-To: <20041028090431.GA8193@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410281857.50354.pluto@pld-linux.org> X-archive-position: 10990 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pluto@pld-linux.org Precedence: bulk X-list: netdev Content-Length: 1466 Lines: 41 On Thursday 28 of October 2004 11:04, Christoph Hellwig wrote: > On Thu, Oct 28, 2004 at 12:19:47AM -0700, akpm@osdl.org wrote: > > From: > > > > > > Signed-off-by: Andrew Morton > > --- > > > > 25-akpm/arch/i386/crypto/Makefile | 2 +- > > 1 files changed, 1 insertion(+), 1 deletion(-) > > > > diff -puN arch/i386/crypto/Makefile~aes-allow-modular-build > > arch/i386/crypto/Makefile --- > > 25/arch/i386/crypto/Makefile~aes-allow-modular-build 2004-10-28 > > 00:17:08.598496816 -0700 +++ 25-akpm/arch/i386/crypto/Makefile 2004-10-28 > > 00:17:08.603496056 -0700 @@ -6,4 +6,4 @@ > > > > obj-$(CONFIG_CRYPTO_AES_586) += aes-i586.o > > > > -aes-i586-y := aes-i586-asm.o aes.o > > +aes-i586-objs := aes-i586-asm.o aes.o > > This doesn't make any sense to me. > foo-objs and foo-y are treated equivalent by the build system, and not > related to modular builds at all. In fact -y is preffered these days > as it allows to build parts of the multi-object module conditionally using > expressions like: > > foo-y += foo_main.o > foo-$(CONFIG_FOO_BAR) += foo_bar.o Hmm, Without my fix the 2.6.8rc[34] produced unresolved symbol in the AES module. With this fix the problem didn't exist. Now (2.6.10rc1) it works fine without this fix. Where was the problem? [1] -y/-objs | [2] AES module. -- /* Copyright (C) 2003, SCO, Inc. This is valuable Intellectual Property. */ #define say(x) lie(x) From greearb@candelatech.com Thu Oct 28 10:48:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 10:48:12 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SHm6GW006963 for ; Thu, 28 Oct 2004 10:48:06 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i9SHtMLH031723; Thu, 28 Oct 2004 10:55:23 -0700 Message-ID: <418130C4.3010207@candelatech.com> Date: Thu, 28 Oct 2004 10:47:48 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Francois Romieu CC: "'netdev@oss.sgi.com'" Subject: Re: 8169 driver with NetGear GA511 card. References: <41802CA8.8070900@candelatech.com> <20041028074827.GA3572@electric-eye.fr.zoreil.com> In-Reply-To: <20041028074827.GA3572@electric-eye.fr.zoreil.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 10991 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Francois Romieu wrote: > The r8169 in -mm and in -netdev includes some extra buzzword-compliant > features (TX csum/SG and TSO mainly). The changes are isolated in a > single patch against 2.6.9 available at: > http://www.fr.zoreil.com/people/francois/misc/20041020-2.6.9-r8169.c-test.patch > > I will not claim it is as stable as vanilla 2.6.9 should be. I'm running tests at the ethernet frame (skb) level, so I would not expect the IP offload to help much. Do you have any performance numbers for your 8169 cards for me to compare against? > Please send the usuals 'lspci -vx' + /proc/interrupts contents during > activity + complete dmesg + short description of the generated traffic. > I will hardly dissect it before the week end but there is a problem. :o( I'll get this in a bit, as I have locked up the keyboard again. This time, I was still using the non-NAPI code which had run over-night at around 5Mbps... I tried a different network setup, and noticed that the 8169 was only negotiating 10bt/HD. That would explain the poor performance numbers. The NIC was connected to a BCM5705M when I noticed this, though it had been connected to an e1000 earlier. I tried forcing both NICs to 100bt/FD. The BCM would force to that speed, but the 8169 would only force to 100bt/HD. While attempting to change them back to auto-negotiate, I noticed that the keyboard had quit working... With regard to the BCM, it is interesting in that ethtool reports that it supports only up to 100bt/FD, but it advertises 1000bt/FD. The wierd advertise and negotiation stuff could be at least partly my fault as I have a program that manipulates these settings from default. I will continue to play with this later this evening... Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From ravinandan.arakali@s2io.com Thu Oct 28 11:25:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 11:25:51 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SIPgmw008048 for ; Thu, 28 Oct 2004 11:25:43 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SIPDje008502; Thu, 28 Oct 2004 14:25:13 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SIPB39012200; Thu, 28 Oct 2004 14:25:11 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , , Subject: [PATCH 2.6.9-rc2 3/12] S2io: optimizations Date: Thu, 28 Oct 2004 11:33:58 -0700 Message-ID: <000f01c4bd1c$b89e69e0$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10993 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Hi, Following are the optimization-related changes made in this patch. 1. Definitions of LOW and PANIC levels of the Rx buffers have changed. 2. In wait_for_cmd_complete there is no longer a writeq but just a read and wait for strobe bit to reset. 3. In s2io_isr, the isr_lock has been done away with also the NICs interrupt are no longer disabled explicitly on entering the interrupt handler and re-enabled again before leaving it. 4. Also clearing the semaphore "tasklet_status" when exiting erroneously from s2io_isr after failing fill_rx_buffer call. 5. The set/reset Tx Csum function through ethtool was added to the ethtool_ops structure. 6. Added a Rx side error code in the rx_osm_handler function. 7. No longer stopping and waking Tx queue when link state changes in s2io_link function. 8. removed the isr_lock spinlock from the s2io_nic structure. 9. changed parameters which determine thresholds(LOW and PANIC) to replenish Rx buffers. This has been found to result in better performance. Signed-off-by: Raghavendra Koushik --- diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-06 17:24:02.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-06 17:37:32.751003528 -0700 @@ -80,10 +80,11 @@ static inline int rx_buffer_level(nic_t * sp, int rxb_size, int ring) { int level = 0; - if ((sp->pkt_cnt[ring] - rxb_size) > 128) { + if ((sp->pkt_cnt[ring] - rxb_size) > 16) { level = LOW; - if (rxb_size < sp->pkt_cnt[ring] / 8) + if ((sp->pkt_cnt[ring] - rxb_size) < MAX_RXDS_PER_BLOCK) { level = PANIC; + } } return level; @@ -1916,12 +1917,8 @@ u64 val64; while (TRUE) { - val64 = - RMAC_ADDR_CMD_MEM_RD | RMAC_ADDR_CMD_MEM_STROBE_NEW_CMD - | RMAC_ADDR_CMD_MEM_OFFSET(0); - writeq(val64, &bar0->rmac_addr_cmd_mem); val64 = readq(&bar0->rmac_addr_cmd_mem); - if (!val64) { + if (!(val64 & RMAC_ADDR_CMD_MEM_STROBE_CMD_EXECUTING)) { ret = SUCCESS; break; } @@ -2192,14 +2189,11 @@ register u64 val64 = 0; u16 cnt = 0; - spin_lock(&sp->isr_lock); netif_stop_queue(dev); /* disable Tx and Rx traffic on the NIC */ stop_nic(sp); - spin_unlock(&sp->isr_lock); - /* * If the device tasklet is running, wait till its done * before killing it @@ -2398,15 +2392,13 @@ struct net_device *dev = (struct net_device *) dev_id; nic_t *sp = dev->priv; XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; - u64 reason = 0, general_mask = 0; + u64 reason = 0; mac_info_t *mac_control; struct config_param *config; mac_control = &sp->mac_control; config = &sp->config; - spin_lock(&sp->isr_lock); - /* * Identify the cause for interrupt and call the appropriate * interrupt handler. Causes for the interrupt could be; @@ -2419,14 +2411,9 @@ if (!reason) { /* The interrupt was not raised by Xena. */ - spin_unlock(&sp->isr_lock); return IRQ_NONE; } - /* Mask the Interrupts on the NIC. */ - general_mask = readq(&bar0->general_int_mask); - writeq(0xFFFFFFFFFFFFFFFFULL, &bar0->general_int_mask); - /* If Intr is because of Tx Traffic */ if (reason & GEN_INTR_TXTRAFFIC) { tx_intr_handler(sp); @@ -2441,11 +2428,6 @@ if (netif_rx_schedule_prep(dev)) { en_dis_able_nic_intrs(sp, RX_TRAFFIC_INTR, DISABLE_INTRS); - /* - * Here we take a snap shot of the general - * Intr Register. - */ - general_mask = readq(&bar0->general_int_mask); __netif_rx_schedule(dev); } } @@ -2481,9 +2463,9 @@ "%s:Out of memory", dev->name); DBG_PRINT(ERR_DBG, " in ISR!!\n"); - writeq(general_mask, - &bar0->general_int_mask); - spin_unlock(&sp->isr_lock); + clear_bit(0, + (unsigned long *) (&sp-> + tasklet_status)); return IRQ_HANDLED; } clear_bit(0, @@ -2501,10 +2483,6 @@ tasklet_schedule(&sp->task); #endif - /* Unmask all previously enabled interrupts on the NIC. */ - writeq(general_mask, &bar0->general_int_mask); - - spin_unlock(&sp->isr_lock); return IRQ_HANDLED; } @@ -3626,6 +3604,17 @@ return (S2IO_STAT_LEN); } +int s2io_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 struct ethtool_ops netdev_ethtool_ops = { .get_settings = s2io_ethtool_gset, .set_settings = s2io_ethtool_sset, @@ -3641,7 +3630,7 @@ .get_rx_csum = s2io_ethtool_get_rx_csum, .set_rx_csum = s2io_ethtool_set_rx_csum, .get_tx_csum = ethtool_op_get_tx_csum, - .set_tx_csum = ethtool_op_set_tx_csum, + .set_tx_csum = s2io_ethtool_op_set_tx_csum, .get_sg = ethtool_op_get_sg, .set_sg = ethtool_op_set_sg, #ifdef NETIF_F_TSO @@ -3902,6 +3891,12 @@ skb->ip_summed = CHECKSUM_NONE; } + if (rxdp->Control_1 & RXD_T_CODE) { + unsigned long long err = rxdp->Control_1 & RXD_T_CODE; + DBG_PRINT(ERR_DBG, "%s: Rx error Value: 0x%llx\n", + dev->name, err); + } + skb->dev = dev; skb_put(skb, len); skb->protocol = eth_type_trans(skb, dev); @@ -3922,25 +3917,6 @@ return SUCCESS; } -int check_for_tx_space(nic_t * sp) -{ - u32 put_off, get_off, queue_len; - int ret = TRUE, i; - - for (i = 0; i < sp->config.tx_fifo_num; i++) { - queue_len = sp->mac_control.tx_curr_put_info[i].fifo_len - + 1; - put_off = sp->mac_control.tx_curr_put_info[i].offset; - get_off = sp->mac_control.tx_curr_get_info[i].offset; - if (((put_off + 1) % queue_len) == get_off) { - ret = FALSE; - break; - } - } - - return ret; -} - /** * s2io_link - stops/starts the Tx queue. * @sp : private member of the device structure, which is a pointer to the @@ -3962,17 +3938,9 @@ if (link == LINK_DOWN) { DBG_PRINT(ERR_DBG, "%s: Link down\n", dev->name); netif_carrier_off(dev); - netif_stop_queue(dev); } else { DBG_PRINT(ERR_DBG, "%s: Link Up\n", dev->name); netif_carrier_on(dev); - if (check_for_tx_space(sp) == TRUE) { - /* - * Dont wake the queue if we know there - * are no free TxDs available. - */ - netif_wake_queue(dev); - } } } sp->last_link_state = link; @@ -4357,7 +4325,6 @@ /* Initialize spinlocks */ spin_lock_init(&sp->tx_lock); - spin_lock_init(&sp->isr_lock); /* * SXE-002: Configure link and activity LED to init state diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-06 17:24:05.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-06 17:37:47.532756360 -0700 @@ -612,7 +612,6 @@ atomic_t rx_bufs_left[MAX_RX_RINGS]; spinlock_t tx_lock; - spinlock_t isr_lock; #define PROMISC 1 #define ALL_MULTI 2 From ravinandan.arakali@s2io.com Thu Oct 28 11:25:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 11:25:46 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SIPcgn008045 for ; Thu, 28 Oct 2004 11:25:39 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SIP6je008499; Thu, 28 Oct 2004 14:25:06 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SIP039011774; Thu, 28 Oct 2004 14:25:01 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , , Subject: [PATCH 2.6.9-rc2 2/12] S2io: sw bug fixes Date: Thu, 28 Oct 2004 11:33:53 -0700 Message-ID: <000e01c4bd1c$b25c3da0$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10992 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Hi, Attached is the second patch in this submission. It contains the following software bug fixes. 1. In free_rx_buffers clearing out RxDs not owned by Xena. 2. In alarm_intr_handler, when a serr error occurs, schedule a task to reset the card rather than stopping Tx queue. 3. In s2io_close freeing IRQ before calling s2io_reset also added a new call to flush queued tasks. This is not done if the s2io_close itself is called from a queued task like s2io_restart_nic. 4. read_eeprom function has been changed such that data to be returned is sent as an input argument and the return value represents a pass/fail. The previous implementation as Randy had pointed out was error prone as on failure it returned -1 which can be interpreted as all ff's, so any data area which contained ff's in the eeprom was likely to be treated as an error. 5. Added a flag "task_flag" to track if the call to s2io_close is coming from the s2io_restart_nic function or from the ifconfig down called by user. 6. Moved register_netdev call from just after setting entry points to the end of the s2io_init_nic function. 7. In s2io.h field added a new member into the s2io_nic structure called "task_flag". Signed-off-by: Raghavendra Koushik --- diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-06 15:18:10.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-06 16:19:52.821420504 -0700 @@ -1525,6 +1525,11 @@ blk++; } + if (!(rxdp->Control_1 & RXD_OWN_XENA)) { + memset(rxdp, 0, sizeof(RxD_t)); + continue; + } + skb = (struct sk_buff *) ((unsigned long) rxdp-> Host_Control); @@ -1887,7 +1892,7 @@ if (val64 & SERR_SOURCE_ANY) { DBG_PRINT(ERR_DBG, "%s: Device indicates ", dev->name); DBG_PRINT(ERR_DBG, "serious error!!\n"); - netif_stop_queue(dev); + schedule_work(&nic->rst_timer_task); } /* Other type of interrupts are not being handled now, TODO */ @@ -2205,6 +2210,17 @@ } tasklet_kill(&sp->task); + /* Free the Registered IRQ */ + free_irq(dev->irq, dev); + + /* Flush all scheduled tasks */ + if (sp->task_flag == 1) { + DBG_PRINT(INFO_DBG, "%s: Calling close from a task\n", + dev->name); + } else { + flush_scheduled_work(); + } + /* Check if the device is Quiescent and then Reset the NIC */ do { val64 = readq(&bar0->adapter_status); @@ -2225,9 +2241,6 @@ } while (1); s2io_reset(sp); - /* Free the Registered IRQ */ - free_irq(dev->irq, dev); - /* Free all Tx Buffers waiting for transmission */ free_tx_buffers(sp); @@ -2982,9 +2995,10 @@ */ #define S2IO_DEV_ID 5 -static u32 read_eeprom(nic_t * sp, int off) +static int read_eeprom(nic_t * sp, int off, u32 * data) { - u32 data = -1, exit_cnt = 0; + int ret = -1; + u32 exit_cnt = 0; u64 val64; XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; @@ -2996,7 +3010,8 @@ while (exit_cnt < 5) { val64 = readq(&bar0->i2c_control); if (I2C_CONTROL_CNTL_END(val64)) { - data = I2C_CONTROL_GET_DATA(val64); + *data = I2C_CONTROL_GET_DATA(val64); + ret = 0; break; } set_current_state(TASK_UNINTERRUPTIBLE); @@ -3004,7 +3019,7 @@ exit_cnt++; } - return data; + return ret; } /** @@ -3073,8 +3088,7 @@ eeprom->len = XENA_EEPROM_SPACE - eeprom->offset; for (i = 0; i < eeprom->len; i += 4) { - data = read_eeprom(sp, eeprom->offset + i); - if (data < 0) { + if (read_eeprom(sp, (eeprom->offset + i), &data)) { DBG_PRINT(ERR_DBG, "Read of EEPROM failed\n"); return -EFAULT; } @@ -3213,7 +3227,8 @@ static int s2io_eeprom_test(nic_t * sp, uint64_t * data) { - int fail = 0, ret_data; + int fail = 0; + u32 ret_data; /* Test Write Error at offset 0 */ if (!write_eeprom(sp, 0, 0, 3)) @@ -3222,7 +3237,7 @@ /* Test Write at offset 4f0 */ if (write_eeprom(sp, 0x4F0, 0x01234567, 3)) fail = 1; - if ((ret_data = read_eeprom(sp, 0x4F0)) < 0) + if (read_eeprom(sp, 0x4F0, &ret_data)) fail = 1; if (ret_data != 0x01234567) @@ -3238,7 +3253,7 @@ /* Test Write Request at offset 0x7fc */ if (write_eeprom(sp, 0x7FC, 0x01234567, 3)) fail = 1; - if ((ret_data = read_eeprom(sp, 0x7FC)) < 0) + if (read_eeprom(sp, 0x7FC, &ret_data)) fail = 1; if (ret_data != 0x01234567) @@ -3811,7 +3826,9 @@ struct net_device *dev = (struct net_device *) data; nic_t *sp = dev->priv; + sp->task_flag = 1; s2io_close(dev); + sp->task_flag = 0; sp->device_close_flag = TRUE; s2io_open(dev); DBG_PRINT(ERR_DBG, @@ -4275,18 +4292,13 @@ INIT_WORK(&sp->set_link_task, (void (*)(void *)) s2io_set_link, sp); - if (register_netdev(dev)) { - DBG_PRINT(ERR_DBG, "Device registration failed\n"); - goto register_failed; - } - pci_save_state(sp->pdev, sp->config_space); /* Setting swapper control on the NIC, for proper reset operation */ if (s2io_set_swapper(sp)) { DBG_PRINT(ERR_DBG, "%s:swapper settings are wrong\n", dev->name); - goto register_failed; + goto set_swap_failed; } /* Fix for all "FFs" MAC address problems observed on Alpha platforms */ @@ -4363,6 +4375,11 @@ sp->rx_csum = 1; /* Rx chksum verify enabled by default */ + if (register_netdev(dev)) { + DBG_PRINT(ERR_DBG, "Device registration failed\n"); + goto register_failed; + } + /* * Make Link state as off at this point, when the Link change * interrupt comes the state will be automatically changed to @@ -4373,9 +4390,8 @@ return 0; - set_swap_failed: - unregister_netdev(dev); register_failed: + set_swap_failed: iounmap(sp->bar1); bar1_remap_failed: iounmap(sp->bar0); diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-06 15:15:03.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-06 16:19:52.829419288 -0700 @@ -668,6 +668,8 @@ u16 last_link_state; #define LINK_DOWN 1 #define LINK_UP 2 + + int task_flag; } nic_t; #define RESET_ERROR 1; From ravinandan.arakali@s2io.com Thu Oct 28 11:26:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 11:26:12 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SIQ3XV008129 for ; Thu, 28 Oct 2004 11:26:03 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SIPXje008509; Thu, 28 Oct 2004 14:25:33 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SIPT39012345; Thu, 28 Oct 2004 14:25:29 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , , Subject: [PATCH 2.6.9-rc2 5/12] S2io: module loadable parameters Date: Thu, 28 Oct 2004 11:34:12 -0700 Message-ID: <001101c4bd1c$c37a6990$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10996 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Hi, This patch adds/modifies the following module loadable parameters. 1. Max Txds per List. 2. statistics refresh time 3. pause frame control parameters including gap between two successive frames, threshold watermarks 4. RTI and TTI configuration parameters including ranges, packet counts and timeout periods. For further information please read the section 3.5 of XFrame H/W spec. 5. PCI/PCI-X configuration variables latency_timer, MMRBC and OST. 6. OS offload features TSO (If support available) and checksum offload. 7. If NAPI is not in use, a variable indicate_max_pkts can be used to limit number of Rx side packets processed for one call to Rx Intr handler. Signed-off-by: Raghavendra Koushik --- diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-11 15:33:35.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-11 15:34:23.000000000 -0700 @@ -223,14 +223,66 @@ }; /* Module Loadable parameters. */ -static u32 ring_num; static u32 frame_len[MAX_RX_RINGS]; -static u32 ring_len[MAX_RX_RINGS]; -static u32 fifo_num; -static u32 fifo_len[MAX_TX_FIFOS]; static u32 rx_prio; static u32 tx_prio; -static u8 latency_timer; + +static unsigned int lso_enable = 1; +#ifndef CONFIG_S2IO_NAPI +static unsigned int indicate_max_pkts; +#endif +static unsigned int cksum_offload_enable = 1; +static unsigned int tx_fifo_num = 1; +static unsigned int tx_fifo_len_0 = DEFAULT_FIFO_LEN; +static unsigned int tx_fifo_len_1; +static unsigned int tx_fifo_len_2; +static unsigned int tx_fifo_len_3; +static unsigned int tx_fifo_len_4; +static unsigned int tx_fifo_len_5; +static unsigned int tx_fifo_len_6; +static unsigned int tx_fifo_len_7; +static unsigned int max_txds = MAX_SKB_FRAGS; +static unsigned int rx_ring_num = 1; +static unsigned int rx_ring_sz_0 = SMALL_BLK_CNT; +static unsigned int rx_ring_sz_1; +static unsigned int rx_ring_sz_2; +static unsigned int rx_ring_sz_3; +static unsigned int rx_ring_sz_4; +static unsigned int rx_ring_sz_5; +static unsigned int rx_ring_sz_6; +static unsigned int rx_ring_sz_7; +static unsigned int Stats_refresh_time = 4; +static unsigned int rmac_pause_time = 65535; +static unsigned int mc_pause_threshold_q0q3 = 187; +static unsigned int mc_pause_threshold_q4q7 = 187; +static unsigned int shared_splits; +#if defined(__ia64__) +static unsigned int max_splits_trans = XENA_THREE_SPLIT_TRANSACTION; +#else +static unsigned int max_splits_trans = XENA_TWO_SPLIT_TRANSACTION; +#endif +static unsigned int tmac_util_period = 5; +static unsigned int rmac_util_period = 5; +static unsigned int tx_timer_val = 0xFFF; +static unsigned int tx_utilz_periodic = 1; +static unsigned int rx_timer_val = 0xFFF; +static unsigned int rx_utilz_periodic = 1; +static unsigned int tx_urange_a = 0xA; +static unsigned int tx_ufc_a = 0x10; +static unsigned int tx_urange_b = 0x10; +static unsigned int tx_ufc_b = 0x20; +static unsigned int tx_urange_c = 0x30; +static unsigned int tx_ufc_c = 0x40; +static unsigned int tx_ufc_d = 0x80; +static unsigned int rx_urange_a = 0xA; +static unsigned int rx_ufc_a = 0x1; +static unsigned int rx_urange_b = 0x10; +static unsigned int rx_ufc_b = 0x2; +static unsigned int rx_urange_c = 0x30; +static unsigned int rx_ufc_c = 0x40; +static unsigned int rx_ufc_d = 0x80; +static u8 latency_timer = 0xf8; +static u8 max_read_byte_cnt = 2; /* * S2IO device table. @@ -782,14 +834,16 @@ /* Enable statistics */ writeq(mac_control->stats_mem_phy, &bar0->stat_addr); - val64 = SET_UPDT_PERIOD(8) | STAT_CFG_STAT_RO | STAT_CFG_STAT_EN; + val64 = SET_UPDT_PERIOD(Stats_refresh_time) | + STAT_CFG_STAT_RO | STAT_CFG_STAT_EN; writeq(val64, &bar0->stat_cfg); /* * Initializing the sampling rate for the device to calculate the * bandwidth utilization. */ - val64 = MAC_TX_LINK_UTIL_VAL(0x5) | MAC_RX_LINK_UTIL_VAL(0x5); + val64 = MAC_TX_LINK_UTIL_VAL(tmac_util_period) | + MAC_RX_LINK_UTIL_VAL(rmac_util_period); writeq(val64, &bar0->mac_link_util); @@ -798,14 +852,18 @@ * Scheme. */ /* TTI Initialization */ - val64 = TTI_DATA1_MEM_TX_TIMER_VAL(0xFFF) | - TTI_DATA1_MEM_TX_URNG_A(0xA) | TTI_DATA1_MEM_TX_URNG_B(0x10) | - TTI_DATA1_MEM_TX_URNG_C(0x30) | TTI_DATA1_MEM_TX_TIMER_AC_EN; + val64 = TTI_DATA1_MEM_TX_TIMER_VAL(tx_timer_val) | + TTI_DATA1_MEM_TX_URNG_A(tx_urange_a) | + TTI_DATA1_MEM_TX_URNG_B(tx_urange_b) | + TTI_DATA1_MEM_TX_URNG_C(tx_urange_c); + if (tx_utilz_periodic) + val64 |= TTI_DATA1_MEM_TX_TIMER_AC_EN; writeq(val64, &bar0->tti_data1_mem); - val64 = - TTI_DATA2_MEM_TX_UFC_A(0x10) | TTI_DATA2_MEM_TX_UFC_B(0x20) | - TTI_DATA2_MEM_TX_UFC_C(0x40) | TTI_DATA2_MEM_TX_UFC_D(0x80); + val64 = TTI_DATA2_MEM_TX_UFC_A(tx_ufc_a) | + TTI_DATA2_MEM_TX_UFC_B(tx_ufc_b) | + TTI_DATA2_MEM_TX_UFC_C(tx_ufc_c) | + TTI_DATA2_MEM_TX_UFC_D(tx_ufc_d); writeq(val64, &bar0->tti_data2_mem); val64 = TTI_CMD_MEM_WE | TTI_CMD_MEM_STROBE_NEW_CMD; @@ -834,13 +892,19 @@ } /* RTI Initialization */ - val64 = RTI_DATA1_MEM_RX_TIMER_VAL(0xFFF) | - RTI_DATA1_MEM_RX_URNG_A(0xA) | RTI_DATA1_MEM_RX_URNG_B(0x10) | - RTI_DATA1_MEM_RX_URNG_C(0x30) | RTI_DATA1_MEM_RX_TIMER_AC_EN; + val64 = RTI_DATA1_MEM_RX_TIMER_VAL(rx_timer_val) | + RTI_DATA1_MEM_RX_URNG_A(rx_urange_a) | + RTI_DATA1_MEM_RX_URNG_B(rx_urange_b) | + RTI_DATA1_MEM_RX_URNG_C(rx_urange_c); + if (rx_utilz_periodic) + val64 |= RTI_DATA1_MEM_RX_TIMER_AC_EN; + writeq(val64, &bar0->rti_data1_mem); - val64 = RTI_DATA2_MEM_RX_UFC_A(0x1) | RTI_DATA2_MEM_RX_UFC_B(0x2) | - RTI_DATA2_MEM_RX_UFC_C(0x40) | RTI_DATA2_MEM_RX_UFC_D(0x80); + val64 = RTI_DATA2_MEM_RX_UFC_A(rx_ufc_a) | + RTI_DATA2_MEM_RX_UFC_B(rx_ufc_b) | + RTI_DATA2_MEM_RX_UFC_C(rx_ufc_c) | + RTI_DATA2_MEM_RX_UFC_D(rx_ufc_d); writeq(val64, &bar0->rti_data2_mem); val64 = RTI_CMD_MEM_WE | RTI_CMD_MEM_STROBE_NEW_CMD; @@ -923,7 +987,7 @@ * exceeded the limit pointed by shared_splits */ val64 = readq(&bar0->pic_control); - val64 |= PIC_CNTL_SHARED_SPLITS(0); + val64 |= PIC_CNTL_SHARED_SPLITS(shared_splits); writeq(val64, &bar0->pic_control); return SUCCESS; @@ -1381,7 +1445,7 @@ for (i = 0; i < config->tx_fifo_num; i++) { for (j = 0; j < config->tx_cfg[i].fifo_len - 1; j++) { txdp = mac_control->txdl_start[i] + - (config->max_txds * j); + (config->max_txds * j); skb = (struct sk_buff *) ((unsigned long) txdp-> Host_Control); @@ -1807,7 +1871,12 @@ mac_control->rx_curr_get_info[i].offset = offset_info.offset; pkt_cnt++; + if ((indicate_max_pkts) + && (pkt_cnt > indicate_max_pkts)) + break; } + if ((indicate_max_pkts) && (pkt_cnt > indicate_max_pkts)) + break; } } #endif @@ -4004,7 +4073,6 @@ return SUCCESS; } - /** * s2io_link - stops/starts the Tx queue. * @sp : private member of the device structure, which is a pointer to the @@ -4088,17 +4156,23 @@ &latency_timer); } - /* Set MMRB count to 4096 in PCI-X Command register. */ + /* Set MMRB count to 2048 in PCI-X Command register. */ + sp->pcix_cmd &= 0xFFF3; pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, - (sp->pcix_cmd | 0x0C)); + (sp->pcix_cmd | (max_read_byte_cnt << 2))); pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); /* Setting Maximum outstanding splits based on system type. */ sp->pcix_cmd &= 0xFF8F; - sp->pcix_cmd |= - XENA_MAX_OUTSTANDING_SPLITS(XENA_TWO_SPLIT_TRANSACTION); + sp->pcix_cmd |= XENA_MAX_OUTSTANDING_SPLITS(max_splits_trans); + pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, + sp->pcix_cmd); + pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, + &(sp->pcix_cmd)); + /* Forcibly disabling relaxed ordering capability of the card. */ + sp->pcix_cmd &= 0xfffd; pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, sp->pcix_cmd); pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, @@ -4107,14 +4181,58 @@ MODULE_AUTHOR("Raghavendra Koushik "); MODULE_LICENSE("GPL"); -MODULE_PARM(ring_num, "1-" __MODULE_STRING(1) "i"); -MODULE_PARM(frame_len, "1-" __MODULE_STRING(8) "i"); -MODULE_PARM(ring_len, "1-" __MODULE_STRING(8) "i"); -MODULE_PARM(fifo_num, "1-" __MODULE_STRING(1) "i"); -MODULE_PARM(fifo_len, "1-" __MODULE_STRING(8) "i"); -MODULE_PARM(rx_prio, "1-" __MODULE_STRING(1) "i"); -MODULE_PARM(tx_prio, "1-" __MODULE_STRING(1) "i"); -MODULE_PARM(latency_timer, "1-" __MODULE_STRING(1) "i"); +MODULE_PARM(lso_enable, "i"); +#ifndef CONFIG_S2IO_NAPI +MODULE_PARM(indicate_max_pkts, "i"); +#endif +MODULE_PARM(cksum_offload_enable, "i"); +MODULE_PARM(tx_fifo_num, "i"); +MODULE_PARM(tx_fifo_len_0, "i"); +MODULE_PARM(tx_fifo_len_1, "i"); +MODULE_PARM(tx_fifo_len_2, "i"); +MODULE_PARM(tx_fifo_len_3, "i"); +MODULE_PARM(tx_fifo_len_4, "i"); +MODULE_PARM(tx_fifo_len_5, "i"); +MODULE_PARM(tx_fifo_len_6, "i"); +MODULE_PARM(tx_fifo_len_7, "i"); +MODULE_PARM(max_txds, "i"); +MODULE_PARM(rx_ring_num, "i"); +MODULE_PARM(rx_ring_sz_0, "i"); +MODULE_PARM(rx_ring_sz_1, "i"); +MODULE_PARM(rx_ring_sz_2, "i"); +MODULE_PARM(rx_ring_sz_3, "i"); +MODULE_PARM(rx_ring_sz_4, "i"); +MODULE_PARM(rx_ring_sz_5, "i"); +MODULE_PARM(rx_ring_sz_6, "i"); +MODULE_PARM(rx_ring_sz_7, "i"); +MODULE_PARM(Stats_refresh_time, "i"); +MODULE_PARM(rmac_pause_time, "i"); +MODULE_PARM(mc_pause_threshold_q0q3, "i"); +MODULE_PARM(mc_pause_threshold_q4q7, "i"); +MODULE_PARM(shared_splits, "i"); +MODULE_PARM(max_splits_trans, "i"); +MODULE_PARM(tmac_util_period, "i"); +MODULE_PARM(rmac_util_period, "i"); +MODULE_PARM(tx_timer_val, "i"); +MODULE_PARM(tx_utilz_periodic, "i"); +MODULE_PARM(rx_timer_val, "i"); +MODULE_PARM(rx_utilz_periodic, "i"); +MODULE_PARM(tx_urange_a, "i"); +MODULE_PARM(tx_ufc_a, "i"); +MODULE_PARM(tx_urange_b, "i"); +MODULE_PARM(tx_ufc_b, "i"); +MODULE_PARM(tx_urange_c, "i"); +MODULE_PARM(tx_ufc_c, "i"); +MODULE_PARM(tx_ufc_d, "i"); +MODULE_PARM(rx_urange_a, "i"); +MODULE_PARM(rx_ufc_a, "i"); +MODULE_PARM(rx_urange_b, "i"); +MODULE_PARM(rx_ufc_b, "i"); +MODULE_PARM(rx_urange_c, "i"); +MODULE_PARM(rx_ufc_c, "i"); +MODULE_PARM(rx_ufc_d, "i"); +MODULE_PARM(latency_timer, "i"); +MODULE_PARM(max_read_byte_cnt, "i"); /** * s2io_init_nic - Initialization of the adapter . * @pdev : structure containing the PCI related information of the device. @@ -4215,33 +4333,23 @@ config = &sp->config; /* Tx side parameters. */ - config->tx_fifo_num = fifo_num ? fifo_num : 1; - - if (!fifo_len[0] && (fifo_num > 1)) { - printk(KERN_ERR "Fifo Lens not specified for all FIFOs\n"); - goto init_failed; - } - - if (fifo_len[0]) { - int cnt; - - for (cnt = 0; fifo_len[cnt]; cnt++); - if (fifo_num) { - if (cnt < fifo_num) { - printk(KERN_ERR - "Fifo Lens not specified for "); - printk(KERN_ERR "all FIFOs\n"); - goto init_failed; - } - } - for (cnt = 0; cnt < config->tx_fifo_num; cnt++) { - config->tx_cfg[cnt].fifo_len = fifo_len[cnt]; - config->tx_cfg[cnt].fifo_priority = cnt; - } - } else { - config->tx_cfg[0].fifo_len = DEFAULT_FIFO_LEN; - config->tx_cfg[0].fifo_priority = 0; - } + config->tx_fifo_num = tx_fifo_num; + config->tx_cfg[0].fifo_len = tx_fifo_len_0; + config->tx_cfg[0].fifo_priority = 0; + config->tx_cfg[1].fifo_len = tx_fifo_len_1; + config->tx_cfg[1].fifo_priority = 1; + config->tx_cfg[2].fifo_len = tx_fifo_len_2; + config->tx_cfg[2].fifo_priority = 2; + config->tx_cfg[3].fifo_len = tx_fifo_len_3; + config->tx_cfg[3].fifo_priority = 3; + config->tx_cfg[4].fifo_len = tx_fifo_len_4; + config->tx_cfg[4].fifo_priority = 4; + config->tx_cfg[5].fifo_len = tx_fifo_len_5; + config->tx_cfg[5].fifo_priority = 5; + config->tx_cfg[6].fifo_len = tx_fifo_len_6; + config->tx_cfg[6].fifo_priority = 6; + config->tx_cfg[7].fifo_len = tx_fifo_len_7; + config->tx_cfg[7].fifo_priority = 7; config->tx_intr_type = TXD_INT_TYPE_UTILZ; for (i = 0; i < config->tx_fifo_num; i++) { @@ -4255,27 +4363,34 @@ config->max_txds = MAX_SKB_FRAGS; /* Rx side parameters. */ - config->rx_ring_num = ring_num ? ring_num : 1; + config->rx_ring_num = rx_ring_num; + config->rx_cfg[0].num_rxd = rx_ring_sz_0 * (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[0].ring_priority = 0; + config->rx_cfg[1].num_rxd = rx_ring_sz_1 * (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[1].ring_priority = 1; + config->rx_cfg[2].num_rxd = rx_ring_sz_2 * (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[2].ring_priority = 2; + config->rx_cfg[3].num_rxd = rx_ring_sz_3 * (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[3].ring_priority = 3; + config->rx_cfg[4].num_rxd = rx_ring_sz_4 * (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[4].ring_priority = 4; + config->rx_cfg[5].num_rxd = rx_ring_sz_5 * (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[5].ring_priority = 5; + config->rx_cfg[6].num_rxd = rx_ring_sz_6 * (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[6].ring_priority = 6; + config->rx_cfg[7].num_rxd = rx_ring_sz_7 * (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[7].ring_priority = 7; - if (ring_len[0]) { - int cnt; - for (cnt = 0; cnt < config->rx_ring_num; cnt++) { - config->rx_cfg[cnt].num_rxd = ring_len[cnt]; - config->rx_cfg[cnt].ring_priority = cnt; - } - } else { - config->rx_cfg[0].num_rxd = SMALL_RXD_CNT; - config->rx_cfg[0].ring_priority = 0; - } - - for (i = 0; i < config->rx_ring_num; i++) { + for (i = 0; i < rx_ring_num; i++) { config->rx_cfg[i].ring_org = RING_ORG_BUFF1; config->rx_cfg[i].f_no_snoop = (NO_SNOOP_RXD | NO_SNOOP_RXD_BUFFER); } /* Setting Mac Control parameters */ - mac_control->rmac_pause_time = 0; + mac_control->rmac_pause_time = rmac_pause_time; + mac_control->mc_pause_threshold_q0q3 = mc_pause_threshold_q0q3; + mac_control->mc_pause_threshold_q4q7 = mc_pause_threshold_q4q7; /* Initialize Ring buffer parameters. */ @@ -4334,11 +4449,14 @@ dev->weight = 90; /* For now. */ #endif - dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM; + dev->features |= NETIF_F_SG; + if (cksum_offload_enable) + dev->features |= NETIF_F_IP_CSUM; if (sp->high_dma_flag == TRUE) dev->features |= NETIF_F_HIGHDMA; #ifdef NETIF_F_TSO - dev->features |= NETIF_F_TSO; + if (lso_enable) + dev->features |= NETIF_F_TSO; #endif dev->tx_timeout = &s2io_tx_watchdog; @@ -4453,7 +4571,6 @@ bar0_remap_failed: mem_alloc_failed: free_shared_mem(sp); - init_failed: pci_disable_device(pdev); pci_release_regions(pdev); pci_set_drvdata(pdev, NULL); @@ -4503,6 +4620,8 @@ int __init s2io_starter(void) { + if (verify_load_parm()) + return -ENODEV; return pci_module_init(&s2io_driver); } @@ -4519,3 +4638,223 @@ module_init(s2io_starter); module_exit(s2io_closer); +/** + * verify_load_parm - verifies the module loadable parameters + * Descriptions: Verifies the module loadable parameters and initializes the + * Tx Fifo, Rx Ring and other paramters. + */ + +int verify_load_parm() +{ + int fail = 0; + if (!((lso_enable == 0) || (lso_enable == 1))) { + printk("lso_enable can be either '1' or '0'\n"); + fail = 1; + } +#ifndef CONFIG_S2IO_NAPI + if ((indicate_max_pkts > (0xFFFFFFFF))) { + printk + ("indicate_max_pkts can take value greater than zero but less than 2power(32)\n"); + fail = 1; + } +#endif + if (!((cksum_offload_enable == 0) || (cksum_offload_enable == 1))) { + printk("cksum_offload_enable can be only '0' or '1' \n"); + fail = 1; + } + if ((tx_fifo_num == 0) || (tx_fifo_num > 8)) { + printk("tx_fifo_num can take value from 1 to 8\n"); + fail = 1; + } + switch (tx_fifo_num) { + case 8: + if ((tx_fifo_len_7 == 0) || tx_fifo_len_7 > 8192) { + printk + ("tx_fifo_len_7 can take value from 1 to 8192\n"); + fail = 1; + } + case 7: + if ((tx_fifo_len_6 == 0) || tx_fifo_len_6 > 8192) { + printk + ("tx_fifo_len_6 can take value from 1 to 8192\n"); + fail = 1; + } + case 6: + if ((tx_fifo_len_5 == 0) || tx_fifo_len_5 > 8192) { + printk + ("tx_fifo_len_5 can take value from 1 to 8192\n"); + fail = 1; + } + case 5: + if ((tx_fifo_len_4 == 0) || tx_fifo_len_4 > 8192) { + printk + ("tx_fifo_len_4 can take value from 1 to 8192\n"); + fail = 1; + } + case 4: + if ((tx_fifo_len_3 == 0) || tx_fifo_len_3 > 8192) { + printk + ("tx_fifo_len_3 can take value from 1 to 8192\n"); + fail = 1; + } + case 3: + if ((tx_fifo_len_2 == 0) || tx_fifo_len_2 > 8192) { + printk + ("tx_fifo_len_2 can take value from 1 to 8192\n"); + fail = 1; + } + case 2: + if ((tx_fifo_len_1 == 0) || tx_fifo_len_1 > 8192) { + printk + ("tx_fifo_len_1 can take value from 1 to 8192\n"); + fail = 1; + } + case 1: + if ((tx_fifo_len_0 == 0) || tx_fifo_len_0 > 8192) { + printk + ("tx_fifo_len_0 can take value from 1 to 8192\n"); + fail = 1; + } + } + if ((max_txds > 32) || (max_txds < 1)) { + printk("max_txds can take value from 1 to 32\n"); + fail = 1; + } + if ((rx_ring_num > 8) || (rx_ring_num < 1)) { + printk("rx_ring_num can take value from 1 to 8\n"); + fail = 1; + } + switch (rx_ring_num) { + case 8: + if (rx_ring_sz_7 < 1) { + printk + ("rx_ring_sz_7 can take value greater than 0\n"); + fail = 1; + } + case 7: + if (rx_ring_sz_6 < 1) { + printk + ("rx_ring_sz_6 can take value greater than 0\n"); + fail = 1; + } + case 6: + if (rx_ring_sz_5 < 1) { + printk + ("rx_ring_sz_5 can take value greater than 0\n"); + fail = 1; + } + case 5: + if (rx_ring_sz_4 < 1) { + printk + ("rx_ring_sz_4 can take value greater than 0\n"); + fail = 1; + } + case 4: + if (rx_ring_sz_3 < 1) { + printk + ("rx_ring_sz_3 can take value greater than 0\n"); + fail = 1; + } + case 3: + if (rx_ring_sz_2 < 1) { + printk + ("rx_ring_sz_2 can take value greater than 0\n"); + fail = 1; + } + case 2: + if (rx_ring_sz_1 < 1) { + printk + ("rx_ring_sz_1 can take value greater than 0\n"); + fail = 1; + } + case 1: + if (rx_ring_sz_0 < 1) { + printk + ("rx_ring_sz_0 can take value greater than 0\n"); + fail = 1; + } + } + if ((Stats_refresh_time < 1)) { + printk + ("Stats_refresh_time cannot be less than 1 second \n"); + fail = 1; + } + if (((rmac_pause_time < 0x10) && (rmac_pause_time != 0)) || + (rmac_pause_time > 0xFFFF)) { + printk + ("rmac_pause_time can take value from 16 to 65535\n"); + fail = 1; + } + if (max_splits_trans > 7) { + printk("max_splits_trans can take value from 0 to 7\n"); + fail = 1; + } + if ((mc_pause_threshold_q0q3 > 0xFE)) { + printk("mc_pause_threshold_q0q3 cannot exceed 254\n"); + fail = 1; + } + if ((mc_pause_threshold_q4q7 > 0xFE)) { + printk("mc_pause_threshold_q4q7 cannot exceed 254\n"); + fail = 1; + } + if ((latency_timer) + && ((latency_timer < 8) || (latency_timer > 255))) { + printk("latency_timer can take value from 8 to 255\n"); + fail = 1; + } + if (max_read_byte_cnt > 3) { + printk("max_read_byte_cnt can take value from 0 to 3\n"); + fail = 1; + } + if (shared_splits > 31) { + printk("shared_splits cannot exceed 31\n"); + fail = 1; + } + if (rmac_util_period > 0xF) { + printk("rmac_util_period cannot exceed 15\n"); + fail = 1; + } + if (tmac_util_period > 0xF) { + printk("tmac_util_period cannot exceed 15\n"); + fail = 1; + } + if ((tx_utilz_periodic > 1) || (rx_utilz_periodic > 1)) { + printk + ("tx_utilz_periodic & rx_utilz_periodic can be either " + "'0' or '1'\n"); + fail = 1; + } + if (((tx_urange_a > 100) || (tx_urange_b > 100) || + (tx_urange_c > 100)) || (tx_urange_a > tx_urange_b) + || (tx_urange_b > tx_urange_c)) { + printk + ("tx_urange_a, tx_urange_b & tx_urange_c can take value " + "from 0 to 100 and range_a can't exceed range_b " + "neither can range_b exceed range_c\n"); + fail = 1; + } + if (((rx_urange_a > 100) || (rx_urange_b > 100) || + (rx_urange_c > 100)) || (rx_urange_a > rx_urange_b) + || (rx_urange_b > rx_urange_c)) { + printk + ("rx_urange_a, rx_urange_b & rx_urange_c can take value " + "from 0 to 100 and range_a can't exceed range_b " + "neither can range_b exceed range_c\n"); + fail = 1; + } + if ((tx_ufc_a > 0xffff) || (tx_ufc_b > 0xffff) || + (tx_ufc_c > 0xffff) || (tx_ufc_d > 0xffff)) { + printk + (" tx_ufc_a, tx_ufc_b, tx_ufc_c, tx_ufc_d can take value" + "from 0 to 65535(0xFFFF)\n"); + fail = 1; + } + if ((rx_ufc_a > 0xffff) || (rx_ufc_b > 0xffff) || + (rx_ufc_c > 0xffff) || (rx_ufc_d > 0xffff)) { + printk + (" rx_ufc_a, rx_ufc_b, rx_ufc_c, rx_ufc_d can take value" + "from 0 to 65535(0xFFFF)\n"); + fail = 1; + } + return fail; +} diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-11 15:33:35.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-11 15:34:23.000000000 -0700 @@ -348,9 +348,9 @@ u8 ring_priority; /*Specifies service priority of ring */ /* OSM should not set any two rings with same priority */ u8 ring_org; /*Organization of ring */ -#define RING_ORG_BUFF1 0x01 -#define RX_RING_ORG_BUFF3 0x03 -#define RX_RING_ORG_BUFF5 0x05 +#define RING_ORG_BUFF1 0x01 +#define RX_RING_ORG_BUFF3 0x03 +#define RX_RING_ORG_BUFF5 0x05 u8 f_no_snoop; #define NO_SNOOP_RXD 0x01 From ravinandan.arakali@s2io.com Thu Oct 28 11:26:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 11:26:23 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SIQGHG008307 for ; Thu, 28 Oct 2004 11:26:17 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SIPkje008513; Thu, 28 Oct 2004 14:25:46 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SIPd39012393; Thu, 28 Oct 2004 14:25:39 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , , Subject: [PATCH 2.6.9-rc2 6/12] S2io: new txd allocation Date: Thu, 28 Oct 2004 11:34:17 -0700 Message-ID: <001201c4bd1c$c92fe630$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10997 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Hi, The attached patch contains a modified scheme for allocating Tx descriptor blocks. More description follows. In the old scheme, the entire Tx descriptor space was allocated in one go. This could cause driver load to fail on systems with low(or scattered) memory. The Tx descriptor blocks are now allocated on per-page basis. A new structure (list_info) has been introduced in nic_t structure to keep track of the physical and virtual addresses of every TxD allocated this way. Signed-off-by: Raghavendra Koushik --- diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-11 16:49:34.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-11 17:20:24.000000000 -0700 @@ -305,6 +305,9 @@ remove:__devexit_p(s2io_rem_nic), }; +/* A simplifier macro used both by init and free shared_mem Fns(). */ +#define TXD_MEM_PAGE_CNT(len, per_each) ((len+per_each - 1) / per_each) + /** * init_shared_mem - Allocation and Initialization of Memory * @nic: Device private variable. @@ -320,6 +323,7 @@ dma_addr_t tmp_p_addr, tmp_p_addr_next; RxD_block_t *pre_rxd_blk = NULL; int i, j, blk_cnt; + int lst_size, lst_per_page; struct net_device *dev = nic->dev; mac_info_t *mac_control; @@ -341,39 +345,55 @@ DBG_PRINT(ERR_DBG, "that can be used\n"); return FAILURE; } - size *= (sizeof(TxD_t) * config->max_txds); - mac_control->txd_list_mem = pci_alloc_consistent - (nic->pdev, size, &mac_control->txd_list_mem_phy); - if (!mac_control->txd_list_mem) { - return -ENOMEM; - } - mac_control->txd_list_mem_sz = size; - - tmp_v_addr = mac_control->txd_list_mem; - tmp_p_addr = mac_control->txd_list_mem_phy; - memset(tmp_v_addr, 0, size); - - DBG_PRINT(INIT_DBG, "%s:List Mem PHY: 0x%llx\n", dev->name, - (unsigned long long) tmp_p_addr); + lst_size = (sizeof(TxD_t) * config->max_txds); + lst_per_page = PAGE_SIZE / lst_size; for (i = 0; i < config->tx_fifo_num; i++) { - mac_control->txdl_start_phy[i] = tmp_p_addr; - mac_control->txdl_start[i] = (TxD_t *) tmp_v_addr; + int fifo_len = config->tx_cfg[i].fifo_len; + int list_holder_size = fifo_len * sizeof(list_info_hold_t); + nic->list_info[i] = kmalloc(list_holder_size, GFP_KERNEL); + if (!nic->list_info[i]) { + DBG_PRINT(ERR_DBG, + "Malloc failed for list_info\n"); + return -ENOMEM; + } + memset(nic->list_info[i], 0, list_holder_size); + } + for (i = 0; i < config->tx_fifo_num; i++) { + int page_num = TXD_MEM_PAGE_CNT(config->tx_cfg[i].fifo_len, + lst_per_page); mac_control->tx_curr_put_info[i].offset = 0; mac_control->tx_curr_put_info[i].fifo_len = config->tx_cfg[i].fifo_len - 1; mac_control->tx_curr_get_info[i].offset = 0; mac_control->tx_curr_get_info[i].fifo_len = config->tx_cfg[i].fifo_len - 1; - - tmp_p_addr += - (config->tx_cfg[i].fifo_len * (sizeof(TxD_t)) * - config->max_txds); - tmp_v_addr += - (config->tx_cfg[i].fifo_len * (sizeof(TxD_t)) * - config->max_txds); + for (j = 0; j < page_num; j++) { + int k = 0; + dma_addr_t tmp_p; + void *tmp_v; + tmp_v = pci_alloc_consistent(nic->pdev, + PAGE_SIZE, &tmp_p); + if (!tmp_v) { + DBG_PRINT(ERR_DBG, + "pci_alloc_consistent "); + DBG_PRINT(ERR_DBG, "failed for TxDL\n"); + return -ENOMEM; + } + while (k < lst_per_page) { + int l = (j * lst_per_page) + k; + if (l == config->tx_cfg[i].fifo_len) + goto end_txd_alloc; + nic->list_info[i][l].list_virt_addr = + tmp_v + (k * lst_size); + nic->list_info[i][l].list_phy_addr = + tmp_p + (k * lst_size); + k++; + } + } } + end_txd_alloc: /* Allocation and initialization of RXDs in Rings */ size = 0; @@ -484,6 +504,7 @@ dma_addr_t tmp_p_addr; mac_info_t *mac_control; struct config_param *config; + int lst_size, lst_per_page; if (!nic) @@ -492,11 +513,23 @@ mac_control = &nic->mac_control; config = &nic->config; - if (mac_control->txd_list_mem) { - pci_free_consistent(nic->pdev, - mac_control->txd_list_mem_sz, - mac_control->txd_list_mem, - mac_control->txd_list_mem_phy); + lst_size = (sizeof(TxD_t) * config->max_txds); + lst_per_page = PAGE_SIZE / lst_size; + + for (i = 0; i < config->tx_fifo_num; i++) { + int page_num = TXD_MEM_PAGE_CNT(config->tx_cfg[i].fifo_len, + lst_per_page); + for (j = 0; j < page_num; j++) { + int mem_blks = (j * lst_per_page); + if (!nic->list_info[i][mem_blks].list_virt_addr) + break; + pci_free_consistent(nic->pdev, PAGE_SIZE, + nic->list_info[i][mem_blks]. + list_virt_addr, + nic->list_info[i][mem_blks]. + list_phy_addr); + } + kfree(nic->list_info[i]); } size = (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t)); @@ -1444,8 +1477,8 @@ for (i = 0; i < config->tx_fifo_num; i++) { for (j = 0; j < config->tx_cfg[i].fifo_len - 1; j++) { - txdp = mac_control->txdl_start[i] + - (config->max_txds * j); + txdp = (TxD_t *) nic->list_info[i][j]. + list_virt_addr; skb = (struct sk_buff *) ((unsigned long) txdp-> Host_Control); @@ -1460,6 +1493,8 @@ DBG_PRINT(INTR_DBG, "%s:forcibly freeing %d skbs on FIFO%d\n", dev->name, cnt, i); + mac_control->tx_curr_get_info[i].offset = 0; + mac_control->tx_curr_put_info[i].offset = 0; } } @@ -1896,7 +1931,7 @@ { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; struct net_device *dev = (struct net_device *) nic->dev; - tx_curr_get_info_t offset_info, offset_info1; + tx_curr_get_info_t get_info, put_info; struct sk_buff *skb; TxD_t *txdlp; register u64 val64 = 0; @@ -1916,12 +1951,12 @@ writeq(val64, &bar0->tx_traffic_int); for (i = 0; i < config->tx_fifo_num; i++) { - offset_info = mac_control->tx_curr_get_info[i]; - offset_info1 = mac_control->tx_curr_put_info[i]; - txdlp = mac_control->txdl_start[i] + - (config->max_txds * offset_info.offset); + get_info = mac_control->tx_curr_get_info[i]; + put_info = mac_control->tx_curr_put_info[i]; + txdlp = (TxD_t *) nic->list_info[i][get_info.offset]. + list_virt_addr; while ((!(txdlp->Control_1 & TXD_LIST_OWN_XENA)) && - (offset_info.offset != offset_info1.offset) && + (get_info.offset != put_info.offset) && (txdlp->Host_Control)) { /* Check for TxD errors */ if (txdlp->Control_1 & TXD_T_CODE) { @@ -1971,12 +2006,12 @@ nic->stats.tx_bytes += skb->len; dev_kfree_skb_irq(skb); - offset_info.offset++; - offset_info.offset %= offset_info.fifo_len + 1; - txdlp = mac_control->txdl_start[i] + - (config->max_txds * offset_info.offset); + get_info.offset++; + get_info.offset %= get_info.fifo_len + 1; + txdlp = (TxD_t *) nic->list_info[i] + [get_info.offset].list_virt_addr; mac_control->tx_curr_get_info[i].offset = - offset_info.offset; + get_info.offset; } } @@ -2327,7 +2362,9 @@ XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; register u64 val64 = 0; u16 cnt = 0; + unsigned long flags; + spin_lock_irqsave(&sp->tx_lock, flags); netif_stop_queue(dev); /* disable Tx and Rx traffic on the NIC */ @@ -2381,6 +2418,7 @@ free_rx_buffers(sp); sp->device_close_flag = TRUE; /* Device is shut down. */ + spin_unlock_irqrestore(&sp->tx_lock, flags); return 0; } @@ -2401,7 +2439,7 @@ int s2io_xmit(struct sk_buff *skb, struct net_device *dev) { nic_t *sp = dev->priv; - u16 off, txd_len, frg_cnt, frg_len, i, queue, off1, queue_len; + u16 frg_cnt, frg_len, i, queue, queue_len, put_off, get_off; register u64 val64; TxD_t *txdp; TxFIFO_element_t *tx_fifo; @@ -2419,6 +2457,14 @@ DBG_PRINT(TX_DBG, "%s: In S2IO Tx routine\n", dev->name); spin_lock_irqsave(&sp->tx_lock, flags); + if ((netif_queue_stopped(dev)) || (!netif_carrier_ok(dev))) { + DBG_PRINT(TX_DBG, "%s:s2io_xmit: Tx Queue stopped\n", + dev->name); + dev_kfree_skb(skb); + spin_unlock_irqrestore(&sp->tx_lock, flags); + return 0; + } + queue = 0; /* Multi FIFO Tx is disabled for now. */ if (!queue && tx_prio) { @@ -2427,14 +2473,13 @@ } - off = (u16) mac_control->tx_curr_put_info[queue].offset; - off1 = (u16) mac_control->tx_curr_get_info[queue].offset; - txd_len = config->max_txds; - txdp = mac_control->txdl_start[queue] + (config->max_txds * off); + put_off = (u16) mac_control->tx_curr_put_info[queue].offset; + get_off = (u16) mac_control->tx_curr_get_info[queue].offset; + txdp = (TxD_t *) sp->list_info[queue][put_off].list_virt_addr; queue_len = mac_control->tx_curr_put_info[queue].fifo_len + 1; /* Avoid "put" pointer going beyond "get" pointer */ - if (txdp->Host_Control || (((off + 1) % queue_len) == off1)) { + if (txdp->Host_Control || (((put_off + 1) % queue_len) == get_off)) { DBG_PRINT(ERR_DBG, "Error in xmit, No free TXDs.\n"); netif_stop_queue(dev); dev_kfree_skb(skb); @@ -2479,8 +2524,7 @@ txdp->Control_1 |= TXD_GATHER_CODE_LAST; tx_fifo = mac_control->tx_FIFO_start[queue]; - val64 = (mac_control->txdl_start_phy[queue] + - (sizeof(TxD_t) * txd_len * off)); + val64 = sp->list_info[queue][put_off].list_phy_addr; writeq(val64, &tx_fifo->TxDL_Pointer); val64 = (TX_FIFO_LAST_TXD_NUM(frg_cnt) | TX_FIFO_FIRST_LIST | @@ -2494,15 +2538,15 @@ /* Perform a PCI read to flush previous writes */ val64 = readq(&bar0->general_int_status); - off++; - off %= mac_control->tx_curr_put_info[queue].fifo_len + 1; - mac_control->tx_curr_put_info[queue].offset = off; + put_off++; + put_off %= mac_control->tx_curr_put_info[queue].fifo_len + 1; + mac_control->tx_curr_put_info[queue].offset = put_off; /* Avoid "put" pointer going beyond "get" pointer */ - if (((off + 1) % queue_len) == off1) { + if (((put_off + 1) % queue_len) == get_off) { DBG_PRINT(TX_DBG, "No free TxDs for xmit, Put: 0x%x Get:0x%x\n", - off, off1); + put_off, get_off); netif_stop_queue(dev); } @@ -3070,7 +3114,7 @@ } /** - * s2io_ethtool-setpause_data - set/reset pause frame generation. + * s2io_ethtool_setpause_data - set/reset pause frame generation. * @sp : private member of the device structure, which is a pointer to the * s2io_nic structure. * @ep : pointer to the structure with pause parameters given by ethtool. diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-11 16:49:34.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-11 17:20:24.000000000 -0700 @@ -444,6 +444,12 @@ u64 Host_Control; /* reserved for host */ } TxD_t; +/* Structure to hold the phy and virt addr of every TxDL. */ +typedef struct list_info_hold { + dma_addr_t list_phy_addr; + void *list_virt_addr; +} list_info_hold_t; + /* Rx descriptor structure */ typedef struct _RxD_t { u64 Host_Control; /* reserved for host */ @@ -532,17 +538,9 @@ u16 mc_pause_threshold_q4q7; /* tx side stuff */ - void *txd_list_mem; /* original pointer to allocated mem */ - dma_addr_t txd_list_mem_phy; - u32 txd_list_mem_sz; - /* logical pointer of start of each Tx FIFO */ TxFIFO_element_t *tx_FIFO_start[MAX_TX_FIFOS]; - /* The Phy and virtual mem loactions of the Tx descriptors. */ - TxD_t *txdl_start[MAX_TX_FIFOS]; - dma_addr_t txdl_start_phy[MAX_TX_FIFOS]; - /* Current offset within tx_FIFO_start, where driver would write new Tx frame*/ tx_curr_put_info_t tx_curr_put_info[MAX_TX_FIFOS]; tx_curr_get_info_t tx_curr_get_info[MAX_TX_FIFOS]; @@ -638,6 +636,9 @@ int block_count[MAX_RX_RINGS]; int pkt_cnt[MAX_RX_RINGS]; + /* Place holder of all the TX List's Phy and Virt addresses. */ + list_info_hold_t *list_info[MAX_TX_FIFOS]; + /* Id timer, used to blink NIC to physically identify NIC. */ struct timer_list id_timer; From ravinandan.arakali@s2io.com Thu Oct 28 11:25:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 11:25:58 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SIPqeh008069 for ; Thu, 28 Oct 2004 11:25:52 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SIPNje008505; Thu, 28 Oct 2004 14:25:23 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SIPK39012316; Thu, 28 Oct 2004 14:25:20 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , , Subject: [PATCH 2.6.9-rc2 4/12] S2io: hardware fixes Date: Thu, 28 Oct 2004 11:34:05 -0700 Message-ID: <001001c4bd1c$be183d10$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10994 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Hi, Following are the code changes addressing the hardware errata mentioned in user guide. 1. Xena3's with a set of subsystem IDs had Link LED problems, fixed that specifically for them. 2. To write into the Keyed Mac_Cfg register to enable broadcast, writing two 32 bit writes into it along with a write to the key register rather than a single write to key and a 64 bit write to mac_cfg. This is necessary on 32 bit systems where a writeq(64 bit write) is actually two writel (32 bit writes). 3. Writes to some special registers mentioned in UG is being done by a special macro which defines which 32 bits of the 64 bit register is to be written first. Again this applies only on 32 bit systems. 4. Configured pause frame related water marks and a shared_split value which describes the Max TXDMA related split transaction that can be used without giving room for the Rx transactions. 5. The mac_rmac_err_reg R1 register will be cleared in the interrupt handler itself rather than in the scheduled task as was being done previously. 6. Even on PCC_FB_ECC error the card will be reset by disabling adapter enable bit. Signed-off-by: Raghavendra Koushik --- diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-07 11:44:04.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-07 11:45:41.000000000 -0700 @@ -71,6 +71,15 @@ static char s2io_driver_name[] = "s2io"; static char s2io_driver_version[] = "Version 1.7.5.1"; +/* + * Cards with following subsystem_id have a link state indication + * problem, 600B, 600C, 600D, 640B, 640C and 640D. + * macro below identifies these cards given the subsystem_id. + */ +#define CARDS_WITH_FAULTY_LINK_INDICATORS(subid) \ + (((subid >= 0x600B) && (subid <= 0x600D)) || \ + ((subid >= 0x640B) && (subid <= 0x640D))) ? 1 : 0 + #define LINK_IS_UP(val64) (!(val64 & (ADAPTER_STATUS_RMAC_REMOTE_FAULT | \ ADAPTER_STATUS_RMAC_LOCAL_FAULT))) #define TASKLET_IN_USE test_and_set_bit(0, \ @@ -563,10 +572,13 @@ schedule_timeout(HZ / 2); /* Enable Receiving broadcasts */ + add = (void *) &bar0->mac_cfg; val64 = readq(&bar0->mac_cfg); val64 |= MAC_RMAC_BCAST_ENABLE; writeq(RMAC_CFG_KEY(0x4C0D), &bar0->rmac_cfg_key); - writeq(val64, &bar0->mac_cfg); + writel((u32) val64, add); + writeq(RMAC_CFG_KEY(0x4C0D), &bar0->rmac_cfg_key); + writel((u32) (val64 >> 32), (add + 4)); /* Read registers in all blocks */ val64 = readq(&bar0->mac_int_mask); @@ -598,8 +610,8 @@ dtx_cnt++; goto mdio_cfg; } - writeq(default_dtx_cfg[dtx_cnt], - &bar0->dtx_control); + SPECIAL_REG_WRITE(default_dtx_cfg[dtx_cnt], + &bar0->dtx_control, UF); val64 = readq(&bar0->dtx_control); dtx_cnt++; } @@ -609,8 +621,8 @@ mdio_cnt++; goto dtx_cfg; } - writeq(default_mdio_cfg[mdio_cnt], - &bar0->mdio_control); + SPECIAL_REG_WRITE(default_mdio_cfg[mdio_cnt], + &bar0->mdio_control, UF); val64 = readq(&bar0->mdio_control); mdio_cnt++; } @@ -873,6 +885,47 @@ writel((u32) (val64 >> 32), (add + 4)); val64 = readq(&bar0->mac_cfg); + /* + * Set the time value to be inserted in the pause frame + * generated by xena. + */ + val64 = readq(&bar0->rmac_pause_cfg); + val64 &= ~(RMAC_PAUSE_HG_PTIME(0xffff)); + val64 |= RMAC_PAUSE_HG_PTIME(nic->mac_control.rmac_pause_time); + writeq(val64, &bar0->rmac_pause_cfg); + + /* + * Set the Threshold Limit for Generating the pause frame + * If the amount of data in any Queue exceeds ratio of + * (mac_control.mc_pause_threshold_q0q3 or q4q7)/256 + * pause frame is generated + */ + val64 = 0; + for (i = 0; i < 4; i++) { + val64 |= + (((u64) 0xFF00 | nic->mac_control. + mc_pause_threshold_q0q3) + << (i * 2 * 8)); + } + writeq(val64, &bar0->mc_pause_thresh_q0q3); + + val64 = 0; + for (i = 0; i < 4; i++) { + val64 |= + (((u64) 0xFF00 | nic->mac_control. + mc_pause_threshold_q4q7) + << (i * 2 * 8)); + } + writeq(val64, &bar0->mc_pause_thresh_q4q7); + + /* + * TxDMA will stop Read request if the number of read split has + * exceeded the limit pointed by shared_splits + */ + val64 = readq(&bar0->pic_control); + val64 |= PIC_CNTL_SHARED_SPLITS(0); + writeq(val64, &bar0->pic_control); + return SUCCESS; } @@ -1227,7 +1280,7 @@ */ val64 = readq(&bar0->mc_rldram_mrs); val64 |= MC_RLDRAM_QUEUE_SIZE_ENABLE | MC_RLDRAM_MRS_ENABLE; - writeq(val64, &bar0->mc_rldram_mrs); + SPECIAL_REG_WRITE(val64, &bar0->mc_rldram_mrs, UF); val64 = readq(&bar0->mc_rldram_mrs); set_current_state(TASK_UNINTERRUPTIBLE); @@ -1291,13 +1344,13 @@ * force link down. Since link is already up, we will get * link state change interrupt after this reset */ - writeq(0x80010515001E0000ULL, &bar0->dtx_control); + SPECIAL_REG_WRITE(0x80010515001E0000ULL, &bar0->dtx_control, UF); val64 = readq(&bar0->dtx_control); udelay(50); - writeq(0x80010515001E00E0ULL, &bar0->dtx_control); + SPECIAL_REG_WRITE(0x80010515001E00E0ULL, &bar0->dtx_control, UF); val64 = readq(&bar0->dtx_control); udelay(50); - writeq(0x80070515001F00E4ULL, &bar0->dtx_control); + SPECIAL_REG_WRITE(0x80070515001F00E4ULL, &bar0->dtx_control, UF); val64 = readq(&bar0->dtx_control); udelay(50); @@ -1884,6 +1937,7 @@ /* Handling link status change error Intr */ err_reg = readq(&bar0->mac_rmac_err_reg); + writeq(err_reg, &bar0->mac_rmac_err_reg); if (err_reg & RMAC_LINK_STATE_CHANGE_INT) { schedule_work(&nic->set_link_task); } @@ -1896,6 +1950,22 @@ schedule_work(&nic->rst_timer_task); } + /* + * Also as mentioned in the latest Errata sheets if the PCC_FB_ECC + * Error occurs, the adapter will be recycled by disabling the + * adapter enable bit and enabling it again after the device + * becomes Quiescent. + */ + val64 = readq(&bar0->pcc_err_reg); + writeq(val64, &bar0->pcc_err_reg); + if (val64 & PCC_FB_ECC_DB_ERR) { + u64 ac = readq(&bar0->adapter_control); + ac &= ~(ADAPTER_CNTL_EN); + writeq(ac, &bar0->adapter_control); + ac = readq(&bar0->adapter_control); + schedule_work(&nic->set_link_task); + } + /* Other type of interrupts are not being handled now, TODO */ } @@ -2870,12 +2940,13 @@ static int s2io_ethtool_idnic(struct net_device *dev, u32 data) { - u64 val64 = 0; + u64 val64 = 0, last_gpio_ctrl_val; nic_t *sp = dev->priv; XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; u16 subid; subid = sp->pdev->subsystem_device; + last_gpio_ctrl_val = readq(&bar0->gpio_control); if ((subid & 0xFF) < 0x07) { val64 = readq(&bar0->adapter_control); if (!(val64 & ADAPTER_CNTL_EN)) { @@ -2897,6 +2968,11 @@ schedule_timeout(MAX_SCHEDULE_TIMEOUT); del_timer_sync(&sp->id_timer); + if (CARDS_WITH_FAULTY_LINK_INDICATORS(subid)) { + writeq(last_gpio_ctrl_val, &bar0->gpio_control); + last_gpio_ctrl_val = readq(&bar0->gpio_control); + } + return 0; } @@ -2983,7 +3059,7 @@ val64 = I2C_CONTROL_DEV_ID(S2IO_DEV_ID) | I2C_CONTROL_ADDR(off) | I2C_CONTROL_BYTE_CNT(0x3) | I2C_CONTROL_READ | I2C_CONTROL_CNTL_START; - writeq(val64, &bar0->i2c_control); + SPECIAL_REG_WRITE(val64, &bar0->i2c_control, LF); while (exit_cnt < 5) { val64 = readq(&bar0->i2c_control); @@ -3024,7 +3100,7 @@ val64 = I2C_CONTROL_DEV_ID(S2IO_DEV_ID) | I2C_CONTROL_ADDR(off) | I2C_CONTROL_BYTE_CNT(cnt) | I2C_CONTROL_SET_DATA(data) | I2C_CONTROL_CNTL_START; - writeq(val64, &bar0->i2c_control); + SPECIAL_REG_WRITE(val64, &bar0->i2c_control, LF); while (exit_cnt < 5) { val64 = readq(&bar0->i2c_control); @@ -3352,10 +3428,10 @@ val64 = readq(&bar0->mc_rldram_mrs); val64 |= MC_RLDRAM_QUEUE_SIZE_ENABLE; - writeq(val64, &bar0->mc_rldram_mrs); + SPECIAL_REG_WRITE(val64, &bar0->mc_rldram_mrs, UF); val64 |= MC_RLDRAM_MRS_ENABLE; - writeq(val64, &bar0->mc_rldram_mrs); + SPECIAL_REG_WRITE(val64, &bar0->mc_rldram_mrs, UF); while (iteration < 2) { val64 = 0x55555555aaaa0000ULL; @@ -3757,8 +3833,10 @@ nic_t *nic = (nic_t *) data; struct net_device *dev = nic->dev; XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; - register u64 val64, err_reg; + register u64 val64; + u16 subid; + subid = nic->pdev->subsystem_device; /* * Allow a small delay for the NICs self initiated * cleanup to complete. @@ -3768,16 +3846,19 @@ val64 = readq(&bar0->adapter_status); if (verify_xena_quiescence(val64, nic->device_enabled_once)) { - /* Acknowledge Intr and clear R1 register. */ - err_reg = readq(&bar0->mac_rmac_err_reg); - writeq(err_reg, &bar0->mac_rmac_err_reg); - if (LINK_IS_UP(val64)) { val64 = readq(&bar0->adapter_control); val64 |= ADAPTER_CNTL_EN; writeq(val64, &bar0->adapter_control); - val64 |= ADAPTER_LED_ON; - writeq(val64, &bar0->adapter_control); + if (CARDS_WITH_FAULTY_LINK_INDICATORS(subid)) { + val64 = readq(&bar0->gpio_control); + val64 |= GPIO_CTRL_GPIO_0; + writeq(val64, &bar0->gpio_control); + val64 = readq(&bar0->gpio_control); + } else { + val64 |= ADAPTER_LED_ON; + writeq(val64, &bar0->adapter_control); + } val64 = readq(&bar0->adapter_status); if (!LINK_IS_UP(val64)) { DBG_PRINT(ERR_DBG, "%s:", dev->name); @@ -3791,6 +3872,12 @@ } s2io_link(nic, LINK_UP); } else { + if (CARDS_WITH_FAULTY_LINK_INDICATORS(subid)) { + val64 = readq(&bar0->gpio_control); + val64 &= ~GPIO_CTRL_GPIO_0; + writeq(val64, &bar0->gpio_control); + val64 = readq(&bar0->gpio_control); + } s2io_link(nic, LINK_DOWN); } } else { /* NIC is not Quiescent. */ @@ -3917,6 +4004,7 @@ return SUCCESS; } + /** * s2io_link - stops/starts the Tx queue. * @sp : private member of the device structure, which is a pointer to the diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-07 11:44:04.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-08 15:20:09.316690064 -0700 @@ -693,6 +693,27 @@ writel((u32) (val), addr); writel((u32) (val >> 32), (addr + 4)); } + +/* In 32 bit modes, some registers have to be written in a + * particular order to expect correct hardware operation. The + * macro SPECIAL_REG_WRITE is used to perform such ordered + * writes. Defines UF (Upper First) and LF (Lower First) will + * be used to specify the required write order. + */ +#define UF 1 +#define LF 2 +static inline void SPECIAL_REG_WRITE(u64 val, void *addr, int order) +{ + if (order == LF) { + writel((u32) (val), addr); + writel((u32) (val >> 32), (addr + 4)); + } else { + writel((u32) (val >> 32), (addr + 4)); + writel((u32) (val), addr); + } +} +#else +#define SPECIAL_REG_WRITE(val, addr, dummy) writeq(val, addr) #endif /* Interrupt related values of Xena */ From ravinandan.arakali@s2io.com Thu Oct 28 11:26:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 11:26:33 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SIQLjQ008430 for ; Thu, 28 Oct 2004 11:26:23 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SIPqje008516; Thu, 28 Oct 2004 14:25:52 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SIPn39012463; Thu, 28 Oct 2004 14:25:49 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , , Subject: [PATCH 2.6.9-rc2 7/12] S2io: NAPI fix Date: Thu, 28 Oct 2004 11:34:22 -0700 Message-ID: <001301c4bd1c$cf5a44b0$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10998 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Hi, This patch contains the following NAPI related fixes. 1. When processing Rx packets, making sure that get offset of ring does not cross the put offset. 2. when NAPI is not in use a new spinlock(put_lock) is used to make sure accessing put offset of ring is atomic. 3. Also introduced a new vaiable put_pos in nic_t to keep track of absolute position of the put pointer of Rx ring. 4. When NAPI is used, fill_rx_buffer is not called from the interrupt handler(s2io_isr) . 5. In s2io_poll, decrementing packets processed is done inside the while loop unlike out side it as was being done last time. Signed-off-by: Raghavendra Koushik --- diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-11 21:19:25.051771008 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-11 21:19:44.674787856 -0700 @@ -1565,6 +1565,9 @@ atomic_read(&nic->rx_bufs_left[ring_no]); mac_info_t *mac_control; struct config_param *config; +#ifndef CONFIG_S2IO_NAPI + unsigned long flags; +#endif mac_control = &nic->mac_control; config = &nic->config; @@ -1612,6 +1615,12 @@ DBG_PRINT(INTR_DBG, "%s: Next block at: %p\n", dev->name, rxdp); } +#ifndef CONFIG_S2IO_NAPI + spin_lock_irqsave(&nic->put_lock, flags); + nic->put_pos[ring_no] = (block_no * + (MAX_RXDS_PER_BLOCK + 1)) + off; + spin_unlock_irqrestore(&nic->put_lock, flags); +#endif if (rxdp->Control_1 & RXD_OWN_XENA) { mac_control->rx_curr_put_info[ring_no]. @@ -1730,8 +1739,8 @@ XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; int pkts_to_process = *budget, pkt_cnt = 0; register u64 val64 = 0; - rx_curr_get_info_t offset_info; - int i, block_no; + rx_curr_get_info_t get_info, put_info; + int i, get_block, put_block, get_offset, put_offset, ring_bufs; u16 val16, cksum; struct sk_buff *skb; RxD_t *rxdp; @@ -1748,29 +1757,40 @@ writeq(val64, &bar0->rx_traffic_int); for (i = 0; i < config->rx_ring_num; i++) { - if (--pkts_to_process < 0) { - goto no_rx; - } - offset_info = mac_control->rx_curr_get_info[i]; - block_no = offset_info.block_index; - rxdp = nic->rx_blocks[i][block_no].block_virt_addr + - offset_info.offset; - while (!(rxdp->Control_1 & RXD_OWN_XENA)) { + get_info = mac_control->rx_curr_get_info[i]; + get_block = get_info.block_index; + put_info = mac_control->rx_curr_put_info[i]; + put_block = put_info.block_index; + ring_bufs = config->rx_cfg[i].num_rxd; + rxdp = nic->rx_blocks[i][get_block].block_virt_addr + + get_info.offset; + get_offset = (get_block * (MAX_RXDS_PER_BLOCK + 1)) + + get_info.offset; + put_offset = (put_block * (MAX_RXDS_PER_BLOCK + 1)) + + put_info.offset; + while ((!(rxdp->Control_1 & RXD_OWN_XENA)) && + (((get_offset + 1) % ring_bufs) != put_offset)) { + if (--pkts_to_process < 0) { + goto no_rx; + } if (rxdp->Control_1 == END_OF_BLOCK) { rxdp = (RxD_t *) ((unsigned long) rxdp-> Control_2); - offset_info.offset++; - offset_info.offset %= + get_info.offset++; + get_info.offset %= (MAX_RXDS_PER_BLOCK + 1); - block_no++; - block_no %= nic->block_count[i]; + get_block++; + get_block %= nic->block_count[i]; mac_control->rx_curr_get_info[i]. - offset = offset_info.offset; + offset = get_info.offset; mac_control->rx_curr_get_info[i]. - block_index = block_no; + block_index = get_block; continue; } + get_offset = + (get_block * (MAX_RXDS_PER_BLOCK + 1)) + + get_info.offset; skb = (struct sk_buff *) ((unsigned long) rxdp-> Host_Control); @@ -1778,7 +1798,7 @@ DBG_PRINT(ERR_DBG, "%s: The skb is ", dev->name); DBG_PRINT(ERR_DBG, "Null in Rx Intr\n"); - return 0; + goto no_rx; } val64 = RXD_GET_BUFFER0_SIZE(rxdp->Control_2); val16 = (u16) (val64 >> 48); @@ -1792,34 +1812,44 @@ PCI_DMA_FROMDEVICE); rx_osm_handler(nic, val16, rxdp, i); pkt_cnt++; - offset_info.offset++; - offset_info.offset %= (MAX_RXDS_PER_BLOCK + 1); + get_info.offset++; + get_info.offset %= (MAX_RXDS_PER_BLOCK + 1); rxdp = - nic->rx_blocks[i][block_no].block_virt_addr + - offset_info.offset; + nic->rx_blocks[i][get_block].block_virt_addr + + get_info.offset; mac_control->rx_curr_get_info[i].offset = - offset_info.offset; + get_info.offset; } } if (!pkt_cnt) pkt_cnt = 1; - for (i = 0; i < config->rx_ring_num; i++) - fill_rx_buffers(nic, i); - dev->quota -= pkt_cnt; *budget -= pkt_cnt; netif_rx_complete(dev); + for (i = 0; i < config->rx_ring_num; i++) { + if (fill_rx_buffers(nic, i) == -ENOMEM) { + DBG_PRINT(ERR_DBG, "%s:Out of memory", dev->name); + DBG_PRINT(ERR_DBG, " in Rx Poll!!\n"); + break; + } + } /* Re enable the Rx interrupts. */ en_dis_able_nic_intrs(nic, RX_TRAFFIC_INTR, ENABLE_INTRS); return 0; no_rx: - for (i = 0; i < config->rx_ring_num; i++) - fill_rx_buffers(nic, i); dev->quota -= pkt_cnt; *budget -= pkt_cnt; + + for (i = 0; i < config->rx_ring_num; i++) { + if (fill_rx_buffers(nic, i) == -ENOMEM) { + DBG_PRINT(ERR_DBG, "%s:Out of memory", dev->name); + DBG_PRINT(ERR_DBG, " in Rx Poll!!\n"); + break; + } + } return 1; } #else @@ -1840,12 +1870,13 @@ { struct net_device *dev = (struct net_device *) nic->dev; XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; - rx_curr_get_info_t offset_info; + rx_curr_get_info_t get_info, put_info; RxD_t *rxdp; struct sk_buff *skb; u16 val16, cksum; register u64 val64 = 0; - int i, block_no, pkt_cnt = 0; + int get_block, get_offset, put_block, put_offset, ring_bufs; + int i, pkt_cnt = 0; mac_info_t *mac_control; struct config_param *config; @@ -1860,25 +1891,37 @@ writeq(val64, &bar0->rx_traffic_int); for (i = 0; i < config->rx_ring_num; i++) { - offset_info = mac_control->rx_curr_get_info[i]; - block_no = offset_info.block_index; - rxdp = nic->rx_blocks[i][block_no].block_virt_addr + - offset_info.offset; - while (!(rxdp->Control_1 & RXD_OWN_XENA)) { + get_info = mac_control->rx_curr_get_info[i]; + get_block = get_info.block_index; + put_info = mac_control->rx_curr_put_info[i]; + put_block = put_info.block_index; + ring_bufs = config->rx_cfg[i].num_rxd; + rxdp = nic->rx_blocks[i][get_block].block_virt_addr + + get_info.offset; + get_offset = (get_block * (MAX_RXDS_PER_BLOCK + 1)) + + get_info.offset; + spin_lock(&nic->put_lock); + put_offset = nic->put_pos[i]; + spin_unlock(&nic->put_lock); + while ((!(rxdp->Control_1 & RXD_OWN_XENA)) && + (((get_offset + 1) % ring_bufs) != put_offset)) { if (rxdp->Control_1 == END_OF_BLOCK) { rxdp = (RxD_t *) ((unsigned long) rxdp->Control_2); - offset_info.offset++; - offset_info.offset %= + get_info.offset++; + get_info.offset %= (MAX_RXDS_PER_BLOCK + 1); - block_no++; - block_no %= nic->block_count[i]; + get_block++; + get_block %= nic->block_count[i]; mac_control->rx_curr_get_info[i]. - offset = offset_info.offset; + offset = get_info.offset; mac_control->rx_curr_get_info[i]. - block_index = block_no; + block_index = get_block; continue; } + get_offset = + (get_block * (MAX_RXDS_PER_BLOCK + 1)) + + get_info.offset; skb = (struct sk_buff *) ((unsigned long) rxdp->Host_Control); if (skb == NULL) { @@ -1898,13 +1941,13 @@ HEADER_SNAP_SIZE, PCI_DMA_FROMDEVICE); rx_osm_handler(nic, val16, rxdp, i); - offset_info.offset++; - offset_info.offset %= (MAX_RXDS_PER_BLOCK + 1); + get_info.offset++; + get_info.offset %= (MAX_RXDS_PER_BLOCK + 1); rxdp = - nic->rx_blocks[i][block_no].block_virt_addr + - offset_info.offset; + nic->rx_blocks[i][get_block].block_virt_addr + + get_info.offset; mac_control->rx_curr_get_info[i].offset = - offset_info.offset; + get_info.offset; pkt_cnt++; if ((indicate_max_pkts) && (pkt_cnt > indicate_max_pkts)) @@ -2575,6 +2618,9 @@ struct net_device *dev = (struct net_device *) dev_id; nic_t *sp = dev->priv; XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; +#ifndef CONFIG_S2IO_NAPI + int i, ret; +#endif u64 reason = 0; mac_info_t *mac_control; struct config_param *config; @@ -2626,44 +2672,31 @@ * reallocate the buffers from the interrupt handler itself, * else schedule a tasklet to reallocate the buffers. */ -#if 1 - { - int i; - - for (i = 0; i < config->rx_ring_num; i++) { - int rxb_size = atomic_read(&sp->rx_bufs_left[i]); - int level = rx_buffer_level(sp, rxb_size, i); - - if ((level == PANIC) && (!TASKLET_IN_USE)) { - int ret; +#ifndef CONFIG_S2IO_NAPI + for (i = 0; i < config->rx_ring_num; i++) { + int rxb_size = atomic_read(&sp->rx_bufs_left[i]); + int level = rx_buffer_level(sp, rxb_size, i); - DBG_PRINT(INTR_DBG, "%s: Rx BD hit ", + if ((level == PANIC) && (!TASKLET_IN_USE)) { + DBG_PRINT(INTR_DBG, "%s: Rx BD hit ", dev->name); + DBG_PRINT(INTR_DBG, "PANIC levels\n"); + if ((ret = fill_rx_buffers(sp, i)) == -ENOMEM) { + DBG_PRINT(ERR_DBG, "%s:Out of memory", dev->name); - DBG_PRINT(INTR_DBG, "PANIC levels\n"); - if ((ret = - fill_rx_buffers(sp, i)) == -ENOMEM) { - DBG_PRINT(ERR_DBG, - "%s:Out of memory", - dev->name); - DBG_PRINT(ERR_DBG, " in ISR!!\n"); - clear_bit(0, - (unsigned long *) (&sp-> - tasklet_status)); - return IRQ_HANDLED; - } + DBG_PRINT(ERR_DBG, " in ISR!!\n"); clear_bit(0, (unsigned long *) (&sp-> tasklet_status)); - } else if ((level == LOW) - && (!atomic_read(&sp->tasklet_status))) { - tasklet_schedule(&sp->task); + return IRQ_HANDLED; } - + clear_bit(0, + (unsigned long *) (&sp->tasklet_status)); + } else if ((level == LOW) + && (!atomic_read(&sp->tasklet_status))) { + tasklet_schedule(&sp->task); } } -#else - tasklet_schedule(&sp->task); #endif return IRQ_HANDLED; @@ -4583,6 +4616,9 @@ /* Initialize spinlocks */ spin_lock_init(&sp->tx_lock); +#ifndef CONFIG_S2IO_NAPI + spin_lock_init(&sp->put_lock); +#endif /* * SXE-002: Configure link and activity LED to init state diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-11 21:19:25.051771008 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-11 21:19:44.674787856 -0700 @@ -610,6 +610,9 @@ atomic_t rx_bufs_left[MAX_RX_RINGS]; spinlock_t tx_lock; +#ifndef CONFIG_S2IO_NAPI + spinlock_t put_lock; +#endif #define PROMISC 1 #define ALL_MULTI 2 @@ -628,6 +631,11 @@ u16 tx_err_count; u16 rx_err_count; +#ifndef CONFIG_S2IO_NAPI + /* Index to the absolute position of the put pointer of Rx ring. */ + int put_pos[MAX_RX_RINGS]; +#endif + /* * Place holders for the virtual and physical addresses of * all the Rx Blocks From ravinandan.arakali@s2io.com Thu Oct 28 11:25:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 11:26:02 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SIPhEE008049 for ; Thu, 28 Oct 2004 11:25:43 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SIOsje008489; Thu, 28 Oct 2004 14:24:55 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SIOj39011746; Thu, 28 Oct 2004 14:24:46 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , , Subject: [PATCH 2.6.9-rc2 1/12] S2io: cosmetic changes Date: Thu, 28 Oct 2004 11:33:46 -0700 Message-ID: <000d01c4bd1c$a8ef5e50$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10995 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Hi All, This is the first patch in the 12 part series. As requested earlier, I am resending the first 8 patches which were reviewed earlier. The patches 9 to 12 incorporate comments received on the first 8 patches. This first patch contains mostly cosmetic changes and few other changes. Following is the complete list of changes. 1. Indentation, change in comment styles, variable name changes etc. 2. Changed the value written to dtx_control register to force XGXS reset. 3. weight parameter(NAPI) changed to 90 for better performance. Signed-off-by: Raghavendra Koushik --- diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-06 11:31:09.552305224 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-06 13:03:08.087360376 -0700 @@ -69,7 +69,7 @@ /* S2io Driver name & version. */ static char s2io_driver_name[] = "s2io"; -static char s2io_driver_version[] = "Version 1.0"; +static char s2io_driver_version[] = "Version 1.7.5.1"; #define LINK_IS_UP(val64) (!(val64 & (ADAPTER_STATUS_RMAC_REMOTE_FAULT | \ ADAPTER_STATUS_RMAC_LOCAL_FAULT))) @@ -99,45 +99,45 @@ }; static char ethtool_stats_keys[][ETH_GSTRING_LEN] = { - "tmac_frms", - "tmac_data_octets", - "tmac_drop_frms", - "tmac_mcst_frms", - "tmac_bcst_frms", - "tmac_pause_ctrl_frms", - "tmac_any_err_frms", - "tmac_vld_ip_octets", - "tmac_vld_ip", - "tmac_drop_ip", - "tmac_icmp", - "tmac_rst_tcp", - "tmac_tcp", - "tmac_udp", - "rmac_vld_frms", - "rmac_data_octets", - "rmac_fcs_err_frms", - "rmac_drop_frms", - "rmac_vld_mcst_frms", - "rmac_vld_bcst_frms", - "rmac_in_rng_len_err_frms", - "rmac_long_frms", - "rmac_pause_ctrl_frms", - "rmac_discarded_frms", - "rmac_usized_frms", - "rmac_osized_frms", - "rmac_frag_frms", - "rmac_jabber_frms", - "rmac_ip", - "rmac_ip_octets", - "rmac_hdr_err_ip", - "rmac_drop_ip", - "rmac_icmp", - "rmac_tcp", - "rmac_udp", - "rmac_err_drp_udp", - "rmac_pause_cnt", - "rmac_accepted_ip", - "rmac_err_tcp", + {"tmac_frms"}, + {"tmac_data_octets"}, + {"tmac_drop_frms"}, + {"tmac_mcst_frms"}, + {"tmac_bcst_frms"}, + {"tmac_pause_ctrl_frms"}, + {"tmac_any_err_frms"}, + {"tmac_vld_ip_octets"}, + {"tmac_vld_ip"}, + {"tmac_drop_ip"}, + {"tmac_icmp"}, + {"tmac_rst_tcp"}, + {"tmac_tcp"}, + {"tmac_udp"}, + {"rmac_vld_frms"}, + {"rmac_data_octets"}, + {"rmac_fcs_err_frms"}, + {"rmac_drop_frms"}, + {"rmac_vld_mcst_frms"}, + {"rmac_vld_bcst_frms"}, + {"rmac_in_rng_len_err_frms"}, + {"rmac_long_frms"}, + {"rmac_pause_ctrl_frms"}, + {"rmac_discarded_frms"}, + {"rmac_usized_frms"}, + {"rmac_osized_frms"}, + {"rmac_frag_frms"}, + {"rmac_jabber_frms"}, + {"rmac_ip"}, + {"rmac_ip_octets"}, + {"rmac_hdr_err_ip"}, + {"rmac_drop_ip"}, + {"rmac_icmp"}, + {"rmac_tcp"}, + {"rmac_udp"}, + {"rmac_err_drp_udp"}, + {"rmac_pause_cnt"}, + {"rmac_accepted_ip"}, + {"rmac_err_tcp"}, }; #define S2IO_STAT_LEN sizeof(ethtool_stats_keys)/ ETH_GSTRING_LEN @@ -147,7 +147,8 @@ #define S2IO_STRINGS_LEN S2IO_TEST_LEN * ETH_GSTRING_LEN -/* Constants to be programmed into the Xena's registers to configure +/* + * Constants to be programmed into the Xena's registers, to configure * the XAUI. */ @@ -188,7 +189,9 @@ END_SIGN }; -/* Constants for Fixing the MacAddress problem seen mostly on + +/* + * Constants for Fixing the MacAddress problem seen mostly on * Alpha machines. */ static u64 fix_mac[] = { @@ -209,7 +212,6 @@ END_SIGN }; - /* Module Loadable parameters. */ static u32 ring_num; static u32 frame_len[MAX_RX_RINGS]; @@ -218,7 +220,7 @@ static u32 fifo_len[MAX_TX_FIFOS]; static u32 rx_prio; static u32 tx_prio; -static u8 latency_timer = 0; +static u8 latency_timer; /* * S2IO device table. @@ -241,17 +243,15 @@ remove:__devexit_p(s2io_rem_nic), }; -/* - * Input Arguments: - * Device private variable. - * Return Value: - * SUCCESS on success and an appropriate -ve value on failure. - * Description: - * The function allocates the all memory areas shared - * between the NIC and the driver. This includes Tx descriptors, - * Rx descriptors and the statistics block. +/** + * init_shared_mem - Allocation and Initialization of Memory + * @nic: Device private variable. + * Description: The function allocates all the memory areas shared + * between the NIC and the driver. This includes Tx descriptors, + * Rx descriptors and the statistics block. */ -static int initSharedMem(struct s2io_nic *nic) + +static int init_shared_mem(struct s2io_nic *nic) { u32 size; void *tmp_v_addr, *tmp_v_addr_next; @@ -269,8 +269,8 @@ /* Allocation and initialization of TXDLs in FIOFs */ size = 0; - for (i = 0; i < config->TxFIFONum; i++) { - size += config->TxCfg[i].FifoLen; + for (i = 0; i < config->tx_fifo_num; i++) { + size += config->tx_cfg[i].fifo_len; } if (size > MAX_AVAILABLE_TXDS) { DBG_PRINT(ERR_DBG, "%s: Total number of Tx FIFOs ", @@ -279,7 +279,7 @@ DBG_PRINT(ERR_DBG, "that can be used\n"); return FAILURE; } - size *= (sizeof(TxD_t) * config->MaxTxDs); + size *= (sizeof(TxD_t) * config->max_txds); mac_control->txd_list_mem = pci_alloc_consistent (nic->pdev, size, &mac_control->txd_list_mem_phy); @@ -295,61 +295,60 @@ DBG_PRINT(INIT_DBG, "%s:List Mem PHY: 0x%llx\n", dev->name, (unsigned long long) tmp_p_addr); - for (i = 0; i < config->TxFIFONum; i++) { + for (i = 0; i < config->tx_fifo_num; i++) { mac_control->txdl_start_phy[i] = tmp_p_addr; mac_control->txdl_start[i] = (TxD_t *) tmp_v_addr; mac_control->tx_curr_put_info[i].offset = 0; mac_control->tx_curr_put_info[i].fifo_len = - config->TxCfg[i].FifoLen - 1; + config->tx_cfg[i].fifo_len - 1; mac_control->tx_curr_get_info[i].offset = 0; mac_control->tx_curr_get_info[i].fifo_len = - config->TxCfg[i].FifoLen - 1; + config->tx_cfg[i].fifo_len - 1; tmp_p_addr += - (config->TxCfg[i].FifoLen * (sizeof(TxD_t)) * - config->MaxTxDs); + (config->tx_cfg[i].fifo_len * (sizeof(TxD_t)) * + config->max_txds); tmp_v_addr += - (config->TxCfg[i].FifoLen * (sizeof(TxD_t)) * - config->MaxTxDs); + (config->tx_cfg[i].fifo_len * (sizeof(TxD_t)) * + config->max_txds); } /* Allocation and initialization of RXDs in Rings */ size = 0; - for (i = 0; i < config->RxRingNum; i++) { - if (config->RxCfg[i].NumRxd % (MAX_RXDS_PER_BLOCK + 1)) { + for (i = 0; i < config->rx_ring_num; i++) { + if (config->rx_cfg[i].num_rxd % (MAX_RXDS_PER_BLOCK + 1)) { DBG_PRINT(ERR_DBG, "%s: RxD count of ", dev->name); DBG_PRINT(ERR_DBG, "Ring%d is not a multiple of ", i); DBG_PRINT(ERR_DBG, "RxDs per Block"); return FAILURE; } - size += config->RxCfg[i].NumRxd; + size += config->rx_cfg[i].num_rxd; nic->block_count[i] = - config->RxCfg[i].NumRxd / (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1); nic->pkt_cnt[i] = - config->RxCfg[i].NumRxd - nic->block_count[i]; + config->rx_cfg[i].num_rxd - nic->block_count[i]; } - size = (size * (sizeof(RxD_t))); - mac_control->rxd_ring_mem_sz = size; - for (i = 0; i < config->RxRingNum; i++) { + for (i = 0; i < config->rx_ring_num; i++) { mac_control->rx_curr_get_info[i].block_index = 0; mac_control->rx_curr_get_info[i].offset = 0; mac_control->rx_curr_get_info[i].ring_len = - config->RxCfg[i].NumRxd - 1; + config->rx_cfg[i].num_rxd - 1; mac_control->rx_curr_put_info[i].block_index = 0; mac_control->rx_curr_put_info[i].offset = 0; mac_control->rx_curr_put_info[i].ring_len = - config->RxCfg[i].NumRxd - 1; + config->rx_cfg[i].num_rxd - 1; blk_cnt = - config->RxCfg[i].NumRxd / (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1); /* Allocating all the Rx blocks */ for (j = 0; j < blk_cnt; j++) { size = (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t)); tmp_v_addr = pci_alloc_consistent(nic->pdev, size, &tmp_p_addr); if (tmp_v_addr == NULL) { - /* In case of failure, freeSharedMem() + /* + * In case of failure, free_shared_mem() * is called, which should free any * memory that was alloced till the * failure happened. @@ -390,7 +389,8 @@ (nic->pdev, size, &mac_control->stats_mem_phy); if (!mac_control->stats_mem) { - /* In case of failure, freeSharedMem() is called, which + /* + * In case of failure, free_shared_mem() is called, which * should free any memory that was alloced till the * failure happened. */ @@ -399,7 +399,7 @@ mac_control->stats_mem_sz = size; tmp_v_addr = mac_control->stats_mem; - mac_control->StatsInfo = (StatInfo_t *) tmp_v_addr; + mac_control->stats_info = (StatInfo_t *) tmp_v_addr; memset(tmp_v_addr, 0, size); DBG_PRINT(INIT_DBG, "%s:Ring Mem PHY: 0x%llx\n", dev->name, @@ -408,16 +408,14 @@ return SUCCESS; } -/* - * Input Arguments: - * Device peivate variable. - * Return Value: - * NONE - * Description: - * This function is to free all memory locations allocated by - * the initSharedMem() function and return it to the kernel. +/** + * free_shared_mem - Free the allocated Memory + * @nic: Device private variable. + * Description: This function is to free all memory locations allocated by + * the init_shared_mem() function and return it to the kernel. */ -static void freeSharedMem(struct s2io_nic *nic) + +static void free_shared_mem(struct s2io_nic *nic) { int i, j, blk_cnt, size; void *tmp_v_addr; @@ -440,7 +438,7 @@ } size = (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t)); - for (i = 0; i < config->RxRingNum; i++) { + for (i = 0; i < config->rx_ring_num; i++) { blk_cnt = nic->block_count[i]; for (j = 0; j < blk_cnt; j++) { tmp_v_addr = nic->rx_blocks[i][j].block_virt_addr; @@ -452,6 +450,7 @@ } } + if (mac_control->stats_mem) { pci_free_consistent(nic->pdev, mac_control->stats_mem_sz, @@ -460,16 +459,16 @@ } } -/* - * Input Arguments: - * device peivate variable - * Return Value: - * SUCCESS on success and '-1' on failure (endian settings incorrect). - * Description: - * The function sequentially configures every block +/** + * init_nic - Initialization of hardware + * @nic: device peivate variable + * Description: The function sequentially configures every block * of the H/W from their reset values. + * Return Value: SUCCESS on success and + * '-1' on failure (endian settings incorrect). */ -static int initNic(struct s2io_nic *nic) + +static int init_nic(struct s2io_nic *nic) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; struct net_device *dev = nic->dev; @@ -485,11 +484,13 @@ mac_control = &nic->mac_control; config = &nic->config; - /* Set proper endian settings and verify the same by - * reading the PIF Feed-back register. + /* + * Set proper endian settings and verify the same by + * reading the PIF Feed-back register. */ #ifdef __BIG_ENDIAN - /* The device by default set to a big endian format, so + /* + * The device by default set to a big endian format, so * a big endian driver need not set anything. */ writeq(0xffffffffffffffffULL, &bar0->swapper_ctrl); @@ -510,7 +511,8 @@ SWAPPER_CTRL_STATS_FE | SWAPPER_CTRL_STATS_SE); writeq(val64, &bar0->swapper_ctrl); #else - /* Initially we enable all bits to make it accessible by + /* + * Initially we enable all bits to make it accessible by * the driver, then we selectively enable only those bits * that we want to set. */ @@ -537,8 +539,9 @@ writeq(val64, &bar0->swapper_ctrl); #endif - /* Verifying if endian settings are accurate by reading - * a feedback register. + /* + * Verifying if endian settings are accurate by + * reading a feedback register. */ val64 = readq(&bar0->pif_rd_swapper_fb); if (val64 != 0x0123456789ABCDEFULL) { @@ -573,8 +576,9 @@ val64 = dev->mtu; writeq(vBIT(val64, 2, 14), &bar0->rmac_max_pyld_len); - /* Configuring the XAUI Interface of Xena. - ***************************************** + /* + * Configuring the XAUI Interface of Xena. + * *************************************** * To Configure the Xena's XAUI, one has to write a series * of 64 bit values into two registers in a particular * sequence. Hence a macro 'SWITCH_SIGN' has been defined @@ -625,13 +629,13 @@ writeq(val64, &bar0->tx_fifo_partition_3); - for (i = 0, j = 0; i < config->TxFIFONum; i++) { + for (i = 0, j = 0; i < config->tx_fifo_num; i++) { val64 |= - vBIT(config->TxCfg[i].FifoLen - 1, ((i * 32) + 19), - 13) | vBIT(config->TxCfg[i].FifoPriority, + vBIT(config->tx_cfg[i].fifo_len - 1, ((i * 32) + 19), + 13) | vBIT(config->tx_cfg[i].fifo_priority, ((i * 32) + 5), 3); - if (i == (config->TxFIFONum - 1)) { + if (i == (config->tx_fifo_num - 1)) { if (i % 2 == 0) i++; } @@ -675,56 +679,59 @@ /* Rx DMA intialization. */ val64 = 0; - for (i = 0; i < config->RxRingNum; i++) { + for (i = 0; i < config->rx_ring_num; i++) { val64 |= - vBIT(config->RxCfg[i].RingPriority, (5 + (i * 8)), 3); + vBIT(config->rx_cfg[i].ring_priority, (5 + (i * 8)), + 3); } writeq(val64, &bar0->rx_queue_priority); - /* Allocating equal share of memory to all the configured - * Rings. + /* + * Allocating equal share of memory to all the + * configured Rings. */ val64 = 0; - for (i = 0; i < config->RxRingNum; i++) { + for (i = 0; i < config->rx_ring_num; i++) { switch (i) { case 0: - mem_share = (64 / config->RxRingNum + - 64 % config->RxRingNum); + mem_share = (64 / config->rx_ring_num + + 64 % config->rx_ring_num); val64 |= RX_QUEUE_CFG_Q0_SZ(mem_share); continue; case 1: - mem_share = (64 / config->RxRingNum); + mem_share = (64 / config->rx_ring_num); val64 |= RX_QUEUE_CFG_Q1_SZ(mem_share); continue; case 2: - mem_share = (64 / config->RxRingNum); + mem_share = (64 / config->rx_ring_num); val64 |= RX_QUEUE_CFG_Q2_SZ(mem_share); continue; case 3: - mem_share = (64 / config->RxRingNum); + mem_share = (64 / config->rx_ring_num); val64 |= RX_QUEUE_CFG_Q3_SZ(mem_share); continue; case 4: - mem_share = (64 / config->RxRingNum); + mem_share = (64 / config->rx_ring_num); val64 |= RX_QUEUE_CFG_Q4_SZ(mem_share); continue; case 5: - mem_share = (64 / config->RxRingNum); + mem_share = (64 / config->rx_ring_num); val64 |= RX_QUEUE_CFG_Q5_SZ(mem_share); continue; case 6: - mem_share = (64 / config->RxRingNum); + mem_share = (64 / config->rx_ring_num); val64 |= RX_QUEUE_CFG_Q6_SZ(mem_share); continue; case 7: - mem_share = (64 / config->RxRingNum); + mem_share = (64 / config->rx_ring_num); val64 |= RX_QUEUE_CFG_Q7_SZ(mem_share); continue; } } writeq(val64, &bar0->rx_queue_cfg); - /* Initializing the Tx round robin registers to 0. + /* + * Initializing the Tx round robin registers to 0. * Filling Tx and Rx round robin registers as per the * number of FIFOs and Rings is still TODO. */ @@ -734,13 +741,15 @@ writeq(0, &bar0->tx_w_round_robin_3); writeq(0, &bar0->tx_w_round_robin_4); - /* Disable Rx steering. Hard coding all packets be steered to + /* + * TODO + * Disable Rx steering. Hard coding all packets be steered to * Queue 0 for now. - * TODO*/ + */ if (rx_prio) { u64 def = 0x8000000000000000ULL, tmp; for (i = 0; i < MAX_RX_RINGS; i++) { - tmp = (u64) (def >> (i % config->RxRingNum)); + tmp = (u64) (def >> (i % config->rx_ring_num)); val64 |= (u64) (tmp >> (i * 8)); } writeq(val64, &bar0->rts_qos_steering); @@ -763,14 +772,16 @@ val64 = SET_UPDT_PERIOD(8) | STAT_CFG_STAT_RO | STAT_CFG_STAT_EN; writeq(val64, &bar0->stat_cfg); - /* Initializing the sampling rate for the device to calculate the + /* + * Initializing the sampling rate for the device to calculate the * bandwidth utilization. */ val64 = MAC_TX_LINK_UTIL_VAL(0x5) | MAC_RX_LINK_UTIL_VAL(0x5); writeq(val64, &bar0->mac_link_util); - /* Initializing the Transmit and Receive Traffic Interrupt + /* + * Initializing the Transmit and Receive Traffic Interrupt * Scheme. */ /* TTI Initialization */ @@ -787,7 +798,8 @@ val64 = TTI_CMD_MEM_WE | TTI_CMD_MEM_STROBE_NEW_CMD; writeq(val64, &bar0->tti_command_mem); - /* Once the operation completes, the Strobe bit of the command + /* + * Once the operation completes, the Strobe bit of the command * register will be reset. We poll for this particular condition * We wait for a maximum of 500ms for the operation to complete, * if it's not complete by then we return error. @@ -821,7 +833,8 @@ val64 = RTI_CMD_MEM_WE | RTI_CMD_MEM_STROBE_NEW_CMD; writeq(val64, &bar0->rti_command_mem); - /* Once the operation completes, the Strobe bit of the command + /* + * Once the operation completes, the Strobe bit of the command * register will be reset. We poll for this particular condition * We wait for a maximum of 500ms for the operation to complete, * if it's not complete by then we return error. @@ -842,7 +855,8 @@ schedule_timeout(HZ / 20); } - /* Initializing proper values as Pause threshold into all + /* + * Initializing proper values as Pause threshold into all * the 8 Queues on Rx side. */ writeq(0xffbbffbbffbbffbbULL, &bar0->mc_pause_thresh_q0q3); @@ -861,19 +875,18 @@ return SUCCESS; } -/* - * Input Arguments: - * device private variable, - * A mask indicating which Intr block must be modified and, - * A flag indicating whether to enable or disable the Intrs. - * Return Value: - * NONE. - * Description: - * This function will either disable or enable the interrupts +/** + * en_dis_able_nic_intrs - Enable or Disable the interrupts + * @nic: device private variable, + * @mask: A mask indicating which Intr block must be modified and, + * @flag: A flag indicating whether to enable or disable the Intrs. + * Description: This function will either disable or enable the interrupts * depending on the flag argument. The mask argument can be used to * enable/disable any Intr block. + * Return Value: NONE. */ -static void en_dis_able_NicIntrs(struct s2io_nic *nic, u16 mask, int flag) + +static void en_dis_able_nic_intrs(struct s2io_nic *nic, u16 mask, int flag) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; register u64 val64 = 0, temp64 = 0; @@ -887,15 +900,20 @@ temp64 = readq(&bar0->general_int_mask); temp64 &= ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* Disabled all PCIX, Flash, MDIO, IIC and GPIO - * interrupts for now. - * TODO */ + /* + * Disabled all PCIX, Flash, MDIO, IIC and GPIO + * interrupts for now. + * TODO + */ writeq(DISABLE_ALL_INTRS, &bar0->pic_int_mask); - /* No MSI Support is available presently, so TTI and + /* + * No MSI Support is available presently, so TTI and * RTI interrupts are also disabled. */ } else if (flag == DISABLE_INTRS) { - /* Disable PIC Intrs in the general intr mask register + /* + * Disable PIC Intrs in the general + * intr mask register */ writeq(DISABLE_ALL_INTRS, &bar0->pic_int_mask); temp64 = readq(&bar0->general_int_mask); @@ -907,24 +925,34 @@ /* DMA Interrupts */ /* Enabling/Disabling Tx DMA interrupts */ if (mask & TX_DMA_INTR) { - /* Enable TxDMA Intrs in the general intr mask register */ + /* Enable TxDMA Intrs in the general intr mask register */ val64 = TXDMA_INT_M; if (flag == ENABLE_INTRS) { temp64 = readq(&bar0->general_int_mask); temp64 &= ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* Disable all interrupts other than PFC interrupt in - * DMA level. + /* + * Keep all interrupts other than PFC interrupt + * and PCC interrupt disabled in DMA level. */ - val64 = DISABLE_ALL_INTRS & (~TXDMA_PFC_INT_M); + val64 = DISABLE_ALL_INTRS & ~(TXDMA_PFC_INT_M | + TXDMA_PCC_INT_M); writeq(val64, &bar0->txdma_int_mask); - /* Enable only the MISC error 1 interrupt in PFC block + /* + * Enable only the MISC error 1 interrupt in PFC block */ val64 = DISABLE_ALL_INTRS & (~PFC_MISC_ERR_1); writeq(val64, &bar0->pfc_err_mask); + /* + * Enable only the FB_ECC error interrupt in PCC block + */ + val64 = DISABLE_ALL_INTRS & (~PCC_FB_ECC_ERR); + writeq(val64, &bar0->pcc_err_mask); } else if (flag == DISABLE_INTRS) { - /* Disable TxDMA Intrs in the general intr mask - * register */ + /* + * Disable TxDMA Intrs in the general intr mask + * register + */ writeq(DISABLE_ALL_INTRS, &bar0->txdma_int_mask); writeq(DISABLE_ALL_INTRS, &bar0->pfc_err_mask); temp64 = readq(&bar0->general_int_mask); @@ -941,12 +969,16 @@ temp64 = readq(&bar0->general_int_mask); temp64 &= ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* All RxDMA block interrupts are disabled for now - * TODO */ + /* + * All RxDMA block interrupts are disabled for now + * TODO + */ writeq(DISABLE_ALL_INTRS, &bar0->rxdma_int_mask); } else if (flag == DISABLE_INTRS) { - /* Disable RxDMA Intrs in the general intr mask - * register */ + /* + * Disable RxDMA Intrs in the general intr mask + * register + */ writeq(DISABLE_ALL_INTRS, &bar0->rxdma_int_mask); temp64 = readq(&bar0->general_int_mask); val64 |= temp64; @@ -962,9 +994,11 @@ temp64 = readq(&bar0->general_int_mask); temp64 &= ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* All MAC block error interrupts are disabled for now + /* + * All MAC block error interrupts are disabled for now * except the link status change interrupt. - * TODO*/ + * TODO + */ val64 = MAC_INT_STATUS_RMAC_INT; temp64 = readq(&bar0->mac_int_mask); temp64 &= ~((u64) val64); @@ -974,7 +1008,8 @@ val64 &= ~((u64) RMAC_LINK_STATE_CHANGE_INT); writeq(val64, &bar0->mac_rmac_err_mask); } else if (flag == DISABLE_INTRS) { - /* Disable MAC Intrs in the general intr mask register + /* + * Disable MAC Intrs in the general intr mask register */ writeq(DISABLE_ALL_INTRS, &bar0->mac_int_mask); writeq(DISABLE_ALL_INTRS, @@ -993,11 +1028,14 @@ temp64 = readq(&bar0->general_int_mask); temp64 &= ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* All XGXS block error interrupts are disabled for now - * TODO */ + /* + * All XGXS block error interrupts are disabled for now + * TODO + */ writeq(DISABLE_ALL_INTRS, &bar0->xgxs_int_mask); } else if (flag == DISABLE_INTRS) { - /* Disable MC Intrs in the general intr mask register + /* + * Disable MC Intrs in the general intr mask register */ writeq(DISABLE_ALL_INTRS, &bar0->xgxs_int_mask); temp64 = readq(&bar0->general_int_mask); @@ -1013,11 +1051,14 @@ temp64 = readq(&bar0->general_int_mask); temp64 &= ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* All MC block error interrupts are disabled for now - * TODO */ + /* + * All MC block error interrupts are disabled for now + * TODO + */ writeq(DISABLE_ALL_INTRS, &bar0->mc_int_mask); } else if (flag == DISABLE_INTRS) { - /* Disable MC Intrs in the general intr mask register + /* + * Disable MC Intrs in the general intr mask register */ writeq(DISABLE_ALL_INTRS, &bar0->mc_int_mask); temp64 = readq(&bar0->general_int_mask); @@ -1034,15 +1075,15 @@ temp64 = readq(&bar0->general_int_mask); temp64 &= ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* Enable all the Tx side interrupts */ - writeq(0x0, &bar0->tx_traffic_mask); /* '0' Enables - * all 64 TX - * interrupt - * levels. - */ + /* + * Enable all the Tx side interrupts + * writing 0 Enables all 64 TX interrupt levels + */ + writeq(0x0, &bar0->tx_traffic_mask); } else if (flag == DISABLE_INTRS) { - /* Disable Tx Traffic Intrs in the general intr mask - * register. + /* + * Disable Tx Traffic Intrs in the general intr mask + * register. */ writeq(DISABLE_ALL_INTRS, &bar0->tx_traffic_mask); temp64 = readq(&bar0->general_int_mask); @@ -1058,14 +1099,12 @@ temp64 = readq(&bar0->general_int_mask); temp64 &= ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - writeq(0x0, &bar0->rx_traffic_mask); /* '0' Enables - * all 8 RX - * interrupt - * levels. - */ + /* writing 0 Enables all 8 RX interrupt levels */ + writeq(0x0, &bar0->rx_traffic_mask); } else if (flag == DISABLE_INTRS) { - /* Disable Rx Traffic Intrs in the general intr mask - * register. + /* + * Disable Rx Traffic Intrs in the general intr mask + * register. */ writeq(DISABLE_ALL_INTRS, &bar0->rx_traffic_mask); temp64 = readq(&bar0->general_int_mask); @@ -1075,17 +1114,19 @@ } } -/* - * Input Arguments: - * val64 - Value read from adapter status register. - * flag - indicates if the adapter enable bit was ever written once before. - * Return Value: - * void. - * Description: - * Returns whether the H/W is ready to go or not. Depending on whether - * adapter enable bit was written or not the comparison differs and the - * calling function passes the input argument flag to indicate this. +/** + * verify_xena_quiescence - Checks whether the H/W is ready + * @val64 : Value read from adapter status register. + * @flag : indicates if the adapter enable bit was ever written once + * before. + * Description: Returns whether the H/W is ready to go or not. Depending + * on whether adapter enable bit was written or not the comparison + * differs and the calling function passes the input argument flag to + * indicate this. + * Return: 1 If xena is quiescence + * 0 If Xena is not quiescence */ + static int verify_xena_quiescence(u64 val64, int flag) { int ret = 0; @@ -1122,11 +1163,15 @@ return ret; } -/* +/** + * fix_mac_address - Fix for Mac addr problem on Alpha platforms + * @sp: Pointer to device specifc structure + * Description : * New procedure to clear mac address reading problems on Alpha platforms * */ -void FixMacAddress(nic_t * sp) + +void fix_mac_address(nic_t * sp) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; u64 val64; @@ -1138,19 +1183,20 @@ } } -/* - * Input Arguments: - * device private variable. - * Return Value: - * SUCCESS on success and -1 on failure. +/** + * start_nic - Turns the device on + * @nic : device private variable. * Description: - * This function actually turns the device on. Before this - * function is called, all Registers are configured from their reset states + * This function actually turns the device on. Before this function is + * called,all Registers are configured from their reset states * and shared memory is allocated but the NIC is still quiescent. On * calling this function, the device interrupts are cleared and the NIC is * literally switched on by writing into the adapter control register. + * Return Value: + * SUCCESS on success and -1 on failure. */ -static int startNic(struct s2io_nic *nic) + +static int start_nic(struct s2io_nic *nic) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; struct net_device *dev = nic->dev; @@ -1164,7 +1210,7 @@ config = &nic->config; /* PRC Initialization and configuration */ - for (i = 0; i < config->RxRingNum; i++) { + for (i = 0; i < config->rx_ring_num; i++) { writeq((u64) nic->rx_blocks[i][0].block_dma_addr, &bar0->prc_rxd0_n[i]); @@ -1173,7 +1219,8 @@ writeq(val64, &bar0->prc_ctrl_n[i]); } - /* Enabling MC-RLDRAM. After enabling the device, we timeout + /* + * Enabling MC-RLDRAM. After enabling the device, we timeout * for around 100ms, which is approximately the time required * for the device to be ready for operation. */ @@ -1190,14 +1237,16 @@ val64 &= ~ADAPTER_ECC_EN; writeq(val64, &bar0->adapter_control); - /* Clearing any possible Link state change interrupts that + /* + * Clearing any possible Link state change interrupts that * could have popped up just before Enabling the card. */ val64 = readq(&bar0->mac_rmac_err_reg); if (val64) writeq(val64, &bar0->mac_rmac_err_reg); - /* Verify if the device is ready to be enabled, if so enable + /* + * Verify if the device is ready to be enabled, if so enable * it. */ val64 = readq(&bar0->adapter_status); @@ -1211,9 +1260,10 @@ /* Enable select interrupts */ interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR | TX_MAC_INTR | RX_MAC_INTR; - en_dis_able_NicIntrs(nic, interruptible, ENABLE_INTRS); + en_dis_able_nic_intrs(nic, interruptible, ENABLE_INTRS); - /* With some switches, link might be already up at this point. + /* + * With some switches, link might be already up at this point. * Because of this weird behavior, when we enable laser, * we may not get link. We need to handle this. We cannot * figure out which switch is misbehaving. So we are forced to @@ -1240,82 +1290,72 @@ * force link down. Since link is already up, we will get * link state change interrupt after this reset */ - writeq(0x8007051500000000ULL, &bar0->dtx_control); + writeq(0x80010515001E0000ULL, &bar0->dtx_control); val64 = readq(&bar0->dtx_control); - writeq(0x80070515000000E0ULL, &bar0->dtx_control); + udelay(50); + writeq(0x80010515001E00E0ULL, &bar0->dtx_control); val64 = readq(&bar0->dtx_control); + udelay(50); writeq(0x80070515001F00E4ULL, &bar0->dtx_control); val64 = readq(&bar0->dtx_control); + udelay(50); return SUCCESS; } -/* - * Input Arguments: - * nic - device private variable. - * Return Value: - * void. +/** + * free_tx_buffers - Free all queued Tx buffers + * @nic : device private variable. * Description: - * Free all queued Tx buffers. - */ -void freeTxBuffers(struct s2io_nic *nic) + * Free all queued Tx buffers. + * Return Value: void +*/ + +void free_tx_buffers(struct s2io_nic *nic) { struct net_device *dev = nic->dev; struct sk_buff *skb; TxD_t *txdp; int i, j; -#if DEBUG_ON - int cnt = 0; -#endif mac_info_t *mac_control; struct config_param *config; + int cnt = 0; mac_control = &nic->mac_control; config = &nic->config; - for (i = 0; i < config->TxFIFONum; i++) { - for (j = 0; j < config->TxCfg[i].FifoLen - 1; j++) { + for (i = 0; i < config->tx_fifo_num; i++) { + for (j = 0; j < config->tx_cfg[i].fifo_len - 1; j++) { txdp = mac_control->txdl_start[i] + - (config->MaxTxDs * j); - - if (!(txdp->Control_1 & TXD_LIST_OWN_XENA)) { - /* If owned by host, ignore */ - continue; - } + (config->max_txds * j); skb = (struct sk_buff *) ((unsigned long) txdp-> Host_Control); if (skb == NULL) { - DBG_PRINT(ERR_DBG, "%s: NULL skb ", - dev->name); - DBG_PRINT(ERR_DBG, "in Tx Int\n"); - return; + memset(txdp, 0, sizeof(TxD_t)); + continue; } -#if DEBUG_ON - cnt++; -#endif dev_kfree_skb(skb); memset(txdp, 0, sizeof(TxD_t)); + cnt++; } -#if DEBUG_ON DBG_PRINT(INTR_DBG, "%s:forcibly freeing %d skbs on FIFO%d\n", dev->name, cnt, i); -#endif } } -/* - * Input Arguments: - * nic - device private variable. - * Return Value: +/** + * stop_nic - To stop the nic + * @nic ; device private variable. + * Description: + * This function does exactly the opposite of what the start_nic() + * function does. This function is called to stop the device. + * Return Value: * void. - * Description: - * This function does exactly the opposite of what the startNic() - * function does. This function is called to stop - * the device. */ -static void stopNic(struct s2io_nic *nic) + +static void stop_nic(struct s2io_nic *nic) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; register u64 val64 = 0; @@ -1326,24 +1366,23 @@ mac_control = &nic->mac_control; config = &nic->config; -/* Disable all interrupts */ + /* Disable all interrupts */ interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR | TX_MAC_INTR | RX_MAC_INTR; - en_dis_able_NicIntrs(nic, interruptible, DISABLE_INTRS); + en_dis_able_nic_intrs(nic, interruptible, DISABLE_INTRS); -/* Disable PRCs */ - for (i = 0; i < config->RxRingNum; i++) { + /* Disable PRCs */ + for (i = 0; i < config->rx_ring_num; i++) { val64 = readq(&bar0->prc_ctrl_n[i]); val64 &= ~((u64) PRC_CTRL_RC_ENABLED); writeq(val64, &bar0->prc_ctrl_n[i]); } } -/* - * Input Arguments: - * device private variable - * Return Value: - * SUCCESS on success or an appropriate -ve value on failure. +/** + * fill_rx_buffers - Allocates the Rx side skbs + * @nic: device private variable + * @ring_no: ring number * Description: * The function allocates Rx side skbs and puts the physical * address of these buffers into the RxD buffer pointers, so that the NIC @@ -1354,9 +1393,13 @@ * 3. Five buffer modes. * Each mode defines how many fragments the received frame will be split * up into by the NIC. The frame is split into L3 header, L4 Header, - * L4 payload in three buffer mode and in 5 buffer mode, L4 payload itself - * is split into 3 fragments. As of now only single buffer mode is supported. + * L4 payload in three buffer mode and in 5 buffer mode, L4 payload itself + * is split into 3 fragments. As of now only single buffer mode is + * supported. + * Return Value: + * SUCCESS on success or an appropriate -ve value on failure. */ + int fill_rx_buffers(struct s2io_nic *nic, int ring_no) { struct net_device *dev = nic->dev; @@ -1392,7 +1435,8 @@ off1 = mac_control->rx_curr_get_info[ring_no].offset; offset = block_no * (MAX_RXDS_PER_BLOCK + 1) + off; offset1 = block_no1 * (MAX_RXDS_PER_BLOCK + 1) + off1; - + offset = block_no * (MAX_RXDS_PER_BLOCK) + off; + offset1 = block_no1 * (MAX_RXDS_PER_BLOCK) + off1; rxdp = nic->rx_blocks[ring_no][block_no]. block_virt_addr + off; if ((offset == offset1) && (rxdp->Host_Control)) { @@ -1400,7 +1444,6 @@ DBG_PRINT(INTR_DBG, " info equated\n"); goto end; } - if (rxdp->Control_1 == END_OF_BLOCK) { mac_control->rx_curr_put_info[ring_no]. block_index++; @@ -1412,8 +1455,6 @@ off %= (MAX_RXDS_PER_BLOCK + 1); mac_control->rx_curr_put_info[ring_no].offset = off; - /*rxdp = nic->rx_blocks[ring_no][block_no]. - block_virt_addr + off; */ rxdp = (RxD_t *) ((unsigned long) rxdp->Control_2); DBG_PRINT(INTR_DBG, "%s: Next block at: %p\n", dev->name, rxdp); @@ -1450,15 +1491,16 @@ return SUCCESS; } -/* - * Input Arguments: - * device private variable. - * Return Value: - * NONE. +/** + * free_rx_buffers - Frees all Rx buffers + * @sp: device private variable. * Description: * This function will free all Rx buffers allocated by host. + * Return Value: + * NONE. */ -static void freeRxBuffers(struct s2io_nic *sp) + +static void free_rx_buffers(struct s2io_nic *sp) { struct net_device *dev = sp->dev; int i, j, blk = 0, off, buf_cnt = 0; @@ -1470,8 +1512,8 @@ mac_control = &sp->mac_control; config = &sp->config; - for (i = 0; i < config->RxRingNum; i++) { - for (j = 0, blk = 0; j < config->RxCfg[i].NumRxd; j++) { + for (i = 0; i < config->rx_ring_num; i++) { + for (j = 0, blk = 0; j < config->rx_cfg[i].num_rxd; j++) { off = j % (MAX_RXDS_PER_BLOCK + 1); rxdp = sp->rx_blocks[i][blk].block_virt_addr + off; @@ -1510,18 +1552,19 @@ } } -/* - * Input Argument: - * dev - pointer to the device structure. - * budget - The number of packets that were budgeted to be processed during - * one pass through the 'Poll" function. - * Return value: - * 0 on success and 1 if there are No Rx packets to be processed. - * Description: - * Comes into picture only if NAPI support has been incorporated. It does - * the same thing that rxIntrHandler does, but not in a interrupt context - * also It will process only a given number of packets. +/** + * s2io_poll - Rx interrupt handler for NAPI support + * @dev : pointer to the device structure. + * @budget : The number of packets that were budgeted to be processed + * during one pass through the 'Poll" function. + * Description: + * Comes into picture only if NAPI support has been incorporated. It does + * the same thing that rx_intr_handler does, but not in a interrupt context + * also It will process only a given number of packets. + * Return value: + * 0 on success and 1 if there are No Rx packets to be processed. */ + #ifdef CONFIG_S2IO_NAPI static int s2io_poll(struct net_device *dev, int *budget) { @@ -1546,7 +1589,7 @@ val64 = readq(&bar0->rx_traffic_int); writeq(val64, &bar0->rx_traffic_int); - for (i = 0; i < config->RxRingNum; i++) { + for (i = 0; i < config->rx_ring_num; i++) { if (--pkts_to_process < 0) { goto no_rx; } @@ -1589,7 +1632,7 @@ HEADER_802_2_SIZE + HEADER_SNAP_SIZE, PCI_DMA_FROMDEVICE); - rxOsmHandler(nic, val16, rxdp, i); + rx_osm_handler(nic, val16, rxdp, i); pkt_cnt++; offset_info.offset++; offset_info.offset %= (MAX_RXDS_PER_BLOCK + 1); @@ -1603,38 +1646,39 @@ if (!pkt_cnt) pkt_cnt = 1; - for (i = 0; i < config->RxRingNum; i++) + for (i = 0; i < config->rx_ring_num; i++) fill_rx_buffers(nic, i); dev->quota -= pkt_cnt; *budget -= pkt_cnt; netif_rx_complete(dev); -/* Re enable the Rx interrupts. */ - en_dis_able_NicIntrs(nic, RX_TRAFFIC_INTR, ENABLE_INTRS); + /* Re enable the Rx interrupts. */ + en_dis_able_nic_intrs(nic, RX_TRAFFIC_INTR, ENABLE_INTRS); return 0; no_rx: - for (i = 0; i < config->RxRingNum; i++) + for (i = 0; i < config->rx_ring_num; i++) fill_rx_buffers(nic, i); dev->quota -= pkt_cnt; *budget -= pkt_cnt; return 1; } #else -/* - * Input Arguments: - * device private variable. - * Return Value: - * NONE. +/** + * rx_intr_handler - Rx interrupt handler + * @nic: device private variable. * Description: - * If the interrupt is because of a received frame or if the - * receive ring contains fresh as yet un-processed frames, this function is + * If the interrupt is because of a received frame or if the + * receive ring contains fresh as yet un-processed frames,this function is * called. It picks out the RxD at which place the last Rx processing had * stopped and sends the skb to the OSM's Rx handler and then increments * the offset. + * Return Value: + * NONE. */ -static void rxIntrHandler(struct s2io_nic *nic) + +static void rx_intr_handler(struct s2io_nic *nic) { struct net_device *dev = (struct net_device *) nic->dev; XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; @@ -1643,24 +1687,21 @@ struct sk_buff *skb; u16 val16, cksum; register u64 val64 = 0; - int i, block_no; + int i, block_no, pkt_cnt = 0; mac_info_t *mac_control; struct config_param *config; mac_control = &nic->mac_control; config = &nic->config; -#if DEBUG_ON - nic->rxint_cnt++; -#endif - -/* rx_traffic_int reg is an R1 register, hence we read and write back - * the samevalue in the register to clear it. - */ + /* + * rx_traffic_int reg is an R1 register, hence we read and write back + * the samevalue in the register to clear it. + */ val64 = readq(&bar0->rx_traffic_int); writeq(val64, &bar0->rx_traffic_int); - for (i = 0; i < config->RxRingNum; i++) { + for (i = 0; i < config->rx_ring_num; i++) { offset_info = mac_control->rx_curr_get_info[i]; block_no = offset_info.block_index; rxdp = nic->rx_blocks[i][block_no].block_virt_addr + @@ -1698,7 +1739,7 @@ HEADER_802_2_SIZE + HEADER_SNAP_SIZE, PCI_DMA_FROMDEVICE); - rxOsmHandler(nic, val16, rxdp, i); + rx_osm_handler(nic, val16, rxdp, i); offset_info.offset++; offset_info.offset %= (MAX_RXDS_PER_BLOCK + 1); rxdp = @@ -1706,23 +1747,24 @@ offset_info.offset; mac_control->rx_curr_get_info[i].offset = offset_info.offset; + pkt_cnt++; } } } #endif - -/* - * Input Arguments: - * device private variable - * Return Value: - * NONE +/** + * tx_intr_handler - Transmit interrupt handler + * @nic : device private variable * Description: * If an interrupt was raised to indicate DMA complete of the - * Tx packet, this function is called. It identifies the last TxD whose buffer - * was freed and frees all skbs whose data have already DMA'ed into the NICs - * internal memory. + * Tx packet, this function is called. It identifies the last TxD + * whose buffer was freed and frees all skbs whose data have already + * DMA'ed into the NICs internal memory. + * Return Value: + * NONE */ -static void txIntrHandler(struct s2io_nic *nic) + +static void tx_intr_handler(struct s2io_nic *nic) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; struct net_device *dev = (struct net_device *) nic->dev; @@ -1734,25 +1776,22 @@ u16 j, frg_cnt; mac_info_t *mac_control; struct config_param *config; -#if DEBUG_ON - int cnt = 0; - nic->txint_cnt++; -#endif mac_control = &nic->mac_control; config = &nic->config; - /* tx_traffic_int reg is an R1 register, hence we read and write + /* + * tx_traffic_int reg is an R1 register, hence we read and write * back the samevalue in the register to clear it. */ val64 = readq(&bar0->tx_traffic_int); writeq(val64, &bar0->tx_traffic_int); - for (i = 0; i < config->TxFIFONum; i++) { + for (i = 0; i < config->tx_fifo_num; i++) { offset_info = mac_control->tx_curr_get_info[i]; offset_info1 = mac_control->tx_curr_put_info[i]; txdlp = mac_control->txdl_start[i] + - (config->MaxTxDs * offset_info.offset); + (config->max_txds * offset_info.offset); while ((!(txdlp->Control_1 & TXD_LIST_OWN_XENA)) && (offset_info.offset != offset_info1.offset) && (txdlp->Host_Control)) { @@ -1797,28 +1836,20 @@ txdlp = temp; } memset(txdlp, 0, - (sizeof(TxD_t) * config->MaxTxDs)); + (sizeof(TxD_t) * config->max_txds)); /* Updating the statistics block */ nic->stats.tx_packets++; nic->stats.tx_bytes += skb->len; -#if DEBUG_ON - nic->txpkt_bytes += skb->len; - cnt++; -#endif dev_kfree_skb_irq(skb); offset_info.offset++; offset_info.offset %= offset_info.fifo_len + 1; txdlp = mac_control->txdl_start[i] + - (config->MaxTxDs * offset_info.offset); + (config->max_txds * offset_info.offset); mac_control->tx_curr_get_info[i].offset = offset_info.offset; } -#if DEBUG_ON - DBG_PRINT(INTR_DBG, "%s: freed %d Tx Pkts\n", dev->name, - cnt); -#endif } spin_lock(&nic->tx_lock); @@ -1827,55 +1858,53 @@ spin_unlock(&nic->tx_lock); } -/* - * Input Arguments: - * device private variable - * Return Value: +/** + * alarm_intr_handler - Alarm Interrrupt handler + * @nic: device private variable + * Description: If the interrupt was neither because of Rx packet or Tx + * complete, this function is called. If the interrupt was to indicate + * a loss of link, the OSM link status handler is invoked for any other + * alarm interrupt the block that raised the interrupt is displayed + * and a H/W reset is issued. + * Return Value: * NONE - * Description: - * If the interrupt was neither because of Rx packet or Tx - * complete, this function is called. If the interrupt was to indicate a loss - * of link, the OSM link status handler is invoked for any other alarm - * interrupt the block that raised the interrupt is displayed and a H/W reset - * is issued. - */ -static void alarmIntrHandler(struct s2io_nic *nic) +*/ + +static void alarm_intr_handler(struct s2io_nic *nic) { struct net_device *dev = (struct net_device *) nic->dev; XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; register u64 val64 = 0, err_reg = 0; - /* Handling link status change error Intr */ err_reg = readq(&bar0->mac_rmac_err_reg); if (err_reg & RMAC_LINK_STATE_CHANGE_INT) { schedule_work(&nic->set_link_task); } - /* Handling SERR errors by stopping device Xmit queue and forcing - * a H/W reset. - */ + /* In case of a serious error, the device will be Reset. */ val64 = readq(&bar0->serr_source); if (val64 & SERR_SOURCE_ANY) { DBG_PRINT(ERR_DBG, "%s: Device indicates ", dev->name); DBG_PRINT(ERR_DBG, "serious error!!\n"); netif_stop_queue(dev); } -/* Other type of interrupts are not being handled now, TODO*/ + + /* Other type of interrupts are not being handled now, TODO */ } -/* - * Input Argument: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. +/** + * wait_for_cmd_complete - waits for a command to complete. + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * Description: Function that waits for a command to Write into RMAC + * ADDR DATA registers to be completed and returns either success or + * error depending on whether the command was complete or not. * Return value: * SUCCESS on success and FAILURE on failure. - * Description: - * Function that waits for a command to Write into RMAC ADDR DATA registers - * to be completed and returns either success or error depending on whether - * the command was complete or not. */ -int waitForCmdComplete(nic_t * sp) + +int wait_for_cmd_complete(nic_t * sp) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; int ret = FAILURE, cnt = 0; @@ -1900,17 +1929,16 @@ return ret; } -/* - * Input Argument: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. +/** + * s2io_reset - Resets the card. + * @sp : private member of the device structure. + * Description: Function to Reset the card. This function then also + * restores the previously saved PCI configuration space registers as + * the card reset also resets the configuration space. * Return value: - * void. - * Description: - * Function to Reset the card. This function then also restores the previously - * saved PCI configuration space registers as the card reset also resets the - * Configration space. + * void. */ + void s2io_reset(nic_t * sp) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; @@ -1920,7 +1948,8 @@ val64 = SW_RESET_ALL; writeq(val64, &bar0->sw_reset); - /* At this stage, if the PCI write is indeed completed, the + /* + * At this stage, if the PCI write is indeed completed, the * card is reset and so is the PCI Config space of the device. * So a read cannot be issued at this stage on any of the * registers to ensure the write into "sw_reset" register @@ -1954,29 +1983,31 @@ sp->device_enabled_once = FALSE; } -/* - * Input Argument: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. +/** + * s2io_set_swapper - to set the swapper controle on the card + * @sp : private member of the device structure, + * pointer to the s2io_nic structure. + * Description: Function to set the swapper control on the card + * correctly depending on the 'endianness' of the system. * Return value: * SUCCESS on success and FAILURE on failure. - * Description: - * Function to set the swapper control on the card correctly depending on the - * 'endianness' of the system. */ + int s2io_set_swapper(nic_t * sp) { struct net_device *dev = sp->dev; XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; u64 val64; -/* Set proper endian settings and verify the same by reading the PIF - * Feed-back register. - */ + /* + * Set proper endian settings and verify the same by reading + * the PIF Feed-back register. + */ #ifdef __BIG_ENDIAN -/* The device by default set to a big endian format, so a big endian - * driver need not set anything. - */ + /* + * The device by default set to a big endian format, so a + * big endian driver need not set anything. + */ writeq(0xffffffffffffffffULL, &bar0->swapper_ctrl); val64 = (SWAPPER_CTRL_PIF_R_FE | SWAPPER_CTRL_PIF_R_SE | @@ -1995,9 +2026,11 @@ SWAPPER_CTRL_STATS_FE | SWAPPER_CTRL_STATS_SE); writeq(val64, &bar0->swapper_ctrl); #else -/* Initially we enable all bits to make it accessible by the driver, - * then we selectively enable only those bits that we want to set. - */ + /* + * Initially we enable all bits to make it accessible by the + * driver, then we selectively enable only those bits that + * we want to set. + */ writeq(0xffffffffffffffffULL, &bar0->swapper_ctrl); val64 = (SWAPPER_CTRL_PIF_R_FE | SWAPPER_CTRL_PIF_R_SE | @@ -2021,9 +2054,10 @@ writeq(val64, &bar0->swapper_ctrl); #endif -/* Verifying if endian settings are accurate by reading a feedback - * register. - */ + /* + * Verifying if endian settings are accurate by reading a + * feedback register. + */ val64 = readq(&bar0->pif_rd_swapper_fb); if (val64 != 0x0123456789ABCDEFULL) { /* Endian settings are incorrect, calls for another dekko. */ @@ -2041,17 +2075,18 @@ * Functions defined below concern the OS part of the driver * * ********************************************************* */ -/* - * Input Argument: - * dev - pointer to the device structure. - * Return value: - * '0' on success and an appropriate (-)ve integer as defined in errno.h - * file on failure. +/** + * s2io-open - open entry point of the driver + * @dev : pointer to the device structure. * Description: * This function is the open entry point of the driver. It mainly calls a * function to allocate Rx buffers and inserts them into the buffer * descriptors and then enables the Rx part of the NIC. + * Return value: + * 0 on success and an appropriate (-)ve integer as defined in errno.h + * file on failure. */ + int s2io_open(struct net_device *dev) { nic_t *sp = dev->priv; @@ -2060,18 +2095,21 @@ struct config_param *config; -/* Make sure you have link off by default every time Nic is initialized*/ + /* + * Make sure you have link off by default every time + * Nic is initialized + */ netif_carrier_off(dev); sp->last_link_state = LINK_DOWN; -/* Initialize the H/W I/O registers */ - if (initNic(sp) != 0) { + /* Initialize the H/W I/O registers */ + if (init_nic(sp) != 0) { DBG_PRINT(ERR_DBG, "%s: H/W initialization failed\n", dev->name); return -ENODEV; } -/* After proper initialization of H/W, register ISR */ + /* After proper initialization of H/W, register ISR */ err = request_irq((int) sp->irq, s2io_isr, SA_SHIRQ, sp->name, dev); if (err) { @@ -2087,38 +2125,39 @@ } -/* Setting its receive mode */ + /* Setting its receive mode */ s2io_set_multicast(dev); -/* Initializing the Rx buffers. For now we are considering only 1 Rx ring - * and initializing buffers into 1016 RxDs or 8 Rx blocks - */ + /* + * Initializing the Rx buffers. For now we are considering only 1 + * Rx ring and initializing buffers into 1016 RxDs or 8 Rx blocks + */ mac_control = &sp->mac_control; config = &sp->config; - for (i = 0; i < config->RxRingNum; i++) { + for (i = 0; i < config->rx_ring_num; i++) { if ((ret = fill_rx_buffers(sp, i))) { DBG_PRINT(ERR_DBG, "%s: Out of memory in Open\n", dev->name); s2io_reset(sp); free_irq(dev->irq, dev); - freeRxBuffers(sp); + free_rx_buffers(sp); return -ENOMEM; } DBG_PRINT(INFO_DBG, "Buf in ring:%d is %d:\n", i, atomic_read(&sp->rx_bufs_left[i])); } -/* Enable tasklet for the device */ + /* Enable tasklet for the device */ tasklet_init(&sp->task, s2io_tasklet, (unsigned long) dev); -/* Enable Rx Traffic and interrupts on the NIC */ - if (startNic(sp)) { + /* Enable Rx Traffic and interrupts on the NIC */ + if (start_nic(sp)) { DBG_PRINT(ERR_DBG, "%s: Starting NIC failed\n", dev->name); tasklet_kill(&sp->task); s2io_reset(sp); free_irq(dev->irq, dev); - freeRxBuffers(sp); + free_rx_buffers(sp); return -ENODEV; } @@ -2128,18 +2167,19 @@ return 0; } -/* - * Input Argument/s: - * dev - device pointer. - * Return value: - * '0' on success and an appropriate (-)ve integer as defined in errno.h - * file on failure. +/** + * s2io_close -close entry point of the driver + * @dev : device pointer. * Description: * This is the stop entry point of the driver. It needs to undo exactly - * whatever was done by the open entry point, thus it's usually referred to - * as the close function. Among other things this function mainly stops the + * whatever was done by the open entry point,thus it's usually referred to + * as the close function.Among other things this function mainly stops the * Rx side of the NIC and frees all the Rx buffers in the Rx rings. + * Return value: + * 0 on success and an appropriate (-)ve integer as defined in errno.h + * file on failure. */ + int s2io_close(struct net_device *dev) { nic_t *sp = dev->priv; @@ -2150,19 +2190,22 @@ spin_lock(&sp->isr_lock); netif_stop_queue(dev); -/* disable Tx and Rx traffic on the NIC */ - stopNic(sp); + /* disable Tx and Rx traffic on the NIC */ + stop_nic(sp); spin_unlock(&sp->isr_lock); -/* If the device tasklet is running, wait till its done before killing it */ + /* + * If the device tasklet is running, wait till its done + * before killing it + */ while (atomic_read(&(sp->tasklet_status))) { set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(HZ / 10); } tasklet_kill(&sp->task); -/* Check if the device is Quiescent and then Reset the NIC */ + /* Check if the device is Quiescent and then Reset the NIC */ do { val64 = readq(&bar0->adapter_status); if (verify_xena_quiescence(val64, sp->device_enabled_once)) { @@ -2182,32 +2225,33 @@ } while (1); s2io_reset(sp); -/* Free the Registered IRQ */ + /* Free the Registered IRQ */ free_irq(dev->irq, dev); -/* Free all Tx Buffers waiting for transmission */ - freeTxBuffers(sp); + /* Free all Tx Buffers waiting for transmission */ + free_tx_buffers(sp); -/* Free all Rx buffers allocated by host */ - freeRxBuffers(sp); + /* Free all Rx buffers allocated by host */ + free_rx_buffers(sp); sp->device_close_flag = TRUE; /* Device is shut down. */ return 0; } -/* - * Input Argument/s: - * skb - the socket buffer containing the Tx data. - * dev - device pointer. - * Return value: - * '0' on success & 1 on failure. - * NOTE: when device cant queue the pkt, just the trans_start variable will - * not be upadted. - * Description: +/** + * s2io_xmit - Tx entry point of te driver + * @skb : the socket buffer containing the Tx data. + * @dev : device pointer. + * Description : * This function is the Tx entry point of the driver. S2IO NIC supports * certain protocol assist features on Tx side, namely CSO, S/G, LSO. + * NOTE: when device cant queue the pkt,just the trans_start variable will + * not be upadted. + * Return value: + * 0 on success & 1 on failure. */ + int s2io_xmit(struct sk_buff *skb, struct net_device *dev) { nic_t *sp = dev->priv; @@ -2221,6 +2265,7 @@ #endif mac_info_t *mac_control; struct config_param *config; + XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; mac_control = &sp->mac_control; config = &sp->config; @@ -2232,14 +2277,14 @@ /* Multi FIFO Tx is disabled for now. */ if (!queue && tx_prio) { u8 x = (skb->data)[5]; - queue = x % config->TxFIFONum; + queue = x % config->tx_fifo_num; } off = (u16) mac_control->tx_curr_put_info[queue].offset; off1 = (u16) mac_control->tx_curr_get_info[queue].offset; - txd_len = mac_control->txdl_len; - txdp = mac_control->txdl_start[queue] + (config->MaxTxDs * off); + txd_len = config->max_txds; + txdp = mac_control->txdl_start[queue] + (config->max_txds * off); queue_len = mac_control->tx_curr_put_info[queue].fifo_len + 1; /* Avoid "put" pointer going beyond "get" pointer */ @@ -2250,7 +2295,6 @@ spin_unlock_irqrestore(&sp->tx_lock, flags); return 0; } - #ifdef NETIF_F_TSO mss = skb_shinfo(skb)->tso_size; if (mss) { @@ -2271,7 +2315,7 @@ TXD_TX_CKO_UDP_EN); } - txdp->Control_2 |= config->TxIntrType; + txdp->Control_2 |= config->tx_intr_type; txdp->Control_1 |= (TXD_BUFFER0_SIZE(frg_len) | TXD_GATHER_CODE_FIRST); @@ -2301,15 +2345,18 @@ #endif writeq(val64, &tx_fifo->List_Control); + /* Perform a PCI read to flush previous writes */ + val64 = readq(&bar0->general_int_status); + off++; off %= mac_control->tx_curr_put_info[queue].fifo_len + 1; mac_control->tx_curr_put_info[queue].offset = off; /* Avoid "put" pointer going beyond "get" pointer */ if (((off + 1) % queue_len) == off1) { - DBG_PRINT(TX_DBG, - "No free TxDs for xmit, Put: 0x%x Get:0x%x\n", - off, off1); + DBG_PRINT(TX_DBG, + "No free TxDs for xmit, Put: 0x%x Get:0x%x\n", + off, off1); netif_stop_queue(dev); } @@ -2319,21 +2366,20 @@ return 0; } -/* - * Input Argument/s: - * irq: the irq of the device. - * dev_id: a void pointer to the dev structure of the NIC. - * ptregs: pointer to the registers pushed on the stack. +/** + * s2io_isr - ISR handler of the device . + * @irq: the irq of the device. + * @dev_id: a void pointer to the dev structure of the NIC. + * @pt_regs: pointer to the registers pushed on the stack. + * Description: This function is the ISR handler of the device. It + * identifies the reason for the interrupt and calls the relevant + * service routines. As a contongency measure, this ISR allocates the + * recv buffers, if their numbers are below the panic value which is + * presently set to 25% of the original number of rcv buffers allocated. * Return value: - * void. - * Description: - * This function is the ISR handler of the device. It identifies the reason - * for the interrupt and calls the relevant service routines. - * As a contongency measure, this ISR allocates the recv buffers, if their - * numbers are below the panic value which is presently set to 25% of the - * original number of rcv buffers allocated. + * IRQ_HANDLED: will be returned if IRQ was handled by this routine + * IRQ_NONE: will be returned if interrupt is not from our device */ - static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; @@ -2348,7 +2394,8 @@ spin_lock(&sp->isr_lock); - /* Identify the cause for interrupt and call the appropriate + /* + * Identify the cause for interrupt and call the appropriate * interrupt handler. Causes for the interrupt could be; * 1. Rx of packet. * 2. Tx complete. @@ -2362,30 +2409,28 @@ spin_unlock(&sp->isr_lock); return IRQ_NONE; } - /* Mask the interrupts on the NIC */ + + /* Mask the Interrupts on the NIC. */ general_mask = readq(&bar0->general_int_mask); writeq(0xFFFFFFFFFFFFFFFFULL, &bar0->general_int_mask); -#if DEBUG_ON - sp->int_cnt++; -#endif - /* If Intr is because of Tx Traffic */ if (reason & GEN_INTR_TXTRAFFIC) { - txIntrHandler(sp); + tx_intr_handler(sp); } /* If Intr is because of an error */ if (reason & (GEN_ERROR_INTR)) - alarmIntrHandler(sp); + alarm_intr_handler(sp); #ifdef CONFIG_S2IO_NAPI if (reason & GEN_INTR_RXTRAFFIC) { if (netif_rx_schedule_prep(dev)) { - en_dis_able_NicIntrs(sp, RX_TRAFFIC_INTR, - DISABLE_INTRS); - /* We retake the snap shot of the general interrupt - * register. + en_dis_able_nic_intrs(sp, RX_TRAFFIC_INTR, + DISABLE_INTRS); + /* + * Here we take a snap shot of the general + * Intr Register. */ general_mask = readq(&bar0->general_int_mask); __netif_rx_schedule(dev); @@ -2394,66 +2439,72 @@ #else /* If Intr is because of Rx Traffic */ if (reason & GEN_INTR_RXTRAFFIC) { - rxIntrHandler(sp); + rx_intr_handler(sp); } #endif -/* If the Rx buffer count is below the panic threshold then reallocate the - * buffers from the interrupt handler itself, else schedule a tasklet to - * reallocate the buffers. - */ + /* + * If the Rx buffer count is below the panic threshold then + * reallocate the buffers from the interrupt handler itself, + * else schedule a tasklet to reallocate the buffers. + */ #if 1 { - int i; + int i; + + for (i = 0; i < config->rx_ring_num; i++) { + int rxb_size = atomic_read(&sp->rx_bufs_left[i]); + int level = rx_buffer_level(sp, rxb_size, i); + + if ((level == PANIC) && (!TASKLET_IN_USE)) { + int ret; - for (i = 0; i < config->RxRingNum; i++) { - int rxb_size = atomic_read(&sp->rx_bufs_left[i]); - int level = rx_buffer_level(sp, rxb_size, i); - - if ((level == PANIC) && (!TASKLET_IN_USE)) { - int ret; - - DBG_PRINT(ERR_DBG, "%s: Rx BD hit ", dev->name); - DBG_PRINT(ERR_DBG, "PANIC levels\n"); - if ((ret = fill_rx_buffers(sp, i)) == -ENOMEM) { - DBG_PRINT(ERR_DBG, "%s:Out of memory", + DBG_PRINT(INTR_DBG, "%s: Rx BD hit ", dev->name); - DBG_PRINT(ERR_DBG, " in ISR!!\n"); - writeq(general_mask, - &bar0->general_int_mask); - spin_unlock(&sp->isr_lock); - return IRQ_HANDLED; + DBG_PRINT(INTR_DBG, "PANIC levels\n"); + if ((ret = + fill_rx_buffers(sp, i)) == -ENOMEM) { + DBG_PRINT(ERR_DBG, + "%s:Out of memory", + dev->name); + DBG_PRINT(ERR_DBG, " in ISR!!\n"); + writeq(general_mask, + &bar0->general_int_mask); + spin_unlock(&sp->isr_lock); + return IRQ_HANDLED; + } + clear_bit(0, + (unsigned long *) (&sp-> + tasklet_status)); + } else if ((level == LOW) + && (!atomic_read(&sp->tasklet_status))) { + tasklet_schedule(&sp->task); } - clear_bit(0, - (unsigned long *) (&sp->tasklet_status)); - } else if ((level == LOW) - && (!atomic_read(&sp->tasklet_status))) { - tasklet_schedule(&sp->task); - } - } + } } #else tasklet_schedule(&sp->task); #endif - /* Unmask all the previously enabled interrupts on the NIC */ + /* Unmask all previously enabled interrupts on the NIC. */ writeq(general_mask, &bar0->general_int_mask); spin_unlock(&sp->isr_lock); return IRQ_HANDLED; } -/* - * Input Argument/s: - * dev - pointer to the device structure. - * Return value: - * pointer to the updated net_device_stats structure. +/** + * s2io_get_stats - Updates the device statistics structure. + * @dev : pointer to the device structure. * Description: * This function updates the device statistics structure in the s2io_nic * structure and returns a pointer to the same. + * Return value: + * pointer to the updated net_device_stats structure. */ + struct net_device_stats *s2io_get_stats(struct net_device *dev) { nic_t *sp = dev->priv; @@ -2463,27 +2514,28 @@ mac_control = &sp->mac_control; config = &sp->config; - sp->stats.tx_errors = mac_control->StatsInfo->tmac_any_err_frms; - sp->stats.rx_errors = mac_control->StatsInfo->rmac_drop_frms; - sp->stats.multicast = mac_control->StatsInfo->rmac_vld_mcst_frms; + sp->stats.tx_errors = mac_control->stats_info->tmac_any_err_frms; + sp->stats.rx_errors = mac_control->stats_info->rmac_drop_frms; + sp->stats.multicast = mac_control->stats_info->rmac_vld_mcst_frms; sp->stats.rx_length_errors = - mac_control->StatsInfo->rmac_long_frms; + mac_control->stats_info->rmac_long_frms; return (&sp->stats); } -/* - * Input Argument/s: - * dev - pointer to the device structure - * Return value: - * void. +/** + * s2io_set_multicast - entry point for multicast address enable/disable. + * @dev : pointer to the device structure * Description: * This function is a driver entry point which gets called by the kernel * whenever multicast addresses must be enabled/disabled. This also gets * called to set/reset promiscuous mode. Depending on the deivce flag, we * determine, if multicast address must be enabled or if promiscuous mode * is to be disabled etc. + * Return value: + * void. */ + static void s2io_set_multicast(struct net_device *dev) { int i, j, prev_cnt; @@ -2506,7 +2558,7 @@ RMAC_ADDR_CMD_MEM_OFFSET(MAC_MC_ALL_MC_ADDR_OFFSET); writeq(val64, &bar0->rmac_addr_cmd_mem); /* Wait till command completes */ - waitForCmdComplete(sp); + wait_for_cmd_complete(sp); sp->m_cast_flg = 1; sp->all_multi_pos = MAC_MC_ALL_MC_ADDR_OFFSET; @@ -2519,7 +2571,7 @@ RMAC_ADDR_CMD_MEM_OFFSET(sp->all_multi_pos); writeq(val64, &bar0->rmac_addr_cmd_mem); /* Wait till command completes */ - waitForCmdComplete(sp); + wait_for_cmd_complete(sp); sp->m_cast_flg = 0; sp->all_multi_pos = 0; @@ -2582,7 +2634,7 @@ writeq(val64, &bar0->rmac_addr_cmd_mem); /* Wait for command completes */ - if (waitForCmdComplete(sp)) { + if (wait_for_cmd_complete(sp)) { DBG_PRINT(ERR_DBG, "%s: Adding ", dev->name); DBG_PRINT(ERR_DBG, "Multicasts failed\n"); @@ -2609,7 +2661,7 @@ writeq(val64, &bar0->rmac_addr_cmd_mem); /* Wait for command completes */ - if (waitForCmdComplete(sp)) { + if (wait_for_cmd_complete(sp)) { DBG_PRINT(ERR_DBG, "%s: Adding ", dev->name); DBG_PRINT(ERR_DBG, "Multicasts failed\n"); @@ -2619,17 +2671,16 @@ } } -/* - * Input Argument/s: - * dev - pointer to the device structure. - * new_mac - a uchar pointer to the new mac address which is to be set. - * Return value: - * SUCCESS on success and an appropriate (-)ve integer as defined in errno.h - * file on failure. - * Description: - * This procedure will program the Xframe to receive frames with new - * Mac Address +/** + * s2io_set_mac_addr - Programs the Xframe mac address + * @dev : pointer to the device structure. + * @addr: a uchar pointer to the new mac address which is to be set. + * Description : This procedure will program the Xframe to receive + * frames with new Mac Address + * Return value: SUCCESS on success and an appropriate (-)ve integer + * as defined in errno.h file on failure. */ + int s2io_set_mac_addr(struct net_device *dev, u8 * addr) { nic_t *sp = dev->priv; @@ -2655,7 +2706,7 @@ RMAC_ADDR_CMD_MEM_OFFSET(0); writeq(val64, &bar0->rmac_addr_cmd_mem); /* Wait till command completes */ - if (waitForCmdComplete(sp)) { + if (wait_for_cmd_complete(sp)) { DBG_PRINT(ERR_DBG, "%s: set_mac_addr failed\n", dev->name); return FAILURE; } @@ -2663,18 +2714,18 @@ return SUCCESS; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * info - pointer to the structure with parameters given by ethtool to set - * link information. - * Return value: - * 0 on success. +/** + * s2io_ethtool_sset - Sets different link parameters. + * @sp : private member of the device structure, which is a pointer to the * s2io_nic structure. + * @info: pointer to the structure with parameters given by ethtool to set + * link information. * Description: - * The function sets different link parameters provided by the user onto - * the NIC. - */ + * The function sets different link parameters provided by the user onto + * the NIC. + * Return value: + * 0 on success. +*/ + static int s2io_ethtool_sset(struct net_device *dev, struct ethtool_cmd *info) { @@ -2690,17 +2741,18 @@ return 0; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * info - pointer to the structure with parameters given by ethtool to return - * link information. - * Return value: - * void +/** + * s2io_ethtol_gset - Return link specific information. + * @sp : private member of the device structure, pointer to the + * s2io_nic structure. + * @info : pointer to the structure with parameters given by ethtool + * to return link information. * Description: - * Returns link specefic information like speed, duplex etc.. to ethtool. + * Returns link specific information like speed, duplex etc.. to ethtool. + * Return value : + * return 0 on success. */ + int s2io_ethtool_gset(struct net_device *dev, struct ethtool_cmd *info) { nic_t *sp = dev->priv; @@ -2721,17 +2773,18 @@ return 0; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * info - pointer to the structure with parameters given by ethtool to return - * driver information. +/** + * s2io_ethtool_gdrvinfo - Returns driver specific information. + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @info : pointer to the structure with parameters given by ethtool to + * return driver information. + * Description: + * Returns driver specefic information like name, version etc.. to ethtool. * Return value: * void - * Description: - * Returns driver specefic information like name, version etc.. to ethtool. */ + static void s2io_ethtool_gdrvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { @@ -2748,19 +2801,20 @@ info->n_stats = S2IO_STAT_LEN; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * regs - pointer to the structure with parameters given by ethtool for +/** + * s2io_ethtool_gregs - dumps the entire space of Xfame into the buffer. + * @sp: private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @regs : pointer to the structure with parameters given by ethtool for * dumping the registers. - * reg_space - The input argumnet into which all the registers are dumped. - * Return value: - * void - * Description: - * Dumps the entire register space of xFrame NIC into the user given buffer - * area. - */ + * @reg_space: The input argumnet into which all the registers are dumped. + * Description: + * Dumps the entire register space of xFrame NIC into the user given + * buffer area. + * Return value : + * void . +*/ + static void s2io_ethtool_gregs(struct net_device *dev, struct ethtool_regs *regs, void *space) { @@ -2778,17 +2832,15 @@ } } -/* - * Input Argument/s: - * data - address of the private member of the device structure, which +/** + * s2io_phy_id - timer function that alternates adapter LED. + * @data : address of the private member of the device structure, which * is a pointer to the s2io_nic structure, provided as an u32. - * Return value: - * void - * Description: - * This is actually the timer function that alternates the adapter LED bit - * of the adapter control bit to set/reset every time on invocation. - * The timer is set for 1/2 a second, hence tha NIC blinks once every second. - */ + * Description: This is actually the timer function that alternates the + * adapter LED bit of the adapter control bit to set/reset every time on + * invocation. The timer is set for 1/2 a second, hence tha NIC blinks + * once every second. +*/ static void s2io_phy_id(unsigned long data) { nic_t *sp = (nic_t *) data; @@ -2810,20 +2862,21 @@ mod_timer(&sp->id_timer, jiffies + HZ / 2); } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * id - pointer to the structure with identification parameters given by - * ethtool. +/** + * s2io_ethtool_idnic - To physically identify the nic on the system. + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @id : pointer to the structure with identification parameters given by + * ethtool. + * Description: Used to physically identify the NIC on the system. + * The Link LED will blink for a time specified by the user for + * identification. + * NOTE: The Link has to be Up to be able to blink the LED. Hence + * identification is possible only if it's link is up. * Return value: - * int , returns '0' on success - * Description: - * Used to physically identify the NIC on the system. The Link LED will blink - * for a time specified by the user for identification. - * NOTE: The Link has to be Up to be able to blink the LED. Hence - * identification is possible only if it's link is up. + * int , returns 0 on success */ + static int s2io_ethtool_idnic(struct net_device *dev, u32 data) { u64 val64 = 0; @@ -2856,15 +2909,14 @@ return 0; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * ep - pointer to the structure with pause parameters given by ethtool. +/** + * s2io_ethtool_getpause_data -Pause frame frame generation and reception. + * @sp : private member of the device structure, which is a pointer to the * s2io_nic structure. + * @ep : pointer to the structure with pause parameters given by ethtool. + * Description: + * Returns the Pause frame generation and reception capability of the NIC. * Return value: * void - * Description: - * Returns the Pause frame generation and reception capability of the NIC. */ static void s2io_ethtool_getpause_data(struct net_device *dev, struct ethtool_pauseparam *ep) @@ -2881,17 +2933,18 @@ ep->autoneg = FALSE; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * ep - pointer to the structure with pause parameters given by ethtool. - * Return value: - * int, returns '0' on Success +/** + * s2io_ethtool-setpause_data - set/reset pause frame generation. + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @ep : pointer to the structure with pause parameters given by ethtool. * Description: - * It can be used to set or reset Pause frame generation or reception support - * of the NIC. + * It can be used to set or reset Pause frame generation or reception + * support of the NIC. + * Return value: + * int, returns 0 on Success */ + int s2io_ethtool_setpause_data(struct net_device *dev, struct ethtool_pauseparam *ep) { @@ -2912,21 +2965,24 @@ return 0; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * off - offset at which the data must be written - * Return value: - * -1 on failure and the value read from the Eeprom if successful. +/** + * read_eeprom - reads 4 bytes of data from user given offset. + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @off : offset at which the data must be written + * @data : Its an output parameter where the data read at the given + * offset is stored. * Description: - * Will read 4 bytes of data from the user given offset and return the - * read data. + * Will read 4 bytes of data from the user given offset and return the + * read data. * NOTE: Will allow to read only part of the EEPROM visible through the - * I2C bus. + * I2C bus. + * Return value: + * -1 on failure and 0 on success. */ + #define S2IO_DEV_ID 5 -static u32 readEeprom(nic_t * sp, int off) +static u32 read_eeprom(nic_t * sp, int off) { u32 data = -1, exit_cnt = 0; u64 val64; @@ -2951,21 +3007,22 @@ return data; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * off - offset at which the data must be written - * data - The data that is to be written - * cnt - Number of bytes of the data that are actually to be written into +/** + * write_eeprom - actually writes the relevant part of the data value. + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @off : offset at which the data must be written + * @data : The data that is to be written + * @cnt : Number of bytes of the data that are actually to be written into * the Eeprom. (max of 3) - * Return value: - * '0' on success, -1 on failure. * Description: * Actually writes the relevant part of the data value into the Eeprom * through the I2C bus. + * Return value: + * 0 on success, -1 on failure. */ -static int writeEeprom(nic_t * sp, int off, u32 data, int cnt) + +static int write_eeprom(nic_t * sp, int off, u32 data, int cnt) { int exit_cnt = 0, ret = -1; u64 val64; @@ -2991,39 +3048,19 @@ return ret; } -/* - * A helper function used to invert the 4 byte u32 data field - * byte by byte. This will be used by the Read Eeprom function - * for display purposes. - */ -u32 inv(u32 data) -{ - static u32 ret = 0; - - if (data) { - u8 c = data; - ret = ((ret << 8) + c); - data >>= 8; - inv(data); - } - - return ret; -} - -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * eeprom - pointer to the user level structure provided by ethtool, - * containing all relevant information. - * data_buf - user defined value to be written into Eeprom. - * Return value: - * int '0' on success - * Description: - * Reads the values stored in the Eeprom at given offset for a given length. - * Stores these values int the input argument data buffer 'data_buf' and - * returns these to the caller (ethtool.) +/** + * s2io_ethtool_geeprom - reads the value stored in the Eeprom. + * @sp : private member of the device structure, which is a pointer to the * s2io_nic structure. + * @eeprom : pointer to the user level structure provided by ethtool, + * containing all relevant information. + * @data_buf : user defined value to be written into Eeprom. + * Description: Reads the values stored in the Eeprom at given offset + * for a given length. Stores these values int the input argument data + * buffer 'data_buf' and returns these to the caller (ethtool.) + * Return value: + * int 0 on success */ + int s2io_ethtool_geeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, u8 * data_buf) { @@ -3036,30 +3073,31 @@ eeprom->len = XENA_EEPROM_SPACE - eeprom->offset; for (i = 0; i < eeprom->len; i += 4) { - data = readEeprom(sp, eeprom->offset + i); + data = read_eeprom(sp, eeprom->offset + i); if (data < 0) { DBG_PRINT(ERR_DBG, "Read of EEPROM failed\n"); return -EFAULT; } - valid = inv(data); + valid = INV(data); memcpy((data_buf + i), &valid, 4); } return 0; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * eeprom - pointer to the user level structure provided by ethtool, - * containing all relevant information. - * data_buf - user defined value to be written into Eeprom. - * Return value: - * '0' on success, -EFAULT on failure. - * Description: +/** + * s2io_ethtool_seeprom - tries to write the user provided value in Eeprom + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @eeprom : pointer to the user level structure provided by ethtool, + * containing all relevant information. + * @data_buf ; user defined value to be written into Eeprom. + * Description: * Tries to write the user provided value in the Eeprom, at the offset * given by the user. + * Return value: + * 0 on success, -EFAULT on failure. */ + static int s2io_ethtool_seeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, u8 * data_buf) @@ -3083,7 +3121,7 @@ } else valid = data; - if (writeEeprom(sp, (eeprom->offset + cnt), valid, 0)) { + if (write_eeprom(sp, (eeprom->offset + cnt), valid, 0)) { DBG_PRINT(ERR_DBG, "ETHTOOL_WRITE_EEPROM Err: Cannot "); DBG_PRINT(ERR_DBG, @@ -3097,19 +3135,20 @@ return 0; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * data - variable that returns the result of each of the test conducted by - * the driver. - * Return value: - * '0' on success. +/** + * s2io_register_test - reads and writes into all clock domains. + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @data : variable that returns the result of each of the test conducted b + * by the driver. * Description: - * Read and write into all clock domains. The NIC has 3 clock domains, - * see that registers in all the three regions are accessible. + * Read and write into all clock domains. The NIC has 3 clock domains, + * see that registers in all the three regions are accessible. + * Return value: + * 0 on success. */ -static int s2io_registerTest(nic_t * sp, uint64_t * data) + +static int s2io_register_test(nic_t * sp, uint64_t * data) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; u64 val64 = 0; @@ -3159,88 +3198,90 @@ return 0; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * data - variable that returns the result of each of the test conducted by - * the driver. - * Return value: - * '0' on success. +/** + * s2io_eeprom_test - to verify that EEprom in the xena can be programmed. + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @data:variable that returns the result of each of the test conducted by + * the driver. * Description: - * Verify that EEPROM in the xena can be programmed using I2C_CONTROL - * register. + * Verify that EEPROM in the xena can be programmed using I2C_CONTROL + * register. + * Return value: + * 0 on success. */ -static int s2io_eepromTest(nic_t * sp, uint64_t * data) + +static int s2io_eeprom_test(nic_t * sp, uint64_t * data) { int fail = 0, ret_data; /* Test Write Error at offset 0 */ - if (!writeEeprom(sp, 0, 0, 3)) + if (!write_eeprom(sp, 0, 0, 3)) fail = 1; /* Test Write at offset 4f0 */ - if (writeEeprom(sp, 0x4F0, 0x01234567, 3)) + if (write_eeprom(sp, 0x4F0, 0x01234567, 3)) fail = 1; - if ((ret_data = readEeprom(sp, 0x4f0)) < 0) + if ((ret_data = read_eeprom(sp, 0x4F0)) < 0) fail = 1; if (ret_data != 0x01234567) fail = 1; /* Reset the EEPROM data go FFFF */ - writeEeprom(sp, 0x4F0, 0xFFFFFFFF, 3); + write_eeprom(sp, 0x4F0, 0xFFFFFFFF, 3); /* Test Write Request Error at offset 0x7c */ - if (!writeEeprom(sp, 0x07C, 0, 3)) + if (!write_eeprom(sp, 0x07C, 0, 3)) fail = 1; /* Test Write Request at offset 0x7fc */ - if (writeEeprom(sp, 0x7FC, 0x01234567, 3)) + if (write_eeprom(sp, 0x7FC, 0x01234567, 3)) fail = 1; - if ((ret_data = readEeprom(sp, 0x7FC)) < 0) + if ((ret_data = read_eeprom(sp, 0x7FC)) < 0) fail = 1; if (ret_data != 0x01234567) fail = 1; /* Reset the EEPROM data go FFFF */ - writeEeprom(sp, 0x7FC, 0xFFFFFFFF, 3); + write_eeprom(sp, 0x7FC, 0xFFFFFFFF, 3); /* Test Write Error at offset 0x80 */ - if (!writeEeprom(sp, 0x080, 0, 3)) + if (!write_eeprom(sp, 0x080, 0, 3)) fail = 1; /* Test Write Error at offset 0xfc */ - if (!writeEeprom(sp, 0x0FC, 0, 3)) + if (!write_eeprom(sp, 0x0FC, 0, 3)) fail = 1; /* Test Write Error at offset 0x100 */ - if (!writeEeprom(sp, 0x100, 0, 3)) + if (!write_eeprom(sp, 0x100, 0, 3)) fail = 1; /* Test Write Error at offset 4ec */ - if (!writeEeprom(sp, 0x4EC, 0, 3)) + if (!write_eeprom(sp, 0x4EC, 0, 3)) fail = 1; *data = fail; return 0; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * data - variable that returns the result of each of the test conducted by - * the driver. - * Return value: - * '0' on success and -1 on failure. +/** + * s2io_bist_test - invokes the MemBist test of the card . + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @data:variable that returns the result of each of the test conducted by + * the driver. * Description: - * This invokes the MemBist test of the card. We give around - * 2 secs time for the Test to complete. If it's still not complete - * within this peiod, we consider that the test failed. + * This invokes the MemBist test of the card. We give around + * 2 secs time for the Test to complete. If it's still not complete + * within this peiod, we consider that the test failed. + * Return value: + * 0 on success and -1 on failure. */ -static int s2io_bistTest(nic_t * sp, uint64_t * data) + +static int s2io_bist_test(nic_t * sp, uint64_t * data) { u8 bist = 0; int cnt = 0, ret = -1; @@ -3264,19 +3305,20 @@ return ret; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * data - variable that returns the result of each of the test conducted by - * the driver. - * Return value: - * '0' on success. +/** + * s2io-link_test - verifies the link state of the nic + * @sp ; private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @data: variable that returns the result of each of the test conducted by + * the driver. * Description: - * The function verifies the link state of the NIC and updates the input - * argument 'data' appropriately. + * The function verifies the link state of the NIC and updates the input + * argument 'data' appropriately. + * Return value: + * 0 on success. */ -static int s2io_linkTest(nic_t * sp, uint64_t * data) + +static int s2io_link_test(nic_t * sp, uint64_t * data) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; u64 val64; @@ -3288,19 +3330,20 @@ return 0; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * data - variable that returns the result of each of the test conducted by - * the driver. - * Return value: - * '0' on success. +/** + * s2io_rldram_test - offline test for access to the RldRam chip on the NIC + * @sp - private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @data - variable that returns the result of each of the test + * conducted by the driver. * Description: * This is one of the offline test that tests the read and write * access to the RldRam chip on the NIC. + * Return value: + * 0 on success. */ -static int s2io_rldramTest(nic_t * sp, uint64_t * data) + +static int s2io_rldram_test(nic_t * sp, uint64_t * data) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; u64 val64; @@ -3395,20 +3438,21 @@ return 0; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * ethtest - pointer to a ethtool command specific structure that will be - * returned to the user. - * data - variable that returns the result of each of the test conducted by - * the driver. - * Return value: - * SUCCESS on success and an appropriate -1 on failure. +/** + * s2io_ethtool_test - conducts 6 tsets to determine the health of card. + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @ethtest : pointer to a ethtool command specific structure that will be + * returned to the user. + * @data : variable that returns the result of each of the test + * conducted by the driver. * Description: * This function conducts 6 tests ( 4 offline and 2 online) to determine - * the health of the card. + * the health of the card. + * Return value: + * void */ + static void s2io_ethtool_test(struct net_device *dev, struct ethtool_test *ethtest, uint64_t * data) @@ -3424,22 +3468,22 @@ } else s2io_set_swapper(sp); - if (s2io_registerTest(sp, &data[0])) + if (s2io_register_test(sp, &data[0])) ethtest->flags |= ETH_TEST_FL_FAILED; s2io_reset(sp); s2io_set_swapper(sp); - if (s2io_rldramTest(sp, &data[3])) + if (s2io_rldram_test(sp, &data[3])) ethtest->flags |= ETH_TEST_FL_FAILED; s2io_reset(sp); s2io_set_swapper(sp); - if (s2io_eepromTest(sp, &data[1])) + if (s2io_eeprom_test(sp, &data[1])) ethtest->flags |= ETH_TEST_FL_FAILED; - if (s2io_bistTest(sp, &data[4])) + if (s2io_bist_test(sp, &data[4])) ethtest->flags |= ETH_TEST_FL_FAILED; if (orig_state) @@ -3459,7 +3503,7 @@ data[4] = -1; } - if (s2io_linkTest(sp, &data[2])) + if (s2io_link_test(sp, &data[2])) ethtest->flags |= ETH_TEST_FL_FAILED; data[0] = 0; @@ -3475,7 +3519,7 @@ { int i = 0; nic_t *sp = dev->priv; - StatInfo_t *stat_info = sp->mac_control.StatsInfo; + StatInfo_t *stat_info = sp->mac_control.stats_info; tmp_stats[i++] = stat_info->tmac_frms; tmp_stats[i++] = stat_info->tmac_data_octets; @@ -3597,36 +3641,37 @@ .get_ethtool_stats = s2io_get_ethtool_stats }; -/* - * Input Argument/s: - * dev - Device pointer. - * ifr - An IOCTL specefic structure, that can contain a pointer to - * a proprietary structure used to pass information to the driver. - * cmd - This is used to distinguish between the different commands that - * can be passed to the IOCTL functions. - * Return value: - * '0' on success and an appropriate (-)ve integer as defined in errno.h - * file on failure. +/** + * s2io_ioctl - Entry point for the Ioctl + * @dev : Device pointer. + * @ifr : An IOCTL specefic structure, that can contain a pointer to + * a proprietary structure used to pass information to the driver. + * @cmd : This is used to distinguish between the different commands that + * can be passed to the IOCTL functions. * Description: * This function has support for ethtool, adding multiple MAC addresses on * the NIC and some DBG commands for the util tool. + * Return value: + * Currently the IOCTL supports no operations, hence by default this + * function returns OP NOT SUPPORTED value. */ + int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { return -EOPNOTSUPP; } -/* - * Input Argument/s: - * dev - device pointer. - * new_mtu - the new MTU size for the device. +/** + * s2io_change_mtu - entry point to change MTU size for the device. + * @dev : device pointer. + * @new_mtu : the new MTU size for the device. + * Description: A driver entry point to change MTU size for the device. + * Before changing the MTU the device must be stopped. * Return value: - * '0' on success and an appropriate (-)ve integer as defined in errno.h + * 0 on success and an appropriate (-)ve integer as defined in errno.h * file on failure. - * Description: - * A driver entry point to change MTU size for the device. Before changing - * the MTU the device must be stopped. */ + int s2io_change_mtu(struct net_device *dev, int new_mtu) { nic_t *sp = dev->priv; @@ -3645,7 +3690,7 @@ return -EPERM; } -/* Set the new MTU into the PYLD register of the NIC */ + /* Set the new MTU into the PYLD register of the NIC */ val64 = new_mtu; writeq(vBIT(val64, 2, 14), &bar0->rmac_max_pyld_len); @@ -3654,18 +3699,19 @@ return 0; } -/* - * Input Argument/s: - * dev_adr - address of the device structure in dma_addr_t format. - * Return value: - * void. +/** + * s2io_tasklet - Bottom half of the ISR. + * @dev_adr : address of the device structure in dma_addr_t format. * Description: * This is the tasklet or the bottom half of the ISR. This is * an extension of the ISR which is scheduled by the scheduler to be run * when the load on the CPU is low. All low priority tasks of the ISR can * be pushed into the tasklet. For now the tasklet is used only to * replenish the Rx buffers in the Rx buffer descriptors. + * Return value: + * void. */ + static void s2io_tasklet(unsigned long dev_addr) { struct net_device *dev = (struct net_device *) dev_addr; @@ -3678,29 +3724,30 @@ config = &sp->config; if (!TASKLET_IN_USE) { - for (i = 0; i < config->RxRingNum; i++) { + for (i = 0; i < config->rx_ring_num; i++) { ret = fill_rx_buffers(sp, i); if (ret == -ENOMEM) { DBG_PRINT(ERR_DBG, "%s: Out of ", dev->name); DBG_PRINT(ERR_DBG, "memory in tasklet\n"); - return; + break; } else if (ret == -EFILL) { DBG_PRINT(ERR_DBG, "%s: Rx Ring %d is full\n", dev->name, i); - return; + break; } } clear_bit(0, (unsigned long *) (&sp->tasklet_status)); } } - -/* - * Description: - * +/** + * s2io_set_link - Set the LInk status + * @data: long pointer to device private structue + * Description: Sets the link status for the adapter */ + static void s2io_set_link(unsigned long data) { nic_t *nic = (nic_t *) data; @@ -3708,7 +3755,8 @@ XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; register u64 val64, err_reg; - /* Allow a small delay for the NICs self initiated + /* + * Allow a small delay for the NICs self initiated * cleanup to complete. */ set_current_state(TASK_UNINTERRUPTIBLE); @@ -3716,7 +3764,7 @@ val64 = readq(&bar0->adapter_status); if (verify_xena_quiescence(val64, nic->device_enabled_once)) { - /* Acknowledge interrupt and clear the R1 register */ + /* Acknowledge Intr and clear R1 register. */ err_reg = readq(&bar0->mac_rmac_err_reg); writeq(err_reg, &bar0->mac_rmac_err_reg); @@ -3748,13 +3796,16 @@ } } -/* +/** + * s2io_restart_nic - Resets the NIC. + * @data : long pointer to the device private structure * Description: * This function is scheduled to be run by the s2io_tx_watchdog * function after 0.5 secs to reset the NIC. The idea is to reduce * the run time of the watch dog routine which is run holding a * spin lock. */ + static void s2io_restart_nic(unsigned long data) { struct net_device *dev = (struct net_device *) data; @@ -3767,18 +3818,19 @@ "%s: was reset by Tx watchdog timer.\n", dev->name); } -/* - * Input Argument/s: - * dev - device pointer. - * Return value: - * void +/** + * s2io_tx_watchdog - Watchdog for transmit side. + * @dev : Pointer to net device structure * Description: * This function is triggered if the Tx Queue is stopped * for a pre-defined amount of time when the Interface is still up. * If the Interface is jammed in such a situation, the hardware is * reset (by s2io_close) and restarted again (by s2io_open) to * overcome any problem that might have been caused in the hardware. + * Return value: + * void */ + static void s2io_tx_watchdog(struct net_device *dev) { nic_t *sp = dev->priv; @@ -3788,25 +3840,24 @@ } } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * skb - the socket buffer pointer. - * len - length of the packet - * cksum - FCS checksum of the frame. - * ring_no - the ring from which this RxD was extracted. - * Return value: - * SUCCESS on success and -1 on failure. - * Description: - * This function is called by the Tx interrupt serivce routine to perform +/** + * rx_osm_handler - To perform some OS related operations on SKB. + * @sp: private member of the device structure,pointer to s2io_nic structure. + * @skb : the socket buffer pointer. + * @len : length of the packet + * @cksum : FCS checksum of the frame. + * @ring_no : the ring from which this RxD was extracted. + * Description: + * This function is called by the Tx interrupt serivce routine to perform * some OS related operations on the SKB before passing it to the upper * layers. It mainly checks if the checksum is OK, if so adds it to the * SKBs cksum variable, increments the Rx packet count and passes the SKB * to the upper layer. If the checksum is wrong, it increments the Rx * packet error count, frees the SKB and returns error. + * Return value: + * SUCCESS on success and -1 on failure. */ -static int rxOsmHandler(nic_t * sp, u16 len, RxD_t * rxdp, int ring_no) +static int rx_osm_handler(nic_t * sp, u16 len, RxD_t * rxdp, int ring_no) { struct net_device *dev = (struct net_device *) sp->dev; struct sk_buff *skb = @@ -3817,7 +3868,8 @@ if ((rxdp->Control_1 & TCP_OR_UDP_FRAME) && (sp->rx_csum)) { l4_csum = RXD_GET_L4_CKSUM(rxdp->Control_1); if ((l3_csum == L3_CKSUM_OK) && (l4_csum == L4_CKSUM_OK)) { - /* NIC verifies if the Checksum of the received + /* + * NIC verifies if the Checksum of the received * frame is Ok or not and accordingly returns * a flag in the RxD. */ @@ -3844,25 +3896,21 @@ #endif dev->last_rx = jiffies; -#if DEBUG_ON - sp->rxpkt_cnt++; -#endif sp->rx_pkt_count++; sp->stats.rx_packets++; sp->stats.rx_bytes += len; - sp->rxpkt_bytes += len; atomic_dec(&sp->rx_bufs_left[ring_no]); rxdp->Host_Control = 0; return SUCCESS; } -int check_for_txSpace(nic_t * sp) +int check_for_tx_space(nic_t * sp) { u32 put_off, get_off, queue_len; int ret = TRUE, i; - for (i = 0; i < sp->config.TxFIFONum; i++) { + for (i = 0; i < sp->config.tx_fifo_num; i++) { queue_len = sp->mac_control.tx_curr_put_info[i].fifo_len + 1; put_off = sp->mac_control.tx_curr_put_info[i].offset; @@ -3876,18 +3924,19 @@ return ret; } -/* -* Input Argument/s: -* sp - private member of the device structure, which is a pointer to the -* s2io_nic structure. -* link - inidicates whether link is UP/DOWN. -* Return value: -* void. -* Description: -* This function stops/starts the Tx queue depending on whether the link -* status of the NIC is is down or up. This is called by the Alarm interrupt -* handler whenever a link change interrupt comes up. -*/ +/** + * s2io_link - stops/starts the Tx queue. + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @link : inidicates whether link is UP/DOWN. + * Description: + * This function stops/starts the Tx queue depending on whether the link + * status of the NIC is is down or up. This is called by the Alarm + * interrupt handler whenever a link change interrupt comes up. + * Return value: + * void. + */ + void s2io_link(nic_t * sp, int link) { struct net_device *dev = (struct net_device *) sp->dev; @@ -3900,8 +3949,9 @@ } else { DBG_PRINT(ERR_DBG, "%s: Link Up\n", dev->name); netif_carrier_on(dev); - if (check_for_txSpace(sp) == TRUE) { - /* Don't wake the queue, if we know there + if (check_for_tx_space(sp) == TRUE) { + /* + * Dont wake the queue if we know there * are no free TxDs available. */ netif_wake_queue(dev); @@ -3911,14 +3961,15 @@ sp->last_link_state = link; } -/* -* Input Argument/s: -* pdev - structure containing the PCI related information of the device. -* Return value: -* returns the revision ID of the device. -* Description: -* Function to identify the Revision ID of xena. -*/ +/** + * get_xena_rev_id - to identify revision ID of xena. + * @pdev : PCI Dev structure + * Description: + * Function to identify the Revision ID of xena. + * Return value: + * returns the revision ID of the device. + */ + int get_xena_rev_id(struct pci_dev *pdev) { u8 id = 0; @@ -3927,21 +3978,22 @@ return id; } -/* -* Input Argument/s: -* sp - private member of the device structure, which is a pointer to the -* s2io_nic structure. -* Return value: -* void -* Description: -* This function initializes a few of the PCI and PCI-X configuration registers -* with recommended values. -*/ +/** + * s2io_init_pci -Initialization of PCI and PCI-X configuration registers . + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * Description: + * This function initializes a few of the PCI and PCI-X configuration registers + * with recommended values. + * Return value: + * void + */ + static void s2io_init_pci(nic_t * sp) { u16 pci_cmd = 0; -/* Enable Data Parity Error Recovery in PCI-X command register. */ + /* Enable Data Parity Error Recovery in PCI-X command register. */ pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, @@ -3949,13 +4001,13 @@ pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); -/* Set the PErr Response bit in PCI command register. */ + /* Set the PErr Response bit in PCI command register. */ pci_read_config_word(sp->pdev, PCI_COMMAND, &pci_cmd); pci_write_config_word(sp->pdev, PCI_COMMAND, (pci_cmd | PCI_COMMAND_PARITY)); pci_read_config_word(sp->pdev, PCI_COMMAND, &pci_cmd); -/* Set user specified value in Latency Timer */ + /* Set user specified value in Latency Timer */ if (latency_timer) { pci_write_config_byte(sp->pdev, PCI_LATENCY_TIMER, latency_timer); @@ -3963,14 +4015,14 @@ &latency_timer); } -/* Set MMRB count to 4096 in PCI-X Command register. */ + /* Set MMRB count to 4096 in PCI-X Command register. */ pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, (sp->pcix_cmd | 0x0C)); pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); -/* Setting Maximum outstanding splits to two for now. */ - sp->pcix_cmd &= 0xFF1F; + /* Setting Maximum outstanding splits based on system type. */ + sp->pcix_cmd &= 0xFF8F; sp->pcix_cmd |= XENA_MAX_OUTSTANDING_SPLITS(XENA_TWO_SPLIT_TRANSACTION); @@ -3978,7 +4030,6 @@ sp->pcix_cmd); pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); - } MODULE_AUTHOR("Raghavendra Koushik "); @@ -3991,21 +4042,20 @@ MODULE_PARM(rx_prio, "1-" __MODULE_STRING(1) "i"); MODULE_PARM(tx_prio, "1-" __MODULE_STRING(1) "i"); MODULE_PARM(latency_timer, "1-" __MODULE_STRING(1) "i"); +/** + * s2io_init_nic - Initialization of the adapter . + * @pdev : structure containing the PCI related information of the device. + * @pre: List of PCI devices supported by the driver listed in s2io_tbl. + * Description: + * The function initializes an adapter identified by the pci_dec structure. + * All OS related initialization including memory and device structure and + * initlaization of the device private variable is done. Also the swapper + * control register is initialized to enable read and write into the I/O + * registers of the device. + * Return value: + * returns 0 on success and negative on failure. + */ -/* -* Input Argument/s: -* pdev - structure containing the PCI related information of the device. -* pre - the List of PCI devices supported by the driver listed in s2io_tbl. -* Return value: -* returns '0' on success and negative on failure. -* Description: -* The function initializes an adapter identified by the pci_dec structure. -* All OS related initialization including memory and device structure and -* initlaization of the device private variable is done. Also the swapper -* control register is initialized to enable read and write into the I/O -* registers of the device. -* -*/ static int __devinit s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) { @@ -4031,6 +4081,7 @@ if (!pci_set_dma_mask(pdev, 0xffffffffffffffffULL)) { DBG_PRINT(INIT_DBG, "s2io_init_nic: Using 64bit DMA\n"); dma_flag = TRUE; + if (pci_set_consistent_dma_mask (pdev, 0xffffffffffffffffULL)) { DBG_PRINT(ERR_DBG, @@ -4080,7 +4131,8 @@ /* Initialize some PCI/PCI-X fields of the NIC. */ s2io_init_pci(sp); - /* Setting the device configuration parameters. + /* + * Setting the device configuration parameters. * Most of these parameters can be specified by the user during * module insertion as they are module loadable parameters. If * these parameters are not not specified during load time, they @@ -4090,7 +4142,7 @@ config = &sp->config; /* Tx side parameters. */ - config->TxFIFONum = fifo_num ? fifo_num : 1; + config->tx_fifo_num = fifo_num ? fifo_num : 1; if (!fifo_len[0] && (fifo_num > 1)) { printk(KERN_ERR "Fifo Lens not specified for all FIFOs\n"); @@ -4109,67 +4161,56 @@ goto init_failed; } } - for (cnt = 0; cnt < config->TxFIFONum; cnt++) { - config->TxCfg[cnt].FifoLen = fifo_len[cnt]; - config->TxCfg[cnt].FifoPriority = cnt; + for (cnt = 0; cnt < config->tx_fifo_num; cnt++) { + config->tx_cfg[cnt].fifo_len = fifo_len[cnt]; + config->tx_cfg[cnt].fifo_priority = cnt; } } else { - config->TxCfg[0].FifoLen = DEFAULT_FIFO_LEN; - config->TxCfg[0].FifoPriority = 0; + config->tx_cfg[0].fifo_len = DEFAULT_FIFO_LEN; + config->tx_cfg[0].fifo_priority = 0; } - config->TxIntrType = TXD_INT_TYPE_UTILZ; - for (i = 0; i < config->TxFIFONum; i++) { - if (config->TxCfg[i].FifoLen < 65) { - config->TxIntrType = TXD_INT_TYPE_PER_LIST; + config->tx_intr_type = TXD_INT_TYPE_UTILZ; + for (i = 0; i < config->tx_fifo_num; i++) { + config->tx_cfg[i].f_no_snoop = + (NO_SNOOP_TXD | NO_SNOOP_TXD_BUFFER); + if (config->tx_cfg[i].fifo_len < 65) { + config->tx_intr_type = TXD_INT_TYPE_PER_LIST; break; } } - - config->TxCfg[0].fNoSnoop = (NO_SNOOP_TXD | NO_SNOOP_TXD_BUFFER); - config->MaxTxDs = MAX_SKB_FRAGS; - config->TxFlow = TRUE; + config->max_txds = MAX_SKB_FRAGS; /* Rx side parameters. */ - config->RxRingNum = ring_num ? ring_num : 1; + config->rx_ring_num = ring_num ? ring_num : 1; if (ring_len[0]) { int cnt; - for (cnt = 0; cnt < config->RxRingNum; cnt++) { - config->RxCfg[cnt].NumRxd = ring_len[cnt]; - config->RxCfg[cnt].RingPriority = cnt; + for (cnt = 0; cnt < config->rx_ring_num; cnt++) { + config->rx_cfg[cnt].num_rxd = ring_len[cnt]; + config->rx_cfg[cnt].ring_priority = cnt; } } else { - int id; - if ((id = get_xena_rev_id(pdev)) == 1) { - config->RxCfg[0].NumRxd = LARGE_RXD_CNT; + config->rx_cfg[0].num_rxd = SMALL_RXD_CNT; + config->rx_cfg[0].ring_priority = 0; + } - } else { - config->RxCfg[0].NumRxd = SMALL_RXD_CNT; - } - config->RxCfg[0].RingPriority = 0; + for (i = 0; i < config->rx_ring_num; i++) { + config->rx_cfg[i].ring_org = RING_ORG_BUFF1; + config->rx_cfg[i].f_no_snoop = + (NO_SNOOP_RXD | NO_SNOOP_RXD_BUFFER); } - config->RxCfg[0].RingOrg = RING_ORG_BUFF1; - config->RxCfg[0].RxdThresh = DEFAULT_RXD_THRESHOLD; - config->RxCfg[0].fNoSnoop = (NO_SNOOP_RXD | NO_SNOOP_RXD_BUFFER); - config->RxCfg[0].RxD_BackOff_Interval = TBD; - config->RxFlow = TRUE; - - /* Miscellaneous parameters. */ - config->RxVLANEnable = TRUE; - config->MTU = MAX_MTU_VLAN; - config->JumboEnable = FALSE; /* Setting Mac Control parameters */ - mac_control->txdl_len = MAX_SKB_FRAGS; mac_control->rmac_pause_time = 0; + /* Initialize Ring buffer parameters. */ - for (i = 0; i < config->RxRingNum; i++) + for (i = 0; i < config->rx_ring_num; i++) atomic_set(&sp->rx_bufs_left[i], 0); /* initialize the shared memory used by the NIC and the host */ - if (initSharedMem(sp)) { + if (init_shared_mem(sp)) { DBG_PRINT(ERR_DBG, "%s: Memory allocation failed\n", dev->name); goto mem_alloc_failed; @@ -4208,15 +4249,16 @@ dev->set_multicast_list = &s2io_set_multicast; dev->do_ioctl = &s2io_ioctl; dev->change_mtu = &s2io_change_mtu; +#ifdef SET_ETHTOOL_OPS SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); - +#endif /* * will use eth_mac_addr() for dev->set_mac_address * mac address will be set every time dev->open() is called */ #ifdef CONFIG_S2IO_NAPI dev->poll = s2io_poll; - dev->weight = 128; /* For now. */ + dev->weight = 90; /* For now. */ #endif dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM; @@ -4244,14 +4286,15 @@ if (s2io_set_swapper(sp)) { DBG_PRINT(ERR_DBG, "%s:swapper settings are wrong\n", dev->name); - goto set_swap_failed; + goto register_failed; } /* Fix for all "FFs" MAC address problems observed on Alpha platforms */ - FixMacAddress(sp); + fix_mac_address(sp); s2io_reset(sp); - /* Setting swapper control on the NIC, so the MAC address can be read. + /* + * Setting swapper control on the NIC, so the MAC address can be read. */ if (s2io_set_swapper(sp)) { DBG_PRINT(ERR_DBG, @@ -4260,50 +4303,52 @@ goto set_swap_failed; } - /* MAC address initialization. - * For now only one mac address will be read and used. + /* + * MAC address initialization. + * For now only one mac address will be read and used. */ bar0 = (XENA_dev_config_t *) sp->bar0; val64 = RMAC_ADDR_CMD_MEM_RD | RMAC_ADDR_CMD_MEM_STROBE_NEW_CMD | RMAC_ADDR_CMD_MEM_OFFSET(0 + MAC_MAC_ADDR_START_OFFSET); writeq(val64, &bar0->rmac_addr_cmd_mem); - waitForCmdComplete(sp); + wait_for_cmd_complete(sp); tmp64 = readq(&bar0->rmac_addr_data0_mem); mac_down = (u32) tmp64; mac_up = (u32) (tmp64 >> 32); - memset(sp->defMacAddr[0].mac_addr, 0, sizeof(ETH_ALEN)); + memset(sp->def_mac_addr[0].mac_addr, 0, sizeof(ETH_ALEN)); - sp->defMacAddr[0].mac_addr[3] = (u8) (mac_up); - sp->defMacAddr[0].mac_addr[2] = (u8) (mac_up >> 8); - sp->defMacAddr[0].mac_addr[1] = (u8) (mac_up >> 16); - sp->defMacAddr[0].mac_addr[0] = (u8) (mac_up >> 24); - sp->defMacAddr[0].mac_addr[5] = (u8) (mac_down >> 16); - sp->defMacAddr[0].mac_addr[4] = (u8) (mac_down >> 24); + sp->def_mac_addr[0].mac_addr[3] = (u8) (mac_up); + sp->def_mac_addr[0].mac_addr[2] = (u8) (mac_up >> 8); + sp->def_mac_addr[0].mac_addr[1] = (u8) (mac_up >> 16); + sp->def_mac_addr[0].mac_addr[0] = (u8) (mac_up >> 24); + sp->def_mac_addr[0].mac_addr[5] = (u8) (mac_down >> 16); + sp->def_mac_addr[0].mac_addr[4] = (u8) (mac_down >> 24); DBG_PRINT(INIT_DBG, "DEFAULT MAC ADDR:0x%02x-%02x-%02x-%02x-%02x-%02x\n", - sp->defMacAddr[0].mac_addr[0], - sp->defMacAddr[0].mac_addr[1], - sp->defMacAddr[0].mac_addr[2], - sp->defMacAddr[0].mac_addr[3], - sp->defMacAddr[0].mac_addr[4], - sp->defMacAddr[0].mac_addr[5]); + sp->def_mac_addr[0].mac_addr[0], + sp->def_mac_addr[0].mac_addr[1], + sp->def_mac_addr[0].mac_addr[2], + sp->def_mac_addr[0].mac_addr[3], + sp->def_mac_addr[0].mac_addr[4], + sp->def_mac_addr[0].mac_addr[5]); /* Set the factory defined MAC address initially */ dev->addr_len = ETH_ALEN; - memcpy(dev->dev_addr, sp->defMacAddr, ETH_ALEN); + memcpy(dev->dev_addr, sp->def_mac_addr, ETH_ALEN); /* Initialize the tasklet status flag */ atomic_set(&(sp->tasklet_status), 0); /* Initialize spinlocks */ - spin_lock_init(&sp->isr_lock); spin_lock_init(&sp->tx_lock); + spin_lock_init(&sp->isr_lock); - /* SXE-002: Configure link and activity LED to init state + /* + * SXE-002: Configure link and activity LED to init state * on driver load. */ subid = sp->pdev->subsystem_device; @@ -4316,15 +4361,16 @@ val64 = readq(&bar0->gpio_control); } - /* Make Link state as off at this point, when the Link change + sp->rx_csum = 1; /* Rx chksum verify enabled by default */ + + /* + * Make Link state as off at this point, when the Link change * interrupt comes the state will be automatically changed to * the right state. */ netif_carrier_off(dev); sp->last_link_state = LINK_DOWN; - sp->rx_csum = 1; /* Rx chksum verify enabled by default */ - return 0; set_swap_failed: @@ -4335,7 +4381,7 @@ iounmap(sp->bar0); bar0_remap_failed: mem_alloc_failed: - freeSharedMem(sp); + free_shared_mem(sp); init_failed: pci_disable_device(pdev); pci_release_regions(pdev); @@ -4345,16 +4391,15 @@ return -ENODEV; } -/* -* Input Argument/s: -* pdev - structure containing the PCI related information of the device. -* Return value: -* void -* Description: -* This function is called by the Pci subsystem to release a PCI device -* and free up all resource held up by the device. This could be in response -* to a Hot plug event or when the driver is to be removed from memory. -*/ +/** + * s2io_rem_nic - Free the PCI device + * @pdev: structure containing the PCI related information of the device. + * Description: This function is called by the Pci subsystem to release a + * PCI device and free up all resource held up by the device. This could + * be in response to a Hot plug event or when the driver is to be removed + * from memory. + */ + static void __devexit s2io_rem_nic(struct pci_dev *pdev) { struct net_device *dev = @@ -4365,24 +4410,36 @@ DBG_PRINT(ERR_DBG, "Driver Data is NULL!!\n"); return; } + sp = dev->priv; - freeSharedMem(sp); + unregister_netdev(dev); + + free_shared_mem(sp); iounmap(sp->bar0); iounmap(sp->bar1); pci_disable_device(pdev); pci_release_regions(pdev); pci_set_drvdata(pdev, NULL); - unregister_netdev(dev); - free_netdev(dev); } +/** + * s2io_starter - Entry point for the driver + * Description: This function is the entry point for the driver. It verifies + * the module loadable parameters and initializes PCI configuration space. + */ + int __init s2io_starter(void) { return pci_module_init(&s2io_driver); } +/** + * s2io_closer - Cleanup routine for the driver + * Description: This function is the cleanup routine for the driver. It unregist * ers the driver. + */ + void s2io_closer(void) { pci_unregister_driver(&s2io_driver); diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-06 11:31:09.532308264 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-06 13:03:08.087360376 -0700 @@ -16,6 +16,7 @@ #define TBD 0 #define BIT(loc) (0x8000000000000000ULL >> (loc)) #define vBIT(val, loc, sz) (((u64)val) << (64-loc-sz)) +#define INV(d) ((d&0xff)<<24) | (((d>>8)&0xff)<<16) | (((d>>16)&0xff)<<8)| ((d>>24)&0xff) #ifndef BOOL #define BOOL int @@ -49,11 +50,13 @@ #define ALIGN_SIZE 127 #define PCIX_COMMAND_REGISTER 0x62 +#ifndef SET_ETHTOOL_OPS +#define SUPPORTED_10000baseT_Full (1 << 12) +#endif + /* * Debug related variables. */ -#define DEBUG_ON TRUE - /* different debug levels. */ #define ERR_DBG 0 #define INIT_DBG 1 @@ -312,7 +315,7 @@ /* Maintains Per FIFO related information. */ typedef struct tx_fifo_config { #define MAX_AVAILABLE_TXDS 8192 - u32 FifoLen; /* specifies len of FIFO upto 8192, ie no of TxDLs */ + u32 fifo_len; /* specifies len of FIFO upto 8192, ie no of TxDLs */ /* Priority definition */ #define TX_FIFO_PRI_0 0 /*Highest */ #define TX_FIFO_PRI_1 1 @@ -322,9 +325,9 @@ #define TX_FIFO_PRI_5 5 #define TX_FIFO_PRI_6 6 #define TX_FIFO_PRI_7 7 /*lowest */ - u8 FifoPriority; /* specifies pointer level for FIFO */ + u8 fifo_priority; /* specifies pointer level for FIFO */ /* user should not set twos fifos with same pri */ - u8 fNoSnoop; + u8 f_no_snoop; #define NO_SNOOP_TXD 0x01 #define NO_SNOOP_TXD_BUFFER 0x02 } tx_fifo_config_t; @@ -332,7 +335,7 @@ /* Maintains per Ring related information */ typedef struct rx_ring_config { - u32 NumRxd; /*No of RxDs per Rx Ring */ + u32 num_rxd; /*No of RxDs per Rx Ring */ #define RX_RING_PRI_0 0 /* highest */ #define RX_RING_PRI_1 1 #define RX_RING_PRI_2 2 @@ -342,70 +345,37 @@ #define RX_RING_PRI_6 6 #define RX_RING_PRI_7 7 /* lowest */ - u8 RingPriority; /*Specifies service priority of ring */ + u8 ring_priority; /*Specifies service priority of ring */ /* OSM should not set any two rings with same priority */ - u8 RingOrg; /*Organization of ring */ + u8 ring_org; /*Organization of ring */ #define RING_ORG_BUFF1 0x01 #define RX_RING_ORG_BUFF3 0x03 #define RX_RING_ORG_BUFF5 0x05 -/* In case of 3 buffer recv. mode, size of three buffers is expected as.. */ -#define BUFF_SZ_1 22 /* ethernet header */ -#define BUFF_SZ_2 (64+64) /* max. IP+TCP header size */ -#define BUFF_SZ_3 (1500-20-20) /* TCP payload */ -#define BUFF_SZ_3_JUMBO (9600-20-20) /* Jumbo TCP payload */ - - u32 RxdThresh; /*No of used Rxds NIC can store before transfer to host */ -#define DEFAULT_RXD_THRESHOLD 0x1 /* TODO */ - u8 fNoSnoop; + u8 f_no_snoop; #define NO_SNOOP_RXD 0x01 #define NO_SNOOP_RXD_BUFFER 0x02 - u32 RxD_BackOff_Interval; -#define RXD_BACKOFF_INTERVAL_DEF 0x0 -#define RXD_BACKOFF_INTERVAL_MIN 0x0 -#define RXD_BACKOFF_INTERVAL_MAX 0x0 } rx_ring_config_t; /* This structure provides contains values of the tunable parameters * of the H/W */ struct config_param { - /* Tx Side */ - u32 TxFIFONum; /*Number of Tx FIFOs */ + u32 tx_fifo_num; /*Number of Tx FIFOs */ #define MAX_TX_FIFOS 8 - tx_fifo_config_t TxCfg[MAX_TX_FIFOS]; /*Per-Tx FIFO config */ - u32 MaxTxDs; /*Max no. of Tx buffer descriptor per TxDL */ - BOOL TxVLANEnable; /*TRUE: Insert VLAN ID, FALSE: Don't insert */ -#define TX_REQ_TIMEOUT_DEFAULT 0x0 -#define TX_REQ_TIMEOUT_MIN 0x0 -#define TX_REQ_TIMEOUT_MAX 0x0 - u32 TxReqTimeOut; - BOOL TxFlow; /*Tx flow control enable */ - BOOL RxFlow; - BOOL OverrideTxServiceState; /* TRUE: Overide, FALSE: Do not override - Use the new priority information - of service state. It is not recommended - to change but OSM can opt to do so */ -#define MAX_SERVICE_STATES 36 - u8 TxServiceState[MAX_SERVICE_STATES]; - /* Array element represent 'priority' - * and array index represents - * 'Service state' e.g. - * TxServiceState[3]=7; it means - * Service state 3 is associated - * with priority 7 of a Tx FIFO */ - u64 TxIntrType; /* Specifies if Tx Intr is UTILZ or PER_LIST type. */ + tx_fifo_config_t tx_cfg[MAX_TX_FIFOS]; /*Per-Tx FIFO config */ + u32 max_txds; /*Max no. of Tx buffer descriptor per TxDL */ + u64 tx_intr_type; + /* Specifies if Tx Intr is UTILZ or PER_LIST type. */ /* Rx Side */ - u32 RxRingNum; /*Number of receive rings */ + u32 rx_ring_num; /*Number of receive rings */ #define MAX_RX_RINGS 8 #define MAX_RX_BLOCKS_PER_RING 150 - rx_ring_config_t RxCfg[MAX_RX_RINGS]; /*Per-Rx Ring config */ - BOOL RxVLANEnable; /*TRUE: Strip off VLAN tag from the frame, - FALSE: Don't strip off VLAN tag */ + rx_ring_config_t rx_cfg[MAX_RX_RINGS]; /*Per-Rx Ring config */ #define HEADER_ETHERNET_II_802_3_SIZE 14 #define HEADER_802_2_SIZE 3 @@ -419,23 +389,6 @@ #define MAX_PYLD_JUMBO 9600 #define MAX_MTU_JUMBO (MAX_PYLD_JUMBO+18) #define MAX_MTU_JUMBO_VLAN (MAX_PYLD_JUMBO+22) - u32 MTU; /*Maximum Payload */ - BOOL JumboEnable; /*Enable Jumbo frames recv/send */ - BOOL OverrideRxServiceState; /* TRUE: Overide, FALSE: Do not override - Use the new priority information - of service state. It is not recommended - to change but OSM can opt to do so */ -#define MAX_SERVICE_STATES 36 - u8 RxServiceState[MAX_SERVICE_STATES]; - /* Array element represent 'priority' - * and array index represents - * 'Service state'e.g. - * RxServiceState[3]=7; it means - * Service state 3 is associated - * with priority 7 of a Rx FIFO */ - BOOL StatAutoRefresh; /* When true, StatRefreshTime have valid value */ - u32 StatRefreshTime; /*Time for refreshing statistics */ -#define STAT_TRSF_PER_1_SECOND 0x208D5 }; /* Structure representing MAC Addrs */ @@ -514,14 +467,9 @@ #define SET_NUM_TAG(val) vBIT(val,16,32) #define RXD_GET_BUFFER0_SIZE(Control_2) (u64)((Control_2 & vBIT(0xFFFF,0,16))) -/* -#define TXD_GET_BUFFER1_SIZE(Control_2) (u16)((Control_2 & MASK_BUFFER1_SIZE) >> (63-31)) -#define TXD_GET_BUFFER2_SIZE(Control_2) (u16)((Control_2 & MASK_BUFFER2_SIZE) >> (63-47)) -*/ u64 Buffer0_ptr; } RxD_t; - /* Structure that represents the Rx descriptor block which contains * 128 Rx descriptors. */ @@ -531,11 +479,12 @@ u64 reserved_0; #define END_OF_BLOCK 0xFEFFFFFFFFFFFFFFULL - u64 reserved_1; /* 0xFEFFFFFFFFFFFFFF to mark last Rxd in this blk */ - u64 reserved_2_pNext_RxD_block; /*@ Logical ptr to next */ - u64 pNext_RxD_Blk_physical; /* Buff0_ptr. - In a 32 bit arch the upper 32 bits - should be 0 */ + u64 reserved_1; /* 0xFEFFFFFFFFFFFFFF to mark last + * Rxd in this blk */ + u64 reserved_2_pNext_RxD_block; /* Logical ptr to next */ + u64 pNext_RxD_Blk_physical; /* Buff0_ptr.In a 32 bit arch + * the upper 32 bits should + * be 0 */ } RxD_block_t; /* Structure which stores all the MAC control parameters */ @@ -568,10 +517,6 @@ */ typedef struct mac_info { /* rx side stuff */ - u32 rxd_ring_mem_sz; - RxD_t *RxRing[MAX_RX_RINGS]; /* Logical Rx ring pointers */ - dma_addr_t RxRing_Phy[MAX_RX_RINGS]; - /* Put pointer info which indictes which RxD has to be replenished * with a new buffer. */ @@ -583,41 +528,29 @@ rx_curr_get_info_t rx_curr_get_info[MAX_RX_RINGS]; u16 rmac_pause_time; - - /* this will be used in receive function, this decides which ring would - be processed first. eg: ring with priority value 0 (highest) should - be processed first. - first 3 LSB bits represent ring number which should be processed - first, similarly next 3 bits represent next ring to be processed. - eg: value of _rx_ring_pri_map = 0x0000 003A means - ring #2 would be processed first and #7 would be processed next - */ - u32 _rx_ring_pri_map; + u16 mc_pause_threshold_q0q3; + u16 mc_pause_threshold_q4q7; /* tx side stuff */ - void *txd_list_mem; /* orignal pointer to allocated mem */ + void *txd_list_mem; /* original pointer to allocated mem */ dma_addr_t txd_list_mem_phy; u32 txd_list_mem_sz; /* logical pointer of start of each Tx FIFO */ TxFIFO_element_t *tx_FIFO_start[MAX_TX_FIFOS]; - /* logical pointer of start of TxDL which corresponds to each Tx FIFO */ + /* The Phy and virtual mem loactions of the Tx descriptors. */ TxD_t *txdl_start[MAX_TX_FIFOS]; - - /* Same as txdl_start but phy addr */ dma_addr_t txdl_start_phy[MAX_TX_FIFOS]; /* Current offset within tx_FIFO_start, where driver would write new Tx frame*/ tx_curr_put_info_t tx_curr_put_info[MAX_TX_FIFOS]; tx_curr_get_info_t tx_curr_get_info[MAX_TX_FIFOS]; - u16 txdl_len; /* length of a TxDL, same for all */ - void *stats_mem; /* orignal pointer to allocated mem */ dma_addr_t stats_mem_phy; /* Physical address of the stat block */ u32 stats_mem_sz; - StatInfo_t *StatsInfo; /* Logical address of the stat block */ + StatInfo_t *stats_info; /* Logical address of the stat block */ } mac_info_t; /* structure representing the user defined MAC addresses */ @@ -632,13 +565,20 @@ dma_addr_t block_dma_addr; } rx_block_info_t; +/* Default Tunable parameters of the NIC. */ +#define DEFAULT_FIFO_LEN 4096 +#define SMALL_RXD_CNT 30 * (MAX_RXDS_PER_BLOCK+1) +#define LARGE_RXD_CNT 100 * (MAX_RXDS_PER_BLOCK+1) +#define SMALL_BLK_CNT 30 +#define LARGE_BLK_CNT 100 + /* Structure representing one instance of the NIC */ typedef struct s2io_nic { #define MAX_MAC_SUPPORTED 16 #define MAX_SUPPORTED_MULTICASTS MAX_MAC_SUPPORTED - macaddr_t defMacAddr[MAX_MAC_SUPPORTED]; - macaddr_t preMacAddr[MAX_MAC_SUPPORTED]; + macaddr_t def_mac_addr[MAX_MAC_SUPPORTED]; + macaddr_t pre_mac_addr[MAX_MAC_SUPPORTED]; struct net_device_stats stats; caddr_t bar0; @@ -671,8 +611,8 @@ u32 irq; atomic_t rx_bufs_left[MAX_RX_RINGS]; - spinlock_t isr_lock; spinlock_t tx_lock; + spinlock_t isr_lock; #define PROMISC 1 #define ALL_MULTI 2 @@ -691,20 +631,11 @@ u16 tx_err_count; u16 rx_err_count; -#if DEBUG_ON - u64 rxpkt_bytes; - u64 txpkt_bytes; - int int_cnt; - int rxint_cnt; - int txint_cnt; - u64 rxpkt_cnt; -#endif - - /* Place holders for the virtual and physical addresses of + /* + * Place holders for the virtual and physical addresses of * all the Rx Blocks */ - struct rx_block_info - rx_blocks[MAX_RX_RINGS][MAX_RX_BLOCKS_PER_RING]; + rx_block_info_t rx_blocks[MAX_RX_RINGS][MAX_RX_BLOCKS_PER_RING]; int block_count[MAX_RX_RINGS]; int pkt_cnt[MAX_RX_RINGS]; @@ -742,19 +673,14 @@ #define RESET_ERROR 1; #define CMD_ERROR 2; -/* Default Tunable parameters of the NIC. */ -#define DEFAULT_FIFO_LEN 4096 -#define SMALL_RXD_CNT 40 * (MAX_RXDS_PER_BLOCK+1) -#define LARGE_RXD_CNT 100 * (MAX_RXDS_PER_BLOCK+1) - /* OS related system calls */ #ifndef readq static inline u64 readq(void *addr) { u64 ret = 0; ret = readl(addr + 4); - ret <<= 32; - ret |= readl(addr); + (u64) ret <<= 32; + (u64) ret |= readl(addr); return ret; } @@ -816,30 +742,36 @@ /* DMA level Inressupts */ #define TXDMA_PFC_INT_M BIT(0) - /* PFC block interrupts */ +#define TXDMA_PCC_INT_M BIT(2) + +/* PFC block interrupts */ #define PFC_MISC_ERR_1 BIT(0) /* Interrupt to indicate FIFO full */ +/* PCC block interrupts. */ +#define PCC_FB_ECC_ERR vBIT(0xff, 16, 8) /* Interrupt to indicate + PCC_FB_ECC Error. */ + /* * Prototype declaration. */ static int __devinit s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre); static void __devexit s2io_rem_nic(struct pci_dev *pdev); -static int initSharedMem(struct s2io_nic *sp); -static void freeSharedMem(struct s2io_nic *sp); -static int initNic(struct s2io_nic *nic); +static int init_shared_mem(struct s2io_nic *sp); +static void free_shared_mem(struct s2io_nic *sp); +static int init_nic(struct s2io_nic *nic); #ifndef CONFIG_S2IO_NAPI -static void rxIntrHandler(struct s2io_nic *sp); +static void rx_intr_handler(struct s2io_nic *sp); #endif -static void txIntrHandler(struct s2io_nic *sp); -static void alarmIntrHandler(struct s2io_nic *sp); +static void tx_intr_handler(struct s2io_nic *sp); +static void alarm_intr_handler(struct s2io_nic *sp); static int s2io_starter(void); void s2io_closer(void); static void s2io_tx_watchdog(struct net_device *dev); static void s2io_tasklet(unsigned long dev_addr); static void s2io_set_multicast(struct net_device *dev); -static int rxOsmHandler(nic_t * sp, u16 len, RxD_t * rxdp, int ring_no); +static int rx_osm_handler(nic_t * sp, u16 len, RxD_t * rxdp, int ring_no); void s2io_link(nic_t * sp, int link); void s2io_reset(nic_t * sp); #ifdef CONFIG_S2IO_NAPI @@ -849,6 +781,10 @@ int s2io_set_mac_addr(struct net_device *dev, u8 * addr); static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs *regs); static int verify_xena_quiescence(u64 val64, int flag); +int verify_load_parm(void); +#ifdef SET_ETHTOOL_OPS static struct ethtool_ops netdev_ethtool_ops; +#endif +static void s2io_set_link(unsigned long data); #endif /* _S2IO_H */ diff -urN vanilla-linux/drivers/net/s2io-regs.h linux-2.6.8.1/drivers/net/s2io-regs.h --- vanilla-linux/drivers/net/s2io-regs.h 2004-10-06 11:31:09.539307200 -0700 +++ linux-2.6.8.1/drivers/net/s2io-regs.h 2004-10-06 13:03:08.087360376 -0700 @@ -289,6 +289,8 @@ u64 tda_err_alarm; u64 pcc_err_reg; +#define PCC_FB_ECC_DB_ERR vBIT(0xFF, 16, 8) + u64 pcc_err_mask; u64 pcc_err_alarm; @@ -512,6 +514,7 @@ #define RX_PA_CFG_IGNORE_FRM_ERR BIT(1) #define RX_PA_CFG_IGNORE_SNAP_OUI BIT(2) #define RX_PA_CFG_IGNORE_LLC_CTRL BIT(3) +#define RX_PA_CFG_IGNORE_L2_ERR BIT(6) u8 unused12[0x700 - 0x1D8]; From ravinandan.arakali@s2io.com Thu Oct 28 11:26:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 11:26:47 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SIQact008761 for ; Thu, 28 Oct 2004 11:26:36 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SIQ6je008519; Thu, 28 Oct 2004 14:26:06 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SIQ139012502; Thu, 28 Oct 2004 14:26:02 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , , Subject: [PATCH 2.6.9-rc2 8/12] S2io: two buffer mode Date: Thu, 28 Oct 2004 11:34:27 -0700 Message-ID: <001401c4bd1c$d5e64b30$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 10999 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Hi, Attached is the patch for implementing 2-buffer mode on Rx path. More description of this mode of operation follows. On certain systems when a DMA has to happen on an un-aligned memory location performance will take a significant hit. It's standard practice to offset the Rx buffer address by 2 (as Mac header is 14 bytes) so the IP header starts from an aligned location. Obviously using a single Rx buffer both cannot be achieved. Thus XFrame supports something called 2 buffer Rx mode, where in the Rx'ed frame is split into 2 parts, one is the Ethernet header and the other is the Ethernet payload. So now we can allocate proper aligned memory for both buffers, hence the DMA is not slowed down. Also, the Ethernet payload(starting from L3 header) is on an aligned location so OS need not have to do un-aligned accesses to process IP header. To achieve this, the kernel function eth_type_trans functionality has to be partially implemented in the driver itself. Signed-off-by: Raghavendra Koushik --- diff -urN vanilla-linux/drivers/net/Kconfig linux-2.6.8.1/drivers/net/Kconfig --- vanilla-linux/drivers/net/Kconfig 2004-10-06 15:15:04.000000000 -0700 +++ linux-2.6.8.1/drivers/net/Kconfig 2004-10-11 20:06:36.000000000 -0700 @@ -2267,6 +2267,17 @@ If in doubt, say N. +config 2BUFF_MODE + bool "Use 2 Buffer Mode on Rx side." + depends on S2IO + ---help--- + On enabling the 2 buffer mode, the received frame will be + split into 2 parts before being DMA'ed to the hosts memory. + The parts are the ethernet header and ethernet payload. + This is useful on systems where DMA'ing to to unaligned + physical memory loactions comes with a heavy price. + If not sure please say N. + endmenu source "drivers/net/tokenring/Kconfig" diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-11 21:21:49.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-12 16:49:27.796331624 -0700 @@ -325,6 +325,10 @@ int i, j, blk_cnt; int lst_size, lst_per_page; struct net_device *dev = nic->dev; +#ifdef CONFIG_2BUFF_MODE + u64 tmp; + buffAdd_t *ba; +#endif mac_info_t *mac_control; struct config_param *config; @@ -425,7 +429,11 @@ config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1); /* Allocating all the Rx blocks */ for (j = 0; j < blk_cnt; j++) { +#ifndef CONFIG_2BUFF_MODE size = (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t)); +#else + size = SIZE_OF_BLOCK; +#endif tmp_v_addr = pci_alloc_consistent(nic->pdev, size, &tmp_p_addr); if (tmp_v_addr == NULL) { @@ -458,13 +466,60 @@ pre_rxd_blk->reserved_1 = END_OF_BLOCK; /* last RxD * marker. */ +#ifndef CONFIG_2BUFF_MODE pre_rxd_blk->reserved_2_pNext_RxD_block = (unsigned long) tmp_v_addr_next; +#endif pre_rxd_blk->pNext_RxD_Blk_physical = (u64) tmp_p_addr_next; } } +#ifdef CONFIG_2BUFF_MODE + /* + * Allocation of Storages for buffer addresses in 2BUFF mode + * and the buffers as well. + */ + for (i = 0; i < config->rx_ring_num; i++) { + blk_cnt = + config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1); + nic->ba[i] = kmalloc((sizeof(buffAdd_t *) * blk_cnt), + GFP_KERNEL); + if (!nic->ba[i]) + return -ENOMEM; + for (j = 0; j < blk_cnt; j++) { + int k = 0; + nic->ba[i][j] = kmalloc((sizeof(buffAdd_t) * + (MAX_RXDS_PER_BLOCK + 1)), + GFP_KERNEL); + if (!nic->ba[i][j]) + return -ENOMEM; + while (k != MAX_RXDS_PER_BLOCK) { + ba = &nic->ba[i][j][k]; + + ba->ba_0_org = (void *) kmalloc + (BUF0_LEN + ALIGN_SIZE, GFP_ATOMIC); + if (!ba->ba_0_org) + return -ENOMEM; + tmp = (u64) ba->ba_0_org; + tmp += ALIGN_SIZE; + tmp &= ~((u64) ALIGN_SIZE); + ba->ba_0 = (void *) tmp; + + ba->ba_1_org = (void *) kmalloc + (BUF1_LEN + ALIGN_SIZE, GFP_ATOMIC); + if (!ba->ba_1_org) + return -ENOMEM; + tmp = (u64) ba->ba_1_org; + tmp += ALIGN_SIZE; + tmp &= ~((u64) ALIGN_SIZE); + ba->ba_1 = (void *) tmp; + k++; + } + } + } +#endif + /* Allocation and initialization of Statistics block */ size = sizeof(StatInfo_t); mac_control->stats_mem = pci_alloc_consistent @@ -532,7 +587,11 @@ kfree(nic->list_info[i]); } +#ifndef CONFIG_2BUFF_MODE size = (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t)); +#else + size = SIZE_OF_BLOCK; +#endif for (i = 0; i < config->rx_ring_num; i++) { blk_cnt = nic->block_count[i]; for (j = 0; j < blk_cnt; j++) { @@ -545,6 +604,27 @@ } } +#ifdef CONFIG_2BUFF_MODE + /* Freeing buffer storage addresses in 2BUFF mode. */ + for (i = 0; i < config->rx_ring_num; i++) { + blk_cnt = + config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1); + for (j = 0; j < blk_cnt; j++) { + int k = 0; + if (!nic->ba[i][j]) + continue; + while (k != MAX_RXDS_PER_BLOCK) { + buffAdd_t *ba = &nic->ba[i][j][k]; + kfree(ba->ba_0_org); + kfree(ba->ba_1_org); + k++; + } + kfree(nic->ba[i][j]); + } + if (nic->ba[i]) + kfree(nic->ba[i]); + } +#endif if (mac_control->stats_mem) { pci_free_consistent(nic->pdev, @@ -1366,10 +1446,21 @@ &bar0->prc_rxd0_n[i]); val64 = readq(&bar0->prc_ctrl_n[i]); +#ifndef CONFIG_2BUFF_MODE val64 |= PRC_CTRL_RC_ENABLED; +#else + val64 |= PRC_CTRL_RC_ENABLED | PRC_CTRL_RING_MODE_3; +#endif writeq(val64, &bar0->prc_ctrl_n[i]); } +#ifdef CONFIG_2BUFF_MODE + /* Enabling 2 buffer mode by writing into Rx_pa_cfg reg. */ + val64 = readq(&bar0->rx_pa_cfg); + val64 |= RX_PA_CFG_IGNORE_L2_ERR; + writeq(val64, &bar0->rx_pa_cfg); +#endif + /* * Enabling MC-RLDRAM. After enabling the device, we timeout * for around 100ms, which is approximately the time required @@ -1437,6 +1528,12 @@ } /* + * Don't see link state interrupts on certain switches, so + * directly scheduling a link state task from here. + */ + schedule_work(&nic->set_link_task); + + /* * Here we are performing soft reset on XGXS to * force link down. Since link is already up, we will get * link state change interrupt after this reset @@ -1565,6 +1662,13 @@ atomic_read(&nic->rx_bufs_left[ring_no]); mac_info_t *mac_control; struct config_param *config; +#ifdef CONFIG_2BUFF_MODE + RxD_t *rxdpnext; + int nextblk; + u64 tmp; + buffAdd_t *ba; + dma_addr_t rxdpphys; +#endif #ifndef CONFIG_S2IO_NAPI unsigned long flags; #endif @@ -1589,10 +1693,14 @@ block_index; off = mac_control->rx_curr_put_info[ring_no].offset; off1 = mac_control->rx_curr_get_info[ring_no].offset; +#ifndef CONFIG_2BUFF_MODE offset = block_no * (MAX_RXDS_PER_BLOCK + 1) + off; offset1 = block_no1 * (MAX_RXDS_PER_BLOCK + 1) + off1; +#else offset = block_no * (MAX_RXDS_PER_BLOCK) + off; offset1 = block_no1 * (MAX_RXDS_PER_BLOCK) + off1; +#endif + rxdp = nic->rx_blocks[ring_no][block_no]. block_virt_addr + off; if ((offset == offset1) && (rxdp->Host_Control)) { @@ -1600,6 +1708,7 @@ DBG_PRINT(INTR_DBG, " info equated\n"); goto end; } +#ifndef CONFIG_2BUFF_MODE if (rxdp->Control_1 == END_OF_BLOCK) { mac_control->rx_curr_put_info[ring_no]. block_index++; @@ -1617,23 +1726,81 @@ } #ifndef CONFIG_S2IO_NAPI spin_lock_irqsave(&nic->put_lock, flags); + nic->put_pos[ring_no] = + (block_no * (MAX_RXDS_PER_BLOCK + 1)) + off; + spin_unlock_irqrestore(&nic->put_lock, flags); +#endif +#else + if (rxdp->Host_Control == END_OF_BLOCK) { + mac_control->rx_curr_put_info[ring_no]. + block_index++; + mac_control->rx_curr_put_info[ring_no]. + block_index %= nic->block_count[ring_no]; + block_no = mac_control->rx_curr_put_info + [ring_no].block_index; + off = 0; + DBG_PRINT(INTR_DBG, "%s: block%d at: 0x%llx\n", + dev->name, block_no, + (unsigned long long) rxdp->Control_1); + mac_control->rx_curr_put_info[ring_no].offset = + off; + rxdp = nic->rx_blocks[ring_no][block_no]. + block_virt_addr; + } +#ifndef CONFIG_S2IO_NAPI + spin_lock_irqsave(&nic->put_lock, flags); nic->put_pos[ring_no] = (block_no * (MAX_RXDS_PER_BLOCK + 1)) + off; spin_unlock_irqrestore(&nic->put_lock, flags); #endif +#endif - if (rxdp->Control_1 & RXD_OWN_XENA) { +#ifndef CONFIG_2BUFF_MODE + if (rxdp->Control_1 & RXD_OWN_XENA) +#else + if (rxdp->Control_2 & BIT(0)) +#endif + { mac_control->rx_curr_put_info[ring_no]. offset = off; goto end; } +#ifdef CONFIG_2BUFF_MODE + /* + * RxDs Spanning cache lines will be replenished only + * if the succeeding RxD is also owned by Host. It + * will always be the ((8*i)+3) and ((8*i)+6) + * descriptors for the 48 byte descriptor. The offending + * decsriptor is of-course the 3rd descriptor. + */ + rxdpphys = nic->rx_blocks[ring_no][block_no]. + block_dma_addr + (off * sizeof(RxD_t)); + if (((u64) (rxdpphys)) % 128 > 80) { + rxdpnext = nic->rx_blocks[ring_no][block_no]. + block_virt_addr + (off + 1); + if (rxdpnext->Host_Control == END_OF_BLOCK) { + nextblk = (block_no + 1) % + (nic->block_count[ring_no]); + rxdpnext = nic->rx_blocks[ring_no] + [nextblk].block_virt_addr; + } + if (rxdpnext->Control_2 & BIT(0)) + goto end; + } +#endif +#ifndef CONFIG_2BUFF_MODE skb = dev_alloc_skb(size + NET_IP_ALIGN); +#else + skb = dev_alloc_skb(dev->mtu + ALIGN_SIZE + + /*BUF0_LEN + */ 22); +#endif if (!skb) { DBG_PRINT(ERR_DBG, "%s: Out of ", dev->name); DBG_PRINT(ERR_DBG, "memory to allocate SKBs\n"); return -ENOMEM; } +#ifndef CONFIG_2BUFF_MODE skb_reserve(skb, NET_IP_ALIGN); memset(rxdp, 0, sizeof(RxD_t)); rxdp->Buffer0_ptr = pci_map_single @@ -1645,6 +1812,33 @@ off++; off %= (MAX_RXDS_PER_BLOCK + 1); mac_control->rx_curr_put_info[ring_no].offset = off; +#else + ba = &nic->ba[ring_no][block_no][off]; + tmp = (u64) skb->data; + tmp += ALIGN_SIZE; + tmp &= ~ALIGN_SIZE; + skb->data = (void *) tmp; + + memset(rxdp, 0, sizeof(RxD_t)); + rxdp->Buffer2_ptr = pci_map_single + (nic->pdev, skb->data, dev->mtu + 22, + PCI_DMA_FROMDEVICE); + rxdp->Buffer0_ptr = + pci_map_single(nic->pdev, ba->ba_0, BUF0_LEN, + PCI_DMA_FROMDEVICE); + rxdp->Buffer1_ptr = + pci_map_single(nic->pdev, ba->ba_1, BUF1_LEN, + PCI_DMA_FROMDEVICE); + + rxdp->Control_2 = SET_BUFFER2_SIZE(dev->mtu + 22); + rxdp->Control_2 |= SET_BUFFER0_SIZE(BUF0_LEN); + rxdp->Control_2 |= SET_BUFFER1_SIZE(1); /* dummy. */ + rxdp->Control_2 |= BIT(0); /* Set Buffer_Empty bit. */ + rxdp->Host_Control = (u64) ((unsigned long) (skb)); + rxdp->Control_1 |= RXD_OWN_XENA; + off++; + mac_control->rx_curr_put_info[ring_no].offset = off; +#endif atomic_inc(&nic->rx_bufs_left[ring_no]); alloc_tab++; } @@ -1670,6 +1864,9 @@ struct sk_buff *skb; mac_info_t *mac_control; struct config_param *config; +#ifdef CONFIG_2BUFF_MODE + buffAdd_t *ba; +#endif mac_control = &sp->mac_control; config = &sp->config; @@ -1679,6 +1876,7 @@ off = j % (MAX_RXDS_PER_BLOCK + 1); rxdp = sp->rx_blocks[i][blk].block_virt_addr + off; +#ifndef CONFIG_2BUFF_MODE if (rxdp->Control_1 == END_OF_BLOCK) { rxdp = (RxD_t *) ((unsigned long) rxdp-> @@ -1686,6 +1884,12 @@ j++; blk++; } +#else + if (rxdp->Host_Control == END_OF_BLOCK) { + blk++; + continue; + } +#endif if (!(rxdp->Control_1 & RXD_OWN_XENA)) { memset(rxdp, 0, sizeof(RxD_t)); @@ -1696,6 +1900,7 @@ (struct sk_buff *) ((unsigned long) rxdp-> Host_Control); if (skb) { +#ifndef CONFIG_2BUFF_MODE pci_unmap_single(sp->pdev, (dma_addr_t) rxdp->Buffer0_ptr, dev->mtu + @@ -1703,6 +1908,21 @@ + HEADER_802_2_SIZE + HEADER_SNAP_SIZE, PCI_DMA_FROMDEVICE); +#else + ba = &sp->ba[i][blk][off]; + pci_unmap_single(sp->pdev, (dma_addr_t) + rxdp->Buffer0_ptr, + BUF0_LEN, + PCI_DMA_FROMDEVICE); + pci_unmap_single(sp->pdev, (dma_addr_t) + rxdp->Buffer1_ptr, + BUF1_LEN, + PCI_DMA_FROMDEVICE); + pci_unmap_single(sp->pdev, (dma_addr_t) + rxdp->Buffer2_ptr, + dev->mtu + 22, + PCI_DMA_FROMDEVICE); +#endif dev_kfree_skb(skb); atomic_dec(&sp->rx_bufs_left[i]); buf_cnt++; @@ -1741,11 +1961,16 @@ register u64 val64 = 0; rx_curr_get_info_t get_info, put_info; int i, get_block, put_block, get_offset, put_offset, ring_bufs; +#ifndef CONFIG_2BUFF_MODE u16 val16, cksum; +#endif struct sk_buff *skb; RxD_t *rxdp; mac_info_t *mac_control; struct config_param *config; +#ifdef CONFIG_2BUFF_MODE + buffAdd_t *ba; +#endif mac_control = &nic->mac_control; config = &nic->config; @@ -1764,6 +1989,7 @@ ring_bufs = config->rx_cfg[i].num_rxd; rxdp = nic->rx_blocks[i][get_block].block_virt_addr + get_info.offset; +#ifndef CONFIG_2BUFF_MODE get_offset = (get_block * (MAX_RXDS_PER_BLOCK + 1)) + get_info.offset; put_offset = (put_block * (MAX_RXDS_PER_BLOCK + 1)) + @@ -1820,6 +2046,66 @@ mac_control->rx_curr_get_info[i].offset = get_info.offset; } +#else + get_offset = (get_block * (MAX_RXDS_PER_BLOCK + 1)) + + get_info.offset; + put_offset = (put_block * (MAX_RXDS_PER_BLOCK + 1)) + + put_info.offset; + while (((!(rxdp->Control_1 & RXD_OWN_XENA)) && + !(rxdp->Control_2 & BIT(0))) && + (((get_offset + 1) % ring_bufs) != put_offset)) { + if (--pkts_to_process < 0) { + goto no_rx; + } + skb = (struct sk_buff *) ((unsigned long) + rxdp->Host_Control); + if (skb == NULL) { + DBG_PRINT(ERR_DBG, "%s: The skb is ", + dev->name); + DBG_PRINT(ERR_DBG, "Null in Rx Intr\n"); + goto no_rx; + } + + pci_unmap_single(nic->pdev, (dma_addr_t) + rxdp->Buffer0_ptr, + BUF0_LEN, PCI_DMA_FROMDEVICE); + pci_unmap_single(nic->pdev, (dma_addr_t) + rxdp->Buffer1_ptr, + BUF1_LEN, PCI_DMA_FROMDEVICE); + pci_unmap_single(nic->pdev, (dma_addr_t) + rxdp->Buffer2_ptr, + dev->mtu + 22, + PCI_DMA_FROMDEVICE); + ba = &nic->ba[i][get_block][get_info.offset]; + + rx_osm_handler(nic, rxdp, i, ba); + + get_info.offset++; + mac_control->rx_curr_get_info[i].offset = + get_info.offset; + rxdp = + nic->rx_blocks[i][get_block].block_virt_addr + + get_info.offset; + + if (get_info.offset && + (!(get_info.offset % MAX_RXDS_PER_BLOCK))) { + get_info.offset = 0; + mac_control->rx_curr_get_info[i]. + offset = get_info.offset; + get_block++; + get_block %= nic->block_count[i]; + mac_control->rx_curr_get_info[i]. + block_index = get_block; + rxdp = + nic->rx_blocks[i][get_block]. + block_virt_addr; + } + get_offset = + (get_block * (MAX_RXDS_PER_BLOCK + 1)) + + get_info.offset; + pkt_cnt++; + } +#endif } if (!pkt_cnt) pkt_cnt = 1; @@ -1873,12 +2159,17 @@ rx_curr_get_info_t get_info, put_info; RxD_t *rxdp; struct sk_buff *skb; +#ifndef CONFIG_2BUFF_MODE u16 val16, cksum; +#endif register u64 val64 = 0; int get_block, get_offset, put_block, put_offset, ring_bufs; int i, pkt_cnt = 0; mac_info_t *mac_control; struct config_param *config; +#ifdef CONFIG_2BUFF_MODE + buffAdd_t *ba; +#endif mac_control = &nic->mac_control; config = &nic->config; @@ -1898,6 +2189,7 @@ ring_bufs = config->rx_cfg[i].num_rxd; rxdp = nic->rx_blocks[i][get_block].block_virt_addr + get_info.offset; +#ifndef CONFIG_2BUFF_MODE get_offset = (get_block * (MAX_RXDS_PER_BLOCK + 1)) + get_info.offset; spin_lock(&nic->put_lock); @@ -1953,6 +2245,67 @@ && (pkt_cnt > indicate_max_pkts)) break; } +#else + get_offset = (get_block * (MAX_RXDS_PER_BLOCK + 1)) + + get_info.offset; + spin_lock(&nic->put_lock); + put_offset = nic->put_pos[i]; + spin_unlock(&nic->put_lock); + while (((!(rxdp->Control_1 & RXD_OWN_XENA)) && + !(rxdp->Control_2 & BIT(0))) && + (((get_offset + 1) % ring_bufs) != put_offset)) { + skb = (struct sk_buff *) ((unsigned long) + rxdp->Host_Control); + if (skb == NULL) { + DBG_PRINT(ERR_DBG, "%s: The skb is ", + dev->name); + DBG_PRINT(ERR_DBG, "Null in Rx Intr\n"); + return; + } + + pci_unmap_single(nic->pdev, (dma_addr_t) + rxdp->Buffer0_ptr, + BUF0_LEN, PCI_DMA_FROMDEVICE); + pci_unmap_single(nic->pdev, (dma_addr_t) + rxdp->Buffer1_ptr, + BUF1_LEN, PCI_DMA_FROMDEVICE); + pci_unmap_single(nic->pdev, (dma_addr_t) + rxdp->Buffer2_ptr, + dev->mtu + 22, + PCI_DMA_FROMDEVICE); + ba = &nic->ba[i][get_block][get_info.offset]; + + rx_osm_handler(nic, rxdp, i, ba); + + get_info.offset++; + mac_control->rx_curr_get_info[i].offset = + get_info.offset; + rxdp = + nic->rx_blocks[i][get_block].block_virt_addr + + get_info.offset; + + if (get_info.offset && + (!(get_info.offset % MAX_RXDS_PER_BLOCK))) { + get_info.offset = 0; + mac_control->rx_curr_get_info[i]. + offset = get_info.offset; + get_block++; + get_block %= nic->block_count[i]; + mac_control->rx_curr_get_info[i]. + block_index = get_block; + rxdp = + nic->rx_blocks[i][get_block]. + block_virt_addr; + } + get_offset = + (get_block * (MAX_RXDS_PER_BLOCK + 1)) + + get_info.offset; + pkt_cnt++; + if ((indicate_max_pkts) + && (pkt_cnt > indicate_max_pkts)) + break; + } +#endif if ((indicate_max_pkts) && (pkt_cnt > indicate_max_pkts)) break; } @@ -4096,12 +4449,21 @@ * Return value: * SUCCESS on success and -1 on failure. */ +#ifndef CONFIG_2BUFF_MODE static int rx_osm_handler(nic_t * sp, u16 len, RxD_t * rxdp, int ring_no) +#else +static int rx_osm_handler(nic_t * sp, RxD_t * rxdp, int ring_no, + buffAdd_t * ba) +#endif { struct net_device *dev = (struct net_device *) sp->dev; struct sk_buff *skb = (struct sk_buff *) ((unsigned long) rxdp->Host_Control); u16 l3_csum, l4_csum; +#ifdef CONFIG_2BUFF_MODE + int buf0_len, buf2_len; + struct ethhdr *eth = (struct ethhdr *) ba->ba_0; +#endif l3_csum = RXD_GET_L3_CKSUM(rxdp->Control_1); if ((rxdp->Control_1 & TCP_OR_UDP_FRAME) && (sp->rx_csum)) { @@ -4129,10 +4491,32 @@ DBG_PRINT(ERR_DBG, "%s: Rx error Value: 0x%llx\n", dev->name, err); } +#ifdef CONFIG_2BUFF_MODE + buf0_len = RXD_GET_BUFFER0_SIZE(rxdp->Control_2); + buf2_len = RXD_GET_BUFFER2_SIZE(rxdp->Control_2); +#endif skb->dev = dev; +#ifndef CONFIG_2BUFF_MODE skb_put(skb, len); skb->protocol = eth_type_trans(skb, dev); +#else + skb_put(skb, buf2_len); + /* + * Reproducing eth_type_trans functionality and running + * on the ethernet header 'eth' stripped and given to us + * by the hardware in 2Buff mode. + */ + if (*eth->h_dest & 1) { + if (!memcmp(eth->h_dest, dev->broadcast, ETH_ALEN)) + skb->pkt_type = PACKET_BROADCAST; + else + skb->pkt_type = PACKET_MULTICAST; + } else if (memcmp(eth->h_dest, dev->dev_addr, ETH_ALEN)) { + skb->pkt_type = PACKET_OTHERHOST; + } + skb->protocol = eth->h_proto; +#endif #ifdef CONFIG_S2IO_NAPI netif_receive_skb(skb); @@ -4143,7 +4527,11 @@ dev->last_rx = jiffies; sp->rx_pkt_count++; sp->stats.rx_packets++; +#ifndef CONFIG_2BUFF_MODE sp->stats.rx_bytes += len; +#else + sp->stats.rx_bytes += buf0_len + buf2_len; +#endif atomic_dec(&sp->rx_bufs_left[ring_no]); rxdp->Host_Control = 0; diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-11 21:21:49.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-11 21:22:23.000000000 -0700 @@ -466,19 +466,46 @@ #define RXD_GET_L4_CKSUM(val) ((u16)(val) & 0xFFFF) u64 Control_2; +#ifndef CONFIG_2BUFF_MODE #define MASK_BUFFER0_SIZE vBIT(0xFFFF,0,16) #define SET_BUFFER0_SIZE(val) vBIT(val,0,16) +#else +#define MASK_BUFFER0_SIZE vBIT(0xFF,0,16) +#define MASK_BUFFER1_SIZE vBIT(0xFFFF,16,16) +#define MASK_BUFFER2_SIZE vBIT(0xFFFF,32,16) +#define SET_BUFFER0_SIZE(val) vBIT(val,8,8) +#define SET_BUFFER1_SIZE(val) vBIT(val,16,16) +#define SET_BUFFER2_SIZE(val) vBIT(val,32,16) +#endif + #define MASK_VLAN_TAG vBIT(0xFFFF,48,16) #define SET_VLAN_TAG(val) vBIT(val,48,16) #define SET_NUM_TAG(val) vBIT(val,16,32) +#ifndef CONFIG_2BUFF_MODE #define RXD_GET_BUFFER0_SIZE(Control_2) (u64)((Control_2 & vBIT(0xFFFF,0,16))) +#else +#define RXD_GET_BUFFER0_SIZE(Control_2) (u8)((Control_2 & MASK_BUFFER0_SIZE) \ + >> 48) +#define RXD_GET_BUFFER1_SIZE(Control_2) (u16)((Control_2 & MASK_BUFFER1_SIZE) \ + >> 32) +#define RXD_GET_BUFFER2_SIZE(Control_2) (u16)((Control_2 & MASK_BUFFER2_SIZE) \ + >> 16) +#define BUF0_LEN 40 +#define BUF1_LEN 1 +#endif + u64 Buffer0_ptr; +#ifdef CONFIG_2BUFF_MODE + u64 Buffer1_ptr; + u64 Buffer2_ptr; +#endif } RxD_t; /* Structure that represents the Rx descriptor block which contains * 128 Rx descriptors. */ +#ifndef CONFIG_2BUFF_MODE typedef struct _RxD_block { #define MAX_RXDS_PER_BLOCK 127 RxD_t rxd[MAX_RXDS_PER_BLOCK]; @@ -492,6 +519,27 @@ * the upper 32 bits should * be 0 */ } RxD_block_t; +#else +typedef struct _RxD_block { +#define MAX_RXDS_PER_BLOCK 85 + RxD_t rxd[MAX_RXDS_PER_BLOCK]; + +#define END_OF_BLOCK 0xFEFFFFFFFFFFFFFFULL + u64 reserved_1; /* 0xFEFFFFFFFFFFFFFF to mark last Rxd + * in this blk */ + u64 pNext_RxD_Blk_physical; /* Phy ponter to next blk. */ +} RxD_block_t; +#define SIZE_OF_BLOCK 4096 + +/* Structure to hold virtual addresses of Buf0 and Buf1 in + * 2buf mode. */ +typedef struct bufAdd { + void *ba_0_org; + void *ba_1_org; + void *ba_0; + void *ba_1; +} buffAdd_t; +#endif /* Structure which stores all the MAC control parameters */ @@ -677,6 +725,10 @@ #define LINK_DOWN 1 #define LINK_UP 2 +#ifdef CONFIG_2BUFF_MODE + /* Buffer Address store. */ + buffAdd_t **ba[MAX_RX_RINGS]; +#endif int task_flag; } nic_t; @@ -802,7 +854,12 @@ static void s2io_tx_watchdog(struct net_device *dev); static void s2io_tasklet(unsigned long dev_addr); static void s2io_set_multicast(struct net_device *dev); +#ifndef CONFIG_2BUFF_MODE static int rx_osm_handler(nic_t * sp, u16 len, RxD_t * rxdp, int ring_no); +#else +static int rx_osm_handler(nic_t * sp, RxD_t * rxdp, int ring_no, + buffAdd_t * ba); +#endif void s2io_link(nic_t * sp, int link); void s2io_reset(nic_t * sp); #ifdef CONFIG_S2IO_NAPI From ravinandan.arakali@s2io.com Thu Oct 28 11:26:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 11:26:55 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SIQjng008945 for ; Thu, 28 Oct 2004 11:26:45 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SIQFje008522; Thu, 28 Oct 2004 14:26:16 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SIQD39012552; Thu, 28 Oct 2004 14:26:13 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , , Subject: [PATCH 2.6.9-rc2 9/12] S2io: new functions for card restart Date: Thu, 28 Oct 2004 11:34:34 -0700 Message-ID: <001501c4bd1c$dd4dbd90$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 11000 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Hi, The attached patch incorporates Jeff's comments related to creating separate functions for restarting the NIC(without using close and open entry points) and few other comments. Complete list of changes are as follows: 1. Two new functions s2io_card_down() and s2io_card_up() are defined and are called during reset procedure instead of close and open routines. 2. tasklet_status field is now made as unsigned long. 3. On getting serious error, queue is stopped before resetting the card. 4. Removed the check for "queue stopped" in xmit routine. Signed-off-by: Raghavendra Koushik --- diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-26 16:36:28.024066008 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-26 16:36:16.682790144 -0700 @@ -82,8 +82,7 @@ #define LINK_IS_UP(val64) (!(val64 & (ADAPTER_STATUS_RMAC_REMOTE_FAULT | \ ADAPTER_STATUS_RMAC_LOCAL_FAULT))) -#define TASKLET_IN_USE test_and_set_bit(0, \ - (unsigned long *)(&sp->tasklet_status)) +#define TASKLET_IN_USE test_and_set_bit(0, (&sp->tasklet_status)) #define PANIC 1 #define LOW 2 static inline int rx_buffer_level(nic_t * sp, int rxb_size, int ring) @@ -2447,6 +2446,7 @@ if (val64 & SERR_SOURCE_ANY) { DBG_PRINT(ERR_DBG, "%s: Device indicates ", dev->name); DBG_PRINT(ERR_DBG, "serious error!!\n"); + netif_stop_queue(dev); schedule_work(&nic->rst_timer_task); } @@ -2648,7 +2648,7 @@ * ********************************************************* */ /** - * s2io-open - open entry point of the driver + * s2io_open - open entry point of the driver * @dev : pointer to the device structure. * Description: * This function is the open entry point of the driver. It mainly calls a @@ -2662,10 +2662,7 @@ int s2io_open(struct net_device *dev) { nic_t *sp = dev->priv; - int i, ret = 0, err = 0; - mac_info_t *mac_control; - struct config_param *config; - + int err = 0; /* * Make sure you have link off by default every time @@ -2674,68 +2671,30 @@ netif_carrier_off(dev); sp->last_link_state = LINK_DOWN; - /* Initialize the H/W I/O registers */ - if (init_nic(sp) != 0) { + /* Initialize H/W and enable interrupts */ + if (s2io_card_up(sp)) { DBG_PRINT(ERR_DBG, "%s: H/W initialization failed\n", dev->name); return -ENODEV; } /* After proper initialization of H/W, register ISR */ - err = - request_irq((int) sp->irq, s2io_isr, SA_SHIRQ, sp->name, dev); + err = request_irq((int) sp->irq, s2io_isr, SA_SHIRQ, + sp->name, dev); if (err) { s2io_reset(sp); DBG_PRINT(ERR_DBG, "%s: ISR registration failed\n", dev->name); return err; } + if (s2io_set_mac_addr(dev, dev->dev_addr) == FAILURE) { DBG_PRINT(ERR_DBG, "Set Mac Address Failed\n"); s2io_reset(sp); return -ENODEV; } - - /* Setting its receive mode */ - s2io_set_multicast(dev); - - /* - * Initializing the Rx buffers. For now we are considering only 1 - * Rx ring and initializing buffers into 1016 RxDs or 8 Rx blocks - */ - mac_control = &sp->mac_control; - config = &sp->config; - - for (i = 0; i < config->rx_ring_num; i++) { - if ((ret = fill_rx_buffers(sp, i))) { - DBG_PRINT(ERR_DBG, "%s: Out of memory in Open\n", - dev->name); - s2io_reset(sp); - free_irq(dev->irq, dev); - free_rx_buffers(sp); - return -ENOMEM; - } - DBG_PRINT(INFO_DBG, "Buf in ring:%d is %d:\n", i, - atomic_read(&sp->rx_bufs_left[i])); - } - - /* Enable tasklet for the device */ - tasklet_init(&sp->task, s2io_tasklet, (unsigned long) dev); - - /* Enable Rx Traffic and interrupts on the NIC */ - if (start_nic(sp)) { - DBG_PRINT(ERR_DBG, "%s: Starting NIC failed\n", dev->name); - tasklet_kill(&sp->task); - s2io_reset(sp); - free_irq(dev->irq, dev); - free_rx_buffers(sp); - return -ENODEV; - } - - sp->device_close_flag = FALSE; /* Device is up and running. */ netif_start_queue(dev); - return 0; } @@ -2755,67 +2714,14 @@ int s2io_close(struct net_device *dev) { nic_t *sp = dev->priv; - XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; - register u64 val64 = 0; - u16 cnt = 0; - unsigned long flags; - spin_lock_irqsave(&sp->tx_lock, flags); + flush_scheduled_work(); netif_stop_queue(dev); + /* Reset card, kill tasklet and free Tx and Rx buffers. */ + s2io_card_down(sp); - /* disable Tx and Rx traffic on the NIC */ - stop_nic(sp); - - /* - * If the device tasklet is running, wait till its done - * before killing it - */ - while (atomic_read(&(sp->tasklet_status))) { - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 10); - } - tasklet_kill(&sp->task); - - /* Free the Registered IRQ */ free_irq(dev->irq, dev); - - /* Flush all scheduled tasks */ - if (sp->task_flag == 1) { - DBG_PRINT(INFO_DBG, "%s: Calling close from a task\n", - dev->name); - } else { - flush_scheduled_work(); - } - - /* Check if the device is Quiescent and then Reset the NIC */ - do { - val64 = readq(&bar0->adapter_status); - if (verify_xena_quiescence(val64, sp->device_enabled_once)) { - break; - } - - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 20); - cnt++; - if (cnt == 10) { - DBG_PRINT(ERR_DBG, - "s2io_close:Device not Quiescent "); - DBG_PRINT(ERR_DBG, "adaper status reads 0x%llx\n", - (unsigned long long) val64); - break; - } - } while (1); - s2io_reset(sp); - - /* Free all Tx Buffers waiting for transmission */ - free_tx_buffers(sp); - - /* Free all Rx buffers allocated by host */ - free_rx_buffers(sp); - sp->device_close_flag = TRUE; /* Device is shut down. */ - spin_unlock_irqrestore(&sp->tx_lock, flags); - return 0; } @@ -2851,14 +2757,13 @@ config = &sp->config; DBG_PRINT(TX_DBG, "%s: In S2IO Tx routine\n", dev->name); - spin_lock_irqsave(&sp->tx_lock, flags); - if ((netif_queue_stopped(dev)) || (!netif_carrier_ok(dev))) { - DBG_PRINT(TX_DBG, "%s:s2io_xmit: Tx Queue stopped\n", + + if (atomic_read(&sp->card_state) == CARD_DOWN) { + DBG_PRINT(ERR_DBG, "%s: Card going down for reset\n", dev->name); - dev_kfree_skb(skb); spin_unlock_irqrestore(&sp->tx_lock, flags); - return 0; + return 1; } queue = 0; @@ -3037,18 +2942,13 @@ DBG_PRINT(ERR_DBG, "%s:Out of memory", dev->name); DBG_PRINT(ERR_DBG, " in ISR!!\n"); - clear_bit(0, - (unsigned long *) (&sp-> - tasklet_status)); + clear_bit(0, (&sp->tasklet_status)); return IRQ_HANDLED; } - clear_bit(0, - (unsigned long *) (&sp->tasklet_status)); - } else if ((level == LOW) - && (!atomic_read(&sp->tasklet_status))) { + clear_bit(0, (&sp->tasklet_status)); + } else if (level == LOW) { tasklet_schedule(&sp->task); } - } #endif @@ -4317,7 +4217,7 @@ break; } } - clear_bit(0, (unsigned long *) (&sp->tasklet_status)); + clear_bit(0, (&sp->tasklet_status)); } } @@ -4335,6 +4235,11 @@ register u64 val64; u16 subid; + if (test_and_set_bit(0, &(nic->link_state))) { + /* The card is being reset, no point doing anything */ + return; + } + subid = nic->pdev->subsystem_device; /* * Allow a small delay for the NICs self initiated @@ -4384,6 +4289,109 @@ DBG_PRINT(ERR_DBG, "device is not Quiescent\n"); netif_stop_queue(dev); } + clear_bit(0, &(nic->link_state)); +} + +static void s2io_card_down(nic_t * sp) +{ + int cnt = 0; + XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; + unsigned long flags; + register u64 val64 = 0; + + /* If s2io_set_link task is executing, wait till it completes. */ + while (test_and_set_bit(0, &(sp->link_state))) { + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(HZ / 20); + } + atomic_set(&sp->card_state, CARD_DOWN); + + /* disable Tx and Rx traffic on the NIC */ + stop_nic(sp); + + /* Kill tasklet. */ + tasklet_kill(&sp->task); + + /* Check if the device is Quiescent and then Reset the NIC */ + do { + val64 = readq(&bar0->adapter_status); + if (verify_xena_quiescence(val64, sp->device_enabled_once)) { + break; + } + + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(HZ / 20); + cnt++; + if (cnt == 10) { + DBG_PRINT(ERR_DBG, + "s2io_close:Device not Quiescent "); + DBG_PRINT(ERR_DBG, "adaper status reads 0x%llx\n", + (unsigned long long) val64); + break; + } + } while (1); + spin_lock_irqsave(&sp->tx_lock, flags); + s2io_reset(sp); + + /* Free all unused Tx and Rx buffers */ + free_tx_buffers(sp); + free_rx_buffers(sp); + + spin_unlock_irqrestore(&sp->tx_lock, flags); + clear_bit(0, &(sp->link_state)); +} + +static int s2io_card_up(nic_t * sp) +{ + int i, ret; + mac_info_t *mac_control; + struct config_param *config; + struct net_device *dev = (struct net_device *) sp->dev; + + /* Initialize the H/W I/O registers */ + if (init_nic(sp) != 0) { + DBG_PRINT(ERR_DBG, "%s: H/W initialization failed\n", + dev->name); + return -ENODEV; + } + + /* + * Initializing the Rx buffers. For now we are considering only 1 + * Rx ring and initializing buffers into 30 Rx blocks + */ + mac_control = &sp->mac_control; + config = &sp->config; + + for (i = 0; i < config->rx_ring_num; i++) { + if ((ret = fill_rx_buffers(sp, i))) { + DBG_PRINT(ERR_DBG, "%s: Out of memory in Open\n", + dev->name); + s2io_reset(sp); + free_rx_buffers(sp); + return -ENOMEM; + } + DBG_PRINT(INFO_DBG, "Buf in ring:%d is %d:\n", i, + atomic_read(&sp->rx_bufs_left[i])); + } + + /* Setting its receive mode */ + s2io_set_multicast(dev); + + /* Enable tasklet for the device */ + tasklet_init(&sp->task, s2io_tasklet, (unsigned long) dev); + + /* Enable Rx Traffic and interrupts on the NIC */ + if (start_nic(sp)) { + DBG_PRINT(ERR_DBG, "%s: Starting NIC failed\n", dev->name); + tasklet_kill(&sp->task); + s2io_reset(sp); + free_irq(dev->irq, dev); + free_rx_buffers(sp); + return -ENODEV; + } + + atomic_set(&sp->card_state, CARD_UP); + return 0; } /** @@ -4401,13 +4409,14 @@ struct net_device *dev = (struct net_device *) data; nic_t *sp = dev->priv; - sp->task_flag = 1; - s2io_close(dev); - sp->task_flag = 0; - sp->device_close_flag = TRUE; - s2io_open(dev); - DBG_PRINT(ERR_DBG, - "%s: was reset by Tx watchdog timer.\n", dev->name); + s2io_card_down(sp); + if (s2io_card_up(sp)) { + DBG_PRINT(ERR_DBG, "%s: Device bring up failed\n", + dev->name); + } + netif_wake_queue(dev); + DBG_PRINT(ERR_DBG, "%s: was reset by Tx watchdog timer\n", + dev->name); } /** @@ -4990,8 +4999,13 @@ dev->addr_len = ETH_ALEN; memcpy(dev->dev_addr, sp->def_mac_addr, ETH_ALEN); - /* Initialize the tasklet status flag */ - atomic_set(&(sp->tasklet_status), 0); + /* + * Initialize the tasklet status and link state flags + * and the card statte parameter + */ + atomic_set(&(sp->card_state), 0); + sp->tasklet_status = 0; + sp->link_state = 0; /* Initialize spinlocks */ @@ -5298,7 +5312,7 @@ printk ("tx_urange_a, tx_urange_b & tx_urange_c can take value " "from 0 to 100 and range_a can't exceed range_b " - "neither can range_b exceed range_c\n"); + "neither can range_b exceed range_c\n"); fail = 1; } if (((rx_urange_a > 100) || (rx_urange_b > 100) || @@ -5307,7 +5321,7 @@ printk ("rx_urange_a, rx_urange_b & rx_urange_c can take value " "from 0 to 100 and range_a can't exceed range_b " - "neither can range_b exceed range_c\n"); + "neither can range_b exceed range_c\n"); fail = 1; } if ((tx_ufc_a > 0xffff) || (tx_ufc_b > 0xffff) || diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-26 16:36:28.244032568 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-26 16:36:16.893758072 -0700 @@ -637,7 +637,7 @@ char name[32]; struct tasklet_struct task; - atomic_t tasklet_status; + volatile unsigned long tasklet_status; struct timer_list timer; struct net_device *dev; struct pci_dev *pdev; @@ -730,6 +730,10 @@ buffAdd_t **ba[MAX_RX_RINGS]; #endif int task_flag; +#define CARD_DOWN 1 +#define CARD_UP 2 + atomic_t card_state; + volatile unsigned long link_state; } nic_t; #define RESET_ERROR 1; @@ -874,5 +878,7 @@ static struct ethtool_ops netdev_ethtool_ops; #endif static void s2io_set_link(unsigned long data); +static void s2io_card_down(nic_t * nic); +static int s2io_card_up(nic_t * nic); #endif /* _S2IO_H */ From ravinandan.arakali@s2io.com Thu Oct 28 11:26:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 11:27:02 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SIQs4p009095 for ; Thu, 28 Oct 2004 11:26:54 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SIQOje008525; Thu, 28 Oct 2004 14:26:24 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SIQM39012593; Thu, 28 Oct 2004 14:26:22 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , , Subject: [PATCH 2.6.9-rc2 10/12] S2io: 2 buffer mode with copy Date: Thu, 28 Oct 2004 11:34:39 -0700 Message-ID: <001601c4bd1c$e2f99d40$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 11001 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Hi All, This patch addresses the comments by Chris Leech about skb->mac.ethernet resulting in NULL dereference with the old method of implementing 2 buffer mode. The new method performs a copy of the MAC header to the head of the payload. This is a stop-gap measure till the fragmented skb receive feature in the kernel is made functional. Also, using GFP_KERNEL flag for buffer0, buffer1 memory allocation instead of GFP_ATOMIC. Signed-off-by: Raghavendra Koushik --- diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-26 16:40:58.271982080 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-26 16:40:42.944312240 -0700 @@ -497,7 +497,7 @@ ba = &nic->ba[i][j][k]; ba->ba_0_org = (void *) kmalloc - (BUF0_LEN + ALIGN_SIZE, GFP_ATOMIC); + (BUF0_LEN + ALIGN_SIZE, GFP_KERNEL); if (!ba->ba_0_org) return -ENOMEM; tmp = (u64) ba->ba_0_org; @@ -506,7 +506,7 @@ ba->ba_0 = (void *) tmp; ba->ba_1_org = (void *) kmalloc - (BUF1_LEN + ALIGN_SIZE, GFP_ATOMIC); + (BUF1_LEN + ALIGN_SIZE, GFP_KERNEL); if (!ba->ba_1_org) return -ENOMEM; tmp = (u64) ba->ba_1_org; @@ -1791,8 +1791,7 @@ #ifndef CONFIG_2BUFF_MODE skb = dev_alloc_skb(size + NET_IP_ALIGN); #else - skb = dev_alloc_skb(dev->mtu + ALIGN_SIZE + - /*BUF0_LEN + */ 22); + skb = dev_alloc_skb(dev->mtu + ALIGN_SIZE + BUF0_LEN + 4); #endif if (!skb) { DBG_PRINT(ERR_DBG, "%s: Out of ", dev->name); @@ -1813,14 +1812,16 @@ mac_control->rx_curr_put_info[ring_no].offset = off; #else ba = &nic->ba[ring_no][block_no][off]; + skb_reserve(skb, BUF0_LEN); tmp = (u64) skb->data; tmp += ALIGN_SIZE; tmp &= ~ALIGN_SIZE; skb->data = (void *) tmp; + skb->tail = (void *) tmp; memset(rxdp, 0, sizeof(RxD_t)); rxdp->Buffer2_ptr = pci_map_single - (nic->pdev, skb->data, dev->mtu + 22, + (nic->pdev, skb->data, dev->mtu + BUF0_LEN + 4, PCI_DMA_FROMDEVICE); rxdp->Buffer0_ptr = pci_map_single(nic->pdev, ba->ba_0, BUF0_LEN, @@ -1829,7 +1830,7 @@ pci_map_single(nic->pdev, ba->ba_1, BUF1_LEN, PCI_DMA_FROMDEVICE); - rxdp->Control_2 = SET_BUFFER2_SIZE(dev->mtu + 22); + rxdp->Control_2 = SET_BUFFER2_SIZE(dev->mtu + 4); rxdp->Control_2 |= SET_BUFFER0_SIZE(BUF0_LEN); rxdp->Control_2 |= SET_BUFFER1_SIZE(1); /* dummy. */ rxdp->Control_2 |= BIT(0); /* Set Buffer_Empty bit. */ @@ -1919,7 +1920,7 @@ PCI_DMA_FROMDEVICE); pci_unmap_single(sp->pdev, (dma_addr_t) rxdp->Buffer2_ptr, - dev->mtu + 22, + dev->mtu + BUF0_LEN + 4, PCI_DMA_FROMDEVICE); #endif dev_kfree_skb(skb); @@ -2073,7 +2074,7 @@ BUF1_LEN, PCI_DMA_FROMDEVICE); pci_unmap_single(nic->pdev, (dma_addr_t) rxdp->Buffer2_ptr, - dev->mtu + 22, + dev->mtu + BUF0_LEN + 4, PCI_DMA_FROMDEVICE); ba = &nic->ba[i][get_block][get_info.offset]; @@ -2270,7 +2271,7 @@ BUF1_LEN, PCI_DMA_FROMDEVICE); pci_unmap_single(nic->pdev, (dma_addr_t) rxdp->Buffer2_ptr, - dev->mtu + 22, + dev->mtu + BUF0_LEN + 4, PCI_DMA_FROMDEVICE); ba = &nic->ba[i][get_block][get_info.offset]; @@ -4471,7 +4472,7 @@ u16 l3_csum, l4_csum; #ifdef CONFIG_2BUFF_MODE int buf0_len, buf2_len; - struct ethhdr *eth = (struct ethhdr *) ba->ba_0; + unsigned char *buff; #endif l3_csum = RXD_GET_L3_CKSUM(rxdp->Control_1); @@ -4510,21 +4511,10 @@ skb_put(skb, len); skb->protocol = eth_type_trans(skb, dev); #else + buff = skb_push(skb, buf0_len); + memcpy(buff, ba->ba_0, buf0_len); skb_put(skb, buf2_len); - /* - * Reproducing eth_type_trans functionality and running - * on the ethernet header 'eth' stripped and given to us - * by the hardware in 2Buff mode. - */ - if (*eth->h_dest & 1) { - if (!memcmp(eth->h_dest, dev->broadcast, ETH_ALEN)) - skb->pkt_type = PACKET_BROADCAST; - else - skb->pkt_type = PACKET_MULTICAST; - } else if (memcmp(eth->h_dest, dev->dev_addr, ETH_ALEN)) { - skb->pkt_type = PACKET_OTHERHOST; - } - skb->protocol = eth->h_proto; + skb->protocol = eth_type_trans(skb, dev); #endif #ifdef CONFIG_S2IO_NAPI From ravinandan.arakali@s2io.com Thu Oct 28 11:27:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 11:27:20 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SIR4bX009337 for ; Thu, 28 Oct 2004 11:27:04 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SIQYje008532; Thu, 28 Oct 2004 14:26:34 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SIQV39012622; Thu, 28 Oct 2004 14:26:31 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , , Subject: [PATCH 2.6.9-rc2 11/12] S2io: modified loadable parameters Date: Thu, 28 Oct 2004 11:34:45 -0700 Message-ID: <001701c4bd1c$e835a420$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 11002 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Hi, Attached is the patch to implement module loadable parameters as per new API. Following is the list of changes. 1. Used new module_param() API. 2. List of variables for tx_fifo_len and rx_ring_sz replaced with array. 3. Some of the module parameters which can be set thru setpci command have been removed, such as latency_timer, max_read_byte_cnt, max_split_transactions. 4. Other parameters which were felt to be not required, such as rx_prio, tx_prio have been removed. 5. Interrupt moderation parameters(such as tx_urange_*) are no longer module loadable parameters since they can be configured thru' a separate patch available to customers. 6. Changed default max_read_byte_count to 1024. 7. If scatter-gather is enabled, checksum is enabled too. 8. Not verifying if module loadable parameters are within valid range (verify_load_param() removed). Signed-off-by: Raghavendra Koushik --- diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-26 16:43:26.315476048 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-26 16:43:19.561502808 -0700 @@ -26,17 +26,13 @@ * * The module loadable parameters that are supported by the driver and a brief * explaination of all the variables. - * ring_num : This can be used to program the number of receive rings used + * rx_ring_num : This can be used to program the number of receive rings used * in the driver. - * frame_len: This is an array of size 8. Using this we can set the maximum - * size of the received frame that can be steered into the corrsponding - * receive ring. - * ring_len: This defines the number of descriptors each ring can have. This + * rx_ring_len: This defines the number of descriptors each ring can have. This * is also an array of size 8. - * fifo_num: This defines the number of Tx FIFOs thats used int the driver. - * fifo_len: This too is an array of 8. Each element defines the number of + * tx_fifo_num: This defines the number of Tx FIFOs thats used int the driver. + * tx_fifo_len: This too is an array of 8. Each element defines the number of * Tx descriptors that can be associated with each corresponding FIFO. - * latency_timer: This input is programmed into the Latency timer register * in PCI Configuration space. ************************************************************************/ @@ -222,66 +218,22 @@ }; /* Module Loadable parameters. */ -static u32 frame_len[MAX_RX_RINGS]; -static u32 rx_prio; -static u32 tx_prio; - -static unsigned int lso_enable = 1; -#ifndef CONFIG_S2IO_NAPI -static unsigned int indicate_max_pkts; -#endif -static unsigned int cksum_offload_enable = 1; static unsigned int tx_fifo_num = 1; -static unsigned int tx_fifo_len_0 = DEFAULT_FIFO_LEN; -static unsigned int tx_fifo_len_1; -static unsigned int tx_fifo_len_2; -static unsigned int tx_fifo_len_3; -static unsigned int tx_fifo_len_4; -static unsigned int tx_fifo_len_5; -static unsigned int tx_fifo_len_6; -static unsigned int tx_fifo_len_7; -static unsigned int max_txds = MAX_SKB_FRAGS; +static unsigned int tx_fifo_len[MAX_TX_FIFOS] = + {[0 ...(MAX_TX_FIFOS - 1)] = 0 }; static unsigned int rx_ring_num = 1; -static unsigned int rx_ring_sz_0 = SMALL_BLK_CNT; -static unsigned int rx_ring_sz_1; -static unsigned int rx_ring_sz_2; -static unsigned int rx_ring_sz_3; -static unsigned int rx_ring_sz_4; -static unsigned int rx_ring_sz_5; -static unsigned int rx_ring_sz_6; -static unsigned int rx_ring_sz_7; +static unsigned int rx_ring_sz[MAX_RX_RINGS] = + {[0 ...(MAX_RX_RINGS - 1)] = 0 }; static unsigned int Stats_refresh_time = 4; static unsigned int rmac_pause_time = 65535; static unsigned int mc_pause_threshold_q0q3 = 187; static unsigned int mc_pause_threshold_q4q7 = 187; static unsigned int shared_splits; -#if defined(__ia64__) -static unsigned int max_splits_trans = XENA_THREE_SPLIT_TRANSACTION; -#else -static unsigned int max_splits_trans = XENA_TWO_SPLIT_TRANSACTION; -#endif static unsigned int tmac_util_period = 5; static unsigned int rmac_util_period = 5; -static unsigned int tx_timer_val = 0xFFF; -static unsigned int tx_utilz_periodic = 1; -static unsigned int rx_timer_val = 0xFFF; -static unsigned int rx_utilz_periodic = 1; -static unsigned int tx_urange_a = 0xA; -static unsigned int tx_ufc_a = 0x10; -static unsigned int tx_urange_b = 0x10; -static unsigned int tx_ufc_b = 0x20; -static unsigned int tx_urange_c = 0x30; -static unsigned int tx_ufc_c = 0x40; -static unsigned int tx_ufc_d = 0x80; -static unsigned int rx_urange_a = 0xA; -static unsigned int rx_ufc_a = 0x1; -static unsigned int rx_urange_b = 0x10; -static unsigned int rx_ufc_b = 0x2; -static unsigned int rx_urange_c = 0x30; -static unsigned int rx_ufc_c = 0x40; -static unsigned int rx_ufc_d = 0x80; -static u8 latency_timer = 0xf8; -static u8 max_read_byte_cnt = 2; +#ifndef CONFIG_S2IO_NAPI +static unsigned int indicate_max_pkts; +#endif /* * S2IO device table. @@ -923,17 +875,8 @@ * Disable Rx steering. Hard coding all packets be steered to * Queue 0 for now. */ - if (rx_prio) { - u64 def = 0x8000000000000000ULL, tmp; - for (i = 0; i < MAX_RX_RINGS; i++) { - tmp = (u64) (def >> (i % config->rx_ring_num)); - val64 |= (u64) (tmp >> (i * 8)); - } - writeq(val64, &bar0->rts_qos_steering); - } else { - val64 = 0x8080808080808080ULL; - writeq(val64, &bar0->rts_qos_steering); - } + val64 = 0x8080808080808080ULL; + writeq(val64, &bar0->rts_qos_steering); /* UDP Fix */ val64 = 0; @@ -964,18 +907,15 @@ * Scheme. */ /* TTI Initialization */ - val64 = TTI_DATA1_MEM_TX_TIMER_VAL(tx_timer_val) | - TTI_DATA1_MEM_TX_URNG_A(tx_urange_a) | - TTI_DATA1_MEM_TX_URNG_B(tx_urange_b) | - TTI_DATA1_MEM_TX_URNG_C(tx_urange_c); - if (tx_utilz_periodic) - val64 |= TTI_DATA1_MEM_TX_TIMER_AC_EN; + val64 = TTI_DATA1_MEM_TX_TIMER_VAL(0xFFF) | + TTI_DATA1_MEM_TX_URNG_A(0xA) | + TTI_DATA1_MEM_TX_URNG_B(0x10) | + TTI_DATA1_MEM_TX_URNG_C(0x30) | TTI_DATA1_MEM_TX_TIMER_AC_EN; writeq(val64, &bar0->tti_data1_mem); - val64 = TTI_DATA2_MEM_TX_UFC_A(tx_ufc_a) | - TTI_DATA2_MEM_TX_UFC_B(tx_ufc_b) | - TTI_DATA2_MEM_TX_UFC_C(tx_ufc_c) | - TTI_DATA2_MEM_TX_UFC_D(tx_ufc_d); + val64 = TTI_DATA2_MEM_TX_UFC_A(0x10) | + TTI_DATA2_MEM_TX_UFC_B(0x20) | + TTI_DATA2_MEM_TX_UFC_C(0x40) | TTI_DATA2_MEM_TX_UFC_D(0x80); writeq(val64, &bar0->tti_data2_mem); val64 = TTI_CMD_MEM_WE | TTI_CMD_MEM_STROBE_NEW_CMD; @@ -1004,19 +944,16 @@ } /* RTI Initialization */ - val64 = RTI_DATA1_MEM_RX_TIMER_VAL(rx_timer_val) | - RTI_DATA1_MEM_RX_URNG_A(rx_urange_a) | - RTI_DATA1_MEM_RX_URNG_B(rx_urange_b) | - RTI_DATA1_MEM_RX_URNG_C(rx_urange_c); - if (rx_utilz_periodic) - val64 |= RTI_DATA1_MEM_RX_TIMER_AC_EN; + val64 = RTI_DATA1_MEM_RX_TIMER_VAL(0xFFF) | + RTI_DATA1_MEM_RX_URNG_A(0xA) | + RTI_DATA1_MEM_RX_URNG_B(0x10) | + RTI_DATA1_MEM_RX_URNG_C(0x30) | RTI_DATA1_MEM_RX_TIMER_AC_EN; writeq(val64, &bar0->rti_data1_mem); - val64 = RTI_DATA2_MEM_RX_UFC_A(rx_ufc_a) | - RTI_DATA2_MEM_RX_UFC_B(rx_ufc_b) | - RTI_DATA2_MEM_RX_UFC_C(rx_ufc_c) | - RTI_DATA2_MEM_RX_UFC_D(rx_ufc_d); + val64 = RTI_DATA2_MEM_RX_UFC_A(0x1) | + RTI_DATA2_MEM_RX_UFC_B(0x2) | + RTI_DATA2_MEM_RX_UFC_C(0x40) | RTI_DATA2_MEM_RX_UFC_D(0x80); writeq(val64, &bar0->rti_data2_mem); val64 = RTI_CMD_MEM_WE | RTI_CMD_MEM_STROBE_NEW_CMD; @@ -1675,15 +1612,8 @@ mac_control = &nic->mac_control; config = &nic->config; - if (frame_len[ring_no]) { - if (frame_len[ring_no] > dev->mtu) - dev->mtu = frame_len[ring_no]; - size = frame_len[ring_no] + HEADER_ETHERNET_II_802_3_SIZE + - HEADER_802_2_SIZE + HEADER_SNAP_SIZE; - } else { - size = dev->mtu + HEADER_ETHERNET_II_802_3_SIZE + - HEADER_802_2_SIZE + HEADER_SNAP_SIZE; - } + size = dev->mtu + HEADER_ETHERNET_II_802_3_SIZE + + HEADER_802_2_SIZE + HEADER_SNAP_SIZE; while (alloc_tab < alloc_cnt) { block_no = mac_control->rx_curr_put_info[ring_no]. @@ -2768,13 +2698,6 @@ } queue = 0; - /* Multi FIFO Tx is disabled for now. */ - if (!queue && tx_prio) { - u8 x = (skb->data)[5]; - queue = x % config->tx_fifo_num; - } - - put_off = (u16) mac_control->tx_curr_put_info[queue].offset; get_off = (u16) mac_control->tx_curr_get_info[queue].offset; txdp = (TxD_t *) sp->list_info[queue][put_off].list_virt_addr; @@ -4612,25 +4535,16 @@ (pci_cmd | PCI_COMMAND_PARITY)); pci_read_config_word(sp->pdev, PCI_COMMAND, &pci_cmd); - /* Set user specified value in Latency Timer */ - if (latency_timer) { - pci_write_config_byte(sp->pdev, PCI_LATENCY_TIMER, - latency_timer); - pci_read_config_byte(sp->pdev, PCI_LATENCY_TIMER, - &latency_timer); - } - - /* Set MMRB count to 2048 in PCI-X Command register. */ + /* Set MMRB count to 1024 in PCI-X Command register. */ sp->pcix_cmd &= 0xFFF3; - pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, - (sp->pcix_cmd | (max_read_byte_cnt << 2))); + pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, (sp->pcix_cmd | (0x1 << 2))); /* MMRBC 1K */ pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); /* Setting Maximum outstanding splits based on system type. */ sp->pcix_cmd &= 0xFF8F; - sp->pcix_cmd |= XENA_MAX_OUTSTANDING_SPLITS(max_splits_trans); + sp->pcix_cmd |= XENA_MAX_OUTSTANDING_SPLITS(0x1); /* 2 splits. */ pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, sp->pcix_cmd); pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, @@ -4645,58 +4559,20 @@ MODULE_AUTHOR("Raghavendra Koushik "); MODULE_LICENSE("GPL"); -MODULE_PARM(lso_enable, "i"); +module_param(tx_fifo_num, int, 0); +module_param_array(tx_fifo_len, int, tx_fifo_num, 0); +module_param(rx_ring_num, int, 0); +module_param_array(rx_ring_sz, int, rx_ring_num, 0); +module_param(Stats_refresh_time, int, 0); +module_param(rmac_pause_time, int, 0); +module_param(mc_pause_threshold_q0q3, int, 0); +module_param(mc_pause_threshold_q4q7, int, 0); +module_param(shared_splits, int, 0); +module_param(tmac_util_period, int, 0); +module_param(rmac_util_period, int, 0); #ifndef CONFIG_S2IO_NAPI -MODULE_PARM(indicate_max_pkts, "i"); +module_param(indicate_max_pkts, int, 0); #endif -MODULE_PARM(cksum_offload_enable, "i"); -MODULE_PARM(tx_fifo_num, "i"); -MODULE_PARM(tx_fifo_len_0, "i"); -MODULE_PARM(tx_fifo_len_1, "i"); -MODULE_PARM(tx_fifo_len_2, "i"); -MODULE_PARM(tx_fifo_len_3, "i"); -MODULE_PARM(tx_fifo_len_4, "i"); -MODULE_PARM(tx_fifo_len_5, "i"); -MODULE_PARM(tx_fifo_len_6, "i"); -MODULE_PARM(tx_fifo_len_7, "i"); -MODULE_PARM(max_txds, "i"); -MODULE_PARM(rx_ring_num, "i"); -MODULE_PARM(rx_ring_sz_0, "i"); -MODULE_PARM(rx_ring_sz_1, "i"); -MODULE_PARM(rx_ring_sz_2, "i"); -MODULE_PARM(rx_ring_sz_3, "i"); -MODULE_PARM(rx_ring_sz_4, "i"); -MODULE_PARM(rx_ring_sz_5, "i"); -MODULE_PARM(rx_ring_sz_6, "i"); -MODULE_PARM(rx_ring_sz_7, "i"); -MODULE_PARM(Stats_refresh_time, "i"); -MODULE_PARM(rmac_pause_time, "i"); -MODULE_PARM(mc_pause_threshold_q0q3, "i"); -MODULE_PARM(mc_pause_threshold_q4q7, "i"); -MODULE_PARM(shared_splits, "i"); -MODULE_PARM(max_splits_trans, "i"); -MODULE_PARM(tmac_util_period, "i"); -MODULE_PARM(rmac_util_period, "i"); -MODULE_PARM(tx_timer_val, "i"); -MODULE_PARM(tx_utilz_periodic, "i"); -MODULE_PARM(rx_timer_val, "i"); -MODULE_PARM(rx_utilz_periodic, "i"); -MODULE_PARM(tx_urange_a, "i"); -MODULE_PARM(tx_ufc_a, "i"); -MODULE_PARM(tx_urange_b, "i"); -MODULE_PARM(tx_ufc_b, "i"); -MODULE_PARM(tx_urange_c, "i"); -MODULE_PARM(tx_ufc_c, "i"); -MODULE_PARM(tx_ufc_d, "i"); -MODULE_PARM(rx_urange_a, "i"); -MODULE_PARM(rx_ufc_a, "i"); -MODULE_PARM(rx_urange_b, "i"); -MODULE_PARM(rx_ufc_b, "i"); -MODULE_PARM(rx_urange_c, "i"); -MODULE_PARM(rx_ufc_c, "i"); -MODULE_PARM(rx_ufc_d, "i"); -MODULE_PARM(latency_timer, "i"); -MODULE_PARM(max_read_byte_cnt, "i"); /** * s2io_init_nic - Initialization of the adapter . * @pdev : structure containing the PCI related information of the device. @@ -4797,23 +4673,12 @@ config = &sp->config; /* Tx side parameters. */ + tx_fifo_len[0] = DEFAULT_FIFO_LEN; /* Default value. */ config->tx_fifo_num = tx_fifo_num; - config->tx_cfg[0].fifo_len = tx_fifo_len_0; - config->tx_cfg[0].fifo_priority = 0; - config->tx_cfg[1].fifo_len = tx_fifo_len_1; - config->tx_cfg[1].fifo_priority = 1; - config->tx_cfg[2].fifo_len = tx_fifo_len_2; - config->tx_cfg[2].fifo_priority = 2; - config->tx_cfg[3].fifo_len = tx_fifo_len_3; - config->tx_cfg[3].fifo_priority = 3; - config->tx_cfg[4].fifo_len = tx_fifo_len_4; - config->tx_cfg[4].fifo_priority = 4; - config->tx_cfg[5].fifo_len = tx_fifo_len_5; - config->tx_cfg[5].fifo_priority = 5; - config->tx_cfg[6].fifo_len = tx_fifo_len_6; - config->tx_cfg[6].fifo_priority = 6; - config->tx_cfg[7].fifo_len = tx_fifo_len_7; - config->tx_cfg[7].fifo_priority = 7; + for (i = 0; i < MAX_TX_FIFOS; i++) { + config->tx_cfg[i].fifo_len = tx_fifo_len[i]; + config->tx_cfg[i].fifo_priority = i; + } config->tx_intr_type = TXD_INT_TYPE_UTILZ; for (i = 0; i < config->tx_fifo_num; i++) { @@ -4827,23 +4692,13 @@ config->max_txds = MAX_SKB_FRAGS; /* Rx side parameters. */ + rx_ring_sz[0] = SMALL_BLK_CNT; /* Default value. */ config->rx_ring_num = rx_ring_num; - config->rx_cfg[0].num_rxd = rx_ring_sz_0 * (MAX_RXDS_PER_BLOCK + 1); - config->rx_cfg[0].ring_priority = 0; - config->rx_cfg[1].num_rxd = rx_ring_sz_1 * (MAX_RXDS_PER_BLOCK + 1); - config->rx_cfg[1].ring_priority = 1; - config->rx_cfg[2].num_rxd = rx_ring_sz_2 * (MAX_RXDS_PER_BLOCK + 1); - config->rx_cfg[2].ring_priority = 2; - config->rx_cfg[3].num_rxd = rx_ring_sz_3 * (MAX_RXDS_PER_BLOCK + 1); - config->rx_cfg[3].ring_priority = 3; - config->rx_cfg[4].num_rxd = rx_ring_sz_4 * (MAX_RXDS_PER_BLOCK + 1); - config->rx_cfg[4].ring_priority = 4; - config->rx_cfg[5].num_rxd = rx_ring_sz_5 * (MAX_RXDS_PER_BLOCK + 1); - config->rx_cfg[5].ring_priority = 5; - config->rx_cfg[6].num_rxd = rx_ring_sz_6 * (MAX_RXDS_PER_BLOCK + 1); - config->rx_cfg[6].ring_priority = 6; - config->rx_cfg[7].num_rxd = rx_ring_sz_7 * (MAX_RXDS_PER_BLOCK + 1); - config->rx_cfg[7].ring_priority = 7; + for (i = 0; i < MAX_RX_RINGS; i++) { + config->rx_cfg[i].num_rxd = rx_ring_sz[i] * + (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[i].ring_priority = i; + } for (i = 0; i < rx_ring_num; i++) { config->rx_cfg[i].ring_org = RING_ORG_BUFF1; @@ -4910,17 +4765,14 @@ */ #ifdef CONFIG_S2IO_NAPI dev->poll = s2io_poll; - dev->weight = 90; /* For now. */ + dev->weight = 90; #endif - dev->features |= NETIF_F_SG; - if (cksum_offload_enable) - dev->features |= NETIF_F_IP_CSUM; + dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM; if (sp->high_dma_flag == TRUE) dev->features |= NETIF_F_HIGHDMA; #ifdef NETIF_F_TSO - if (lso_enable) - dev->features |= NETIF_F_TSO; + dev->features |= NETIF_F_TSO; #endif dev->tx_timeout = &s2io_tx_watchdog; @@ -5092,8 +4944,6 @@ int __init s2io_starter(void) { - if (verify_load_parm()) - return -ENODEV; return pci_module_init(&s2io_driver); } @@ -5110,223 +4960,3 @@ module_init(s2io_starter); module_exit(s2io_closer); -/** - * verify_load_parm - verifies the module loadable parameters - * Descriptions: Verifies the module loadable parameters and initializes the - * Tx Fifo, Rx Ring and other paramters. - */ - -int verify_load_parm() -{ - int fail = 0; - if (!((lso_enable == 0) || (lso_enable == 1))) { - printk("lso_enable can be either '1' or '0'\n"); - fail = 1; - } -#ifndef CONFIG_S2IO_NAPI - if ((indicate_max_pkts > (0xFFFFFFFF))) { - printk - ("indicate_max_pkts can take value greater than zero but less than 2power(32)\n"); - fail = 1; - } -#endif - if (!((cksum_offload_enable == 0) || (cksum_offload_enable == 1))) { - printk("cksum_offload_enable can be only '0' or '1' \n"); - fail = 1; - } - if ((tx_fifo_num == 0) || (tx_fifo_num > 8)) { - printk("tx_fifo_num can take value from 1 to 8\n"); - fail = 1; - } - switch (tx_fifo_num) { - case 8: - if ((tx_fifo_len_7 == 0) || tx_fifo_len_7 > 8192) { - printk - ("tx_fifo_len_7 can take value from 1 to 8192\n"); - fail = 1; - } - case 7: - if ((tx_fifo_len_6 == 0) || tx_fifo_len_6 > 8192) { - printk - ("tx_fifo_len_6 can take value from 1 to 8192\n"); - fail = 1; - } - case 6: - if ((tx_fifo_len_5 == 0) || tx_fifo_len_5 > 8192) { - printk - ("tx_fifo_len_5 can take value from 1 to 8192\n"); - fail = 1; - } - case 5: - if ((tx_fifo_len_4 == 0) || tx_fifo_len_4 > 8192) { - printk - ("tx_fifo_len_4 can take value from 1 to 8192\n"); - fail = 1; - } - case 4: - if ((tx_fifo_len_3 == 0) || tx_fifo_len_3 > 8192) { - printk - ("tx_fifo_len_3 can take value from 1 to 8192\n"); - fail = 1; - } - case 3: - if ((tx_fifo_len_2 == 0) || tx_fifo_len_2 > 8192) { - printk - ("tx_fifo_len_2 can take value from 1 to 8192\n"); - fail = 1; - } - case 2: - if ((tx_fifo_len_1 == 0) || tx_fifo_len_1 > 8192) { - printk - ("tx_fifo_len_1 can take value from 1 to 8192\n"); - fail = 1; - } - case 1: - if ((tx_fifo_len_0 == 0) || tx_fifo_len_0 > 8192) { - printk - ("tx_fifo_len_0 can take value from 1 to 8192\n"); - fail = 1; - } - } - if ((max_txds > 32) || (max_txds < 1)) { - printk("max_txds can take value from 1 to 32\n"); - fail = 1; - } - if ((rx_ring_num > 8) || (rx_ring_num < 1)) { - printk("rx_ring_num can take value from 1 to 8\n"); - fail = 1; - } - switch (rx_ring_num) { - case 8: - if (rx_ring_sz_7 < 1) { - printk - ("rx_ring_sz_7 can take value greater than 0\n"); - fail = 1; - } - case 7: - if (rx_ring_sz_6 < 1) { - printk - ("rx_ring_sz_6 can take value greater than 0\n"); - fail = 1; - } - case 6: - if (rx_ring_sz_5 < 1) { - printk - ("rx_ring_sz_5 can take value greater than 0\n"); - fail = 1; - } - case 5: - if (rx_ring_sz_4 < 1) { - printk - ("rx_ring_sz_4 can take value greater than 0\n"); - fail = 1; - } - case 4: - if (rx_ring_sz_3 < 1) { - printk - ("rx_ring_sz_3 can take value greater than 0\n"); - fail = 1; - } - case 3: - if (rx_ring_sz_2 < 1) { - printk - ("rx_ring_sz_2 can take value greater than 0\n"); - fail = 1; - } - case 2: - if (rx_ring_sz_1 < 1) { - printk - ("rx_ring_sz_1 can take value greater than 0\n"); - fail = 1; - } - case 1: - if (rx_ring_sz_0 < 1) { - printk - ("rx_ring_sz_0 can take value greater than 0\n"); - fail = 1; - } - } - if ((Stats_refresh_time < 1)) { - printk - ("Stats_refresh_time cannot be less than 1 second \n"); - fail = 1; - } - if (((rmac_pause_time < 0x10) && (rmac_pause_time != 0)) || - (rmac_pause_time > 0xFFFF)) { - printk - ("rmac_pause_time can take value from 16 to 65535\n"); - fail = 1; - } - if (max_splits_trans > 7) { - printk("max_splits_trans can take value from 0 to 7\n"); - fail = 1; - } - if ((mc_pause_threshold_q0q3 > 0xFE)) { - printk("mc_pause_threshold_q0q3 cannot exceed 254\n"); - fail = 1; - } - if ((mc_pause_threshold_q4q7 > 0xFE)) { - printk("mc_pause_threshold_q4q7 cannot exceed 254\n"); - fail = 1; - } - if ((latency_timer) - && ((latency_timer < 8) || (latency_timer > 255))) { - printk("latency_timer can take value from 8 to 255\n"); - fail = 1; - } - if (max_read_byte_cnt > 3) { - printk("max_read_byte_cnt can take value from 0 to 3\n"); - fail = 1; - } - if (shared_splits > 31) { - printk("shared_splits cannot exceed 31\n"); - fail = 1; - } - if (rmac_util_period > 0xF) { - printk("rmac_util_period cannot exceed 15\n"); - fail = 1; - } - if (tmac_util_period > 0xF) { - printk("tmac_util_period cannot exceed 15\n"); - fail = 1; - } - if ((tx_utilz_periodic > 1) || (rx_utilz_periodic > 1)) { - printk - ("tx_utilz_periodic & rx_utilz_periodic can be either " - "'0' or '1'\n"); - fail = 1; - } - if (((tx_urange_a > 100) || (tx_urange_b > 100) || - (tx_urange_c > 100)) || (tx_urange_a > tx_urange_b) - || (tx_urange_b > tx_urange_c)) { - printk - ("tx_urange_a, tx_urange_b & tx_urange_c can take value " - "from 0 to 100 and range_a can't exceed range_b " - "neither can range_b exceed range_c\n"); - fail = 1; - } - if (((rx_urange_a > 100) || (rx_urange_b > 100) || - (rx_urange_c > 100)) || (rx_urange_a > rx_urange_b) - || (rx_urange_b > rx_urange_c)) { - printk - ("rx_urange_a, rx_urange_b & rx_urange_c can take value " - "from 0 to 100 and range_a can't exceed range_b " - "neither can range_b exceed range_c\n"); - fail = 1; - } - if ((tx_ufc_a > 0xffff) || (tx_ufc_b > 0xffff) || - (tx_ufc_c > 0xffff) || (tx_ufc_d > 0xffff)) { - printk - (" tx_ufc_a, tx_ufc_b, tx_ufc_c, tx_ufc_d can take value" - "from 0 to 65535(0xFFFF)\n"); - fail = 1; - } - if ((rx_ufc_a > 0xffff) || (rx_ufc_b > 0xffff) || - (rx_ufc_c > 0xffff) || (rx_ufc_d > 0xffff)) { - printk - (" rx_ufc_a, rx_ufc_b, rx_ufc_c, rx_ufc_d can take value" - "from 0 to 65535(0xFFFF)\n"); - fail = 1; - } - return fail; -} diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-26 16:43:26.556439416 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-26 16:43:19.800466480 -0700 @@ -873,7 +873,6 @@ int s2io_set_mac_addr(struct net_device *dev, u8 * addr); static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs *regs); static int verify_xena_quiescence(u64 val64, int flag); -int verify_load_parm(void); #ifdef SET_ETHTOOL_OPS static struct ethtool_ops netdev_ethtool_ops; #endif From ravinandan.arakali@s2io.com Thu Oct 28 11:28:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 11:28:38 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SISOr5011130 for ; Thu, 28 Oct 2004 11:28:25 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SIQije008535; Thu, 28 Oct 2004 14:26:44 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SIQe39012665; Thu, 28 Oct 2004 14:26:40 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , , Subject: [PATCH 2.6.9-rc2 12/12] S2io: styling Date: Thu, 28 Oct 2004 11:34:53 -0700 Message-ID: <001801c4bd1c$edc74510$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 11003 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Hi, Attached is the patch to implement comments about styling and few other changes. Following is list of changes. 1. Incorporated Randy's comment about C99 format for s2io_driver structure initialization. 2. Driver version displayed at load time. 3. If initialization failed in s2io_init_nic(), appropriate error codes are returned. 4. #ifdef SET_ETHTOOL_OPS removed in couple of places. Signed-off-by: Raghavendra Koushik --- diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-26 16:45:59.090250752 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-26 16:45:47.840960904 -0700 @@ -250,10 +250,10 @@ MODULE_DEVICE_TABLE(pci, s2io_tbl); static struct pci_driver s2io_driver = { - name:"S2IO", - id_table:s2io_tbl, - probe:s2io_init_nic, - remove:__devexit_p(s2io_rem_nic), + .name = "S2IO", + .id_table = s2io_tbl, + .probe = s2io_init_nic, + .remove = __devexit_p(s2io_rem_nic), }; /* A simplifier macro used both by init and free shared_mem Fns(). */ @@ -4603,6 +4603,9 @@ struct config_param *config; + DBG_PRINT(ERR_DBG, "Loading S2IO driver with %s\n", + s2io_driver_version); + if ((ret = pci_enable_device(pdev))) { DBG_PRINT(ERR_DBG, "s2io_init_nic: pci_enable_device failed\n"); @@ -4720,6 +4723,7 @@ if (init_shared_mem(sp)) { DBG_PRINT(ERR_DBG, "%s: Memory allocation failed\n", dev->name); + ret = -ENOMEM; goto mem_alloc_failed; } @@ -4728,6 +4732,7 @@ if (!sp->bar0) { DBG_PRINT(ERR_DBG, "%s: S2IO: cannot remap io mem1\n", dev->name); + ret = -ENOMEM; goto bar0_remap_failed; } @@ -4736,6 +4741,7 @@ if (!sp->bar1) { DBG_PRINT(ERR_DBG, "%s: S2IO: cannot remap io mem2\n", dev->name); + ret = -ENOMEM; goto bar1_remap_failed; } @@ -4756,9 +4762,7 @@ dev->set_multicast_list = &s2io_set_multicast; dev->do_ioctl = &s2io_ioctl; dev->change_mtu = &s2io_change_mtu; -#ifdef SET_ETHTOOL_OPS SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); -#endif /* * will use eth_mac_addr() for dev->set_mac_address * mac address will be set every time dev->open() is called @@ -4788,6 +4792,7 @@ if (s2io_set_swapper(sp)) { DBG_PRINT(ERR_DBG, "%s:swapper settings are wrong\n", dev->name); + ret = -EAGAIN; goto set_swap_failed; } @@ -4802,6 +4807,7 @@ DBG_PRINT(ERR_DBG, "%s: S2IO: swapper settings are wrong\n", dev->name); + ret = -EAGAIN; goto set_swap_failed; } @@ -4874,6 +4880,7 @@ if (register_netdev(dev)) { DBG_PRINT(ERR_DBG, "Device registration failed\n"); + ret = -ENODEV; goto register_failed; } @@ -4900,7 +4907,7 @@ pci_set_drvdata(pdev, NULL); free_netdev(dev); - return -ENODEV; + return ret; } /** diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-26 16:45:59.329214424 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-26 16:45:48.079924576 -0700 @@ -50,10 +50,6 @@ #define ALIGN_SIZE 127 #define PCIX_COMMAND_REGISTER 0x62 -#ifndef SET_ETHTOOL_OPS -#define SUPPORTED_10000baseT_Full (1 << 12) -#endif - /* * Debug related variables. */ @@ -873,9 +869,7 @@ int s2io_set_mac_addr(struct net_device *dev, u8 * addr); static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs *regs); static int verify_xena_quiescence(u64 val64, int flag); -#ifdef SET_ETHTOOL_OPS static struct ethtool_ops netdev_ethtool_ops; -#endif static void s2io_set_link(unsigned long data); static void s2io_card_down(nic_t * nic); static int s2io_card_up(nic_t * nic); From jgarzik@pobox.com Thu Oct 28 11:48:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 11:48:51 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SImjr8012615 for ; Thu, 28 Oct 2004 11:48:46 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CNFJz-0003b8-AM; Thu, 28 Oct 2004 19:48:28 +0100 Message-ID: <41813EEC.5040703@pobox.com> Date: Thu, 28 Oct 2004 14:48:12 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ravinandan.arakali@s2io.com CC: "'Francois Romieu'" , netdev@oss.sgi.com, leonid.grossman@s2io.com, raghavendra.koushik@s2io.com, rapuru.sriram@s2io.com, alicia.pena@s2io.com Subject: Re: [PATCH 2.6.9-rc2 1/12] S2io: cosmetic changes References: <000d01c4bd1c$a8ef5e50$9810100a@S2IOtech.com> In-Reply-To: <000d01c4bd1c$a8ef5e50$9810100a@S2IOtech.com> Content-Type: multipart/mixed; boundary="------------090204010909070107040501" X-archive-position: 11004 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 This is a multi-part message in MIME format. --------------090204010909070107040501 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit OK, patches pass review, but now we have a technical problem. I started to apply your patches, but only #1 and #2 applied successfully with the patch(1) tool. All the other patches generated rejections. I have attached my tree, which is 2.6.8 + patch-2.6.9-rc2 + s2io-2.6.9-rc2.patch s2io-2.6.9-rc2.patch is attached, which is what I have applied so far (your #1 and #2). Can you please re-diff and re-send patches #3 - #12 ? Everything else (patch content, email format, etc.) looked great. Regards, Jeff --------------090204010909070107040501 Content-Type: application/x-bzip2; name="s2io-2.6.9-rc2.patch.bz2" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="s2io-2.6.9-rc2.patch.bz2" QlpoOTFBWSZTWeepm74AiMFfgH/8+/////////6/////YJU8B0FAoXYxFUevofR9V9Cu7N9m gdNt97Xz3F77nvPnhrUXtAG0+4APp9N7p33vPVxAo0R58nB6K9OQ+Q6lE6PQvs5vdQZPcy9h oAib2Fu4FPtq977rbeB10KdYPRdp4FWTdxfb0KAAvAB5h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mjoSEWSMGAwFIqRRRJFSCKogMGGgiSVe40c1XQdDAuwARXRzIXHuO77jg5Eik UFgMYxiQSHOA0BBURRERRRYIiKyAqqjBYULCsRHmUCFBBRFRsgk6zAXmiKjFWIqswCjICqjE YQCRkkhGDUHVeIG0HpOWiamWhNQOZ0LrQz8xgBftnZfdQ9xqkN7OSJDaWj75dH4MssuEywmB 7g6E34xFAG5NzIJmowFGB22YuqIRAOKgB2nDEthx6EFSjxqYamgcEERGApRlBsYDMgpzKInK zONE3hh/FzidcUODYiZgQNghvwGJsHMoNy15GDbzkgyEgWZodom5XY0BxVBzAAezvoQpUIp9 aSQpCKLIMAiCxVCfBJUk0rTBCJPuVCgTvf/4u5IpwoSHPUzd8A== --------------090204010909070107040501-- From jgarzik@pobox.com Thu Oct 28 12:07:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 12:07:15 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SJ79t4013800 for ; Thu, 28 Oct 2004 12:07:10 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CNFbo-00042U-IY; Thu, 28 Oct 2004 20:06:52 +0100 Message-ID: <4181433D.7060101@pobox.com> Date: Thu, 28 Oct 2004 15:06:37 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ravinandan.arakali@s2io.com CC: "'Francois Romieu'" , netdev@oss.sgi.com, leonid.grossman@s2io.com, raghavendra.koushik@s2io.com, rapuru.sriram@s2io.com, alicia.pena@s2io.com Subject: Re: [PATCH 2.6.9-rc2 1/12] S2io: cosmetic changes References: <000d01c4bd1c$a8ef5e50$9810100a@S2IOtech.com> <41813EEC.5040703@pobox.com> In-Reply-To: <41813EEC.5040703@pobox.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11005 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 Jeff Garzik wrote: > Can you please re-diff and re-send patches #3 - #12 ? BTW, when you re-send, don't forget to format your emails just like you did today -- including description, signed-off-by line, etc. Thanks, Jeff From davem@davemloft.net Thu Oct 28 12:35:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 12:35:16 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SJZ9a7017754 for ; Thu, 28 Oct 2004 12:35:10 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CNFuo-0007mQ-00; Thu, 28 Oct 2004 12:26:30 -0700 Date: Thu, 28 Oct 2004 12:26:30 -0700 From: "David S. Miller" To: Wensong Zhang Cc: netdev@oss.sgi.com Subject: Re: [PATCH] Update IPVS version number Message-Id: <20041028122630.4feeab54.davem@davemloft.net> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11006 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev On Fri, 29 Oct 2004 00:21:27 +0800 (CST) Wensong Zhang wrote: > Since there are some fixes in the IPVS code, it's good to update its > version number. Please help apply the version number patch to kernel 2.6 > and 2.4 respectively. Applied, thanks Wensong From ganesh.venkatesan@intel.com Thu Oct 28 14:08:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 14:08:42 -0700 (PDT) Received: from hermes.jf.intel.com (fmr05.intel.com [134.134.136.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SL8bdj020172 for ; Thu, 28 Oct 2004 14:08:37 -0700 Received: from talaria.jf.intel.com (talaria.jf.intel.com [10.7.209.7]) by hermes.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9SLCAkZ025199; Thu, 28 Oct 2004 21:12:10 GMT Received: from orsmsxvs040.jf.intel.com (orsmsxvs040.jf.intel.com [192.168.65.206]) by talaria.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9SL1La2012076; Thu, 28 Oct 2004 21:01:22 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by orsmsxvs040.jf.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004102814080606766 ; Thu, 28 Oct 2004 14:08:06 -0700 Date: Thu, 28 Oct 2004 14:08:06 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: e1000 compilation broken in 2.6.10-rc1 Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 11007 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Jeff: e1000/e1000_param.c needs the change below in order to compile correctly in 2.6.10-rc1 and beyond. --- /netdev-2.6/drivers/net/e1000/e1000_param.c 2004-10-28 13:41:22.972953056 -0700 +++ /netdev-2.6.new/drivers/net/e1000/e1000_param.c 2004-10-28 13:41:03.361934384 -0700 @@ -47,7 +47,7 @@ #define E1000_PARAM(X, desc) \ static int __devinitdata X[E1000_MAX_NIC+1] = E1000_PARAM_INIT; \ static int num_##X = 0; \ - module_param_array(X, int, num_##X, 0); \ + module_param_array(X, int, &num_##X, 0); \ MODULE_PARM_DESC(X, desc); /* Transmit Descriptor Count thanks, ganesh. From ravinandan.arakali@s2io.com Thu Oct 28 14:53:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 14:53:42 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SLrYFH021355 for ; Thu, 28 Oct 2004 14:53:35 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SLr0je010261; Thu, 28 Oct 2004 17:53:00 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SLqu39026697; Thu, 28 Oct 2004 17:52:57 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" Cc: "'Francois Romieu'" , , , , , Subject: RE: [PATCH 2.6.9-rc2 1/12] S2io: cosmetic changes Date: Thu, 28 Oct 2004 15:01:57 -0700 Message-ID: <003b01c4bd39$becb5a40$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: <41813EEC.5040703@pobox.com> Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 11008 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Jeff, Looks like while copy-pasting the patch from the server into the mail client, it got messed up. After following a slightly different procedure of ftp from server, copy-paste from notepad, it seems to be fine. Also, the earlier patch2 too seems to apply with some hunks. So, I will resend all the 12 patches with this new copy-paste method. Is this okay with you ? Thanks, Ravi -----Original Message----- From: Jeff Garzik [mailto:jgarzik@pobox.com] Sent: Thursday, October 28, 2004 11:48 AM To: ravinandan.arakali@s2io.com Cc: 'Francois Romieu'; netdev@oss.sgi.com; leonid.grossman@s2io.com; raghavendra.koushik@s2io.com; rapuru.sriram@s2io.com; alicia.pena@s2io.com Subject: Re: [PATCH 2.6.9-rc2 1/12] S2io: cosmetic changes OK, patches pass review, but now we have a technical problem. I started to apply your patches, but only #1 and #2 applied successfully with the patch(1) tool. All the other patches generated rejections. I have attached my tree, which is 2.6.8 + patch-2.6.9-rc2 + s2io-2.6.9-rc2.patch s2io-2.6.9-rc2.patch is attached, which is what I have applied so far (your #1 and #2). Can you please re-diff and re-send patches #3 - #12 ? Everything else (patch content, email format, etc.) looked great. Regards, Jeff From jdmason@us.ibm.com Thu Oct 28 15:01:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 15:01:36 -0700 (PDT) Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.131]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SM1Vfr021900 for ; Thu, 28 Oct 2004 15:01:32 -0700 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e33.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id i9SM0w1p634970 for ; Thu, 28 Oct 2004 18:00:58 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i9SM0vQU201338 for ; Thu, 28 Oct 2004 16:00:57 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id i9SM0qBZ011882 for ; Thu, 28 Oct 2004 16:00:53 -0600 Received: from dreadnought.austin.ibm.com (dreadnought.austin.ibm.com [9.41.94.123]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id i9SM0nfP011327; Thu, 28 Oct 2004 16:00:49 -0600 From: Jon Mason Organization: IBM To: Francois Romieu Subject: [PATCH] r8169 tx checksuming on by default Date: Thu, 28 Oct 2004 17:00:46 -0500 User-Agent: KMail/1.6.2 Cc: "'netdev@oss.sgi.com'" References: <41802CA8.8070900@candelatech.com> <20041028074827.GA3572@electric-eye.fr.zoreil.com> In-Reply-To: <20041028074827.GA3572@electric-eye.fr.zoreil.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200410281700.46839.jdmason@us.ibm.com> X-archive-position: 11009 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jdmason@us.ibm.com Precedence: bulk X-list: netdev The tx checksumming and scatter-gather in r8169 runs well. Below is a trivial patch to turn them on by default. --- r8169.c.orig 2004-10-28 15:02:07.000000000 -0500 +++ r8169.c 2004-10-28 15:21:03.000000000 -0500 @@ -1337,6 +1337,8 @@ rtl8169_init_one(struct pci_dev *pdev, c dev->poll_controller = rtl8169_netpoll; #endif + dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG; + tp->intr_mask = 0xffff; tp->pci_dev = pdev; tp->mmio_addr = ioaddr; -- Jon Mason jdmason@us.ibm.com From bunk@stusta.de Thu Oct 28 15:11:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 15:11:48 -0700 (PDT) Received: from mailout.stusta.mhn.de (mailout.stusta.mhn.de [141.84.69.5]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9SMBdtS022395 for ; Thu, 28 Oct 2004 15:11:40 -0700 Received: (qmail 1574 invoked from network); 28 Oct 2004 22:11:17 -0000 Received: from r063144.stusta.swh.mhn.de (10.150.63.144) by mailhub.stusta.mhn.de with SMTP; 28 Oct 2004 22:11:17 -0000 Received: by r063144.stusta.swh.mhn.de (Postfix, from userid 1000) id 85A05AF825; Fri, 29 Oct 2004 00:10:46 +0200 (CEST) Date: Fri, 29 Oct 2004 00:10:46 +0200 From: Adrian Bunk To: acme@conectiva.com.br Cc: davem@davemloft.net, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: [2.6 patch] appletalk: remove an unused function Message-ID: <20041028221046.GI3207@stusta.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; x-action=pgp-signed Content-Disposition: inline User-Agent: Mutt/1.5.6+20040907i X-archive-position: 11010 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@stusta.de Precedence: bulk X-list: netdev -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The patch below removes an unsed function from net/appletalk/ddp.c diffstat output: net/appletalk/ddp.c | 7 ------- 1 files changed, 7 deletions(-) Signed-off-by: Adrian Bunk - --- linux-2.6.10-rc1-mm1-full/net/appletalk/ddp.c.old 2004-10-28 23:49:44.000000000 +0200 +++ linux-2.6.10-rc1-mm1-full/net/appletalk/ddp.c 2004-10-28 23:49:57.000000000 +0200 @@ -78,13 +78,6 @@ sk_add_node(sk, &atalk_sockets); } - -static inline void atalk_insert_socket(struct sock *sk) - -{ - - write_lock_bh(&atalk_sockets_lock); - - __atalk_insert_socket(sk); - - write_unlock_bh(&atalk_sockets_lock); - -} - - static inline void atalk_remove_socket(struct sock *sk) { write_lock_bh(&atalk_sockets_lock); -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQFBgW5mmfzqmE8StAARAvaMAJ94zqUtcUYZKMtwHKnTtKof9ew9pACeJIoT d7KwwwKipvnGxnCmnwf8U0E= =xXRj -----END PGP SIGNATURE----- From bunk@stusta.de Thu Oct 28 15:23:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 15:23:35 -0700 (PDT) Received: from mailout.stusta.mhn.de (emailhub.stusta.mhn.de [141.84.69.5]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9SMNUiN022958 for ; Thu, 28 Oct 2004 15:23:31 -0700 Received: (qmail 2599 invoked from network); 28 Oct 2004 22:23:09 -0000 Received: from r063144.stusta.swh.mhn.de (10.150.63.144) by mailhub.stusta.mhn.de with SMTP; 28 Oct 2004 22:23:09 -0000 Received: by r063144.stusta.swh.mhn.de (Postfix, from userid 1000) id 6843CAF825; Fri, 29 Oct 2004 00:22:38 +0200 (CEST) Date: Fri, 29 Oct 2004 00:22:38 +0200 From: Adrian Bunk To: Dag Brattli , Jean Tourrilhes Cc: irda-users@lists.sourceforge.net, davem@davemloft.net, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: [2.6 patch] irda/qos.c: remove an unused function Message-ID: <20041028222238.GP3207@stusta.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; x-action=pgp-signed Content-Disposition: inline User-Agent: Mutt/1.5.6+20040907i X-archive-position: 11011 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@stusta.de Precedence: bulk X-list: netdev -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The patch below removes an unused function from net/irda/qos.c diffstat output: net/irda/qos.c | 11 ----------- 1 files changed, 11 deletions(-) Signed-off-by: Adrian Bunk - --- linux-2.6.10-rc1-mm1-full/net/irda/qos.c.old 2004-10-28 23:51:59.000000000 +0200 +++ linux-2.6.10-rc1-mm1-full/net/irda/qos.c 2004-10-28 23:52:08.000000000 +0200 @@ -211,17 +211,6 @@ return index; } - -static inline __u32 byte_value(__u8 byte, __u32 *array) - -{ - - int index; - - - - ASSERT(array != NULL, return -1;); - - - - index = msb_index(byte); - - - - return index_value(index, array); - -} - - /* * Function value_lower_bits (value, array) * -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQFBgXEumfzqmE8StAARAjtAAJwJtfTHsEupGVZWHqUG1L8ddNXQfACglX+r SKDqqr8fPgPtMjBBkhIwkx8= =zwcY -----END PGP SIGNATURE----- From romieu@fr.zoreil.com Thu Oct 28 15:39:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 15:39:13 -0700 (PDT) Received: from fr.zoreil.com (electric-eye.fr.zoreil.com [213.41.134.224]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SMd5E2023558 for ; Thu, 28 Oct 2004 15:39:06 -0700 Received: from electric-eye.fr.zoreil.com (localhost.localdomain [127.0.0.1]) by fr.zoreil.com (8.12.10/8.12.1) with ESMTP id i9SMbtvr022323; Fri, 29 Oct 2004 00:37:55 +0200 Received: (from romieu@localhost) by electric-eye.fr.zoreil.com (8.12.10/8.12.10/Submit) id i9SMbsuK022322; Fri, 29 Oct 2004 00:37:54 +0200 Date: Fri, 29 Oct 2004 00:37:54 +0200 From: Francois Romieu To: Ben Greear Cc: "'netdev@oss.sgi.com'" Subject: Re: 8169 driver with NetGear GA511 card. Message-ID: <20041028223754.GA20521@electric-eye.fr.zoreil.com> References: <41802CA8.8070900@candelatech.com> <20041028074827.GA3572@electric-eye.fr.zoreil.com> <418130C4.3010207@candelatech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <418130C4.3010207@candelatech.com> User-Agent: Mutt/1.4.1i X-Organisation: Land of Sunshine Inc. X-archive-position: 11012 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 Ben Greear : [...] > I'm running tests at the ethernet frame (skb) level, so I would not > expect the IP offload to help much. > > Do you have any performance numbers for your 8169 cards for me to > compare against? Gross numbers: - with a receiving amd64, nttcp should saturate the GigaE link; - halved bandwidth for Tx on the same setup. Untested since changes in -mm; - 10% cpu on a 100bt link; - TSO saves 5~7% of the cpu when it can be used. saturated - old host system (PII class): on 100bt, napi chews 4x10kpps (icmp) without significant load. [...] > I'll get this in a bit, as I have locked up the keyboard again. This time, > I was still using the non-NAPI code which had run over-night at around > 5Mbps... > > I tried a different network setup, and noticed that the 8169 was only > negotiating 10bt/HD. That would explain the poor performance numbers. Call me dense but... Are the 5Mbps below in the same unit as the 30Mbps in your previous message (are they bytes or bits) ? If yes something is badly broken. -- Ueimor From ravinandan.arakali@s2io.com Thu Oct 28 15:41:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 15:42:01 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SMfkCd023921 for ; Thu, 28 Oct 2004 15:41:47 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SMfIje010671; Thu, 28 Oct 2004 18:41:18 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SMfF39005767; Thu, 28 Oct 2004 18:41:16 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , , Subject: [PATCH 2.6.9-rc2 2/12] S2io: sw bug fixes Date: Thu, 28 Oct 2004 15:50:08 -0700 Message-ID: <003d01c4bd40$7edce960$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 11013 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Hi, Attached is the second patch in this submission. It contains the following software bug fixes. 1. In free_rx_buffers clearing out RxDs not owned by Xena. 2. In alarm_intr_handler, when a serr error occurs, schedule a task to reset the card rather than stopping Tx queue. 3. In s2io_close freeing IRQ before calling s2io_reset also added a new call to flush queued tasks. This is not done if the s2io_close itself is called from a queued task like s2io_restart_nic. 4. read_eeprom function has been changed such that data to be returned is sent as an input argument and the return value represents a pass/fail. The previous implementation as Randy had pointed out was error prone as on failure it returned -1 which can be interpreted as all ff's, so any data area which contained ff's in the eeprom was likely to be treated as an error. 5. Added a flag "task_flag" to track if the call to s2io_close is coming from the s2io_restart_nic function or from the ifconfig down called by user. 6. Moved register_netdev call from just after setting entry points to the end of the s2io_init_nic function. 7. In s2io.h field added a new member into the s2io_nic structure called "task_flag". Signed-off-by: Raghavendra Koushik Signed-off-by: Ravinandan Arakali --- diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-06 15:18:10.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-06 16:19:52.821420504 -0700 @@ -1525,6 +1525,11 @@ blk++; } + if (!(rxdp->Control_1 & RXD_OWN_XENA)) { + memset(rxdp, 0, sizeof(RxD_t)); + continue; + } + skb = (struct sk_buff *) ((unsigned long) rxdp-> Host_Control); @@ -1887,7 +1892,7 @@ if (val64 & SERR_SOURCE_ANY) { DBG_PRINT(ERR_DBG, "%s: Device indicates ", dev->name); DBG_PRINT(ERR_DBG, "serious error!!\n"); - netif_stop_queue(dev); + schedule_work(&nic->rst_timer_task); } /* Other type of interrupts are not being handled now, TODO */ @@ -2205,6 +2210,17 @@ } tasklet_kill(&sp->task); + /* Free the Registered IRQ */ + free_irq(dev->irq, dev); + + /* Flush all scheduled tasks */ + if (sp->task_flag == 1) { + DBG_PRINT(INFO_DBG, "%s: Calling close from a task\n", + dev->name); + } else { + flush_scheduled_work(); + } + /* Check if the device is Quiescent and then Reset the NIC */ do { val64 = readq(&bar0->adapter_status); @@ -2225,9 +2241,6 @@ } while (1); s2io_reset(sp); - /* Free the Registered IRQ */ - free_irq(dev->irq, dev); - /* Free all Tx Buffers waiting for transmission */ free_tx_buffers(sp); @@ -2982,9 +2995,10 @@ */ #define S2IO_DEV_ID 5 -static u32 read_eeprom(nic_t * sp, int off) +static int read_eeprom(nic_t * sp, int off, u32 * data) { - u32 data = -1, exit_cnt = 0; + int ret = -1; + u32 exit_cnt = 0; u64 val64; XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; @@ -2996,7 +3010,8 @@ while (exit_cnt < 5) { val64 = readq(&bar0->i2c_control); if (I2C_CONTROL_CNTL_END(val64)) { - data = I2C_CONTROL_GET_DATA(val64); + *data = I2C_CONTROL_GET_DATA(val64); + ret = 0; break; } set_current_state(TASK_UNINTERRUPTIBLE); @@ -3004,7 +3019,7 @@ exit_cnt++; } - return data; + return ret; } /** @@ -3073,8 +3088,7 @@ eeprom->len = XENA_EEPROM_SPACE - eeprom->offset; for (i = 0; i < eeprom->len; i += 4) { - data = read_eeprom(sp, eeprom->offset + i); - if (data < 0) { + if (read_eeprom(sp, (eeprom->offset + i), &data)) { DBG_PRINT(ERR_DBG, "Read of EEPROM failed\n"); return -EFAULT; } @@ -3213,7 +3227,8 @@ static int s2io_eeprom_test(nic_t * sp, uint64_t * data) { - int fail = 0, ret_data; + int fail = 0; + u32 ret_data; /* Test Write Error at offset 0 */ if (!write_eeprom(sp, 0, 0, 3)) @@ -3222,7 +3237,7 @@ /* Test Write at offset 4f0 */ if (write_eeprom(sp, 0x4F0, 0x01234567, 3)) fail = 1; - if ((ret_data = read_eeprom(sp, 0x4F0)) < 0) + if (read_eeprom(sp, 0x4F0, &ret_data)) fail = 1; if (ret_data != 0x01234567) @@ -3238,7 +3253,7 @@ /* Test Write Request at offset 0x7fc */ if (write_eeprom(sp, 0x7FC, 0x01234567, 3)) fail = 1; - if ((ret_data = read_eeprom(sp, 0x7FC)) < 0) + if (read_eeprom(sp, 0x7FC, &ret_data)) fail = 1; if (ret_data != 0x01234567) @@ -3811,7 +3826,9 @@ struct net_device *dev = (struct net_device *) data; nic_t *sp = dev->priv; + sp->task_flag = 1; s2io_close(dev); + sp->task_flag = 0; sp->device_close_flag = TRUE; s2io_open(dev); DBG_PRINT(ERR_DBG, @@ -4275,18 +4292,13 @@ INIT_WORK(&sp->set_link_task, (void (*)(void *)) s2io_set_link, sp); - if (register_netdev(dev)) { - DBG_PRINT(ERR_DBG, "Device registration failed\n"); - goto register_failed; - } - pci_save_state(sp->pdev, sp->config_space); /* Setting swapper control on the NIC, for proper reset operation */ if (s2io_set_swapper(sp)) { DBG_PRINT(ERR_DBG, "%s:swapper settings are wrong\n", dev->name); - goto register_failed; + goto set_swap_failed; } /* Fix for all "FFs" MAC address problems observed on Alpha platforms */ @@ -4363,6 +4375,11 @@ sp->rx_csum = 1; /* Rx chksum verify enabled by default */ + if (register_netdev(dev)) { + DBG_PRINT(ERR_DBG, "Device registration failed\n"); + goto register_failed; + } + /* * Make Link state as off at this point, when the Link change * interrupt comes the state will be automatically changed to @@ -4373,9 +4390,8 @@ return 0; - set_swap_failed: - unregister_netdev(dev); register_failed: + set_swap_failed: iounmap(sp->bar1); bar1_remap_failed: iounmap(sp->bar0); diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-06 15:15:03.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-06 16:19:52.829419288 -0700 @@ -668,6 +668,8 @@ u16 last_link_state; #define LINK_DOWN 1 #define LINK_UP 2 + + int task_flag; } nic_t; #define RESET_ERROR 1; From ravinandan.arakali@s2io.com Thu Oct 28 15:42:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 15:42:07 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SMfxiK023940 for ; Thu, 28 Oct 2004 15:42:00 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SMfVje010674; Thu, 28 Oct 2004 18:41:31 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SMfO39005795; Thu, 28 Oct 2004 18:41:25 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , , Subject: [PATCH 2.6.9-rc2 3/12] S2io: optimizations Date: Thu, 28 Oct 2004 15:50:16 -0700 Message-ID: <003e01c4bd40$84605980$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 11015 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Hi, Following are the optimization-related changes made in this patch. 1. Definitions of LOW and PANIC levels of the Rx buffers have changed. 2. In wait_for_cmd_complete there is no longer a writeq but just a read and wait for strobe bit to reset. 3. In s2io_isr, the isr_lock has been done away with also the NICs interrupt are no longer disabled explicitly on entering the interrupt handler and re-enabled again before leaving it. 4. Also clearing the semaphore "tasklet_status" when exiting erroneously from s2io_isr after failing fill_rx_buffer call. 5. The set/reset Tx Csum function through ethtool was added to the ethtool_ops structure. 6. Added a Rx side error code in the rx_osm_handler function. 7. No longer stopping and waking Tx queue when link state changes in s2io_link function. 8. removed the isr_lock spinlock from the s2io_nic structure. 9. changed parameters which determine thresholds(LOW and PANIC) to replenish Rx buffers. This has been found to result in better performance. Signed-off-by: Raghavendra Koushik Signed-off-by: Ravinandan Arakali --- diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-06 17:24:02.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-06 17:37:32.751003528 -0700 @@ -80,10 +80,11 @@ static inline int rx_buffer_level(nic_t * sp, int rxb_size, int ring) { int level = 0; - if ((sp->pkt_cnt[ring] - rxb_size) > 128) { + if ((sp->pkt_cnt[ring] - rxb_size) > 16) { level = LOW; - if (rxb_size < sp->pkt_cnt[ring] / 8) + if ((sp->pkt_cnt[ring] - rxb_size) < MAX_RXDS_PER_BLOCK) { level = PANIC; + } } return level; @@ -1916,12 +1917,8 @@ u64 val64; while (TRUE) { - val64 = - RMAC_ADDR_CMD_MEM_RD | RMAC_ADDR_CMD_MEM_STROBE_NEW_CMD - | RMAC_ADDR_CMD_MEM_OFFSET(0); - writeq(val64, &bar0->rmac_addr_cmd_mem); val64 = readq(&bar0->rmac_addr_cmd_mem); - if (!val64) { + if (!(val64 & RMAC_ADDR_CMD_MEM_STROBE_CMD_EXECUTING)) { ret = SUCCESS; break; } @@ -2192,14 +2189,11 @@ register u64 val64 = 0; u16 cnt = 0; - spin_lock(&sp->isr_lock); netif_stop_queue(dev); /* disable Tx and Rx traffic on the NIC */ stop_nic(sp); - spin_unlock(&sp->isr_lock); - /* * If the device tasklet is running, wait till its done * before killing it @@ -2398,15 +2392,13 @@ struct net_device *dev = (struct net_device *) dev_id; nic_t *sp = dev->priv; XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; - u64 reason = 0, general_mask = 0; + u64 reason = 0; mac_info_t *mac_control; struct config_param *config; mac_control = &sp->mac_control; config = &sp->config; - spin_lock(&sp->isr_lock); - /* * Identify the cause for interrupt and call the appropriate * interrupt handler. Causes for the interrupt could be; @@ -2419,14 +2411,9 @@ if (!reason) { /* The interrupt was not raised by Xena. */ - spin_unlock(&sp->isr_lock); return IRQ_NONE; } - /* Mask the Interrupts on the NIC. */ - general_mask = readq(&bar0->general_int_mask); - writeq(0xFFFFFFFFFFFFFFFFULL, &bar0->general_int_mask); - /* If Intr is because of Tx Traffic */ if (reason & GEN_INTR_TXTRAFFIC) { tx_intr_handler(sp); @@ -2441,11 +2428,6 @@ if (netif_rx_schedule_prep(dev)) { en_dis_able_nic_intrs(sp, RX_TRAFFIC_INTR, DISABLE_INTRS); - /* - * Here we take a snap shot of the general - * Intr Register. - */ - general_mask = readq(&bar0->general_int_mask); __netif_rx_schedule(dev); } } @@ -2481,9 +2463,9 @@ "%s:Out of memory", dev->name); DBG_PRINT(ERR_DBG, " in ISR!!\n"); - writeq(general_mask, - &bar0->general_int_mask); - spin_unlock(&sp->isr_lock); + clear_bit(0, + (unsigned long *) (&sp-> + tasklet_status)); return IRQ_HANDLED; } clear_bit(0, @@ -2501,10 +2483,6 @@ tasklet_schedule(&sp->task); #endif - /* Unmask all previously enabled interrupts on the NIC. */ - writeq(general_mask, &bar0->general_int_mask); - - spin_unlock(&sp->isr_lock); return IRQ_HANDLED; } @@ -3626,6 +3604,17 @@ return (S2IO_STAT_LEN); } +int s2io_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 struct ethtool_ops netdev_ethtool_ops = { .get_settings = s2io_ethtool_gset, .set_settings = s2io_ethtool_sset, @@ -3641,7 +3630,7 @@ .get_rx_csum = s2io_ethtool_get_rx_csum, .set_rx_csum = s2io_ethtool_set_rx_csum, .get_tx_csum = ethtool_op_get_tx_csum, - .set_tx_csum = ethtool_op_set_tx_csum, + .set_tx_csum = s2io_ethtool_op_set_tx_csum, .get_sg = ethtool_op_get_sg, .set_sg = ethtool_op_set_sg, #ifdef NETIF_F_TSO @@ -3902,6 +3891,12 @@ skb->ip_summed = CHECKSUM_NONE; } + if (rxdp->Control_1 & RXD_T_CODE) { + unsigned long long err = rxdp->Control_1 & RXD_T_CODE; + DBG_PRINT(ERR_DBG, "%s: Rx error Value: 0x%llx\n", + dev->name, err); + } + skb->dev = dev; skb_put(skb, len); skb->protocol = eth_type_trans(skb, dev); @@ -3922,25 +3917,6 @@ return SUCCESS; } -int check_for_tx_space(nic_t * sp) -{ - u32 put_off, get_off, queue_len; - int ret = TRUE, i; - - for (i = 0; i < sp->config.tx_fifo_num; i++) { - queue_len = sp->mac_control.tx_curr_put_info[i].fifo_len - + 1; - put_off = sp->mac_control.tx_curr_put_info[i].offset; - get_off = sp->mac_control.tx_curr_get_info[i].offset; - if (((put_off + 1) % queue_len) == get_off) { - ret = FALSE; - break; - } - } - - return ret; -} - /** * s2io_link - stops/starts the Tx queue. * @sp : private member of the device structure, which is a pointer to the @@ -3962,17 +3938,9 @@ if (link == LINK_DOWN) { DBG_PRINT(ERR_DBG, "%s: Link down\n", dev->name); netif_carrier_off(dev); - netif_stop_queue(dev); } else { DBG_PRINT(ERR_DBG, "%s: Link Up\n", dev->name); netif_carrier_on(dev); - if (check_for_tx_space(sp) == TRUE) { - /* - * Dont wake the queue if we know there - * are no free TxDs available. - */ - netif_wake_queue(dev); - } } } sp->last_link_state = link; @@ -4357,7 +4325,6 @@ /* Initialize spinlocks */ spin_lock_init(&sp->tx_lock); - spin_lock_init(&sp->isr_lock); /* * SXE-002: Configure link and activity LED to init state diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-06 17:24:05.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-06 17:37:47.532756360 -0700 @@ -612,7 +612,6 @@ atomic_t rx_bufs_left[MAX_RX_RINGS]; spinlock_t tx_lock; - spinlock_t isr_lock; #define PROMISC 1 #define ALL_MULTI 2 From ravinandan.arakali@s2io.com Thu Oct 28 15:41:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 15:42:03 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SMfjt1023920 for ; Thu, 28 Oct 2004 15:41:46 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SMf9je010668; Thu, 28 Oct 2004 18:41:09 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SMf039005706; Thu, 28 Oct 2004 18:41:01 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , , Subject: [PATCH 2.6.9-rc2 1/12] S2io: cosmetic changes Date: Thu, 28 Oct 2004 15:50:02 -0700 Message-ID: <003c01c4bd40$76171f80$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 11014 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Hi All, This is the first patch in the 12 part series. As requested earlier, I am resending the first 8 patches which were reviewed earlier. The patches 9 to 12 incorporate comments received on the first 8 patches. This first patch contains mostly cosmetic changes and few other changes. Following is the complete list of changes. 1. Indentation, change in comment styles, variable name changes etc. 2. Changed the value written to dtx_control register to force XGXS reset. 3. weight parameter(NAPI) changed to 90 for better performance. Signed-off-by: Raghavendra Koushik Signed-off-by: Ravinandan Arakali --- diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-06 11:31:09.552305224 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-06 13:03:08.087360376 -0700 @@ -69,7 +69,7 @@ /* S2io Driver name & version. */ static char s2io_driver_name[] = "s2io"; -static char s2io_driver_version[] = "Version 1.0"; +static char s2io_driver_version[] = "Version 1.7.5.1"; #define LINK_IS_UP(val64) (!(val64 & (ADAPTER_STATUS_RMAC_REMOTE_FAULT | \ ADAPTER_STATUS_RMAC_LOCAL_FAULT))) @@ -99,45 +99,45 @@ }; static char ethtool_stats_keys[][ETH_GSTRING_LEN] = { - "tmac_frms", - "tmac_data_octets", - "tmac_drop_frms", - "tmac_mcst_frms", - "tmac_bcst_frms", - "tmac_pause_ctrl_frms", - "tmac_any_err_frms", - "tmac_vld_ip_octets", - "tmac_vld_ip", - "tmac_drop_ip", - "tmac_icmp", - "tmac_rst_tcp", - "tmac_tcp", - "tmac_udp", - "rmac_vld_frms", - "rmac_data_octets", - "rmac_fcs_err_frms", - "rmac_drop_frms", - "rmac_vld_mcst_frms", - "rmac_vld_bcst_frms", - "rmac_in_rng_len_err_frms", - "rmac_long_frms", - "rmac_pause_ctrl_frms", - "rmac_discarded_frms", - "rmac_usized_frms", - "rmac_osized_frms", - "rmac_frag_frms", - "rmac_jabber_frms", - "rmac_ip", - "rmac_ip_octets", - "rmac_hdr_err_ip", - "rmac_drop_ip", - "rmac_icmp", - "rmac_tcp", - "rmac_udp", - "rmac_err_drp_udp", - "rmac_pause_cnt", - "rmac_accepted_ip", - "rmac_err_tcp", + {"tmac_frms"}, + {"tmac_data_octets"}, + {"tmac_drop_frms"}, + {"tmac_mcst_frms"}, + {"tmac_bcst_frms"}, + {"tmac_pause_ctrl_frms"}, + {"tmac_any_err_frms"}, + {"tmac_vld_ip_octets"}, + {"tmac_vld_ip"}, + {"tmac_drop_ip"}, + {"tmac_icmp"}, + {"tmac_rst_tcp"}, + {"tmac_tcp"}, + {"tmac_udp"}, + {"rmac_vld_frms"}, + {"rmac_data_octets"}, + {"rmac_fcs_err_frms"}, + {"rmac_drop_frms"}, + {"rmac_vld_mcst_frms"}, + {"rmac_vld_bcst_frms"}, + {"rmac_in_rng_len_err_frms"}, + {"rmac_long_frms"}, + {"rmac_pause_ctrl_frms"}, + {"rmac_discarded_frms"}, + {"rmac_usized_frms"}, + {"rmac_osized_frms"}, + {"rmac_frag_frms"}, + {"rmac_jabber_frms"}, + {"rmac_ip"}, + {"rmac_ip_octets"}, + {"rmac_hdr_err_ip"}, + {"rmac_drop_ip"}, + {"rmac_icmp"}, + {"rmac_tcp"}, + {"rmac_udp"}, + {"rmac_err_drp_udp"}, + {"rmac_pause_cnt"}, + {"rmac_accepted_ip"}, + {"rmac_err_tcp"}, }; #define S2IO_STAT_LEN sizeof(ethtool_stats_keys)/ ETH_GSTRING_LEN @@ -147,7 +147,8 @@ #define S2IO_STRINGS_LEN S2IO_TEST_LEN * ETH_GSTRING_LEN -/* Constants to be programmed into the Xena's registers to configure +/* + * Constants to be programmed into the Xena's registers, to configure * the XAUI. */ @@ -188,7 +189,9 @@ END_SIGN }; -/* Constants for Fixing the MacAddress problem seen mostly on + +/* + * Constants for Fixing the MacAddress problem seen mostly on * Alpha machines. */ static u64 fix_mac[] = { @@ -209,7 +212,6 @@ END_SIGN }; - /* Module Loadable parameters. */ static u32 ring_num; static u32 frame_len[MAX_RX_RINGS]; @@ -218,7 +220,7 @@ static u32 fifo_len[MAX_TX_FIFOS]; static u32 rx_prio; static u32 tx_prio; -static u8 latency_timer = 0; +static u8 latency_timer; /* * S2IO device table. @@ -241,17 +243,15 @@ remove:__devexit_p(s2io_rem_nic), }; -/* - * Input Arguments: - * Device private variable. - * Return Value: - * SUCCESS on success and an appropriate -ve value on failure. - * Description: - * The function allocates the all memory areas shared - * between the NIC and the driver. This includes Tx descriptors, - * Rx descriptors and the statistics block. +/** + * init_shared_mem - Allocation and Initialization of Memory + * @nic: Device private variable. + * Description: The function allocates all the memory areas shared + * between the NIC and the driver. This includes Tx descriptors, + * Rx descriptors and the statistics block. */ -static int initSharedMem(struct s2io_nic *nic) + +static int init_shared_mem(struct s2io_nic *nic) { u32 size; void *tmp_v_addr, *tmp_v_addr_next; @@ -269,8 +269,8 @@ /* Allocation and initialization of TXDLs in FIOFs */ size = 0; - for (i = 0; i < config->TxFIFONum; i++) { - size += config->TxCfg[i].FifoLen; + for (i = 0; i < config->tx_fifo_num; i++) { + size += config->tx_cfg[i].fifo_len; } if (size > MAX_AVAILABLE_TXDS) { DBG_PRINT(ERR_DBG, "%s: Total number of Tx FIFOs ", @@ -279,7 +279,7 @@ DBG_PRINT(ERR_DBG, "that can be used\n"); return FAILURE; } - size *= (sizeof(TxD_t) * config->MaxTxDs); + size *= (sizeof(TxD_t) * config->max_txds); mac_control->txd_list_mem = pci_alloc_consistent (nic->pdev, size, &mac_control->txd_list_mem_phy); @@ -295,61 +295,60 @@ DBG_PRINT(INIT_DBG, "%s:List Mem PHY: 0x%llx\n", dev->name, (unsigned long long) tmp_p_addr); - for (i = 0; i < config->TxFIFONum; i++) { + for (i = 0; i < config->tx_fifo_num; i++) { mac_control->txdl_start_phy[i] = tmp_p_addr; mac_control->txdl_start[i] = (TxD_t *) tmp_v_addr; mac_control->tx_curr_put_info[i].offset = 0; mac_control->tx_curr_put_info[i].fifo_len = - config->TxCfg[i].FifoLen - 1; + config->tx_cfg[i].fifo_len - 1; mac_control->tx_curr_get_info[i].offset = 0; mac_control->tx_curr_get_info[i].fifo_len = - config->TxCfg[i].FifoLen - 1; + config->tx_cfg[i].fifo_len - 1; tmp_p_addr += - (config->TxCfg[i].FifoLen * (sizeof(TxD_t)) * - config->MaxTxDs); + (config->tx_cfg[i].fifo_len * (sizeof(TxD_t)) * + config->max_txds); tmp_v_addr += - (config->TxCfg[i].FifoLen * (sizeof(TxD_t)) * - config->MaxTxDs); + (config->tx_cfg[i].fifo_len * (sizeof(TxD_t)) * + config->max_txds); } /* Allocation and initialization of RXDs in Rings */ size = 0; - for (i = 0; i < config->RxRingNum; i++) { - if (config->RxCfg[i].NumRxd % (MAX_RXDS_PER_BLOCK + 1)) { + for (i = 0; i < config->rx_ring_num; i++) { + if (config->rx_cfg[i].num_rxd % (MAX_RXDS_PER_BLOCK + 1)) { DBG_PRINT(ERR_DBG, "%s: RxD count of ", dev->name); DBG_PRINT(ERR_DBG, "Ring%d is not a multiple of ", i); DBG_PRINT(ERR_DBG, "RxDs per Block"); return FAILURE; } - size += config->RxCfg[i].NumRxd; + size += config->rx_cfg[i].num_rxd; nic->block_count[i] = - config->RxCfg[i].NumRxd / (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1); nic->pkt_cnt[i] = - config->RxCfg[i].NumRxd - nic->block_count[i]; + config->rx_cfg[i].num_rxd - nic->block_count[i]; } - size = (size * (sizeof(RxD_t))); - mac_control->rxd_ring_mem_sz = size; - for (i = 0; i < config->RxRingNum; i++) { + for (i = 0; i < config->rx_ring_num; i++) { mac_control->rx_curr_get_info[i].block_index = 0; mac_control->rx_curr_get_info[i].offset = 0; mac_control->rx_curr_get_info[i].ring_len = - config->RxCfg[i].NumRxd - 1; + config->rx_cfg[i].num_rxd - 1; mac_control->rx_curr_put_info[i].block_index = 0; mac_control->rx_curr_put_info[i].offset = 0; mac_control->rx_curr_put_info[i].ring_len = - config->RxCfg[i].NumRxd - 1; + config->rx_cfg[i].num_rxd - 1; blk_cnt = - config->RxCfg[i].NumRxd / (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1); /* Allocating all the Rx blocks */ for (j = 0; j < blk_cnt; j++) { size = (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t)); tmp_v_addr = pci_alloc_consistent(nic->pdev, size, &tmp_p_addr); if (tmp_v_addr == NULL) { - /* In case of failure, freeSharedMem() + /* + * In case of failure, free_shared_mem() * is called, which should free any * memory that was alloced till the * failure happened. @@ -390,7 +389,8 @@ (nic->pdev, size, &mac_control->stats_mem_phy); if (!mac_control->stats_mem) { - /* In case of failure, freeSharedMem() is called, which + /* + * In case of failure, free_shared_mem() is called, which * should free any memory that was alloced till the * failure happened. */ @@ -399,7 +399,7 @@ mac_control->stats_mem_sz = size; tmp_v_addr = mac_control->stats_mem; - mac_control->StatsInfo = (StatInfo_t *) tmp_v_addr; + mac_control->stats_info = (StatInfo_t *) tmp_v_addr; memset(tmp_v_addr, 0, size); DBG_PRINT(INIT_DBG, "%s:Ring Mem PHY: 0x%llx\n", dev->name, @@ -408,16 +408,14 @@ return SUCCESS; } -/* - * Input Arguments: - * Device peivate variable. - * Return Value: - * NONE - * Description: - * This function is to free all memory locations allocated by - * the initSharedMem() function and return it to the kernel. +/** + * free_shared_mem - Free the allocated Memory + * @nic: Device private variable. + * Description: This function is to free all memory locations allocated by + * the init_shared_mem() function and return it to the kernel. */ -static void freeSharedMem(struct s2io_nic *nic) + +static void free_shared_mem(struct s2io_nic *nic) { int i, j, blk_cnt, size; void *tmp_v_addr; @@ -440,7 +438,7 @@ } size = (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t)); - for (i = 0; i < config->RxRingNum; i++) { + for (i = 0; i < config->rx_ring_num; i++) { blk_cnt = nic->block_count[i]; for (j = 0; j < blk_cnt; j++) { tmp_v_addr = nic->rx_blocks[i][j].block_virt_addr; @@ -452,6 +450,7 @@ } } + if (mac_control->stats_mem) { pci_free_consistent(nic->pdev, mac_control->stats_mem_sz, @@ -460,16 +459,16 @@ } } -/* - * Input Arguments: - * device peivate variable - * Return Value: - * SUCCESS on success and '-1' on failure (endian settings incorrect). - * Description: - * The function sequentially configures every block +/** + * init_nic - Initialization of hardware + * @nic: device peivate variable + * Description: The function sequentially configures every block * of the H/W from their reset values. + * Return Value: SUCCESS on success and + * '-1' on failure (endian settings incorrect). */ -static int initNic(struct s2io_nic *nic) + +static int init_nic(struct s2io_nic *nic) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; struct net_device *dev = nic->dev; @@ -485,11 +484,13 @@ mac_control = &nic->mac_control; config = &nic->config; - /* Set proper endian settings and verify the same by - * reading the PIF Feed-back register. + /* + * Set proper endian settings and verify the same by + * reading the PIF Feed-back register. */ #ifdef __BIG_ENDIAN - /* The device by default set to a big endian format, so + /* + * The device by default set to a big endian format, so * a big endian driver need not set anything. */ writeq(0xffffffffffffffffULL, &bar0->swapper_ctrl); @@ -510,7 +511,8 @@ SWAPPER_CTRL_STATS_FE | SWAPPER_CTRL_STATS_SE); writeq(val64, &bar0->swapper_ctrl); #else - /* Initially we enable all bits to make it accessible by + /* + * Initially we enable all bits to make it accessible by * the driver, then we selectively enable only those bits * that we want to set. */ @@ -537,8 +539,9 @@ writeq(val64, &bar0->swapper_ctrl); #endif - /* Verifying if endian settings are accurate by reading - * a feedback register. + /* + * Verifying if endian settings are accurate by + * reading a feedback register. */ val64 = readq(&bar0->pif_rd_swapper_fb); if (val64 != 0x0123456789ABCDEFULL) { @@ -573,8 +576,9 @@ val64 = dev->mtu; writeq(vBIT(val64, 2, 14), &bar0->rmac_max_pyld_len); - /* Configuring the XAUI Interface of Xena. - ***************************************** + /* + * Configuring the XAUI Interface of Xena. + * *************************************** * To Configure the Xena's XAUI, one has to write a series * of 64 bit values into two registers in a particular * sequence. Hence a macro 'SWITCH_SIGN' has been defined @@ -625,13 +629,13 @@ writeq(val64, &bar0->tx_fifo_partition_3); - for (i = 0, j = 0; i < config->TxFIFONum; i++) { + for (i = 0, j = 0; i < config->tx_fifo_num; i++) { val64 |= - vBIT(config->TxCfg[i].FifoLen - 1, ((i * 32) + 19), - 13) | vBIT(config->TxCfg[i].FifoPriority, + vBIT(config->tx_cfg[i].fifo_len - 1, ((i * 32) + 19), + 13) | vBIT(config->tx_cfg[i].fifo_priority, ((i * 32) + 5), 3); - if (i == (config->TxFIFONum - 1)) { + if (i == (config->tx_fifo_num - 1)) { if (i % 2 == 0) i++; } @@ -675,56 +679,59 @@ /* Rx DMA intialization. */ val64 = 0; - for (i = 0; i < config->RxRingNum; i++) { + for (i = 0; i < config->rx_ring_num; i++) { val64 |= - vBIT(config->RxCfg[i].RingPriority, (5 + (i * 8)), 3); + vBIT(config->rx_cfg[i].ring_priority, (5 + (i * 8)), + 3); } writeq(val64, &bar0->rx_queue_priority); - /* Allocating equal share of memory to all the configured - * Rings. + /* + * Allocating equal share of memory to all the + * configured Rings. */ val64 = 0; - for (i = 0; i < config->RxRingNum; i++) { + for (i = 0; i < config->rx_ring_num; i++) { switch (i) { case 0: - mem_share = (64 / config->RxRingNum + - 64 % config->RxRingNum); + mem_share = (64 / config->rx_ring_num + + 64 % config->rx_ring_num); val64 |= RX_QUEUE_CFG_Q0_SZ(mem_share); continue; case 1: - mem_share = (64 / config->RxRingNum); + mem_share = (64 / config->rx_ring_num); val64 |= RX_QUEUE_CFG_Q1_SZ(mem_share); continue; case 2: - mem_share = (64 / config->RxRingNum); + mem_share = (64 / config->rx_ring_num); val64 |= RX_QUEUE_CFG_Q2_SZ(mem_share); continue; case 3: - mem_share = (64 / config->RxRingNum); + mem_share = (64 / config->rx_ring_num); val64 |= RX_QUEUE_CFG_Q3_SZ(mem_share); continue; case 4: - mem_share = (64 / config->RxRingNum); + mem_share = (64 / config->rx_ring_num); val64 |= RX_QUEUE_CFG_Q4_SZ(mem_share); continue; case 5: - mem_share = (64 / config->RxRingNum); + mem_share = (64 / config->rx_ring_num); val64 |= RX_QUEUE_CFG_Q5_SZ(mem_share); continue; case 6: - mem_share = (64 / config->RxRingNum); + mem_share = (64 / config->rx_ring_num); val64 |= RX_QUEUE_CFG_Q6_SZ(mem_share); continue; case 7: - mem_share = (64 / config->RxRingNum); + mem_share = (64 / config->rx_ring_num); val64 |= RX_QUEUE_CFG_Q7_SZ(mem_share); continue; } } writeq(val64, &bar0->rx_queue_cfg); - /* Initializing the Tx round robin registers to 0. + /* + * Initializing the Tx round robin registers to 0. * Filling Tx and Rx round robin registers as per the * number of FIFOs and Rings is still TODO. */ @@ -734,13 +741,15 @@ writeq(0, &bar0->tx_w_round_robin_3); writeq(0, &bar0->tx_w_round_robin_4); - /* Disable Rx steering. Hard coding all packets be steered to + /* + * TODO + * Disable Rx steering. Hard coding all packets be steered to * Queue 0 for now. - * TODO*/ + */ if (rx_prio) { u64 def = 0x8000000000000000ULL, tmp; for (i = 0; i < MAX_RX_RINGS; i++) { - tmp = (u64) (def >> (i % config->RxRingNum)); + tmp = (u64) (def >> (i % config->rx_ring_num)); val64 |= (u64) (tmp >> (i * 8)); } writeq(val64, &bar0->rts_qos_steering); @@ -763,14 +772,16 @@ val64 = SET_UPDT_PERIOD(8) | STAT_CFG_STAT_RO | STAT_CFG_STAT_EN; writeq(val64, &bar0->stat_cfg); - /* Initializing the sampling rate for the device to calculate the + /* + * Initializing the sampling rate for the device to calculate the * bandwidth utilization. */ val64 = MAC_TX_LINK_UTIL_VAL(0x5) | MAC_RX_LINK_UTIL_VAL(0x5); writeq(val64, &bar0->mac_link_util); - /* Initializing the Transmit and Receive Traffic Interrupt + /* + * Initializing the Transmit and Receive Traffic Interrupt * Scheme. */ /* TTI Initialization */ @@ -787,7 +798,8 @@ val64 = TTI_CMD_MEM_WE | TTI_CMD_MEM_STROBE_NEW_CMD; writeq(val64, &bar0->tti_command_mem); - /* Once the operation completes, the Strobe bit of the command + /* + * Once the operation completes, the Strobe bit of the command * register will be reset. We poll for this particular condition * We wait for a maximum of 500ms for the operation to complete, * if it's not complete by then we return error. @@ -821,7 +833,8 @@ val64 = RTI_CMD_MEM_WE | RTI_CMD_MEM_STROBE_NEW_CMD; writeq(val64, &bar0->rti_command_mem); - /* Once the operation completes, the Strobe bit of the command + /* + * Once the operation completes, the Strobe bit of the command * register will be reset. We poll for this particular condition * We wait for a maximum of 500ms for the operation to complete, * if it's not complete by then we return error. @@ -842,7 +855,8 @@ schedule_timeout(HZ / 20); } - /* Initializing proper values as Pause threshold into all + /* + * Initializing proper values as Pause threshold into all * the 8 Queues on Rx side. */ writeq(0xffbbffbbffbbffbbULL, &bar0->mc_pause_thresh_q0q3); @@ -861,19 +875,18 @@ return SUCCESS; } -/* - * Input Arguments: - * device private variable, - * A mask indicating which Intr block must be modified and, - * A flag indicating whether to enable or disable the Intrs. - * Return Value: - * NONE. - * Description: - * This function will either disable or enable the interrupts +/** + * en_dis_able_nic_intrs - Enable or Disable the interrupts + * @nic: device private variable, + * @mask: A mask indicating which Intr block must be modified and, + * @flag: A flag indicating whether to enable or disable the Intrs. + * Description: This function will either disable or enable the interrupts * depending on the flag argument. The mask argument can be used to * enable/disable any Intr block. + * Return Value: NONE. */ -static void en_dis_able_NicIntrs(struct s2io_nic *nic, u16 mask, int flag) + +static void en_dis_able_nic_intrs(struct s2io_nic *nic, u16 mask, int flag) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; register u64 val64 = 0, temp64 = 0; @@ -887,15 +900,20 @@ temp64 = readq(&bar0->general_int_mask); temp64 &= ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* Disabled all PCIX, Flash, MDIO, IIC and GPIO - * interrupts for now. - * TODO */ + /* + * Disabled all PCIX, Flash, MDIO, IIC and GPIO + * interrupts for now. + * TODO + */ writeq(DISABLE_ALL_INTRS, &bar0->pic_int_mask); - /* No MSI Support is available presently, so TTI and + /* + * No MSI Support is available presently, so TTI and * RTI interrupts are also disabled. */ } else if (flag == DISABLE_INTRS) { - /* Disable PIC Intrs in the general intr mask register + /* + * Disable PIC Intrs in the general + * intr mask register */ writeq(DISABLE_ALL_INTRS, &bar0->pic_int_mask); temp64 = readq(&bar0->general_int_mask); @@ -907,24 +925,34 @@ /* DMA Interrupts */ /* Enabling/Disabling Tx DMA interrupts */ if (mask & TX_DMA_INTR) { - /* Enable TxDMA Intrs in the general intr mask register */ + /* Enable TxDMA Intrs in the general intr mask register */ val64 = TXDMA_INT_M; if (flag == ENABLE_INTRS) { temp64 = readq(&bar0->general_int_mask); temp64 &= ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* Disable all interrupts other than PFC interrupt in - * DMA level. + /* + * Keep all interrupts other than PFC interrupt + * and PCC interrupt disabled in DMA level. */ - val64 = DISABLE_ALL_INTRS & (~TXDMA_PFC_INT_M); + val64 = DISABLE_ALL_INTRS & ~(TXDMA_PFC_INT_M | + TXDMA_PCC_INT_M); writeq(val64, &bar0->txdma_int_mask); - /* Enable only the MISC error 1 interrupt in PFC block + /* + * Enable only the MISC error 1 interrupt in PFC block */ val64 = DISABLE_ALL_INTRS & (~PFC_MISC_ERR_1); writeq(val64, &bar0->pfc_err_mask); + /* + * Enable only the FB_ECC error interrupt in PCC block + */ + val64 = DISABLE_ALL_INTRS & (~PCC_FB_ECC_ERR); + writeq(val64, &bar0->pcc_err_mask); } else if (flag == DISABLE_INTRS) { - /* Disable TxDMA Intrs in the general intr mask - * register */ + /* + * Disable TxDMA Intrs in the general intr mask + * register + */ writeq(DISABLE_ALL_INTRS, &bar0->txdma_int_mask); writeq(DISABLE_ALL_INTRS, &bar0->pfc_err_mask); temp64 = readq(&bar0->general_int_mask); @@ -941,12 +969,16 @@ temp64 = readq(&bar0->general_int_mask); temp64 &= ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* All RxDMA block interrupts are disabled for now - * TODO */ + /* + * All RxDMA block interrupts are disabled for now + * TODO + */ writeq(DISABLE_ALL_INTRS, &bar0->rxdma_int_mask); } else if (flag == DISABLE_INTRS) { - /* Disable RxDMA Intrs in the general intr mask - * register */ + /* + * Disable RxDMA Intrs in the general intr mask + * register + */ writeq(DISABLE_ALL_INTRS, &bar0->rxdma_int_mask); temp64 = readq(&bar0->general_int_mask); val64 |= temp64; @@ -962,9 +994,11 @@ temp64 = readq(&bar0->general_int_mask); temp64 &= ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* All MAC block error interrupts are disabled for now + /* + * All MAC block error interrupts are disabled for now * except the link status change interrupt. - * TODO*/ + * TODO + */ val64 = MAC_INT_STATUS_RMAC_INT; temp64 = readq(&bar0->mac_int_mask); temp64 &= ~((u64) val64); @@ -974,7 +1008,8 @@ val64 &= ~((u64) RMAC_LINK_STATE_CHANGE_INT); writeq(val64, &bar0->mac_rmac_err_mask); } else if (flag == DISABLE_INTRS) { - /* Disable MAC Intrs in the general intr mask register + /* + * Disable MAC Intrs in the general intr mask register */ writeq(DISABLE_ALL_INTRS, &bar0->mac_int_mask); writeq(DISABLE_ALL_INTRS, @@ -993,11 +1028,14 @@ temp64 = readq(&bar0->general_int_mask); temp64 &= ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* All XGXS block error interrupts are disabled for now - * TODO */ + /* + * All XGXS block error interrupts are disabled for now + * TODO + */ writeq(DISABLE_ALL_INTRS, &bar0->xgxs_int_mask); } else if (flag == DISABLE_INTRS) { - /* Disable MC Intrs in the general intr mask register + /* + * Disable MC Intrs in the general intr mask register */ writeq(DISABLE_ALL_INTRS, &bar0->xgxs_int_mask); temp64 = readq(&bar0->general_int_mask); @@ -1013,11 +1051,14 @@ temp64 = readq(&bar0->general_int_mask); temp64 &= ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* All MC block error interrupts are disabled for now - * TODO */ + /* + * All MC block error interrupts are disabled for now + * TODO + */ writeq(DISABLE_ALL_INTRS, &bar0->mc_int_mask); } else if (flag == DISABLE_INTRS) { - /* Disable MC Intrs in the general intr mask register + /* + * Disable MC Intrs in the general intr mask register */ writeq(DISABLE_ALL_INTRS, &bar0->mc_int_mask); temp64 = readq(&bar0->general_int_mask); @@ -1034,15 +1075,15 @@ temp64 = readq(&bar0->general_int_mask); temp64 &= ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - /* Enable all the Tx side interrupts */ - writeq(0x0, &bar0->tx_traffic_mask); /* '0' Enables - * all 64 TX - * interrupt - * levels. - */ + /* + * Enable all the Tx side interrupts + * writing 0 Enables all 64 TX interrupt levels + */ + writeq(0x0, &bar0->tx_traffic_mask); } else if (flag == DISABLE_INTRS) { - /* Disable Tx Traffic Intrs in the general intr mask - * register. + /* + * Disable Tx Traffic Intrs in the general intr mask + * register. */ writeq(DISABLE_ALL_INTRS, &bar0->tx_traffic_mask); temp64 = readq(&bar0->general_int_mask); @@ -1058,14 +1099,12 @@ temp64 = readq(&bar0->general_int_mask); temp64 &= ~((u64) val64); writeq(temp64, &bar0->general_int_mask); - writeq(0x0, &bar0->rx_traffic_mask); /* '0' Enables - * all 8 RX - * interrupt - * levels. - */ + /* writing 0 Enables all 8 RX interrupt levels */ + writeq(0x0, &bar0->rx_traffic_mask); } else if (flag == DISABLE_INTRS) { - /* Disable Rx Traffic Intrs in the general intr mask - * register. + /* + * Disable Rx Traffic Intrs in the general intr mask + * register. */ writeq(DISABLE_ALL_INTRS, &bar0->rx_traffic_mask); temp64 = readq(&bar0->general_int_mask); @@ -1075,17 +1114,19 @@ } } -/* - * Input Arguments: - * val64 - Value read from adapter status register. - * flag - indicates if the adapter enable bit was ever written once before. - * Return Value: - * void. - * Description: - * Returns whether the H/W is ready to go or not. Depending on whether - * adapter enable bit was written or not the comparison differs and the - * calling function passes the input argument flag to indicate this. +/** + * verify_xena_quiescence - Checks whether the H/W is ready + * @val64 : Value read from adapter status register. + * @flag : indicates if the adapter enable bit was ever written once + * before. + * Description: Returns whether the H/W is ready to go or not. Depending + * on whether adapter enable bit was written or not the comparison + * differs and the calling function passes the input argument flag to + * indicate this. + * Return: 1 If xena is quiescence + * 0 If Xena is not quiescence */ + static int verify_xena_quiescence(u64 val64, int flag) { int ret = 0; @@ -1122,11 +1163,15 @@ return ret; } -/* +/** + * fix_mac_address - Fix for Mac addr problem on Alpha platforms + * @sp: Pointer to device specifc structure + * Description : * New procedure to clear mac address reading problems on Alpha platforms * */ -void FixMacAddress(nic_t * sp) + +void fix_mac_address(nic_t * sp) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; u64 val64; @@ -1138,19 +1183,20 @@ } } -/* - * Input Arguments: - * device private variable. - * Return Value: - * SUCCESS on success and -1 on failure. +/** + * start_nic - Turns the device on + * @nic : device private variable. * Description: - * This function actually turns the device on. Before this - * function is called, all Registers are configured from their reset states + * This function actually turns the device on. Before this function is + * called,all Registers are configured from their reset states * and shared memory is allocated but the NIC is still quiescent. On * calling this function, the device interrupts are cleared and the NIC is * literally switched on by writing into the adapter control register. + * Return Value: + * SUCCESS on success and -1 on failure. */ -static int startNic(struct s2io_nic *nic) + +static int start_nic(struct s2io_nic *nic) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; struct net_device *dev = nic->dev; @@ -1164,7 +1210,7 @@ config = &nic->config; /* PRC Initialization and configuration */ - for (i = 0; i < config->RxRingNum; i++) { + for (i = 0; i < config->rx_ring_num; i++) { writeq((u64) nic->rx_blocks[i][0].block_dma_addr, &bar0->prc_rxd0_n[i]); @@ -1173,7 +1219,8 @@ writeq(val64, &bar0->prc_ctrl_n[i]); } - /* Enabling MC-RLDRAM. After enabling the device, we timeout + /* + * Enabling MC-RLDRAM. After enabling the device, we timeout * for around 100ms, which is approximately the time required * for the device to be ready for operation. */ @@ -1190,14 +1237,16 @@ val64 &= ~ADAPTER_ECC_EN; writeq(val64, &bar0->adapter_control); - /* Clearing any possible Link state change interrupts that + /* + * Clearing any possible Link state change interrupts that * could have popped up just before Enabling the card. */ val64 = readq(&bar0->mac_rmac_err_reg); if (val64) writeq(val64, &bar0->mac_rmac_err_reg); - /* Verify if the device is ready to be enabled, if so enable + /* + * Verify if the device is ready to be enabled, if so enable * it. */ val64 = readq(&bar0->adapter_status); @@ -1211,9 +1260,10 @@ /* Enable select interrupts */ interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR | TX_MAC_INTR | RX_MAC_INTR; - en_dis_able_NicIntrs(nic, interruptible, ENABLE_INTRS); + en_dis_able_nic_intrs(nic, interruptible, ENABLE_INTRS); - /* With some switches, link might be already up at this point. + /* + * With some switches, link might be already up at this point. * Because of this weird behavior, when we enable laser, * we may not get link. We need to handle this. We cannot * figure out which switch is misbehaving. So we are forced to @@ -1240,82 +1290,72 @@ * force link down. Since link is already up, we will get * link state change interrupt after this reset */ - writeq(0x8007051500000000ULL, &bar0->dtx_control); + writeq(0x80010515001E0000ULL, &bar0->dtx_control); val64 = readq(&bar0->dtx_control); - writeq(0x80070515000000E0ULL, &bar0->dtx_control); + udelay(50); + writeq(0x80010515001E00E0ULL, &bar0->dtx_control); val64 = readq(&bar0->dtx_control); + udelay(50); writeq(0x80070515001F00E4ULL, &bar0->dtx_control); val64 = readq(&bar0->dtx_control); + udelay(50); return SUCCESS; } -/* - * Input Arguments: - * nic - device private variable. - * Return Value: - * void. +/** + * free_tx_buffers - Free all queued Tx buffers + * @nic : device private variable. * Description: - * Free all queued Tx buffers. - */ -void freeTxBuffers(struct s2io_nic *nic) + * Free all queued Tx buffers. + * Return Value: void +*/ + +void free_tx_buffers(struct s2io_nic *nic) { struct net_device *dev = nic->dev; struct sk_buff *skb; TxD_t *txdp; int i, j; -#if DEBUG_ON - int cnt = 0; -#endif mac_info_t *mac_control; struct config_param *config; + int cnt = 0; mac_control = &nic->mac_control; config = &nic->config; - for (i = 0; i < config->TxFIFONum; i++) { - for (j = 0; j < config->TxCfg[i].FifoLen - 1; j++) { + for (i = 0; i < config->tx_fifo_num; i++) { + for (j = 0; j < config->tx_cfg[i].fifo_len - 1; j++) { txdp = mac_control->txdl_start[i] + - (config->MaxTxDs * j); - - if (!(txdp->Control_1 & TXD_LIST_OWN_XENA)) { - /* If owned by host, ignore */ - continue; - } + (config->max_txds * j); skb = (struct sk_buff *) ((unsigned long) txdp-> Host_Control); if (skb == NULL) { - DBG_PRINT(ERR_DBG, "%s: NULL skb ", - dev->name); - DBG_PRINT(ERR_DBG, "in Tx Int\n"); - return; + memset(txdp, 0, sizeof(TxD_t)); + continue; } -#if DEBUG_ON - cnt++; -#endif dev_kfree_skb(skb); memset(txdp, 0, sizeof(TxD_t)); + cnt++; } -#if DEBUG_ON DBG_PRINT(INTR_DBG, "%s:forcibly freeing %d skbs on FIFO%d\n", dev->name, cnt, i); -#endif } } -/* - * Input Arguments: - * nic - device private variable. - * Return Value: +/** + * stop_nic - To stop the nic + * @nic ; device private variable. + * Description: + * This function does exactly the opposite of what the start_nic() + * function does. This function is called to stop the device. + * Return Value: * void. - * Description: - * This function does exactly the opposite of what the startNic() - * function does. This function is called to stop - * the device. */ -static void stopNic(struct s2io_nic *nic) + +static void stop_nic(struct s2io_nic *nic) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; register u64 val64 = 0; @@ -1326,24 +1366,23 @@ mac_control = &nic->mac_control; config = &nic->config; -/* Disable all interrupts */ + /* Disable all interrupts */ interruptible = TX_TRAFFIC_INTR | RX_TRAFFIC_INTR | TX_MAC_INTR | RX_MAC_INTR; - en_dis_able_NicIntrs(nic, interruptible, DISABLE_INTRS); + en_dis_able_nic_intrs(nic, interruptible, DISABLE_INTRS); -/* Disable PRCs */ - for (i = 0; i < config->RxRingNum; i++) { + /* Disable PRCs */ + for (i = 0; i < config->rx_ring_num; i++) { val64 = readq(&bar0->prc_ctrl_n[i]); val64 &= ~((u64) PRC_CTRL_RC_ENABLED); writeq(val64, &bar0->prc_ctrl_n[i]); } } -/* - * Input Arguments: - * device private variable - * Return Value: - * SUCCESS on success or an appropriate -ve value on failure. +/** + * fill_rx_buffers - Allocates the Rx side skbs + * @nic: device private variable + * @ring_no: ring number * Description: * The function allocates Rx side skbs and puts the physical * address of these buffers into the RxD buffer pointers, so that the NIC @@ -1354,9 +1393,13 @@ * 3. Five buffer modes. * Each mode defines how many fragments the received frame will be split * up into by the NIC. The frame is split into L3 header, L4 Header, - * L4 payload in three buffer mode and in 5 buffer mode, L4 payload itself - * is split into 3 fragments. As of now only single buffer mode is supported. + * L4 payload in three buffer mode and in 5 buffer mode, L4 payload itself + * is split into 3 fragments. As of now only single buffer mode is + * supported. + * Return Value: + * SUCCESS on success or an appropriate -ve value on failure. */ + int fill_rx_buffers(struct s2io_nic *nic, int ring_no) { struct net_device *dev = nic->dev; @@ -1392,7 +1435,8 @@ off1 = mac_control->rx_curr_get_info[ring_no].offset; offset = block_no * (MAX_RXDS_PER_BLOCK + 1) + off; offset1 = block_no1 * (MAX_RXDS_PER_BLOCK + 1) + off1; - + offset = block_no * (MAX_RXDS_PER_BLOCK) + off; + offset1 = block_no1 * (MAX_RXDS_PER_BLOCK) + off1; rxdp = nic->rx_blocks[ring_no][block_no]. block_virt_addr + off; if ((offset == offset1) && (rxdp->Host_Control)) { @@ -1400,7 +1444,6 @@ DBG_PRINT(INTR_DBG, " info equated\n"); goto end; } - if (rxdp->Control_1 == END_OF_BLOCK) { mac_control->rx_curr_put_info[ring_no]. block_index++; @@ -1412,8 +1455,6 @@ off %= (MAX_RXDS_PER_BLOCK + 1); mac_control->rx_curr_put_info[ring_no].offset = off; - /*rxdp = nic->rx_blocks[ring_no][block_no]. - block_virt_addr + off; */ rxdp = (RxD_t *) ((unsigned long) rxdp->Control_2); DBG_PRINT(INTR_DBG, "%s: Next block at: %p\n", dev->name, rxdp); @@ -1450,15 +1491,16 @@ return SUCCESS; } -/* - * Input Arguments: - * device private variable. - * Return Value: - * NONE. +/** + * free_rx_buffers - Frees all Rx buffers + * @sp: device private variable. * Description: * This function will free all Rx buffers allocated by host. + * Return Value: + * NONE. */ -static void freeRxBuffers(struct s2io_nic *sp) + +static void free_rx_buffers(struct s2io_nic *sp) { struct net_device *dev = sp->dev; int i, j, blk = 0, off, buf_cnt = 0; @@ -1470,8 +1512,8 @@ mac_control = &sp->mac_control; config = &sp->config; - for (i = 0; i < config->RxRingNum; i++) { - for (j = 0, blk = 0; j < config->RxCfg[i].NumRxd; j++) { + for (i = 0; i < config->rx_ring_num; i++) { + for (j = 0, blk = 0; j < config->rx_cfg[i].num_rxd; j++) { off = j % (MAX_RXDS_PER_BLOCK + 1); rxdp = sp->rx_blocks[i][blk].block_virt_addr + off; @@ -1510,18 +1552,19 @@ } } -/* - * Input Argument: - * dev - pointer to the device structure. - * budget - The number of packets that were budgeted to be processed during - * one pass through the 'Poll" function. - * Return value: - * 0 on success and 1 if there are No Rx packets to be processed. - * Description: - * Comes into picture only if NAPI support has been incorporated. It does - * the same thing that rxIntrHandler does, but not in a interrupt context - * also It will process only a given number of packets. +/** + * s2io_poll - Rx interrupt handler for NAPI support + * @dev : pointer to the device structure. + * @budget : The number of packets that were budgeted to be processed + * during one pass through the 'Poll" function. + * Description: + * Comes into picture only if NAPI support has been incorporated. It does + * the same thing that rx_intr_handler does, but not in a interrupt context + * also It will process only a given number of packets. + * Return value: + * 0 on success and 1 if there are No Rx packets to be processed. */ + #ifdef CONFIG_S2IO_NAPI static int s2io_poll(struct net_device *dev, int *budget) { @@ -1546,7 +1589,7 @@ val64 = readq(&bar0->rx_traffic_int); writeq(val64, &bar0->rx_traffic_int); - for (i = 0; i < config->RxRingNum; i++) { + for (i = 0; i < config->rx_ring_num; i++) { if (--pkts_to_process < 0) { goto no_rx; } @@ -1589,7 +1632,7 @@ HEADER_802_2_SIZE + HEADER_SNAP_SIZE, PCI_DMA_FROMDEVICE); - rxOsmHandler(nic, val16, rxdp, i); + rx_osm_handler(nic, val16, rxdp, i); pkt_cnt++; offset_info.offset++; offset_info.offset %= (MAX_RXDS_PER_BLOCK + 1); @@ -1603,38 +1646,39 @@ if (!pkt_cnt) pkt_cnt = 1; - for (i = 0; i < config->RxRingNum; i++) + for (i = 0; i < config->rx_ring_num; i++) fill_rx_buffers(nic, i); dev->quota -= pkt_cnt; *budget -= pkt_cnt; netif_rx_complete(dev); -/* Re enable the Rx interrupts. */ - en_dis_able_NicIntrs(nic, RX_TRAFFIC_INTR, ENABLE_INTRS); + /* Re enable the Rx interrupts. */ + en_dis_able_nic_intrs(nic, RX_TRAFFIC_INTR, ENABLE_INTRS); return 0; no_rx: - for (i = 0; i < config->RxRingNum; i++) + for (i = 0; i < config->rx_ring_num; i++) fill_rx_buffers(nic, i); dev->quota -= pkt_cnt; *budget -= pkt_cnt; return 1; } #else -/* - * Input Arguments: - * device private variable. - * Return Value: - * NONE. +/** + * rx_intr_handler - Rx interrupt handler + * @nic: device private variable. * Description: - * If the interrupt is because of a received frame or if the - * receive ring contains fresh as yet un-processed frames, this function is + * If the interrupt is because of a received frame or if the + * receive ring contains fresh as yet un-processed frames,this function is * called. It picks out the RxD at which place the last Rx processing had * stopped and sends the skb to the OSM's Rx handler and then increments * the offset. + * Return Value: + * NONE. */ -static void rxIntrHandler(struct s2io_nic *nic) + +static void rx_intr_handler(struct s2io_nic *nic) { struct net_device *dev = (struct net_device *) nic->dev; XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; @@ -1643,24 +1687,21 @@ struct sk_buff *skb; u16 val16, cksum; register u64 val64 = 0; - int i, block_no; + int i, block_no, pkt_cnt = 0; mac_info_t *mac_control; struct config_param *config; mac_control = &nic->mac_control; config = &nic->config; -#if DEBUG_ON - nic->rxint_cnt++; -#endif - -/* rx_traffic_int reg is an R1 register, hence we read and write back - * the samevalue in the register to clear it. - */ + /* + * rx_traffic_int reg is an R1 register, hence we read and write back + * the samevalue in the register to clear it. + */ val64 = readq(&bar0->rx_traffic_int); writeq(val64, &bar0->rx_traffic_int); - for (i = 0; i < config->RxRingNum; i++) { + for (i = 0; i < config->rx_ring_num; i++) { offset_info = mac_control->rx_curr_get_info[i]; block_no = offset_info.block_index; rxdp = nic->rx_blocks[i][block_no].block_virt_addr + @@ -1698,7 +1739,7 @@ HEADER_802_2_SIZE + HEADER_SNAP_SIZE, PCI_DMA_FROMDEVICE); - rxOsmHandler(nic, val16, rxdp, i); + rx_osm_handler(nic, val16, rxdp, i); offset_info.offset++; offset_info.offset %= (MAX_RXDS_PER_BLOCK + 1); rxdp = @@ -1706,23 +1747,24 @@ offset_info.offset; mac_control->rx_curr_get_info[i].offset = offset_info.offset; + pkt_cnt++; } } } #endif - -/* - * Input Arguments: - * device private variable - * Return Value: - * NONE +/** + * tx_intr_handler - Transmit interrupt handler + * @nic : device private variable * Description: * If an interrupt was raised to indicate DMA complete of the - * Tx packet, this function is called. It identifies the last TxD whose buffer - * was freed and frees all skbs whose data have already DMA'ed into the NICs - * internal memory. + * Tx packet, this function is called. It identifies the last TxD + * whose buffer was freed and frees all skbs whose data have already + * DMA'ed into the NICs internal memory. + * Return Value: + * NONE */ -static void txIntrHandler(struct s2io_nic *nic) + +static void tx_intr_handler(struct s2io_nic *nic) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; struct net_device *dev = (struct net_device *) nic->dev; @@ -1734,25 +1776,22 @@ u16 j, frg_cnt; mac_info_t *mac_control; struct config_param *config; -#if DEBUG_ON - int cnt = 0; - nic->txint_cnt++; -#endif mac_control = &nic->mac_control; config = &nic->config; - /* tx_traffic_int reg is an R1 register, hence we read and write + /* + * tx_traffic_int reg is an R1 register, hence we read and write * back the samevalue in the register to clear it. */ val64 = readq(&bar0->tx_traffic_int); writeq(val64, &bar0->tx_traffic_int); - for (i = 0; i < config->TxFIFONum; i++) { + for (i = 0; i < config->tx_fifo_num; i++) { offset_info = mac_control->tx_curr_get_info[i]; offset_info1 = mac_control->tx_curr_put_info[i]; txdlp = mac_control->txdl_start[i] + - (config->MaxTxDs * offset_info.offset); + (config->max_txds * offset_info.offset); while ((!(txdlp->Control_1 & TXD_LIST_OWN_XENA)) && (offset_info.offset != offset_info1.offset) && (txdlp->Host_Control)) { @@ -1797,28 +1836,20 @@ txdlp = temp; } memset(txdlp, 0, - (sizeof(TxD_t) * config->MaxTxDs)); + (sizeof(TxD_t) * config->max_txds)); /* Updating the statistics block */ nic->stats.tx_packets++; nic->stats.tx_bytes += skb->len; -#if DEBUG_ON - nic->txpkt_bytes += skb->len; - cnt++; -#endif dev_kfree_skb_irq(skb); offset_info.offset++; offset_info.offset %= offset_info.fifo_len + 1; txdlp = mac_control->txdl_start[i] + - (config->MaxTxDs * offset_info.offset); + (config->max_txds * offset_info.offset); mac_control->tx_curr_get_info[i].offset = offset_info.offset; } -#if DEBUG_ON - DBG_PRINT(INTR_DBG, "%s: freed %d Tx Pkts\n", dev->name, - cnt); -#endif } spin_lock(&nic->tx_lock); @@ -1827,55 +1858,53 @@ spin_unlock(&nic->tx_lock); } -/* - * Input Arguments: - * device private variable - * Return Value: +/** + * alarm_intr_handler - Alarm Interrrupt handler + * @nic: device private variable + * Description: If the interrupt was neither because of Rx packet or Tx + * complete, this function is called. If the interrupt was to indicate + * a loss of link, the OSM link status handler is invoked for any other + * alarm interrupt the block that raised the interrupt is displayed + * and a H/W reset is issued. + * Return Value: * NONE - * Description: - * If the interrupt was neither because of Rx packet or Tx - * complete, this function is called. If the interrupt was to indicate a loss - * of link, the OSM link status handler is invoked for any other alarm - * interrupt the block that raised the interrupt is displayed and a H/W reset - * is issued. - */ -static void alarmIntrHandler(struct s2io_nic *nic) +*/ + +static void alarm_intr_handler(struct s2io_nic *nic) { struct net_device *dev = (struct net_device *) nic->dev; XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; register u64 val64 = 0, err_reg = 0; - /* Handling link status change error Intr */ err_reg = readq(&bar0->mac_rmac_err_reg); if (err_reg & RMAC_LINK_STATE_CHANGE_INT) { schedule_work(&nic->set_link_task); } - /* Handling SERR errors by stopping device Xmit queue and forcing - * a H/W reset. - */ + /* In case of a serious error, the device will be Reset. */ val64 = readq(&bar0->serr_source); if (val64 & SERR_SOURCE_ANY) { DBG_PRINT(ERR_DBG, "%s: Device indicates ", dev->name); DBG_PRINT(ERR_DBG, "serious error!!\n"); netif_stop_queue(dev); } -/* Other type of interrupts are not being handled now, TODO*/ + + /* Other type of interrupts are not being handled now, TODO */ } -/* - * Input Argument: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. +/** + * wait_for_cmd_complete - waits for a command to complete. + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * Description: Function that waits for a command to Write into RMAC + * ADDR DATA registers to be completed and returns either success or + * error depending on whether the command was complete or not. * Return value: * SUCCESS on success and FAILURE on failure. - * Description: - * Function that waits for a command to Write into RMAC ADDR DATA registers - * to be completed and returns either success or error depending on whether - * the command was complete or not. */ -int waitForCmdComplete(nic_t * sp) + +int wait_for_cmd_complete(nic_t * sp) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; int ret = FAILURE, cnt = 0; @@ -1900,17 +1929,16 @@ return ret; } -/* - * Input Argument: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. +/** + * s2io_reset - Resets the card. + * @sp : private member of the device structure. + * Description: Function to Reset the card. This function then also + * restores the previously saved PCI configuration space registers as + * the card reset also resets the configuration space. * Return value: - * void. - * Description: - * Function to Reset the card. This function then also restores the previously - * saved PCI configuration space registers as the card reset also resets the - * Configration space. + * void. */ + void s2io_reset(nic_t * sp) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; @@ -1920,7 +1948,8 @@ val64 = SW_RESET_ALL; writeq(val64, &bar0->sw_reset); - /* At this stage, if the PCI write is indeed completed, the + /* + * At this stage, if the PCI write is indeed completed, the * card is reset and so is the PCI Config space of the device. * So a read cannot be issued at this stage on any of the * registers to ensure the write into "sw_reset" register @@ -1954,29 +1983,31 @@ sp->device_enabled_once = FALSE; } -/* - * Input Argument: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. +/** + * s2io_set_swapper - to set the swapper controle on the card + * @sp : private member of the device structure, + * pointer to the s2io_nic structure. + * Description: Function to set the swapper control on the card + * correctly depending on the 'endianness' of the system. * Return value: * SUCCESS on success and FAILURE on failure. - * Description: - * Function to set the swapper control on the card correctly depending on the - * 'endianness' of the system. */ + int s2io_set_swapper(nic_t * sp) { struct net_device *dev = sp->dev; XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; u64 val64; -/* Set proper endian settings and verify the same by reading the PIF - * Feed-back register. - */ + /* + * Set proper endian settings and verify the same by reading + * the PIF Feed-back register. + */ #ifdef __BIG_ENDIAN -/* The device by default set to a big endian format, so a big endian - * driver need not set anything. - */ + /* + * The device by default set to a big endian format, so a + * big endian driver need not set anything. + */ writeq(0xffffffffffffffffULL, &bar0->swapper_ctrl); val64 = (SWAPPER_CTRL_PIF_R_FE | SWAPPER_CTRL_PIF_R_SE | @@ -1995,9 +2026,11 @@ SWAPPER_CTRL_STATS_FE | SWAPPER_CTRL_STATS_SE); writeq(val64, &bar0->swapper_ctrl); #else -/* Initially we enable all bits to make it accessible by the driver, - * then we selectively enable only those bits that we want to set. - */ + /* + * Initially we enable all bits to make it accessible by the + * driver, then we selectively enable only those bits that + * we want to set. + */ writeq(0xffffffffffffffffULL, &bar0->swapper_ctrl); val64 = (SWAPPER_CTRL_PIF_R_FE | SWAPPER_CTRL_PIF_R_SE | @@ -2021,9 +2054,10 @@ writeq(val64, &bar0->swapper_ctrl); #endif -/* Verifying if endian settings are accurate by reading a feedback - * register. - */ + /* + * Verifying if endian settings are accurate by reading a + * feedback register. + */ val64 = readq(&bar0->pif_rd_swapper_fb); if (val64 != 0x0123456789ABCDEFULL) { /* Endian settings are incorrect, calls for another dekko. */ @@ -2041,17 +2075,18 @@ * Functions defined below concern the OS part of the driver * * ********************************************************* */ -/* - * Input Argument: - * dev - pointer to the device structure. - * Return value: - * '0' on success and an appropriate (-)ve integer as defined in errno.h - * file on failure. +/** + * s2io-open - open entry point of the driver + * @dev : pointer to the device structure. * Description: * This function is the open entry point of the driver. It mainly calls a * function to allocate Rx buffers and inserts them into the buffer * descriptors and then enables the Rx part of the NIC. + * Return value: + * 0 on success and an appropriate (-)ve integer as defined in errno.h + * file on failure. */ + int s2io_open(struct net_device *dev) { nic_t *sp = dev->priv; @@ -2060,18 +2095,21 @@ struct config_param *config; -/* Make sure you have link off by default every time Nic is initialized*/ + /* + * Make sure you have link off by default every time + * Nic is initialized + */ netif_carrier_off(dev); sp->last_link_state = LINK_DOWN; -/* Initialize the H/W I/O registers */ - if (initNic(sp) != 0) { + /* Initialize the H/W I/O registers */ + if (init_nic(sp) != 0) { DBG_PRINT(ERR_DBG, "%s: H/W initialization failed\n", dev->name); return -ENODEV; } -/* After proper initialization of H/W, register ISR */ + /* After proper initialization of H/W, register ISR */ err = request_irq((int) sp->irq, s2io_isr, SA_SHIRQ, sp->name, dev); if (err) { @@ -2087,38 +2125,39 @@ } -/* Setting its receive mode */ + /* Setting its receive mode */ s2io_set_multicast(dev); -/* Initializing the Rx buffers. For now we are considering only 1 Rx ring - * and initializing buffers into 1016 RxDs or 8 Rx blocks - */ + /* + * Initializing the Rx buffers. For now we are considering only 1 + * Rx ring and initializing buffers into 1016 RxDs or 8 Rx blocks + */ mac_control = &sp->mac_control; config = &sp->config; - for (i = 0; i < config->RxRingNum; i++) { + for (i = 0; i < config->rx_ring_num; i++) { if ((ret = fill_rx_buffers(sp, i))) { DBG_PRINT(ERR_DBG, "%s: Out of memory in Open\n", dev->name); s2io_reset(sp); free_irq(dev->irq, dev); - freeRxBuffers(sp); + free_rx_buffers(sp); return -ENOMEM; } DBG_PRINT(INFO_DBG, "Buf in ring:%d is %d:\n", i, atomic_read(&sp->rx_bufs_left[i])); } -/* Enable tasklet for the device */ + /* Enable tasklet for the device */ tasklet_init(&sp->task, s2io_tasklet, (unsigned long) dev); -/* Enable Rx Traffic and interrupts on the NIC */ - if (startNic(sp)) { + /* Enable Rx Traffic and interrupts on the NIC */ + if (start_nic(sp)) { DBG_PRINT(ERR_DBG, "%s: Starting NIC failed\n", dev->name); tasklet_kill(&sp->task); s2io_reset(sp); free_irq(dev->irq, dev); - freeRxBuffers(sp); + free_rx_buffers(sp); return -ENODEV; } @@ -2128,18 +2167,19 @@ return 0; } -/* - * Input Argument/s: - * dev - device pointer. - * Return value: - * '0' on success and an appropriate (-)ve integer as defined in errno.h - * file on failure. +/** + * s2io_close -close entry point of the driver + * @dev : device pointer. * Description: * This is the stop entry point of the driver. It needs to undo exactly - * whatever was done by the open entry point, thus it's usually referred to - * as the close function. Among other things this function mainly stops the + * whatever was done by the open entry point,thus it's usually referred to + * as the close function.Among other things this function mainly stops the * Rx side of the NIC and frees all the Rx buffers in the Rx rings. + * Return value: + * 0 on success and an appropriate (-)ve integer as defined in errno.h + * file on failure. */ + int s2io_close(struct net_device *dev) { nic_t *sp = dev->priv; @@ -2150,19 +2190,22 @@ spin_lock(&sp->isr_lock); netif_stop_queue(dev); -/* disable Tx and Rx traffic on the NIC */ - stopNic(sp); + /* disable Tx and Rx traffic on the NIC */ + stop_nic(sp); spin_unlock(&sp->isr_lock); -/* If the device tasklet is running, wait till its done before killing it */ + /* + * If the device tasklet is running, wait till its done + * before killing it + */ while (atomic_read(&(sp->tasklet_status))) { set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(HZ / 10); } tasklet_kill(&sp->task); -/* Check if the device is Quiescent and then Reset the NIC */ + /* Check if the device is Quiescent and then Reset the NIC */ do { val64 = readq(&bar0->adapter_status); if (verify_xena_quiescence(val64, sp->device_enabled_once)) { @@ -2182,32 +2225,33 @@ } while (1); s2io_reset(sp); -/* Free the Registered IRQ */ + /* Free the Registered IRQ */ free_irq(dev->irq, dev); -/* Free all Tx Buffers waiting for transmission */ - freeTxBuffers(sp); + /* Free all Tx Buffers waiting for transmission */ + free_tx_buffers(sp); -/* Free all Rx buffers allocated by host */ - freeRxBuffers(sp); + /* Free all Rx buffers allocated by host */ + free_rx_buffers(sp); sp->device_close_flag = TRUE; /* Device is shut down. */ return 0; } -/* - * Input Argument/s: - * skb - the socket buffer containing the Tx data. - * dev - device pointer. - * Return value: - * '0' on success & 1 on failure. - * NOTE: when device cant queue the pkt, just the trans_start variable will - * not be upadted. - * Description: +/** + * s2io_xmit - Tx entry point of te driver + * @skb : the socket buffer containing the Tx data. + * @dev : device pointer. + * Description : * This function is the Tx entry point of the driver. S2IO NIC supports * certain protocol assist features on Tx side, namely CSO, S/G, LSO. + * NOTE: when device cant queue the pkt,just the trans_start variable will + * not be upadted. + * Return value: + * 0 on success & 1 on failure. */ + int s2io_xmit(struct sk_buff *skb, struct net_device *dev) { nic_t *sp = dev->priv; @@ -2221,6 +2265,7 @@ #endif mac_info_t *mac_control; struct config_param *config; + XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; mac_control = &sp->mac_control; config = &sp->config; @@ -2232,14 +2277,14 @@ /* Multi FIFO Tx is disabled for now. */ if (!queue && tx_prio) { u8 x = (skb->data)[5]; - queue = x % config->TxFIFONum; + queue = x % config->tx_fifo_num; } off = (u16) mac_control->tx_curr_put_info[queue].offset; off1 = (u16) mac_control->tx_curr_get_info[queue].offset; - txd_len = mac_control->txdl_len; - txdp = mac_control->txdl_start[queue] + (config->MaxTxDs * off); + txd_len = config->max_txds; + txdp = mac_control->txdl_start[queue] + (config->max_txds * off); queue_len = mac_control->tx_curr_put_info[queue].fifo_len + 1; /* Avoid "put" pointer going beyond "get" pointer */ @@ -2250,7 +2295,6 @@ spin_unlock_irqrestore(&sp->tx_lock, flags); return 0; } - #ifdef NETIF_F_TSO mss = skb_shinfo(skb)->tso_size; if (mss) { @@ -2271,7 +2315,7 @@ TXD_TX_CKO_UDP_EN); } - txdp->Control_2 |= config->TxIntrType; + txdp->Control_2 |= config->tx_intr_type; txdp->Control_1 |= (TXD_BUFFER0_SIZE(frg_len) | TXD_GATHER_CODE_FIRST); @@ -2301,15 +2345,18 @@ #endif writeq(val64, &tx_fifo->List_Control); + /* Perform a PCI read to flush previous writes */ + val64 = readq(&bar0->general_int_status); + off++; off %= mac_control->tx_curr_put_info[queue].fifo_len + 1; mac_control->tx_curr_put_info[queue].offset = off; /* Avoid "put" pointer going beyond "get" pointer */ if (((off + 1) % queue_len) == off1) { - DBG_PRINT(TX_DBG, - "No free TxDs for xmit, Put: 0x%x Get:0x%x\n", - off, off1); + DBG_PRINT(TX_DBG, + "No free TxDs for xmit, Put: 0x%x Get:0x%x\n", + off, off1); netif_stop_queue(dev); } @@ -2319,21 +2366,20 @@ return 0; } -/* - * Input Argument/s: - * irq: the irq of the device. - * dev_id: a void pointer to the dev structure of the NIC. - * ptregs: pointer to the registers pushed on the stack. +/** + * s2io_isr - ISR handler of the device . + * @irq: the irq of the device. + * @dev_id: a void pointer to the dev structure of the NIC. + * @pt_regs: pointer to the registers pushed on the stack. + * Description: This function is the ISR handler of the device. It + * identifies the reason for the interrupt and calls the relevant + * service routines. As a contongency measure, this ISR allocates the + * recv buffers, if their numbers are below the panic value which is + * presently set to 25% of the original number of rcv buffers allocated. * Return value: - * void. - * Description: - * This function is the ISR handler of the device. It identifies the reason - * for the interrupt and calls the relevant service routines. - * As a contongency measure, this ISR allocates the recv buffers, if their - * numbers are below the panic value which is presently set to 25% of the - * original number of rcv buffers allocated. + * IRQ_HANDLED: will be returned if IRQ was handled by this routine + * IRQ_NONE: will be returned if interrupt is not from our device */ - static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) dev_id; @@ -2348,7 +2394,8 @@ spin_lock(&sp->isr_lock); - /* Identify the cause for interrupt and call the appropriate + /* + * Identify the cause for interrupt and call the appropriate * interrupt handler. Causes for the interrupt could be; * 1. Rx of packet. * 2. Tx complete. @@ -2362,30 +2409,28 @@ spin_unlock(&sp->isr_lock); return IRQ_NONE; } - /* Mask the interrupts on the NIC */ + + /* Mask the Interrupts on the NIC. */ general_mask = readq(&bar0->general_int_mask); writeq(0xFFFFFFFFFFFFFFFFULL, &bar0->general_int_mask); -#if DEBUG_ON - sp->int_cnt++; -#endif - /* If Intr is because of Tx Traffic */ if (reason & GEN_INTR_TXTRAFFIC) { - txIntrHandler(sp); + tx_intr_handler(sp); } /* If Intr is because of an error */ if (reason & (GEN_ERROR_INTR)) - alarmIntrHandler(sp); + alarm_intr_handler(sp); #ifdef CONFIG_S2IO_NAPI if (reason & GEN_INTR_RXTRAFFIC) { if (netif_rx_schedule_prep(dev)) { - en_dis_able_NicIntrs(sp, RX_TRAFFIC_INTR, - DISABLE_INTRS); - /* We retake the snap shot of the general interrupt - * register. + en_dis_able_nic_intrs(sp, RX_TRAFFIC_INTR, + DISABLE_INTRS); + /* + * Here we take a snap shot of the general + * Intr Register. */ general_mask = readq(&bar0->general_int_mask); __netif_rx_schedule(dev); @@ -2394,66 +2439,72 @@ #else /* If Intr is because of Rx Traffic */ if (reason & GEN_INTR_RXTRAFFIC) { - rxIntrHandler(sp); + rx_intr_handler(sp); } #endif -/* If the Rx buffer count is below the panic threshold then reallocate the - * buffers from the interrupt handler itself, else schedule a tasklet to - * reallocate the buffers. - */ + /* + * If the Rx buffer count is below the panic threshold then + * reallocate the buffers from the interrupt handler itself, + * else schedule a tasklet to reallocate the buffers. + */ #if 1 { - int i; + int i; + + for (i = 0; i < config->rx_ring_num; i++) { + int rxb_size = atomic_read(&sp->rx_bufs_left[i]); + int level = rx_buffer_level(sp, rxb_size, i); + + if ((level == PANIC) && (!TASKLET_IN_USE)) { + int ret; - for (i = 0; i < config->RxRingNum; i++) { - int rxb_size = atomic_read(&sp->rx_bufs_left[i]); - int level = rx_buffer_level(sp, rxb_size, i); - - if ((level == PANIC) && (!TASKLET_IN_USE)) { - int ret; - - DBG_PRINT(ERR_DBG, "%s: Rx BD hit ", dev->name); - DBG_PRINT(ERR_DBG, "PANIC levels\n"); - if ((ret = fill_rx_buffers(sp, i)) == -ENOMEM) { - DBG_PRINT(ERR_DBG, "%s:Out of memory", + DBG_PRINT(INTR_DBG, "%s: Rx BD hit ", dev->name); - DBG_PRINT(ERR_DBG, " in ISR!!\n"); - writeq(general_mask, - &bar0->general_int_mask); - spin_unlock(&sp->isr_lock); - return IRQ_HANDLED; + DBG_PRINT(INTR_DBG, "PANIC levels\n"); + if ((ret = + fill_rx_buffers(sp, i)) == -ENOMEM) { + DBG_PRINT(ERR_DBG, + "%s:Out of memory", + dev->name); + DBG_PRINT(ERR_DBG, " in ISR!!\n"); + writeq(general_mask, + &bar0->general_int_mask); + spin_unlock(&sp->isr_lock); + return IRQ_HANDLED; + } + clear_bit(0, + (unsigned long *) (&sp-> + tasklet_status)); + } else if ((level == LOW) + && (!atomic_read(&sp->tasklet_status))) { + tasklet_schedule(&sp->task); } - clear_bit(0, - (unsigned long *) (&sp->tasklet_status)); - } else if ((level == LOW) - && (!atomic_read(&sp->tasklet_status))) { - tasklet_schedule(&sp->task); - } - } + } } #else tasklet_schedule(&sp->task); #endif - /* Unmask all the previously enabled interrupts on the NIC */ + /* Unmask all previously enabled interrupts on the NIC. */ writeq(general_mask, &bar0->general_int_mask); spin_unlock(&sp->isr_lock); return IRQ_HANDLED; } -/* - * Input Argument/s: - * dev - pointer to the device structure. - * Return value: - * pointer to the updated net_device_stats structure. +/** + * s2io_get_stats - Updates the device statistics structure. + * @dev : pointer to the device structure. * Description: * This function updates the device statistics structure in the s2io_nic * structure and returns a pointer to the same. + * Return value: + * pointer to the updated net_device_stats structure. */ + struct net_device_stats *s2io_get_stats(struct net_device *dev) { nic_t *sp = dev->priv; @@ -2463,27 +2514,28 @@ mac_control = &sp->mac_control; config = &sp->config; - sp->stats.tx_errors = mac_control->StatsInfo->tmac_any_err_frms; - sp->stats.rx_errors = mac_control->StatsInfo->rmac_drop_frms; - sp->stats.multicast = mac_control->StatsInfo->rmac_vld_mcst_frms; + sp->stats.tx_errors = mac_control->stats_info->tmac_any_err_frms; + sp->stats.rx_errors = mac_control->stats_info->rmac_drop_frms; + sp->stats.multicast = mac_control->stats_info->rmac_vld_mcst_frms; sp->stats.rx_length_errors = - mac_control->StatsInfo->rmac_long_frms; + mac_control->stats_info->rmac_long_frms; return (&sp->stats); } -/* - * Input Argument/s: - * dev - pointer to the device structure - * Return value: - * void. +/** + * s2io_set_multicast - entry point for multicast address enable/disable. + * @dev : pointer to the device structure * Description: * This function is a driver entry point which gets called by the kernel * whenever multicast addresses must be enabled/disabled. This also gets * called to set/reset promiscuous mode. Depending on the deivce flag, we * determine, if multicast address must be enabled or if promiscuous mode * is to be disabled etc. + * Return value: + * void. */ + static void s2io_set_multicast(struct net_device *dev) { int i, j, prev_cnt; @@ -2506,7 +2558,7 @@ RMAC_ADDR_CMD_MEM_OFFSET(MAC_MC_ALL_MC_ADDR_OFFSET); writeq(val64, &bar0->rmac_addr_cmd_mem); /* Wait till command completes */ - waitForCmdComplete(sp); + wait_for_cmd_complete(sp); sp->m_cast_flg = 1; sp->all_multi_pos = MAC_MC_ALL_MC_ADDR_OFFSET; @@ -2519,7 +2571,7 @@ RMAC_ADDR_CMD_MEM_OFFSET(sp->all_multi_pos); writeq(val64, &bar0->rmac_addr_cmd_mem); /* Wait till command completes */ - waitForCmdComplete(sp); + wait_for_cmd_complete(sp); sp->m_cast_flg = 0; sp->all_multi_pos = 0; @@ -2582,7 +2634,7 @@ writeq(val64, &bar0->rmac_addr_cmd_mem); /* Wait for command completes */ - if (waitForCmdComplete(sp)) { + if (wait_for_cmd_complete(sp)) { DBG_PRINT(ERR_DBG, "%s: Adding ", dev->name); DBG_PRINT(ERR_DBG, "Multicasts failed\n"); @@ -2609,7 +2661,7 @@ writeq(val64, &bar0->rmac_addr_cmd_mem); /* Wait for command completes */ - if (waitForCmdComplete(sp)) { + if (wait_for_cmd_complete(sp)) { DBG_PRINT(ERR_DBG, "%s: Adding ", dev->name); DBG_PRINT(ERR_DBG, "Multicasts failed\n"); @@ -2619,17 +2671,16 @@ } } -/* - * Input Argument/s: - * dev - pointer to the device structure. - * new_mac - a uchar pointer to the new mac address which is to be set. - * Return value: - * SUCCESS on success and an appropriate (-)ve integer as defined in errno.h - * file on failure. - * Description: - * This procedure will program the Xframe to receive frames with new - * Mac Address +/** + * s2io_set_mac_addr - Programs the Xframe mac address + * @dev : pointer to the device structure. + * @addr: a uchar pointer to the new mac address which is to be set. + * Description : This procedure will program the Xframe to receive + * frames with new Mac Address + * Return value: SUCCESS on success and an appropriate (-)ve integer + * as defined in errno.h file on failure. */ + int s2io_set_mac_addr(struct net_device *dev, u8 * addr) { nic_t *sp = dev->priv; @@ -2655,7 +2706,7 @@ RMAC_ADDR_CMD_MEM_OFFSET(0); writeq(val64, &bar0->rmac_addr_cmd_mem); /* Wait till command completes */ - if (waitForCmdComplete(sp)) { + if (wait_for_cmd_complete(sp)) { DBG_PRINT(ERR_DBG, "%s: set_mac_addr failed\n", dev->name); return FAILURE; } @@ -2663,18 +2714,18 @@ return SUCCESS; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * info - pointer to the structure with parameters given by ethtool to set - * link information. - * Return value: - * 0 on success. +/** + * s2io_ethtool_sset - Sets different link parameters. + * @sp : private member of the device structure, which is a pointer to the * s2io_nic structure. + * @info: pointer to the structure with parameters given by ethtool to set + * link information. * Description: - * The function sets different link parameters provided by the user onto - * the NIC. - */ + * The function sets different link parameters provided by the user onto + * the NIC. + * Return value: + * 0 on success. +*/ + static int s2io_ethtool_sset(struct net_device *dev, struct ethtool_cmd *info) { @@ -2690,17 +2741,18 @@ return 0; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * info - pointer to the structure with parameters given by ethtool to return - * link information. - * Return value: - * void +/** + * s2io_ethtol_gset - Return link specific information. + * @sp : private member of the device structure, pointer to the + * s2io_nic structure. + * @info : pointer to the structure with parameters given by ethtool + * to return link information. * Description: - * Returns link specefic information like speed, duplex etc.. to ethtool. + * Returns link specific information like speed, duplex etc.. to ethtool. + * Return value : + * return 0 on success. */ + int s2io_ethtool_gset(struct net_device *dev, struct ethtool_cmd *info) { nic_t *sp = dev->priv; @@ -2721,17 +2773,18 @@ return 0; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * info - pointer to the structure with parameters given by ethtool to return - * driver information. +/** + * s2io_ethtool_gdrvinfo - Returns driver specific information. + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @info : pointer to the structure with parameters given by ethtool to + * return driver information. + * Description: + * Returns driver specefic information like name, version etc.. to ethtool. * Return value: * void - * Description: - * Returns driver specefic information like name, version etc.. to ethtool. */ + static void s2io_ethtool_gdrvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { @@ -2748,19 +2801,20 @@ info->n_stats = S2IO_STAT_LEN; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * regs - pointer to the structure with parameters given by ethtool for +/** + * s2io_ethtool_gregs - dumps the entire space of Xfame into the buffer. + * @sp: private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @regs : pointer to the structure with parameters given by ethtool for * dumping the registers. - * reg_space - The input argumnet into which all the registers are dumped. - * Return value: - * void - * Description: - * Dumps the entire register space of xFrame NIC into the user given buffer - * area. - */ + * @reg_space: The input argumnet into which all the registers are dumped. + * Description: + * Dumps the entire register space of xFrame NIC into the user given + * buffer area. + * Return value : + * void . +*/ + static void s2io_ethtool_gregs(struct net_device *dev, struct ethtool_regs *regs, void *space) { @@ -2778,17 +2832,15 @@ } } -/* - * Input Argument/s: - * data - address of the private member of the device structure, which +/** + * s2io_phy_id - timer function that alternates adapter LED. + * @data : address of the private member of the device structure, which * is a pointer to the s2io_nic structure, provided as an u32. - * Return value: - * void - * Description: - * This is actually the timer function that alternates the adapter LED bit - * of the adapter control bit to set/reset every time on invocation. - * The timer is set for 1/2 a second, hence tha NIC blinks once every second. - */ + * Description: This is actually the timer function that alternates the + * adapter LED bit of the adapter control bit to set/reset every time on + * invocation. The timer is set for 1/2 a second, hence tha NIC blinks + * once every second. +*/ static void s2io_phy_id(unsigned long data) { nic_t *sp = (nic_t *) data; @@ -2810,20 +2862,21 @@ mod_timer(&sp->id_timer, jiffies + HZ / 2); } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * id - pointer to the structure with identification parameters given by - * ethtool. +/** + * s2io_ethtool_idnic - To physically identify the nic on the system. + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @id : pointer to the structure with identification parameters given by + * ethtool. + * Description: Used to physically identify the NIC on the system. + * The Link LED will blink for a time specified by the user for + * identification. + * NOTE: The Link has to be Up to be able to blink the LED. Hence + * identification is possible only if it's link is up. * Return value: - * int , returns '0' on success - * Description: - * Used to physically identify the NIC on the system. The Link LED will blink - * for a time specified by the user for identification. - * NOTE: The Link has to be Up to be able to blink the LED. Hence - * identification is possible only if it's link is up. + * int , returns 0 on success */ + static int s2io_ethtool_idnic(struct net_device *dev, u32 data) { u64 val64 = 0; @@ -2856,15 +2909,14 @@ return 0; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * ep - pointer to the structure with pause parameters given by ethtool. +/** + * s2io_ethtool_getpause_data -Pause frame frame generation and reception. + * @sp : private member of the device structure, which is a pointer to the * s2io_nic structure. + * @ep : pointer to the structure with pause parameters given by ethtool. + * Description: + * Returns the Pause frame generation and reception capability of the NIC. * Return value: * void - * Description: - * Returns the Pause frame generation and reception capability of the NIC. */ static void s2io_ethtool_getpause_data(struct net_device *dev, struct ethtool_pauseparam *ep) @@ -2881,17 +2933,18 @@ ep->autoneg = FALSE; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * ep - pointer to the structure with pause parameters given by ethtool. - * Return value: - * int, returns '0' on Success +/** + * s2io_ethtool-setpause_data - set/reset pause frame generation. + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @ep : pointer to the structure with pause parameters given by ethtool. * Description: - * It can be used to set or reset Pause frame generation or reception support - * of the NIC. + * It can be used to set or reset Pause frame generation or reception + * support of the NIC. + * Return value: + * int, returns 0 on Success */ + int s2io_ethtool_setpause_data(struct net_device *dev, struct ethtool_pauseparam *ep) { @@ -2912,21 +2965,24 @@ return 0; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * off - offset at which the data must be written - * Return value: - * -1 on failure and the value read from the Eeprom if successful. +/** + * read_eeprom - reads 4 bytes of data from user given offset. + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @off : offset at which the data must be written + * @data : Its an output parameter where the data read at the given + * offset is stored. * Description: - * Will read 4 bytes of data from the user given offset and return the - * read data. + * Will read 4 bytes of data from the user given offset and return the + * read data. * NOTE: Will allow to read only part of the EEPROM visible through the - * I2C bus. + * I2C bus. + * Return value: + * -1 on failure and 0 on success. */ + #define S2IO_DEV_ID 5 -static u32 readEeprom(nic_t * sp, int off) +static u32 read_eeprom(nic_t * sp, int off) { u32 data = -1, exit_cnt = 0; u64 val64; @@ -2951,21 +3007,22 @@ return data; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * off - offset at which the data must be written - * data - The data that is to be written - * cnt - Number of bytes of the data that are actually to be written into +/** + * write_eeprom - actually writes the relevant part of the data value. + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @off : offset at which the data must be written + * @data : The data that is to be written + * @cnt : Number of bytes of the data that are actually to be written into * the Eeprom. (max of 3) - * Return value: - * '0' on success, -1 on failure. * Description: * Actually writes the relevant part of the data value into the Eeprom * through the I2C bus. + * Return value: + * 0 on success, -1 on failure. */ -static int writeEeprom(nic_t * sp, int off, u32 data, int cnt) + +static int write_eeprom(nic_t * sp, int off, u32 data, int cnt) { int exit_cnt = 0, ret = -1; u64 val64; @@ -2991,39 +3048,19 @@ return ret; } -/* - * A helper function used to invert the 4 byte u32 data field - * byte by byte. This will be used by the Read Eeprom function - * for display purposes. - */ -u32 inv(u32 data) -{ - static u32 ret = 0; - - if (data) { - u8 c = data; - ret = ((ret << 8) + c); - data >>= 8; - inv(data); - } - - return ret; -} - -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * eeprom - pointer to the user level structure provided by ethtool, - * containing all relevant information. - * data_buf - user defined value to be written into Eeprom. - * Return value: - * int '0' on success - * Description: - * Reads the values stored in the Eeprom at given offset for a given length. - * Stores these values int the input argument data buffer 'data_buf' and - * returns these to the caller (ethtool.) +/** + * s2io_ethtool_geeprom - reads the value stored in the Eeprom. + * @sp : private member of the device structure, which is a pointer to the * s2io_nic structure. + * @eeprom : pointer to the user level structure provided by ethtool, + * containing all relevant information. + * @data_buf : user defined value to be written into Eeprom. + * Description: Reads the values stored in the Eeprom at given offset + * for a given length. Stores these values int the input argument data + * buffer 'data_buf' and returns these to the caller (ethtool.) + * Return value: + * int 0 on success */ + int s2io_ethtool_geeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, u8 * data_buf) { @@ -3036,30 +3073,31 @@ eeprom->len = XENA_EEPROM_SPACE - eeprom->offset; for (i = 0; i < eeprom->len; i += 4) { - data = readEeprom(sp, eeprom->offset + i); + data = read_eeprom(sp, eeprom->offset + i); if (data < 0) { DBG_PRINT(ERR_DBG, "Read of EEPROM failed\n"); return -EFAULT; } - valid = inv(data); + valid = INV(data); memcpy((data_buf + i), &valid, 4); } return 0; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * eeprom - pointer to the user level structure provided by ethtool, - * containing all relevant information. - * data_buf - user defined value to be written into Eeprom. - * Return value: - * '0' on success, -EFAULT on failure. - * Description: +/** + * s2io_ethtool_seeprom - tries to write the user provided value in Eeprom + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @eeprom : pointer to the user level structure provided by ethtool, + * containing all relevant information. + * @data_buf ; user defined value to be written into Eeprom. + * Description: * Tries to write the user provided value in the Eeprom, at the offset * given by the user. + * Return value: + * 0 on success, -EFAULT on failure. */ + static int s2io_ethtool_seeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, u8 * data_buf) @@ -3083,7 +3121,7 @@ } else valid = data; - if (writeEeprom(sp, (eeprom->offset + cnt), valid, 0)) { + if (write_eeprom(sp, (eeprom->offset + cnt), valid, 0)) { DBG_PRINT(ERR_DBG, "ETHTOOL_WRITE_EEPROM Err: Cannot "); DBG_PRINT(ERR_DBG, @@ -3097,19 +3135,20 @@ return 0; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * data - variable that returns the result of each of the test conducted by - * the driver. - * Return value: - * '0' on success. +/** + * s2io_register_test - reads and writes into all clock domains. + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @data : variable that returns the result of each of the test conducted b + * by the driver. * Description: - * Read and write into all clock domains. The NIC has 3 clock domains, - * see that registers in all the three regions are accessible. + * Read and write into all clock domains. The NIC has 3 clock domains, + * see that registers in all the three regions are accessible. + * Return value: + * 0 on success. */ -static int s2io_registerTest(nic_t * sp, uint64_t * data) + +static int s2io_register_test(nic_t * sp, uint64_t * data) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; u64 val64 = 0; @@ -3159,88 +3198,90 @@ return 0; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * data - variable that returns the result of each of the test conducted by - * the driver. - * Return value: - * '0' on success. +/** + * s2io_eeprom_test - to verify that EEprom in the xena can be programmed. + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @data:variable that returns the result of each of the test conducted by + * the driver. * Description: - * Verify that EEPROM in the xena can be programmed using I2C_CONTROL - * register. + * Verify that EEPROM in the xena can be programmed using I2C_CONTROL + * register. + * Return value: + * 0 on success. */ -static int s2io_eepromTest(nic_t * sp, uint64_t * data) + +static int s2io_eeprom_test(nic_t * sp, uint64_t * data) { int fail = 0, ret_data; /* Test Write Error at offset 0 */ - if (!writeEeprom(sp, 0, 0, 3)) + if (!write_eeprom(sp, 0, 0, 3)) fail = 1; /* Test Write at offset 4f0 */ - if (writeEeprom(sp, 0x4F0, 0x01234567, 3)) + if (write_eeprom(sp, 0x4F0, 0x01234567, 3)) fail = 1; - if ((ret_data = readEeprom(sp, 0x4f0)) < 0) + if ((ret_data = read_eeprom(sp, 0x4F0)) < 0) fail = 1; if (ret_data != 0x01234567) fail = 1; /* Reset the EEPROM data go FFFF */ - writeEeprom(sp, 0x4F0, 0xFFFFFFFF, 3); + write_eeprom(sp, 0x4F0, 0xFFFFFFFF, 3); /* Test Write Request Error at offset 0x7c */ - if (!writeEeprom(sp, 0x07C, 0, 3)) + if (!write_eeprom(sp, 0x07C, 0, 3)) fail = 1; /* Test Write Request at offset 0x7fc */ - if (writeEeprom(sp, 0x7FC, 0x01234567, 3)) + if (write_eeprom(sp, 0x7FC, 0x01234567, 3)) fail = 1; - if ((ret_data = readEeprom(sp, 0x7FC)) < 0) + if ((ret_data = read_eeprom(sp, 0x7FC)) < 0) fail = 1; if (ret_data != 0x01234567) fail = 1; /* Reset the EEPROM data go FFFF */ - writeEeprom(sp, 0x7FC, 0xFFFFFFFF, 3); + write_eeprom(sp, 0x7FC, 0xFFFFFFFF, 3); /* Test Write Error at offset 0x80 */ - if (!writeEeprom(sp, 0x080, 0, 3)) + if (!write_eeprom(sp, 0x080, 0, 3)) fail = 1; /* Test Write Error at offset 0xfc */ - if (!writeEeprom(sp, 0x0FC, 0, 3)) + if (!write_eeprom(sp, 0x0FC, 0, 3)) fail = 1; /* Test Write Error at offset 0x100 */ - if (!writeEeprom(sp, 0x100, 0, 3)) + if (!write_eeprom(sp, 0x100, 0, 3)) fail = 1; /* Test Write Error at offset 4ec */ - if (!writeEeprom(sp, 0x4EC, 0, 3)) + if (!write_eeprom(sp, 0x4EC, 0, 3)) fail = 1; *data = fail; return 0; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * data - variable that returns the result of each of the test conducted by - * the driver. - * Return value: - * '0' on success and -1 on failure. +/** + * s2io_bist_test - invokes the MemBist test of the card . + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @data:variable that returns the result of each of the test conducted by + * the driver. * Description: - * This invokes the MemBist test of the card. We give around - * 2 secs time for the Test to complete. If it's still not complete - * within this peiod, we consider that the test failed. + * This invokes the MemBist test of the card. We give around + * 2 secs time for the Test to complete. If it's still not complete + * within this peiod, we consider that the test failed. + * Return value: + * 0 on success and -1 on failure. */ -static int s2io_bistTest(nic_t * sp, uint64_t * data) + +static int s2io_bist_test(nic_t * sp, uint64_t * data) { u8 bist = 0; int cnt = 0, ret = -1; @@ -3264,19 +3305,20 @@ return ret; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * data - variable that returns the result of each of the test conducted by - * the driver. - * Return value: - * '0' on success. +/** + * s2io-link_test - verifies the link state of the nic + * @sp ; private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @data: variable that returns the result of each of the test conducted by + * the driver. * Description: - * The function verifies the link state of the NIC and updates the input - * argument 'data' appropriately. + * The function verifies the link state of the NIC and updates the input + * argument 'data' appropriately. + * Return value: + * 0 on success. */ -static int s2io_linkTest(nic_t * sp, uint64_t * data) + +static int s2io_link_test(nic_t * sp, uint64_t * data) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; u64 val64; @@ -3288,19 +3330,20 @@ return 0; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * data - variable that returns the result of each of the test conducted by - * the driver. - * Return value: - * '0' on success. +/** + * s2io_rldram_test - offline test for access to the RldRam chip on the NIC + * @sp - private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @data - variable that returns the result of each of the test + * conducted by the driver. * Description: * This is one of the offline test that tests the read and write * access to the RldRam chip on the NIC. + * Return value: + * 0 on success. */ -static int s2io_rldramTest(nic_t * sp, uint64_t * data) + +static int s2io_rldram_test(nic_t * sp, uint64_t * data) { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; u64 val64; @@ -3395,20 +3438,21 @@ return 0; } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * ethtest - pointer to a ethtool command specific structure that will be - * returned to the user. - * data - variable that returns the result of each of the test conducted by - * the driver. - * Return value: - * SUCCESS on success and an appropriate -1 on failure. +/** + * s2io_ethtool_test - conducts 6 tsets to determine the health of card. + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @ethtest : pointer to a ethtool command specific structure that will be + * returned to the user. + * @data : variable that returns the result of each of the test + * conducted by the driver. * Description: * This function conducts 6 tests ( 4 offline and 2 online) to determine - * the health of the card. + * the health of the card. + * Return value: + * void */ + static void s2io_ethtool_test(struct net_device *dev, struct ethtool_test *ethtest, uint64_t * data) @@ -3424,22 +3468,22 @@ } else s2io_set_swapper(sp); - if (s2io_registerTest(sp, &data[0])) + if (s2io_register_test(sp, &data[0])) ethtest->flags |= ETH_TEST_FL_FAILED; s2io_reset(sp); s2io_set_swapper(sp); - if (s2io_rldramTest(sp, &data[3])) + if (s2io_rldram_test(sp, &data[3])) ethtest->flags |= ETH_TEST_FL_FAILED; s2io_reset(sp); s2io_set_swapper(sp); - if (s2io_eepromTest(sp, &data[1])) + if (s2io_eeprom_test(sp, &data[1])) ethtest->flags |= ETH_TEST_FL_FAILED; - if (s2io_bistTest(sp, &data[4])) + if (s2io_bist_test(sp, &data[4])) ethtest->flags |= ETH_TEST_FL_FAILED; if (orig_state) @@ -3459,7 +3503,7 @@ data[4] = -1; } - if (s2io_linkTest(sp, &data[2])) + if (s2io_link_test(sp, &data[2])) ethtest->flags |= ETH_TEST_FL_FAILED; data[0] = 0; @@ -3475,7 +3519,7 @@ { int i = 0; nic_t *sp = dev->priv; - StatInfo_t *stat_info = sp->mac_control.StatsInfo; + StatInfo_t *stat_info = sp->mac_control.stats_info; tmp_stats[i++] = stat_info->tmac_frms; tmp_stats[i++] = stat_info->tmac_data_octets; @@ -3597,36 +3641,37 @@ .get_ethtool_stats = s2io_get_ethtool_stats }; -/* - * Input Argument/s: - * dev - Device pointer. - * ifr - An IOCTL specefic structure, that can contain a pointer to - * a proprietary structure used to pass information to the driver. - * cmd - This is used to distinguish between the different commands that - * can be passed to the IOCTL functions. - * Return value: - * '0' on success and an appropriate (-)ve integer as defined in errno.h - * file on failure. +/** + * s2io_ioctl - Entry point for the Ioctl + * @dev : Device pointer. + * @ifr : An IOCTL specefic structure, that can contain a pointer to + * a proprietary structure used to pass information to the driver. + * @cmd : This is used to distinguish between the different commands that + * can be passed to the IOCTL functions. * Description: * This function has support for ethtool, adding multiple MAC addresses on * the NIC and some DBG commands for the util tool. + * Return value: + * Currently the IOCTL supports no operations, hence by default this + * function returns OP NOT SUPPORTED value. */ + int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { return -EOPNOTSUPP; } -/* - * Input Argument/s: - * dev - device pointer. - * new_mtu - the new MTU size for the device. +/** + * s2io_change_mtu - entry point to change MTU size for the device. + * @dev : device pointer. + * @new_mtu : the new MTU size for the device. + * Description: A driver entry point to change MTU size for the device. + * Before changing the MTU the device must be stopped. * Return value: - * '0' on success and an appropriate (-)ve integer as defined in errno.h + * 0 on success and an appropriate (-)ve integer as defined in errno.h * file on failure. - * Description: - * A driver entry point to change MTU size for the device. Before changing - * the MTU the device must be stopped. */ + int s2io_change_mtu(struct net_device *dev, int new_mtu) { nic_t *sp = dev->priv; @@ -3645,7 +3690,7 @@ return -EPERM; } -/* Set the new MTU into the PYLD register of the NIC */ + /* Set the new MTU into the PYLD register of the NIC */ val64 = new_mtu; writeq(vBIT(val64, 2, 14), &bar0->rmac_max_pyld_len); @@ -3654,18 +3699,19 @@ return 0; } -/* - * Input Argument/s: - * dev_adr - address of the device structure in dma_addr_t format. - * Return value: - * void. +/** + * s2io_tasklet - Bottom half of the ISR. + * @dev_adr : address of the device structure in dma_addr_t format. * Description: * This is the tasklet or the bottom half of the ISR. This is * an extension of the ISR which is scheduled by the scheduler to be run * when the load on the CPU is low. All low priority tasks of the ISR can * be pushed into the tasklet. For now the tasklet is used only to * replenish the Rx buffers in the Rx buffer descriptors. + * Return value: + * void. */ + static void s2io_tasklet(unsigned long dev_addr) { struct net_device *dev = (struct net_device *) dev_addr; @@ -3678,29 +3724,30 @@ config = &sp->config; if (!TASKLET_IN_USE) { - for (i = 0; i < config->RxRingNum; i++) { + for (i = 0; i < config->rx_ring_num; i++) { ret = fill_rx_buffers(sp, i); if (ret == -ENOMEM) { DBG_PRINT(ERR_DBG, "%s: Out of ", dev->name); DBG_PRINT(ERR_DBG, "memory in tasklet\n"); - return; + break; } else if (ret == -EFILL) { DBG_PRINT(ERR_DBG, "%s: Rx Ring %d is full\n", dev->name, i); - return; + break; } } clear_bit(0, (unsigned long *) (&sp->tasklet_status)); } } - -/* - * Description: - * +/** + * s2io_set_link - Set the LInk status + * @data: long pointer to device private structue + * Description: Sets the link status for the adapter */ + static void s2io_set_link(unsigned long data) { nic_t *nic = (nic_t *) data; @@ -3708,7 +3755,8 @@ XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; register u64 val64, err_reg; - /* Allow a small delay for the NICs self initiated + /* + * Allow a small delay for the NICs self initiated * cleanup to complete. */ set_current_state(TASK_UNINTERRUPTIBLE); @@ -3716,7 +3764,7 @@ val64 = readq(&bar0->adapter_status); if (verify_xena_quiescence(val64, nic->device_enabled_once)) { - /* Acknowledge interrupt and clear the R1 register */ + /* Acknowledge Intr and clear R1 register. */ err_reg = readq(&bar0->mac_rmac_err_reg); writeq(err_reg, &bar0->mac_rmac_err_reg); @@ -3748,13 +3796,16 @@ } } -/* +/** + * s2io_restart_nic - Resets the NIC. + * @data : long pointer to the device private structure * Description: * This function is scheduled to be run by the s2io_tx_watchdog * function after 0.5 secs to reset the NIC. The idea is to reduce * the run time of the watch dog routine which is run holding a * spin lock. */ + static void s2io_restart_nic(unsigned long data) { struct net_device *dev = (struct net_device *) data; @@ -3767,18 +3818,19 @@ "%s: was reset by Tx watchdog timer.\n", dev->name); } -/* - * Input Argument/s: - * dev - device pointer. - * Return value: - * void +/** + * s2io_tx_watchdog - Watchdog for transmit side. + * @dev : Pointer to net device structure * Description: * This function is triggered if the Tx Queue is stopped * for a pre-defined amount of time when the Interface is still up. * If the Interface is jammed in such a situation, the hardware is * reset (by s2io_close) and restarted again (by s2io_open) to * overcome any problem that might have been caused in the hardware. + * Return value: + * void */ + static void s2io_tx_watchdog(struct net_device *dev) { nic_t *sp = dev->priv; @@ -3788,25 +3840,24 @@ } } -/* - * Input Argument/s: - * sp - private member of the device structure, which is a pointer to the - * s2io_nic structure. - * skb - the socket buffer pointer. - * len - length of the packet - * cksum - FCS checksum of the frame. - * ring_no - the ring from which this RxD was extracted. - * Return value: - * SUCCESS on success and -1 on failure. - * Description: - * This function is called by the Tx interrupt serivce routine to perform +/** + * rx_osm_handler - To perform some OS related operations on SKB. + * @sp: private member of the device structure,pointer to s2io_nic structure. + * @skb : the socket buffer pointer. + * @len : length of the packet + * @cksum : FCS checksum of the frame. + * @ring_no : the ring from which this RxD was extracted. + * Description: + * This function is called by the Tx interrupt serivce routine to perform * some OS related operations on the SKB before passing it to the upper * layers. It mainly checks if the checksum is OK, if so adds it to the * SKBs cksum variable, increments the Rx packet count and passes the SKB * to the upper layer. If the checksum is wrong, it increments the Rx * packet error count, frees the SKB and returns error. + * Return value: + * SUCCESS on success and -1 on failure. */ -static int rxOsmHandler(nic_t * sp, u16 len, RxD_t * rxdp, int ring_no) +static int rx_osm_handler(nic_t * sp, u16 len, RxD_t * rxdp, int ring_no) { struct net_device *dev = (struct net_device *) sp->dev; struct sk_buff *skb = @@ -3817,7 +3868,8 @@ if ((rxdp->Control_1 & TCP_OR_UDP_FRAME) && (sp->rx_csum)) { l4_csum = RXD_GET_L4_CKSUM(rxdp->Control_1); if ((l3_csum == L3_CKSUM_OK) && (l4_csum == L4_CKSUM_OK)) { - /* NIC verifies if the Checksum of the received + /* + * NIC verifies if the Checksum of the received * frame is Ok or not and accordingly returns * a flag in the RxD. */ @@ -3844,25 +3896,21 @@ #endif dev->last_rx = jiffies; -#if DEBUG_ON - sp->rxpkt_cnt++; -#endif sp->rx_pkt_count++; sp->stats.rx_packets++; sp->stats.rx_bytes += len; - sp->rxpkt_bytes += len; atomic_dec(&sp->rx_bufs_left[ring_no]); rxdp->Host_Control = 0; return SUCCESS; } -int check_for_txSpace(nic_t * sp) +int check_for_tx_space(nic_t * sp) { u32 put_off, get_off, queue_len; int ret = TRUE, i; - for (i = 0; i < sp->config.TxFIFONum; i++) { + for (i = 0; i < sp->config.tx_fifo_num; i++) { queue_len = sp->mac_control.tx_curr_put_info[i].fifo_len + 1; put_off = sp->mac_control.tx_curr_put_info[i].offset; @@ -3876,18 +3924,19 @@ return ret; } -/* -* Input Argument/s: -* sp - private member of the device structure, which is a pointer to the -* s2io_nic structure. -* link - inidicates whether link is UP/DOWN. -* Return value: -* void. -* Description: -* This function stops/starts the Tx queue depending on whether the link -* status of the NIC is is down or up. This is called by the Alarm interrupt -* handler whenever a link change interrupt comes up. -*/ +/** + * s2io_link - stops/starts the Tx queue. + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * @link : inidicates whether link is UP/DOWN. + * Description: + * This function stops/starts the Tx queue depending on whether the link + * status of the NIC is is down or up. This is called by the Alarm + * interrupt handler whenever a link change interrupt comes up. + * Return value: + * void. + */ + void s2io_link(nic_t * sp, int link) { struct net_device *dev = (struct net_device *) sp->dev; @@ -3900,8 +3949,9 @@ } else { DBG_PRINT(ERR_DBG, "%s: Link Up\n", dev->name); netif_carrier_on(dev); - if (check_for_txSpace(sp) == TRUE) { - /* Don't wake the queue, if we know there + if (check_for_tx_space(sp) == TRUE) { + /* + * Dont wake the queue if we know there * are no free TxDs available. */ netif_wake_queue(dev); @@ -3911,14 +3961,15 @@ sp->last_link_state = link; } -/* -* Input Argument/s: -* pdev - structure containing the PCI related information of the device. -* Return value: -* returns the revision ID of the device. -* Description: -* Function to identify the Revision ID of xena. -*/ +/** + * get_xena_rev_id - to identify revision ID of xena. + * @pdev : PCI Dev structure + * Description: + * Function to identify the Revision ID of xena. + * Return value: + * returns the revision ID of the device. + */ + int get_xena_rev_id(struct pci_dev *pdev) { u8 id = 0; @@ -3927,21 +3978,22 @@ return id; } -/* -* Input Argument/s: -* sp - private member of the device structure, which is a pointer to the -* s2io_nic structure. -* Return value: -* void -* Description: -* This function initializes a few of the PCI and PCI-X configuration registers -* with recommended values. -*/ +/** + * s2io_init_pci -Initialization of PCI and PCI-X configuration registers . + * @sp : private member of the device structure, which is a pointer to the + * s2io_nic structure. + * Description: + * This function initializes a few of the PCI and PCI-X configuration registers + * with recommended values. + * Return value: + * void + */ + static void s2io_init_pci(nic_t * sp) { u16 pci_cmd = 0; -/* Enable Data Parity Error Recovery in PCI-X command register. */ + /* Enable Data Parity Error Recovery in PCI-X command register. */ pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, @@ -3949,13 +4001,13 @@ pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); -/* Set the PErr Response bit in PCI command register. */ + /* Set the PErr Response bit in PCI command register. */ pci_read_config_word(sp->pdev, PCI_COMMAND, &pci_cmd); pci_write_config_word(sp->pdev, PCI_COMMAND, (pci_cmd | PCI_COMMAND_PARITY)); pci_read_config_word(sp->pdev, PCI_COMMAND, &pci_cmd); -/* Set user specified value in Latency Timer */ + /* Set user specified value in Latency Timer */ if (latency_timer) { pci_write_config_byte(sp->pdev, PCI_LATENCY_TIMER, latency_timer); @@ -3963,14 +4015,14 @@ &latency_timer); } -/* Set MMRB count to 4096 in PCI-X Command register. */ + /* Set MMRB count to 4096 in PCI-X Command register. */ pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, (sp->pcix_cmd | 0x0C)); pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); -/* Setting Maximum outstanding splits to two for now. */ - sp->pcix_cmd &= 0xFF1F; + /* Setting Maximum outstanding splits based on system type. */ + sp->pcix_cmd &= 0xFF8F; sp->pcix_cmd |= XENA_MAX_OUTSTANDING_SPLITS(XENA_TWO_SPLIT_TRANSACTION); @@ -3978,7 +4030,6 @@ sp->pcix_cmd); pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); - } MODULE_AUTHOR("Raghavendra Koushik "); @@ -3991,21 +4042,20 @@ MODULE_PARM(rx_prio, "1-" __MODULE_STRING(1) "i"); MODULE_PARM(tx_prio, "1-" __MODULE_STRING(1) "i"); MODULE_PARM(latency_timer, "1-" __MODULE_STRING(1) "i"); +/** + * s2io_init_nic - Initialization of the adapter . + * @pdev : structure containing the PCI related information of the device. + * @pre: List of PCI devices supported by the driver listed in s2io_tbl. + * Description: + * The function initializes an adapter identified by the pci_dec structure. + * All OS related initialization including memory and device structure and + * initlaization of the device private variable is done. Also the swapper + * control register is initialized to enable read and write into the I/O + * registers of the device. + * Return value: + * returns 0 on success and negative on failure. + */ -/* -* Input Argument/s: -* pdev - structure containing the PCI related information of the device. -* pre - the List of PCI devices supported by the driver listed in s2io_tbl. -* Return value: -* returns '0' on success and negative on failure. -* Description: -* The function initializes an adapter identified by the pci_dec structure. -* All OS related initialization including memory and device structure and -* initlaization of the device private variable is done. Also the swapper -* control register is initialized to enable read and write into the I/O -* registers of the device. -* -*/ static int __devinit s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) { @@ -4031,6 +4081,7 @@ if (!pci_set_dma_mask(pdev, 0xffffffffffffffffULL)) { DBG_PRINT(INIT_DBG, "s2io_init_nic: Using 64bit DMA\n"); dma_flag = TRUE; + if (pci_set_consistent_dma_mask (pdev, 0xffffffffffffffffULL)) { DBG_PRINT(ERR_DBG, @@ -4080,7 +4131,8 @@ /* Initialize some PCI/PCI-X fields of the NIC. */ s2io_init_pci(sp); - /* Setting the device configuration parameters. + /* + * Setting the device configuration parameters. * Most of these parameters can be specified by the user during * module insertion as they are module loadable parameters. If * these parameters are not not specified during load time, they @@ -4090,7 +4142,7 @@ config = &sp->config; /* Tx side parameters. */ - config->TxFIFONum = fifo_num ? fifo_num : 1; + config->tx_fifo_num = fifo_num ? fifo_num : 1; if (!fifo_len[0] && (fifo_num > 1)) { printk(KERN_ERR "Fifo Lens not specified for all FIFOs\n"); @@ -4109,67 +4161,56 @@ goto init_failed; } } - for (cnt = 0; cnt < config->TxFIFONum; cnt++) { - config->TxCfg[cnt].FifoLen = fifo_len[cnt]; - config->TxCfg[cnt].FifoPriority = cnt; + for (cnt = 0; cnt < config->tx_fifo_num; cnt++) { + config->tx_cfg[cnt].fifo_len = fifo_len[cnt]; + config->tx_cfg[cnt].fifo_priority = cnt; } } else { - config->TxCfg[0].FifoLen = DEFAULT_FIFO_LEN; - config->TxCfg[0].FifoPriority = 0; + config->tx_cfg[0].fifo_len = DEFAULT_FIFO_LEN; + config->tx_cfg[0].fifo_priority = 0; } - config->TxIntrType = TXD_INT_TYPE_UTILZ; - for (i = 0; i < config->TxFIFONum; i++) { - if (config->TxCfg[i].FifoLen < 65) { - config->TxIntrType = TXD_INT_TYPE_PER_LIST; + config->tx_intr_type = TXD_INT_TYPE_UTILZ; + for (i = 0; i < config->tx_fifo_num; i++) { + config->tx_cfg[i].f_no_snoop = + (NO_SNOOP_TXD | NO_SNOOP_TXD_BUFFER); + if (config->tx_cfg[i].fifo_len < 65) { + config->tx_intr_type = TXD_INT_TYPE_PER_LIST; break; } } - - config->TxCfg[0].fNoSnoop = (NO_SNOOP_TXD | NO_SNOOP_TXD_BUFFER); - config->MaxTxDs = MAX_SKB_FRAGS; - config->TxFlow = TRUE; + config->max_txds = MAX_SKB_FRAGS; /* Rx side parameters. */ - config->RxRingNum = ring_num ? ring_num : 1; + config->rx_ring_num = ring_num ? ring_num : 1; if (ring_len[0]) { int cnt; - for (cnt = 0; cnt < config->RxRingNum; cnt++) { - config->RxCfg[cnt].NumRxd = ring_len[cnt]; - config->RxCfg[cnt].RingPriority = cnt; + for (cnt = 0; cnt < config->rx_ring_num; cnt++) { + config->rx_cfg[cnt].num_rxd = ring_len[cnt]; + config->rx_cfg[cnt].ring_priority = cnt; } } else { - int id; - if ((id = get_xena_rev_id(pdev)) == 1) { - config->RxCfg[0].NumRxd = LARGE_RXD_CNT; + config->rx_cfg[0].num_rxd = SMALL_RXD_CNT; + config->rx_cfg[0].ring_priority = 0; + } - } else { - config->RxCfg[0].NumRxd = SMALL_RXD_CNT; - } - config->RxCfg[0].RingPriority = 0; + for (i = 0; i < config->rx_ring_num; i++) { + config->rx_cfg[i].ring_org = RING_ORG_BUFF1; + config->rx_cfg[i].f_no_snoop = + (NO_SNOOP_RXD | NO_SNOOP_RXD_BUFFER); } - config->RxCfg[0].RingOrg = RING_ORG_BUFF1; - config->RxCfg[0].RxdThresh = DEFAULT_RXD_THRESHOLD; - config->RxCfg[0].fNoSnoop = (NO_SNOOP_RXD | NO_SNOOP_RXD_BUFFER); - config->RxCfg[0].RxD_BackOff_Interval = TBD; - config->RxFlow = TRUE; - - /* Miscellaneous parameters. */ - config->RxVLANEnable = TRUE; - config->MTU = MAX_MTU_VLAN; - config->JumboEnable = FALSE; /* Setting Mac Control parameters */ - mac_control->txdl_len = MAX_SKB_FRAGS; mac_control->rmac_pause_time = 0; + /* Initialize Ring buffer parameters. */ - for (i = 0; i < config->RxRingNum; i++) + for (i = 0; i < config->rx_ring_num; i++) atomic_set(&sp->rx_bufs_left[i], 0); /* initialize the shared memory used by the NIC and the host */ - if (initSharedMem(sp)) { + if (init_shared_mem(sp)) { DBG_PRINT(ERR_DBG, "%s: Memory allocation failed\n", dev->name); goto mem_alloc_failed; @@ -4208,15 +4249,16 @@ dev->set_multicast_list = &s2io_set_multicast; dev->do_ioctl = &s2io_ioctl; dev->change_mtu = &s2io_change_mtu; +#ifdef SET_ETHTOOL_OPS SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); - +#endif /* * will use eth_mac_addr() for dev->set_mac_address * mac address will be set every time dev->open() is called */ #ifdef CONFIG_S2IO_NAPI dev->poll = s2io_poll; - dev->weight = 128; /* For now. */ + dev->weight = 90; /* For now. */ #endif dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM; @@ -4244,14 +4286,15 @@ if (s2io_set_swapper(sp)) { DBG_PRINT(ERR_DBG, "%s:swapper settings are wrong\n", dev->name); - goto set_swap_failed; + goto register_failed; } /* Fix for all "FFs" MAC address problems observed on Alpha platforms */ - FixMacAddress(sp); + fix_mac_address(sp); s2io_reset(sp); - /* Setting swapper control on the NIC, so the MAC address can be read. + /* + * Setting swapper control on the NIC, so the MAC address can be read. */ if (s2io_set_swapper(sp)) { DBG_PRINT(ERR_DBG, @@ -4260,50 +4303,52 @@ goto set_swap_failed; } - /* MAC address initialization. - * For now only one mac address will be read and used. + /* + * MAC address initialization. + * For now only one mac address will be read and used. */ bar0 = (XENA_dev_config_t *) sp->bar0; val64 = RMAC_ADDR_CMD_MEM_RD | RMAC_ADDR_CMD_MEM_STROBE_NEW_CMD | RMAC_ADDR_CMD_MEM_OFFSET(0 + MAC_MAC_ADDR_START_OFFSET); writeq(val64, &bar0->rmac_addr_cmd_mem); - waitForCmdComplete(sp); + wait_for_cmd_complete(sp); tmp64 = readq(&bar0->rmac_addr_data0_mem); mac_down = (u32) tmp64; mac_up = (u32) (tmp64 >> 32); - memset(sp->defMacAddr[0].mac_addr, 0, sizeof(ETH_ALEN)); + memset(sp->def_mac_addr[0].mac_addr, 0, sizeof(ETH_ALEN)); - sp->defMacAddr[0].mac_addr[3] = (u8) (mac_up); - sp->defMacAddr[0].mac_addr[2] = (u8) (mac_up >> 8); - sp->defMacAddr[0].mac_addr[1] = (u8) (mac_up >> 16); - sp->defMacAddr[0].mac_addr[0] = (u8) (mac_up >> 24); - sp->defMacAddr[0].mac_addr[5] = (u8) (mac_down >> 16); - sp->defMacAddr[0].mac_addr[4] = (u8) (mac_down >> 24); + sp->def_mac_addr[0].mac_addr[3] = (u8) (mac_up); + sp->def_mac_addr[0].mac_addr[2] = (u8) (mac_up >> 8); + sp->def_mac_addr[0].mac_addr[1] = (u8) (mac_up >> 16); + sp->def_mac_addr[0].mac_addr[0] = (u8) (mac_up >> 24); + sp->def_mac_addr[0].mac_addr[5] = (u8) (mac_down >> 16); + sp->def_mac_addr[0].mac_addr[4] = (u8) (mac_down >> 24); DBG_PRINT(INIT_DBG, "DEFAULT MAC ADDR:0x%02x-%02x-%02x-%02x-%02x-%02x\n", - sp->defMacAddr[0].mac_addr[0], - sp->defMacAddr[0].mac_addr[1], - sp->defMacAddr[0].mac_addr[2], - sp->defMacAddr[0].mac_addr[3], - sp->defMacAddr[0].mac_addr[4], - sp->defMacAddr[0].mac_addr[5]); + sp->def_mac_addr[0].mac_addr[0], + sp->def_mac_addr[0].mac_addr[1], + sp->def_mac_addr[0].mac_addr[2], + sp->def_mac_addr[0].mac_addr[3], + sp->def_mac_addr[0].mac_addr[4], + sp->def_mac_addr[0].mac_addr[5]); /* Set the factory defined MAC address initially */ dev->addr_len = ETH_ALEN; - memcpy(dev->dev_addr, sp->defMacAddr, ETH_ALEN); + memcpy(dev->dev_addr, sp->def_mac_addr, ETH_ALEN); /* Initialize the tasklet status flag */ atomic_set(&(sp->tasklet_status), 0); /* Initialize spinlocks */ - spin_lock_init(&sp->isr_lock); spin_lock_init(&sp->tx_lock); + spin_lock_init(&sp->isr_lock); - /* SXE-002: Configure link and activity LED to init state + /* + * SXE-002: Configure link and activity LED to init state * on driver load. */ subid = sp->pdev->subsystem_device; @@ -4316,15 +4361,16 @@ val64 = readq(&bar0->gpio_control); } - /* Make Link state as off at this point, when the Link change + sp->rx_csum = 1; /* Rx chksum verify enabled by default */ + + /* + * Make Link state as off at this point, when the Link change * interrupt comes the state will be automatically changed to * the right state. */ netif_carrier_off(dev); sp->last_link_state = LINK_DOWN; - sp->rx_csum = 1; /* Rx chksum verify enabled by default */ - return 0; set_swap_failed: @@ -4335,7 +4381,7 @@ iounmap(sp->bar0); bar0_remap_failed: mem_alloc_failed: - freeSharedMem(sp); + free_shared_mem(sp); init_failed: pci_disable_device(pdev); pci_release_regions(pdev); @@ -4345,16 +4391,15 @@ return -ENODEV; } -/* -* Input Argument/s: -* pdev - structure containing the PCI related information of the device. -* Return value: -* void -* Description: -* This function is called by the Pci subsystem to release a PCI device -* and free up all resource held up by the device. This could be in response -* to a Hot plug event or when the driver is to be removed from memory. -*/ +/** + * s2io_rem_nic - Free the PCI device + * @pdev: structure containing the PCI related information of the device. + * Description: This function is called by the Pci subsystem to release a + * PCI device and free up all resource held up by the device. This could + * be in response to a Hot plug event or when the driver is to be removed + * from memory. + */ + static void __devexit s2io_rem_nic(struct pci_dev *pdev) { struct net_device *dev = @@ -4365,24 +4410,36 @@ DBG_PRINT(ERR_DBG, "Driver Data is NULL!!\n"); return; } + sp = dev->priv; - freeSharedMem(sp); + unregister_netdev(dev); + + free_shared_mem(sp); iounmap(sp->bar0); iounmap(sp->bar1); pci_disable_device(pdev); pci_release_regions(pdev); pci_set_drvdata(pdev, NULL); - unregister_netdev(dev); - free_netdev(dev); } +/** + * s2io_starter - Entry point for the driver + * Description: This function is the entry point for the driver. It verifies + * the module loadable parameters and initializes PCI configuration space. + */ + int __init s2io_starter(void) { return pci_module_init(&s2io_driver); } +/** + * s2io_closer - Cleanup routine for the driver + * Description: This function is the cleanup routine for the driver. It unregist * ers the driver. + */ + void s2io_closer(void) { pci_unregister_driver(&s2io_driver); diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-06 11:31:09.532308264 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-06 13:03:08.087360376 -0700 @@ -16,6 +16,7 @@ #define TBD 0 #define BIT(loc) (0x8000000000000000ULL >> (loc)) #define vBIT(val, loc, sz) (((u64)val) << (64-loc-sz)) +#define INV(d) ((d&0xff)<<24) | (((d>>8)&0xff)<<16) | (((d>>16)&0xff)<<8)| ((d>>24)&0xff) #ifndef BOOL #define BOOL int @@ -49,11 +50,13 @@ #define ALIGN_SIZE 127 #define PCIX_COMMAND_REGISTER 0x62 +#ifndef SET_ETHTOOL_OPS +#define SUPPORTED_10000baseT_Full (1 << 12) +#endif + /* * Debug related variables. */ -#define DEBUG_ON TRUE - /* different debug levels. */ #define ERR_DBG 0 #define INIT_DBG 1 @@ -312,7 +315,7 @@ /* Maintains Per FIFO related information. */ typedef struct tx_fifo_config { #define MAX_AVAILABLE_TXDS 8192 - u32 FifoLen; /* specifies len of FIFO upto 8192, ie no of TxDLs */ + u32 fifo_len; /* specifies len of FIFO upto 8192, ie no of TxDLs */ /* Priority definition */ #define TX_FIFO_PRI_0 0 /*Highest */ #define TX_FIFO_PRI_1 1 @@ -322,9 +325,9 @@ #define TX_FIFO_PRI_5 5 #define TX_FIFO_PRI_6 6 #define TX_FIFO_PRI_7 7 /*lowest */ - u8 FifoPriority; /* specifies pointer level for FIFO */ + u8 fifo_priority; /* specifies pointer level for FIFO */ /* user should not set twos fifos with same pri */ - u8 fNoSnoop; + u8 f_no_snoop; #define NO_SNOOP_TXD 0x01 #define NO_SNOOP_TXD_BUFFER 0x02 } tx_fifo_config_t; @@ -332,7 +335,7 @@ /* Maintains per Ring related information */ typedef struct rx_ring_config { - u32 NumRxd; /*No of RxDs per Rx Ring */ + u32 num_rxd; /*No of RxDs per Rx Ring */ #define RX_RING_PRI_0 0 /* highest */ #define RX_RING_PRI_1 1 #define RX_RING_PRI_2 2 @@ -342,70 +345,37 @@ #define RX_RING_PRI_6 6 #define RX_RING_PRI_7 7 /* lowest */ - u8 RingPriority; /*Specifies service priority of ring */ + u8 ring_priority; /*Specifies service priority of ring */ /* OSM should not set any two rings with same priority */ - u8 RingOrg; /*Organization of ring */ + u8 ring_org; /*Organization of ring */ #define RING_ORG_BUFF1 0x01 #define RX_RING_ORG_BUFF3 0x03 #define RX_RING_ORG_BUFF5 0x05 -/* In case of 3 buffer recv. mode, size of three buffers is expected as.. */ -#define BUFF_SZ_1 22 /* ethernet header */ -#define BUFF_SZ_2 (64+64) /* max. IP+TCP header size */ -#define BUFF_SZ_3 (1500-20-20) /* TCP payload */ -#define BUFF_SZ_3_JUMBO (9600-20-20) /* Jumbo TCP payload */ - - u32 RxdThresh; /*No of used Rxds NIC can store before transfer to host */ -#define DEFAULT_RXD_THRESHOLD 0x1 /* TODO */ - u8 fNoSnoop; + u8 f_no_snoop; #define NO_SNOOP_RXD 0x01 #define NO_SNOOP_RXD_BUFFER 0x02 - u32 RxD_BackOff_Interval; -#define RXD_BACKOFF_INTERVAL_DEF 0x0 -#define RXD_BACKOFF_INTERVAL_MIN 0x0 -#define RXD_BACKOFF_INTERVAL_MAX 0x0 } rx_ring_config_t; /* This structure provides contains values of the tunable parameters * of the H/W */ struct config_param { - /* Tx Side */ - u32 TxFIFONum; /*Number of Tx FIFOs */ + u32 tx_fifo_num; /*Number of Tx FIFOs */ #define MAX_TX_FIFOS 8 - tx_fifo_config_t TxCfg[MAX_TX_FIFOS]; /*Per-Tx FIFO config */ - u32 MaxTxDs; /*Max no. of Tx buffer descriptor per TxDL */ - BOOL TxVLANEnable; /*TRUE: Insert VLAN ID, FALSE: Don't insert */ -#define TX_REQ_TIMEOUT_DEFAULT 0x0 -#define TX_REQ_TIMEOUT_MIN 0x0 -#define TX_REQ_TIMEOUT_MAX 0x0 - u32 TxReqTimeOut; - BOOL TxFlow; /*Tx flow control enable */ - BOOL RxFlow; - BOOL OverrideTxServiceState; /* TRUE: Overide, FALSE: Do not override - Use the new priority information - of service state. It is not recommended - to change but OSM can opt to do so */ -#define MAX_SERVICE_STATES 36 - u8 TxServiceState[MAX_SERVICE_STATES]; - /* Array element represent 'priority' - * and array index represents - * 'Service state' e.g. - * TxServiceState[3]=7; it means - * Service state 3 is associated - * with priority 7 of a Tx FIFO */ - u64 TxIntrType; /* Specifies if Tx Intr is UTILZ or PER_LIST type. */ + tx_fifo_config_t tx_cfg[MAX_TX_FIFOS]; /*Per-Tx FIFO config */ + u32 max_txds; /*Max no. of Tx buffer descriptor per TxDL */ + u64 tx_intr_type; + /* Specifies if Tx Intr is UTILZ or PER_LIST type. */ /* Rx Side */ - u32 RxRingNum; /*Number of receive rings */ + u32 rx_ring_num; /*Number of receive rings */ #define MAX_RX_RINGS 8 #define MAX_RX_BLOCKS_PER_RING 150 - rx_ring_config_t RxCfg[MAX_RX_RINGS]; /*Per-Rx Ring config */ - BOOL RxVLANEnable; /*TRUE: Strip off VLAN tag from the frame, - FALSE: Don't strip off VLAN tag */ + rx_ring_config_t rx_cfg[MAX_RX_RINGS]; /*Per-Rx Ring config */ #define HEADER_ETHERNET_II_802_3_SIZE 14 #define HEADER_802_2_SIZE 3 @@ -419,23 +389,6 @@ #define MAX_PYLD_JUMBO 9600 #define MAX_MTU_JUMBO (MAX_PYLD_JUMBO+18) #define MAX_MTU_JUMBO_VLAN (MAX_PYLD_JUMBO+22) - u32 MTU; /*Maximum Payload */ - BOOL JumboEnable; /*Enable Jumbo frames recv/send */ - BOOL OverrideRxServiceState; /* TRUE: Overide, FALSE: Do not override - Use the new priority information - of service state. It is not recommended - to change but OSM can opt to do so */ -#define MAX_SERVICE_STATES 36 - u8 RxServiceState[MAX_SERVICE_STATES]; - /* Array element represent 'priority' - * and array index represents - * 'Service state'e.g. - * RxServiceState[3]=7; it means - * Service state 3 is associated - * with priority 7 of a Rx FIFO */ - BOOL StatAutoRefresh; /* When true, StatRefreshTime have valid value */ - u32 StatRefreshTime; /*Time for refreshing statistics */ -#define STAT_TRSF_PER_1_SECOND 0x208D5 }; /* Structure representing MAC Addrs */ @@ -514,14 +467,9 @@ #define SET_NUM_TAG(val) vBIT(val,16,32) #define RXD_GET_BUFFER0_SIZE(Control_2) (u64)((Control_2 & vBIT(0xFFFF,0,16))) -/* -#define TXD_GET_BUFFER1_SIZE(Control_2) (u16)((Control_2 & MASK_BUFFER1_SIZE) >> (63-31)) -#define TXD_GET_BUFFER2_SIZE(Control_2) (u16)((Control_2 & MASK_BUFFER2_SIZE) >> (63-47)) -*/ u64 Buffer0_ptr; } RxD_t; - /* Structure that represents the Rx descriptor block which contains * 128 Rx descriptors. */ @@ -531,11 +479,12 @@ u64 reserved_0; #define END_OF_BLOCK 0xFEFFFFFFFFFFFFFFULL - u64 reserved_1; /* 0xFEFFFFFFFFFFFFFF to mark last Rxd in this blk */ - u64 reserved_2_pNext_RxD_block; /*@ Logical ptr to next */ - u64 pNext_RxD_Blk_physical; /* Buff0_ptr. - In a 32 bit arch the upper 32 bits - should be 0 */ + u64 reserved_1; /* 0xFEFFFFFFFFFFFFFF to mark last + * Rxd in this blk */ + u64 reserved_2_pNext_RxD_block; /* Logical ptr to next */ + u64 pNext_RxD_Blk_physical; /* Buff0_ptr.In a 32 bit arch + * the upper 32 bits should + * be 0 */ } RxD_block_t; /* Structure which stores all the MAC control parameters */ @@ -568,10 +517,6 @@ */ typedef struct mac_info { /* rx side stuff */ - u32 rxd_ring_mem_sz; - RxD_t *RxRing[MAX_RX_RINGS]; /* Logical Rx ring pointers */ - dma_addr_t RxRing_Phy[MAX_RX_RINGS]; - /* Put pointer info which indictes which RxD has to be replenished * with a new buffer. */ @@ -583,41 +528,29 @@ rx_curr_get_info_t rx_curr_get_info[MAX_RX_RINGS]; u16 rmac_pause_time; - - /* this will be used in receive function, this decides which ring would - be processed first. eg: ring with priority value 0 (highest) should - be processed first. - first 3 LSB bits represent ring number which should be processed - first, similarly next 3 bits represent next ring to be processed. - eg: value of _rx_ring_pri_map = 0x0000 003A means - ring #2 would be processed first and #7 would be processed next - */ - u32 _rx_ring_pri_map; + u16 mc_pause_threshold_q0q3; + u16 mc_pause_threshold_q4q7; /* tx side stuff */ - void *txd_list_mem; /* orignal pointer to allocated mem */ + void *txd_list_mem; /* original pointer to allocated mem */ dma_addr_t txd_list_mem_phy; u32 txd_list_mem_sz; /* logical pointer of start of each Tx FIFO */ TxFIFO_element_t *tx_FIFO_start[MAX_TX_FIFOS]; - /* logical pointer of start of TxDL which corresponds to each Tx FIFO */ + /* The Phy and virtual mem loactions of the Tx descriptors. */ TxD_t *txdl_start[MAX_TX_FIFOS]; - - /* Same as txdl_start but phy addr */ dma_addr_t txdl_start_phy[MAX_TX_FIFOS]; /* Current offset within tx_FIFO_start, where driver would write new Tx frame*/ tx_curr_put_info_t tx_curr_put_info[MAX_TX_FIFOS]; tx_curr_get_info_t tx_curr_get_info[MAX_TX_FIFOS]; - u16 txdl_len; /* length of a TxDL, same for all */ - void *stats_mem; /* orignal pointer to allocated mem */ dma_addr_t stats_mem_phy; /* Physical address of the stat block */ u32 stats_mem_sz; - StatInfo_t *StatsInfo; /* Logical address of the stat block */ + StatInfo_t *stats_info; /* Logical address of the stat block */ } mac_info_t; /* structure representing the user defined MAC addresses */ @@ -632,13 +565,20 @@ dma_addr_t block_dma_addr; } rx_block_info_t; +/* Default Tunable parameters of the NIC. */ +#define DEFAULT_FIFO_LEN 4096 +#define SMALL_RXD_CNT 30 * (MAX_RXDS_PER_BLOCK+1) +#define LARGE_RXD_CNT 100 * (MAX_RXDS_PER_BLOCK+1) +#define SMALL_BLK_CNT 30 +#define LARGE_BLK_CNT 100 + /* Structure representing one instance of the NIC */ typedef struct s2io_nic { #define MAX_MAC_SUPPORTED 16 #define MAX_SUPPORTED_MULTICASTS MAX_MAC_SUPPORTED - macaddr_t defMacAddr[MAX_MAC_SUPPORTED]; - macaddr_t preMacAddr[MAX_MAC_SUPPORTED]; + macaddr_t def_mac_addr[MAX_MAC_SUPPORTED]; + macaddr_t pre_mac_addr[MAX_MAC_SUPPORTED]; struct net_device_stats stats; caddr_t bar0; @@ -671,8 +611,8 @@ u32 irq; atomic_t rx_bufs_left[MAX_RX_RINGS]; - spinlock_t isr_lock; spinlock_t tx_lock; + spinlock_t isr_lock; #define PROMISC 1 #define ALL_MULTI 2 @@ -691,20 +631,11 @@ u16 tx_err_count; u16 rx_err_count; -#if DEBUG_ON - u64 rxpkt_bytes; - u64 txpkt_bytes; - int int_cnt; - int rxint_cnt; - int txint_cnt; - u64 rxpkt_cnt; -#endif - - /* Place holders for the virtual and physical addresses of + /* + * Place holders for the virtual and physical addresses of * all the Rx Blocks */ - struct rx_block_info - rx_blocks[MAX_RX_RINGS][MAX_RX_BLOCKS_PER_RING]; + rx_block_info_t rx_blocks[MAX_RX_RINGS][MAX_RX_BLOCKS_PER_RING]; int block_count[MAX_RX_RINGS]; int pkt_cnt[MAX_RX_RINGS]; @@ -742,19 +673,14 @@ #define RESET_ERROR 1; #define CMD_ERROR 2; -/* Default Tunable parameters of the NIC. */ -#define DEFAULT_FIFO_LEN 4096 -#define SMALL_RXD_CNT 40 * (MAX_RXDS_PER_BLOCK+1) -#define LARGE_RXD_CNT 100 * (MAX_RXDS_PER_BLOCK+1) - /* OS related system calls */ #ifndef readq static inline u64 readq(void *addr) { u64 ret = 0; ret = readl(addr + 4); - ret <<= 32; - ret |= readl(addr); + (u64) ret <<= 32; + (u64) ret |= readl(addr); return ret; } @@ -816,30 +742,36 @@ /* DMA level Inressupts */ #define TXDMA_PFC_INT_M BIT(0) - /* PFC block interrupts */ +#define TXDMA_PCC_INT_M BIT(2) + +/* PFC block interrupts */ #define PFC_MISC_ERR_1 BIT(0) /* Interrupt to indicate FIFO full */ +/* PCC block interrupts. */ +#define PCC_FB_ECC_ERR vBIT(0xff, 16, 8) /* Interrupt to indicate + PCC_FB_ECC Error. */ + /* * Prototype declaration. */ static int __devinit s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre); static void __devexit s2io_rem_nic(struct pci_dev *pdev); -static int initSharedMem(struct s2io_nic *sp); -static void freeSharedMem(struct s2io_nic *sp); -static int initNic(struct s2io_nic *nic); +static int init_shared_mem(struct s2io_nic *sp); +static void free_shared_mem(struct s2io_nic *sp); +static int init_nic(struct s2io_nic *nic); #ifndef CONFIG_S2IO_NAPI -static void rxIntrHandler(struct s2io_nic *sp); +static void rx_intr_handler(struct s2io_nic *sp); #endif -static void txIntrHandler(struct s2io_nic *sp); -static void alarmIntrHandler(struct s2io_nic *sp); +static void tx_intr_handler(struct s2io_nic *sp); +static void alarm_intr_handler(struct s2io_nic *sp); static int s2io_starter(void); void s2io_closer(void); static void s2io_tx_watchdog(struct net_device *dev); static void s2io_tasklet(unsigned long dev_addr); static void s2io_set_multicast(struct net_device *dev); -static int rxOsmHandler(nic_t * sp, u16 len, RxD_t * rxdp, int ring_no); +static int rx_osm_handler(nic_t * sp, u16 len, RxD_t * rxdp, int ring_no); void s2io_link(nic_t * sp, int link); void s2io_reset(nic_t * sp); #ifdef CONFIG_S2IO_NAPI @@ -849,6 +781,10 @@ int s2io_set_mac_addr(struct net_device *dev, u8 * addr); static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs *regs); static int verify_xena_quiescence(u64 val64, int flag); +int verify_load_parm(void); +#ifdef SET_ETHTOOL_OPS static struct ethtool_ops netdev_ethtool_ops; +#endif +static void s2io_set_link(unsigned long data); #endif /* _S2IO_H */ diff -urN vanilla-linux/drivers/net/s2io-regs.h linux-2.6.8.1/drivers/net/s2io-regs.h --- vanilla-linux/drivers/net/s2io-regs.h 2004-10-06 11:31:09.539307200 -0700 +++ linux-2.6.8.1/drivers/net/s2io-regs.h 2004-10-06 13:03:08.087360376 -0700 @@ -289,6 +289,8 @@ u64 tda_err_alarm; u64 pcc_err_reg; +#define PCC_FB_ECC_DB_ERR vBIT(0xFF, 16, 8) + u64 pcc_err_mask; u64 pcc_err_alarm; @@ -512,6 +514,7 @@ #define RX_PA_CFG_IGNORE_FRM_ERR BIT(1) #define RX_PA_CFG_IGNORE_SNAP_OUI BIT(2) #define RX_PA_CFG_IGNORE_LLC_CTRL BIT(3) +#define RX_PA_CFG_IGNORE_L2_ERR BIT(6) u8 unused12[0x700 - 0x1D8]; From ravinandan.arakali@s2io.com Thu Oct 28 15:42:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 15:42:17 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SMgA2O023987 for ; Thu, 28 Oct 2004 15:42:10 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SMffje010677; Thu, 28 Oct 2004 18:41:41 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SMfa39005824; Thu, 28 Oct 2004 18:41:36 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , , Subject: [PATCH 2.6.9-rc2 4/12] S2io: hardware fixes Date: Thu, 28 Oct 2004 15:50:20 -0700 Message-ID: <003f01c4bd40$8b19d8a0$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 11016 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Hi, Following are the code changes addressing the hardware errata mentioned in user guide. 1. Xena3's with a set of subsystem IDs had Link LED problems, fixed that specifically for them. 2. To write into the Keyed Mac_Cfg register to enable broadcast, writing two 32 bit writes into it along with a write to the key register rather than a single write to key and a 64 bit write to mac_cfg. This is necessary on 32 bit systems where a writeq(64 bit write) is actually two writel (32 bit writes). 3. Writes to some special registers mentioned in UG is being done by a special macro which defines which 32 bits of the 64 bit register is to be written first. Again this applies only on 32 bit systems. 4. Configured pause frame related water marks and a shared_split value which describes the Max TXDMA related split transaction that can be used without giving room for the Rx transactions. 5. The mac_rmac_err_reg R1 register will be cleared in the interrupt handler itself rather than in the scheduled task as was being done previously. 6. Even on PCC_FB_ECC error the card will be reset by disabling adapter enable bit. Signed-off-by: Raghavendra Koushik Signed-off-by: Ravinandan Arakali --- diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-07 11:44:04.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-07 11:45:41.000000000 -0700 @@ -71,6 +71,15 @@ static char s2io_driver_name[] = "s2io"; static char s2io_driver_version[] = "Version 1.7.5.1"; +/* + * Cards with following subsystem_id have a link state indication + * problem, 600B, 600C, 600D, 640B, 640C and 640D. + * macro below identifies these cards given the subsystem_id. + */ +#define CARDS_WITH_FAULTY_LINK_INDICATORS(subid) \ + (((subid >= 0x600B) && (subid <= 0x600D)) || \ + ((subid >= 0x640B) && (subid <= 0x640D))) ? 1 : 0 + #define LINK_IS_UP(val64) (!(val64 & (ADAPTER_STATUS_RMAC_REMOTE_FAULT | \ ADAPTER_STATUS_RMAC_LOCAL_FAULT))) #define TASKLET_IN_USE test_and_set_bit(0, \ @@ -563,10 +572,13 @@ schedule_timeout(HZ / 2); /* Enable Receiving broadcasts */ + add = (void *) &bar0->mac_cfg; val64 = readq(&bar0->mac_cfg); val64 |= MAC_RMAC_BCAST_ENABLE; writeq(RMAC_CFG_KEY(0x4C0D), &bar0->rmac_cfg_key); - writeq(val64, &bar0->mac_cfg); + writel((u32) val64, add); + writeq(RMAC_CFG_KEY(0x4C0D), &bar0->rmac_cfg_key); + writel((u32) (val64 >> 32), (add + 4)); /* Read registers in all blocks */ val64 = readq(&bar0->mac_int_mask); @@ -598,8 +610,8 @@ dtx_cnt++; goto mdio_cfg; } - writeq(default_dtx_cfg[dtx_cnt], - &bar0->dtx_control); + SPECIAL_REG_WRITE(default_dtx_cfg[dtx_cnt], + &bar0->dtx_control, UF); val64 = readq(&bar0->dtx_control); dtx_cnt++; } @@ -609,8 +621,8 @@ mdio_cnt++; goto dtx_cfg; } - writeq(default_mdio_cfg[mdio_cnt], - &bar0->mdio_control); + SPECIAL_REG_WRITE(default_mdio_cfg[mdio_cnt], + &bar0->mdio_control, UF); val64 = readq(&bar0->mdio_control); mdio_cnt++; } @@ -873,6 +885,47 @@ writel((u32) (val64 >> 32), (add + 4)); val64 = readq(&bar0->mac_cfg); + /* + * Set the time value to be inserted in the pause frame + * generated by xena. + */ + val64 = readq(&bar0->rmac_pause_cfg); + val64 &= ~(RMAC_PAUSE_HG_PTIME(0xffff)); + val64 |= RMAC_PAUSE_HG_PTIME(nic->mac_control.rmac_pause_time); + writeq(val64, &bar0->rmac_pause_cfg); + + /* + * Set the Threshold Limit for Generating the pause frame + * If the amount of data in any Queue exceeds ratio of + * (mac_control.mc_pause_threshold_q0q3 or q4q7)/256 + * pause frame is generated + */ + val64 = 0; + for (i = 0; i < 4; i++) { + val64 |= + (((u64) 0xFF00 | nic->mac_control. + mc_pause_threshold_q0q3) + << (i * 2 * 8)); + } + writeq(val64, &bar0->mc_pause_thresh_q0q3); + + val64 = 0; + for (i = 0; i < 4; i++) { + val64 |= + (((u64) 0xFF00 | nic->mac_control. + mc_pause_threshold_q4q7) + << (i * 2 * 8)); + } + writeq(val64, &bar0->mc_pause_thresh_q4q7); + + /* + * TxDMA will stop Read request if the number of read split has + * exceeded the limit pointed by shared_splits + */ + val64 = readq(&bar0->pic_control); + val64 |= PIC_CNTL_SHARED_SPLITS(0); + writeq(val64, &bar0->pic_control); + return SUCCESS; } @@ -1227,7 +1280,7 @@ */ val64 = readq(&bar0->mc_rldram_mrs); val64 |= MC_RLDRAM_QUEUE_SIZE_ENABLE | MC_RLDRAM_MRS_ENABLE; - writeq(val64, &bar0->mc_rldram_mrs); + SPECIAL_REG_WRITE(val64, &bar0->mc_rldram_mrs, UF); val64 = readq(&bar0->mc_rldram_mrs); set_current_state(TASK_UNINTERRUPTIBLE); @@ -1291,13 +1344,13 @@ * force link down. Since link is already up, we will get * link state change interrupt after this reset */ - writeq(0x80010515001E0000ULL, &bar0->dtx_control); + SPECIAL_REG_WRITE(0x80010515001E0000ULL, &bar0->dtx_control, UF); val64 = readq(&bar0->dtx_control); udelay(50); - writeq(0x80010515001E00E0ULL, &bar0->dtx_control); + SPECIAL_REG_WRITE(0x80010515001E00E0ULL, &bar0->dtx_control, UF); val64 = readq(&bar0->dtx_control); udelay(50); - writeq(0x80070515001F00E4ULL, &bar0->dtx_control); + SPECIAL_REG_WRITE(0x80070515001F00E4ULL, &bar0->dtx_control, UF); val64 = readq(&bar0->dtx_control); udelay(50); @@ -1884,6 +1937,7 @@ /* Handling link status change error Intr */ err_reg = readq(&bar0->mac_rmac_err_reg); + writeq(err_reg, &bar0->mac_rmac_err_reg); if (err_reg & RMAC_LINK_STATE_CHANGE_INT) { schedule_work(&nic->set_link_task); } @@ -1896,6 +1950,22 @@ schedule_work(&nic->rst_timer_task); } + /* + * Also as mentioned in the latest Errata sheets if the PCC_FB_ECC + * Error occurs, the adapter will be recycled by disabling the + * adapter enable bit and enabling it again after the device + * becomes Quiescent. + */ + val64 = readq(&bar0->pcc_err_reg); + writeq(val64, &bar0->pcc_err_reg); + if (val64 & PCC_FB_ECC_DB_ERR) { + u64 ac = readq(&bar0->adapter_control); + ac &= ~(ADAPTER_CNTL_EN); + writeq(ac, &bar0->adapter_control); + ac = readq(&bar0->adapter_control); + schedule_work(&nic->set_link_task); + } + /* Other type of interrupts are not being handled now, TODO */ } @@ -2870,12 +2940,13 @@ static int s2io_ethtool_idnic(struct net_device *dev, u32 data) { - u64 val64 = 0; + u64 val64 = 0, last_gpio_ctrl_val; nic_t *sp = dev->priv; XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; u16 subid; subid = sp->pdev->subsystem_device; + last_gpio_ctrl_val = readq(&bar0->gpio_control); if ((subid & 0xFF) < 0x07) { val64 = readq(&bar0->adapter_control); if (!(val64 & ADAPTER_CNTL_EN)) { @@ -2897,6 +2968,11 @@ schedule_timeout(MAX_SCHEDULE_TIMEOUT); del_timer_sync(&sp->id_timer); + if (CARDS_WITH_FAULTY_LINK_INDICATORS(subid)) { + writeq(last_gpio_ctrl_val, &bar0->gpio_control); + last_gpio_ctrl_val = readq(&bar0->gpio_control); + } + return 0; } @@ -2983,7 +3059,7 @@ val64 = I2C_CONTROL_DEV_ID(S2IO_DEV_ID) | I2C_CONTROL_ADDR(off) | I2C_CONTROL_BYTE_CNT(0x3) | I2C_CONTROL_READ | I2C_CONTROL_CNTL_START; - writeq(val64, &bar0->i2c_control); + SPECIAL_REG_WRITE(val64, &bar0->i2c_control, LF); while (exit_cnt < 5) { val64 = readq(&bar0->i2c_control); @@ -3024,7 +3100,7 @@ val64 = I2C_CONTROL_DEV_ID(S2IO_DEV_ID) | I2C_CONTROL_ADDR(off) | I2C_CONTROL_BYTE_CNT(cnt) | I2C_CONTROL_SET_DATA(data) | I2C_CONTROL_CNTL_START; - writeq(val64, &bar0->i2c_control); + SPECIAL_REG_WRITE(val64, &bar0->i2c_control, LF); while (exit_cnt < 5) { val64 = readq(&bar0->i2c_control); @@ -3352,10 +3428,10 @@ val64 = readq(&bar0->mc_rldram_mrs); val64 |= MC_RLDRAM_QUEUE_SIZE_ENABLE; - writeq(val64, &bar0->mc_rldram_mrs); + SPECIAL_REG_WRITE(val64, &bar0->mc_rldram_mrs, UF); val64 |= MC_RLDRAM_MRS_ENABLE; - writeq(val64, &bar0->mc_rldram_mrs); + SPECIAL_REG_WRITE(val64, &bar0->mc_rldram_mrs, UF); while (iteration < 2) { val64 = 0x55555555aaaa0000ULL; @@ -3757,8 +3833,10 @@ nic_t *nic = (nic_t *) data; struct net_device *dev = nic->dev; XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; - register u64 val64, err_reg; + register u64 val64; + u16 subid; + subid = nic->pdev->subsystem_device; /* * Allow a small delay for the NICs self initiated * cleanup to complete. @@ -3768,16 +3846,19 @@ val64 = readq(&bar0->adapter_status); if (verify_xena_quiescence(val64, nic->device_enabled_once)) { - /* Acknowledge Intr and clear R1 register. */ - err_reg = readq(&bar0->mac_rmac_err_reg); - writeq(err_reg, &bar0->mac_rmac_err_reg); - if (LINK_IS_UP(val64)) { val64 = readq(&bar0->adapter_control); val64 |= ADAPTER_CNTL_EN; writeq(val64, &bar0->adapter_control); - val64 |= ADAPTER_LED_ON; - writeq(val64, &bar0->adapter_control); + if (CARDS_WITH_FAULTY_LINK_INDICATORS(subid)) { + val64 = readq(&bar0->gpio_control); + val64 |= GPIO_CTRL_GPIO_0; + writeq(val64, &bar0->gpio_control); + val64 = readq(&bar0->gpio_control); + } else { + val64 |= ADAPTER_LED_ON; + writeq(val64, &bar0->adapter_control); + } val64 = readq(&bar0->adapter_status); if (!LINK_IS_UP(val64)) { DBG_PRINT(ERR_DBG, "%s:", dev->name); @@ -3791,6 +3872,12 @@ } s2io_link(nic, LINK_UP); } else { + if (CARDS_WITH_FAULTY_LINK_INDICATORS(subid)) { + val64 = readq(&bar0->gpio_control); + val64 &= ~GPIO_CTRL_GPIO_0; + writeq(val64, &bar0->gpio_control); + val64 = readq(&bar0->gpio_control); + } s2io_link(nic, LINK_DOWN); } } else { /* NIC is not Quiescent. */ @@ -3917,6 +4004,7 @@ return SUCCESS; } + /** * s2io_link - stops/starts the Tx queue. * @sp : private member of the device structure, which is a pointer to the diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-07 11:44:04.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-08 15:20:09.316690064 -0700 @@ -693,6 +693,27 @@ writel((u32) (val), addr); writel((u32) (val >> 32), (addr + 4)); } + +/* In 32 bit modes, some registers have to be written in a + * particular order to expect correct hardware operation. The + * macro SPECIAL_REG_WRITE is used to perform such ordered + * writes. Defines UF (Upper First) and LF (Lower First) will + * be used to specify the required write order. + */ +#define UF 1 +#define LF 2 +static inline void SPECIAL_REG_WRITE(u64 val, void *addr, int order) +{ + if (order == LF) { + writel((u32) (val), addr); + writel((u32) (val >> 32), (addr + 4)); + } else { + writel((u32) (val >> 32), (addr + 4)); + writel((u32) (val), addr); + } +} +#else +#define SPECIAL_REG_WRITE(val, addr, dummy) writeq(val, addr) #endif /* Interrupt related values of Xena */ From ravinandan.arakali@s2io.com Thu Oct 28 15:42:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 15:42:37 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SMgLWP024192 for ; Thu, 28 Oct 2004 15:42:22 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SMfpje010680; Thu, 28 Oct 2004 18:41:51 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SMfj39005853; Thu, 28 Oct 2004 18:41:45 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , , Subject: [PATCH 2.6.9-rc2 5/12] S2io: module loadable parameters Date: Thu, 28 Oct 2004 15:50:26 -0700 Message-ID: <004001c4bd40$909ad7c0$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 11017 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Hi, This patch adds/modifies the following module loadable parameters. 1. Max Txds per List. 2. statistics refresh time 3. pause frame control parameters including gap between two successive frames, threshold watermarks 4. RTI and TTI configuration parameters including ranges, packet counts and timeout periods. For further information please read the section 3.5 of XFrame H/W spec. 5. PCI/PCI-X configuration variables latency_timer, MMRBC and OST. 6. OS offload features TSO (If support available) and checksum offload. 7. If NAPI is not in use, a variable indicate_max_pkts can be used to limit number of Rx side packets processed for one call to Rx Intr handler. Signed-off-by: Raghavendra Koushik Signed-off-by: Ravinandan Arakali --- diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-11 15:33:35.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-11 15:34:23.000000000 -0700 @@ -223,14 +223,66 @@ }; /* Module Loadable parameters. */ -static u32 ring_num; static u32 frame_len[MAX_RX_RINGS]; -static u32 ring_len[MAX_RX_RINGS]; -static u32 fifo_num; -static u32 fifo_len[MAX_TX_FIFOS]; static u32 rx_prio; static u32 tx_prio; -static u8 latency_timer; + +static unsigned int lso_enable = 1; +#ifndef CONFIG_S2IO_NAPI +static unsigned int indicate_max_pkts; +#endif +static unsigned int cksum_offload_enable = 1; +static unsigned int tx_fifo_num = 1; +static unsigned int tx_fifo_len_0 = DEFAULT_FIFO_LEN; +static unsigned int tx_fifo_len_1; +static unsigned int tx_fifo_len_2; +static unsigned int tx_fifo_len_3; +static unsigned int tx_fifo_len_4; +static unsigned int tx_fifo_len_5; +static unsigned int tx_fifo_len_6; +static unsigned int tx_fifo_len_7; +static unsigned int max_txds = MAX_SKB_FRAGS; +static unsigned int rx_ring_num = 1; +static unsigned int rx_ring_sz_0 = SMALL_BLK_CNT; +static unsigned int rx_ring_sz_1; +static unsigned int rx_ring_sz_2; +static unsigned int rx_ring_sz_3; +static unsigned int rx_ring_sz_4; +static unsigned int rx_ring_sz_5; +static unsigned int rx_ring_sz_6; +static unsigned int rx_ring_sz_7; +static unsigned int Stats_refresh_time = 4; +static unsigned int rmac_pause_time = 65535; +static unsigned int mc_pause_threshold_q0q3 = 187; +static unsigned int mc_pause_threshold_q4q7 = 187; +static unsigned int shared_splits; +#if defined(__ia64__) +static unsigned int max_splits_trans = XENA_THREE_SPLIT_TRANSACTION; +#else +static unsigned int max_splits_trans = XENA_TWO_SPLIT_TRANSACTION; +#endif +static unsigned int tmac_util_period = 5; +static unsigned int rmac_util_period = 5; +static unsigned int tx_timer_val = 0xFFF; +static unsigned int tx_utilz_periodic = 1; +static unsigned int rx_timer_val = 0xFFF; +static unsigned int rx_utilz_periodic = 1; +static unsigned int tx_urange_a = 0xA; +static unsigned int tx_ufc_a = 0x10; +static unsigned int tx_urange_b = 0x10; +static unsigned int tx_ufc_b = 0x20; +static unsigned int tx_urange_c = 0x30; +static unsigned int tx_ufc_c = 0x40; +static unsigned int tx_ufc_d = 0x80; +static unsigned int rx_urange_a = 0xA; +static unsigned int rx_ufc_a = 0x1; +static unsigned int rx_urange_b = 0x10; +static unsigned int rx_ufc_b = 0x2; +static unsigned int rx_urange_c = 0x30; +static unsigned int rx_ufc_c = 0x40; +static unsigned int rx_ufc_d = 0x80; +static u8 latency_timer = 0xf8; +static u8 max_read_byte_cnt = 2; /* * S2IO device table. @@ -782,14 +834,16 @@ /* Enable statistics */ writeq(mac_control->stats_mem_phy, &bar0->stat_addr); - val64 = SET_UPDT_PERIOD(8) | STAT_CFG_STAT_RO | STAT_CFG_STAT_EN; + val64 = SET_UPDT_PERIOD(Stats_refresh_time) | + STAT_CFG_STAT_RO | STAT_CFG_STAT_EN; writeq(val64, &bar0->stat_cfg); /* * Initializing the sampling rate for the device to calculate the * bandwidth utilization. */ - val64 = MAC_TX_LINK_UTIL_VAL(0x5) | MAC_RX_LINK_UTIL_VAL(0x5); + val64 = MAC_TX_LINK_UTIL_VAL(tmac_util_period) | + MAC_RX_LINK_UTIL_VAL(rmac_util_period); writeq(val64, &bar0->mac_link_util); @@ -798,14 +852,18 @@ * Scheme. */ /* TTI Initialization */ - val64 = TTI_DATA1_MEM_TX_TIMER_VAL(0xFFF) | - TTI_DATA1_MEM_TX_URNG_A(0xA) | TTI_DATA1_MEM_TX_URNG_B(0x10) | - TTI_DATA1_MEM_TX_URNG_C(0x30) | TTI_DATA1_MEM_TX_TIMER_AC_EN; + val64 = TTI_DATA1_MEM_TX_TIMER_VAL(tx_timer_val) | + TTI_DATA1_MEM_TX_URNG_A(tx_urange_a) | + TTI_DATA1_MEM_TX_URNG_B(tx_urange_b) | + TTI_DATA1_MEM_TX_URNG_C(tx_urange_c); + if (tx_utilz_periodic) + val64 |= TTI_DATA1_MEM_TX_TIMER_AC_EN; writeq(val64, &bar0->tti_data1_mem); - val64 = - TTI_DATA2_MEM_TX_UFC_A(0x10) | TTI_DATA2_MEM_TX_UFC_B(0x20) | - TTI_DATA2_MEM_TX_UFC_C(0x40) | TTI_DATA2_MEM_TX_UFC_D(0x80); + val64 = TTI_DATA2_MEM_TX_UFC_A(tx_ufc_a) | + TTI_DATA2_MEM_TX_UFC_B(tx_ufc_b) | + TTI_DATA2_MEM_TX_UFC_C(tx_ufc_c) | + TTI_DATA2_MEM_TX_UFC_D(tx_ufc_d); writeq(val64, &bar0->tti_data2_mem); val64 = TTI_CMD_MEM_WE | TTI_CMD_MEM_STROBE_NEW_CMD; @@ -834,13 +892,19 @@ } /* RTI Initialization */ - val64 = RTI_DATA1_MEM_RX_TIMER_VAL(0xFFF) | - RTI_DATA1_MEM_RX_URNG_A(0xA) | RTI_DATA1_MEM_RX_URNG_B(0x10) | - RTI_DATA1_MEM_RX_URNG_C(0x30) | RTI_DATA1_MEM_RX_TIMER_AC_EN; + val64 = RTI_DATA1_MEM_RX_TIMER_VAL(rx_timer_val) | + RTI_DATA1_MEM_RX_URNG_A(rx_urange_a) | + RTI_DATA1_MEM_RX_URNG_B(rx_urange_b) | + RTI_DATA1_MEM_RX_URNG_C(rx_urange_c); + if (rx_utilz_periodic) + val64 |= RTI_DATA1_MEM_RX_TIMER_AC_EN; + writeq(val64, &bar0->rti_data1_mem); - val64 = RTI_DATA2_MEM_RX_UFC_A(0x1) | RTI_DATA2_MEM_RX_UFC_B(0x2) | - RTI_DATA2_MEM_RX_UFC_C(0x40) | RTI_DATA2_MEM_RX_UFC_D(0x80); + val64 = RTI_DATA2_MEM_RX_UFC_A(rx_ufc_a) | + RTI_DATA2_MEM_RX_UFC_B(rx_ufc_b) | + RTI_DATA2_MEM_RX_UFC_C(rx_ufc_c) | + RTI_DATA2_MEM_RX_UFC_D(rx_ufc_d); writeq(val64, &bar0->rti_data2_mem); val64 = RTI_CMD_MEM_WE | RTI_CMD_MEM_STROBE_NEW_CMD; @@ -923,7 +987,7 @@ * exceeded the limit pointed by shared_splits */ val64 = readq(&bar0->pic_control); - val64 |= PIC_CNTL_SHARED_SPLITS(0); + val64 |= PIC_CNTL_SHARED_SPLITS(shared_splits); writeq(val64, &bar0->pic_control); return SUCCESS; @@ -1381,7 +1445,7 @@ for (i = 0; i < config->tx_fifo_num; i++) { for (j = 0; j < config->tx_cfg[i].fifo_len - 1; j++) { txdp = mac_control->txdl_start[i] + - (config->max_txds * j); + (config->max_txds * j); skb = (struct sk_buff *) ((unsigned long) txdp-> Host_Control); @@ -1807,7 +1871,12 @@ mac_control->rx_curr_get_info[i].offset = offset_info.offset; pkt_cnt++; + if ((indicate_max_pkts) + && (pkt_cnt > indicate_max_pkts)) + break; } + if ((indicate_max_pkts) && (pkt_cnt > indicate_max_pkts)) + break; } } #endif @@ -4004,7 +4073,6 @@ return SUCCESS; } - /** * s2io_link - stops/starts the Tx queue. * @sp : private member of the device structure, which is a pointer to the @@ -4088,17 +4156,23 @@ &latency_timer); } - /* Set MMRB count to 4096 in PCI-X Command register. */ + /* Set MMRB count to 2048 in PCI-X Command register. */ + sp->pcix_cmd &= 0xFFF3; pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, - (sp->pcix_cmd | 0x0C)); + (sp->pcix_cmd | (max_read_byte_cnt << 2))); pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); /* Setting Maximum outstanding splits based on system type. */ sp->pcix_cmd &= 0xFF8F; - sp->pcix_cmd |= - XENA_MAX_OUTSTANDING_SPLITS(XENA_TWO_SPLIT_TRANSACTION); + sp->pcix_cmd |= XENA_MAX_OUTSTANDING_SPLITS(max_splits_trans); + pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, + sp->pcix_cmd); + pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, + &(sp->pcix_cmd)); + /* Forcibly disabling relaxed ordering capability of the card. */ + sp->pcix_cmd &= 0xfffd; pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, sp->pcix_cmd); pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, @@ -4107,14 +4181,58 @@ MODULE_AUTHOR("Raghavendra Koushik "); MODULE_LICENSE("GPL"); -MODULE_PARM(ring_num, "1-" __MODULE_STRING(1) "i"); -MODULE_PARM(frame_len, "1-" __MODULE_STRING(8) "i"); -MODULE_PARM(ring_len, "1-" __MODULE_STRING(8) "i"); -MODULE_PARM(fifo_num, "1-" __MODULE_STRING(1) "i"); -MODULE_PARM(fifo_len, "1-" __MODULE_STRING(8) "i"); -MODULE_PARM(rx_prio, "1-" __MODULE_STRING(1) "i"); -MODULE_PARM(tx_prio, "1-" __MODULE_STRING(1) "i"); -MODULE_PARM(latency_timer, "1-" __MODULE_STRING(1) "i"); +MODULE_PARM(lso_enable, "i"); +#ifndef CONFIG_S2IO_NAPI +MODULE_PARM(indicate_max_pkts, "i"); +#endif +MODULE_PARM(cksum_offload_enable, "i"); +MODULE_PARM(tx_fifo_num, "i"); +MODULE_PARM(tx_fifo_len_0, "i"); +MODULE_PARM(tx_fifo_len_1, "i"); +MODULE_PARM(tx_fifo_len_2, "i"); +MODULE_PARM(tx_fifo_len_3, "i"); +MODULE_PARM(tx_fifo_len_4, "i"); +MODULE_PARM(tx_fifo_len_5, "i"); +MODULE_PARM(tx_fifo_len_6, "i"); +MODULE_PARM(tx_fifo_len_7, "i"); +MODULE_PARM(max_txds, "i"); +MODULE_PARM(rx_ring_num, "i"); +MODULE_PARM(rx_ring_sz_0, "i"); +MODULE_PARM(rx_ring_sz_1, "i"); +MODULE_PARM(rx_ring_sz_2, "i"); +MODULE_PARM(rx_ring_sz_3, "i"); +MODULE_PARM(rx_ring_sz_4, "i"); +MODULE_PARM(rx_ring_sz_5, "i"); +MODULE_PARM(rx_ring_sz_6, "i"); +MODULE_PARM(rx_ring_sz_7, "i"); +MODULE_PARM(Stats_refresh_time, "i"); +MODULE_PARM(rmac_pause_time, "i"); +MODULE_PARM(mc_pause_threshold_q0q3, "i"); +MODULE_PARM(mc_pause_threshold_q4q7, "i"); +MODULE_PARM(shared_splits, "i"); +MODULE_PARM(max_splits_trans, "i"); +MODULE_PARM(tmac_util_period, "i"); +MODULE_PARM(rmac_util_period, "i"); +MODULE_PARM(tx_timer_val, "i"); +MODULE_PARM(tx_utilz_periodic, "i"); +MODULE_PARM(rx_timer_val, "i"); +MODULE_PARM(rx_utilz_periodic, "i"); +MODULE_PARM(tx_urange_a, "i"); +MODULE_PARM(tx_ufc_a, "i"); +MODULE_PARM(tx_urange_b, "i"); +MODULE_PARM(tx_ufc_b, "i"); +MODULE_PARM(tx_urange_c, "i"); +MODULE_PARM(tx_ufc_c, "i"); +MODULE_PARM(tx_ufc_d, "i"); +MODULE_PARM(rx_urange_a, "i"); +MODULE_PARM(rx_ufc_a, "i"); +MODULE_PARM(rx_urange_b, "i"); +MODULE_PARM(rx_ufc_b, "i"); +MODULE_PARM(rx_urange_c, "i"); +MODULE_PARM(rx_ufc_c, "i"); +MODULE_PARM(rx_ufc_d, "i"); +MODULE_PARM(latency_timer, "i"); +MODULE_PARM(max_read_byte_cnt, "i"); /** * s2io_init_nic - Initialization of the adapter . * @pdev : structure containing the PCI related information of the device. @@ -4215,33 +4333,23 @@ config = &sp->config; /* Tx side parameters. */ - config->tx_fifo_num = fifo_num ? fifo_num : 1; - - if (!fifo_len[0] && (fifo_num > 1)) { - printk(KERN_ERR "Fifo Lens not specified for all FIFOs\n"); - goto init_failed; - } - - if (fifo_len[0]) { - int cnt; - - for (cnt = 0; fifo_len[cnt]; cnt++); - if (fifo_num) { - if (cnt < fifo_num) { - printk(KERN_ERR - "Fifo Lens not specified for "); - printk(KERN_ERR "all FIFOs\n"); - goto init_failed; - } - } - for (cnt = 0; cnt < config->tx_fifo_num; cnt++) { - config->tx_cfg[cnt].fifo_len = fifo_len[cnt]; - config->tx_cfg[cnt].fifo_priority = cnt; - } - } else { - config->tx_cfg[0].fifo_len = DEFAULT_FIFO_LEN; - config->tx_cfg[0].fifo_priority = 0; - } + config->tx_fifo_num = tx_fifo_num; + config->tx_cfg[0].fifo_len = tx_fifo_len_0; + config->tx_cfg[0].fifo_priority = 0; + config->tx_cfg[1].fifo_len = tx_fifo_len_1; + config->tx_cfg[1].fifo_priority = 1; + config->tx_cfg[2].fifo_len = tx_fifo_len_2; + config->tx_cfg[2].fifo_priority = 2; + config->tx_cfg[3].fifo_len = tx_fifo_len_3; + config->tx_cfg[3].fifo_priority = 3; + config->tx_cfg[4].fifo_len = tx_fifo_len_4; + config->tx_cfg[4].fifo_priority = 4; + config->tx_cfg[5].fifo_len = tx_fifo_len_5; + config->tx_cfg[5].fifo_priority = 5; + config->tx_cfg[6].fifo_len = tx_fifo_len_6; + config->tx_cfg[6].fifo_priority = 6; + config->tx_cfg[7].fifo_len = tx_fifo_len_7; + config->tx_cfg[7].fifo_priority = 7; config->tx_intr_type = TXD_INT_TYPE_UTILZ; for (i = 0; i < config->tx_fifo_num; i++) { @@ -4255,27 +4363,34 @@ config->max_txds = MAX_SKB_FRAGS; /* Rx side parameters. */ - config->rx_ring_num = ring_num ? ring_num : 1; + config->rx_ring_num = rx_ring_num; + config->rx_cfg[0].num_rxd = rx_ring_sz_0 * (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[0].ring_priority = 0; + config->rx_cfg[1].num_rxd = rx_ring_sz_1 * (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[1].ring_priority = 1; + config->rx_cfg[2].num_rxd = rx_ring_sz_2 * (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[2].ring_priority = 2; + config->rx_cfg[3].num_rxd = rx_ring_sz_3 * (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[3].ring_priority = 3; + config->rx_cfg[4].num_rxd = rx_ring_sz_4 * (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[4].ring_priority = 4; + config->rx_cfg[5].num_rxd = rx_ring_sz_5 * (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[5].ring_priority = 5; + config->rx_cfg[6].num_rxd = rx_ring_sz_6 * (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[6].ring_priority = 6; + config->rx_cfg[7].num_rxd = rx_ring_sz_7 * (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[7].ring_priority = 7; - if (ring_len[0]) { - int cnt; - for (cnt = 0; cnt < config->rx_ring_num; cnt++) { - config->rx_cfg[cnt].num_rxd = ring_len[cnt]; - config->rx_cfg[cnt].ring_priority = cnt; - } - } else { - config->rx_cfg[0].num_rxd = SMALL_RXD_CNT; - config->rx_cfg[0].ring_priority = 0; - } - - for (i = 0; i < config->rx_ring_num; i++) { + for (i = 0; i < rx_ring_num; i++) { config->rx_cfg[i].ring_org = RING_ORG_BUFF1; config->rx_cfg[i].f_no_snoop = (NO_SNOOP_RXD | NO_SNOOP_RXD_BUFFER); } /* Setting Mac Control parameters */ - mac_control->rmac_pause_time = 0; + mac_control->rmac_pause_time = rmac_pause_time; + mac_control->mc_pause_threshold_q0q3 = mc_pause_threshold_q0q3; + mac_control->mc_pause_threshold_q4q7 = mc_pause_threshold_q4q7; /* Initialize Ring buffer parameters. */ @@ -4334,11 +4449,14 @@ dev->weight = 90; /* For now. */ #endif - dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM; + dev->features |= NETIF_F_SG; + if (cksum_offload_enable) + dev->features |= NETIF_F_IP_CSUM; if (sp->high_dma_flag == TRUE) dev->features |= NETIF_F_HIGHDMA; #ifdef NETIF_F_TSO - dev->features |= NETIF_F_TSO; + if (lso_enable) + dev->features |= NETIF_F_TSO; #endif dev->tx_timeout = &s2io_tx_watchdog; @@ -4453,7 +4571,6 @@ bar0_remap_failed: mem_alloc_failed: free_shared_mem(sp); - init_failed: pci_disable_device(pdev); pci_release_regions(pdev); pci_set_drvdata(pdev, NULL); @@ -4503,6 +4620,8 @@ int __init s2io_starter(void) { + if (verify_load_parm()) + return -ENODEV; return pci_module_init(&s2io_driver); } @@ -4519,3 +4638,223 @@ module_init(s2io_starter); module_exit(s2io_closer); +/** + * verify_load_parm - verifies the module loadable parameters + * Descriptions: Verifies the module loadable parameters and initializes the + * Tx Fifo, Rx Ring and other paramters. + */ + +int verify_load_parm() +{ + int fail = 0; + if (!((lso_enable == 0) || (lso_enable == 1))) { + printk("lso_enable can be either '1' or '0'\n"); + fail = 1; + } +#ifndef CONFIG_S2IO_NAPI + if ((indicate_max_pkts > (0xFFFFFFFF))) { + printk + ("indicate_max_pkts can take value greater than zero but less than 2power(32)\n"); + fail = 1; + } +#endif + if (!((cksum_offload_enable == 0) || (cksum_offload_enable == 1))) { + printk("cksum_offload_enable can be only '0' or '1' \n"); + fail = 1; + } + if ((tx_fifo_num == 0) || (tx_fifo_num > 8)) { + printk("tx_fifo_num can take value from 1 to 8\n"); + fail = 1; + } + switch (tx_fifo_num) { + case 8: + if ((tx_fifo_len_7 == 0) || tx_fifo_len_7 > 8192) { + printk + ("tx_fifo_len_7 can take value from 1 to 8192\n"); + fail = 1; + } + case 7: + if ((tx_fifo_len_6 == 0) || tx_fifo_len_6 > 8192) { + printk + ("tx_fifo_len_6 can take value from 1 to 8192\n"); + fail = 1; + } + case 6: + if ((tx_fifo_len_5 == 0) || tx_fifo_len_5 > 8192) { + printk + ("tx_fifo_len_5 can take value from 1 to 8192\n"); + fail = 1; + } + case 5: + if ((tx_fifo_len_4 == 0) || tx_fifo_len_4 > 8192) { + printk + ("tx_fifo_len_4 can take value from 1 to 8192\n"); + fail = 1; + } + case 4: + if ((tx_fifo_len_3 == 0) || tx_fifo_len_3 > 8192) { + printk + ("tx_fifo_len_3 can take value from 1 to 8192\n"); + fail = 1; + } + case 3: + if ((tx_fifo_len_2 == 0) || tx_fifo_len_2 > 8192) { + printk + ("tx_fifo_len_2 can take value from 1 to 8192\n"); + fail = 1; + } + case 2: + if ((tx_fifo_len_1 == 0) || tx_fifo_len_1 > 8192) { + printk + ("tx_fifo_len_1 can take value from 1 to 8192\n"); + fail = 1; + } + case 1: + if ((tx_fifo_len_0 == 0) || tx_fifo_len_0 > 8192) { + printk + ("tx_fifo_len_0 can take value from 1 to 8192\n"); + fail = 1; + } + } + if ((max_txds > 32) || (max_txds < 1)) { + printk("max_txds can take value from 1 to 32\n"); + fail = 1; + } + if ((rx_ring_num > 8) || (rx_ring_num < 1)) { + printk("rx_ring_num can take value from 1 to 8\n"); + fail = 1; + } + switch (rx_ring_num) { + case 8: + if (rx_ring_sz_7 < 1) { + printk + ("rx_ring_sz_7 can take value greater than 0\n"); + fail = 1; + } + case 7: + if (rx_ring_sz_6 < 1) { + printk + ("rx_ring_sz_6 can take value greater than 0\n"); + fail = 1; + } + case 6: + if (rx_ring_sz_5 < 1) { + printk + ("rx_ring_sz_5 can take value greater than 0\n"); + fail = 1; + } + case 5: + if (rx_ring_sz_4 < 1) { + printk + ("rx_ring_sz_4 can take value greater than 0\n"); + fail = 1; + } + case 4: + if (rx_ring_sz_3 < 1) { + printk + ("rx_ring_sz_3 can take value greater than 0\n"); + fail = 1; + } + case 3: + if (rx_ring_sz_2 < 1) { + printk + ("rx_ring_sz_2 can take value greater than 0\n"); + fail = 1; + } + case 2: + if (rx_ring_sz_1 < 1) { + printk + ("rx_ring_sz_1 can take value greater than 0\n"); + fail = 1; + } + case 1: + if (rx_ring_sz_0 < 1) { + printk + ("rx_ring_sz_0 can take value greater than 0\n"); + fail = 1; + } + } + if ((Stats_refresh_time < 1)) { + printk + ("Stats_refresh_time cannot be less than 1 second \n"); + fail = 1; + } + if (((rmac_pause_time < 0x10) && (rmac_pause_time != 0)) || + (rmac_pause_time > 0xFFFF)) { + printk + ("rmac_pause_time can take value from 16 to 65535\n"); + fail = 1; + } + if (max_splits_trans > 7) { + printk("max_splits_trans can take value from 0 to 7\n"); + fail = 1; + } + if ((mc_pause_threshold_q0q3 > 0xFE)) { + printk("mc_pause_threshold_q0q3 cannot exceed 254\n"); + fail = 1; + } + if ((mc_pause_threshold_q4q7 > 0xFE)) { + printk("mc_pause_threshold_q4q7 cannot exceed 254\n"); + fail = 1; + } + if ((latency_timer) + && ((latency_timer < 8) || (latency_timer > 255))) { + printk("latency_timer can take value from 8 to 255\n"); + fail = 1; + } + if (max_read_byte_cnt > 3) { + printk("max_read_byte_cnt can take value from 0 to 3\n"); + fail = 1; + } + if (shared_splits > 31) { + printk("shared_splits cannot exceed 31\n"); + fail = 1; + } + if (rmac_util_period > 0xF) { + printk("rmac_util_period cannot exceed 15\n"); + fail = 1; + } + if (tmac_util_period > 0xF) { + printk("tmac_util_period cannot exceed 15\n"); + fail = 1; + } + if ((tx_utilz_periodic > 1) || (rx_utilz_periodic > 1)) { + printk + ("tx_utilz_periodic & rx_utilz_periodic can be either " + "'0' or '1'\n"); + fail = 1; + } + if (((tx_urange_a > 100) || (tx_urange_b > 100) || + (tx_urange_c > 100)) || (tx_urange_a > tx_urange_b) + || (tx_urange_b > tx_urange_c)) { + printk + ("tx_urange_a, tx_urange_b & tx_urange_c can take value " + "from 0 to 100 and range_a can't exceed range_b " + "neither can range_b exceed range_c\n"); + fail = 1; + } + if (((rx_urange_a > 100) || (rx_urange_b > 100) || + (rx_urange_c > 100)) || (rx_urange_a > rx_urange_b) + || (rx_urange_b > rx_urange_c)) { + printk + ("rx_urange_a, rx_urange_b & rx_urange_c can take value " + "from 0 to 100 and range_a can't exceed range_b " + "neither can range_b exceed range_c\n"); + fail = 1; + } + if ((tx_ufc_a > 0xffff) || (tx_ufc_b > 0xffff) || + (tx_ufc_c > 0xffff) || (tx_ufc_d > 0xffff)) { + printk + (" tx_ufc_a, tx_ufc_b, tx_ufc_c, tx_ufc_d can take value" + "from 0 to 65535(0xFFFF)\n"); + fail = 1; + } + if ((rx_ufc_a > 0xffff) || (rx_ufc_b > 0xffff) || + (rx_ufc_c > 0xffff) || (rx_ufc_d > 0xffff)) { + printk + (" rx_ufc_a, rx_ufc_b, rx_ufc_c, rx_ufc_d can take value" + "from 0 to 65535(0xFFFF)\n"); + fail = 1; + } + return fail; +} diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-11 15:33:35.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-11 15:34:23.000000000 -0700 @@ -348,9 +348,9 @@ u8 ring_priority; /*Specifies service priority of ring */ /* OSM should not set any two rings with same priority */ u8 ring_org; /*Organization of ring */ -#define RING_ORG_BUFF1 0x01 -#define RX_RING_ORG_BUFF3 0x03 -#define RX_RING_ORG_BUFF5 0x05 +#define RING_ORG_BUFF1 0x01 +#define RX_RING_ORG_BUFF3 0x03 +#define RX_RING_ORG_BUFF5 0x05 u8 f_no_snoop; #define NO_SNOOP_RXD 0x01 From ravinandan.arakali@s2io.com Thu Oct 28 15:42:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 15:42:38 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SMgRqI024322 for ; Thu, 28 Oct 2004 15:42:28 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SMfwje010684; Thu, 28 Oct 2004 18:41:58 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SMft39005883; Thu, 28 Oct 2004 18:41:56 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , , Subject: [PATCH 2.6.9-rc2 6/12] S2io: new txd allocation Date: Thu, 28 Oct 2004 15:50:32 -0700 Message-ID: <004101c4bd40$9690b8c0$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 11018 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Hi, The attached patch contains a modified scheme for allocating Tx descriptor blocks. More description follows. In the old scheme, the entire Tx descriptor space was allocated in one go. This could cause driver load to fail on systems with low(or scattered) memory. The Tx descriptor blocks are now allocated on per-page basis. A new structure (list_info) has been introduced in nic_t structure to keep track of the physical and virtual addresses of every TxD allocated this way. Signed-off-by: Raghavendra Koushik Signed-off-by: Ravinandan Arakali --- diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-11 16:49:34.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-11 17:20:24.000000000 -0700 @@ -305,6 +305,9 @@ remove:__devexit_p(s2io_rem_nic), }; +/* A simplifier macro used both by init and free shared_mem Fns(). */ +#define TXD_MEM_PAGE_CNT(len, per_each) ((len+per_each - 1) / per_each) + /** * init_shared_mem - Allocation and Initialization of Memory * @nic: Device private variable. @@ -320,6 +323,7 @@ dma_addr_t tmp_p_addr, tmp_p_addr_next; RxD_block_t *pre_rxd_blk = NULL; int i, j, blk_cnt; + int lst_size, lst_per_page; struct net_device *dev = nic->dev; mac_info_t *mac_control; @@ -341,39 +345,55 @@ DBG_PRINT(ERR_DBG, "that can be used\n"); return FAILURE; } - size *= (sizeof(TxD_t) * config->max_txds); - mac_control->txd_list_mem = pci_alloc_consistent - (nic->pdev, size, &mac_control->txd_list_mem_phy); - if (!mac_control->txd_list_mem) { - return -ENOMEM; - } - mac_control->txd_list_mem_sz = size; - - tmp_v_addr = mac_control->txd_list_mem; - tmp_p_addr = mac_control->txd_list_mem_phy; - memset(tmp_v_addr, 0, size); - - DBG_PRINT(INIT_DBG, "%s:List Mem PHY: 0x%llx\n", dev->name, - (unsigned long long) tmp_p_addr); + lst_size = (sizeof(TxD_t) * config->max_txds); + lst_per_page = PAGE_SIZE / lst_size; for (i = 0; i < config->tx_fifo_num; i++) { - mac_control->txdl_start_phy[i] = tmp_p_addr; - mac_control->txdl_start[i] = (TxD_t *) tmp_v_addr; + int fifo_len = config->tx_cfg[i].fifo_len; + int list_holder_size = fifo_len * sizeof(list_info_hold_t); + nic->list_info[i] = kmalloc(list_holder_size, GFP_KERNEL); + if (!nic->list_info[i]) { + DBG_PRINT(ERR_DBG, + "Malloc failed for list_info\n"); + return -ENOMEM; + } + memset(nic->list_info[i], 0, list_holder_size); + } + for (i = 0; i < config->tx_fifo_num; i++) { + int page_num = TXD_MEM_PAGE_CNT(config->tx_cfg[i].fifo_len, + lst_per_page); mac_control->tx_curr_put_info[i].offset = 0; mac_control->tx_curr_put_info[i].fifo_len = config->tx_cfg[i].fifo_len - 1; mac_control->tx_curr_get_info[i].offset = 0; mac_control->tx_curr_get_info[i].fifo_len = config->tx_cfg[i].fifo_len - 1; - - tmp_p_addr += - (config->tx_cfg[i].fifo_len * (sizeof(TxD_t)) * - config->max_txds); - tmp_v_addr += - (config->tx_cfg[i].fifo_len * (sizeof(TxD_t)) * - config->max_txds); + for (j = 0; j < page_num; j++) { + int k = 0; + dma_addr_t tmp_p; + void *tmp_v; + tmp_v = pci_alloc_consistent(nic->pdev, + PAGE_SIZE, &tmp_p); + if (!tmp_v) { + DBG_PRINT(ERR_DBG, + "pci_alloc_consistent "); + DBG_PRINT(ERR_DBG, "failed for TxDL\n"); + return -ENOMEM; + } + while (k < lst_per_page) { + int l = (j * lst_per_page) + k; + if (l == config->tx_cfg[i].fifo_len) + goto end_txd_alloc; + nic->list_info[i][l].list_virt_addr = + tmp_v + (k * lst_size); + nic->list_info[i][l].list_phy_addr = + tmp_p + (k * lst_size); + k++; + } + } } + end_txd_alloc: /* Allocation and initialization of RXDs in Rings */ size = 0; @@ -484,6 +504,7 @@ dma_addr_t tmp_p_addr; mac_info_t *mac_control; struct config_param *config; + int lst_size, lst_per_page; if (!nic) @@ -492,11 +513,23 @@ mac_control = &nic->mac_control; config = &nic->config; - if (mac_control->txd_list_mem) { - pci_free_consistent(nic->pdev, - mac_control->txd_list_mem_sz, - mac_control->txd_list_mem, - mac_control->txd_list_mem_phy); + lst_size = (sizeof(TxD_t) * config->max_txds); + lst_per_page = PAGE_SIZE / lst_size; + + for (i = 0; i < config->tx_fifo_num; i++) { + int page_num = TXD_MEM_PAGE_CNT(config->tx_cfg[i].fifo_len, + lst_per_page); + for (j = 0; j < page_num; j++) { + int mem_blks = (j * lst_per_page); + if (!nic->list_info[i][mem_blks].list_virt_addr) + break; + pci_free_consistent(nic->pdev, PAGE_SIZE, + nic->list_info[i][mem_blks]. + list_virt_addr, + nic->list_info[i][mem_blks]. + list_phy_addr); + } + kfree(nic->list_info[i]); } size = (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t)); @@ -1444,8 +1477,8 @@ for (i = 0; i < config->tx_fifo_num; i++) { for (j = 0; j < config->tx_cfg[i].fifo_len - 1; j++) { - txdp = mac_control->txdl_start[i] + - (config->max_txds * j); + txdp = (TxD_t *) nic->list_info[i][j]. + list_virt_addr; skb = (struct sk_buff *) ((unsigned long) txdp-> Host_Control); @@ -1460,6 +1493,8 @@ DBG_PRINT(INTR_DBG, "%s:forcibly freeing %d skbs on FIFO%d\n", dev->name, cnt, i); + mac_control->tx_curr_get_info[i].offset = 0; + mac_control->tx_curr_put_info[i].offset = 0; } } @@ -1896,7 +1931,7 @@ { XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; struct net_device *dev = (struct net_device *) nic->dev; - tx_curr_get_info_t offset_info, offset_info1; + tx_curr_get_info_t get_info, put_info; struct sk_buff *skb; TxD_t *txdlp; register u64 val64 = 0; @@ -1916,12 +1951,12 @@ writeq(val64, &bar0->tx_traffic_int); for (i = 0; i < config->tx_fifo_num; i++) { - offset_info = mac_control->tx_curr_get_info[i]; - offset_info1 = mac_control->tx_curr_put_info[i]; - txdlp = mac_control->txdl_start[i] + - (config->max_txds * offset_info.offset); + get_info = mac_control->tx_curr_get_info[i]; + put_info = mac_control->tx_curr_put_info[i]; + txdlp = (TxD_t *) nic->list_info[i][get_info.offset]. + list_virt_addr; while ((!(txdlp->Control_1 & TXD_LIST_OWN_XENA)) && - (offset_info.offset != offset_info1.offset) && + (get_info.offset != put_info.offset) && (txdlp->Host_Control)) { /* Check for TxD errors */ if (txdlp->Control_1 & TXD_T_CODE) { @@ -1971,12 +2006,12 @@ nic->stats.tx_bytes += skb->len; dev_kfree_skb_irq(skb); - offset_info.offset++; - offset_info.offset %= offset_info.fifo_len + 1; - txdlp = mac_control->txdl_start[i] + - (config->max_txds * offset_info.offset); + get_info.offset++; + get_info.offset %= get_info.fifo_len + 1; + txdlp = (TxD_t *) nic->list_info[i] + [get_info.offset].list_virt_addr; mac_control->tx_curr_get_info[i].offset = - offset_info.offset; + get_info.offset; } } @@ -2327,7 +2362,9 @@ XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; register u64 val64 = 0; u16 cnt = 0; + unsigned long flags; + spin_lock_irqsave(&sp->tx_lock, flags); netif_stop_queue(dev); /* disable Tx and Rx traffic on the NIC */ @@ -2381,6 +2418,7 @@ free_rx_buffers(sp); sp->device_close_flag = TRUE; /* Device is shut down. */ + spin_unlock_irqrestore(&sp->tx_lock, flags); return 0; } @@ -2401,7 +2439,7 @@ int s2io_xmit(struct sk_buff *skb, struct net_device *dev) { nic_t *sp = dev->priv; - u16 off, txd_len, frg_cnt, frg_len, i, queue, off1, queue_len; + u16 frg_cnt, frg_len, i, queue, queue_len, put_off, get_off; register u64 val64; TxD_t *txdp; TxFIFO_element_t *tx_fifo; @@ -2419,6 +2457,14 @@ DBG_PRINT(TX_DBG, "%s: In S2IO Tx routine\n", dev->name); spin_lock_irqsave(&sp->tx_lock, flags); + if ((netif_queue_stopped(dev)) || (!netif_carrier_ok(dev))) { + DBG_PRINT(TX_DBG, "%s:s2io_xmit: Tx Queue stopped\n", + dev->name); + dev_kfree_skb(skb); + spin_unlock_irqrestore(&sp->tx_lock, flags); + return 0; + } + queue = 0; /* Multi FIFO Tx is disabled for now. */ if (!queue && tx_prio) { @@ -2427,14 +2473,13 @@ } - off = (u16) mac_control->tx_curr_put_info[queue].offset; - off1 = (u16) mac_control->tx_curr_get_info[queue].offset; - txd_len = config->max_txds; - txdp = mac_control->txdl_start[queue] + (config->max_txds * off); + put_off = (u16) mac_control->tx_curr_put_info[queue].offset; + get_off = (u16) mac_control->tx_curr_get_info[queue].offset; + txdp = (TxD_t *) sp->list_info[queue][put_off].list_virt_addr; queue_len = mac_control->tx_curr_put_info[queue].fifo_len + 1; /* Avoid "put" pointer going beyond "get" pointer */ - if (txdp->Host_Control || (((off + 1) % queue_len) == off1)) { + if (txdp->Host_Control || (((put_off + 1) % queue_len) == get_off)) { DBG_PRINT(ERR_DBG, "Error in xmit, No free TXDs.\n"); netif_stop_queue(dev); dev_kfree_skb(skb); @@ -2479,8 +2524,7 @@ txdp->Control_1 |= TXD_GATHER_CODE_LAST; tx_fifo = mac_control->tx_FIFO_start[queue]; - val64 = (mac_control->txdl_start_phy[queue] + - (sizeof(TxD_t) * txd_len * off)); + val64 = sp->list_info[queue][put_off].list_phy_addr; writeq(val64, &tx_fifo->TxDL_Pointer); val64 = (TX_FIFO_LAST_TXD_NUM(frg_cnt) | TX_FIFO_FIRST_LIST | @@ -2494,15 +2538,15 @@ /* Perform a PCI read to flush previous writes */ val64 = readq(&bar0->general_int_status); - off++; - off %= mac_control->tx_curr_put_info[queue].fifo_len + 1; - mac_control->tx_curr_put_info[queue].offset = off; + put_off++; + put_off %= mac_control->tx_curr_put_info[queue].fifo_len + 1; + mac_control->tx_curr_put_info[queue].offset = put_off; /* Avoid "put" pointer going beyond "get" pointer */ - if (((off + 1) % queue_len) == off1) { + if (((put_off + 1) % queue_len) == get_off) { DBG_PRINT(TX_DBG, "No free TxDs for xmit, Put: 0x%x Get:0x%x\n", - off, off1); + put_off, get_off); netif_stop_queue(dev); } @@ -3070,7 +3114,7 @@ } /** - * s2io_ethtool-setpause_data - set/reset pause frame generation. + * s2io_ethtool_setpause_data - set/reset pause frame generation. * @sp : private member of the device structure, which is a pointer to the * s2io_nic structure. * @ep : pointer to the structure with pause parameters given by ethtool. diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-11 16:49:34.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-11 17:20:24.000000000 -0700 @@ -444,6 +444,12 @@ u64 Host_Control; /* reserved for host */ } TxD_t; +/* Structure to hold the phy and virt addr of every TxDL. */ +typedef struct list_info_hold { + dma_addr_t list_phy_addr; + void *list_virt_addr; +} list_info_hold_t; + /* Rx descriptor structure */ typedef struct _RxD_t { u64 Host_Control; /* reserved for host */ @@ -532,17 +538,9 @@ u16 mc_pause_threshold_q4q7; /* tx side stuff */ - void *txd_list_mem; /* original pointer to allocated mem */ - dma_addr_t txd_list_mem_phy; - u32 txd_list_mem_sz; - /* logical pointer of start of each Tx FIFO */ TxFIFO_element_t *tx_FIFO_start[MAX_TX_FIFOS]; - /* The Phy and virtual mem loactions of the Tx descriptors. */ - TxD_t *txdl_start[MAX_TX_FIFOS]; - dma_addr_t txdl_start_phy[MAX_TX_FIFOS]; - /* Current offset within tx_FIFO_start, where driver would write new Tx frame*/ tx_curr_put_info_t tx_curr_put_info[MAX_TX_FIFOS]; tx_curr_get_info_t tx_curr_get_info[MAX_TX_FIFOS]; @@ -638,6 +636,9 @@ int block_count[MAX_RX_RINGS]; int pkt_cnt[MAX_RX_RINGS]; + /* Place holder of all the TX List's Phy and Virt addresses. */ + list_info_hold_t *list_info[MAX_TX_FIFOS]; + /* Id timer, used to blink NIC to physically identify NIC. */ struct timer_list id_timer; From ravinandan.arakali@s2io.com Thu Oct 28 15:42:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 15:42:49 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SMgbbj024538 for ; Thu, 28 Oct 2004 15:42:37 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SMg8je010687; Thu, 28 Oct 2004 18:42:08 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SMg439005912; Thu, 28 Oct 2004 18:42:05 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , , Subject: [PATCH 2.6.9-rc2 7/12] S2io: NAPI fix Date: Thu, 28 Oct 2004 15:50:38 -0700 Message-ID: <004201c4bd40$9c2bf6a0$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 11019 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Hi, This patch contains the following NAPI related fixes. 1. When processing Rx packets, making sure that get offset of ring does not cross the put offset. 2. when NAPI is not in use a new spinlock(put_lock) is used to make sure accessing put offset of ring is atomic. 3. Also introduced a new vaiable put_pos in nic_t to keep track of absolute position of the put pointer of Rx ring. 4. When NAPI is used, fill_rx_buffer is not called from the interrupt handler(s2io_isr) . 5. In s2io_poll, decrementing packets processed is done inside the while loop unlike out side it as was being done last time. Signed-off-by: Raghavendra Koushik Signed-off-by: Ravinandan Arakali --- diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-11 21:19:25.051771008 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-11 21:19:44.674787856 -0700 @@ -1565,6 +1565,9 @@ atomic_read(&nic->rx_bufs_left[ring_no]); mac_info_t *mac_control; struct config_param *config; +#ifndef CONFIG_S2IO_NAPI + unsigned long flags; +#endif mac_control = &nic->mac_control; config = &nic->config; @@ -1612,6 +1615,12 @@ DBG_PRINT(INTR_DBG, "%s: Next block at: %p\n", dev->name, rxdp); } +#ifndef CONFIG_S2IO_NAPI + spin_lock_irqsave(&nic->put_lock, flags); + nic->put_pos[ring_no] = (block_no * + (MAX_RXDS_PER_BLOCK + 1)) + off; + spin_unlock_irqrestore(&nic->put_lock, flags); +#endif if (rxdp->Control_1 & RXD_OWN_XENA) { mac_control->rx_curr_put_info[ring_no]. @@ -1730,8 +1739,8 @@ XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; int pkts_to_process = *budget, pkt_cnt = 0; register u64 val64 = 0; - rx_curr_get_info_t offset_info; - int i, block_no; + rx_curr_get_info_t get_info, put_info; + int i, get_block, put_block, get_offset, put_offset, ring_bufs; u16 val16, cksum; struct sk_buff *skb; RxD_t *rxdp; @@ -1748,29 +1757,40 @@ writeq(val64, &bar0->rx_traffic_int); for (i = 0; i < config->rx_ring_num; i++) { - if (--pkts_to_process < 0) { - goto no_rx; - } - offset_info = mac_control->rx_curr_get_info[i]; - block_no = offset_info.block_index; - rxdp = nic->rx_blocks[i][block_no].block_virt_addr + - offset_info.offset; - while (!(rxdp->Control_1 & RXD_OWN_XENA)) { + get_info = mac_control->rx_curr_get_info[i]; + get_block = get_info.block_index; + put_info = mac_control->rx_curr_put_info[i]; + put_block = put_info.block_index; + ring_bufs = config->rx_cfg[i].num_rxd; + rxdp = nic->rx_blocks[i][get_block].block_virt_addr + + get_info.offset; + get_offset = (get_block * (MAX_RXDS_PER_BLOCK + 1)) + + get_info.offset; + put_offset = (put_block * (MAX_RXDS_PER_BLOCK + 1)) + + put_info.offset; + while ((!(rxdp->Control_1 & RXD_OWN_XENA)) && + (((get_offset + 1) % ring_bufs) != put_offset)) { + if (--pkts_to_process < 0) { + goto no_rx; + } if (rxdp->Control_1 == END_OF_BLOCK) { rxdp = (RxD_t *) ((unsigned long) rxdp-> Control_2); - offset_info.offset++; - offset_info.offset %= + get_info.offset++; + get_info.offset %= (MAX_RXDS_PER_BLOCK + 1); - block_no++; - block_no %= nic->block_count[i]; + get_block++; + get_block %= nic->block_count[i]; mac_control->rx_curr_get_info[i]. - offset = offset_info.offset; + offset = get_info.offset; mac_control->rx_curr_get_info[i]. - block_index = block_no; + block_index = get_block; continue; } + get_offset = + (get_block * (MAX_RXDS_PER_BLOCK + 1)) + + get_info.offset; skb = (struct sk_buff *) ((unsigned long) rxdp-> Host_Control); @@ -1778,7 +1798,7 @@ DBG_PRINT(ERR_DBG, "%s: The skb is ", dev->name); DBG_PRINT(ERR_DBG, "Null in Rx Intr\n"); - return 0; + goto no_rx; } val64 = RXD_GET_BUFFER0_SIZE(rxdp->Control_2); val16 = (u16) (val64 >> 48); @@ -1792,34 +1812,44 @@ PCI_DMA_FROMDEVICE); rx_osm_handler(nic, val16, rxdp, i); pkt_cnt++; - offset_info.offset++; - offset_info.offset %= (MAX_RXDS_PER_BLOCK + 1); + get_info.offset++; + get_info.offset %= (MAX_RXDS_PER_BLOCK + 1); rxdp = - nic->rx_blocks[i][block_no].block_virt_addr + - offset_info.offset; + nic->rx_blocks[i][get_block].block_virt_addr + + get_info.offset; mac_control->rx_curr_get_info[i].offset = - offset_info.offset; + get_info.offset; } } if (!pkt_cnt) pkt_cnt = 1; - for (i = 0; i < config->rx_ring_num; i++) - fill_rx_buffers(nic, i); - dev->quota -= pkt_cnt; *budget -= pkt_cnt; netif_rx_complete(dev); + for (i = 0; i < config->rx_ring_num; i++) { + if (fill_rx_buffers(nic, i) == -ENOMEM) { + DBG_PRINT(ERR_DBG, "%s:Out of memory", dev->name); + DBG_PRINT(ERR_DBG, " in Rx Poll!!\n"); + break; + } + } /* Re enable the Rx interrupts. */ en_dis_able_nic_intrs(nic, RX_TRAFFIC_INTR, ENABLE_INTRS); return 0; no_rx: - for (i = 0; i < config->rx_ring_num; i++) - fill_rx_buffers(nic, i); dev->quota -= pkt_cnt; *budget -= pkt_cnt; + + for (i = 0; i < config->rx_ring_num; i++) { + if (fill_rx_buffers(nic, i) == -ENOMEM) { + DBG_PRINT(ERR_DBG, "%s:Out of memory", dev->name); + DBG_PRINT(ERR_DBG, " in Rx Poll!!\n"); + break; + } + } return 1; } #else @@ -1840,12 +1870,13 @@ { struct net_device *dev = (struct net_device *) nic->dev; XENA_dev_config_t *bar0 = (XENA_dev_config_t *) nic->bar0; - rx_curr_get_info_t offset_info; + rx_curr_get_info_t get_info, put_info; RxD_t *rxdp; struct sk_buff *skb; u16 val16, cksum; register u64 val64 = 0; - int i, block_no, pkt_cnt = 0; + int get_block, get_offset, put_block, put_offset, ring_bufs; + int i, pkt_cnt = 0; mac_info_t *mac_control; struct config_param *config; @@ -1860,25 +1891,37 @@ writeq(val64, &bar0->rx_traffic_int); for (i = 0; i < config->rx_ring_num; i++) { - offset_info = mac_control->rx_curr_get_info[i]; - block_no = offset_info.block_index; - rxdp = nic->rx_blocks[i][block_no].block_virt_addr + - offset_info.offset; - while (!(rxdp->Control_1 & RXD_OWN_XENA)) { + get_info = mac_control->rx_curr_get_info[i]; + get_block = get_info.block_index; + put_info = mac_control->rx_curr_put_info[i]; + put_block = put_info.block_index; + ring_bufs = config->rx_cfg[i].num_rxd; + rxdp = nic->rx_blocks[i][get_block].block_virt_addr + + get_info.offset; + get_offset = (get_block * (MAX_RXDS_PER_BLOCK + 1)) + + get_info.offset; + spin_lock(&nic->put_lock); + put_offset = nic->put_pos[i]; + spin_unlock(&nic->put_lock); + while ((!(rxdp->Control_1 & RXD_OWN_XENA)) && + (((get_offset + 1) % ring_bufs) != put_offset)) { if (rxdp->Control_1 == END_OF_BLOCK) { rxdp = (RxD_t *) ((unsigned long) rxdp->Control_2); - offset_info.offset++; - offset_info.offset %= + get_info.offset++; + get_info.offset %= (MAX_RXDS_PER_BLOCK + 1); - block_no++; - block_no %= nic->block_count[i]; + get_block++; + get_block %= nic->block_count[i]; mac_control->rx_curr_get_info[i]. - offset = offset_info.offset; + offset = get_info.offset; mac_control->rx_curr_get_info[i]. - block_index = block_no; + block_index = get_block; continue; } + get_offset = + (get_block * (MAX_RXDS_PER_BLOCK + 1)) + + get_info.offset; skb = (struct sk_buff *) ((unsigned long) rxdp->Host_Control); if (skb == NULL) { @@ -1898,13 +1941,13 @@ HEADER_SNAP_SIZE, PCI_DMA_FROMDEVICE); rx_osm_handler(nic, val16, rxdp, i); - offset_info.offset++; - offset_info.offset %= (MAX_RXDS_PER_BLOCK + 1); + get_info.offset++; + get_info.offset %= (MAX_RXDS_PER_BLOCK + 1); rxdp = - nic->rx_blocks[i][block_no].block_virt_addr + - offset_info.offset; + nic->rx_blocks[i][get_block].block_virt_addr + + get_info.offset; mac_control->rx_curr_get_info[i].offset = - offset_info.offset; + get_info.offset; pkt_cnt++; if ((indicate_max_pkts) && (pkt_cnt > indicate_max_pkts)) @@ -2575,6 +2618,9 @@ struct net_device *dev = (struct net_device *) dev_id; nic_t *sp = dev->priv; XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; +#ifndef CONFIG_S2IO_NAPI + int i, ret; +#endif u64 reason = 0; mac_info_t *mac_control; struct config_param *config; @@ -2626,44 +2672,31 @@ * reallocate the buffers from the interrupt handler itself, * else schedule a tasklet to reallocate the buffers. */ -#if 1 - { - int i; - - for (i = 0; i < config->rx_ring_num; i++) { - int rxb_size = atomic_read(&sp->rx_bufs_left[i]); - int level = rx_buffer_level(sp, rxb_size, i); - - if ((level == PANIC) && (!TASKLET_IN_USE)) { - int ret; +#ifndef CONFIG_S2IO_NAPI + for (i = 0; i < config->rx_ring_num; i++) { + int rxb_size = atomic_read(&sp->rx_bufs_left[i]); + int level = rx_buffer_level(sp, rxb_size, i); - DBG_PRINT(INTR_DBG, "%s: Rx BD hit ", + if ((level == PANIC) && (!TASKLET_IN_USE)) { + DBG_PRINT(INTR_DBG, "%s: Rx BD hit ", dev->name); + DBG_PRINT(INTR_DBG, "PANIC levels\n"); + if ((ret = fill_rx_buffers(sp, i)) == -ENOMEM) { + DBG_PRINT(ERR_DBG, "%s:Out of memory", dev->name); - DBG_PRINT(INTR_DBG, "PANIC levels\n"); - if ((ret = - fill_rx_buffers(sp, i)) == -ENOMEM) { - DBG_PRINT(ERR_DBG, - "%s:Out of memory", - dev->name); - DBG_PRINT(ERR_DBG, " in ISR!!\n"); - clear_bit(0, - (unsigned long *) (&sp-> - tasklet_status)); - return IRQ_HANDLED; - } + DBG_PRINT(ERR_DBG, " in ISR!!\n"); clear_bit(0, (unsigned long *) (&sp-> tasklet_status)); - } else if ((level == LOW) - && (!atomic_read(&sp->tasklet_status))) { - tasklet_schedule(&sp->task); + return IRQ_HANDLED; } - + clear_bit(0, + (unsigned long *) (&sp->tasklet_status)); + } else if ((level == LOW) + && (!atomic_read(&sp->tasklet_status))) { + tasklet_schedule(&sp->task); } } -#else - tasklet_schedule(&sp->task); #endif return IRQ_HANDLED; @@ -4583,6 +4616,9 @@ /* Initialize spinlocks */ spin_lock_init(&sp->tx_lock); +#ifndef CONFIG_S2IO_NAPI + spin_lock_init(&sp->put_lock); +#endif /* * SXE-002: Configure link and activity LED to init state diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-11 21:19:25.051771008 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-11 21:19:44.674787856 -0700 @@ -610,6 +610,9 @@ atomic_t rx_bufs_left[MAX_RX_RINGS]; spinlock_t tx_lock; +#ifndef CONFIG_S2IO_NAPI + spinlock_t put_lock; +#endif #define PROMISC 1 #define ALL_MULTI 2 @@ -628,6 +631,11 @@ u16 tx_err_count; u16 rx_err_count; +#ifndef CONFIG_S2IO_NAPI + /* Index to the absolute position of the put pointer of Rx ring. */ + int put_pos[MAX_RX_RINGS]; +#endif + /* * Place holders for the virtual and physical addresses of * all the Rx Blocks From ravinandan.arakali@s2io.com Thu Oct 28 15:42:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 15:43:03 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SMgnNk024788 for ; Thu, 28 Oct 2004 15:42:49 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SMgIje010690; Thu, 28 Oct 2004 18:42:18 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SMgF39005976; Thu, 28 Oct 2004 18:42:15 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , , Subject: [PATCH 2.6.9-rc2 8/12] S2io: two buffer mode Date: Thu, 28 Oct 2004 15:50:45 -0700 Message-ID: <004301c4bd40$a1af66c0$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 11020 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Hi, Attached is the patch for implementing 2-buffer mode on Rx path. More description of this mode of operation follows. On certain systems when a DMA has to happen on an un-aligned memory location performance will take a significant hit. It's standard practice to offset the Rx buffer address by 2 (as Mac header is 14 bytes) so the IP header starts from an aligned location. Obviously using a single Rx buffer both cannot be achieved. Thus XFrame supports something called 2 buffer Rx mode, where in the Rx'ed frame is split into 2 parts, one is the Ethernet header and the other is the Ethernet payload. So now we can allocate proper aligned memory for both buffers, hence the DMA is not slowed down. Also, the Ethernet payload(starting from L3 header) is on an aligned location so OS need not have to do un-aligned accesses to process IP header. To achieve this, the kernel function eth_type_trans functionality has to be partially implemented in the driver itself. Signed-off-by: Raghavendra Koushik Signed-off-by: Ravinandan Arakali --- diff -urN vanilla-linux/drivers/net/Kconfig linux-2.6.8.1/drivers/net/Kconfig --- vanilla-linux/drivers/net/Kconfig 2004-10-06 15:15:04.000000000 -0700 +++ linux-2.6.8.1/drivers/net/Kconfig 2004-10-11 20:06:36.000000000 -0700 @@ -2267,6 +2267,17 @@ If in doubt, say N. +config 2BUFF_MODE + bool "Use 2 Buffer Mode on Rx side." + depends on S2IO + ---help--- + On enabling the 2 buffer mode, the received frame will be + split into 2 parts before being DMA'ed to the hosts memory. + The parts are the ethernet header and ethernet payload. + This is useful on systems where DMA'ing to to unaligned + physical memory loactions comes with a heavy price. + If not sure please say N. + endmenu source "drivers/net/tokenring/Kconfig" diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-11 21:21:49.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-12 16:49:27.796331624 -0700 @@ -325,6 +325,10 @@ int i, j, blk_cnt; int lst_size, lst_per_page; struct net_device *dev = nic->dev; +#ifdef CONFIG_2BUFF_MODE + u64 tmp; + buffAdd_t *ba; +#endif mac_info_t *mac_control; struct config_param *config; @@ -425,7 +429,11 @@ config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1); /* Allocating all the Rx blocks */ for (j = 0; j < blk_cnt; j++) { +#ifndef CONFIG_2BUFF_MODE size = (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t)); +#else + size = SIZE_OF_BLOCK; +#endif tmp_v_addr = pci_alloc_consistent(nic->pdev, size, &tmp_p_addr); if (tmp_v_addr == NULL) { @@ -458,13 +466,60 @@ pre_rxd_blk->reserved_1 = END_OF_BLOCK; /* last RxD * marker. */ +#ifndef CONFIG_2BUFF_MODE pre_rxd_blk->reserved_2_pNext_RxD_block = (unsigned long) tmp_v_addr_next; +#endif pre_rxd_blk->pNext_RxD_Blk_physical = (u64) tmp_p_addr_next; } } +#ifdef CONFIG_2BUFF_MODE + /* + * Allocation of Storages for buffer addresses in 2BUFF mode + * and the buffers as well. + */ + for (i = 0; i < config->rx_ring_num; i++) { + blk_cnt = + config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1); + nic->ba[i] = kmalloc((sizeof(buffAdd_t *) * blk_cnt), + GFP_KERNEL); + if (!nic->ba[i]) + return -ENOMEM; + for (j = 0; j < blk_cnt; j++) { + int k = 0; + nic->ba[i][j] = kmalloc((sizeof(buffAdd_t) * + (MAX_RXDS_PER_BLOCK + 1)), + GFP_KERNEL); + if (!nic->ba[i][j]) + return -ENOMEM; + while (k != MAX_RXDS_PER_BLOCK) { + ba = &nic->ba[i][j][k]; + + ba->ba_0_org = (void *) kmalloc + (BUF0_LEN + ALIGN_SIZE, GFP_ATOMIC); + if (!ba->ba_0_org) + return -ENOMEM; + tmp = (u64) ba->ba_0_org; + tmp += ALIGN_SIZE; + tmp &= ~((u64) ALIGN_SIZE); + ba->ba_0 = (void *) tmp; + + ba->ba_1_org = (void *) kmalloc + (BUF1_LEN + ALIGN_SIZE, GFP_ATOMIC); + if (!ba->ba_1_org) + return -ENOMEM; + tmp = (u64) ba->ba_1_org; + tmp += ALIGN_SIZE; + tmp &= ~((u64) ALIGN_SIZE); + ba->ba_1 = (void *) tmp; + k++; + } + } + } +#endif + /* Allocation and initialization of Statistics block */ size = sizeof(StatInfo_t); mac_control->stats_mem = pci_alloc_consistent @@ -532,7 +587,11 @@ kfree(nic->list_info[i]); } +#ifndef CONFIG_2BUFF_MODE size = (MAX_RXDS_PER_BLOCK + 1) * (sizeof(RxD_t)); +#else + size = SIZE_OF_BLOCK; +#endif for (i = 0; i < config->rx_ring_num; i++) { blk_cnt = nic->block_count[i]; for (j = 0; j < blk_cnt; j++) { @@ -545,6 +604,27 @@ } } +#ifdef CONFIG_2BUFF_MODE + /* Freeing buffer storage addresses in 2BUFF mode. */ + for (i = 0; i < config->rx_ring_num; i++) { + blk_cnt = + config->rx_cfg[i].num_rxd / (MAX_RXDS_PER_BLOCK + 1); + for (j = 0; j < blk_cnt; j++) { + int k = 0; + if (!nic->ba[i][j]) + continue; + while (k != MAX_RXDS_PER_BLOCK) { + buffAdd_t *ba = &nic->ba[i][j][k]; + kfree(ba->ba_0_org); + kfree(ba->ba_1_org); + k++; + } + kfree(nic->ba[i][j]); + } + if (nic->ba[i]) + kfree(nic->ba[i]); + } +#endif if (mac_control->stats_mem) { pci_free_consistent(nic->pdev, @@ -1366,10 +1446,21 @@ &bar0->prc_rxd0_n[i]); val64 = readq(&bar0->prc_ctrl_n[i]); +#ifndef CONFIG_2BUFF_MODE val64 |= PRC_CTRL_RC_ENABLED; +#else + val64 |= PRC_CTRL_RC_ENABLED | PRC_CTRL_RING_MODE_3; +#endif writeq(val64, &bar0->prc_ctrl_n[i]); } +#ifdef CONFIG_2BUFF_MODE + /* Enabling 2 buffer mode by writing into Rx_pa_cfg reg. */ + val64 = readq(&bar0->rx_pa_cfg); + val64 |= RX_PA_CFG_IGNORE_L2_ERR; + writeq(val64, &bar0->rx_pa_cfg); +#endif + /* * Enabling MC-RLDRAM. After enabling the device, we timeout * for around 100ms, which is approximately the time required @@ -1437,6 +1528,12 @@ } /* + * Don't see link state interrupts on certain switches, so + * directly scheduling a link state task from here. + */ + schedule_work(&nic->set_link_task); + + /* * Here we are performing soft reset on XGXS to * force link down. Since link is already up, we will get * link state change interrupt after this reset @@ -1565,6 +1662,13 @@ atomic_read(&nic->rx_bufs_left[ring_no]); mac_info_t *mac_control; struct config_param *config; +#ifdef CONFIG_2BUFF_MODE + RxD_t *rxdpnext; + int nextblk; + u64 tmp; + buffAdd_t *ba; + dma_addr_t rxdpphys; +#endif #ifndef CONFIG_S2IO_NAPI unsigned long flags; #endif @@ -1589,10 +1693,14 @@ block_index; off = mac_control->rx_curr_put_info[ring_no].offset; off1 = mac_control->rx_curr_get_info[ring_no].offset; +#ifndef CONFIG_2BUFF_MODE offset = block_no * (MAX_RXDS_PER_BLOCK + 1) + off; offset1 = block_no1 * (MAX_RXDS_PER_BLOCK + 1) + off1; +#else offset = block_no * (MAX_RXDS_PER_BLOCK) + off; offset1 = block_no1 * (MAX_RXDS_PER_BLOCK) + off1; +#endif + rxdp = nic->rx_blocks[ring_no][block_no]. block_virt_addr + off; if ((offset == offset1) && (rxdp->Host_Control)) { @@ -1600,6 +1708,7 @@ DBG_PRINT(INTR_DBG, " info equated\n"); goto end; } +#ifndef CONFIG_2BUFF_MODE if (rxdp->Control_1 == END_OF_BLOCK) { mac_control->rx_curr_put_info[ring_no]. block_index++; @@ -1617,23 +1726,81 @@ } #ifndef CONFIG_S2IO_NAPI spin_lock_irqsave(&nic->put_lock, flags); + nic->put_pos[ring_no] = + (block_no * (MAX_RXDS_PER_BLOCK + 1)) + off; + spin_unlock_irqrestore(&nic->put_lock, flags); +#endif +#else + if (rxdp->Host_Control == END_OF_BLOCK) { + mac_control->rx_curr_put_info[ring_no]. + block_index++; + mac_control->rx_curr_put_info[ring_no]. + block_index %= nic->block_count[ring_no]; + block_no = mac_control->rx_curr_put_info + [ring_no].block_index; + off = 0; + DBG_PRINT(INTR_DBG, "%s: block%d at: 0x%llx\n", + dev->name, block_no, + (unsigned long long) rxdp->Control_1); + mac_control->rx_curr_put_info[ring_no].offset = + off; + rxdp = nic->rx_blocks[ring_no][block_no]. + block_virt_addr; + } +#ifndef CONFIG_S2IO_NAPI + spin_lock_irqsave(&nic->put_lock, flags); nic->put_pos[ring_no] = (block_no * (MAX_RXDS_PER_BLOCK + 1)) + off; spin_unlock_irqrestore(&nic->put_lock, flags); #endif +#endif - if (rxdp->Control_1 & RXD_OWN_XENA) { +#ifndef CONFIG_2BUFF_MODE + if (rxdp->Control_1 & RXD_OWN_XENA) +#else + if (rxdp->Control_2 & BIT(0)) +#endif + { mac_control->rx_curr_put_info[ring_no]. offset = off; goto end; } +#ifdef CONFIG_2BUFF_MODE + /* + * RxDs Spanning cache lines will be replenished only + * if the succeeding RxD is also owned by Host. It + * will always be the ((8*i)+3) and ((8*i)+6) + * descriptors for the 48 byte descriptor. The offending + * decsriptor is of-course the 3rd descriptor. + */ + rxdpphys = nic->rx_blocks[ring_no][block_no]. + block_dma_addr + (off * sizeof(RxD_t)); + if (((u64) (rxdpphys)) % 128 > 80) { + rxdpnext = nic->rx_blocks[ring_no][block_no]. + block_virt_addr + (off + 1); + if (rxdpnext->Host_Control == END_OF_BLOCK) { + nextblk = (block_no + 1) % + (nic->block_count[ring_no]); + rxdpnext = nic->rx_blocks[ring_no] + [nextblk].block_virt_addr; + } + if (rxdpnext->Control_2 & BIT(0)) + goto end; + } +#endif +#ifndef CONFIG_2BUFF_MODE skb = dev_alloc_skb(size + NET_IP_ALIGN); +#else + skb = dev_alloc_skb(dev->mtu + ALIGN_SIZE + + /*BUF0_LEN + */ 22); +#endif if (!skb) { DBG_PRINT(ERR_DBG, "%s: Out of ", dev->name); DBG_PRINT(ERR_DBG, "memory to allocate SKBs\n"); return -ENOMEM; } +#ifndef CONFIG_2BUFF_MODE skb_reserve(skb, NET_IP_ALIGN); memset(rxdp, 0, sizeof(RxD_t)); rxdp->Buffer0_ptr = pci_map_single @@ -1645,6 +1812,33 @@ off++; off %= (MAX_RXDS_PER_BLOCK + 1); mac_control->rx_curr_put_info[ring_no].offset = off; +#else + ba = &nic->ba[ring_no][block_no][off]; + tmp = (u64) skb->data; + tmp += ALIGN_SIZE; + tmp &= ~ALIGN_SIZE; + skb->data = (void *) tmp; + + memset(rxdp, 0, sizeof(RxD_t)); + rxdp->Buffer2_ptr = pci_map_single + (nic->pdev, skb->data, dev->mtu + 22, + PCI_DMA_FROMDEVICE); + rxdp->Buffer0_ptr = + pci_map_single(nic->pdev, ba->ba_0, BUF0_LEN, + PCI_DMA_FROMDEVICE); + rxdp->Buffer1_ptr = + pci_map_single(nic->pdev, ba->ba_1, BUF1_LEN, + PCI_DMA_FROMDEVICE); + + rxdp->Control_2 = SET_BUFFER2_SIZE(dev->mtu + 22); + rxdp->Control_2 |= SET_BUFFER0_SIZE(BUF0_LEN); + rxdp->Control_2 |= SET_BUFFER1_SIZE(1); /* dummy. */ + rxdp->Control_2 |= BIT(0); /* Set Buffer_Empty bit. */ + rxdp->Host_Control = (u64) ((unsigned long) (skb)); + rxdp->Control_1 |= RXD_OWN_XENA; + off++; + mac_control->rx_curr_put_info[ring_no].offset = off; +#endif atomic_inc(&nic->rx_bufs_left[ring_no]); alloc_tab++; } @@ -1670,6 +1864,9 @@ struct sk_buff *skb; mac_info_t *mac_control; struct config_param *config; +#ifdef CONFIG_2BUFF_MODE + buffAdd_t *ba; +#endif mac_control = &sp->mac_control; config = &sp->config; @@ -1679,6 +1876,7 @@ off = j % (MAX_RXDS_PER_BLOCK + 1); rxdp = sp->rx_blocks[i][blk].block_virt_addr + off; +#ifndef CONFIG_2BUFF_MODE if (rxdp->Control_1 == END_OF_BLOCK) { rxdp = (RxD_t *) ((unsigned long) rxdp-> @@ -1686,6 +1884,12 @@ j++; blk++; } +#else + if (rxdp->Host_Control == END_OF_BLOCK) { + blk++; + continue; + } +#endif if (!(rxdp->Control_1 & RXD_OWN_XENA)) { memset(rxdp, 0, sizeof(RxD_t)); @@ -1696,6 +1900,7 @@ (struct sk_buff *) ((unsigned long) rxdp-> Host_Control); if (skb) { +#ifndef CONFIG_2BUFF_MODE pci_unmap_single(sp->pdev, (dma_addr_t) rxdp->Buffer0_ptr, dev->mtu + @@ -1703,6 +1908,21 @@ + HEADER_802_2_SIZE + HEADER_SNAP_SIZE, PCI_DMA_FROMDEVICE); +#else + ba = &sp->ba[i][blk][off]; + pci_unmap_single(sp->pdev, (dma_addr_t) + rxdp->Buffer0_ptr, + BUF0_LEN, + PCI_DMA_FROMDEVICE); + pci_unmap_single(sp->pdev, (dma_addr_t) + rxdp->Buffer1_ptr, + BUF1_LEN, + PCI_DMA_FROMDEVICE); + pci_unmap_single(sp->pdev, (dma_addr_t) + rxdp->Buffer2_ptr, + dev->mtu + 22, + PCI_DMA_FROMDEVICE); +#endif dev_kfree_skb(skb); atomic_dec(&sp->rx_bufs_left[i]); buf_cnt++; @@ -1741,11 +1961,16 @@ register u64 val64 = 0; rx_curr_get_info_t get_info, put_info; int i, get_block, put_block, get_offset, put_offset, ring_bufs; +#ifndef CONFIG_2BUFF_MODE u16 val16, cksum; +#endif struct sk_buff *skb; RxD_t *rxdp; mac_info_t *mac_control; struct config_param *config; +#ifdef CONFIG_2BUFF_MODE + buffAdd_t *ba; +#endif mac_control = &nic->mac_control; config = &nic->config; @@ -1764,6 +1989,7 @@ ring_bufs = config->rx_cfg[i].num_rxd; rxdp = nic->rx_blocks[i][get_block].block_virt_addr + get_info.offset; +#ifndef CONFIG_2BUFF_MODE get_offset = (get_block * (MAX_RXDS_PER_BLOCK + 1)) + get_info.offset; put_offset = (put_block * (MAX_RXDS_PER_BLOCK + 1)) + @@ -1820,6 +2046,66 @@ mac_control->rx_curr_get_info[i].offset = get_info.offset; } +#else + get_offset = (get_block * (MAX_RXDS_PER_BLOCK + 1)) + + get_info.offset; + put_offset = (put_block * (MAX_RXDS_PER_BLOCK + 1)) + + put_info.offset; + while (((!(rxdp->Control_1 & RXD_OWN_XENA)) && + !(rxdp->Control_2 & BIT(0))) && + (((get_offset + 1) % ring_bufs) != put_offset)) { + if (--pkts_to_process < 0) { + goto no_rx; + } + skb = (struct sk_buff *) ((unsigned long) + rxdp->Host_Control); + if (skb == NULL) { + DBG_PRINT(ERR_DBG, "%s: The skb is ", + dev->name); + DBG_PRINT(ERR_DBG, "Null in Rx Intr\n"); + goto no_rx; + } + + pci_unmap_single(nic->pdev, (dma_addr_t) + rxdp->Buffer0_ptr, + BUF0_LEN, PCI_DMA_FROMDEVICE); + pci_unmap_single(nic->pdev, (dma_addr_t) + rxdp->Buffer1_ptr, + BUF1_LEN, PCI_DMA_FROMDEVICE); + pci_unmap_single(nic->pdev, (dma_addr_t) + rxdp->Buffer2_ptr, + dev->mtu + 22, + PCI_DMA_FROMDEVICE); + ba = &nic->ba[i][get_block][get_info.offset]; + + rx_osm_handler(nic, rxdp, i, ba); + + get_info.offset++; + mac_control->rx_curr_get_info[i].offset = + get_info.offset; + rxdp = + nic->rx_blocks[i][get_block].block_virt_addr + + get_info.offset; + + if (get_info.offset && + (!(get_info.offset % MAX_RXDS_PER_BLOCK))) { + get_info.offset = 0; + mac_control->rx_curr_get_info[i]. + offset = get_info.offset; + get_block++; + get_block %= nic->block_count[i]; + mac_control->rx_curr_get_info[i]. + block_index = get_block; + rxdp = + nic->rx_blocks[i][get_block]. + block_virt_addr; + } + get_offset = + (get_block * (MAX_RXDS_PER_BLOCK + 1)) + + get_info.offset; + pkt_cnt++; + } +#endif } if (!pkt_cnt) pkt_cnt = 1; @@ -1873,12 +2159,17 @@ rx_curr_get_info_t get_info, put_info; RxD_t *rxdp; struct sk_buff *skb; +#ifndef CONFIG_2BUFF_MODE u16 val16, cksum; +#endif register u64 val64 = 0; int get_block, get_offset, put_block, put_offset, ring_bufs; int i, pkt_cnt = 0; mac_info_t *mac_control; struct config_param *config; +#ifdef CONFIG_2BUFF_MODE + buffAdd_t *ba; +#endif mac_control = &nic->mac_control; config = &nic->config; @@ -1898,6 +2189,7 @@ ring_bufs = config->rx_cfg[i].num_rxd; rxdp = nic->rx_blocks[i][get_block].block_virt_addr + get_info.offset; +#ifndef CONFIG_2BUFF_MODE get_offset = (get_block * (MAX_RXDS_PER_BLOCK + 1)) + get_info.offset; spin_lock(&nic->put_lock); @@ -1953,6 +2245,67 @@ && (pkt_cnt > indicate_max_pkts)) break; } +#else + get_offset = (get_block * (MAX_RXDS_PER_BLOCK + 1)) + + get_info.offset; + spin_lock(&nic->put_lock); + put_offset = nic->put_pos[i]; + spin_unlock(&nic->put_lock); + while (((!(rxdp->Control_1 & RXD_OWN_XENA)) && + !(rxdp->Control_2 & BIT(0))) && + (((get_offset + 1) % ring_bufs) != put_offset)) { + skb = (struct sk_buff *) ((unsigned long) + rxdp->Host_Control); + if (skb == NULL) { + DBG_PRINT(ERR_DBG, "%s: The skb is ", + dev->name); + DBG_PRINT(ERR_DBG, "Null in Rx Intr\n"); + return; + } + + pci_unmap_single(nic->pdev, (dma_addr_t) + rxdp->Buffer0_ptr, + BUF0_LEN, PCI_DMA_FROMDEVICE); + pci_unmap_single(nic->pdev, (dma_addr_t) + rxdp->Buffer1_ptr, + BUF1_LEN, PCI_DMA_FROMDEVICE); + pci_unmap_single(nic->pdev, (dma_addr_t) + rxdp->Buffer2_ptr, + dev->mtu + 22, + PCI_DMA_FROMDEVICE); + ba = &nic->ba[i][get_block][get_info.offset]; + + rx_osm_handler(nic, rxdp, i, ba); + + get_info.offset++; + mac_control->rx_curr_get_info[i].offset = + get_info.offset; + rxdp = + nic->rx_blocks[i][get_block].block_virt_addr + + get_info.offset; + + if (get_info.offset && + (!(get_info.offset % MAX_RXDS_PER_BLOCK))) { + get_info.offset = 0; + mac_control->rx_curr_get_info[i]. + offset = get_info.offset; + get_block++; + get_block %= nic->block_count[i]; + mac_control->rx_curr_get_info[i]. + block_index = get_block; + rxdp = + nic->rx_blocks[i][get_block]. + block_virt_addr; + } + get_offset = + (get_block * (MAX_RXDS_PER_BLOCK + 1)) + + get_info.offset; + pkt_cnt++; + if ((indicate_max_pkts) + && (pkt_cnt > indicate_max_pkts)) + break; + } +#endif if ((indicate_max_pkts) && (pkt_cnt > indicate_max_pkts)) break; } @@ -4096,12 +4449,21 @@ * Return value: * SUCCESS on success and -1 on failure. */ +#ifndef CONFIG_2BUFF_MODE static int rx_osm_handler(nic_t * sp, u16 len, RxD_t * rxdp, int ring_no) +#else +static int rx_osm_handler(nic_t * sp, RxD_t * rxdp, int ring_no, + buffAdd_t * ba) +#endif { struct net_device *dev = (struct net_device *) sp->dev; struct sk_buff *skb = (struct sk_buff *) ((unsigned long) rxdp->Host_Control); u16 l3_csum, l4_csum; +#ifdef CONFIG_2BUFF_MODE + int buf0_len, buf2_len; + struct ethhdr *eth = (struct ethhdr *) ba->ba_0; +#endif l3_csum = RXD_GET_L3_CKSUM(rxdp->Control_1); if ((rxdp->Control_1 & TCP_OR_UDP_FRAME) && (sp->rx_csum)) { @@ -4129,10 +4491,32 @@ DBG_PRINT(ERR_DBG, "%s: Rx error Value: 0x%llx\n", dev->name, err); } +#ifdef CONFIG_2BUFF_MODE + buf0_len = RXD_GET_BUFFER0_SIZE(rxdp->Control_2); + buf2_len = RXD_GET_BUFFER2_SIZE(rxdp->Control_2); +#endif skb->dev = dev; +#ifndef CONFIG_2BUFF_MODE skb_put(skb, len); skb->protocol = eth_type_trans(skb, dev); +#else + skb_put(skb, buf2_len); + /* + * Reproducing eth_type_trans functionality and running + * on the ethernet header 'eth' stripped and given to us + * by the hardware in 2Buff mode. + */ + if (*eth->h_dest & 1) { + if (!memcmp(eth->h_dest, dev->broadcast, ETH_ALEN)) + skb->pkt_type = PACKET_BROADCAST; + else + skb->pkt_type = PACKET_MULTICAST; + } else if (memcmp(eth->h_dest, dev->dev_addr, ETH_ALEN)) { + skb->pkt_type = PACKET_OTHERHOST; + } + skb->protocol = eth->h_proto; +#endif #ifdef CONFIG_S2IO_NAPI netif_receive_skb(skb); @@ -4143,7 +4527,11 @@ dev->last_rx = jiffies; sp->rx_pkt_count++; sp->stats.rx_packets++; +#ifndef CONFIG_2BUFF_MODE sp->stats.rx_bytes += len; +#else + sp->stats.rx_bytes += buf0_len + buf2_len; +#endif atomic_dec(&sp->rx_bufs_left[ring_no]); rxdp->Host_Control = 0; diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-11 21:21:49.000000000 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-11 21:22:23.000000000 -0700 @@ -466,19 +466,46 @@ #define RXD_GET_L4_CKSUM(val) ((u16)(val) & 0xFFFF) u64 Control_2; +#ifndef CONFIG_2BUFF_MODE #define MASK_BUFFER0_SIZE vBIT(0xFFFF,0,16) #define SET_BUFFER0_SIZE(val) vBIT(val,0,16) +#else +#define MASK_BUFFER0_SIZE vBIT(0xFF,0,16) +#define MASK_BUFFER1_SIZE vBIT(0xFFFF,16,16) +#define MASK_BUFFER2_SIZE vBIT(0xFFFF,32,16) +#define SET_BUFFER0_SIZE(val) vBIT(val,8,8) +#define SET_BUFFER1_SIZE(val) vBIT(val,16,16) +#define SET_BUFFER2_SIZE(val) vBIT(val,32,16) +#endif + #define MASK_VLAN_TAG vBIT(0xFFFF,48,16) #define SET_VLAN_TAG(val) vBIT(val,48,16) #define SET_NUM_TAG(val) vBIT(val,16,32) +#ifndef CONFIG_2BUFF_MODE #define RXD_GET_BUFFER0_SIZE(Control_2) (u64)((Control_2 & vBIT(0xFFFF,0,16))) +#else +#define RXD_GET_BUFFER0_SIZE(Control_2) (u8)((Control_2 & MASK_BUFFER0_SIZE) \ + >> 48) +#define RXD_GET_BUFFER1_SIZE(Control_2) (u16)((Control_2 & MASK_BUFFER1_SIZE) \ + >> 32) +#define RXD_GET_BUFFER2_SIZE(Control_2) (u16)((Control_2 & MASK_BUFFER2_SIZE) \ + >> 16) +#define BUF0_LEN 40 +#define BUF1_LEN 1 +#endif + u64 Buffer0_ptr; +#ifdef CONFIG_2BUFF_MODE + u64 Buffer1_ptr; + u64 Buffer2_ptr; +#endif } RxD_t; /* Structure that represents the Rx descriptor block which contains * 128 Rx descriptors. */ +#ifndef CONFIG_2BUFF_MODE typedef struct _RxD_block { #define MAX_RXDS_PER_BLOCK 127 RxD_t rxd[MAX_RXDS_PER_BLOCK]; @@ -492,6 +519,27 @@ * the upper 32 bits should * be 0 */ } RxD_block_t; +#else +typedef struct _RxD_block { +#define MAX_RXDS_PER_BLOCK 85 + RxD_t rxd[MAX_RXDS_PER_BLOCK]; + +#define END_OF_BLOCK 0xFEFFFFFFFFFFFFFFULL + u64 reserved_1; /* 0xFEFFFFFFFFFFFFFF to mark last Rxd + * in this blk */ + u64 pNext_RxD_Blk_physical; /* Phy ponter to next blk. */ +} RxD_block_t; +#define SIZE_OF_BLOCK 4096 + +/* Structure to hold virtual addresses of Buf0 and Buf1 in + * 2buf mode. */ +typedef struct bufAdd { + void *ba_0_org; + void *ba_1_org; + void *ba_0; + void *ba_1; +} buffAdd_t; +#endif /* Structure which stores all the MAC control parameters */ @@ -677,6 +725,10 @@ #define LINK_DOWN 1 #define LINK_UP 2 +#ifdef CONFIG_2BUFF_MODE + /* Buffer Address store. */ + buffAdd_t **ba[MAX_RX_RINGS]; +#endif int task_flag; } nic_t; @@ -802,7 +854,12 @@ static void s2io_tx_watchdog(struct net_device *dev); static void s2io_tasklet(unsigned long dev_addr); static void s2io_set_multicast(struct net_device *dev); +#ifndef CONFIG_2BUFF_MODE static int rx_osm_handler(nic_t * sp, u16 len, RxD_t * rxdp, int ring_no); +#else +static int rx_osm_handler(nic_t * sp, RxD_t * rxdp, int ring_no, + buffAdd_t * ba); +#endif void s2io_link(nic_t * sp, int link); void s2io_reset(nic_t * sp); #ifdef CONFIG_S2IO_NAPI From ravinandan.arakali@s2io.com Thu Oct 28 15:43:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 15:43:09 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SMgvQd024964 for ; Thu, 28 Oct 2004 15:42:58 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SMgSje010693; Thu, 28 Oct 2004 18:42:28 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SMgP39006002; Thu, 28 Oct 2004 18:42:25 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , , Subject: [PATCH 2.6.9-rc2 9/12] S2io: new functions for card restart Date: Thu, 28 Oct 2004 15:50:51 -0700 Message-ID: <004401c4bd40$a831f760$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 11021 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Hi, The attached patch incorporates Jeff's comments related to creating separate functions for restarting the NIC(without using close and open entry points) and few other comments. Complete list of changes are as follows: 1. Two new functions s2io_card_down() and s2io_card_up() are defined and are called during reset procedure instead of close and open routines. 2. tasklet_status field is now made as unsigned long. 3. On getting serious error, queue is stopped before resetting the card. 4. Removed the check for "queue stopped" in xmit routine. Signed-off-by: Raghavendra Koushik Signed-off-by: Ravinandan Arakali --- diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-26 16:36:28.024066008 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-26 16:36:16.682790144 -0700 @@ -82,8 +82,7 @@ #define LINK_IS_UP(val64) (!(val64 & (ADAPTER_STATUS_RMAC_REMOTE_FAULT | \ ADAPTER_STATUS_RMAC_LOCAL_FAULT))) -#define TASKLET_IN_USE test_and_set_bit(0, \ - (unsigned long *)(&sp->tasklet_status)) +#define TASKLET_IN_USE test_and_set_bit(0, (&sp->tasklet_status)) #define PANIC 1 #define LOW 2 static inline int rx_buffer_level(nic_t * sp, int rxb_size, int ring) @@ -2447,6 +2446,7 @@ if (val64 & SERR_SOURCE_ANY) { DBG_PRINT(ERR_DBG, "%s: Device indicates ", dev->name); DBG_PRINT(ERR_DBG, "serious error!!\n"); + netif_stop_queue(dev); schedule_work(&nic->rst_timer_task); } @@ -2648,7 +2648,7 @@ * ********************************************************* */ /** - * s2io-open - open entry point of the driver + * s2io_open - open entry point of the driver * @dev : pointer to the device structure. * Description: * This function is the open entry point of the driver. It mainly calls a @@ -2662,10 +2662,7 @@ int s2io_open(struct net_device *dev) { nic_t *sp = dev->priv; - int i, ret = 0, err = 0; - mac_info_t *mac_control; - struct config_param *config; - + int err = 0; /* * Make sure you have link off by default every time @@ -2674,68 +2671,30 @@ netif_carrier_off(dev); sp->last_link_state = LINK_DOWN; - /* Initialize the H/W I/O registers */ - if (init_nic(sp) != 0) { + /* Initialize H/W and enable interrupts */ + if (s2io_card_up(sp)) { DBG_PRINT(ERR_DBG, "%s: H/W initialization failed\n", dev->name); return -ENODEV; } /* After proper initialization of H/W, register ISR */ - err = - request_irq((int) sp->irq, s2io_isr, SA_SHIRQ, sp->name, dev); + err = request_irq((int) sp->irq, s2io_isr, SA_SHIRQ, + sp->name, dev); if (err) { s2io_reset(sp); DBG_PRINT(ERR_DBG, "%s: ISR registration failed\n", dev->name); return err; } + if (s2io_set_mac_addr(dev, dev->dev_addr) == FAILURE) { DBG_PRINT(ERR_DBG, "Set Mac Address Failed\n"); s2io_reset(sp); return -ENODEV; } - - /* Setting its receive mode */ - s2io_set_multicast(dev); - - /* - * Initializing the Rx buffers. For now we are considering only 1 - * Rx ring and initializing buffers into 1016 RxDs or 8 Rx blocks - */ - mac_control = &sp->mac_control; - config = &sp->config; - - for (i = 0; i < config->rx_ring_num; i++) { - if ((ret = fill_rx_buffers(sp, i))) { - DBG_PRINT(ERR_DBG, "%s: Out of memory in Open\n", - dev->name); - s2io_reset(sp); - free_irq(dev->irq, dev); - free_rx_buffers(sp); - return -ENOMEM; - } - DBG_PRINT(INFO_DBG, "Buf in ring:%d is %d:\n", i, - atomic_read(&sp->rx_bufs_left[i])); - } - - /* Enable tasklet for the device */ - tasklet_init(&sp->task, s2io_tasklet, (unsigned long) dev); - - /* Enable Rx Traffic and interrupts on the NIC */ - if (start_nic(sp)) { - DBG_PRINT(ERR_DBG, "%s: Starting NIC failed\n", dev->name); - tasklet_kill(&sp->task); - s2io_reset(sp); - free_irq(dev->irq, dev); - free_rx_buffers(sp); - return -ENODEV; - } - - sp->device_close_flag = FALSE; /* Device is up and running. */ netif_start_queue(dev); - return 0; } @@ -2755,67 +2714,14 @@ int s2io_close(struct net_device *dev) { nic_t *sp = dev->priv; - XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; - register u64 val64 = 0; - u16 cnt = 0; - unsigned long flags; - spin_lock_irqsave(&sp->tx_lock, flags); + flush_scheduled_work(); netif_stop_queue(dev); + /* Reset card, kill tasklet and free Tx and Rx buffers. */ + s2io_card_down(sp); - /* disable Tx and Rx traffic on the NIC */ - stop_nic(sp); - - /* - * If the device tasklet is running, wait till its done - * before killing it - */ - while (atomic_read(&(sp->tasklet_status))) { - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 10); - } - tasklet_kill(&sp->task); - - /* Free the Registered IRQ */ free_irq(dev->irq, dev); - - /* Flush all scheduled tasks */ - if (sp->task_flag == 1) { - DBG_PRINT(INFO_DBG, "%s: Calling close from a task\n", - dev->name); - } else { - flush_scheduled_work(); - } - - /* Check if the device is Quiescent and then Reset the NIC */ - do { - val64 = readq(&bar0->adapter_status); - if (verify_xena_quiescence(val64, sp->device_enabled_once)) { - break; - } - - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 20); - cnt++; - if (cnt == 10) { - DBG_PRINT(ERR_DBG, - "s2io_close:Device not Quiescent "); - DBG_PRINT(ERR_DBG, "adaper status reads 0x%llx\n", - (unsigned long long) val64); - break; - } - } while (1); - s2io_reset(sp); - - /* Free all Tx Buffers waiting for transmission */ - free_tx_buffers(sp); - - /* Free all Rx buffers allocated by host */ - free_rx_buffers(sp); - sp->device_close_flag = TRUE; /* Device is shut down. */ - spin_unlock_irqrestore(&sp->tx_lock, flags); - return 0; } @@ -2851,14 +2757,13 @@ config = &sp->config; DBG_PRINT(TX_DBG, "%s: In S2IO Tx routine\n", dev->name); - spin_lock_irqsave(&sp->tx_lock, flags); - if ((netif_queue_stopped(dev)) || (!netif_carrier_ok(dev))) { - DBG_PRINT(TX_DBG, "%s:s2io_xmit: Tx Queue stopped\n", + + if (atomic_read(&sp->card_state) == CARD_DOWN) { + DBG_PRINT(ERR_DBG, "%s: Card going down for reset\n", dev->name); - dev_kfree_skb(skb); spin_unlock_irqrestore(&sp->tx_lock, flags); - return 0; + return 1; } queue = 0; @@ -3037,18 +2942,13 @@ DBG_PRINT(ERR_DBG, "%s:Out of memory", dev->name); DBG_PRINT(ERR_DBG, " in ISR!!\n"); - clear_bit(0, - (unsigned long *) (&sp-> - tasklet_status)); + clear_bit(0, (&sp->tasklet_status)); return IRQ_HANDLED; } - clear_bit(0, - (unsigned long *) (&sp->tasklet_status)); - } else if ((level == LOW) - && (!atomic_read(&sp->tasklet_status))) { + clear_bit(0, (&sp->tasklet_status)); + } else if (level == LOW) { tasklet_schedule(&sp->task); } - } #endif @@ -4317,7 +4217,7 @@ break; } } - clear_bit(0, (unsigned long *) (&sp->tasklet_status)); + clear_bit(0, (&sp->tasklet_status)); } } @@ -4335,6 +4235,11 @@ register u64 val64; u16 subid; + if (test_and_set_bit(0, &(nic->link_state))) { + /* The card is being reset, no point doing anything */ + return; + } + subid = nic->pdev->subsystem_device; /* * Allow a small delay for the NICs self initiated @@ -4384,6 +4289,109 @@ DBG_PRINT(ERR_DBG, "device is not Quiescent\n"); netif_stop_queue(dev); } + clear_bit(0, &(nic->link_state)); +} + +static void s2io_card_down(nic_t * sp) +{ + int cnt = 0; + XENA_dev_config_t *bar0 = (XENA_dev_config_t *) sp->bar0; + unsigned long flags; + register u64 val64 = 0; + + /* If s2io_set_link task is executing, wait till it completes. */ + while (test_and_set_bit(0, &(sp->link_state))) { + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(HZ / 20); + } + atomic_set(&sp->card_state, CARD_DOWN); + + /* disable Tx and Rx traffic on the NIC */ + stop_nic(sp); + + /* Kill tasklet. */ + tasklet_kill(&sp->task); + + /* Check if the device is Quiescent and then Reset the NIC */ + do { + val64 = readq(&bar0->adapter_status); + if (verify_xena_quiescence(val64, sp->device_enabled_once)) { + break; + } + + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(HZ / 20); + cnt++; + if (cnt == 10) { + DBG_PRINT(ERR_DBG, + "s2io_close:Device not Quiescent "); + DBG_PRINT(ERR_DBG, "adaper status reads 0x%llx\n", + (unsigned long long) val64); + break; + } + } while (1); + spin_lock_irqsave(&sp->tx_lock, flags); + s2io_reset(sp); + + /* Free all unused Tx and Rx buffers */ + free_tx_buffers(sp); + free_rx_buffers(sp); + + spin_unlock_irqrestore(&sp->tx_lock, flags); + clear_bit(0, &(sp->link_state)); +} + +static int s2io_card_up(nic_t * sp) +{ + int i, ret; + mac_info_t *mac_control; + struct config_param *config; + struct net_device *dev = (struct net_device *) sp->dev; + + /* Initialize the H/W I/O registers */ + if (init_nic(sp) != 0) { + DBG_PRINT(ERR_DBG, "%s: H/W initialization failed\n", + dev->name); + return -ENODEV; + } + + /* + * Initializing the Rx buffers. For now we are considering only 1 + * Rx ring and initializing buffers into 30 Rx blocks + */ + mac_control = &sp->mac_control; + config = &sp->config; + + for (i = 0; i < config->rx_ring_num; i++) { + if ((ret = fill_rx_buffers(sp, i))) { + DBG_PRINT(ERR_DBG, "%s: Out of memory in Open\n", + dev->name); + s2io_reset(sp); + free_rx_buffers(sp); + return -ENOMEM; + } + DBG_PRINT(INFO_DBG, "Buf in ring:%d is %d:\n", i, + atomic_read(&sp->rx_bufs_left[i])); + } + + /* Setting its receive mode */ + s2io_set_multicast(dev); + + /* Enable tasklet for the device */ + tasklet_init(&sp->task, s2io_tasklet, (unsigned long) dev); + + /* Enable Rx Traffic and interrupts on the NIC */ + if (start_nic(sp)) { + DBG_PRINT(ERR_DBG, "%s: Starting NIC failed\n", dev->name); + tasklet_kill(&sp->task); + s2io_reset(sp); + free_irq(dev->irq, dev); + free_rx_buffers(sp); + return -ENODEV; + } + + atomic_set(&sp->card_state, CARD_UP); + return 0; } /** @@ -4401,13 +4409,14 @@ struct net_device *dev = (struct net_device *) data; nic_t *sp = dev->priv; - sp->task_flag = 1; - s2io_close(dev); - sp->task_flag = 0; - sp->device_close_flag = TRUE; - s2io_open(dev); - DBG_PRINT(ERR_DBG, - "%s: was reset by Tx watchdog timer.\n", dev->name); + s2io_card_down(sp); + if (s2io_card_up(sp)) { + DBG_PRINT(ERR_DBG, "%s: Device bring up failed\n", + dev->name); + } + netif_wake_queue(dev); + DBG_PRINT(ERR_DBG, "%s: was reset by Tx watchdog timer\n", + dev->name); } /** @@ -4990,8 +4999,13 @@ dev->addr_len = ETH_ALEN; memcpy(dev->dev_addr, sp->def_mac_addr, ETH_ALEN); - /* Initialize the tasklet status flag */ - atomic_set(&(sp->tasklet_status), 0); + /* + * Initialize the tasklet status and link state flags + * and the card statte parameter + */ + atomic_set(&(sp->card_state), 0); + sp->tasklet_status = 0; + sp->link_state = 0; /* Initialize spinlocks */ @@ -5298,7 +5312,7 @@ printk ("tx_urange_a, tx_urange_b & tx_urange_c can take value " "from 0 to 100 and range_a can't exceed range_b " - "neither can range_b exceed range_c\n"); + "neither can range_b exceed range_c\n"); fail = 1; } if (((rx_urange_a > 100) || (rx_urange_b > 100) || @@ -5307,7 +5321,7 @@ printk ("rx_urange_a, rx_urange_b & rx_urange_c can take value " "from 0 to 100 and range_a can't exceed range_b " - "neither can range_b exceed range_c\n"); + "neither can range_b exceed range_c\n"); fail = 1; } if ((tx_ufc_a > 0xffff) || (tx_ufc_b > 0xffff) || diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-26 16:36:28.244032568 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-26 16:36:16.893758072 -0700 @@ -637,7 +637,7 @@ char name[32]; struct tasklet_struct task; - atomic_t tasklet_status; + volatile unsigned long tasklet_status; struct timer_list timer; struct net_device *dev; struct pci_dev *pdev; @@ -730,6 +730,10 @@ buffAdd_t **ba[MAX_RX_RINGS]; #endif int task_flag; +#define CARD_DOWN 1 +#define CARD_UP 2 + atomic_t card_state; + volatile unsigned long link_state; } nic_t; #define RESET_ERROR 1; @@ -874,5 +878,7 @@ static struct ethtool_ops netdev_ethtool_ops; #endif static void s2io_set_link(unsigned long data); +static void s2io_card_down(nic_t * nic); +static int s2io_card_up(nic_t * nic); #endif /* _S2IO_H */ From ravinandan.arakali@s2io.com Thu Oct 28 15:43:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 15:43:14 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SMh5Gv025112 for ; Thu, 28 Oct 2004 15:43:06 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SMgbje010697; Thu, 28 Oct 2004 18:42:37 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SMgZ39006030; Thu, 28 Oct 2004 18:42:35 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , , Subject: [PATCH 2.6.9-rc2 10/12] S2io: 2 buffer mode with copy Date: Thu, 28 Oct 2004 15:51:06 -0700 Message-ID: <004501c4bd40$ae5529f0$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 11022 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Hi All, This patch addresses the comments by Chris Leech about skb->mac.ethernet resulting in NULL dereference with the old method of implementing 2 buffer mode. The new method performs a copy of the MAC header to the head of the payload. This is a stop-gap measure till the fragmented skb receive feature in the kernel is made functional. Also, using GFP_KERNEL flag for buffer0, buffer1 memory allocation instead of GFP_ATOMIC. Signed-off-by: Raghavendra Koushik Signed-off-by: Ravinandan Arakali --- diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-26 16:40:58.271982080 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-26 16:40:42.944312240 -0700 @@ -497,7 +497,7 @@ ba = &nic->ba[i][j][k]; ba->ba_0_org = (void *) kmalloc - (BUF0_LEN + ALIGN_SIZE, GFP_ATOMIC); + (BUF0_LEN + ALIGN_SIZE, GFP_KERNEL); if (!ba->ba_0_org) return -ENOMEM; tmp = (u64) ba->ba_0_org; @@ -506,7 +506,7 @@ ba->ba_0 = (void *) tmp; ba->ba_1_org = (void *) kmalloc - (BUF1_LEN + ALIGN_SIZE, GFP_ATOMIC); + (BUF1_LEN + ALIGN_SIZE, GFP_KERNEL); if (!ba->ba_1_org) return -ENOMEM; tmp = (u64) ba->ba_1_org; @@ -1791,8 +1791,7 @@ #ifndef CONFIG_2BUFF_MODE skb = dev_alloc_skb(size + NET_IP_ALIGN); #else - skb = dev_alloc_skb(dev->mtu + ALIGN_SIZE + - /*BUF0_LEN + */ 22); + skb = dev_alloc_skb(dev->mtu + ALIGN_SIZE + BUF0_LEN + 4); #endif if (!skb) { DBG_PRINT(ERR_DBG, "%s: Out of ", dev->name); @@ -1813,14 +1812,16 @@ mac_control->rx_curr_put_info[ring_no].offset = off; #else ba = &nic->ba[ring_no][block_no][off]; + skb_reserve(skb, BUF0_LEN); tmp = (u64) skb->data; tmp += ALIGN_SIZE; tmp &= ~ALIGN_SIZE; skb->data = (void *) tmp; + skb->tail = (void *) tmp; memset(rxdp, 0, sizeof(RxD_t)); rxdp->Buffer2_ptr = pci_map_single - (nic->pdev, skb->data, dev->mtu + 22, + (nic->pdev, skb->data, dev->mtu + BUF0_LEN + 4, PCI_DMA_FROMDEVICE); rxdp->Buffer0_ptr = pci_map_single(nic->pdev, ba->ba_0, BUF0_LEN, @@ -1829,7 +1830,7 @@ pci_map_single(nic->pdev, ba->ba_1, BUF1_LEN, PCI_DMA_FROMDEVICE); - rxdp->Control_2 = SET_BUFFER2_SIZE(dev->mtu + 22); + rxdp->Control_2 = SET_BUFFER2_SIZE(dev->mtu + 4); rxdp->Control_2 |= SET_BUFFER0_SIZE(BUF0_LEN); rxdp->Control_2 |= SET_BUFFER1_SIZE(1); /* dummy. */ rxdp->Control_2 |= BIT(0); /* Set Buffer_Empty bit. */ @@ -1919,7 +1920,7 @@ PCI_DMA_FROMDEVICE); pci_unmap_single(sp->pdev, (dma_addr_t) rxdp->Buffer2_ptr, - dev->mtu + 22, + dev->mtu + BUF0_LEN + 4, PCI_DMA_FROMDEVICE); #endif dev_kfree_skb(skb); @@ -2073,7 +2074,7 @@ BUF1_LEN, PCI_DMA_FROMDEVICE); pci_unmap_single(nic->pdev, (dma_addr_t) rxdp->Buffer2_ptr, - dev->mtu + 22, + dev->mtu + BUF0_LEN + 4, PCI_DMA_FROMDEVICE); ba = &nic->ba[i][get_block][get_info.offset]; @@ -2270,7 +2271,7 @@ BUF1_LEN, PCI_DMA_FROMDEVICE); pci_unmap_single(nic->pdev, (dma_addr_t) rxdp->Buffer2_ptr, - dev->mtu + 22, + dev->mtu + BUF0_LEN + 4, PCI_DMA_FROMDEVICE); ba = &nic->ba[i][get_block][get_info.offset]; @@ -4471,7 +4472,7 @@ u16 l3_csum, l4_csum; #ifdef CONFIG_2BUFF_MODE int buf0_len, buf2_len; - struct ethhdr *eth = (struct ethhdr *) ba->ba_0; + unsigned char *buff; #endif l3_csum = RXD_GET_L3_CKSUM(rxdp->Control_1); @@ -4510,21 +4511,10 @@ skb_put(skb, len); skb->protocol = eth_type_trans(skb, dev); #else + buff = skb_push(skb, buf0_len); + memcpy(buff, ba->ba_0, buf0_len); skb_put(skb, buf2_len); - /* - * Reproducing eth_type_trans functionality and running - * on the ethernet header 'eth' stripped and given to us - * by the hardware in 2Buff mode. - */ - if (*eth->h_dest & 1) { - if (!memcmp(eth->h_dest, dev->broadcast, ETH_ALEN)) - skb->pkt_type = PACKET_BROADCAST; - else - skb->pkt_type = PACKET_MULTICAST; - } else if (memcmp(eth->h_dest, dev->dev_addr, ETH_ALEN)) { - skb->pkt_type = PACKET_OTHERHOST; - } - skb->protocol = eth->h_proto; + skb->protocol = eth_type_trans(skb, dev); #endif #ifdef CONFIG_S2IO_NAPI From ravinandan.arakali@s2io.com Thu Oct 28 15:44:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 15:44:33 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SMiLbD026820 for ; Thu, 28 Oct 2004 15:44:22 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SMgtje010704; Thu, 28 Oct 2004 18:42:55 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SMgr39006089; Thu, 28 Oct 2004 18:42:53 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , , Subject: [PATCH 2.6.9-rc2 12/12] S2io: styling Date: Thu, 28 Oct 2004 15:51:32 -0700 Message-ID: <004701c4bd40$b92c47a0$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 11023 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Hi, Attached is the patch to implement comments about styling and few other changes. Following is list of changes. 1. Incorporated Randy's comment about C99 format for s2io_driver structure initialization. 2. Driver version displayed at load time. 3. If initialization failed in s2io_init_nic(), appropriate error codes are returned. 4. #ifdef SET_ETHTOOL_OPS removed in couple of places. Signed-off-by: Raghavendra Koushik Signed-off-by: Ravinandan Arakali --- diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-26 16:45:59.090250752 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-26 16:45:47.840960904 -0700 @@ -250,10 +250,10 @@ MODULE_DEVICE_TABLE(pci, s2io_tbl); static struct pci_driver s2io_driver = { - name:"S2IO", - id_table:s2io_tbl, - probe:s2io_init_nic, - remove:__devexit_p(s2io_rem_nic), + .name = "S2IO", + .id_table = s2io_tbl, + .probe = s2io_init_nic, + .remove = __devexit_p(s2io_rem_nic), }; /* A simplifier macro used both by init and free shared_mem Fns(). */ @@ -4603,6 +4603,9 @@ struct config_param *config; + DBG_PRINT(ERR_DBG, "Loading S2IO driver with %s\n", + s2io_driver_version); + if ((ret = pci_enable_device(pdev))) { DBG_PRINT(ERR_DBG, "s2io_init_nic: pci_enable_device failed\n"); @@ -4720,6 +4723,7 @@ if (init_shared_mem(sp)) { DBG_PRINT(ERR_DBG, "%s: Memory allocation failed\n", dev->name); + ret = -ENOMEM; goto mem_alloc_failed; } @@ -4728,6 +4732,7 @@ if (!sp->bar0) { DBG_PRINT(ERR_DBG, "%s: S2IO: cannot remap io mem1\n", dev->name); + ret = -ENOMEM; goto bar0_remap_failed; } @@ -4736,6 +4741,7 @@ if (!sp->bar1) { DBG_PRINT(ERR_DBG, "%s: S2IO: cannot remap io mem2\n", dev->name); + ret = -ENOMEM; goto bar1_remap_failed; } @@ -4756,9 +4762,7 @@ dev->set_multicast_list = &s2io_set_multicast; dev->do_ioctl = &s2io_ioctl; dev->change_mtu = &s2io_change_mtu; -#ifdef SET_ETHTOOL_OPS SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); -#endif /* * will use eth_mac_addr() for dev->set_mac_address * mac address will be set every time dev->open() is called @@ -4788,6 +4792,7 @@ if (s2io_set_swapper(sp)) { DBG_PRINT(ERR_DBG, "%s:swapper settings are wrong\n", dev->name); + ret = -EAGAIN; goto set_swap_failed; } @@ -4802,6 +4807,7 @@ DBG_PRINT(ERR_DBG, "%s: S2IO: swapper settings are wrong\n", dev->name); + ret = -EAGAIN; goto set_swap_failed; } @@ -4874,6 +4880,7 @@ if (register_netdev(dev)) { DBG_PRINT(ERR_DBG, "Device registration failed\n"); + ret = -ENODEV; goto register_failed; } @@ -4900,7 +4907,7 @@ pci_set_drvdata(pdev, NULL); free_netdev(dev); - return -ENODEV; + return ret; } /** diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-26 16:45:59.329214424 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-26 16:45:48.079924576 -0700 @@ -50,10 +50,6 @@ #define ALIGN_SIZE 127 #define PCIX_COMMAND_REGISTER 0x62 -#ifndef SET_ETHTOOL_OPS -#define SUPPORTED_10000baseT_Full (1 << 12) -#endif - /* * Debug related variables. */ @@ -873,9 +869,7 @@ int s2io_set_mac_addr(struct net_device *dev, u8 * addr); static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs *regs); static int verify_xena_quiescence(u64 val64, int flag); -#ifdef SET_ETHTOOL_OPS static struct ethtool_ops netdev_ethtool_ops; -#endif static void s2io_set_link(unsigned long data); static void s2io_card_down(nic_t * nic); static int s2io_card_up(nic_t * nic); From ravinandan.arakali@s2io.com Thu Oct 28 15:44:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 15:44:35 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SMiLgG026813 for ; Thu, 28 Oct 2004 15:44:21 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9SMgkje010701; Thu, 28 Oct 2004 18:42:46 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9SMgi39006061; Thu, 28 Oct 2004 18:42:44 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" , "'Francois Romieu'" Cc: , , , , Subject: [PATCH 2.6.9-rc2 11/12] S2io: modified loadable parameters Date: Thu, 28 Oct 2004 15:51:14 -0700 Message-ID: <004601c4bd40$b39f61a0$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 11024 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Hi, Attached is the patch to implement module loadable parameters as per new API. Following is the list of changes. 1. Used new module_param() API. 2. List of variables for tx_fifo_len and rx_ring_sz replaced with array. 3. Some of the module parameters which can be set thru setpci command have been removed, such as latency_timer, max_read_byte_cnt, max_split_transactions. 4. Other parameters which were felt to be not required, such as rx_prio, tx_prio have been removed. 5. Interrupt moderation parameters(such as tx_urange_*) are no longer module loadable parameters since they can be configured thru' a separate patch available to customers. 6. Changed default max_read_byte_count to 1024. 7. If scatter-gather is enabled, checksum is enabled too. 8. Not verifying if module loadable parameters are within valid range (verify_load_param() removed). Signed-off-by: Raghavendra Koushik Signed-off-by: Ravinandan Arakali --- diff -urN vanilla-linux/drivers/net/s2io.c linux-2.6.8.1/drivers/net/s2io.c --- vanilla-linux/drivers/net/s2io.c 2004-10-26 16:43:26.315476048 -0700 +++ linux-2.6.8.1/drivers/net/s2io.c 2004-10-26 16:43:19.561502808 -0700 @@ -26,17 +26,13 @@ * * The module loadable parameters that are supported by the driver and a brief * explaination of all the variables. - * ring_num : This can be used to program the number of receive rings used + * rx_ring_num : This can be used to program the number of receive rings used * in the driver. - * frame_len: This is an array of size 8. Using this we can set the maximum - * size of the received frame that can be steered into the corrsponding - * receive ring. - * ring_len: This defines the number of descriptors each ring can have. This + * rx_ring_len: This defines the number of descriptors each ring can have. This * is also an array of size 8. - * fifo_num: This defines the number of Tx FIFOs thats used int the driver. - * fifo_len: This too is an array of 8. Each element defines the number of + * tx_fifo_num: This defines the number of Tx FIFOs thats used int the driver. + * tx_fifo_len: This too is an array of 8. Each element defines the number of * Tx descriptors that can be associated with each corresponding FIFO. - * latency_timer: This input is programmed into the Latency timer register * in PCI Configuration space. ************************************************************************/ @@ -222,66 +218,22 @@ }; /* Module Loadable parameters. */ -static u32 frame_len[MAX_RX_RINGS]; -static u32 rx_prio; -static u32 tx_prio; - -static unsigned int lso_enable = 1; -#ifndef CONFIG_S2IO_NAPI -static unsigned int indicate_max_pkts; -#endif -static unsigned int cksum_offload_enable = 1; static unsigned int tx_fifo_num = 1; -static unsigned int tx_fifo_len_0 = DEFAULT_FIFO_LEN; -static unsigned int tx_fifo_len_1; -static unsigned int tx_fifo_len_2; -static unsigned int tx_fifo_len_3; -static unsigned int tx_fifo_len_4; -static unsigned int tx_fifo_len_5; -static unsigned int tx_fifo_len_6; -static unsigned int tx_fifo_len_7; -static unsigned int max_txds = MAX_SKB_FRAGS; +static unsigned int tx_fifo_len[MAX_TX_FIFOS] = + {[0 ...(MAX_TX_FIFOS - 1)] = 0 }; static unsigned int rx_ring_num = 1; -static unsigned int rx_ring_sz_0 = SMALL_BLK_CNT; -static unsigned int rx_ring_sz_1; -static unsigned int rx_ring_sz_2; -static unsigned int rx_ring_sz_3; -static unsigned int rx_ring_sz_4; -static unsigned int rx_ring_sz_5; -static unsigned int rx_ring_sz_6; -static unsigned int rx_ring_sz_7; +static unsigned int rx_ring_sz[MAX_RX_RINGS] = + {[0 ...(MAX_RX_RINGS - 1)] = 0 }; static unsigned int Stats_refresh_time = 4; static unsigned int rmac_pause_time = 65535; static unsigned int mc_pause_threshold_q0q3 = 187; static unsigned int mc_pause_threshold_q4q7 = 187; static unsigned int shared_splits; -#if defined(__ia64__) -static unsigned int max_splits_trans = XENA_THREE_SPLIT_TRANSACTION; -#else -static unsigned int max_splits_trans = XENA_TWO_SPLIT_TRANSACTION; -#endif static unsigned int tmac_util_period = 5; static unsigned int rmac_util_period = 5; -static unsigned int tx_timer_val = 0xFFF; -static unsigned int tx_utilz_periodic = 1; -static unsigned int rx_timer_val = 0xFFF; -static unsigned int rx_utilz_periodic = 1; -static unsigned int tx_urange_a = 0xA; -static unsigned int tx_ufc_a = 0x10; -static unsigned int tx_urange_b = 0x10; -static unsigned int tx_ufc_b = 0x20; -static unsigned int tx_urange_c = 0x30; -static unsigned int tx_ufc_c = 0x40; -static unsigned int tx_ufc_d = 0x80; -static unsigned int rx_urange_a = 0xA; -static unsigned int rx_ufc_a = 0x1; -static unsigned int rx_urange_b = 0x10; -static unsigned int rx_ufc_b = 0x2; -static unsigned int rx_urange_c = 0x30; -static unsigned int rx_ufc_c = 0x40; -static unsigned int rx_ufc_d = 0x80; -static u8 latency_timer = 0xf8; -static u8 max_read_byte_cnt = 2; +#ifndef CONFIG_S2IO_NAPI +static unsigned int indicate_max_pkts; +#endif /* * S2IO device table. @@ -923,17 +875,8 @@ * Disable Rx steering. Hard coding all packets be steered to * Queue 0 for now. */ - if (rx_prio) { - u64 def = 0x8000000000000000ULL, tmp; - for (i = 0; i < MAX_RX_RINGS; i++) { - tmp = (u64) (def >> (i % config->rx_ring_num)); - val64 |= (u64) (tmp >> (i * 8)); - } - writeq(val64, &bar0->rts_qos_steering); - } else { - val64 = 0x8080808080808080ULL; - writeq(val64, &bar0->rts_qos_steering); - } + val64 = 0x8080808080808080ULL; + writeq(val64, &bar0->rts_qos_steering); /* UDP Fix */ val64 = 0; @@ -964,18 +907,15 @@ * Scheme. */ /* TTI Initialization */ - val64 = TTI_DATA1_MEM_TX_TIMER_VAL(tx_timer_val) | - TTI_DATA1_MEM_TX_URNG_A(tx_urange_a) | - TTI_DATA1_MEM_TX_URNG_B(tx_urange_b) | - TTI_DATA1_MEM_TX_URNG_C(tx_urange_c); - if (tx_utilz_periodic) - val64 |= TTI_DATA1_MEM_TX_TIMER_AC_EN; + val64 = TTI_DATA1_MEM_TX_TIMER_VAL(0xFFF) | + TTI_DATA1_MEM_TX_URNG_A(0xA) | + TTI_DATA1_MEM_TX_URNG_B(0x10) | + TTI_DATA1_MEM_TX_URNG_C(0x30) | TTI_DATA1_MEM_TX_TIMER_AC_EN; writeq(val64, &bar0->tti_data1_mem); - val64 = TTI_DATA2_MEM_TX_UFC_A(tx_ufc_a) | - TTI_DATA2_MEM_TX_UFC_B(tx_ufc_b) | - TTI_DATA2_MEM_TX_UFC_C(tx_ufc_c) | - TTI_DATA2_MEM_TX_UFC_D(tx_ufc_d); + val64 = TTI_DATA2_MEM_TX_UFC_A(0x10) | + TTI_DATA2_MEM_TX_UFC_B(0x20) | + TTI_DATA2_MEM_TX_UFC_C(0x40) | TTI_DATA2_MEM_TX_UFC_D(0x80); writeq(val64, &bar0->tti_data2_mem); val64 = TTI_CMD_MEM_WE | TTI_CMD_MEM_STROBE_NEW_CMD; @@ -1004,19 +944,16 @@ } /* RTI Initialization */ - val64 = RTI_DATA1_MEM_RX_TIMER_VAL(rx_timer_val) | - RTI_DATA1_MEM_RX_URNG_A(rx_urange_a) | - RTI_DATA1_MEM_RX_URNG_B(rx_urange_b) | - RTI_DATA1_MEM_RX_URNG_C(rx_urange_c); - if (rx_utilz_periodic) - val64 |= RTI_DATA1_MEM_RX_TIMER_AC_EN; + val64 = RTI_DATA1_MEM_RX_TIMER_VAL(0xFFF) | + RTI_DATA1_MEM_RX_URNG_A(0xA) | + RTI_DATA1_MEM_RX_URNG_B(0x10) | + RTI_DATA1_MEM_RX_URNG_C(0x30) | RTI_DATA1_MEM_RX_TIMER_AC_EN; writeq(val64, &bar0->rti_data1_mem); - val64 = RTI_DATA2_MEM_RX_UFC_A(rx_ufc_a) | - RTI_DATA2_MEM_RX_UFC_B(rx_ufc_b) | - RTI_DATA2_MEM_RX_UFC_C(rx_ufc_c) | - RTI_DATA2_MEM_RX_UFC_D(rx_ufc_d); + val64 = RTI_DATA2_MEM_RX_UFC_A(0x1) | + RTI_DATA2_MEM_RX_UFC_B(0x2) | + RTI_DATA2_MEM_RX_UFC_C(0x40) | RTI_DATA2_MEM_RX_UFC_D(0x80); writeq(val64, &bar0->rti_data2_mem); val64 = RTI_CMD_MEM_WE | RTI_CMD_MEM_STROBE_NEW_CMD; @@ -1675,15 +1612,8 @@ mac_control = &nic->mac_control; config = &nic->config; - if (frame_len[ring_no]) { - if (frame_len[ring_no] > dev->mtu) - dev->mtu = frame_len[ring_no]; - size = frame_len[ring_no] + HEADER_ETHERNET_II_802_3_SIZE + - HEADER_802_2_SIZE + HEADER_SNAP_SIZE; - } else { - size = dev->mtu + HEADER_ETHERNET_II_802_3_SIZE + - HEADER_802_2_SIZE + HEADER_SNAP_SIZE; - } + size = dev->mtu + HEADER_ETHERNET_II_802_3_SIZE + + HEADER_802_2_SIZE + HEADER_SNAP_SIZE; while (alloc_tab < alloc_cnt) { block_no = mac_control->rx_curr_put_info[ring_no]. @@ -2768,13 +2698,6 @@ } queue = 0; - /* Multi FIFO Tx is disabled for now. */ - if (!queue && tx_prio) { - u8 x = (skb->data)[5]; - queue = x % config->tx_fifo_num; - } - - put_off = (u16) mac_control->tx_curr_put_info[queue].offset; get_off = (u16) mac_control->tx_curr_get_info[queue].offset; txdp = (TxD_t *) sp->list_info[queue][put_off].list_virt_addr; @@ -4612,25 +4535,16 @@ (pci_cmd | PCI_COMMAND_PARITY)); pci_read_config_word(sp->pdev, PCI_COMMAND, &pci_cmd); - /* Set user specified value in Latency Timer */ - if (latency_timer) { - pci_write_config_byte(sp->pdev, PCI_LATENCY_TIMER, - latency_timer); - pci_read_config_byte(sp->pdev, PCI_LATENCY_TIMER, - &latency_timer); - } - - /* Set MMRB count to 2048 in PCI-X Command register. */ + /* Set MMRB count to 1024 in PCI-X Command register. */ sp->pcix_cmd &= 0xFFF3; - pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, - (sp->pcix_cmd | (max_read_byte_cnt << 2))); + pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, (sp->pcix_cmd | (0x1 << 2))); /* MMRBC 1K */ pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, &(sp->pcix_cmd)); /* Setting Maximum outstanding splits based on system type. */ sp->pcix_cmd &= 0xFF8F; - sp->pcix_cmd |= XENA_MAX_OUTSTANDING_SPLITS(max_splits_trans); + sp->pcix_cmd |= XENA_MAX_OUTSTANDING_SPLITS(0x1); /* 2 splits. */ pci_write_config_word(sp->pdev, PCIX_COMMAND_REGISTER, sp->pcix_cmd); pci_read_config_word(sp->pdev, PCIX_COMMAND_REGISTER, @@ -4645,58 +4559,20 @@ MODULE_AUTHOR("Raghavendra Koushik "); MODULE_LICENSE("GPL"); -MODULE_PARM(lso_enable, "i"); +module_param(tx_fifo_num, int, 0); +module_param_array(tx_fifo_len, int, tx_fifo_num, 0); +module_param(rx_ring_num, int, 0); +module_param_array(rx_ring_sz, int, rx_ring_num, 0); +module_param(Stats_refresh_time, int, 0); +module_param(rmac_pause_time, int, 0); +module_param(mc_pause_threshold_q0q3, int, 0); +module_param(mc_pause_threshold_q4q7, int, 0); +module_param(shared_splits, int, 0); +module_param(tmac_util_period, int, 0); +module_param(rmac_util_period, int, 0); #ifndef CONFIG_S2IO_NAPI -MODULE_PARM(indicate_max_pkts, "i"); +module_param(indicate_max_pkts, int, 0); #endif -MODULE_PARM(cksum_offload_enable, "i"); -MODULE_PARM(tx_fifo_num, "i"); -MODULE_PARM(tx_fifo_len_0, "i"); -MODULE_PARM(tx_fifo_len_1, "i"); -MODULE_PARM(tx_fifo_len_2, "i"); -MODULE_PARM(tx_fifo_len_3, "i"); -MODULE_PARM(tx_fifo_len_4, "i"); -MODULE_PARM(tx_fifo_len_5, "i"); -MODULE_PARM(tx_fifo_len_6, "i"); -MODULE_PARM(tx_fifo_len_7, "i"); -MODULE_PARM(max_txds, "i"); -MODULE_PARM(rx_ring_num, "i"); -MODULE_PARM(rx_ring_sz_0, "i"); -MODULE_PARM(rx_ring_sz_1, "i"); -MODULE_PARM(rx_ring_sz_2, "i"); -MODULE_PARM(rx_ring_sz_3, "i"); -MODULE_PARM(rx_ring_sz_4, "i"); -MODULE_PARM(rx_ring_sz_5, "i"); -MODULE_PARM(rx_ring_sz_6, "i"); -MODULE_PARM(rx_ring_sz_7, "i"); -MODULE_PARM(Stats_refresh_time, "i"); -MODULE_PARM(rmac_pause_time, "i"); -MODULE_PARM(mc_pause_threshold_q0q3, "i"); -MODULE_PARM(mc_pause_threshold_q4q7, "i"); -MODULE_PARM(shared_splits, "i"); -MODULE_PARM(max_splits_trans, "i"); -MODULE_PARM(tmac_util_period, "i"); -MODULE_PARM(rmac_util_period, "i"); -MODULE_PARM(tx_timer_val, "i"); -MODULE_PARM(tx_utilz_periodic, "i"); -MODULE_PARM(rx_timer_val, "i"); -MODULE_PARM(rx_utilz_periodic, "i"); -MODULE_PARM(tx_urange_a, "i"); -MODULE_PARM(tx_ufc_a, "i"); -MODULE_PARM(tx_urange_b, "i"); -MODULE_PARM(tx_ufc_b, "i"); -MODULE_PARM(tx_urange_c, "i"); -MODULE_PARM(tx_ufc_c, "i"); -MODULE_PARM(tx_ufc_d, "i"); -MODULE_PARM(rx_urange_a, "i"); -MODULE_PARM(rx_ufc_a, "i"); -MODULE_PARM(rx_urange_b, "i"); -MODULE_PARM(rx_ufc_b, "i"); -MODULE_PARM(rx_urange_c, "i"); -MODULE_PARM(rx_ufc_c, "i"); -MODULE_PARM(rx_ufc_d, "i"); -MODULE_PARM(latency_timer, "i"); -MODULE_PARM(max_read_byte_cnt, "i"); /** * s2io_init_nic - Initialization of the adapter . * @pdev : structure containing the PCI related information of the device. @@ -4797,23 +4673,12 @@ config = &sp->config; /* Tx side parameters. */ + tx_fifo_len[0] = DEFAULT_FIFO_LEN; /* Default value. */ config->tx_fifo_num = tx_fifo_num; - config->tx_cfg[0].fifo_len = tx_fifo_len_0; - config->tx_cfg[0].fifo_priority = 0; - config->tx_cfg[1].fifo_len = tx_fifo_len_1; - config->tx_cfg[1].fifo_priority = 1; - config->tx_cfg[2].fifo_len = tx_fifo_len_2; - config->tx_cfg[2].fifo_priority = 2; - config->tx_cfg[3].fifo_len = tx_fifo_len_3; - config->tx_cfg[3].fifo_priority = 3; - config->tx_cfg[4].fifo_len = tx_fifo_len_4; - config->tx_cfg[4].fifo_priority = 4; - config->tx_cfg[5].fifo_len = tx_fifo_len_5; - config->tx_cfg[5].fifo_priority = 5; - config->tx_cfg[6].fifo_len = tx_fifo_len_6; - config->tx_cfg[6].fifo_priority = 6; - config->tx_cfg[7].fifo_len = tx_fifo_len_7; - config->tx_cfg[7].fifo_priority = 7; + for (i = 0; i < MAX_TX_FIFOS; i++) { + config->tx_cfg[i].fifo_len = tx_fifo_len[i]; + config->tx_cfg[i].fifo_priority = i; + } config->tx_intr_type = TXD_INT_TYPE_UTILZ; for (i = 0; i < config->tx_fifo_num; i++) { @@ -4827,23 +4692,13 @@ config->max_txds = MAX_SKB_FRAGS; /* Rx side parameters. */ + rx_ring_sz[0] = SMALL_BLK_CNT; /* Default value. */ config->rx_ring_num = rx_ring_num; - config->rx_cfg[0].num_rxd = rx_ring_sz_0 * (MAX_RXDS_PER_BLOCK + 1); - config->rx_cfg[0].ring_priority = 0; - config->rx_cfg[1].num_rxd = rx_ring_sz_1 * (MAX_RXDS_PER_BLOCK + 1); - config->rx_cfg[1].ring_priority = 1; - config->rx_cfg[2].num_rxd = rx_ring_sz_2 * (MAX_RXDS_PER_BLOCK + 1); - config->rx_cfg[2].ring_priority = 2; - config->rx_cfg[3].num_rxd = rx_ring_sz_3 * (MAX_RXDS_PER_BLOCK + 1); - config->rx_cfg[3].ring_priority = 3; - config->rx_cfg[4].num_rxd = rx_ring_sz_4 * (MAX_RXDS_PER_BLOCK + 1); - config->rx_cfg[4].ring_priority = 4; - config->rx_cfg[5].num_rxd = rx_ring_sz_5 * (MAX_RXDS_PER_BLOCK + 1); - config->rx_cfg[5].ring_priority = 5; - config->rx_cfg[6].num_rxd = rx_ring_sz_6 * (MAX_RXDS_PER_BLOCK + 1); - config->rx_cfg[6].ring_priority = 6; - config->rx_cfg[7].num_rxd = rx_ring_sz_7 * (MAX_RXDS_PER_BLOCK + 1); - config->rx_cfg[7].ring_priority = 7; + for (i = 0; i < MAX_RX_RINGS; i++) { + config->rx_cfg[i].num_rxd = rx_ring_sz[i] * + (MAX_RXDS_PER_BLOCK + 1); + config->rx_cfg[i].ring_priority = i; + } for (i = 0; i < rx_ring_num; i++) { config->rx_cfg[i].ring_org = RING_ORG_BUFF1; @@ -4910,17 +4765,14 @@ */ #ifdef CONFIG_S2IO_NAPI dev->poll = s2io_poll; - dev->weight = 90; /* For now. */ + dev->weight = 90; #endif - dev->features |= NETIF_F_SG; - if (cksum_offload_enable) - dev->features |= NETIF_F_IP_CSUM; + dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM; if (sp->high_dma_flag == TRUE) dev->features |= NETIF_F_HIGHDMA; #ifdef NETIF_F_TSO - if (lso_enable) - dev->features |= NETIF_F_TSO; + dev->features |= NETIF_F_TSO; #endif dev->tx_timeout = &s2io_tx_watchdog; @@ -5092,8 +4944,6 @@ int __init s2io_starter(void) { - if (verify_load_parm()) - return -ENODEV; return pci_module_init(&s2io_driver); } @@ -5110,223 +4960,3 @@ module_init(s2io_starter); module_exit(s2io_closer); -/** - * verify_load_parm - verifies the module loadable parameters - * Descriptions: Verifies the module loadable parameters and initializes the - * Tx Fifo, Rx Ring and other paramters. - */ - -int verify_load_parm() -{ - int fail = 0; - if (!((lso_enable == 0) || (lso_enable == 1))) { - printk("lso_enable can be either '1' or '0'\n"); - fail = 1; - } -#ifndef CONFIG_S2IO_NAPI - if ((indicate_max_pkts > (0xFFFFFFFF))) { - printk - ("indicate_max_pkts can take value greater than zero but less than 2power(32)\n"); - fail = 1; - } -#endif - if (!((cksum_offload_enable == 0) || (cksum_offload_enable == 1))) { - printk("cksum_offload_enable can be only '0' or '1' \n"); - fail = 1; - } - if ((tx_fifo_num == 0) || (tx_fifo_num > 8)) { - printk("tx_fifo_num can take value from 1 to 8\n"); - fail = 1; - } - switch (tx_fifo_num) { - case 8: - if ((tx_fifo_len_7 == 0) || tx_fifo_len_7 > 8192) { - printk - ("tx_fifo_len_7 can take value from 1 to 8192\n"); - fail = 1; - } - case 7: - if ((tx_fifo_len_6 == 0) || tx_fifo_len_6 > 8192) { - printk - ("tx_fifo_len_6 can take value from 1 to 8192\n"); - fail = 1; - } - case 6: - if ((tx_fifo_len_5 == 0) || tx_fifo_len_5 > 8192) { - printk - ("tx_fifo_len_5 can take value from 1 to 8192\n"); - fail = 1; - } - case 5: - if ((tx_fifo_len_4 == 0) || tx_fifo_len_4 > 8192) { - printk - ("tx_fifo_len_4 can take value from 1 to 8192\n"); - fail = 1; - } - case 4: - if ((tx_fifo_len_3 == 0) || tx_fifo_len_3 > 8192) { - printk - ("tx_fifo_len_3 can take value from 1 to 8192\n"); - fail = 1; - } - case 3: - if ((tx_fifo_len_2 == 0) || tx_fifo_len_2 > 8192) { - printk - ("tx_fifo_len_2 can take value from 1 to 8192\n"); - fail = 1; - } - case 2: - if ((tx_fifo_len_1 == 0) || tx_fifo_len_1 > 8192) { - printk - ("tx_fifo_len_1 can take value from 1 to 8192\n"); - fail = 1; - } - case 1: - if ((tx_fifo_len_0 == 0) || tx_fifo_len_0 > 8192) { - printk - ("tx_fifo_len_0 can take value from 1 to 8192\n"); - fail = 1; - } - } - if ((max_txds > 32) || (max_txds < 1)) { - printk("max_txds can take value from 1 to 32\n"); - fail = 1; - } - if ((rx_ring_num > 8) || (rx_ring_num < 1)) { - printk("rx_ring_num can take value from 1 to 8\n"); - fail = 1; - } - switch (rx_ring_num) { - case 8: - if (rx_ring_sz_7 < 1) { - printk - ("rx_ring_sz_7 can take value greater than 0\n"); - fail = 1; - } - case 7: - if (rx_ring_sz_6 < 1) { - printk - ("rx_ring_sz_6 can take value greater than 0\n"); - fail = 1; - } - case 6: - if (rx_ring_sz_5 < 1) { - printk - ("rx_ring_sz_5 can take value greater than 0\n"); - fail = 1; - } - case 5: - if (rx_ring_sz_4 < 1) { - printk - ("rx_ring_sz_4 can take value greater than 0\n"); - fail = 1; - } - case 4: - if (rx_ring_sz_3 < 1) { - printk - ("rx_ring_sz_3 can take value greater than 0\n"); - fail = 1; - } - case 3: - if (rx_ring_sz_2 < 1) { - printk - ("rx_ring_sz_2 can take value greater than 0\n"); - fail = 1; - } - case 2: - if (rx_ring_sz_1 < 1) { - printk - ("rx_ring_sz_1 can take value greater than 0\n"); - fail = 1; - } - case 1: - if (rx_ring_sz_0 < 1) { - printk - ("rx_ring_sz_0 can take value greater than 0\n"); - fail = 1; - } - } - if ((Stats_refresh_time < 1)) { - printk - ("Stats_refresh_time cannot be less than 1 second \n"); - fail = 1; - } - if (((rmac_pause_time < 0x10) && (rmac_pause_time != 0)) || - (rmac_pause_time > 0xFFFF)) { - printk - ("rmac_pause_time can take value from 16 to 65535\n"); - fail = 1; - } - if (max_splits_trans > 7) { - printk("max_splits_trans can take value from 0 to 7\n"); - fail = 1; - } - if ((mc_pause_threshold_q0q3 > 0xFE)) { - printk("mc_pause_threshold_q0q3 cannot exceed 254\n"); - fail = 1; - } - if ((mc_pause_threshold_q4q7 > 0xFE)) { - printk("mc_pause_threshold_q4q7 cannot exceed 254\n"); - fail = 1; - } - if ((latency_timer) - && ((latency_timer < 8) || (latency_timer > 255))) { - printk("latency_timer can take value from 8 to 255\n"); - fail = 1; - } - if (max_read_byte_cnt > 3) { - printk("max_read_byte_cnt can take value from 0 to 3\n"); - fail = 1; - } - if (shared_splits > 31) { - printk("shared_splits cannot exceed 31\n"); - fail = 1; - } - if (rmac_util_period > 0xF) { - printk("rmac_util_period cannot exceed 15\n"); - fail = 1; - } - if (tmac_util_period > 0xF) { - printk("tmac_util_period cannot exceed 15\n"); - fail = 1; - } - if ((tx_utilz_periodic > 1) || (rx_utilz_periodic > 1)) { - printk - ("tx_utilz_periodic & rx_utilz_periodic can be either " - "'0' or '1'\n"); - fail = 1; - } - if (((tx_urange_a > 100) || (tx_urange_b > 100) || - (tx_urange_c > 100)) || (tx_urange_a > tx_urange_b) - || (tx_urange_b > tx_urange_c)) { - printk - ("tx_urange_a, tx_urange_b & tx_urange_c can take value " - "from 0 to 100 and range_a can't exceed range_b " - "neither can range_b exceed range_c\n"); - fail = 1; - } - if (((rx_urange_a > 100) || (rx_urange_b > 100) || - (rx_urange_c > 100)) || (rx_urange_a > rx_urange_b) - || (rx_urange_b > rx_urange_c)) { - printk - ("rx_urange_a, rx_urange_b & rx_urange_c can take value " - "from 0 to 100 and range_a can't exceed range_b " - "neither can range_b exceed range_c\n"); - fail = 1; - } - if ((tx_ufc_a > 0xffff) || (tx_ufc_b > 0xffff) || - (tx_ufc_c > 0xffff) || (tx_ufc_d > 0xffff)) { - printk - (" tx_ufc_a, tx_ufc_b, tx_ufc_c, tx_ufc_d can take value" - "from 0 to 65535(0xFFFF)\n"); - fail = 1; - } - if ((rx_ufc_a > 0xffff) || (rx_ufc_b > 0xffff) || - (rx_ufc_c > 0xffff) || (rx_ufc_d > 0xffff)) { - printk - (" rx_ufc_a, rx_ufc_b, rx_ufc_c, rx_ufc_d can take value" - "from 0 to 65535(0xFFFF)\n"); - fail = 1; - } - return fail; -} diff -urN vanilla-linux/drivers/net/s2io.h linux-2.6.8.1/drivers/net/s2io.h --- vanilla-linux/drivers/net/s2io.h 2004-10-26 16:43:26.556439416 -0700 +++ linux-2.6.8.1/drivers/net/s2io.h 2004-10-26 16:43:19.800466480 -0700 @@ -873,7 +873,6 @@ int s2io_set_mac_addr(struct net_device *dev, u8 * addr); static irqreturn_t s2io_isr(int irq, void *dev_id, struct pt_regs *regs); static int verify_xena_quiescence(u64 val64, int flag); -int verify_load_parm(void); #ifdef SET_ETHTOOL_OPS static struct ethtool_ops netdev_ethtool_ops; #endif From greearb@candelatech.com Thu Oct 28 15:50:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 15:50:09 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SMo31j028021 for ; Thu, 28 Oct 2004 15:50:03 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i9SMvLLH003113; Thu, 28 Oct 2004 15:57:21 -0700 Message-ID: <41817789.4000703@candelatech.com> Date: Thu, 28 Oct 2004 15:49:45 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Francois Romieu CC: "'netdev@oss.sgi.com'" Subject: Re: 8169 driver with NetGear GA511 card. References: <41802CA8.8070900@candelatech.com> <20041028074827.GA3572@electric-eye.fr.zoreil.com> <418130C4.3010207@candelatech.com> <20041028223754.GA20521@electric-eye.fr.zoreil.com> In-Reply-To: <20041028223754.GA20521@electric-eye.fr.zoreil.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11025 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Francois Romieu wrote: > Ben Greear : > [...] > >>I'm running tests at the ethernet frame (skb) level, so I would not >>expect the IP offload to help much. >> >>Do you have any performance numbers for your 8169 cards for me to >>compare against? > > > Gross numbers: > - with a receiving amd64, nttcp should saturate the GigaE link; > - halved bandwidth for Tx on the same setup. Untested since changes in -mm; > - 10% cpu on a 100bt link; > - TSO saves 5~7% of the cpu when it can be used. Cool, I am glad to know the chipset can handle it at least... >>I'll get this in a bit, as I have locked up the keyboard again. This time, >>I was still using the non-NAPI code which had run over-night at around >>5Mbps... >> >>I tried a different network setup, and noticed that the 8169 was only >>negotiating 10bt/HD. That would explain the poor performance numbers. > > Call me dense but... Are the 5Mbps below in the same unit as the 30Mbps > in your previous message (are they bytes or bits) ? If yes something is > badly broken. Yes, but I think now the problem is that it was stuck at 10bt/HD for whatever reason. There seems to be a way to lock the keyboard by trying to make the NIC change it's negotiate settings. I am going to try to track down exactly how this can be reproduced with minimum number of steps... Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From bunk@stusta.de Thu Oct 28 16:01:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 16:01:32 -0700 (PDT) Received: from mailout.stusta.mhn.de (mailout.stusta.mhn.de [141.84.69.5]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9SN1OXc028632 for ; Thu, 28 Oct 2004 16:01:25 -0700 Received: (qmail 5041 invoked from network); 28 Oct 2004 23:01:03 -0000 Received: from r063144.stusta.swh.mhn.de (10.150.63.144) by mailout.stusta.mhn.de with SMTP; 28 Oct 2004 23:01:03 -0000 Received: by r063144.stusta.swh.mhn.de (Postfix, from userid 1000) id 4B264AF825; Fri, 29 Oct 2004 01:00:32 +0200 (CEST) Date: Fri, 29 Oct 2004 01:00:32 +0200 From: Adrian Bunk To: ralf@linux-mips.org Cc: linux-hams@vger.kernel.org, davem@davemloft.net, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: [2.6 patch] : remove an unused function Message-ID: <20041028230032.GU3207@stusta.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; x-action=pgp-signed Content-Disposition: inline User-Agent: Mutt/1.5.6+20040907i X-archive-position: 11026 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@stusta.de Precedence: bulk X-list: netdev -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The patch below removes an unused function from net/ax25/ax25_route.c diffstat output: net/ax25/ax25_route.c | 16 ---------------- 1 files changed, 16 deletions(-) Signed-off-by: Adrian Bunk - --- linux-2.6.10-rc1-mm1-full/net/ax25/ax25_route.c.old 2004-10-28 23:50:25.000000000 +0200 +++ linux-2.6.10-rc1-mm1-full/net/ax25/ax25_route.c 2004-10-28 23:50:41.000000000 +0200 @@ -41,22 +41,6 @@ static ax25_route *ax25_get_route(ax25_address *, struct net_device *); - -/* - - * small macro to drop non-digipeated digipeaters and reverse path - - */ - -static inline void ax25_route_invert(ax25_digi *in, ax25_digi *out) - -{ - - int k; - - - - for (k = 0; k < in->ndigi; k++) - - if (!in->repeated[k]) - - break; - - - - in->ndigi = k; - - - - ax25_digi_invert(in, out); - -} - - void ax25_rt_device_down(struct net_device *dev) { ax25_route *s, *t, *ax25_rt; -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQFBgXoQmfzqmE8StAARAqLLAKCZRsBxw7oCIFnvPVFFZ6ss4QRuOgCfcu4e ++CuY/BJjph1Fr/xntu1j/o= =5M44 -----END PGP SIGNATURE----- From bunk@stusta.de Thu Oct 28 16:02:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 16:03:00 -0700 (PDT) Received: from mailout.stusta.mhn.de (emailhub.stusta.mhn.de [141.84.69.5]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9SN2siP028997 for ; Thu, 28 Oct 2004 16:02:54 -0700 Received: (qmail 5086 invoked from network); 28 Oct 2004 23:02:32 -0000 Received: from r063144.stusta.swh.mhn.de (10.150.63.144) by mailhub.stusta.mhn.de with SMTP; 28 Oct 2004 23:02:32 -0000 Received: by r063144.stusta.swh.mhn.de (Postfix, from userid 1000) id 1B023AF825; Fri, 29 Oct 2004 01:02:02 +0200 (CEST) Date: Fri, 29 Oct 2004 01:02:02 +0200 From: Adrian Bunk To: coreteam@netfilter.org, Marc Boucher Cc: netfilter-devel@lists.netfilter.org, davem@davemloft.net, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: [2.6 patch] netfilter/ipt_tcpmss.c: remove an unused function Message-ID: <20041028230202.GV3207@stusta.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; x-action=pgp-signed Content-Disposition: inline User-Agent: Mutt/1.5.6+20040907i X-archive-position: 11027 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@stusta.de Precedence: bulk X-list: netdev -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The patch below removes an unused function from net/ipv4/netfilter/ipt_tcpmss.c diffstat output: net/ipv4/netfilter/ipt_tcpmss.c | 12 ------------ 1 files changed, 12 deletions(-) Signed-off-by: Adrian Bunk - --- linux-2.6.10-rc1-mm1-full/net/ipv4/netfilter/ipt_tcpmss.c.old 2004-10-28 23:51:17.000000000 +0200 +++ linux-2.6.10-rc1-mm1-full/net/ipv4/netfilter/ipt_tcpmss.c 2004-10-28 23:51:28.000000000 +0200 @@ -87,18 +87,6 @@ info->invert, hotdrop); } - -static inline int find_syn_match(const struct ipt_entry_match *m) - -{ - - const struct ipt_tcp *tcpinfo = (const struct ipt_tcp *)m->data; - - - - if (strcmp(m->u.kernel.match->name, "tcp") == 0 - - && (tcpinfo->flg_cmp & TH_SYN) - - && !(tcpinfo->invflags & IPT_TCP_INV_FLAGS)) - - return 1; - - - - return 0; - -} - - static int checkentry(const char *tablename, const struct ipt_ip *ip, -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQFBgXpqmfzqmE8StAARAlfTAJ9tZB577aVYlmz3j91H4DvBkX4KMwCglbcK xolcBq4HFXSsy8N9BZIJiW8= =pbup -----END PGP SIGNATURE----- From bunk@stusta.de Thu Oct 28 16:04:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 16:04:50 -0700 (PDT) Received: from mailout.stusta.mhn.de (mailout.stusta.mhn.de [141.84.69.5]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9SN4jbm029414 for ; Thu, 28 Oct 2004 16:04:45 -0700 Received: (qmail 5192 invoked from network); 28 Oct 2004 23:04:24 -0000 Received: from r063144.stusta.swh.mhn.de (10.150.63.144) by mailout.stusta.mhn.de with SMTP; 28 Oct 2004 23:04:24 -0000 Received: by r063144.stusta.swh.mhn.de (Postfix, from userid 1000) id 4E93AAF825; Fri, 29 Oct 2004 01:03:53 +0200 (CEST) Date: Fri, 29 Oct 2004 01:03:53 +0200 From: Adrian Bunk To: sri@us.ibm.com Cc: lksctp-developers@lists.sourceforge.net, davem@davemloft.net, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: [2.6 patch] sctp/outqueue.c: remove an unused function Message-ID: <20041028230353.GW3207@stusta.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; x-action=pgp-signed Content-Disposition: inline User-Agent: Mutt/1.5.6+20040907i X-archive-position: 11028 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@stusta.de Precedence: bulk X-list: netdev -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The patch below removes an unused function from net/sctp/outqueue.c diffstat output: net/sctp/outqueue.c | 10 ---------- 1 files changed, 10 deletions(-) Signed-off-by: Adrian Bunk - --- linux-2.6.10-rc1-mm1-full/net/sctp/outqueue.c.old 2004-10-28 23:52:37.000000000 +0200 +++ linux-2.6.10-rc1-mm1-full/net/sctp/outqueue.c 2004-10-28 23:52:50.000000000 +0200 @@ -98,16 +98,6 @@ return; } - -/* Insert a chunk behind chunk 'pos'. */ - -static inline void sctp_outq_insert_data(struct sctp_outq *q, - - struct sctp_chunk *ch, - - struct sctp_chunk *pos) - -{ - - __skb_insert((struct sk_buff *)ch, (struct sk_buff *)pos->prev, - - (struct sk_buff *)pos, pos->list); - - q->out_qlen += ch->skb->len; - -} - - /* * SFR-CACC algorithm: * D) If count_of_newacks is greater than or equal to 2 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQFBgXrZmfzqmE8StAARAlEHAKCevPmOKkcjYcF2vr7Mjg1wsJ85eQCgtAIH io31PrS52XafNuCn8gJAu1Q= =KiNr -----END PGP SIGNATURE----- From jgarzik@pobox.com Thu Oct 28 16:34:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 16:34:22 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SNYGms001080 for ; Thu, 28 Oct 2004 16:34:17 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CNJmI-0004Ye-Qv; Fri, 29 Oct 2004 00:33:58 +0100 Message-ID: <418181D9.5010603@pobox.com> Date: Thu, 28 Oct 2004 19:33:45 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: ravinandan.arakali@s2io.com CC: "'Francois Romieu'" , netdev@oss.sgi.com, leonid.grossman@s2io.com, raghavendra.koushik@s2io.com, rapuru.sriram@s2io.com, alicia.pena@s2io.com Subject: Re: [PATCH 2.6.9-rc2 1/12] S2io: cosmetic changes References: <003c01c4bd40$76171f80$9810100a@S2IOtech.com> In-Reply-To: <003c01c4bd40$76171f80$9810100a@S2IOtech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11029 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 With this new resend, I tried with both my automated scripts, and applying manually as well. All attempts succeed on patches #1 and #2, but fail on #3 - #12. If I manually add the "-l" argument to patch(1), then patch #3 succeeds. That implies that somewhere in your process, whitespace in your patches is getting corrupted. Jeff From davem@davemloft.net Thu Oct 28 16:38:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 16:38:52 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SNclXI001488 for ; Thu, 28 Oct 2004 16:38:47 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CNJfI-0000Gu-00; Thu, 28 Oct 2004 16:26:44 -0700 Date: Thu, 28 Oct 2004 16:26:43 -0700 From: "David S. Miller" To: Adrian Bunk Cc: acme@conectiva.com.br, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [2.6 patch] appletalk: remove an unused function Message-Id: <20041028162643.2ee7e30e.davem@davemloft.net> In-Reply-To: <20041028221046.GI3207@stusta.de> References: <20041028221046.GI3207@stusta.de> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11030 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev On Fri, 29 Oct 2004 00:10:46 +0200 Adrian Bunk wrote: > - -static inline void atalk_insert_socket(struct sock *sk) > - -{ > - - write_lock_bh(&atalk_sockets_lock); > - - __atalk_insert_socket(sk); > - - write_unlock_bh(&atalk_sockets_lock); > - -} > - - This is a patch of a patch, I doubt it will apply cleanly ;-) From tommy.christensen@tpack.net Thu Oct 28 16:40:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 16:40:38 -0700 (PDT) Received: from mail.tpack.net (ip18.tpack.net [213.173.228.18]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9SNeWUR001833 for ; Thu, 28 Oct 2004 16:40:33 -0700 Received: (qmail 29887 invoked from network); 28 Oct 2004 23:40:10 -0000 Received: from dhcp-191.cph.tpack.net (HELO ?172.17.159.11?) (192.168.0.191) by 0 with SMTP; 28 Oct 2004 23:40:10 -0000 Message-ID: <4181838B.6040002@tpack.net> Date: Fri, 29 Oct 2004 01:40:59 +0200 From: Tommy Christensen User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ben Greear CC: "'netdev@oss.sgi.com'" , "Linux 802.1Q VLAN" , Francois Romieu , "David S. Miller" Subject: Re: [PATCH] 802.1Q VLAN References: <41797696.9070905@candelatech.com> <20041022214611.GA4948@electric-eye.fr.zoreil.com> <41798506.1030909@candelatech.com> <417D675F.3000909@candelatech.com> In-Reply-To: <417D675F.3000909@candelatech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11031 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tommy.christensen@tpack.net Precedence: bulk X-list: netdev Ben Greear wrote: > > --- linux-2.6.9/net/8021q/vlan_dev.c 2004-10-18 14:55:07.000000000 -0700 > +++ linux-2.6.9.p4s/net/8021q/vlan_dev.c 2004-10-25 13:38:32.779294920 -0700 > @@ -1,4 +1,4 @@ > -/* > +/* -*- linux-c -*- > * INET 802.1Q VLAN > * Ethernet-type device handling. > * > @@ -484,13 +484,26 @@ > veth->h_vlan_proto, veth->h_vlan_TCI, veth->h_vlan_encapsulated_proto); > #endif > > - stats->tx_packets++; /* for statics only */ > - stats->tx_bytes += skb->len; > - > skb->dev = VLAN_DEV_INFO(dev)->real_dev; > - dev_queue_xmit(skb); > > - return 0; > + { > + /* Please note, dev_queue_xmit consumes the pkt regardless of the > + * error value. So, will copy the skb first and free if successful. > + */ > + struct sk_buff* skb2 = skb_get(skb); > + int rv = dev_queue_xmit(skb2); > + if (rv == 0) { > + /* Was success, need to free the skb reference since we bumped up the > + * user count above. > + */ > + > + stats->tx_packets++; /* for statics only */ > + stats->tx_bytes += skb->len; > + > + kfree_skb(skb); > + } > + return rv; > + } > } > > int vlan_dev_hwaccel_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) Hi Ben, I am not happy with this change to vlan_dev_hard_start_xmit(). I certainly appreciate the idea of avoiding flow-control "black-holes", but that would take more than just this change. You have to consider (at least) these issues: o It is considered an error if a queue-less device returns anything but zero from its hard_start_xmit() function (see dev_queue_xmit()). o So, lets add a tx queue to it. Sure, that would be nice. Now we can even do shaping and other fancy stuff. But then how do we manage netif_queue_stopped? Especially restarting the queue could be tricky. o But couldn't we skip netif_stop_queue() and just return NETDEV_TX_BUSY when congested? No, that would make the qdisc system "busy-retry" untill it succeeds. BAD. o It is unsafe to pass a shared skb to dev_queue_xmit() unless you control all the references yourself. (It will likely be enqueued on a list.) And specifically for this patch: o The skb could be freed (replaced) in __vlan_put_tag(), so you cannot tell the caller to hang on to it. o If rv is NET_XMIT_CN (and probably also rv < 0) you have to return 0, in order to make the caller forget about this skb. Dave, I think this part of the patch should be reverted until someone comes up with a general scheme for flow_control handling through virtual devices. -Tommy From garzik@havoc.gtf.org Thu Oct 28 16:42:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 16:42:32 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [69.28.190.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SNgOVO002236 for ; Thu, 28 Oct 2004 16:42:25 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id 06D9C796C; Thu, 28 Oct 2004 19:42:02 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i9SNfLm0001556; Thu, 28 Oct 2004 19:41:21 -0400 Date: Thu, 28 Oct 2004 19:41:21 -0400 From: Jeff Garzik To: "David S. Miller" Cc: Adrian Bunk , acme@conectiva.com.br, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [2.6 patch] appletalk: remove an unused function Message-ID: <20041028234121.GA1539@havoc.gtf.org> References: <20041028221046.GI3207@stusta.de> <20041028162643.2ee7e30e.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041028162643.2ee7e30e.davem@davemloft.net> User-Agent: Mutt/1.4.1i X-archive-position: 11032 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 On Thu, Oct 28, 2004 at 04:26:43PM -0700, David S. Miller wrote: > On Fri, 29 Oct 2004 00:10:46 +0200 > Adrian Bunk wrote: > > > - -static inline void atalk_insert_socket(struct sock *sk) > > - -{ > > - - write_lock_bh(&atalk_sockets_lock); > > - - __atalk_insert_socket(sk); > > - - write_unlock_bh(&atalk_sockets_lock); > > - -} > > - - > > This is a patch of a patch, I doubt it will apply cleanly ;-) Ditto, all the patches sent to me look like this, too. Jeff From davem@davemloft.net Thu Oct 28 16:43:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 16:44:05 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SNhxTJ002676 for ; Thu, 28 Oct 2004 16:43:59 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CNJnU-0000Hw-00; Thu, 28 Oct 2004 16:35:12 -0700 Date: Thu, 28 Oct 2004 16:35:12 -0700 From: "David S. Miller" To: Tommy Christensen Cc: greearb@candelatech.com, netdev@oss.sgi.com, vlan@candelatech.com, romieu@fr.zoreil.com, davem@redhat.com Subject: Re: [PATCH] 802.1Q VLAN Message-Id: <20041028163512.1e9d1629.davem@davemloft.net> In-Reply-To: <4181838B.6040002@tpack.net> References: <41797696.9070905@candelatech.com> <20041022214611.GA4948@electric-eye.fr.zoreil.com> <41798506.1030909@candelatech.com> <417D675F.3000909@candelatech.com> <4181838B.6040002@tpack.net> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11033 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev On Fri, 29 Oct 2004 01:40:59 +0200 Tommy Christensen wrote: > Dave, I think this part of the patch should be reverted until someone comes up with a > general scheme for flow_control handling through virtual devices. It's certainly more correct, I think, than the code which was there previously. But in a way you're right, this is inconsistent with how IP and all sorts of other tunnels behave, and if we change things we should do it across the board. So I will revert this part of his changes for now. Thanks. From davem@davemloft.net Thu Oct 28 16:49:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 16:49:07 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SNn3Cq003094 for ; Thu, 28 Oct 2004 16:49:03 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CNJg9-0000H8-00; Thu, 28 Oct 2004 16:27:37 -0700 Date: Thu, 28 Oct 2004 16:27:37 -0700 From: "David S. Miller" To: Adrian Bunk Cc: dagb@cs.uit.no, jt@hpl.hp.com, irda-users@lists.sourceforge.net, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [2.6 patch] irda/qos.c: remove an unused function Message-Id: <20041028162737.3d2debdf.davem@davemloft.net> In-Reply-To: <20041028222238.GP3207@stusta.de> References: <20041028222238.GP3207@stusta.de> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11034 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Ok, it looks like this whole enormous set of diffs are corrupted. They all are "patches of a patch" which won't apply correctly. If you're going to send such a huge set of diffs out, please test them our and make sure they do apply properly before mailing them out. Thanks. From davem@redhat.com Thu Oct 28 16:49:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 16:50:00 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SNnsPO003305 for ; Thu, 28 Oct 2004 16:49:54 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9SNnYgN003416; Thu, 28 Oct 2004 19:49:35 -0400 Received: from devserv.devel.redhat.com (devserv.devel.redhat.com [172.16.58.1]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9SNnTr07992; Thu, 28 Oct 2004 19:49:29 -0400 Received: from cheetah.davemloft.net (localhost.localdomain [127.0.0.1]) by devserv.devel.redhat.com (8.12.11/8.12.10) with SMTP id i9SNnO1p022296; Thu, 28 Oct 2004 19:49:24 -0400 Date: Thu, 28 Oct 2004 16:41:11 -0700 From: "David S. Miller" To: akpm@osdl.org Cc: jgarzik@pobox.com, netdev@oss.sgi.com, akpm@osdl.org, simlo@phys.au.dk Subject: Re: [patch 1/9] arcnet fixes Message-Id: <20041028164111.5ffaca70.davem@redhat.com> In-Reply-To: <200410280721.i9S7Lb907978@mail.osdl.org> References: <200410280721.i9S7Lb907978@mail.osdl.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11035 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 Thu, 28 Oct 2004 00:19:38 -0700 akpm@osdl.org wrote: I don't know what to do with this kind of thing. Jeff, what do you think? Do we have anyone in any way active with Arcnet other than this guy? One problem with the patch though. > diff -puN include/linux/if_ether.h~arcnet-fixes include/linux/if_ether.h > --- 25/include/linux/if_ether.h~arcnet-fixes 2004-10-28 00:17:07.230704752 -0700 > +++ 25-akpm/include/linux/if_ether.h 2004-10-28 00:17:07.247702168 -0700 > @@ -91,6 +91,7 @@ > #define ETH_P_IRDA 0x0017 /* Linux-IrDA */ > #define ETH_P_ECONET 0x0018 /* Acorn Econet */ > #define ETH_P_HDLC 0x0019 /* HDLC frames */ > +#define ETH_P_ARCNET 0x0020 /* ArcNet */ You should use 0x001a or similar, so you don't have to do this next part of your patch, bumping NPROTO in net.h > diff -puN include/linux/net.h~arcnet-fixes include/linux/net.h > --- 25/include/linux/net.h~arcnet-fixes 2004-10-28 00:17:07.232704448 -0700 > +++ 25-akpm/include/linux/net.h 2004-10-28 00:17:07.248702016 -0700 > @@ -26,7 +26,7 @@ > struct poll_table_struct; > struct inode; > > -#define NPROTO 32 /* should be enough for now.. */ > +#define NPROTO 33 /* should be enough for now.. */ > > #define SYS_SOCKET 1 /* sys_socket(2) */ > #define SYS_BIND 2 /* sys_bind(2) */ From davem@davemloft.net Thu Oct 28 16:51:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 16:51:43 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SNpcgf003788 for ; Thu, 28 Oct 2004 16:51:38 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CNJv0-0000JB-00; Thu, 28 Oct 2004 16:42:58 -0700 Date: Thu, 28 Oct 2004 16:42:58 -0700 From: "David S. Miller" To: akpm@osdl.org Cc: jgarzik@pobox.com, netdev@oss.sgi.com, akpm@osdl.org, jbarnes@engr.sgi.com, gnb@sgi.com, jbarnes@sgi.com Subject: Re: [patch 2/9] use mmiowb in tg3.c Message-Id: <20041028164258.6cd01cd0.davem@davemloft.net> In-Reply-To: <200410280721.i9S7Ld907983@mail.osdl.org> References: <200410280721.i9S7Ld907983@mail.osdl.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11036 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev On Thu, 28 Oct 2004 00:19:40 -0700 akpm@osdl.org wrote: > From: Jesse Barnes > > This patch originally from Greg Banks. Some parts of the tg3 driver depend > on PIO writes arriving in order. This patch ensures that in two key places > using the new mmiowb macro. This not only prevents bugs (the queues can be > corrupted), but is much faster than ensuring ordering using PIO reads > (which involve a few round trips to the target bus on some platforms). > > Arthur has another patch that uses mmiowb in tg3 that he posted earlier as > well. > > Signed-off-by: Greg Banks > Signed-off-by: Jesse Barnes > Signed-off-by: Andrew Morton Ok, applied. From davem@davemloft.net Thu Oct 28 16:52:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 16:52:20 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SNqFwn004066 for ; Thu, 28 Oct 2004 16:52:15 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CNJve-0000JW-00; Thu, 28 Oct 2004 16:43:38 -0700 Date: Thu, 28 Oct 2004 16:43:38 -0700 From: "David S. Miller" To: akpm@osdl.org Cc: jgarzik@pobox.com, netdev@oss.sgi.com, akpm@osdl.org, akepner@sgi.com Subject: Re: [patch 3/9] use mmiowb in tg3_poll Message-Id: <20041028164338.4172f235.davem@davemloft.net> In-Reply-To: <200410280721.i9S7Le907988@mail.osdl.org> References: <200410280721.i9S7Le907988@mail.osdl.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11037 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev On Thu, 28 Oct 2004 00:19:41 -0700 akpm@osdl.org wrote: > From: > > Returning from tg3_poll() without flushing the PIO write which reenables > interrupts can result in lower cpu utilization and higher throughput. So > use a memory barrier, mmiowb(), instead of flushing the write with a PIO > read. > > Signed-off-by: Arthur Kepner > Signed-off-by: Andrew Morton Also applied, thanks. From davem@davemloft.net Thu Oct 28 16:54:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 16:54:35 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SNsQid004528 for ; Thu, 28 Oct 2004 16:54:28 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CNJxj-0000Jq-00; Thu, 28 Oct 2004 16:45:47 -0700 Date: Thu, 28 Oct 2004 16:45:47 -0700 From: "David S. Miller" To: akpm@osdl.org Cc: jgarzik@pobox.com, netdev@oss.sgi.com, akpm@osdl.org, ahendry@tusc.com.au Subject: Re: [patch 4/9] X.25: Stop x25_destroy_socket timer looping Message-Id: <20041028164547.509b90f9.davem@davemloft.net> In-Reply-To: <200410280721.i9S7Lf907993@mail.osdl.org> References: <200410280721.i9S7Lf907993@mail.osdl.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11038 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev On Thu, 28 Oct 2004 00:19:42 -0700 akpm@osdl.org wrote: > From: Andrew Hendry > > The sk_timer.data for the x.25 destroy_socket timer went missing at some > stage, causing a timer loop where x25_destroy_socket would keep setting up > timers to call itself. This patch puts the sk_timer.data back. > > Signed-off-by: Andrew Hendry > Signed-off-by: Andrew Morton Applied, thanks. From davem@davemloft.net Thu Oct 28 16:55:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 16:55:40 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SNtY1u004823 for ; Thu, 28 Oct 2004 16:55:34 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CNJyq-0000KP-00; Thu, 28 Oct 2004 16:46:56 -0700 Date: Thu, 28 Oct 2004 16:46:56 -0700 From: "David S. Miller" To: akpm@osdl.org Cc: jgarzik@pobox.com, netdev@oss.sgi.com, akpm@osdl.org, ahendry@tusc.com.au Subject: Re: [patch 5/9] ethertap debug no newline Message-Id: <20041028164656.2046144e.davem@davemloft.net> In-Reply-To: <200410280721.i9S7Lh908000@mail.osdl.org> References: <200410280721.i9S7Lh908000@mail.osdl.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11039 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev On Thu, 28 Oct 2004 00:19:44 -0700 akpm@osdl.org wrote: > From: Andrew Hendry > > Very trivial, ethertap debug missing a newline. > > Signed-off-by: Andrew Hendry > Signed-off-by: Andrew Morton Applied, thanks. From davem@davemloft.net Thu Oct 28 16:56:28 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 16:56:32 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SNuSgY005281 for ; Thu, 28 Oct 2004 16:56:28 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CNJzh-0000Kh-00; Thu, 28 Oct 2004 16:47:49 -0700 Date: Thu, 28 Oct 2004 16:47:49 -0700 From: "David S. Miller" To: akpm@osdl.org Cc: jgarzik@pobox.com, netdev@oss.sgi.com, akpm@osdl.org, ahendry@tusc.com.au Subject: Re: [patch 6/9] X.25: Stop /proc/net/x25/route infinitely reading Message-Id: <20041028164749.58cde95e.davem@davemloft.net> In-Reply-To: <200410280721.i9S7Li908005@mail.osdl.org> References: <200410280721.i9S7Li908005@mail.osdl.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11040 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev On Thu, 28 Oct 2004 00:19:45 -0700 akpm@osdl.org wrote: > From: Andrew Hendry > > route add --x25 0/0 eth0 > cat /proc/net/x25/route > reads the single routing entry forever. > > This patch makes x25_get_route_idx behave the same as x25_get_socket_idx > which works correctly. > > Signed-off-by: Andrew Hendry > Signed-off-by: Andrew Morton Applied, thanks. From davem@davemloft.net Thu Oct 28 16:57:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 16:57:29 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SNvPVH005621 for ; Thu, 28 Oct 2004 16:57:25 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CNK0c-0000Kw-00; Thu, 28 Oct 2004 16:48:46 -0700 Date: Thu, 28 Oct 2004 16:48:46 -0700 From: "David S. Miller" To: akpm@osdl.org Cc: jgarzik@pobox.com, netdev@oss.sgi.com, akpm@osdl.org, ahendry@tusc.com.au Subject: Re: [patch 7/9] X.25: Dont log "unknown frame type" when receiving clear confirm Message-Id: <20041028164846.5a67f4f1.davem@davemloft.net> In-Reply-To: <200410280721.i9S7Lj908010@mail.osdl.org> References: <200410280721.i9S7Lj908010@mail.osdl.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11041 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev On Thu, 28 Oct 2004 00:19:46 -0700 akpm@osdl.org wrote: > From: Andrew Hendry > > There is no need to log "unknown frame type" when remote X.25 sends clear > confirms. > > Signed-off-by: Andrew Hendry > Signed-off-by: Andrew Morton Applied, thanks. From davem@davemloft.net Thu Oct 28 16:58:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 16:58:37 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SNwW8D006019 for ; Thu, 28 Oct 2004 16:58:32 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CNK1k-0000LD-00; Thu, 28 Oct 2004 16:49:56 -0700 Date: Thu, 28 Oct 2004 16:49:56 -0700 From: "David S. Miller" To: akpm@osdl.org Cc: jgarzik@pobox.com, netdev@oss.sgi.com, akpm@osdl.org, rusty@rustcorp.com.au Subject: Re: [patch 9/9] Avoid warning on CONNTRACK_STAT_INC in destroy_conntrack() Message-Id: <20041028164956.2c340c1b.davem@davemloft.net> In-Reply-To: <200410280721.i9S7Ll908021@mail.osdl.org> References: <200410280721.i9S7Ll908021@mail.osdl.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11042 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev On Thu, 28 Oct 2004 00:19:48 -0700 akpm@osdl.org wrote: > From: Rusty Russell > > ip_conntrack_put can be called in any context in theory: in particular, > MASQUERADE will can call it (via ip_ct_selective_cleanup) when an interface > comes up with a different address. > > Move the CONNTRACK_STAT_INC inside the lock: it needs preemption disabled. > > Signed-off-by: Rusty Russell > Signed-off-by: Andrew Morton Applied, thanks. From bunk@stusta.de Thu Oct 28 16:58:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 16:58:41 -0700 (PDT) Received: from mailout.stusta.mhn.de (mailout.stusta.mhn.de [141.84.69.5]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9SNwZCZ006018 for ; Thu, 28 Oct 2004 16:58:36 -0700 Received: (qmail 8462 invoked from network); 28 Oct 2004 23:58:14 -0000 Received: from r063144.stusta.swh.mhn.de (10.150.63.144) by mailhub.stusta.mhn.de with SMTP; 28 Oct 2004 23:58:14 -0000 Received: by r063144.stusta.swh.mhn.de (Postfix, from userid 1000) id 8F0CBAF825; Fri, 29 Oct 2004 01:57:43 +0200 (CEST) Date: Fri, 29 Oct 2004 01:57:43 +0200 From: Adrian Bunk To: "David S. Miller" , Jeff Garzik Cc: dagb@cs.uit.no, jt@hpl.hp.com, irda-users@lists.sourceforge.net, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [2.6 patch] irda/qos.c: remove an unused function Message-ID: <20041028235743.GQ3207@stusta.de> References: <20041028222238.GP3207@stusta.de> <20041028162737.3d2debdf.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; x-action=pgp-signed Content-Disposition: inline In-Reply-To: <20041028162737.3d2debdf.davem@davemloft.net> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 11043 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@stusta.de Precedence: bulk X-list: netdev -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, Oct 28, 2004 at 04:27:37PM -0700, David S. Miller wrote: > > Ok, it looks like this whole enormous set of diffs are corrupted. > They all are "patches of a patch" which won't apply correctly. > > If you're going to send such a huge set of diffs out, please test > them our and make sure they do apply properly before mailing > them out. I did test that they apply and compile. Shit. It seems gpg escapes all minus signs when doing an inline signature of the message. I'll resend the patches, thanks for the note. > Thanks. cu Adrian - -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQFBgYd3mfzqmE8StAARAsQ+AJ9OB3lnny2AKUj2y42n3v6zm80CcACgjAoA OP6vfM8VeyhUbnsKvdqVgzA= =OJSY -----END PGP SIGNATURE----- From tgraf@suug.ch Thu Oct 28 16:59:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 17:00:06 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9SNxw4g006683 for ; Thu, 28 Oct 2004 16:59:59 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id AE3ED82; Fri, 29 Oct 2004 01:59:18 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id E6D841C0E9; Fri, 29 Oct 2004 02:00:01 +0200 (CEST) Date: Fri, 29 Oct 2004 02:00:01 +0200 From: Thomas Graf To: Marcelo Tosatti , "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2.4] neighbour/arp compile fixes Message-ID: <20041029000001.GX12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 11044 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Signed-off-by: Thomas Graf --- linux-2.4.27.orig/net/core/neighbour.c 2004-10-29 01:34:19.000000000 +0200 +++ linux-2.4.27/net/core/neighbour.c 2004-10-29 01:53:01.000000000 +0200 @@ -31,6 +31,7 @@ #include #include #include +#include #define NEIGH_DEBUG 1 --- linux-2.4.27.orig/net/ipv4/arp.c 2004-10-29 01:34:19.000000000 +0200 +++ linux-2.4.27/net/ipv4/arp.c 2004-10-29 01:54:36.000000000 +0200 @@ -94,6 +94,7 @@ #include #include #include +#include #ifdef CONFIG_SYSCTL #include #endif From tgr@reeler.org Thu Oct 28 17:03:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 17:03:11 -0700 (PDT) Received: from rei.rakuen (217-162-107-144.dclient.hispeed.ch [217.162.107.144]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T036h9007175 for ; Thu, 28 Oct 2004 17:03:07 -0700 Received: from tgr by rei.rakuen with local (Exim 4.34) id 1CNKE7-0007fG-2l; Fri, 29 Oct 2004 02:02:43 +0200 Date: Fri, 29 Oct 2004 02:02:43 +0200 From: Thomas Graf To: Marcelo Tosatti , "David S. Miller" Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.4] neighbour/arp compile fixes Message-ID: <20041029000242.GJ19714@rei.reeler.org> References: <20041029000001.GX12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041029000001.GX12289@postel.suug.ch> X-archive-position: 11045 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev > --- linux-2.4.27.orig/net/core/neighbour.c 2004-10-29 01:34:19.000000000 +0200 > +++ linux-2.4.27/net/core/neighbour.c 2004-10-29 01:53:01.000000000 +0200 It's against 2.4.28-rc1-bk1, I forgot to rename the directory. From davem@davemloft.net Thu Oct 28 17:05:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 17:05:42 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T05YaW007772 for ; Thu, 28 Oct 2004 17:05:34 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CNK8Y-0000MO-00; Thu, 28 Oct 2004 16:56:58 -0700 Date: Thu, 28 Oct 2004 16:56:58 -0700 From: "David S. Miller" To: "Meda, Prasanna" Cc: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, davem@redhat.com Subject: Re: rcv_wnd = init_cwnd*mss Message-Id: <20041028165658.753eee50.davem@davemloft.net> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11046 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev On Wed, 27 Oct 2004 23:15:48 -0700 "Meda, Prasanna" wrote: > Thanks, still it is unclear to me why are we > downsizing the advertised window(rcv_wnd) to cwnd? > To defeat disobeying sender, or something like below? There is never any reason to advertise a receive window larger than the initial congestion window of the sender could ever be. Setting it properly like this also makes sure that we do receive window update events at just the right place as the sender starts sending us the initial data frames. > And also in the following line, > if (*rcv_wscale && sysctl_tcp_app_win && space>=mss && > space - max((space>>sysctl_tcp_app_win), mss>>*rcv_wscale) < > 65536/2) > > space is actual_space>>rcv_wscale, mss is actual value. > Why are we checking space>=mss, which are in different > scales? The second line is doing max on space and mss > on same scales, and looks right. Yep, that space>=mss test looks super buggy for the *rcv_wscale not zero case. Good thing we don't have this buggy code in 2.6.x any more. It's only present in 2.4.x From davem@davemloft.net Thu Oct 28 17:07:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 17:07:04 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T070F4008104 for ; Thu, 28 Oct 2004 17:07:00 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CNK9q-0000Ml-00; Thu, 28 Oct 2004 16:58:18 -0700 Date: Thu, 28 Oct 2004 16:58:13 -0700 From: "David S. Miller" To: Thomas Graf Cc: marcelo.tosatti@cyclades.com, netdev@oss.sgi.com Subject: Re: [PATCH 2.4] neighbour/arp compile fixes Message-Id: <20041028165813.792aea6a.davem@davemloft.net> In-Reply-To: <20041029000001.GX12289@postel.suug.ch> References: <20041029000001.GX12289@postel.suug.ch> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11047 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev Applied, thanks thomas. From bunk@stusta.de Thu Oct 28 17:15:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 17:15:39 -0700 (PDT) Received: from mailout.stusta.mhn.de (mailout.stusta.mhn.de [141.84.69.5]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9T0FV48008633 for ; Thu, 28 Oct 2004 17:15:32 -0700 Received: (qmail 9465 invoked from network); 29 Oct 2004 00:15:10 -0000 Received: from r063144.stusta.swh.mhn.de (10.150.63.144) by mailout.stusta.mhn.de with SMTP; 29 Oct 2004 00:15:10 -0000 Received: by r063144.stusta.swh.mhn.de (Postfix, from userid 1000) id 004F2AF825; Fri, 29 Oct 2004 02:14:39 +0200 (CEST) Date: Fri, 29 Oct 2004 02:14:39 +0200 From: Adrian Bunk To: acme@conectiva.com.br Cc: davem@davemloft.net, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: [2.6 patch] appletalk: remove an unused function Message-ID: <20041029001439.GC29142@stusta.de> References: <20041028221046.GI3207@stusta.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041028221046.GI3207@stusta.de> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 11048 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@stusta.de Precedence: bulk X-list: netdev [ this time without the problems due to a digital signature... ] The patch below removes an unsed function from net/appletalk/ddp.c diffstat output: net/appletalk/ddp.c | 7 ------- 1 files changed, 7 deletions(-) Signed-off-by: Adrian Bunk --- linux-2.6.10-rc1-mm1-full/net/appletalk/ddp.c.old 2004-10-28 23:49:44.000000000 +0200 +++ linux-2.6.10-rc1-mm1-full/net/appletalk/ddp.c 2004-10-28 23:49:57.000000000 +0200 @@ -78,13 +78,6 @@ sk_add_node(sk, &atalk_sockets); } -static inline void atalk_insert_socket(struct sock *sk) -{ - write_lock_bh(&atalk_sockets_lock); - __atalk_insert_socket(sk); - write_unlock_bh(&atalk_sockets_lock); -} - static inline void atalk_remove_socket(struct sock *sk) { write_lock_bh(&atalk_sockets_lock); From bunk@stusta.de Thu Oct 28 17:19:02 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 17:19:06 -0700 (PDT) Received: from mailout.stusta.mhn.de (mailout.stusta.mhn.de [141.84.69.5]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9T0J1Db009009 for ; Thu, 28 Oct 2004 17:19:02 -0700 Received: (qmail 9723 invoked from network); 29 Oct 2004 00:18:40 -0000 Received: from r063144.stusta.swh.mhn.de (10.150.63.144) by mailhub.stusta.mhn.de with SMTP; 29 Oct 2004 00:18:40 -0000 Received: by r063144.stusta.swh.mhn.de (Postfix, from userid 1000) id A2B18AFA18; Fri, 29 Oct 2004 02:18:09 +0200 (CEST) Date: Fri, 29 Oct 2004 02:18:09 +0200 From: Adrian Bunk To: Dag Brattli , Jean Tourrilhes Cc: irda-users@lists.sourceforge.net, davem@davemloft.net, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: [2.6 patch] irda/qos.c: remove an unused function Message-ID: <20041029001809.GJ29142@stusta.de> References: <20041028222238.GP3207@stusta.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041028222238.GP3207@stusta.de> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 11049 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@stusta.de Precedence: bulk X-list: netdev [ this time without the problems due to a digital signature... ] The patch below removes an unused function from net/irda/qos.c diffstat output: net/irda/qos.c | 11 ----------- 1 files changed, 11 deletions(-) Signed-off-by: Adrian Bunk --- linux-2.6.10-rc1-mm1-full/net/irda/qos.c.old 2004-10-28 23:51:59.000000000 +0200 +++ linux-2.6.10-rc1-mm1-full/net/irda/qos.c 2004-10-28 23:52:08.000000000 +0200 @@ -211,17 +211,6 @@ return index; } -static inline __u32 byte_value(__u8 byte, __u32 *array) -{ - int index; - - ASSERT(array != NULL, return -1;); - - index = msb_index(byte); - - return index_value(index, array); -} - /* * Function value_lower_bits (value, array) * From tgraf@suug.ch Thu Oct 28 17:21:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 17:21:17 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T0LCqw009385 for ; Thu, 28 Oct 2004 17:21:13 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 254DE82; Fri, 29 Oct 2004 02:20:32 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 162F81C0E9; Fri, 29 Oct 2004 02:21:14 +0200 (CEST) Date: Fri, 29 Oct 2004 02:21:13 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCHSET 0/6] PKT_SCHED: Generic classifier routines / cls_fw cleanup Message-ID: <20041029002113.GY12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 11050 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Dave, The following patchset is basically what we discussed before but without the tcf_filter bits because it's not really worth it. It will save us ~100 lines of code per classifier. I tested the already splitted patchset this time :-> Jamal, I tried to test the action stuff as good as possible, but can you give it a run with your test scripts? I will submit a 2.4 version for patch 6 in a few minutes. Cheers From bunk@stusta.de Thu Oct 28 17:21:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 17:21:43 -0700 (PDT) Received: from mailout.stusta.mhn.de (emailhub.stusta.mhn.de [141.84.69.5]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9T0LbKW009508 for ; Thu, 28 Oct 2004 17:21:38 -0700 Received: (qmail 9943 invoked from network); 29 Oct 2004 00:21:16 -0000 Received: from r063144.stusta.swh.mhn.de (10.150.63.144) by mailout.stusta.mhn.de with SMTP; 29 Oct 2004 00:21:16 -0000 Received: by r063144.stusta.swh.mhn.de (Postfix, from userid 1000) id C9164AF825; Fri, 29 Oct 2004 02:20:45 +0200 (CEST) Date: Fri, 29 Oct 2004 02:20:45 +0200 From: Adrian Bunk To: ralf@linux-mips.org Cc: linux-hams@vger.kernel.org, davem@davemloft.net, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: [2.6 patch] ax25_route.c: remove an unused function Message-ID: <20041029002045.GO29142@stusta.de> References: <20041028230032.GU3207@stusta.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041028230032.GU3207@stusta.de> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 11051 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@stusta.de Precedence: bulk X-list: netdev [ this time without the problems due to a digital signature... ] The patch below removes an unused function from net/ax25/ax25_route.c diffstat output: net/ax25/ax25_route.c | 16 ---------------- 1 files changed, 16 deletions(-) Signed-off-by: Adrian Bunk --- linux-2.6.10-rc1-mm1-full/net/ax25/ax25_route.c.old 2004-10-28 23:50:25.000000000 +0200 +++ linux-2.6.10-rc1-mm1-full/net/ax25/ax25_route.c 2004-10-28 23:50:41.000000000 +0200 @@ -41,22 +41,6 @@ static ax25_route *ax25_get_route(ax25_address *, struct net_device *); -/* - * small macro to drop non-digipeated digipeaters and reverse path - */ -static inline void ax25_route_invert(ax25_digi *in, ax25_digi *out) -{ - int k; - - for (k = 0; k < in->ndigi; k++) - if (!in->repeated[k]) - break; - - in->ndigi = k; - - ax25_digi_invert(in, out); -} - void ax25_rt_device_down(struct net_device *dev) { ax25_route *s, *t, *ax25_rt; From bunk@stusta.de Thu Oct 28 17:22:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 17:22:10 -0700 (PDT) Received: from mailout.stusta.mhn.de (emailhub.stusta.mhn.de [141.84.69.5]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9T0M44m009742 for ; Thu, 28 Oct 2004 17:22:05 -0700 Received: (qmail 9961 invoked from network); 29 Oct 2004 00:21:44 -0000 Received: from r063144.stusta.swh.mhn.de (10.150.63.144) by mailhub.stusta.mhn.de with SMTP; 29 Oct 2004 00:21:44 -0000 Received: by r063144.stusta.swh.mhn.de (Postfix, from userid 1000) id 27087AFA18; Fri, 29 Oct 2004 02:21:13 +0200 (CEST) Date: Fri, 29 Oct 2004 02:21:13 +0200 From: Adrian Bunk To: coreteam@netfilter.org, Marc Boucher Cc: netfilter-devel@lists.netfilter.org, davem@davemloft.net, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: [2.6 patch] netfilter/ipt_tcpmss.c: remove an unused function Message-ID: <20041029002113.GP29142@stusta.de> References: <20041028230202.GV3207@stusta.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041028230202.GV3207@stusta.de> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 11052 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@stusta.de Precedence: bulk X-list: netdev [ this time without the problems due to a digital signature... ] The patch below removes an unused function from net/ipv4/netfilter/ipt_tcpmss.c diffstat output: net/ipv4/netfilter/ipt_tcpmss.c | 12 ------------ 1 files changed, 12 deletions(-) Signed-off-by: Adrian Bunk --- linux-2.6.10-rc1-mm1-full/net/ipv4/netfilter/ipt_tcpmss.c.old 2004-10-28 23:51:17.000000000 +0200 +++ linux-2.6.10-rc1-mm1-full/net/ipv4/netfilter/ipt_tcpmss.c 2004-10-28 23:51:28.000000000 +0200 @@ -87,18 +87,6 @@ info->invert, hotdrop); } -static inline int find_syn_match(const struct ipt_entry_match *m) -{ - const struct ipt_tcp *tcpinfo = (const struct ipt_tcp *)m->data; - - if (strcmp(m->u.kernel.match->name, "tcp") == 0 - && (tcpinfo->flg_cmp & TH_SYN) - && !(tcpinfo->invflags & IPT_TCP_INV_FLAGS)) - return 1; - - return 0; -} - static int checkentry(const char *tablename, const struct ipt_ip *ip, From tgraf@suug.ch Thu Oct 28 17:22:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 17:22:32 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T0MOhU010105 for ; Thu, 28 Oct 2004 17:22:25 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 72B7B82; Fri, 29 Oct 2004 02:21:46 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id C77A21C0E9; Fri, 29 Oct 2004 02:22:29 +0200 (CEST) Date: Fri, 29 Oct 2004 02:22:29 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 1/6] PKT_SCHED: Add generic classifier routines Message-ID: <20041029002229.GZ12289@postel.suug.ch> References: <20041029002113.GY12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041029002113.GY12289@postel.suug.ch> X-archive-position: 11053 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Adds generic routines used by classifier to: - bind/unbind to classes - configure action/police/indev - dump action/police Signed-off-by: Thomas Graf --- linux-2.6.10-rc1-bk7.orig/include/net/pkt_cls.h 2004-10-28 22:03:20.000000000 +0200 +++ linux-2.6.10-rc1-bk7/include/net/pkt_cls.h 2004-10-28 23:53:05.000000000 +0200 @@ -3,6 +3,7 @@ #include #include +#include /* Basic packet classifier frontend definitions. */ @@ -41,4 +42,190 @@ return old_cl; } +static inline void +tcf_bind_filter(struct tcf_proto *tp, struct tcf_result *r, unsigned long base) +{ + unsigned long cl; + + cl = tp->q->ops->cl_ops->bind_tcf(tp->q, base, r->classid); + cl = cls_set_class(tp, &r->class, cl); + if (cl) + tp->q->ops->cl_ops->unbind_tcf(tp->q, cl); +} + +static inline void +tcf_unbind_filter(struct tcf_proto *tp, struct tcf_result *r) +{ + unsigned long cl; + + if ((cl = __cls_set_class(&r->class, 0)) != 0) + tp->q->ops->cl_ops->unbind_tcf(tp->q, cl); +} + +#ifdef CONFIG_NET_CLS_ACT +static inline int +tcf_change_act_police(struct tcf_proto *tp, struct tc_action **action, + struct rtattr *act_police_tlv, struct rtattr *rate_tlv) +{ + int ret; + struct tc_action *act; + + act = kmalloc(sizeof(*act), GFP_KERNEL); + if (NULL == act) + return -ENOMEM; + memset(act, 0, sizeof(*act)); + + ret = tcf_action_init_1(act_police_tlv, rate_tlv, act, "police", + TCA_ACT_NOREPLACE, TCA_ACT_BIND); + if (ret < 0) { + tcf_action_destroy(act, TCA_ACT_UNBIND); + return ret; + } + + act->type = TCA_OLD_COMPAT; + + if (*action) { + tcf_tree_lock(tp); + act = xchg(action, act); + tcf_tree_unlock(tp); + + tcf_action_destroy(act, TCA_ACT_UNBIND); + } else + *action = act; + + return 0; +} + +static inline int +tcf_change_act(struct tcf_proto *tp, struct tc_action **action, + struct rtattr *act_tlv, struct rtattr *rate_tlv) +{ + int ret; + struct tc_action *act; + + act = kmalloc(sizeof(*act), GFP_KERNEL); + if (NULL == act) + return -ENOMEM; + memset(act, 0, sizeof(*act)); + + ret = tcf_action_init(act_tlv, rate_tlv, act, NULL, + TCA_ACT_NOREPLACE, TCA_ACT_BIND); + if (ret < 0) { + tcf_action_destroy(act, TCA_ACT_UNBIND); + return ret; + } + + if (*action) { + tcf_tree_lock(tp); + act = xchg(action, act); + tcf_tree_unlock(tp); + + tcf_action_destroy(act, TCA_ACT_UNBIND); + } else + *action = act; + + return 0; +} + +static inline int +tcf_dump_act(struct sk_buff *skb, struct tc_action *action, + int act_type, int compat_type) +{ + /* + * again for backward compatible mode - we want + * to work with both old and new modes of entering + * tc data even if iproute2 was newer - jhs + */ + if (action) { + struct rtattr * p_rta = (struct rtattr*) skb->tail; + + if (action->type != TCA_OLD_COMPAT) { + RTA_PUT(skb, act_type, 0, NULL); + if (tcf_action_dump(skb, action, 0, 0) < 0) + goto rtattr_failure; + } else { + RTA_PUT(skb, compat_type, 0, NULL); + if (tcf_action_dump_old(skb, action, 0, 0) < 0) + goto rtattr_failure; + } + + p_rta->rta_len = skb->tail - (u8*)p_rta; + } + return 0; + +rtattr_failure: + return -1; +} + +#ifdef CONFIG_NET_CLS_IND +static inline int +tcf_change_indev(struct tcf_proto *tp, char *indev, struct rtattr *indev_tlv) +{ + if (RTA_PAYLOAD(indev_tlv) >= IFNAMSIZ) { + printk("cls: bad indev name %s\n", (char *) RTA_DATA(indev_tlv)); + return -EINVAL; + } + + memset(indev, 0, IFNAMSIZ); + sprintf(indev, "%s", (char *) RTA_DATA(indev_tlv)); + + return 0; +} + +static inline int +tcf_match_indev(struct sk_buff *skb, char *indev) +{ + if (0 != indev[0]) { + if (NULL == skb->input_dev) + return 0; + else if (0 != strcmp(indev, skb->input_dev->name)) + return 0; + } + + return 1; +} +#endif /* CONFIG_NET_CLS_IND */ +#endif /* CONFIG_NET_CLS_ACT */ + + +#ifdef CONFIG_NET_CLS_POLICE +static inline int +tcf_change_police(struct tcf_proto *tp, struct tcf_police **police, + struct rtattr *police_tlv, struct rtattr *rate_tlv) +{ + struct tcf_police *p = tcf_police_locate(police_tlv, rate_tlv); + + if (*police) { + tcf_tree_lock(tp); + p = xchg(police, p); + tcf_tree_unlock(tp); + + tcf_police_release(p, TCA_ACT_UNBIND); + } else + *police = p; + + return 0; +} + +static inline int +tcf_dump_police(struct sk_buff *skb, struct tcf_police *police, + int police_type) +{ + if (police) { + struct rtattr * p_rta = (struct rtattr*) skb->tail; + + RTA_PUT(skb, police_type, 0, NULL); + + if (tcf_police_dump(skb, police) < 0) + goto rtattr_failure; + + p_rta->rta_len = skb->tail - (u8*)p_rta; + } + return 0; + +rtattr_failure: + return -1; +} +#endif /* CONFIG_NET_CLS_POLICE */ + #endif From bunk@stusta.de Thu Oct 28 17:22:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 17:23:00 -0700 (PDT) Received: from mailout.stusta.mhn.de (emailhub.stusta.mhn.de [141.84.69.5]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9T0Mroq010473 for ; Thu, 28 Oct 2004 17:22:54 -0700 Received: (qmail 9989 invoked from network); 29 Oct 2004 00:22:32 -0000 Received: from r063144.stusta.swh.mhn.de (10.150.63.144) by mailout.stusta.mhn.de with SMTP; 29 Oct 2004 00:22:32 -0000 Received: by r063144.stusta.swh.mhn.de (Postfix, from userid 1000) id EB67CAF825; Fri, 29 Oct 2004 02:22:01 +0200 (CEST) Date: Fri, 29 Oct 2004 02:22:01 +0200 From: Adrian Bunk To: sri@us.ibm.com Cc: lksctp-developers@lists.sourceforge.net, davem@davemloft.net, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: [2.6 patch] sctp/outqueue.c: remove an unused function Message-ID: <20041029002201.GQ29142@stusta.de> References: <20041028230353.GW3207@stusta.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041028230353.GW3207@stusta.de> User-Agent: Mutt/1.5.6+20040907i X-archive-position: 11054 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@stusta.de Precedence: bulk X-list: netdev [ this time without the problems due to a digital signature... ] The patch below removes an unused function from net/sctp/outqueue.c diffstat output: net/sctp/outqueue.c | 10 ---------- 1 files changed, 10 deletions(-) Signed-off-by: Adrian Bunk --- linux-2.6.10-rc1-mm1-full/net/sctp/outqueue.c.old 2004-10-28 23:52:37.000000000 +0200 +++ linux-2.6.10-rc1-mm1-full/net/sctp/outqueue.c 2004-10-28 23:52:50.000000000 +0200 @@ -98,16 +98,6 @@ return; } -/* Insert a chunk behind chunk 'pos'. */ -static inline void sctp_outq_insert_data(struct sctp_outq *q, - struct sctp_chunk *ch, - struct sctp_chunk *pos) -{ - __skb_insert((struct sk_buff *)ch, (struct sk_buff *)pos->prev, - (struct sk_buff *)pos, pos->list); - q->out_qlen += ch->skb->len; -} - /* * SFR-CACC algorithm: * D) If count_of_newacks is greater than or equal to 2 From tgraf@suug.ch Thu Oct 28 17:23:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 17:23:20 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T0NDRa010791 for ; Thu, 28 Oct 2004 17:23:13 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 0D4BB82; Fri, 29 Oct 2004 02:22:35 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 5C12C1C0E9; Fri, 29 Oct 2004 02:23:18 +0200 (CEST) Date: Fri, 29 Oct 2004 02:23:18 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 2/6] cls_fw: Cleanup fw_classify Message-ID: <20041029002318.GA12289@postel.suug.ch> References: <20041029002113.GY12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041029002113.GY12289@postel.suug.ch> X-archive-position: 11055 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Cleans up fw_classify by using the generic routines and adds a additional but unneeded "continue" to document that an action may overrule the filter's match result. Signed-off-by: Thomas Graf --- linux-2.6.10-rc1-bk7.orig/net/sched/cls_fw.c 2004-10-28 22:03:29.000000000 +0200 +++ linux-2.6.10-rc1-bk7/net/sched/cls_fw.c 2004-10-29 00:00:50.000000000 +0200 @@ -84,47 +84,39 @@ u32 id = 0; #endif - if (head == NULL) - goto old_method; - - for (f=head->ht[fw_hash(id)]; f; f=f->next) { - if (f->id == id) { - *res = f->res; + if (head != NULL) { + for (f=head->ht[fw_hash(id)]; f; f=f->next) { + if (f->id == id) { + *res = f->res; #ifdef CONFIG_NET_CLS_ACT #ifdef CONFIG_NET_CLS_IND - if (0 != f->indev[0]) { - if (NULL == skb->input_dev) { + if (!tcf_match_indev(skb, f->indev)) + continue; +#endif /* CONFIG_NET_CLS_IND */ + if (f->action) { + int act_res = tcf_action_exec(skb, f->action, res); + if (act_res >= 0) + return act_res; continue; - } else { - if (0 != strcmp(f->indev, skb->input_dev->name)) { - continue; - } } - } -#endif - if (f->action) { - int pol_res = tcf_action_exec(skb, f->action, res); - if (pol_res >= 0) - return pol_res; - } else -#else +#else /* CONFIG_NET_CLS_ACT */ #ifdef CONFIG_NET_CLS_POLICE - if (f->police) - return tcf_police(skb, f->police); -#endif -#endif + if (f->police) + return tcf_police(skb, f->police); +#endif /* CONFIG_NET_CLS_POLICE */ +#endif /* CONFIG_NET_CLS_ACT */ + return 0; + } + } + } else { + /* old method */ + if (id && (TC_H_MAJ(id) == 0 || !(TC_H_MAJ(id^tp->q->handle)))) { + res->classid = id; + res->class = 0; return 0; } } - return -1; -old_method: - if (id && (TC_H_MAJ(id) == 0 || - !(TC_H_MAJ(id^tp->q->handle)))) { - res->classid = id; - res->class = 0; - return 0; - } return -1; } From tgraf@suug.ch Thu Oct 28 17:24:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 17:24:06 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T0O0V8011368 for ; Thu, 28 Oct 2004 17:24:00 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id A373482; Fri, 29 Oct 2004 02:23:21 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 0213A1C0E9; Fri, 29 Oct 2004 02:24:04 +0200 (CEST) Date: Fri, 29 Oct 2004 02:24:04 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 3/6] cls_fw: Use generic routines to configure action/policer Message-ID: <20041029002404.GB12289@postel.suug.ch> References: <20041029002113.GY12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041029002113.GY12289@postel.suug.ch> X-archive-position: 11056 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Adds a new function fw_change_attr using the new generic routines which can be used to change attribute but also to initially set them to avoid duplicated code. Signed-off-by: Thomas Graf --- linux-2.6.10-rc1-bk7.orig/net/sched/cls_fw.c 2004-10-29 00:27:10.000000000 +0200 +++ linux-2.6.10-rc1-bk7/net/sched/cls_fw.c 2004-10-29 00:27:19.000000000 +0200 @@ -155,11 +155,8 @@ for (h=0; h<256; h++) { while ((f=head->ht[h]) != NULL) { - unsigned long cl; head->ht[h] = f->next; - - if ((cl = __cls_set_class(&f->res.class, 0)) != 0) - tp->q->ops->cl_ops->unbind_tcf(tp->q, cl); + tcf_unbind_filter(tp, &f->res); #ifdef CONFIG_NET_CLS_ACT if (f->action) { tcf_action_destroy(f->action,TCA_ACT_UNBIND); @@ -187,14 +184,10 @@ for (fp=&head->ht[fw_hash(f->id)]; *fp; fp = &(*fp)->next) { if (*fp == f) { - unsigned long cl; - tcf_tree_lock(tp); *fp = f->next; tcf_tree_unlock(tp); - - if ((cl = cls_set_class(tp, &f->res.class, 0)) != 0) - tp->q->ops->cl_ops->unbind_tcf(tp->q, cl); + tcf_unbind_filter(tp, &f->res); #ifdef CONFIG_NET_CLS_ACT if (f->action) { tcf_action_destroy(f->action,TCA_ACT_UNBIND); @@ -212,21 +205,67 @@ return -EINVAL; } +static int +fw_change_attrs(struct tcf_proto *tp, struct fw_filter *f, + struct rtattr **tb, struct rtattr **tca, unsigned long base) +{ + int err = -EINVAL; + + if (tb[TCA_FW_CLASSID-1]) { + if (RTA_PAYLOAD(tb[TCA_FW_CLASSID-1]) != sizeof(u32)) + goto errout; + f->res.classid = *(u32*)RTA_DATA(tb[TCA_FW_CLASSID-1]); + tcf_bind_filter(tp, &f->res, base); + } + +#ifdef CONFIG_NET_CLS_ACT + if (tb[TCA_FW_POLICE-1]) { + err = tcf_change_act_police(tp, &f->action, tb[TCA_FW_POLICE-1], + tca[TCA_RATE-1]); + if (err < 0) + goto errout; + } + + if (tb[TCA_FW_ACT-1]) { + err = tcf_change_act(tp, &f->action, tb[TCA_FW_ACT-1], + tca[TCA_RATE-1]); + if (err < 0) + goto errout; + } + +#ifdef CONFIG_NET_CLS_IND + if (tb[TCA_FW_INDEV-1]) { + err = tcf_change_indev(tp, f->indev, tb[TCA_FW_INDEV-1]); + if (err < 0) + goto errout; + } +#endif /* CONFIG_NET_CLS_IND */ +#else /* CONFIG_NET_CLS_ACT */ +#ifdef CONFIG_NET_CLS_POLICE + if (tb[TCA_FW_POLICE-1]) { + err = tcf_change_police(tp, &f->police, tb[TCA_FW_POLICE-1], + tca[TCA_RATE-1]); + if (err < 0) + goto errout; + } +#endif /* CONFIG_NET_CLS_POLICE */ +#endif /* CONFIG_NET_CLS_ACT */ + + err = 0; +errout: + return err; +} + static int fw_change(struct tcf_proto *tp, unsigned long base, u32 handle, struct rtattr **tca, unsigned long *arg) { struct fw_head *head = (struct fw_head*)tp->root; - struct fw_filter *f; + struct fw_filter *f = (struct fw_filter *) *arg; struct rtattr *opt = tca[TCA_OPTIONS-1]; struct rtattr *tb[TCA_FW_MAX]; int err; -#ifdef CONFIG_NET_CLS_ACT - struct tc_action *act = NULL; - int ret; -#endif - if (!opt) return handle ? -EINVAL : 0; @@ -234,85 +273,10 @@ if (rtattr_parse(tb, TCA_FW_MAX, RTA_DATA(opt), RTA_PAYLOAD(opt)) < 0) return -EINVAL; - if ((f = (struct fw_filter*)*arg) != NULL) { - /* Node exists: adjust only classid */ - + if (f != NULL) { if (f->id != handle && handle) return -EINVAL; - if (tb[TCA_FW_CLASSID-1]) { - unsigned long cl; - - f->res.classid = *(u32*)RTA_DATA(tb[TCA_FW_CLASSID-1]); - cl = tp->q->ops->cl_ops->bind_tcf(tp->q, base, f->res.classid); - cl = cls_set_class(tp, &f->res.class, cl); - if (cl) - tp->q->ops->cl_ops->unbind_tcf(tp->q, cl); - } -#ifdef CONFIG_NET_CLS_ACT - if (tb[TCA_FW_POLICE-1]) { - act = kmalloc(sizeof(*act),GFP_KERNEL); - if (NULL == act) - return -ENOMEM; - - memset(act,0,sizeof(*act)); - ret = tcf_action_init_1(tb[TCA_FW_POLICE-1], tca[TCA_RATE-1] ,act,"police",TCA_ACT_NOREPLACE,TCA_ACT_BIND); - if (0 > ret){ - tcf_action_destroy(act,TCA_ACT_UNBIND); - return ret; - } - act->type = TCA_OLD_COMPAT; - - sch_tree_lock(tp->q); - act = xchg(&f->action, act); - sch_tree_unlock(tp->q); - - tcf_action_destroy(act,TCA_ACT_UNBIND); - - } - - if(tb[TCA_FW_ACT-1]) { - act = kmalloc(sizeof(*act),GFP_KERNEL); - if (NULL == act) - return -ENOMEM; - memset(act,0,sizeof(*act)); - ret = tcf_action_init(tb[TCA_FW_ACT-1], tca[TCA_RATE-1],act,NULL, TCA_ACT_NOREPLACE,TCA_ACT_BIND); - if (0 > ret) { - tcf_action_destroy(act,TCA_ACT_UNBIND); - return ret; - } - - sch_tree_lock(tp->q); - act = xchg(&f->action, act); - sch_tree_unlock(tp->q); - - tcf_action_destroy(act,TCA_ACT_UNBIND); - } -#ifdef CONFIG_NET_CLS_IND - if(tb[TCA_FW_INDEV-1]) { - struct rtattr *idev = tb[TCA_FW_INDEV-1]; - if (RTA_PAYLOAD(idev) >= IFNAMSIZ) { - printk("cls_fw: bad indev name %s\n",(char*)RTA_DATA(idev)); - err = -EINVAL; - goto errout; - } - memset(f->indev,0,IFNAMSIZ); - sprintf(f->indev, "%s", (char*)RTA_DATA(idev)); - } -#endif -#else /* only POLICE defined */ -#ifdef CONFIG_NET_CLS_POLICE - if (tb[TCA_FW_POLICE-1]) { - struct tcf_police *police = tcf_police_locate(tb[TCA_FW_POLICE-1], tca[TCA_RATE-1]); - - tcf_tree_lock(tp); - police = xchg(&f->police, police); - tcf_tree_unlock(tp); - - tcf_police_release(police,TCA_ACT_UNBIND); - } -#endif -#endif - return 0; + return fw_change_attrs(tp, f, tb, tca, base); } if (!handle) @@ -336,45 +300,9 @@ f->id = handle; - if (tb[TCA_FW_CLASSID-1]) { - err = -EINVAL; - if (RTA_PAYLOAD(tb[TCA_FW_CLASSID-1]) != 4) - goto errout; - f->res.classid = *(u32*)RTA_DATA(tb[TCA_FW_CLASSID-1]); - cls_set_class(tp, &f->res.class, tp->q->ops->cl_ops->bind_tcf(tp->q, base, f->res.classid)); - } - -#ifdef CONFIG_NET_CLS_ACT - if(tb[TCA_FW_ACT-1]) { - act = kmalloc(sizeof(*act),GFP_KERNEL); - if (NULL == act) - return -ENOMEM; - memset(act,0,sizeof(*act)); - ret = tcf_action_init(tb[TCA_FW_ACT-1], tca[TCA_RATE-1],act,NULL,TCA_ACT_NOREPLACE,TCA_ACT_BIND); - if (0 > ret) { - tcf_action_destroy(act,TCA_ACT_UNBIND); - return ret; - } - f->action= act; - } -#ifdef CONFIG_NET_CLS_IND - if(tb[TCA_FW_INDEV-1]) { - struct rtattr *idev = tb[TCA_FW_INDEV-1]; - if (RTA_PAYLOAD(idev) >= IFNAMSIZ) { - printk("cls_fw: bad indev name %s\n",(char*)RTA_DATA(idev)); - err = -EINVAL; - goto errout; - } - memset(f->indev,0,IFNAMSIZ); - sprintf(f->indev, "%s", (char*)RTA_DATA(idev)); - } -#endif -#else -#ifdef CONFIG_NET_CLS_POLICE - if (tb[TCA_FW_POLICE-1]) - f->police = tcf_police_locate(tb[TCA_FW_POLICE-1], tca[TCA_RATE-1]); -#endif -#endif + err = fw_change_attrs(tp, f, tb, tca, base); + if (err < 0) + goto errout; f->next = head->ht[fw_hash(handle)]; tcf_tree_lock(tp); From greearb@candelatech.com Thu Oct 28 17:24:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 17:24:21 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T0OCUW011437 for ; Thu, 28 Oct 2004 17:24:14 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i9T0VULH004601; Thu, 28 Oct 2004 17:31:30 -0700 Message-ID: <41818D99.9020300@candelatech.com> Date: Thu, 28 Oct 2004 17:23:53 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tommy Christensen CC: "'netdev@oss.sgi.com'" , "Linux 802.1Q VLAN" , Francois Romieu , "David S. Miller" Subject: Re: [PATCH] 802.1Q VLAN References: <41797696.9070905@candelatech.com> <20041022214611.GA4948@electric-eye.fr.zoreil.com> <41798506.1030909@candelatech.com> <417D675F.3000909@candelatech.com> <4181838B.6040002@tpack.net> In-Reply-To: <4181838B.6040002@tpack.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11057 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Tommy Christensen wrote: > Ben Greear wrote: > > Hi Ben, > > I am not happy with this change to vlan_dev_hard_start_xmit(). > > I certainly appreciate the idea of avoiding flow-control "black-holes", > but that would > take more than just this change. You have to consider (at least) these > issues: > > o It is considered an error if a queue-less device returns anything but > zero from its > hard_start_xmit() function (see dev_queue_xmit()). This certainly was not clear to me. The comments in dev_queue_xmit are wrong about the return value (failure cases can be > zero too). Are there other errors or ommissions there? What sorts of things go wrong if you do return an error here when you don't have a queue? > o So, lets add a tx queue to it. Sure, that would be nice. Now we can > even do shaping > and other fancy stuff. But then how do we manage netif_queue_stopped? > Especially > restarting the queue could be tricky. Right... it would probably be an O(N) thing to wake the queues for all virtual devices on a physical device, and we certainly don't want to do that often. Maybe if you only tried to wake the blocked queues (ie, kept a list of just blocked queues), then that would be less painful on average, but the worst-case is still bad. > o But couldn't we skip netif_stop_queue() and just return > NETDEV_TX_BUSY when congested? > No, that would make the qdisc system "busy-retry" untill it succeeds. > BAD. > > o It is unsafe to pass a shared skb to dev_queue_xmit() unless you > control all the > references yourself. (It will likely be enqueued on a list.) Since we either free the duplicate copy, or pass it to the queue and forget about it, this last point does not matter in the patch I submitted, right? > And specifically for this patch: > > o The skb could be freed (replaced) in __vlan_put_tag(), so you cannot > tell the caller > to hang on to it. Yep, that is quite nasty...I had not noticed. If I kept a copy of the original pointer (using skb_get() to bump the reference) passed in, that would fix this particular problem? > o If rv is NET_XMIT_CN (and probably also rv < 0) you have to return 0, > in order to > make the caller forget about this skb. Is there a complete list of what return codes are possible? Maybe we could make it return an enum instead of an integer so we can more easily track these sorts of things down?? Thanks for noticing! Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From tgraf@suug.ch Thu Oct 28 17:24:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 17:25:01 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T0OsP9011981 for ; Thu, 28 Oct 2004 17:24:55 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 6EACE82; Fri, 29 Oct 2004 02:24:16 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id B33671C0E9; Fri, 29 Oct 2004 02:24:59 +0200 (CEST) Date: Fri, 29 Oct 2004 02:24:59 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 4/6] cls_fw: Use generic routines to dump action/policer Message-ID: <20041029002459.GC12289@postel.suug.ch> References: <20041029002113.GY12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041029002113.GY12289@postel.suug.ch> X-archive-position: 11058 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Signed-off-by: Thomas Graf --- linux-2.6.10-rc1-bk7.orig/net/sched/cls_fw.c 2004-10-29 00:28:59.000000000 +0200 +++ linux-2.6.10-rc1-bk7/net/sched/cls_fw.c 2004-10-29 00:35:27.000000000 +0200 @@ -375,48 +375,18 @@ if (f->res.classid) RTA_PUT(skb, TCA_FW_CLASSID, 4, &f->res.classid); #ifdef CONFIG_NET_CLS_ACT - /* again for backward compatible mode - we want - * to work with both old and new modes of entering - * tc data even if iproute2 was newer - jhs - */ - if (f->action) { - struct rtattr * p_rta = (struct rtattr*)skb->tail; - - if (f->action->type != TCA_OLD_COMPAT) { - RTA_PUT(skb, TCA_FW_ACT, 0, NULL); - if (tcf_action_dump(skb,f->action,0,0) < 0) { - goto rtattr_failure; - } - } else { - RTA_PUT(skb, TCA_FW_POLICE, 0, NULL); - if (tcf_action_dump_old(skb,f->action,0,0) < 0) { - goto rtattr_failure; - } - } - - p_rta->rta_len = skb->tail - (u8*)p_rta; - } + if (tcf_dump_act(skb, f->action, TCA_FW_ACT, TCA_FW_POLICE) < 0) + goto rtattr_failure; #ifdef CONFIG_NET_CLS_IND - if(strlen(f->indev)) { - struct rtattr * p_rta = (struct rtattr*)skb->tail; + if (strlen(f->indev)) RTA_PUT(skb, TCA_FW_INDEV, IFNAMSIZ, f->indev); - p_rta->rta_len = skb->tail - (u8*)p_rta; - } -#endif -#else +#endif /* CONFIG_NET_CLS_IND */ +#else /* CONFIG_NET_CLS_ACT */ #ifdef CONFIG_NET_CLS_POLICE - if (f->police) { - struct rtattr * p_rta = (struct rtattr*)skb->tail; - - RTA_PUT(skb, TCA_FW_POLICE, 0, NULL); - - if (tcf_police_dump(skb, f->police) < 0) - goto rtattr_failure; - - p_rta->rta_len = skb->tail - (u8*)p_rta; - } -#endif -#endif + if (tcf_dump_police(skb, f->police, TCA_FW_POLICE) < 0) + goto rtattr_failure; +#endif /* CONFIG_NET_CLS_POLICE */ +#endif /* CONFIG_NET_CLS_ACT */ rta->rta_len = skb->tail - b; #ifdef CONFIG_NET_CLS_ACT From tgraf@suug.ch Thu Oct 28 17:25:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 17:25:49 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T0Pi5b012396 for ; Thu, 28 Oct 2004 17:25:44 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id A9FF282; Fri, 29 Oct 2004 02:25:05 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id ED8101C0E9; Fri, 29 Oct 2004 02:25:48 +0200 (CEST) Date: Fri, 29 Oct 2004 02:25:48 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 5/6] cls_fw: Whitespace/ifdef fixes Message-ID: <20041029002548.GD12289@postel.suug.ch> References: <20041029002113.GY12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041029002113.GY12289@postel.suug.ch> X-archive-position: 11059 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Signed-off-by: Thomas Graf --- linux-2.6.10-rc1-bk7.orig/net/sched/cls_fw.c 2004-10-29 00:37:34.000000000 +0200 +++ linux-2.6.10-rc1-bk7/net/sched/cls_fw.c 2004-10-29 00:38:46.000000000 +0200 @@ -57,15 +57,15 @@ u32 id; struct tcf_result res; #ifdef CONFIG_NET_CLS_ACT - struct tc_action *action; + struct tc_action *action; #ifdef CONFIG_NET_CLS_IND - char indev[IFNAMSIZ]; -#endif -#else + char indev[IFNAMSIZ]; +#endif /* CONFIG_NET_CLS_IND */ +#else /* CONFIG_NET_CLS_ACT */ #ifdef CONFIG_NET_CLS_POLICE struct tcf_police *police; -#endif -#endif +#endif /* CONFIG_NET_CLS_POLICE */ +#endif /* CONFIG_NET_CLS_ACT */ }; static __inline__ int fw_hash(u32 handle) @@ -158,14 +158,14 @@ head->ht[h] = f->next; tcf_unbind_filter(tp, &f->res); #ifdef CONFIG_NET_CLS_ACT - if (f->action) { - tcf_action_destroy(f->action,TCA_ACT_UNBIND); - } -#else + if (f->action) + tcf_action_destroy(f->action, TCA_ACT_UNBIND); +#else /* CONFIG_NET_CLS_ACT */ #ifdef CONFIG_NET_CLS_POLICE - tcf_police_release(f->police,TCA_ACT_UNBIND); -#endif -#endif + if (f->police) + tcf_police_release(f->police, TCA_ACT_UNBIND); +#endif /* CONFIG_NET_CLS_POLICE */ +#endif /* CONFIG_NET_CLS_ACT */ kfree(f); } @@ -189,14 +189,13 @@ tcf_tree_unlock(tp); tcf_unbind_filter(tp, &f->res); #ifdef CONFIG_NET_CLS_ACT - if (f->action) { - tcf_action_destroy(f->action,TCA_ACT_UNBIND); - } -#else + if (f->action) + tcf_action_destroy(f->action,TCA_ACT_UNBIND); +#else /* CONFIG_NET_CLS_ACT */ #ifdef CONFIG_NET_CLS_POLICE tcf_police_release(f->police,TCA_ACT_UNBIND); -#endif -#endif +#endif /* CONFIG_NET_CLS_POLICE */ +#endif /* CONFIG_NET_CLS_ACT */ kfree(f); return 0; } @@ -358,15 +357,15 @@ t->tcm_handle = f->id; - if (!f->res.classid + if (!f->res.classid #ifdef CONFIG_NET_CLS_ACT - && !f->action + && !f->action #else #ifdef CONFIG_NET_CLS_POLICE - && !f->police + && !f->police #endif #endif - ) + ) return skb->len; rta = (struct rtattr*)b; @@ -390,19 +389,19 @@ rta->rta_len = skb->tail - b; #ifdef CONFIG_NET_CLS_ACT - if (f->action && f->action->type == TCA_OLD_COMPAT) { - if (tcf_action_copy_stats(skb,f->action)) - goto rtattr_failure; - } -#else + if (f->action && f->action->type == TCA_OLD_COMPAT) { + if (tcf_action_copy_stats(skb,f->action)) + goto rtattr_failure; + } +#else /* CONFIG_NET_CLS_ACT */ #ifdef CONFIG_NET_CLS_POLICE if (f->police) { if (qdisc_copy_stats(skb, &f->police->stats, - f->police->stats_lock)) + f->police->stats_lock)) goto rtattr_failure; } -#endif -#endif +#endif /* CONFIG_NET_CLS_POLICE */ +#endif /* CONFIG_NET_CLS_ACT */ return skb->len; rtattr_failure: From tgraf@suug.ch Thu Oct 28 17:26:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 17:26:28 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T0QNhs012668 for ; Thu, 28 Oct 2004 17:26:24 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 7DD5982; Fri, 29 Oct 2004 02:25:45 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id AFEF41C0E9; Fri, 29 Oct 2004 02:26:28 +0200 (CEST) Date: Fri, 29 Oct 2004 02:26:28 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 6/6] PKT_SCHED: break is not enough to stop walking Message-ID: <20041029002628.GE12289@postel.suug.ch> References: <20041029002113.GY12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041029002113.GY12289@postel.suug.ch> X-archive-position: 11060 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev break is not enough to escape from the walking loops, since multiple encapsulated loops are used to traverse the hash tables. Signed-off-by: Thomas Graf diff -Nru linux-2.6.10-rc1-bk7.orig/net/sched/cls_fw.c linux-2.6.10-rc1-bk7/net/sched/cls_fw.c --- linux-2.6.10-rc1-bk7.orig/net/sched/cls_fw.c 2004-10-29 00:43:38.000000000 +0200 +++ linux-2.6.10-rc1-bk7/net/sched/cls_fw.c 2004-10-29 00:50:29.000000000 +0200 @@ -338,7 +338,7 @@ } if (arg->fn(tp, (unsigned long)f, arg) < 0) { arg->stop = 1; - break; + return; } arg->count++; } diff -Nru linux-2.6.10-rc1-bk7.orig/net/sched/cls_route.c linux-2.6.10-rc1-bk7/net/sched/cls_route.c --- linux-2.6.10-rc1-bk7.orig/net/sched/cls_route.c 2004-10-28 22:03:29.000000000 +0200 +++ linux-2.6.10-rc1-bk7/net/sched/cls_route.c 2004-10-29 01:31:12.000000000 +0200 @@ -538,7 +538,7 @@ } if (arg->fn(tp, (unsigned long)f, arg) < 0) { arg->stop = 1; - break; + return; } arg->count++; } diff -Nru linux-2.6.10-rc1-bk7.orig/net/sched/cls_rsvp.h linux-2.6.10-rc1-bk7/net/sched/cls_rsvp.h --- linux-2.6.10-rc1-bk7.orig/net/sched/cls_rsvp.h 2004-10-28 22:03:29.000000000 +0200 +++ linux-2.6.10-rc1-bk7/net/sched/cls_rsvp.h 2004-10-29 01:31:49.000000000 +0200 @@ -601,7 +601,7 @@ } if (arg->fn(tp, (unsigned long)f, arg) < 0) { arg->stop = 1; - break; + return; } arg->count++; } From tgraf@suug.ch Thu Oct 28 17:29:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 17:29:59 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T0Ts5W013095 for ; Thu, 28 Oct 2004 17:29:54 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id CDA8482; Fri, 29 Oct 2004 02:29:15 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 86B361C0E9; Fri, 29 Oct 2004 02:29:58 +0200 (CEST) Date: Fri, 29 Oct 2004 02:29:58 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com Subject: [PATCH 2.4] PKT_SCHED: break is not enough to stop walking Message-ID: <20041029002958.GF12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 11061 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev break is not enough to escape from the walking loops, since multiple encapsulated loops are used to traverse the hash tables. Signed-off-by: Thomas Graf --- linux-2.4.28-rc1-bk1.orig/net/sched/cls_fw.c 2004-10-29 01:34:19.000000000 +0200 +++ linux-2.4.28-rc1-bk1/net/sched/cls_fw.c 2004-10-29 01:36:19.000000000 +0200 @@ -292,7 +292,7 @@ } if (arg->fn(tp, (unsigned long)f, arg) < 0) { arg->stop = 1; - break; + return; } arg->count++; } --- linux-2.4.28-rc1-bk1.orig/net/sched/cls_route.c 2004-10-29 01:34:19.000000000 +0200 +++ linux-2.4.28-rc1-bk1/net/sched/cls_route.c 2004-10-29 01:36:31.000000000 +0200 @@ -541,7 +541,7 @@ } if (arg->fn(tp, (unsigned long)f, arg) < 0) { arg->stop = 1; - break; + return; } arg->count++; } --- linux-2.4.28-rc1-bk1.orig/net/sched/cls_rsvp.h 2004-10-29 01:34:19.000000000 +0200 +++ linux-2.4.28-rc1-bk1/net/sched/cls_rsvp.h 2004-10-29 01:55:09.000000000 +0200 @@ -604,7 +604,7 @@ } if (arg->fn(tp, (unsigned long)f, arg) < 0) { arg->stop = 1; - break; + return; } arg->count++; } From khc@pm.waw.pl Thu Oct 28 17:40:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 17:40:17 -0700 (PDT) Received: from inx.pm.waw.pl (postfix@inx.pm.waw.pl [195.116.170.20]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T0eAL7013601 for ; Thu, 28 Oct 2004 17:40:10 -0700 Received: from defiant.pm.waw.pl (cnq39.neoplus.adsl.tpnet.pl [83.31.170.39]) by inx.pm.waw.pl (Postfix) with ESMTP id 90C62DF92; Fri, 29 Oct 2004 02:42:16 +0200 (CEST) Received: by defiant.pm.waw.pl (Postfix, from userid 500) id 16B4C10AB1; Fri, 29 Oct 2004 02:38:09 +0200 (CEST) To: Ben Greear Cc: Tommy Christensen , "'netdev@oss.sgi.com'" , "Linux 802.1Q VLAN" , Francois Romieu , "David S. Miller" Subject: Re: [PATCH] 802.1Q VLAN References: <41797696.9070905@candelatech.com> <20041022214611.GA4948@electric-eye.fr.zoreil.com> <41798506.1030909@candelatech.com> <417D675F.3000909@candelatech.com> <4181838B.6040002@tpack.net> <41818D99.9020300@candelatech.com> From: Krzysztof Halasa Date: Fri, 29 Oct 2004 02:38:08 +0200 In-Reply-To: <41818D99.9020300@candelatech.com> (Ben Greear's message of "Thu, 28 Oct 2004 17:23:53 -0700") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 11062 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: khc@pm.waw.pl Precedence: bulk X-list: netdev Ben Greear writes: > Right... it would probably be an O(N) thing to wake the queues for all virtual > devices on a physical device, and we certainly don't want to do that > often. Maybe if you only tried to wake the blocked queues (ie, kept a list > of just blocked queues), then that would be less painful on average, > but the worst-case is still bad. Not sure if we need multiple queues. I think one queue for one physical device (a queue shared by all logical subdevices) would be enough in this case. Not sure how to do it, either. The semantics should be changed perhaps. The same issue with Frame Relay logical devices. -- Krzysztof Halasa From pmeda@akamai.com Thu Oct 28 17:56:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 17:56:20 -0700 (PDT) Received: from smtp3.akamai.com (smtp3.akamai.com [63.116.109.25]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T0uDDJ014292 for ; Thu, 28 Oct 2004 17:56:14 -0700 Received: from smtp3.akamai.com (vwall2.sanmateo.corp.akamai.com [172.23.1.72]) by smtp3.akamai.com (8.12.10/8.12.10) with ESMTP id i9T0tnHO028026 for ; Thu, 28 Oct 2004 17:55:50 -0700 (PDT) Received: from akamai.com (allur.sanmateo.corp.akamai.com [172.23.10.223]) by smtp3.akamai.com (8.12.10/8.12.10) with ESMTP id i9T0tm0P028024; Thu, 28 Oct 2004 17:55:48 -0700 (PDT) Message-ID: <41819514.C25D7A51@akamai.com> Date: Thu, 28 Oct 2004 17:55:48 -0700 From: Prasanna Meda X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.16-3 i686) X-Accept-Language: en MIME-Version: 1.0 To: "David S. Miller" CC: linux-kernel@vger.kernel.org, netdev@oss.sgi.com, davem@redhat.com Subject: Re: rcv_wnd = init_cwnd*mss References: <20041028165658.753eee50.davem@davemloft.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 11063 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pmeda@akamai.com Precedence: bulk X-list: netdev "David S. Miller" wrote: > On Wed, 27 Oct 2004 23:15:48 -0700 > "Meda, Prasanna" wrote: > > > Thanks, still it is unclear to me why are we > > downsizing the advertised window(rcv_wnd) to cwnd? > > To defeat disobeying sender, or something like below? > > There is never any reason to advertise a receive window > larger than the initial congestion window of the sender > could ever be. > > Setting it properly like this also makes sure that we do > receive window update events at just the right place as > the sender starts sending us the initial data frames. That makes sense! But are we coping with cwnd increase on sender? Looks rcv rwnd s updated by only 1 pkt at time. Thanks, Prasanna. From ravinandan.arakali@s2io.com Thu Oct 28 18:02:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 18:02:40 -0700 (PDT) Received: from ns1.s2io.com ([142.46.200.198]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T12Xgl014864 for ; Thu, 28 Oct 2004 18:02:34 -0700 Received: from guinness.s2io.com (sentry [142.46.200.199]) by ns1.s2io.com (8.12.10/8.12.10) with ESMTP id i9T120je011612; Thu, 28 Oct 2004 21:02:00 -0400 (EDT) Received: from rarakali ([10.16.16.152]) by guinness.s2io.com (8.12.6/8.12.6) with SMTP id i9T11v39029423; Thu, 28 Oct 2004 21:01:57 -0400 (EDT) Reply-To: From: "Ravinandan Arakali" To: "'Jeff Garzik'" Cc: "'Francois Romieu'" , , , , , Subject: RE: [PATCH 2.6.9-rc2 1/12] S2io: cosmetic changes Date: Thu, 28 Oct 2004 18:10:59 -0700 Message-ID: <005301c4bd54$26daea00$9810100a@S2IOtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-reply-to: <418181D9.5010603@pobox.com> Importance: Normal X-Scanned-By: MIMEDefang 2.34 X-archive-position: 11064 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ravinandan.arakali@s2io.com Precedence: bulk X-list: netdev Jeff, Looks like outlook client is garbling some of the patch. We'll try to send using different client, but can you pls try with -l option on all the patches and see if it applies cleanly ? Thanks for your patience. Ravi -----Original Message----- From: Jeff Garzik [mailto:jgarzik@pobox.com] Sent: Thursday, October 28, 2004 4:34 PM To: ravinandan.arakali@s2io.com Cc: 'Francois Romieu'; netdev@oss.sgi.com; leonid.grossman@s2io.com; raghavendra.koushik@s2io.com; rapuru.sriram@s2io.com; alicia.pena@s2io.com Subject: Re: [PATCH 2.6.9-rc2 1/12] S2io: cosmetic changes With this new resend, I tried with both my automated scripts, and applying manually as well. All attempts succeed on patches #1 and #2, but fail on #3 - #12. If I manually add the "-l" argument to patch(1), then patch #3 succeeds. That implies that somewhere in your process, whitespace in your patches is getting corrupted. Jeff From herbert@gondor.apana.org.au Thu Oct 28 19:14:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 19:14:23 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T2EFle017082 for ; Thu, 28 Oct 2004 19:14:15 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CNMH6-0007Up-00; Fri, 29 Oct 2004 12:13:56 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CNMH2-0005s6-00; Fri, 29 Oct 2004 12:13:52 +1000 Date: Fri, 29 Oct 2004 12:13:52 +1000 To: "David S. Miller" , netdev@oss.sgi.com Subject: [XFRM] Move xfrm4_rcv export to its site Message-ID: <20041029021352.GA22550@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="k1lZvvs/B4yU6o8G" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 11065 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev --k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi: Here is a trivial patch that moves xfrm4_rcv's export to the site of its definition. Currently it lives in net/xfrm which is miles away. Signed-off-by: Herbert Xu Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --k1lZvvs/B4yU6o8G Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== net/ipv4/xfrm4_input.c 1.12 vs edited ===== --- 1.12/net/ipv4/xfrm4_input.c 2004-09-17 06:11:46 +10:00 +++ edited/net/ipv4/xfrm4_input.c 2004-10-29 11:56:27 +10:00 @@ -9,6 +9,7 @@ * */ +#include #include #include #include @@ -18,6 +19,8 @@ { return xfrm4_rcv_encap(skb, 0); } + +EXPORT_SYMBOL(xfrm4_rcv); static inline void ipip_ecn_decapsulate(struct sk_buff *skb) { ===== net/xfrm/xfrm_export.c 1.5 vs edited ===== --- 1.5/net/xfrm/xfrm_export.c 2004-10-26 13:23:46 +10:00 +++ edited/net/xfrm/xfrm_export.c 2004-10-29 11:55:44 +10:00 @@ -27,7 +27,6 @@ EXPORT_SYMBOL(secpath_dup); EXPORT_SYMBOL(xfrm_get_acqseq); EXPORT_SYMBOL(xfrm_parse_spi); -EXPORT_SYMBOL(xfrm4_rcv); EXPORT_SYMBOL(xfrm_register_type); EXPORT_SYMBOL(xfrm_unregister_type); EXPORT_SYMBOL(xfrm_get_type); --k1lZvvs/B4yU6o8G-- From miles@lsi.nec.co.jp Thu Oct 28 20:00:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 20:00:11 -0700 (PDT) Received: from tyo202.gate.nec.co.jp (TYO202.gate.nec.co.jp [210.143.35.52]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T304fp018363 for ; Thu, 28 Oct 2004 20:00:05 -0700 Received: from mailgate3.nec.co.jp (mailgate53.nec.co.jp [10.7.69.161] (may be forged)) by tyo202.gate.nec.co.jp (8.11.7/3.7W01080315) with ESMTP id i9T2uIn00335; Fri, 29 Oct 2004 11:56:18 +0900 (JST) Received: (from root@localhost) by mailgate3.nec.co.jp (8.11.7/3.7W-MAILGATE-NEC) id i9T2uIG14768; Fri, 29 Oct 2004 11:56:18 +0900 (JST) Received: from edsgm02.lsi.nec.co.jp ([10.50.208.12]) by mailsv.nec.co.jp (8.11.7/3.7W-MAILSV-NEC) with ESMTP id i9T2uHx18865; Fri, 29 Oct 2004 11:56:17 +0900 (JST) Received: from mcsss2.ucom.lsi.nec.co.jp (localhost [127.0.0.1]) by edsgm02.lsi.nec.co.jp (8.12.10/8.12.10) with ESMTP id i9T2uC6l014848; Fri, 29 Oct 2004 11:56:12 +0900 (JST) Received: from mctpc71 (mctpc71.ucom.lsi.nec.co.jp [10.30.118.121]) by mcsss2.ucom.lsi.nec.co.jp (8.12.10/8.12.8/EDcg v2.01-mc/1046780839) with ESMTP id i9T2uBwt024108; Fri, 29 Oct 2004 11:56:11 +0900 (JST) Received: by mctpc71 (Postfix, from userid 31295) id 29E964D9; Fri, 29 Oct 2004 11:56:11 +0900 (JST) To: "David S. Miller" Cc: Adrian Bunk , acme@conectiva.com.br, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [2.6 patch] appletalk: remove an unused function References: <20041028221046.GI3207@stusta.de> <20041028162643.2ee7e30e.davem@davemloft.net> From: Miles Bader Reply-To: Miles Bader System-Type: i686-pc-linux-gnu Blat: Foop Date: Fri, 29 Oct 2004 11:56:11 +0900 In-Reply-To: <20041028162643.2ee7e30e.davem@davemloft.net> (David S. Miller's message of "Thu, 28 Oct 2004 16:26:43 -0700") Message-ID: Lines: 10 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 11066 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: miles@lsi.nec.co.jp Precedence: bulk X-list: netdev "David S. Miller" writes: > This is a patch of a patch, I doubt it will apply cleanly ;-) Note if you run it through gpg/pgp decoding it will output the real patch (my mail client does this automatically, so the comments saying the patches were screwed up were very confusing at first!). -Miles -- Run away! Run away! From herbert@gondor.apana.org.au Thu Oct 28 20:39:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 20:39:31 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T3dNjV022972 for ; Thu, 28 Oct 2004 20:39:24 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CNNbT-00082c-00; Fri, 29 Oct 2004 13:39:03 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CNNbQ-00062e-00; Fri, 29 Oct 2004 13:39:00 +1000 Date: Fri, 29 Oct 2004 13:39:00 +1000 To: "David S. Miller" , netdev@oss.sgi.com Subject: [IPSEC] Make ah4/esp4/ipcomp depend on INET Message-ID: <20041029033900.GA23206@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="wRRV7LY7NUeQGEoC" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 11067 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev --wRRV7LY7NUeQGEoC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Dave: As it is someone could disable INET and still enable ah4/esp4/ipcomp. This patch adds the dependency on INET to prevent this. Signed-off-by: Herbert Xu Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --wRRV7LY7NUeQGEoC Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== net/ipv4/Kconfig 1.20 vs edited ===== --- 1.20/net/ipv4/Kconfig 2004-10-27 05:32:28 +10:00 +++ edited/net/ipv4/Kconfig 2004-10-29 13:34:38 +10:00 @@ -301,6 +301,7 @@ config INET_AH tristate "IP: AH transformation" + depends on INET select XFRM select CRYPTO select CRYPTO_HMAC @@ -313,6 +314,7 @@ config INET_ESP tristate "IP: ESP transformation" + depends on INET select XFRM select CRYPTO select CRYPTO_HMAC @@ -326,6 +328,7 @@ config INET_IPCOMP tristate "IP: IPComp transformation" + depends on INET select XFRM select INET_TUNNEL select CRYPTO @@ -338,6 +341,7 @@ config INET_TUNNEL tristate "IP: tunnel transformation" + depends on INET select XFRM ---help--- Support for generic IP tunnel transformation, which is required by --wRRV7LY7NUeQGEoC-- From herbert@gondor.apana.org.au Thu Oct 28 21:39:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 21:39:32 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T4dKkV024356 for ; Thu, 28 Oct 2004 21:39:21 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CNOXV-0008HR-00; Fri, 29 Oct 2004 14:39:01 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CNOXS-0007Gl-00; Fri, 29 Oct 2004 14:38:58 +1000 Date: Fri, 29 Oct 2004 14:38:58 +1000 To: "David S. Miller" , netdev@oss.sgi.com Subject: [TCP] Modularise tcpdiag Message-ID: <20041029043858.GA27907@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="sdtB3X0nJg68CQEu" Content-Disposition: inline User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 11068 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Dave: This is the first step in fixing the tcpdiag/modular ipv6 issue. We modularise tcpdiag in the obvious way. Next we can move out the IPv6-specific stuff. Signed-off-by: Herbert Xu Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt --sdtB3X0nJg68CQEu Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=p ===== net/ipv4/Kconfig 1.20 vs edited ===== --- 1.20/net/ipv4/Kconfig 2004-10-27 05:32:28 +10:00 +++ edited/net/ipv4/Kconfig 2004-10-29 13:46:20 +10:00 @@ -345,5 +345,14 @@ If unsure, say Y. +config IP_TCPDIAG + tristate "IP: TCP socket monitoring interface" + default y + ---help--- + Support for TCP socket monitoring interface used by native Linux + tools such as ss. + + If unsure, say Y. + source "net/ipv4/ipvs/Kconfig" ===== net/ipv4/Makefile 1.25 vs edited ===== --- 1.25/net/ipv4/Makefile 2004-09-24 05:47:15 +10:00 +++ edited/net/ipv4/Makefile 2004-10-29 13:47:13 +10:00 @@ -6,7 +6,7 @@ ip_input.o ip_fragment.o ip_forward.o ip_options.o \ ip_output.o ip_sockglue.o \ tcp.o tcp_input.o tcp_output.o tcp_timer.o tcp_ipv4.o tcp_minisocks.o \ - tcp_diag.o datagram.o raw.o udp.o arp.o icmp.o devinet.o af_inet.o igmp.o \ + datagram.o raw.o udp.o arp.o icmp.o devinet.o af_inet.o igmp.o \ sysctl_net_ipv4.o fib_frontend.o fib_semantics.o fib_hash.o obj-$(CONFIG_PROC_FS) += proc.o @@ -22,6 +22,7 @@ obj-$(CONFIG_IP_PNP) += ipconfig.o obj-$(CONFIG_NETFILTER) += netfilter/ obj-$(CONFIG_IP_VS) += ipvs/ +obj-$(CONFIG_IP_TCPDIAG) += tcp_diag.o obj-$(CONFIG_XFRM) += xfrm4_policy.o xfrm4_state.o xfrm4_input.o \ xfrm4_output.o ===== net/ipv4/tcp.c 1.83 vs edited ===== --- 1.83/net/ipv4/tcp.c 2004-10-27 05:27:43 +10:00 +++ edited/net/ipv4/tcp.c 2004-10-29 10:36:00 +10:00 @@ -2152,6 +2152,8 @@ info->tcpi_total_retrans = tp->total_retrans; } +EXPORT_SYMBOL_GPL(tcp_get_info); + int tcp_getsockopt(struct sock *sk, int level, int optname, char __user *optval, int __user *optlen) { @@ -2358,8 +2360,6 @@ printk(KERN_INFO "TCP: Hash tables configured " "(established %d bind %d)\n", tcp_ehash_size << 1, tcp_bhash_size); - - tcpdiag_init(); } EXPORT_SYMBOL(tcp_accept); ===== net/ipv4/tcp_diag.c 1.25 vs edited ===== --- 1.25/net/ipv4/tcp_diag.c 2004-10-28 07:27:31 +10:00 +++ edited/net/ipv4/tcp_diag.c 2004-10-29 14:20:37 +10:00 @@ -776,9 +776,19 @@ } } -void __init tcpdiag_init(void) +static int __init tcpdiag_init(void) { tcpnl = netlink_kernel_create(NETLINK_TCPDIAG, tcpdiag_rcv); if (tcpnl == NULL) - panic("tcpdiag_init: Cannot create netlink socket."); + return -ENOMEM; + return 0; } + +static void __exit tcpdiag_exit(void) +{ + sock_release(tcpnl->sk_socket); +} + +module_init(tcpdiag_init); +module_exit(tcpdiag_exit); +MODULE_LICENSE("GPL"); ===== net/ipv4/tcp_ipv4.c 1.102 vs edited ===== --- 1.102/net/ipv4/tcp_ipv4.c 2004-10-26 13:26:08 +10:00 +++ edited/net/ipv4/tcp_ipv4.c 2004-10-29 11:18:12 +10:00 @@ -535,6 +535,8 @@ return sk; } +EXPORT_SYMBOL_GPL(tcp_v4_lookup); + static inline __u32 tcp_v4_init_sequence(struct sock *sk, struct sk_buff *skb) { return secure_tcp_sequence_number(skb->nh.iph->daddr, ===== net/ipv6/tcp_ipv6.c 1.99 vs edited ===== --- 1.99/net/ipv6/tcp_ipv6.c 2004-10-26 13:50:56 +10:00 +++ edited/net/ipv6/tcp_ipv6.c 2004-10-29 11:18:56 +10:00 @@ -364,6 +364,8 @@ return sk; } +EXPORT_SYMBOL_GPL(tcp_v6_lookup); + /* * Open request hash tables. --sdtB3X0nJg68CQEu-- From johnpol@2ka.mipt.ru Thu Oct 28 23:19:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 23:19:24 -0700 (PDT) Received: from vocord.com (dea.vocord.ru [217.67.177.50]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T6IsmV026618 for ; Thu, 28 Oct 2004 23:18:58 -0700 Received: from [192.168.0.48] (uganda.factory.vocord.ru [192.168.0.48]) by vocord.com (8.12.11/8.12.11) with ESMTP id i9T6Ho24024996; Fri, 29 Oct 2004 10:17:50 +0400 Subject: Asynchronous crypto layer. From: Evgeniy Polyakov Reply-To: johnpol@2ka.mipt.ru To: netdev@oss.sgi.com Cc: cryptoapi@lists.logix.cz Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-a71b/Hi3u7ltMlmkhSjh" Organization: MIPT Message-Id: <1099030958.4944.148.camel@uganda> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Fri, 29 Oct 2004 10:22:38 +0400 X-Virus-Scanned: clamd / ClamAV version 0.75.1, clamav-milter version 0.75c on dea.vocord.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.4 (vocord.com [192.168.0.1]); Fri, 29 Oct 2004 06:17:53 +0000 (UTC) X-archive-position: 11069 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: johnpol@2ka.mipt.ru Precedence: bulk X-list: netdev --=-a71b/Hi3u7ltMlmkhSjh Content-Type: multipart/mixed; boundary="=-gAz1C7z/zhc3Hd8IdTzQ" --=-gAz1C7z/zhc3Hd8IdTzQ Content-Type: text/plain Content-Transfer-Encoding: quoted-printable I'm pleased to announce asynchronous crypto layer for Linux kernel 2.6. It support following features: - multiple asynchronous crypto device queues - crypto session routing - crypto session binding - modular load balancing - crypto session batching genetically implemented by design - crypto session priority - different kinds of crypto operation(RNG, asymmetrical crypto, HMAC and any other) Some design notes: acrypto has one main crypto session queue(double linked list, probably it should be done like crypto_route or sk_buff queue), into which each newly allocated session is inserted and this is a place where load balancing searches it's food. When new session is being prepared for insertion it calls load balancer's ->find_device() method, which should return suitable device(current simple_lb load balancer returns device with the lowest load(device has the least number of session in it's queue)) if it exists. After crypto_device being returned acrypto creates new crypto routing entry which points to returned device and adds it to crypto session routing queue. Crypto session is being inserted into device's queue according to it's priority and it is crypto device driver that should process it's session list according to session's priority. All insertion and deletion are guarded by appropriate locks, but session_list traversing is not guarded in crypto_lb_thread() since session can be removed _only_ from that function by design, so if crypto device (atomically) marks session as completed and not being processed and use list_for_each_safe() for traversing it's queue all should be OK. Each crypto load balancer must implement 2 methods:=20 ->rehash() and ->find_device() which will be called from any context and under spinlock. ->rehash() method should be called to remix crypto sessions in device's queues, for example if driver decides that it's device is broken it marks itself as broken and load balancer(or scheduler if you like) should remove all sessions from this queue to some other devices.=20 If session can not be completed scheduler must mark it as broken and complete it(by calling first broke_session() and then complete_session() and stop_process_session()). Consumer must check if operation was successful(and therefore session is not broken). ->find_device() method should return appropriate crypto device. For crypto session to be successfully allocated crypto consumer must provide two structures - struct crypto_session_initializer=20 (hmm, why only one z?) and struct crypto_data. struct crypto_session_initializer contains data needed to find appropriate device, like type of operation, mode of operation, some flags(for example SESSION_BINDED, which means that session must be bound to specified in bdev field crypto device, it is useful for TCPA/TPM), session priority and callback which will be called after all routing for given session are finished. struct crypto_data contains scatterlists for src, dst, key and iv. It also has void *priv field and it's size which is allocated and may be used by any crypto agent(for example VIA PadLock driver uses it to store aes_ctx field, crypto_session can use this field to store some pointers needed in ->callback()). Actually callback will be called from queue_work, but I suppose it is better to not assume calling context. ->callback() will be called after all crypto routing for given session are done with the same parameters as were provided in initialisation time(if session has only one routing callback will be called with original parameters, but if it has several routes callback will be called with parameters from the latest processed one). I believe crypto callback should not know about crypto sessions, routings, device and so on, proper restriction is always a good idea. Crypto routing. This feature allows the same session to be processed by several devices/algorithms. For example if you need to encrypt data and then sign it in TPM device you can create one route to encryption device and then route it to TPM device. (Note: this feature must be discussed since there is no time slice after session allocation, only in crypto_device->data_ready() method and there are locking issues in ->callback() method). Crypto device. It can be either software emulator or hardware accelerator chip(like HIFN 79*/83* or Via PadLock ACE/RNG, or even TPM device like each IBM ThinkPad or some HP laptops have=20 (gentle hint: _they_ even have a _windows_ software for them :) )). It can be registered with asynchronous crypto layer and must provide some data for it: ->data_ready() method - it is called each time new session is added to device's queue. Array of struct crypto_capability and it's amount -=20 struct crypto_capability describes each operation given device can handle, and has a maximum session queue length parameter. Note: this structure can [be extended to] include "rate" parameter to show absolute speed of given operation in some units, which therefore can be used by scheduler(load balancer) for proper device selection. Actually queue length can somehow reflects device's "speed". Also attached: - simple synchronous <-> asynchronous bridge for sha1 crypto provider. It can be easily extended to handle whole number of synchronous software implemented algorithms. - driver for Via PadLock ACE - not tested, since my M10000 does not have xcrypt module. This work is 98% by Michal Ludvig , I have just silently stolen it several days ago. I've obtained bits of documentation for HIFN 795* so driver will be created for it. I want to thank Wim Vandeputte and www.soekris.com for steps towards me in ordering and delivering process to Russia. Asynchronous crypto layer depends on kernel connector which was presented in both linux-kernel@ and netdev@ several weeks ago. Currently acrypto does not handle userspace session requests(for example from OpenSSL) but I will implement it soon in form of char device and it's ->mmap method. Please review and comment, I am open for discussion. Thank you. --=20 Evgeniy Polyakov Crash is better than data corruption. -- Art Grabowski --=-gAz1C7z/zhc3Hd8IdTzQ Content-Disposition: attachment; filename=acrypto.h Content-Type: text/x-chdr; name=acrypto.h; charset=KOI8-R Content-Transfer-Encoding: base64 LyoNCiAqIAlhY3J5cHRvLmgNCiAqDQogKiBDb3B5cmlnaHQgKGMpIDIwMDQgRXZnZW5peSBQb2x5 YWtvdiA8am9obnBvbEAya2EubWlwdC5ydT4NCiAqIA0KICoNCiAqIFRoaXMgcHJvZ3JhbSBpcyBm cmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5DQogKiBp dCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1 Ymxpc2hlZCBieQ0KICogdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNp b24gMiBvZiB0aGUgTGljZW5zZSwgb3INCiAqIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZl cnNpb24uDQogKg0KICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRo YXQgaXQgd2lsbCBiZSB1c2VmdWwsDQogKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhv dXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZg0KICogTUVSQ0hBTlRBQklMSVRZIG9yIEZJ VE5FU1MgRk9S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KaW50IF9fY3J5 cHRvX2RldmljZV9hZGQoc3RydWN0IGNyeXB0b19kZXZpY2UgKik7DQppbnQgY3J5cHRvX2Rldmlj ZV9hZGQoc3RydWN0IGNyeXB0b19kZXZpY2UgKik7DQp2b2lkIF9fY3J5cHRvX2RldmljZV9yZW1v dmUoc3RydWN0IGNyeXB0b19kZXZpY2UgKik7DQp2b2lkIGNyeXB0b19kZXZpY2VfcmVtb3ZlKHN0 cnVjdCBjcnlwdG9fZGV2aWNlICopOw0KaW50IG1hdGNoX2luaXRpYWxpemVyKHN0cnVjdCBjcnlw dG9fZGV2aWNlICosIHN0cnVjdCBjcnlwdG9fc2Vzc2lvbl9pbml0aWFsaXplciAqKTsNCg0KaW5s aW5lIHZvaWQgY3J5cHRvX3Nlc3Npb25faW5zZXJ0X21haW4oc3RydWN0IGNyeXB0b19kZXZpY2Ug KmRldiwgc3RydWN0IGNyeXB0b19zZXNzaW9uICpzKTsNCmlubGluZSB2b2lkIGNyeXB0b19zZXNz aW9uX2luc2VydChzdHJ1Y3QgY3J5cHRvX2RldmljZSAqZGV2LCBzdHJ1Y3QgY3J5cHRvX3Nlc3Np b24gKnMpOw0KDQojZW5kaWYgLyogX19LRVJORUxfXyAqLw0KI2VuZGlmIC8qIF9fQUNSWVBUT19I ICovDQo= --=-gAz1C7z/zhc3Hd8IdTzQ Content-Disposition: attachment; filename=consumer.c Content-Type: text/x-csrc; name=consumer.c; charset=KOI8-R Content-Transfer-Encoding: base64 LyoNCiAqIAljb25zdW1lci5jDQogKg0KICogQ29weXJpZ2h0IChjKSAyMDA0IEV2Z2VuaXkgUG9s eWFrb3YgPGpvaG5wb2xAMmthLm1pcHQucnU+DQogKiANCiAqDQogKiBUaGlzIHByb2dyYW0gaXMg ZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeQ0KICog aXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbC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KCQlwcmludGsoS0VSTl9JTkZPICJXYWl0aW5nIGZvciBzZXNzaW9u cyB0byBiZSBmcmVlZDogd2F0ZXJtYXJrPSVkLlxuIiwNCgkJCQl3YXRlcm1hcmspOw0KCX0NCgkN CglpZiAoIWNkYXRhLnNnX2tleS5sZW5ndGgpDQoJCXByaW50aygiQlVHOiBrZXkgbGVuZ3RoIGlz IDAgaW4gJXMuXG4iLCBfX2Z1bmNfXyk7DQoJDQoJX19mcmVlX3BhZ2VzKGNkYXRhLnNnX2tleS5w YWdlLCBnZXRfb3JkZXIoa2V5X2xlbmd0aCkpOw0KCV9fZnJlZV9wYWdlcyhjZGF0YS5zZ19kc3Qu cGFnZSwgZ2V0X29yZGVyKDEpKTsNCglfX2ZyZWVfcGFnZXMoY2RhdGEuc2dfc3JjLnBhZ2UsIGdl dF9vcmRlcigxKSk7DQoJDQoJcHJpbnRrKEtFUk5fSU5GTyAiVGVzdCBjcnlwdG8gbW9kdWxlIGNv bnN1bWVyIGlzIHVubG9hZGVkLlxuIik7DQp9DQoNCm1vZHVsZV9pbml0KGNvbnN1bWVyX2luaXQp Ow0KbW9kdWxlX2V4aXQoY29uc3VtZXJfZmluaSk7DQoNCk1PRFVMRV9MSUNFTlNFKCJHUEwiKTsN Ck1PRFVMRV9BVVRIT1IoIkV2Z2VuaXkgUG9seWFrb3YgPGpvaG5wb2xAMmthLm1pcHQucnU+Iik7 DQpNT0RVTEVfREVTQ1JJUFRJT04oIlRlc3QgY3J5cHRvIG1vZHVsZSBjb25zdW1lci4iKTsNCn== --=-gAz1C7z/zhc3Hd8IdTzQ Content-Disposition: attachment; filename=crypto_conn.c Content-Type: text/x-csrc; name=crypto_conn.c; charset=KOI8-R Content-Transfer-Encoding: base64 LyoNCiAqIAljcnlwdG9fY29ubi5jDQogKg0KICogQ29weXJpZ2h0IChjKSAyMDA0IEV2Z2VuaXkg UG9seWFrb3YgPGpvaG5wb2xAMmthLm1pcHQucnU+DQogKiANCiAqDQogKiBUaGlzIH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VybiBlcnI7DQoNCglkcHJpbnRr KEtFUk5fSU5GTyAiQ3J5cHRvIGNvbm5lY3RvciBjYWxsYmFjayBpcyByZWdpc3RlcmVkLlxuIik7 DQoNCglyZXR1cm4gMDsNCn0NCg0Kdm9pZCBjcnlwdG9fY29ubl9maW5pKHZvaWQpDQp7DQoJY25f ZGVsX2NhbGxiYWNrKCZjcnlwdG9fY29ubl9pZCk7DQoJZHByaW50ayhLRVJOX0lORk8gIkNyeXB0 byBjb25uZWN0b3IgY2FsbGJhY2sgaXMgdW5yZWdpc3RlcmVkLlxuIik7DQp9DQo= --=-gAz1C7z/zhc3Hd8IdTzQ Content-Disposition: attachment; filename=crypto_conn.h Content-Type: text/x-chdr; name=crypto_conn.h; charset=KOI8-R Content-Transfer-Encoding: base64 LyoNCiAqIAljcnlwdG9fY29ubi5oDQogKg0KICogQ29weXJpZ2h0IChjKSAyMDA0IEV2Z2VuaXkg UG9seWFrb3YgPGpvaG5wb2xAMmthLm1pcHQucnU+DQogKiANCiAqDQogKiBUaGlzIHByb2dyYW0g aXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeQ0K ICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBh cyBwdWJsaXNoZWQgYnkNCiAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2 ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yDQogKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRl ciB2ZXJzaW9uLg0KICoNCiAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9w ZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLA0KICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3 aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQ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Q Content-Disposition: attachment; filename=crypto_def.h Content-Type: text/x-chdr; name=crypto_def.h; charset=KOI8-R Content-Transfer-Encoding: base64 LyoNCiAqIAljcnlwdG9fZGVmLmgNCiAqDQogKiBDb3B5cmlnaHQgKGMpIDIwMDQgRXZnZW5peSBQ b2x5YWtvdiA8am9obnBvbEAya2EubWlwdC5ydT4NCiAqIA0KICoNCiAqIFRoaXMgcHJvZ3JhbSBp cyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5DQog KiBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFz IHB1Ymxpc2hlZCBieQ0KICogdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZl cnNpb24gMiBvZiB0aGUgTGljZW5zZSwgb3INCiAqIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVy IHZlcnNpb24uDQogKg0KICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3Bl IHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsDQogKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdp dGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZg0KICogTUVSQ0hBTlRBQklMSVRZIG9y IEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZQ0KICogR05VIEdlbmVy YWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4NCiAqDQogKiBZb3Ugc2hvdWxkIGhh dmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZQ0KICog YWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlIEZyZWUgU29mdHdh cmUNCiAqIEZvdW5kYXRpb24sIEluYy4sIDU5IFRlbXBsZSBQbGFjZSwgU3VpdGUgMzMwLCBCb3N0 b24sIE1BIDAyMTExLTEzMDcgVVNBDQogKi8NCg0KI2lmbmRlZiBfX0NSWVBUT19ERUZfSA0KI2Rl ZmluZSBfX0NSWVBUT19ERUZfSA0KDQojZGVmaW5lIENSWVBUT19PUF9ERUNSWVBUCTANCiNkZWZp bmUgQ1JZUFRPX09QX0VOQ1JZUFQJMQ0KI2RlZmluZSBDUllQVE9fT1BfSE1BQwkJMg0KDQojZGVm aW5lIENSWVBUT19NT0RFX0VDQgkJMA0KI2RlZmluZSBDUllQVE9fTU9ERV9DQkMJCTENCiNkZWZp bmUgQ1JZUFRPX01PREVfQ0ZCCQkyDQojZGVmaW5lIENSWVBUT19NT0RFX09GQgkJMw0KDQojZGVm aW5lIENSWVBUT19UWVBFX0FFU18xMjgJMA0KI2RlZmluZSBDUllQVE9fVFlQRV9BRVNfMTkyCTEN CiNkZWZpbmUgQ1JZUFRPX1RZUEVfQUVTXzI1NgkyDQoNCiNlbmRpZiAvKiBfX0NSWVBUT19ERUZf SCAqLw0K --=-gAz1C7z/zhc3Hd8IdTzQ Content-Disposition: attachment; filename=crypto_dev.c Content-Type: text/x-csrc; name=crypto_dev.c; charset=KOI8-R Content-Transfer-Encoding: base64 LyoNCiAqIAljcnlwdG9fZGV2LmMNCiAqDQogKiBDb3B5cmlnaHQgKGMpIDIwMDQgRXZnZW5peSBQ b2x5YWtvdiA8am9obnBvbEAya2EubWlwdC5ydT4NCiAqIA0KICoNCiAqIFRoaXMgcHJvZ3JhbSBp cyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5DQog KiBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFz IHB1Ymxpc2hlZCBieQ0KICogdGhlIEZyZWUgU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Gl0IGhlcmUsIGZvciBleGFtcGxlIGJ5DQoJCQkJICogZmx1c2hpbmcgdGhlIHdo b2xlIHF1ZXVlIGFuZCBkcm9wIGFsbCBwZW5kaW5nIHNlc3Npb25zLg0KCQkJCSAqLw0KDQoJCQkJ X19kZXYtPmRhdGFfcmVhZHkoX19kZXYpOw0KCQkJCXNldF9jdXJyZW50X3N0YXRlKFRBU0tfVU5J TlRFUlJVUFRJQkxFKTsNCgkJCQlzY2hlZHVsZV90aW1lb3V0KEhaKTsNCgkJCX0NCgkJCQ0KCQkJ ZHByaW50ayhLRVJOX0VSUiAiQ3J5cHRvIGRldmljZSAlcyB3YXMgdW5yZWdpc3RlcmVkLlxuIiwg ZGV2LT5uYW1lKTsNCgkJCXJldHVybjsNCgkJfQ0KCX0NCglzcGluX3VubG9ja19pcnFyZXN0b3Jl KCZjZGV2X2xvY2ssIGZsYWdzKTsNCgkJCQ0KCWRwcmludGsoS0VSTl9FUlIgIkNyeXB0byBkZXZp Y2UgJXMgd2FzIG5vdCByZWdpc3RlcmVkLlxuIiwgZGV2LT5uYW1lKTsNCn0NCg0KRVhQT1JUX1NZ TUJPTChjcnlwdG9fZGV2aWNlX2FkZCk7DQpFWFBPUlRfU1lNQk9MKGNyeXB0b19kZXZpY2VfcmVt b3ZlKTsNCkVYUE9SVF9TWU1CT0woY3J5cHRvX2RldmljZV9nZXQpOw0KRVhQT1JUX1NZTUJPTChj cnlwdG9fZGV2aWNlX2dldF9uYW1lKTsNCkVYUE9SVF9TWU1CT0woY3J5cHRvX2RldmljZV9wdXQp Ow0KRVhQT1JUX1NZTUJPTChtYXRjaF9pbml0aWFsaXplcik7DQo= --=-gAz1C7z/zhc3Hd8IdTzQ Content-Disposition: attachment; filename=crypto_lb.c Content-Type: text/x-csrc; name=crypto_lb.c; charset=KOI8-R Content-Transfer-Encoding: base64 LyoNCiAqIAljcnlwdG9fbGIuYw0KICoNCiAqIENvcHlyaWdodCAoYykgMjAwNCBFdmdlbml5IFBv bHlha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yk7DQplcnJfb3V0X2RyaXZlcl91bnJlZ2lzdGVyOg0KCWRyaXZlcl91bnJlZ2lzdGVy KCZjcnlwdG9fbGJfZHJpdmVyKTsNCmVycl9vdXRfYnVzX3VucmVnaXN0ZXI6DQoJYnVzX3VucmVn aXN0ZXIoJmNyeXB0b19sYl9idXNfdHlwZSk7DQplcnJfb3V0X2V4aXQ6DQoJcmV0dXJuIGVycjsN Cn0NCg0Kdm9pZCBjcnlwdG9fbGJfZmluaSh2b2lkKQ0Kew0KCW5lZWRfZXhpdCA9IDE7DQoJd2Fp dF9mb3JfY29tcGxldGlvbigmdGhyZWFkX2V4aXRlZCk7DQoJZGVzdHJveV93b3JrcXVldWUoY3J5 cHRvX2xiX3F1ZXVlKTsNCgljbGFzc191bnJlZ2lzdGVyKCZjcnlwdG9fbGJfY2xhc3MpOw0KCWRy aXZlcl91bnJlZ2lzdGVyKCZjcnlwdG9fbGJfZHJpdmVyKTsNCglidXNfdW5yZWdpc3RlcigmY3J5 cHRvX2xiX2J1c190eXBlKTsNCn0NCg0KRVhQT1JUX1NZTUJPTChjcnlwdG9fbGJfcmVnaXN0ZXIp Ow0KRVhQT1JUX1NZTUJPTChjcnlwdG9fbGJfdW5yZWdpc3Rlcik7DQpFWFBPUlRfU1lNQk9MKGNy eXB0b19sYl9yZWhhc2gpOw0KRVhQT1JUX1NZTUJPTChjcnlwdG9fbGJfZmluZF9kZXZpY2UpOw0K --=-gAz1C7z/zhc3Hd8IdTzQ Content-Disposition: attachment; filename=crypto_lb.h Content-Type: text/x-chdr; name=crypto_lb.h; charset=KOI8-R Content-Transfer-Encoding: base64 LyoNCiAqIAljcnlwdG9fbGIuaA0KICoNCiAqIENvcHlyaWdodCAoYykgMjAwNCBFdmdlbml5IFBv bHlha292IDxqb2hucG9sQDJrYS5taXB0LnJ1Pg0KICogDQogKg0KICogVGhpcyBwcm9ncmFtIGlz IGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IG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UT19MQl9IICovDQo= --=-gAz1C7z/zhc3Hd8IdTzQ Content-Disposition: attachment; filename=crypto_main.c Content-Type: text/x-csrc; name=crypto_main.c; charset=KOI8-R Content-Transfer-Encoding: base64 LyoNCiAqIAljcnlwdG9fbWFpbi5jDQogKg0KICogQ29weXJpZ2h0IChjKSAyMDA0IEV2Z2VuaXkg UG9seWFrb3YgPGpvaG5wb2xAMmthLm1pcHQucnU+DQogKiANCiAqDQogKiBUaGlzIHByb2dyYW0g aXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeQ0K ICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBh cyBwdWJsaXNoZWQgYnkNCiAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2 ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yDQogKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRl ciB2ZXJzaW9uLg0KICoNCiAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9w ZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLA0KICogYnV0IFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3 aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YNCiAqIE1FUkNIQU5UQUJJTElUWSBv ciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUNCiAqIEdOVSBHZW5l cmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuDQogKg0KICogWW91IHNob3VsZCBo YXZlIHJlY2VpdmVkIGEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UNCiAq IGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZ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R1bGVfZXhpdChjbWFpbl9maW5pKTsNCg0KTU9EVUxFX0xJ Q0VOU0UoIkdQTCIpOw0KTU9EVUxFX0FVVEhPUigiRXZnZW5peSBQb2x5YWtvdiA8am9obnBvbEAy a2EubWlwdC5ydT4iKTsNCk1PRFVMRV9ERVNDUklQVElPTigiQXN5bmNocm9ub3VzIGNyeXB0byBs YXllci4iKTsNCg0KRVhQT1JUX1NZTUJPTChjcnlwdG9fc2Vzc2lvbl9hbGxvYyk7DQo= --=-gAz1C7z/zhc3Hd8IdTzQ Content-Disposition: attachment; filename=crypto_route.h Content-Type: text/x-chdr; name=crypto_route.h; charset=KOI8-R Content-Transfer-Encoding: base64 LyoNCiAqIAljcnlwdG9fcm91dGUuaA0KICoNCiAqIENvcHlyaWdodCAoYykgMjAwNCBFdmdlbml5 IFBvbHlha292IDxqb2hucG9sQDJrYS5taXB0LnJ1Pg0KICogDQogKg0KICogVGhpcyBwcm9ncmFt IGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkN CiAqIGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2Ug YXMgcHVibGlzaGVkIGJ5DQogKiB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uOyBlaXRoZXIg dmVyc2lvbiAyIG9mIHRoZSBMaWNlbnNlLCBvcg0KICogKGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0 ZXIgdmVyc2lvbi4NCiAqDQogKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhv cGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwNCiAqIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsg d2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mDQogKiBNRVJDSEFOVEFCSUxJVFkg b3IgRklUTkV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lzdCkNCgl7DQoJCXNwaW5fbG9ja19iaCgmbGlzdC0+bG9jayk7DQoJCXJ0ID0g X19jcnlwdG9fcm91dGVfY3VycmVudChsaXN0KTsNCgkJc3Bpbl91bmxvY2tfYmgoJmxpc3QtPmxv Y2spOw0KCX0NCg0KCXJldHVybiBydDsNCn0NCg0Kc3RhdGljIGlubGluZSBzdHJ1Y3QgY3J5cHRv X2RldmljZSAqY3J5cHRvX3JvdXRlX2dldF9jdXJyZW50X2RldmljZShzdHJ1Y3QgY3J5cHRvX3Nl c3Npb24gKnMpDQp7DQoJc3RydWN0IGNyeXB0b19yb3V0ZSAqcnQgPSBOVUxMOw0KCXN0cnVjdCBj cnlwdG9fZGV2aWNlICpkZXYgPSBOVUxMOw0KCXN0cnVjdCBjcnlwdG9fcm91dGVfaGVhZCAqbGlz dCA9ICZzLT5yb3V0ZV9saXN0Ow0KDQoJc3Bpbl9sb2NrX2JoKCZsaXN0LT5sb2NrKTsNCglydCA9 IF9fY3J5cHRvX3JvdXRlX2N1cnJlbnQobGlzdCk7DQoJaWYgKHJ0KQ0KCXsNCgkJZGV2ID0gcnQt PmRldjsNCgkJY3J5cHRvX2RldmljZV9nZXQoZGV2KTsNCgl9DQoJc3Bpbl91bmxvY2tfYmgoJmxp c3QtPmxvY2spOw0KCQ0KCXJldHVybiBkZXY7DQp9DQoNCiNlbmRpZiAvKiBfX0NSWVBUT19ST1VU RV9IICovDQo= --=-gAz1C7z/zhc3Hd8IdTzQ Content-Disposition: attachment; filename=crypto_stat.c Content-Type: text/x-csrc; name=crypto_stat.c; charset=KOI8-R Content-Transfer-Encoding: base64 LyoNCiAqIAljcnlwdG9fc3RhdC5jDQogKg0KICogQ29weXJpZ2h0IChjKSAyMDA0IEV2Z2VuaXkg UG9seWFrb3YgPGpvaG5wb2xAMmthLm1pcHQucnU+DQogKiANCiAqDQogKiBUaGlzIHByb2dyYW0g aXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dG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zZXNzaW9uICpzKQ0Kew0KCXN0cnVjdCBjcnlwdG9fZGV2aWNl ICpkZXY7DQoNCglkZXYgPSBjcnlwdG9fcm91dGVfZ2V0X2N1cnJlbnRfZGV2aWNlKHMpOw0KCWlm IChkZXYpDQoJew0KCQlzcGluX2xvY2tfYmgoJmRldi0+c3RhdF9sb2NrKTsNCgkJZGV2LT5zdGF0 LnNjb21wbGV0ZWQrKzsNCgkJc3Bpbl91bmxvY2tfYmgoJmRldi0+c3RhdF9sb2NrKTsNCg0KCQlj cnlwdG9fZGV2aWNlX3B1dChkZXYpOw0KCX0NCn0NCg0KRVhQT1JUX1NZTUJPTChjcnlwdG9fc3Rh dF9zdGFydF9pbmMpOw0KRVhQT1JUX1NZTUJPTChjcnlwdG9fc3RhdF9maW5pc2hfaW5jKTsNCkVY UE9SVF9TWU1CT0woY3J5cHRvX3N0YXRfY29tcGxldGVfaW5jKTsNCg== --=-gAz1C7z/zhc3Hd8IdTzQ Content-Disposition: attachment; filename=crypto_stat.h Content-Type: text/x-chdr; name=crypto_stat.h; charset=KOI8-R Content-Transfer-Encoding: base64 LyoNCiAqIAljcnlwdG9fc3RhdC5oDQogKg0KICogQ29weXJpZ2h0IChjKSAyMDA0IEV2Z2VuaXkg UG9seWFrb3YgPGpvaG5wb2xAMmthLm1pcHQucnU+DQogKiANCiAqDQogKiBUaGlzIHByb2dyYW0g aXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeQ0K ICogaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBh cyBwdWJsaXNoZWQgYnkNCiAqIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2 ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yDQogKiAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRl ciB2ZXJzaW9uLg0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ition: attachment; filename=Makefile Content-Type: text/x-makefile; name=Makefile; charset=KOI8-R Content-Transfer-Encoding: base64 VE9QRElSCTo9ICQoUFdEKQ0KI0tESVIJOj0gL2xpYi9tb2R1bGVzLyQoc2hlbGwgdW5hbWUgLXIp L2J1aWxkDQpLRElSCTo9IC91c3IvbG9jYWwvc3JjL2xpbnV4LTIuNi9saW51eC0yLjYNClBXRAk6 PSAkKHNoZWxsIHB3ZCkNCiNDQwk6PSAvdG1wL3NwYXJzZS1iay9jZ2NjDQpDQwk6PSBnY2MNCg0K DQpvYmotbQkJKz0gYWNyeXB0by5vIHNpbXBsZV9sYi5vIA0Kb2JqLW0JCSs9IGNvbnN1bWVyLm8g DQojc2xvd19jb25zdW1lci5vDQpvYmotbQkJKz0gcHJvdmlkZXIubyBzbG93X3Byb3ZpZGVyLm8g c2hhMV9wcm92aWRlci5vDQphY3J5cHRvLW9ianMJOj0gY3J5cHRvX21haW4ubyBjcnlwdG9fbGIu byBjcnlwdG9fZGV2Lm8gY3J5cHRvX2Nvbm4ubyBjcnlwdG9fc3RhdC5vDQoNCm9iai1tCQkrPSB2 aWEtcGFkbG9jay8NCg0KZGVmYXVsdDoNCgkkKE1BS0UpIC1DICQoS0RJUikgU1VCRElSUz0kKFBX RCkgbW9kdWxlcw0KDQpjbGVhbjoNCglybSAtZiAqLm8gKi5rbyAqLm1vZC4qIC4qLmNtZCAqfiAu Ki5kDQoJcm0gLXJmIC50bXBfdmVyc2lvbnMNCgljZCB2aWEtcGFkbG9jayAmJiBtYWtlIGNsZWFu DQo= --=-gAz1C7z/zhc3Hd8IdTzQ Content-Disposition: attachment; filename=provider.c Content-Type: text/x-csrc; name=provider.c; charset=KOI8-R Content-Transfer-Encoding: base64 LyoNCiAqIAlwcm92aWRlci5jDQogKg0KICogQ29weXJpZ2h0IChjKSAyMDA0IEV2Z2VuaXkgUG9s eWFrb3YgPGpvaG5wb2xAMmthLm1pcHQucnU+DQogKiANCiAqDQogKiBUaGlzIHByb2dyYW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cGRldi5uYW1lKTsNCn0NCg0KbW9kdWxlX2luaXQocHJv dl9pbml0KTsNCm1vZHVsZV9leGl0KHByb3ZfZmluaSk7DQoNCk1PRFVMRV9MSUNFTlNFKCJHUEwi KTsNCk1PRFVMRV9BVVRIT1IoIkV2Z2VuaXkgUG9seWFrb3YgPGpvaG5wb2xAMmthLm1pcHQucnU+ Iik7DQpNT0RVTEVfREVTQ1JJUFRJT04oIlRlc3QgY3J5cHRvIG1vZHVsZSBwcm92aWRlci4iKTsN Cg== --=-gAz1C7z/zhc3Hd8IdTzQ Content-Disposition: attachment; filename=sha1_provider.c Content-Type: text/x-csrc; name=sha1_provider.c; charset=KOI8-R Content-Transfer-Encoding: base64 LyoNCiAqIAlzaGExX3Byb3ZpZGVyLmMNCiAqDQogKiBDb3B5cmlnaHQgKGMpIDIwMDQgRXZnZW5p eSBQb2x5YWtvdiA8am9obnBvbEAya2EubWlwdC5ydT4NCiAqIA0KICoNCiAqIFRoaXMgcHJvZ3Jh bSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5 DQogKiBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNl IGFzIHB1Ymxpc2hlZCBieQ0KICogdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVy IHZlcnNpb24gMiBvZiB0aGUgTGljZW5zZSwgb3INCiAqIChhdCB5b3VyIG9wdGlvbikgYW55IGxh dGVyIHZlcnNpb24uDQogKg0KICogVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBo b3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsDQogKiBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7 IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZg0KICogTUVSQ0hBTlRBQklMSV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JcmV0dXJuIDA7DQoNCmVycl9vdXRfcmVtb3Zl X3RocmVhZDoNCgluZWVkX2V4aXQgPSAxOw0KCXdha2VfdXAoJnNoYTFfd2FpdF9xdWV1ZSk7DQoJ d2FpdF9mb3JfY29tcGxldGlvbigmdGhyZWFkX2V4aXRlZCk7DQplcnJfb3V0X2ZyZWVfdGZtOg0K CWNyeXB0b19mcmVlX3RmbSh0Zm0pOw0KDQoJcmV0dXJuIGVycjsNCn0NCg0Kdm9pZCBwcm92X2Zp bmkodm9pZCkNCnsNCgluZWVkX2V4aXQgPSAxOw0KCXdha2VfdXAoJnNoYTFfd2FpdF9xdWV1ZSk7 DQoJd2FpdF9mb3JfY29tcGxldGlvbigmdGhyZWFkX2V4aXRlZCk7DQoNCgljcnlwdG9fZGV2aWNl X3JlbW92ZSgmcGRldik7DQoJY3J5cHRvX2ZyZWVfdGZtKHRmbSk7DQoJDQoJZHByaW50ayhLRVJO X0lORk8gIlRlc3QgY3J5cHRvIHByb3ZpZGVyIG1vZHVsZSAlcyBpcyB1bmxvYWRlZC5cbiIsIHBk ZXYubmFtZSk7DQp9DQoNCm1vZHVsZV9pbml0KHByb3ZfaW5pdCk7DQptb2R1bGVfZXhpdChwcm92 X2ZpbmkpOw0KDQpNT0RVTEVfTElDRU5TRSgiR1BMIik7DQpNT0RVTEVfQVVUSE9SKCJFdmdlbml5 IFBvbHlha292IDxqb2hucG9sQDJrYS5taXB0LnJ1PiIpOw0KTU9EVUxFX0RFU0NSSVBUSU9OKCJU ZXN0IGNyeXB0byBtb2R1bGUgcHJvdmlkZXIuIik7DQo= --=-gAz1C7z/zhc3Hd8IdTzQ Content-Disposition: attachment; filename=simple_lb.c Content-Type: text/x-csrc; name=simple_lb.c; charset=KOI8-R Content-Transfer-Encoding: base64 LyoNCiAqIAlzaW1wbGVfbGIuYw0KICoNCiAqIENvcHlyaWdodCAoYykgMjAwNCBFdmdlbml5IFBv bHlha292IDxqb2hucG9sQDJrYS5taXB0LnJ1Pg0KIC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lci4iKTsNCg== --=-gAz1C7z/zhc3Hd8IdTzQ Content-Disposition: attachment; filename=Makefile Content-Type: text/x-makefile; name=Makefile; charset=KOI8-R Content-Transfer-Encoding: base64 b2JqLW0JCSs9IHBhZGxvY2subw0KcGFkbG9jay1vYmpzCTo9IHBhZGxvY2stYWVzLm8gcGFkbG9j ay1nZW5lcmljLm8NCg0KY2xlYW46DQoJcm0gLWYgKi5vICoua28gKi5tb2QuKiAuKi5jbWQgKn4N CglybSAtcmYgLnRtcF92ZXJzaW9ucw0K --=-gAz1C7z/zhc3Hd8IdTzQ Content-Disposition: attachment; filename=padlock-aes.c Content-Type: text/x-csrc; name=padlock-aes.c; charset=KOI8-R Content-Transfer-Encoding: base64 LyogDQogKiBDcnlwdG9ncmFwaGljIEFQSS4NCiAqDQogKiBTdXBwb3J0IGZvciBWSUEgUGFkTG9j ayBoYXJkd2FyZSBjcnlwdG8gZW5naW5lLg0KICoNCiAqIExpbnV4IGRldmVsb3BlcnM6DQogKiAg TWljaGFsIEx1ZHZpZyA8bWx1ZHZpZ0BzdXNlLmN6Pg0KICoNCiAqIEtleSBleHBhbnNpb24gcm91 dGluZSB0YWtlbiBmcm9tIGNyeXB0by9hZXMuYw0KICoNCiAqIFRoaXMgcHJvZ3JhbSBpcyBmcmVl IHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5DQogKiBpdCB1 bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxp c2hlZCBieQ0KICogdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNpb24g MiBvZiB0aGUgTGljZW5zZSwgb3INCiAqIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNp b24uDQogKg0KICogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS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QogICAgICAgICAgICAgaXRfdGFiWzNdW2J5dGUoYmlbKG4gKyAxKSAm IDNdLDMpXSBeICooayArIG4pDQoNCiNkZWZpbmUgbHNfYm94KHgpCQkJCVwNCiAgICAoIGZsX3Rh YlswXVtieXRlKHgsIDApXSBeCQkJXA0KICAgICAgZmxfdGFiWzFdW2J5dGUoeCwgMSldIF4JCQlc DQogICAgICBmbF90YWJbMl1bYnl0ZSh4LCAyKV0gXgkJCVwNCiAgICAgIGZsX3RhYlszXVtieXRl KHgsIDMpXSApDQoNCiNkZWZpbmUgZl9ybChibywgYmksIG4sIGspCQkJCQlcDQogICAgYm9bbl0g PSAgZmxfdGFiWzBdW2J5dGUoYmlbbl0sMCldIF4JCQkJXA0KICAgICAgICAgICAgIGZsX3RhYlsx XVtieXRlKGJpWyhuICsgMSkgJiAzXSwxKV0gXgkJXA0KICAgICAgICAgICAgIGZsX3RhYlsyXVti eXRlKGJpWyhuICsgMikgJiAzXSwyKV0gXgkJXA0KICAgICAgICAgICAgIGZsX3RhYlszXVtieXRl KGJpWyhuICsgMykgJiAzXSwzKV0gXiAqKGsgKyBuKQ0KDQojZGVmaW5lIGlfcmwoYm8sIGJpLCBu LCBrKQkJCQkJXA0KICAgIGJvW25dID0gIGlsX3RhYlswXVtieXRlKGJpW25dLDApXSBeCQkJCVwN CiAgICAgICAgICAgICBpbF90YWJbMV1bYnl0ZShiaVsobiArIDMpICYgM10sMSldIF4JCVwNCiAg ICAgICAgICAgICBpbF90YWJbMl1bYnl0ZShiaVsobiArIDIpICYgM10sMildIF4JCVwNCiAgICAg ICAgICAgICBpbF90YWJbM11bYnl0ZShiaVsobiArIDEpICYgM10sMyldIF4gKihrICsgbikNCg0K c3RhdGljIHZvaWQNCmdlbl90YWJzICh2b2lkKQ0Kew0KCXUzMiBpLCB0Ow0KCXU4IHAsIHE7DQoN CgkvKiBsb2cgYW5kIHBvd2VyIHRhYmxlcyBmb3IgR0YoMioqOCkgZmluaXRlIGZpZWxkIHdpdGgN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zdGFyX3godik7ICAgICAgICBcDQogICAgdCAgID0gdyBeICh4 KTsgICAgICAgICAgXA0KICAgKHkpICA9IHUgXiB2IF4gdzsgICAgICAgIFwNCiAgICh5KSBePSBy b3RyKHUgXiB0LCAgOCkgXiBcDQogICAgICAgICAgcm90cih2IF4gdCwgMTYpIF4gXA0KICAgICAg ICAgIHJvdHIodCwyNCkNCg0KLyogaW5pdGlhbGlzZSB0aGUga2V5IHNjaGVkdWxlIGZyb20gdGhl IHVzZXIgc3VwcGxpZWQga2V5ICovDQoNCiNkZWZpbmUgbG9vcDQoaSkgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBcDQp7ICAgdCA9IHJvdHIodCwgIDgpOyB0ID0gbHNfYm94KHQp IF4gcmNvX3RhYltpXTsgICAgXA0KICAgIHQgXj0gRV9LRVlbNCAqIGldOyAgICAgRV9LRVlbNCAq IGkgKyA0XSA9IHQ7ICAgIFwNCiAgICB0IF49IEVfS0VZWzQgKiBpICsgMV07IEVfS0VZWzQgKiBp ICsgNV0gPSB0OyAgICBcDQogICAgdCBePSBFX0tFWVs0ICogaSArIDJdOyBFX0tFWVs0ICogaSAr IDZdID0gdDsgICAgXA0KICAgIHQgXj0gRV9LRVlbNCAqIGkgKyAzXTsgRV9LRVlbNCAqIGkgKyA3 XSA9IHQ7ICAgIFwNCn0NCg0KI2RlZmluZSBsb29wNihpKSAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIFwNCnsgICB0ID0gcm90cih0LCAgOCk7IHQgPSBsc19ib3godCkgXiByY29f dGFiW2ldOyAgICBcDQogICAgdCBePSBFX0tFWVs2ICogaV07ICAgICBFX0tFWVs2ICogaSArIDZd ID0gdDsgICAgXA0KICAgIHQgXj0gRV9LRVlbNiAqIGkgKyAxXTsgRV9LRVlbNiAqIGkgKyA3XSA9 IHQ7ICAgIFwNCiAgICB0IF49IEVfS0VZWzYgKiBpICsgMl07IEVfS0VZWzYgKiBpICsgOF0gPSB0 OyAgIC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WF4KHZh bCk7DQoJZWR4ID0gY3B1aWRfZWR4KHZhbCk7DQoJcHJpbnRrKCJ2YWw9JXgsIGNwdWlkPSV4LCBl ZHg9JXguXG4iLCB2YWwsIGNwdWlkLCBlZHgpOw0KCWlmIChjcHVpZCA+PSB2YWwgKyAxKQ0KCXsN CgkJcHJpbnRrKCJCb2FyZCBzdXBwb3J0cyBBQ0UuXG4iKTsNCgl9DQoJZWxzZQ0KCXsNCgkJcHJp bnRrKCJCb2FyZCBkb2VzIG5vdCBzdXBwb3J0IEFDRS5cbiIpOw0KCQlyZXR1cm4gLUVOT0RFVjsN Cgl9DQoJDQoJcHJpbnRrKEtFUk5fTk9USUNFICJVc2luZyBWSUEgUGFkTG9jayBBQ0UgZm9yIEFF UyBhbGdvcml0aG0gKG11bHRpYmxvY2spLlxuIik7DQoNCglwYWRsb2NrX2RldmljZS5jYXBfbnVt YmVyID0gcGFkbG9ja19jYXBfbnVtYmVyOw0KCQ0KCWdlbl90YWJzKCk7DQoJcmV0dXJuIGNyeXB0 b19kZXZpY2VfYWRkKCZwYWRsb2NrX2RldmljZSk7DQp9DQoNCnZvaWQgcGFkbG9ja19maW5pX2Fl cyh2b2lkKQ0Kew0KCWNyeXB0b19kZXZpY2VfcmVtb3ZlKCZwYWRsb2NrX2RldmljZSk7DQp9DQo= --=-gAz1C7z/zhc3Hd8IdTzQ Content-Disposition: attachment; filename=padlock-generic.c Content-Type: text/x-csrc; name=padlock-generic.c; charset=KOI8-R Content-Transfer-Encoding: base64 LyogDQogKiBDcnlwdG9ncmFwaGljIEFQSS4NCiAqDQogKiBTdXBwb3J0IGZvciBWSUEgUGFkTG9j ayBoYXJkd2FyZSBjcnlwdG8gZW5naW5lLg0KICoNCiAqIExpbnV4IGRldmVsb3BlcnM6DQogKiAg TWljaGFsIEx1ZHZpZyA8bWx1ZHZpZ0BzdXNlLmN6Pg0KICoNCiAqIFRoaXMgcHJvZ3JhbSBpcyBm cmVlIHNvZnR3YXJlOyB5b3UgY2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CA9PSAtRU5PU1lTKQ0KCQlwcmludGsoS0VSTl9FUlIgUEZYICJIbW0s IFZJQSBQYWRMb2NrIHdhcyBjb21waWxlZCB3aXRob3V0IGFueSBhbGdvcml0aG0uXG4iKTsNCg0K CXJldHVybiByZXQ7DQp9DQoNCnN0YXRpYyB2b2lkIF9fZXhpdCBwYWRsb2NrX2Zpbmkodm9pZCkN CnsNCglwYWRsb2NrX2ZpbmlfYWVzKCk7DQp9DQoNCm1vZHVsZV9pbml0KHBhZGxvY2tfaW5pdCk7 DQptb2R1bGVfZXhpdChwYWRsb2NrX2ZpbmkpOw0KDQpNT0RVTEVfREVTQ1JJUFRJT04oIlZJQSBQ YWRMb2NrIGNyeXB0byBlbmdpbmUgc3VwcG9ydC4iKTsNCk1PRFVMRV9MSUNFTlNFKCJEdWFsIEJT RC9HUEwiKTsNCk1PRFVMRV9BVVRIT1IoIk1pY2hhbCBMdWR2aWciKTsNCn== --=-gAz1C7z/zhc3Hd8IdTzQ Content-Disposition: attachment; filename=padlock.h Content-Type: text/x-chdr; name=padlock.h; charset=KOI8-R Content-Transfer-Encoding: base64 LyoNCiAqIENyeXB0b2dyYXBoaWMgQVBJLg0KICoNCiAqIENvcHlyaWdodCAoYykgMjAwNCBNaWNo YWwgTHVkdmlnIDxtbHVkdmlnQHN1c2UuY3o+DQogKg0KICogVGhpcyBwcm9ncmFtIGlzIGZyZWUg c29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgaXQNCiAqIHVu ZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlz aGVkIGJ5IHRoZSBGcmVlDQogKiBTb2Z0d2FyZSBGb3VuZGF0aW9uOyBlaXRoZXIgdmVyc2lvbiAy IG9mIHRoZSBMaWNlbnNlLCBvciAoYXQgeW91ciBvcHRpb24pIA0KICogYW55IGxhdGVyIHZlcnNp b24uDQogKg0KICov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bmNkZWM6MSwNCgkJCQlrc2l6ZToyOw0KCX0gYjsNCn07DQojZW5kaWYN Cg0KI2RlZmluZSBQRlgJInBhZGxvY2s6ICINCg0Kdm9pZCBwYWRsb2NrX2FsaWduZXIodTggKm91 dF9hcmcsIGNvbnN0IHU4ICppbl9hcmcsIGNvbnN0IHU4ICppdl9hcmcsDQoJCSAgICAgdm9pZCAq a2V5LCB1bmlvbiBjd29yZCAqY3dvcmQsDQoJCSAgICAgc2l6ZV90IG5ieXRlcywgc2l6ZV90IGJs b2Nrc2l6ZSwNCgkJICAgICBpbnQgZW5jZGVjLCBpbnQgbW9kZSk7DQoNCmludCBwYWRsb2NrX2lu aXRfYWVzKHZvaWQpOw0Kdm9pZCBwYWRsb2NrX2ZpbmlfYWVzKHZvaWQpOw0KDQojZW5kaWYJLyog X0NSWVBUT19QQURMT0NLX0ggKi8NCg== --=-gAz1C7z/zhc3Hd8IdTzQ-- --=-a71b/Hi3u7ltMlmkhSjh Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQBBgeGuIKTPhE+8wY0RAg8KAJ9CnINVLp8nTKYQr9J6+lEwTazN2gCfWnHr /AIPJfKnusnOJel3V3j+J8Q= =GqMF -----END PGP SIGNATURE----- --=-a71b/Hi3u7ltMlmkhSjh-- From akpm@osdl.org Thu Oct 28 23:49:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 23:49:22 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T6nAcw028163 for ; Thu, 28 Oct 2004 23:49:10 -0700 Received: from bix (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i9T6mm914074; Thu, 28 Oct 2004 23:48:49 -0700 Date: Thu, 28 Oct 2004 23:46:49 -0700 From: Andrew Morton To: netdev@oss.sgi.com Cc: mbm@alt.org Subject: Fw: [Bugme-new] [Bug 3657] New: downed interfaces acting as aliases Message-Id: <20041028234649.2d4ed3b8.akpm@osdl.org> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11070 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: Thu, 28 Oct 2004 23:45:02 -0700 From: bugme-daemon@osdl.org To: bugme-new@lists.osdl.org Subject: [Bugme-new] [Bug 3657] New: downed interfaces acting as aliases http://bugme.osdl.org/show_bug.cgi?id=3657 Summary: downed interfaces acting as aliases Kernel Version: 2.6.8.1 Status: NEW Severity: normal Owner: shemminger@osdl.org Submitter: mbm@alt.org An interface will still reply while down, acting as an ip alias if any other adapters have a compatible subnet. Scenerio: Using a laptop on a wired network, 192.168.1.0/24 subnet, eth0 set to 192.168.1.2. Moved to a different network on wireless, also a 192.168.1.0/24. The ethernet is still configured for 192.168.1.2 but the interface is down (ifconfig eth0 down); wireless clients on the second network are now having issues, 192.168.1.2 requests are going to the laptop. To confirm the issue, eth0 is changed to 192.168.1.254 and brought down again (an ip not in use on the wireless network). All wireless clients are magically able to ping 192.168.1.254. Steps to reproduce: ifconfig eth0 10.1.2.3 (or any random nonroutable ip) ifconfig eth0 down ping 10.1.2.3 .. wtf, how did it get a reply from a down'd interface? ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. From davem@davemloft.net Thu Oct 28 23:53:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Thu, 28 Oct 2004 23:53:49 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T6rijC028556 for ; Thu, 28 Oct 2004 23:53:45 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CNQVT-00065S-00; Thu, 28 Oct 2004 23:45:03 -0700 Date: Thu, 28 Oct 2004 23:45:02 -0700 From: "David S. Miller" To: Andrew Morton Cc: netdev@oss.sgi.com, mbm@alt.org Subject: Re: Fw: [Bugme-new] [Bug 3657] New: downed interfaces acting as aliases Message-Id: <20041028234502.203b42c3.davem@davemloft.net> In-Reply-To: <20041028234649.2d4ed3b8.akpm@osdl.org> References: <20041028234649.2d4ed3b8.akpm@osdl.org> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11071 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev People complain about this all the time, yet it is expected and intentional behavior. Just because you "down" the interface does not mean that addresses assigned to that interface are no longer assosciated with the host system. If you wish the machine not to respond to any of the interface's addresses, you must explicitly delete them from the interface address list. From a.kasparas@gmc.lt Fri Oct 29 00:06:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 00:06:15 -0700 (PDT) Received: from sizifas.gmc.lt (esc.ortopedija.lt [213.190.36.10]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T75xUK029229 for ; Fri, 29 Oct 2004 00:06:01 -0700 Received: from [10.0.0.83] ([::ffff:10.0.0.83]) by sizifas.gmc.lt with esmtp; Fri, 29 Oct 2004 10:05:42 +0300 Message-ID: <4181EBC3.3020507@gmc.lt> Date: Fri, 29 Oct 2004 10:05:39 +0300 From: Aidas Kasparas User-Agent: Mozilla Thunderbird 0.8 (X11/20040918) X-Accept-Language: lt, en, ru, fr MIME-Version: 1.0 To: Joy Latten CC: ipsec-tools-devel@lists.sourceforge.net, netdev@oss.sgi.com Subject: Re: [Ipsec-tools-devel] ipv4/ipv6 forwarding check References: <200410300506.i9U56Yse005815@faith.austin.ibm.com> In-Reply-To: <200410300506.i9U56Yse005815@faith.austin.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11072 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: a.kasparas@gmc.lt Precedence: bulk X-list: netdev Joy, Need to have forward policies (which are not specified in RFC 2401 or any other ipsec related RFC I've read) was like a thunder from the blue sky to us. There is no way in setkey how to insert forward policies at the moment. Which of the following directions to solve this problem we have not decided yet: 1) push kernel developers to have rfc2401 semantics in kernel; 1a) have pfkey kernel part transform rfc2401 semantics into kernel semantics; 2) have libpfkey generate extra policies transparently to the user; 3) have tools (setkey and racoon) generate extra policies transparently to the user; 4) extend setkey's syntax to make explicit forward policy management possible and write docs for all the admins to change policies. Personally I would like to have (1). This would make setups simpler. I believe, people with embeded applications would like very much to have (1) too (as extra policies => extra memory use will drive them mad). Yet, I have little hope this will happen :-//. Second least worst thing IMHO would be a combination of (2) and (4). Libpfkey functions have to be rewritten to generate extra forward policies, and current functions should be renamed as to provide view to real situation. Setkey should have a swith which tells to operate in rfc2401 compliant fashion (generating forward policies) or kernel mode (adding/removing/showing policies, including forward, as they are). Oppinions anyone? Meanwhile, I would like to recomend to abstain from upgrading to anything above 2.6.9. Joy Latten wrote: > I understand there has been discussion and code change > for checks with tunnel mode and forwarding packets. > In 2.6.9 with latest patches all my decapsulated tunnel mode > packets instead of being forwarded onto receiving subnet > or dropped. > How do I specify manually with setkey (syntax?), to forward > decapsulated packets onto receiving subnet? > > Thanks for any help. > > Joy Latten -- Aidas Kasparas IT administrator GM Consult Group, UAB From greearb@candelatech.com Fri Oct 29 00:11:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 00:11:36 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T7BTJE029657 for ; Fri, 29 Oct 2004 00:11:30 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i9T7IaLH009280; Fri, 29 Oct 2004 00:18:37 -0700 Message-ID: <4181ED02.1060501@candelatech.com> Date: Fri, 29 Oct 2004 00:10:58 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" CC: Andrew Morton , netdev@oss.sgi.com, mbm@alt.org Subject: Re: Fw: [Bugme-new] [Bug 3657] New: downed interfaces acting as aliases References: <20041028234649.2d4ed3b8.akpm@osdl.org> <20041028234502.203b42c3.davem@davemloft.net> In-Reply-To: <20041028234502.203b42c3.davem@davemloft.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11073 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev David S. Miller wrote: > People complain about this all the time, yet it is expected > and intentional behavior. > > Just because you "down" the interface does not mean that > addresses assigned to that interface are no longer assosciated > with the host system. > > If you wish the machine not to respond to any of the interface's > addresses, you must explicitly delete them from the interface > address list. Why would you want this behaviour? If it's configured down, it would seem that the user is trying to tell the system not to use it :) Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From davem@davemloft.net Fri Oct 29 00:13:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 00:13:52 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T7DgOB030049 for ; Fri, 29 Oct 2004 00:13:42 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CNQoZ-0006BA-00; Fri, 29 Oct 2004 00:04:47 -0700 Date: Fri, 29 Oct 2004 00:04:47 -0700 From: "David S. Miller" To: Aidas Kasparas Cc: latten@austin.ibm.com, ipsec-tools-devel@lists.sourceforge.net, netdev@oss.sgi.com Subject: Re: [Ipsec-tools-devel] ipv4/ipv6 forwarding check Message-Id: <20041029000447.4e7b68e3.davem@davemloft.net> In-Reply-To: <4181EBC3.3020507@gmc.lt> References: <200410300506.i9U56Yse005815@faith.austin.ibm.com> <4181EBC3.3020507@gmc.lt> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11074 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev On Fri, 29 Oct 2004 10:05:39 +0300 Aidas Kasparas wrote: > 4) extend setkey's syntax to make explicit forward policy management > possible and write docs for all the admins to change policies. This is what we're advocating to happen. There are reasons why people would want seperate INPUT, OUTPUT, and FORWARD policies. So we're not taking that capability out of the kernel. And by "auto-magically" making this happen transparently you are taking the capability away, which is why this idea won't fly either. For the record, the freeswan tools handle all of this stuff just fine. From davem@davemloft.net Fri Oct 29 00:15:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 00:15:39 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T7FXOs030426 for ; Fri, 29 Oct 2004 00:15:33 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CNQqZ-0006C4-00; Fri, 29 Oct 2004 00:06:51 -0700 Date: Fri, 29 Oct 2004 00:06:51 -0700 From: "David S. Miller" To: Ben Greear Cc: akpm@osdl.org, netdev@oss.sgi.com, mbm@alt.org Subject: Re: Fw: [Bugme-new] [Bug 3657] New: downed interfaces acting as aliases Message-Id: <20041029000651.6fd7360f.davem@davemloft.net> In-Reply-To: <4181ED02.1060501@candelatech.com> References: <20041028234649.2d4ed3b8.akpm@osdl.org> <20041028234502.203b42c3.davem@davemloft.net> <4181ED02.1060501@candelatech.com> X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11075 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev On Fri, 29 Oct 2004 00:10:58 -0700 Ben Greear wrote: > Why would you want this behaviour? If it's configured down, it would > seem that the user is trying to tell the system not to use it :) Because IP addresses are assosciated with the host, not a specific interface or link. That is the model that we've implemented since day one. According to the RFCs, this is one of several valid models. People hate it that when there's a decision of whether to reply to something or not, we do whatever we can to reply to packets we receive if we can find a way to do so. This approache increases the likelyhood that two hosts can communicate successfully. I need not remind people about how much people dislike our default ARP behavior :-) but it is done that way for the same reason. From herbert@gondor.apana.org.au Fri Oct 29 00:24:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 00:24:53 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T7OeGq002307 for ; Fri, 29 Oct 2004 00:24:41 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CNR7E-0000bg-00; Fri, 29 Oct 2004 17:24:04 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CNR73-0007X6-00; Fri, 29 Oct 2004 17:23:53 +1000 From: Herbert Xu To: a.kasparas@gmc.lt (Aidas Kasparas) Subject: Re: [Ipsec-tools-devel] ipv4/ipv6 forwarding check Cc: latten@austin.ibm.com, ipsec-tools-devel@lists.sourceforge.net, netdev@oss.sgi.com Organization: Core In-Reply-To: <4181EBC3.3020507@gmc.lt> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) Message-Id: Date: Fri, 29 Oct 2004 17:23:53 +1000 X-archive-position: 11076 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Aidas Kasparas wrote: > > Meanwhile, I would like to recomend to abstain from upgrading to > anything above 2.6.9. Doesn't sound like a good idea as that's a massive security hole. Racoon with a pre-2.6.9 kernel will allow source addresses to come through the IPsec tunnel even if the violate IPsec policies. -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From greearb@candelatech.com Fri Oct 29 00:29:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 00:29:16 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T7T7m0002687 for ; Fri, 29 Oct 2004 00:29:08 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i9T7aPLH009624; Fri, 29 Oct 2004 00:36:26 -0700 Message-ID: <4181F12F.7060400@candelatech.com> Date: Fri, 29 Oct 2004 00:28:47 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" CC: akpm@osdl.org, netdev@oss.sgi.com, mbm@alt.org Subject: Re: Fw: [Bugme-new] [Bug 3657] New: downed interfaces acting as aliases References: <20041028234649.2d4ed3b8.akpm@osdl.org> <20041028234502.203b42c3.davem@davemloft.net> <4181ED02.1060501@candelatech.com> <20041029000651.6fd7360f.davem@davemloft.net> In-Reply-To: <20041029000651.6fd7360f.davem@davemloft.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11077 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev David S. Miller wrote: > On Fri, 29 Oct 2004 00:10:58 -0700 > People hate it that when there's a decision of whether to > reply to something or not, we do whatever we can to reply > to packets we receive if we can find a way to do so. This > approache increases the likelyhood that two hosts can > communicate successfully. I need not remind people about > how much people dislike our default ARP behavior :-) but > it is done that way for the same reason. Note I was distictly kind enough not to bring it up either :) (I have already patched & hacked around that problem some years ago!) Since you finally accepted the arp fixup, maybe you'd at least let in a flag to change the default behaviour of downed interfaces too? Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From ak@suse.de Fri Oct 29 00:39:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 00:40:00 -0700 (PDT) Received: from Cantor.suse.de (cantor.suse.de [195.135.220.2]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T7dsLh003237 for ; Fri, 29 Oct 2004 00:39:55 -0700 Received: from hermes.suse.de (hermes-ext.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 DFAD0E8F786; Fri, 29 Oct 2004 09:39:32 +0200 (CEST) Date: Fri, 29 Oct 2004 09:39:27 +0200 From: Andi Kleen To: "David S. Miller" Cc: Ben Greear , akpm@osdl.org, netdev@oss.sgi.com, mbm@alt.org Subject: Re: Fw: [Bugme-new] [Bug 3657] New: downed interfaces acting as aliases Message-ID: <20041029073927.GB15301@wotan.suse.de> References: <20041028234649.2d4ed3b8.akpm@osdl.org> <20041028234502.203b42c3.davem@davemloft.net> <4181ED02.1060501@candelatech.com> <20041029000651.6fd7360f.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041029000651.6fd7360f.davem@davemloft.net> X-archive-position: 11078 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 > People hate it that when there's a decision of whether to > reply to something or not, we do whatever we can to reply > to packets we receive if we can find a way to do so. This > approache increases the likelyhood that two hosts can > communicate successfully. I bet it's actually only a very small minority that is complaining about this. The silent majority just sees a working network. -Andi From a.kasparas@gmc.lt Fri Oct 29 01:09:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 01:09:52 -0700 (PDT) Received: from sizifas.gmc.lt (esc.ortopedija.lt [213.190.36.10]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T89h4M004847 for ; Fri, 29 Oct 2004 01:09:44 -0700 Received: from [10.0.0.83] ([::ffff:10.0.0.83]) by sizifas.gmc.lt with esmtp; Fri, 29 Oct 2004 11:09:27 +0300 Message-ID: <4181FAB5.4010005@gmc.lt> Date: Fri, 29 Oct 2004 11:09:25 +0300 From: Aidas Kasparas User-Agent: Mozilla Thunderbird 0.8 (X11/20040918) X-Accept-Language: lt, en, ru, fr MIME-Version: 1.0 To: Herbert Xu CC: latten@austin.ibm.com, ipsec-tools-devel@lists.sourceforge.net, netdev@oss.sgi.com Subject: Re: [Ipsec-tools-devel] ipv4/ipv6 forwarding check References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11079 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: a.kasparas@gmc.lt Precedence: bulk X-list: netdev Herbert Xu wrote: > Aidas Kasparas wrote: > >> Meanwhile, I would like to recomend to abstain from upgrading to >>anything above 2.6.9. > > > Doesn't sound like a good idea as that's a massive security hole. > > Racoon with a pre-2.6.9 kernel will allow source addresses to come > through the IPsec tunnel even if the violate IPsec policies. Ok, my dear coleagues admins, decide for yourself. Facts are: If you upgrade, your system will not work. If you do not upgrade, and on host c.c.c.c you have policy a.a.a.a b.b.b.b any -P in esp/.../ where b.b.b.b is address different from any interface address of host with address c.c.c.c and 1) some party h.h.h.h will be able to spoof packet to look from a.a.a.a to b.b.b.b; 2) transport that packet to c.c.c.c 3) that packet will not be filtered out by rp_filter on c.c.c.c then kernel will pass that packet through to b.b.b.b, even if that packet is not protected by esp. It is possible to prevent that from happening by marking esp packets and later accepting for forwarding only marked packets from a.a.a.a to b.b.b.b using iptables. Yes, I have insisted in the past this is not necessary. I was wrong. I'm sorry. I did not knew about this kernel's feature. [Have I missed any other case?] Which way to choose for the short term -- decission is after you. -- Aidas Kasparas IT administrator GM Consult Group, UAB From tommy.christensen@tpack.net Fri Oct 29 01:29:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 01:29:55 -0700 (PDT) Received: from mail.tpack.net (ip18.tpack.net [213.173.228.18]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9T8Tmt0005440 for ; Fri, 29 Oct 2004 01:29:49 -0700 Received: (qmail 20803 invoked from network); 29 Oct 2004 08:29:27 -0000 Received: from cyan.cph.tpack.net (192.168.3.101) by 0 with SMTP; 29 Oct 2004 08:29:27 -0000 Subject: Re: [PATCH] 802.1Q VLAN From: Tommy Christensen To: Ben Greear Cc: "'netdev@oss.sgi.com'" , "Linux 802.1Q VLAN" , Francois Romieu , "David S. Miller" In-Reply-To: <41818D99.9020300@candelatech.com> References: <41797696.9070905@candelatech.com> <20041022214611.GA4948@electric-eye.fr.zoreil.com> <41798506.1030909@candelatech.com> <417D675F.3000909@candelatech.com> <4181838B.6040002@tpack.net> <41818D99.9020300@candelatech.com> Content-Type: text/plain Organization: Message-Id: <1099038566.1813.99.camel@cyan.cph.tpack.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.0 Date: 29 Oct 2004 10:29:27 +0200 Content-Transfer-Encoding: 7bit X-archive-position: 11080 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tommy.christensen@tpack.net Precedence: bulk X-list: netdev On Fri, 2004-10-29 at 02:23, Ben Greear wrote: > > o It is considered an error if a queue-less device returns anything but > > zero from its > > hard_start_xmit() function (see dev_queue_xmit()). > > This certainly was not clear to me. The comments in dev_queue_xmit are > wrong about the return value (failure cases can be > zero too). Are > there other errors or ommissions there? A return value > zero doesn't mean failure. It indicates congestion. > What sorts of things go wrong if you do return an error here when you don't > have a queue? It is interpreted as a tx failure rather than congestion. So it doesn't help the upper layers like you wanted it to. And it spews out an error message. > > > o So, lets add a tx queue to it. Sure, that would be nice. Now we can > > even do shaping > > and other fancy stuff. But then how do we manage netif_queue_stopped? > > Especially > > restarting the queue could be tricky. > > Right... it would probably be an O(N) thing to wake the queues for all virtual > devices on a physical device, and we certainly don't want to do that > often. Maybe if you only tried to wake the blocked queues (ie, kept a list > of just blocked queues), then that would be less painful on average, > but the worst-case is still bad. Yeah, we probably would need some sort of notification from the qdisc of the underlying device when it can accept packets again. > > o But couldn't we skip netif_stop_queue() and just return > > NETDEV_TX_BUSY when congested? > > No, that would make the qdisc system "busy-retry" untill it succeeds. > > BAD. > > > > o It is unsafe to pass a shared skb to dev_queue_xmit() unless you > > control all the > > references yourself. (It will likely be enqueued on a list.) > > Since we either free the duplicate copy, or pass it to the queue and forget > about it, this last point does not matter in the patch I submitted, right? Yes. This is the right way to do it. *Unless* the skb is already shared when you receive it (e.g. from pktgen). > > And specifically for this patch: > > > > o The skb could be freed (replaced) in __vlan_put_tag(), so you cannot > > tell the caller > > to hang on to it. > > Yep, that is quite nasty...I had not noticed. If I kept a copy of the original > pointer (using skb_get() to bump the reference) passed in, > that would fix this particular problem? Yes, I would think so. > > o If rv is NET_XMIT_CN (and probably also rv < 0) you have to return 0, > > in order to > > make the caller forget about this skb. > > Is there a complete list of what return codes are possible? Maybe we could make > it return an enum instead of an integer so we can more easily track these > sorts of things down?? They are listed in netdevice.h - NET_XMIT_SUCCESS etc., and the usual negative errno's. > Thanks for noticing! > Ben -Tommy From mic@maxipes.logix.cz Fri Oct 29 02:27:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 02:28:07 -0700 (PDT) Received: from maxipes.logix.cz (maxipes.logix.cz [81.0.234.97]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9T9RtfZ006976 for ; Fri, 29 Oct 2004 02:27:56 -0700 Received: by maxipes.logix.cz (Postfix, from userid 500) id 9EAFA1F9E0; Fri, 29 Oct 2004 11:27:38 +0200 (CEST) Date: Fri, 29 Oct 2004 11:27:38 +0200 (CEST) From: Michal Ludvig To: Aidas Kasparas Cc: Joy Latten , ipsec-tools-devel@lists.sourceforge.net, netdev@oss.sgi.com Subject: Re: [Ipsec-tools-devel] ipv4/ipv6 forwarding check In-Reply-To: <4181EBC3.3020507@gmc.lt> Message-ID: References: <200410300506.i9U56Yse005815@faith.austin.ibm.com> <4181EBC3.3020507@gmc.lt> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 11081 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: michal@logix.cz Precedence: bulk X-list: netdev On Fri, 29 Oct 2004, Aidas Kasparas wrote: > 1) push kernel developers to have rfc2401 semantics in kernel; > 1a) have pfkey kernel part transform rfc2401 semantics into kernel > semantics; > 2) have libpfkey generate extra policies transparently to the user; > 3) have tools (setkey and racoon) generate extra policies > transparently to the user; > 4) extend setkey's syntax to make explicit forward policy management > possible and write docs for all the admins to change policies. At least we must provide #4 - now it doesn't work at all, with explicit fwd policies things could be set up in most cases except for policy autogeneration in racoon. I hope to do the setkey part today. Michal Ludvig -- * A mouse is a device used to point at the xterm you want to type in. * Personal homepage - http://www.logix.cz/michal From penberg@cs.helsinki.fi Fri Oct 29 03:03:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 03:03:47 -0700 (PDT) Received: from mail.cs.helsinki.fi (courier.cs.helsinki.fi [128.214.9.1]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TA36W8010496 for ; Fri, 29 Oct 2004 03:03:40 -0700 Received: from cs181096176.pp.htv.fi (cs181096176.pp.htv.fi [82.181.96.176]) (AUTH: LOGIN penberg, SSL: TLSv1/SSLv3,128bits,RC4-MD5) by mail.cs.helsinki.fi with esmtp; Fri, 29 Oct 2004 13:03:23 +0300 id 00073CE4.4182156B.0000417C Subject: [PATCH 1/3] net: generic netdev_ioaddr From: Pekka Enberg To: davem@davemloft.net Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org In-Reply-To: <1099044244.9566.0.camel@localhost> References: <1099044244.9566.0.camel@localhost> Date: Fri, 29 Oct 2004 13:04:38 +0300 Message-Id: <1099044278.9566.2.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Mailer: Evolution 2.0.2 X-archive-position: 11083 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: penberg@cs.helsinki.fi Precedence: bulk X-list: netdev This patch introduces a generic netdev_ioaddr in include/linux/netdevice.h. It is pulled from driver/net/natsemi.c. Signed-off-by: Pekka Enberg --- netdevice.h | 5 +++++ 1 files changed, 5 insertions(+) Index: 2.6.10-rc1-mm1/include/linux/netdevice.h =================================================================== --- 2.6.10-rc1-mm1.orig/include/linux/netdevice.h 2004-10-29 11:07:56.000000000 +0300 +++ 2.6.10-rc1-mm1/include/linux/netdevice.h 2004-10-29 11:37:56.000000000 +0300 @@ -500,6 +500,11 @@ & ~NETDEV_ALIGN_CONST); } +static inline void __iomem *netdev_ioaddr(struct net_device *dev) +{ + return (void __iomem *) dev->base_addr; +} + #define SET_MODULE_OWNER(dev) do { } while (0) /* Set the sysfs physical device reference for the network logical device * if set prior to registration will cause a symlink during initialization. From penberg@cs.helsinki.fi Fri Oct 29 03:03:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 03:03:12 -0700 (PDT) Received: from mail.cs.helsinki.fi (courier.cs.helsinki.fi [128.214.9.1]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TA36W6010496 for ; Fri, 29 Oct 2004 03:03:07 -0700 Received: from cs181096176.pp.htv.fi (cs181096176.pp.htv.fi [82.181.96.176]) (AUTH: LOGIN penberg, SSL: TLSv1/SSLv3,128bits,RC4-MD5) by mail.cs.helsinki.fi with esmtp; Fri, 29 Oct 2004 13:02:49 +0300 id 00073D04.41821549.00003F3F Subject: [RFC][PATCH 0/3] net: generic netdev_ioaddr From: Pekka Enberg To: davem@davemloft.net Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Date: Fri, 29 Oct 2004 13:04:04 +0300 Message-Id: <1099044244.9566.0.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Mailer: Evolution 2.0.2 X-archive-position: 11082 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: penberg@cs.helsinki.fi Precedence: bulk X-list: netdev Hi, This patch introduces a generic netdev_ioaddr and converts natsemi and 8139too drivers to use it. With the recent __iomem annotations, the network drivers need to either invent this wrapper (like natsemi has done) or duplicate the IO base address in their private data (similar to 8139too). Therefore, lets make netdev_ioaddr generic before it is all over the place. Pekka From penberg@cs.helsinki.fi Fri Oct 29 03:04:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 03:04:26 -0700 (PDT) Received: from mail.cs.helsinki.fi (courier.cs.helsinki.fi [128.214.9.1]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TA36WA010496 for ; Fri, 29 Oct 2004 03:04:18 -0700 Received: from cs181096176.pp.htv.fi (cs181096176.pp.htv.fi [82.181.96.176]) (AUTH: LOGIN penberg, SSL: TLSv1/SSLv3,128bits,RC4-MD5) by mail.cs.helsinki.fi with esmtp; Fri, 29 Oct 2004 13:04:01 +0300 id 00073D04.41821591.0000486A Subject: [PATCH 2/3] net: use netdev_ioaddr in natsemi From: Pekka Enberg To: davem@davemloft.net Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org In-Reply-To: <1099044278.9566.2.camel@localhost> References: <1099044244.9566.0.camel@localhost> <1099044278.9566.2.camel@localhost> Date: Fri, 29 Oct 2004 13:05:15 +0300 Message-Id: <1099044315.9566.4.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Mailer: Evolution 2.0.2 X-archive-position: 11084 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: penberg@cs.helsinki.fi Precedence: bulk X-list: netdev This patch converts natsemi driver to use netdev_ioaddr. Signed-off-by: Pekka Enberg --- natsemi.c | 75 ++++++++++++++++++++++++++++---------------------------------- 1 files changed, 35 insertions(+), 40 deletions(-) Index: 2.6.10-rc1-mm1/drivers/net/natsemi.c =================================================================== --- 2.6.10-rc1-mm1.orig/drivers/net/natsemi.c 2004-10-29 11:07:52.000000000 +0300 +++ 2.6.10-rc1-mm1/drivers/net/natsemi.c 2004-10-29 11:38:30.000000000 +0300 @@ -770,15 +770,10 @@ static int netdev_get_eeprom(struct net_device *dev, u8 *buf); static struct ethtool_ops ethtool_ops; -static inline void __iomem *ns_ioaddr(struct net_device *dev) -{ - return (void __iomem *) dev->base_addr; -} - static void move_int_phy(struct net_device *dev, int addr) { struct netdev_private *np = netdev_priv(dev); - void __iomem *ioaddr = ns_ioaddr(dev); + void __iomem *ioaddr = netdev_ioaddr(dev); int target = 31; /* @@ -1073,7 +1068,7 @@ static int mii_getbit (struct net_device *dev) { int data; - void __iomem *ioaddr = ns_ioaddr(dev); + void __iomem *ioaddr = netdev_ioaddr(dev); writel(MII_ShiftClk, ioaddr + EECtrl); data = readl(ioaddr + EECtrl); @@ -1085,7 +1080,7 @@ static void mii_send_bits (struct net_device *dev, u32 data, int len) { u32 i; - void __iomem *ioaddr = ns_ioaddr(dev); + void __iomem *ioaddr = netdev_ioaddr(dev); for (i = (1 << (len-1)); i; i >>= 1) { @@ -1141,7 +1136,7 @@ static int mdio_read(struct net_device *dev, int reg) { struct netdev_private *np = netdev_priv(dev); - void __iomem *ioaddr = ns_ioaddr(dev); + void __iomem *ioaddr = netdev_ioaddr(dev); /* The 83815 series has two ports: * - an internal transceiver @@ -1156,7 +1151,7 @@ static void mdio_write(struct net_device *dev, int reg, u16 data) { struct netdev_private *np = netdev_priv(dev); - void __iomem *ioaddr = ns_ioaddr(dev); + void __iomem *ioaddr = netdev_ioaddr(dev); /* The 83815 series has an internal transceiver; handle separately */ if (dev->if_port == PORT_TP) @@ -1168,7 +1163,7 @@ static void init_phy_fixup(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - void __iomem *ioaddr = ns_ioaddr(dev); + void __iomem *ioaddr = netdev_ioaddr(dev); int i; u32 cfg; u16 tmp; @@ -1280,7 +1275,7 @@ static int switch_port_external(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - void __iomem *ioaddr = ns_ioaddr(dev); + void __iomem *ioaddr = netdev_ioaddr(dev); u32 cfg; cfg = readl(ioaddr + ChipConfig); @@ -1313,7 +1308,7 @@ static int switch_port_internal(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - void __iomem *ioaddr = ns_ioaddr(dev); + void __iomem *ioaddr = netdev_ioaddr(dev); int i; u32 cfg; u16 bmcr; @@ -1414,7 +1409,7 @@ u16 pmatch[3]; u16 sopass[3]; struct netdev_private *np = netdev_priv(dev); - void __iomem *ioaddr = ns_ioaddr(dev); + void __iomem *ioaddr = netdev_ioaddr(dev); /* * Resetting the chip causes some registers to be lost. @@ -1485,7 +1480,7 @@ static void natsemi_reload_eeprom(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - void __iomem *ioaddr = ns_ioaddr(dev); + void __iomem *ioaddr = netdev_ioaddr(dev); int i; writel(EepromReload, ioaddr + PCIBusCfg); @@ -1505,7 +1500,7 @@ static void natsemi_stop_rxtx(struct net_device *dev) { - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = netdev_ioaddr(dev); struct netdev_private *np = netdev_priv(dev); int i; @@ -1527,7 +1522,7 @@ static int netdev_open(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = netdev_ioaddr(dev); int i; /* Reset the chip, just in case. */ @@ -1576,7 +1571,7 @@ static void do_cable_magic(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - void __iomem *ioaddr = ns_ioaddr(dev); + void __iomem *ioaddr = netdev_ioaddr(dev); if (dev->if_port != PORT_TP) return; @@ -1621,7 +1616,7 @@ { u16 data; struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = netdev_ioaddr(dev); if (dev->if_port != PORT_TP) return; @@ -1640,7 +1635,7 @@ static void check_link(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = netdev_ioaddr(dev); int duplex; u16 bmsr; @@ -1701,7 +1696,7 @@ static void init_registers(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = netdev_ioaddr(dev); init_phy_fixup(dev); @@ -1780,7 +1775,7 @@ { struct net_device *dev = (struct net_device *)data; struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = netdev_ioaddr(dev); int next_tick = 5*HZ; if (netif_msg_timer(np)) { @@ -1868,7 +1863,7 @@ static void tx_timeout(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = netdev_ioaddr(dev); disable_irq(dev->irq); spin_lock_irq(&np->lock); @@ -2068,7 +2063,7 @@ static int start_tx(struct sk_buff *skb, struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = netdev_ioaddr(dev); unsigned entry; /* Note: Ordering is important here, set the field with the @@ -2162,7 +2157,7 @@ { struct net_device *dev = dev_instance; struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = netdev_ioaddr(dev); int boguscnt = max_interrupt_work; unsigned int handled = 0; @@ -2224,7 +2219,7 @@ int boguscnt = np->dirty_rx + RX_RING_SIZE - np->cur_rx; s32 desc_status = le32_to_cpu(np->rx_head_desc->cmd_status); unsigned int buflen = np->rx_buf_sz; - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = netdev_ioaddr(dev); /* If the driver owns the next entry it's a new packet. Send it up. */ while (desc_status < 0) { /* e.g. & DescOwn */ @@ -2312,7 +2307,7 @@ static void netdev_error(struct net_device *dev, int intr_status) { struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = netdev_ioaddr(dev); spin_lock(&np->lock); if (intr_status & LinkChange) { @@ -2371,7 +2366,7 @@ static void __get_stats(struct net_device *dev) { - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = netdev_ioaddr(dev); struct netdev_private *np = netdev_priv(dev); /* The chip only need report frame silently dropped. */ @@ -2404,7 +2399,7 @@ #define HASH_TABLE 0x200 static void __set_rx_mode(struct net_device *dev) { - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = netdev_ioaddr(dev); struct netdev_private *np = netdev_priv(dev); u8 mc_filter[64]; /* Multicast hash filter */ u32 rx_mode; @@ -2450,7 +2445,7 @@ /* synchronized against open : rtnl_lock() held by caller */ if (netif_running(dev)) { struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = netdev_ioaddr(dev); disable_irq(dev->irq); spin_lock(&np->lock); @@ -2612,7 +2607,7 @@ static int netdev_set_wol(struct net_device *dev, u32 newval) { struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = netdev_ioaddr(dev); u32 data = readl(ioaddr + WOLCmd) & ~WakeOptsSummary; /* translate to bitmasks this chip understands */ @@ -2642,7 +2637,7 @@ static int netdev_get_wol(struct net_device *dev, u32 *supported, u32 *cur) { struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = netdev_ioaddr(dev); u32 regval = readl(ioaddr + WOLCmd); *supported = (WAKE_PHY | WAKE_UCAST | WAKE_MCAST | WAKE_BCAST @@ -2678,7 +2673,7 @@ static int netdev_set_sopass(struct net_device *dev, u8 *newval) { struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = netdev_ioaddr(dev); u16 *sval = (u16 *)newval; u32 addr; @@ -2710,7 +2705,7 @@ static int netdev_get_sopass(struct net_device *dev, u8 *data) { struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = netdev_ioaddr(dev); u16 *sval = (u16 *)data; u32 addr; @@ -2894,7 +2889,7 @@ int j; u32 rfcr; u32 *rbuf = (u32 *)buf; - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = netdev_ioaddr(dev); /* read non-mii page 0 of registers */ for (i = 0; i < NATSEMI_PG0_NREGS/2; i++) { @@ -2944,7 +2939,7 @@ { int i; u16 *ebuf = (u16 *)buf; - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = netdev_ioaddr(dev); /* eeprom_read reads 16 bits, and indexes by 16 bits */ for (i = 0; i < NATSEMI_EEPROM_SIZE/2; i++) { @@ -3016,7 +3011,7 @@ static void enable_wol_mode(struct net_device *dev, int enable_intr) { - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = netdev_ioaddr(dev); struct netdev_private *np = netdev_priv(dev); if (netif_msg_wol(np)) @@ -3049,7 +3044,7 @@ static int netdev_close(struct net_device *dev) { - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = netdev_ioaddr(dev); struct netdev_private *np = netdev_priv(dev); if (netif_msg_ifdown(np)) @@ -3126,7 +3121,7 @@ static void __devexit natsemi_remove1 (struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = netdev_ioaddr(dev); unregister_netdev (dev); pci_release_regions (pdev); @@ -3164,7 +3159,7 @@ { struct net_device *dev = pci_get_drvdata (pdev); struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = netdev_ioaddr(dev); rtnl_lock(); if (netif_running (dev)) { From penberg@cs.helsinki.fi Fri Oct 29 03:04:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 03:05:09 -0700 (PDT) Received: from mail.cs.helsinki.fi (courier.cs.helsinki.fi [128.214.9.1]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TA36WC010496 for ; Fri, 29 Oct 2004 03:04:58 -0700 Received: from cs181096176.pp.htv.fi (cs181096176.pp.htv.fi [82.181.96.176]) (AUTH: LOGIN penberg, SSL: TLSv1/SSLv3,128bits,RC4-MD5) by mail.cs.helsinki.fi with esmtp; Fri, 29 Oct 2004 13:04:41 +0300 id 00073CE5.418215B9.00004C27 Subject: [PATCH 3/3] net: use netdev_ioaddr in 8139too From: Pekka Enberg To: davem@davemloft.net Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org In-Reply-To: <1099044315.9566.4.camel@localhost> References: <1099044244.9566.0.camel@localhost> <1099044278.9566.2.camel@localhost> <1099044315.9566.4.camel@localhost> Date: Fri, 29 Oct 2004 13:05:55 +0300 Message-Id: <1099044355.9566.6.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Mailer: Evolution 2.0.2 X-archive-position: 11085 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: penberg@cs.helsinki.fi Precedence: bulk X-list: netdev This patch converts 8139too driver to use netdev_ioaddr. Not tested as I don't have access to the hardware right now. Compiles and passes sparse checks. Signed-off-by: Pekka Enberg --- 8139too.c | 101 +++++++++++++++++++++++++++++++------------------------------- 1 files changed, 52 insertions(+), 49 deletions(-) Index: 2.6.10-rc1-mm1/drivers/net/8139too.c =================================================================== --- 2.6.10-rc1-mm1.orig/drivers/net/8139too.c 2004-10-29 12:02:27.132401800 +0300 +++ 2.6.10-rc1-mm1/drivers/net/8139too.c 2004-10-29 12:18:14.406394264 +0300 @@ -570,7 +570,6 @@ }; struct rtl8139_private { - void *mmio_addr; int drv_flags; struct pci_dev *pci_dev; u32 msg_enable; @@ -614,7 +613,7 @@ MODULE_PARM_DESC (media, "8139too: Bits 4+9: force full duplex, bit 5: 100Mbps"); MODULE_PARM_DESC (full_duplex, "8139too: Force full duplex for board(s) (1)"); -static int read_eeprom (void *ioaddr, int location, int addr_len); +static int read_eeprom (void __iomem *ioaddr, int location, int addr_len); static int rtl8139_open (struct net_device *dev); static int mdio_read (struct net_device *dev, int phy_id, int location); static void mdio_write (struct net_device *dev, int phy_id, int location, @@ -731,6 +730,16 @@ static const unsigned int rtl8139_tx_config = TxIFG96 | (TX_DMA_BURST << TxDMAShift) | (TX_RETRY << TxRetryShift); +static void rtl8139_cleanup_iomem (struct net_device *dev) +{ +#ifndef USE_IO_OPS + void __iomem *ioaddr = netdev_ioaddr(dev); + + if (ioaddr) + iounmap(ioaddr); +#endif /* !USE_IO_OPS */ +} + static void __rtl8139_cleanup_dev (struct net_device *dev) { struct rtl8139_private *tp = netdev_priv(dev); @@ -740,10 +749,7 @@ assert (tp->pci_dev != NULL); pdev = tp->pci_dev; -#ifndef USE_IO_OPS - if (tp->mmio_addr) - iounmap (tp->mmio_addr); -#endif /* !USE_IO_OPS */ + rtl8139_cleanup_iomem(dev); /* it's ok to call this even if we have no regions to free */ pci_release_regions (pdev); @@ -754,7 +760,7 @@ } -static void rtl8139_chip_reset (void *ioaddr) +static void rtl8139_chip_reset (void __iomem *ioaddr) { int i; @@ -774,7 +780,7 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev, struct net_device **dev_out) { - void *ioaddr; + void __iomem *ioaddr; struct net_device *dev; struct rtl8139_private *tp; u8 tmp8; @@ -855,9 +861,8 @@ pci_set_master (pdev); #ifdef USE_IO_OPS - ioaddr = (void *) pio_start; + ioaddr = (void __iomem *) pio_start; dev->base_addr = pio_start; - tp->mmio_addr = ioaddr; tp->regs_len = pio_len; #else /* ioremap MMIO region */ @@ -867,8 +872,7 @@ rc = -EIO; goto err_out; } - dev->base_addr = (long) ioaddr; - tp->mmio_addr = ioaddr; + dev->base_addr = (__force long) ioaddr; tp->regs_len = mmio_len; #endif /* USE_IO_OPS */ @@ -945,7 +949,7 @@ struct net_device *dev = NULL; struct rtl8139_private *tp; int i, addr_len, option; - void *ioaddr; + void __iomem *ioaddr; static int board_idx = -1; u8 pci_rev; @@ -981,7 +985,7 @@ assert (dev != NULL); tp = netdev_priv(dev); - ioaddr = tp->mmio_addr; + ioaddr = netdev_ioaddr(dev); assert (ioaddr != NULL); addr_len = read_eeprom (ioaddr, 0, 8) == 0x8129 ? 8 : 6; @@ -1018,7 +1022,6 @@ /* note: tp->chipset set in rtl8139_init_board */ tp->drv_flags = board_info[ent->driver_data].hw_flags; - tp->mmio_addr = ioaddr; tp->msg_enable = (debug < 0 ? RTL8139_DEF_MSG_ENABLE : ((1 << debug) - 1)); spin_lock_init (&tp->lock); @@ -1150,11 +1153,11 @@ #define EE_READ_CMD (6) #define EE_ERASE_CMD (7) -static int __devinit read_eeprom (void *ioaddr, int location, int addr_len) +static int __devinit read_eeprom (void __iomem *ioaddr, int location, int addr_len) { int i; unsigned retval = 0; - void *ee_addr = ioaddr + Cfg9346; + void __iomem * ee_addr = ioaddr + Cfg9346; int read_cmd = location | (EE_READ_CMD << addr_len); writeb (EE_ENB & ~EE_CS, ee_addr); @@ -1219,7 +1222,7 @@ #ifdef CONFIG_8139TOO_8129 /* Syncronize the MII management interface by shifting 32 one bits out. */ -static void mdio_sync (void *mdio_addr) +static void mdio_sync (void __iomem *mdio_addr) { int i; @@ -1234,17 +1237,17 @@ static int mdio_read (struct net_device *dev, int phy_id, int location) { - struct rtl8139_private *tp = netdev_priv(dev); + void __iomem *ioaddr = netdev_ioaddr(dev); int retval = 0; #ifdef CONFIG_8139TOO_8129 - void *mdio_addr = tp->mmio_addr + Config4; + void __iomem * mdio_addr = ioaddr + Config4; int mii_cmd = (0xf6 << 10) | (phy_id << 5) | location; int i; #endif if (phy_id > 31) { /* Really a 8139. Use internal registers. */ return location < 8 && mii_2_8139_map[location] ? - readw (tp->mmio_addr + mii_2_8139_map[location]) : 0; + readw (ioaddr + mii_2_8139_map[location]) : 0; } #ifdef CONFIG_8139TOO_8129 @@ -1276,15 +1279,14 @@ static void mdio_write (struct net_device *dev, int phy_id, int location, int value) { - struct rtl8139_private *tp = netdev_priv(dev); #ifdef CONFIG_8139TOO_8129 - void *mdio_addr = tp->mmio_addr + Config4; + void __iomem *mdio_addr = netdev_ioaddr(dev) + Config4; int mii_cmd = (0x5002 << 16) | (phy_id << 23) | (location << 18) | value; int i; #endif if (phy_id > 31) { /* Really a 8139. Use internal registers. */ - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = netdev_ioaddr(dev); if (location == 0) { RTL_W8 (Cfg9346, Cfg9346_Unlock); RTL_W16 (BasicModeCtrl, value); @@ -1321,7 +1323,7 @@ { struct rtl8139_private *tp = netdev_priv(dev); int retval; - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = netdev_ioaddr(dev); retval = request_irq (dev->irq, rtl8139_interrupt, SA_SHIRQ, dev->name, dev); if (retval) @@ -1378,7 +1380,7 @@ static void rtl8139_hw_start (struct net_device *dev) { struct rtl8139_private *tp = netdev_priv(dev); - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = netdev_ioaddr(dev); u32 i; u8 tmp; @@ -1480,7 +1482,7 @@ struct rtl8139_private *tp) { int linkcase; - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = netdev_ioaddr(dev); /* This is a complicated state machine to configure the "twister" for impedance/echos based on the cable length. @@ -1564,7 +1566,7 @@ static inline void rtl8139_thread_iter (struct net_device *dev, struct rtl8139_private *tp, - void *ioaddr) + void __iomem *ioaddr) { int mii_lpa; @@ -1634,7 +1636,7 @@ break; rtnl_lock (); - rtl8139_thread_iter (dev, tp, tp->mmio_addr); + rtl8139_thread_iter (dev, tp, netdev_ioaddr(dev)); rtnl_unlock (); } @@ -1672,7 +1674,7 @@ static void rtl8139_tx_timeout (struct net_device *dev) { struct rtl8139_private *tp = netdev_priv(dev); - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = netdev_ioaddr(dev); int i; u8 tmp8; unsigned long flags; @@ -1717,7 +1719,7 @@ static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev) { struct rtl8139_private *tp = netdev_priv(dev); - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = netdev_ioaddr(dev); unsigned int entry; unsigned int len = skb->len; @@ -1759,7 +1761,7 @@ static void rtl8139_tx_interrupt (struct net_device *dev, struct rtl8139_private *tp, - void *ioaddr) + void __iomem *ioaddr) { unsigned long dirty_tx, tx_left; @@ -1829,7 +1831,7 @@ /* TODO: clean this up! Rx reset need not be this intensive */ static void rtl8139_rx_err (u32 rx_status, struct net_device *dev, - struct rtl8139_private *tp, void *ioaddr) + struct rtl8139_private *tp, void __iomem *ioaddr) { u8 tmp8; #ifdef CONFIG_8139_OLD_RX_RESET @@ -1924,9 +1926,10 @@ } #endif -static void rtl8139_isr_ack(struct rtl8139_private *tp) +static void rtl8139_isr_ack(struct net_device *dev) { - void *ioaddr = tp->mmio_addr; + struct rtl8139_private *tp = netdev_priv(dev); + void __iomem *ioaddr = netdev_ioaddr(dev); u16 status; status = RTL_R16 (IntrStatus) & RxAckBits; @@ -1945,7 +1948,7 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp, int budget) { - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = netdev_ioaddr(dev); int received = 0; unsigned char *rx_ring = tp->rx_ring; unsigned int cur_rx = tp->cur_rx; @@ -2054,11 +2057,11 @@ cur_rx = (cur_rx + rx_size + 4 + 3) & ~3; RTL_W16 (RxBufPtr, (u16) (cur_rx - 16)); - rtl8139_isr_ack(tp); + rtl8139_isr_ack(dev); } if (unlikely(!received || rx_size == 0xfff0)) - rtl8139_isr_ack(tp); + rtl8139_isr_ack(dev); #if RTL8139_DEBUG > 1 DPRINTK ("%s: Done rtl8139_rx(), current %4.4x BufAddr %4.4x," @@ -2083,7 +2086,7 @@ static void rtl8139_weird_interrupt (struct net_device *dev, struct rtl8139_private *tp, - void *ioaddr, + void __iomem *ioaddr, int status, int link_changed) { DPRINTK ("%s: Abnormal interrupt, status %8.8x.\n", @@ -2123,7 +2126,7 @@ static int rtl8139_poll(struct net_device *dev, int *budget) { struct rtl8139_private *tp = netdev_priv(dev); - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = netdev_ioaddr(dev); int orig_budget = min(*budget, dev->quota); int done = 1; @@ -2159,9 +2162,9 @@ static irqreturn_t rtl8139_interrupt (int irq, void *dev_instance, struct pt_regs *regs) { - struct net_device *dev = (struct net_device *) dev_instance; + struct net_device *dev = dev_instance; struct rtl8139_private *tp = netdev_priv(dev); - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = netdev_ioaddr(dev); u16 status, ackstat; int link_changed = 0; /* avoid bogus "uninit" warning */ int handled = 0; @@ -2237,7 +2240,7 @@ static int rtl8139_close (struct net_device *dev) { struct rtl8139_private *tp = netdev_priv(dev); - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = netdev_ioaddr(dev); int ret = 0; unsigned long flags; @@ -2300,7 +2303,7 @@ static void rtl8139_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) { struct rtl8139_private *np = netdev_priv(dev); - void *ioaddr = np->mmio_addr; + void __iomem *ioaddr = netdev_ioaddr(dev); spin_lock_irq(&np->lock); if (rtl_chip_info[np->chipset].flags & HasLWake) { @@ -2334,7 +2337,7 @@ static int rtl8139_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) { struct rtl8139_private *np = netdev_priv(dev); - void *ioaddr = np->mmio_addr; + void __iomem *ioaddr = netdev_ioaddr(dev); u32 support; u8 cfg3, cfg5; @@ -2441,7 +2444,7 @@ regs->version = RTL_REGS_VER; spin_lock_irq(&np->lock); - memcpy_fromio(regbuf, np->mmio_addr, regs->len); + memcpy_fromio(regbuf, netdev_ioaddr(dev), regs->len); spin_unlock_irq(&np->lock); } #endif /* CONFIG_8139TOO_MMIO */ @@ -2502,7 +2505,7 @@ static struct net_device_stats *rtl8139_get_stats (struct net_device *dev) { struct rtl8139_private *tp = netdev_priv(dev); - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = netdev_ioaddr(dev); unsigned long flags; if (netif_running(dev)) { @@ -2521,7 +2524,7 @@ static void __set_rx_mode (struct net_device *dev) { struct rtl8139_private *tp = netdev_priv(dev); - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = netdev_ioaddr(dev); u32 mc_filter[2]; /* Multicast hash filter */ int i, rx_mode; u32 tmp; @@ -2582,7 +2585,7 @@ { struct net_device *dev = pci_get_drvdata (pdev); struct rtl8139_private *tp = netdev_priv(dev); - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = netdev_ioaddr(dev); unsigned long flags; pci_save_state (pdev); From tgraf@suug.ch Fri Oct 29 03:23:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 03:23:31 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TANOca012283 for ; Fri, 29 Oct 2004 03:23:25 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 5F62182; Fri, 29 Oct 2004 12:22:45 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 808541C0E9; Fri, 29 Oct 2004 12:23:27 +0200 (CEST) Date: Fri, 29 Oct 2004 12:23:27 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [RESEND 1/6] PKT_SCHED: Add generic classifier routines Message-ID: <20041029102327.GG12289@postel.suug.ch> References: <20041029002113.GY12289@postel.suug.ch> <20041029002229.GZ12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041029002229.GZ12289@postel.suug.ch> X-archive-position: 11086 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev CONFIG_NET_CLS_IND was dependent on CONFIG_NET_CLS_ACT in cls_fw.c which is not correct according to Kconfig and wouldn't make sense. This is a revised patch which has this dependency removed. Adds generic routines used by classifier to: - bind/unbind to classes - configure action/police/indev - dump action/police Signed-off-by: Thomas Graf --- linux-2.6.10-rc1-bk7.orig/include/net/pkt_cls.h 2004-10-28 22:03:20.000000000 +0200 +++ linux-2.6.10-rc1-bk7/include/net/pkt_cls.h 2004-10-29 12:11:54.000000000 +0200 @@ -3,6 +3,7 @@ #include #include +#include /* Basic packet classifier frontend definitions. */ @@ -41,4 +42,189 @@ return old_cl; } +static inline void +tcf_bind_filter(struct tcf_proto *tp, struct tcf_result *r, unsigned long base) +{ + unsigned long cl; + + cl = tp->q->ops->cl_ops->bind_tcf(tp->q, base, r->classid); + cl = cls_set_class(tp, &r->class, cl); + if (cl) + tp->q->ops->cl_ops->unbind_tcf(tp->q, cl); +} + +static inline void +tcf_unbind_filter(struct tcf_proto *tp, struct tcf_result *r) +{ + unsigned long cl; + + if ((cl = __cls_set_class(&r->class, 0)) != 0) + tp->q->ops->cl_ops->unbind_tcf(tp->q, cl); +} + +#ifdef CONFIG_NET_CLS_ACT +static inline int +tcf_change_act_police(struct tcf_proto *tp, struct tc_action **action, + struct rtattr *act_police_tlv, struct rtattr *rate_tlv) +{ + int ret; + struct tc_action *act; + + act = kmalloc(sizeof(*act), GFP_KERNEL); + if (NULL == act) + return -ENOMEM; + memset(act, 0, sizeof(*act)); + + ret = tcf_action_init_1(act_police_tlv, rate_tlv, act, "police", + TCA_ACT_NOREPLACE, TCA_ACT_BIND); + if (ret < 0) { + tcf_action_destroy(act, TCA_ACT_UNBIND); + return ret; + } + + act->type = TCA_OLD_COMPAT; + + if (*action) { + tcf_tree_lock(tp); + act = xchg(action, act); + tcf_tree_unlock(tp); + + tcf_action_destroy(act, TCA_ACT_UNBIND); + } else + *action = act; + + return 0; +} + +static inline int +tcf_change_act(struct tcf_proto *tp, struct tc_action **action, + struct rtattr *act_tlv, struct rtattr *rate_tlv) +{ + int ret; + struct tc_action *act; + + act = kmalloc(sizeof(*act), GFP_KERNEL); + if (NULL == act) + return -ENOMEM; + memset(act, 0, sizeof(*act)); + + ret = tcf_action_init(act_tlv, rate_tlv, act, NULL, + TCA_ACT_NOREPLACE, TCA_ACT_BIND); + if (ret < 0) { + tcf_action_destroy(act, TCA_ACT_UNBIND); + return ret; + } + + if (*action) { + tcf_tree_lock(tp); + act = xchg(action, act); + tcf_tree_unlock(tp); + + tcf_action_destroy(act, TCA_ACT_UNBIND); + } else + *action = act; + + return 0; +} + +static inline int +tcf_dump_act(struct sk_buff *skb, struct tc_action *action, + int act_type, int compat_type) +{ + /* + * again for backward compatible mode - we want + * to work with both old and new modes of entering + * tc data even if iproute2 was newer - jhs + */ + if (action) { + struct rtattr * p_rta = (struct rtattr*) skb->tail; + + if (action->type != TCA_OLD_COMPAT) { + RTA_PUT(skb, act_type, 0, NULL); + if (tcf_action_dump(skb, action, 0, 0) < 0) + goto rtattr_failure; + } else { + RTA_PUT(skb, compat_type, 0, NULL); + if (tcf_action_dump_old(skb, action, 0, 0) < 0) + goto rtattr_failure; + } + + p_rta->rta_len = skb->tail - (u8*)p_rta; + } + return 0; + +rtattr_failure: + return -1; +} +#endif /* CONFIG_NET_CLS_ACT */ + +#ifdef CONFIG_NET_CLS_IND +static inline int +tcf_change_indev(struct tcf_proto *tp, char *indev, struct rtattr *indev_tlv) +{ + if (RTA_PAYLOAD(indev_tlv) >= IFNAMSIZ) { + printk("cls: bad indev name %s\n", (char *) RTA_DATA(indev_tlv)); + return -EINVAL; + } + + memset(indev, 0, IFNAMSIZ); + sprintf(indev, "%s", (char *) RTA_DATA(indev_tlv)); + + return 0; +} + +static inline int +tcf_match_indev(struct sk_buff *skb, char *indev) +{ + if (0 != indev[0]) { + if (NULL == skb->input_dev) + return 0; + else if (0 != strcmp(indev, skb->input_dev->name)) + return 0; + } + + return 1; +} +#endif /* CONFIG_NET_CLS_IND */ + +#ifdef CONFIG_NET_CLS_POLICE +static inline int +tcf_change_police(struct tcf_proto *tp, struct tcf_police **police, + struct rtattr *police_tlv, struct rtattr *rate_tlv) +{ + struct tcf_police *p = tcf_police_locate(police_tlv, rate_tlv); + + if (*police) { + tcf_tree_lock(tp); + p = xchg(police, p); + tcf_tree_unlock(tp); + + tcf_police_release(p, TCA_ACT_UNBIND); + } else + *police = p; + + return 0; +} + +static inline int +tcf_dump_police(struct sk_buff *skb, struct tcf_police *police, + int police_type) +{ + if (police) { + struct rtattr * p_rta = (struct rtattr*) skb->tail; + + RTA_PUT(skb, police_type, 0, NULL); + + if (tcf_police_dump(skb, police) < 0) + goto rtattr_failure; + + p_rta->rta_len = skb->tail - (u8*)p_rta; + } + return 0; + +rtattr_failure: + return -1; +} +#endif /* CONFIG_NET_CLS_POLICE */ + #endif From hidden@balabit.hu Fri Oct 29 03:24:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 03:24:27 -0700 (PDT) Received: from balabit.hu (balabit.hu [195.70.34.196]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TAOEid012460 for ; Fri, 29 Oct 2004 03:24:16 -0700 Subject: [RFC] IPSEC failover and replay detection sequence numbers From: KOVACS Krisztian To: netdev@oss.sgi.com, ipsec-tools-devel@lists.sourceforge.net, vpn-failover@lists.balabit.hu Content-Type: multipart/mixed; boundary="=-+wYg4lem0EGz4c5sfVBn" Message-Id: <1099045435.2888.47.camel@nienna.balabit> Mime-Version: 1.0 Date: Fri, 29 Oct 2004 12:23:56 +0200 X-archive-position: 11087 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hidden@balabit.hu Precedence: bulk X-list: netdev --=-+wYg4lem0EGz4c5sfVBn Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi, While developing an IPSEC failover solution we came to a problem of replay detection sequence numbers used by IPSEC ESP and AH. To be able to keep IPSEC SAs alive after a failing over to a slave, the state of the SAs has to be available on the slave node(s) as well. Except for the sequence numbers this is not really a problem, since the state of an already established SA does not change too often. However, currently getting or setting the replay detection state of an SA is not possible. Unfortunately the ability to get/set the replay detection sequence number is not enough, it would be great if the key management daemon could get state change notifications in certain cases. The attached patch is an implementation of the concept, and consists of the following parts: * xfrm_state replay detection notification facility: calls the registered callback functions if: * the input/output sequence number is at least the value sent in the last notification plus N * at least T jiffies has elapsed since the last notification and the sequence numbers have changed since then * the PFKEY implementation of the callback: sends notify pfkey messages (new message type) * the PFKEY extensions needed to get/set the parameters of the notification messages (N and T) (new extension header) * a new PFKEY message to explicitly set the replay detection state of an already established SA (new message type) As there are a couple of PFKEY changes which could possibly break compatibility, I tried to implement these extensions so that they are completely invisible unless the user-space explicitly requests notifications to be sent. Both N and T parameters of a new SA default to zero, and notification-related extension headers are sent only if these were explicitly set to a non-zero value. The xfrm-netlink parts are completely missing, but could be added easily. The corresponding libipsec changes should be trivial as well. Comments are welcome, especially since this is the first public release of the patch and I'm not much of an xfrm/pfkey expert... :) -- Regards, Krisztian KOVACS --=-+wYg4lem0EGz4c5sfVBn Content-Disposition: attachment; filename=ipsec_rd_notify_200410251031.patch Content-Type: text/x-patch; name=ipsec_rd_notify_200410251031.patch; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit Index: linux-2.6.9/include/linux/pfkeyv2.h =================================================================== --- linux-2.6.9.orig/include/linux/pfkeyv2.h 2004-10-18 23:54:55.000000000 +0200 +++ linux-2.6.9/include/linux/pfkeyv2.h 2004-10-29 11:12:48.653359687 +0200 @@ -216,6 +216,25 @@ } __attribute__((packed)); /* sizeof(struct sadb_x_nat_t_port) == 8 */ +/* IPSEC failover support sequence number update notification */ +struct sadb_x_saseq { + uint16_t sadb_x_saseq_len; + uint16_t sadb_x_saseq_exttype; + uint32_t sadb_x_saseq_iseq; + uint32_t sadb_x_saseq_iwnd; + uint32_t sadb_x_saseq_oseq; +} __attribute__((packed)); +/* sizeof(struct sadb_x_saseq) == 16 */ + +struct sadb_x_saseq_notify { + uint16_t sadb_x_saseq_notify_len; + uint16_t sadb_x_saseq_notify_exttype; + uint32_t sadb_x_saseq_notify_maxdiff; + uint32_t sadb_x_saseq_notify_maxage; + uint32_t sadb_x_saseq_notify_reserved; +} __attribute__((packed)); +/* sizeof(struct sadb_x_saseq_notify) == 16 */ + /* Message types */ #define SADB_RESERVED 0 #define SADB_GETSPI 1 @@ -241,7 +260,9 @@ #define SADB_X_SPDEXPIRE 21 #define SADB_X_SPDDELETE2 22 #define SADB_X_NAT_T_NEW_MAPPING 23 -#define SADB_MAX 23 +#define SADB_X_SEQNO_NOTIFY 24 +#define SADB_X_SEQNO_UPDATE 25 +#define SADB_MAX 25 /* Security Association flags */ #define SADB_SAFLAGS_PFS 1 @@ -324,7 +345,10 @@ #define SADB_X_EXT_NAT_T_SPORT 21 #define SADB_X_EXT_NAT_T_DPORT 22 #define SADB_X_EXT_NAT_T_OA 23 -#define SADB_EXT_MAX 23 +/* The next two entries are for IPSEC failover sequence number update notifications */ +#define SADB_X_EXT_SASEQ 24 +#define SADB_X_EXT_SASEQ_NOTIFY 25 +#define SADB_EXT_MAX 25 /* Identity Extension values */ #define SADB_IDENTTYPE_RESERVED 0 Index: linux-2.6.9/include/net/xfrm.h =================================================================== --- linux-2.6.9.orig/include/net/xfrm.h 2004-10-18 23:54:55.000000000 +0200 +++ linux-2.6.9/include/net/xfrm.h 2004-10-29 11:12:48.654359460 +0200 @@ -133,6 +133,16 @@ /* State for replay detection */ struct xfrm_replay_state replay; + /* Replay detection state at the time we sent the last notification */ + struct xfrm_replay_state preplay; + + /* Replay detection notification settings */ + __u64 replay_maxage; + __u32 replay_maxdiff; + + /* Replay detection notification timer */ + struct timer_list rtimer; + /* Statistics */ struct xfrm_stats stats; @@ -287,6 +297,15 @@ struct xfrm_tmpl xfrm_vec[XFRM_MAX_DEPTH]; }; +/* which seqno */ +#define XFRM_REPLAY_SEQ 1 +#define XFRM_REPLAY_OSEQ 2 +#define XFRM_REPLAY_SEQ_MASK 3 +/* what happened */ +#define XFRM_REPLAY_UPDATE 4 +#define XFRM_REPLAY_TIMEOUT 8 +#define XFRM_REPLAY_ACTION_MASK 12 + #define XFRM_KM_TIMEOUT 30 struct xfrm_mgr @@ -298,6 +317,7 @@ struct xfrm_policy *(*compile_policy)(u16 family, int opt, u8 *data, int len, int *dir); int (*new_mapping)(struct xfrm_state *x, xfrm_address_t *ipaddr, u16 sport); int (*notify_policy)(struct xfrm_policy *x, int dir, int event); + int (*notify_seq)(struct xfrm_state *x, int event); }; extern int xfrm_register_km(struct xfrm_mgr *km); @@ -812,6 +832,8 @@ extern void xfrm_state_flush(u8 proto); extern int xfrm_replay_check(struct xfrm_state *x, u32 seq); extern void xfrm_replay_advance(struct xfrm_state *x, u32 seq); +extern void xfrm_replay_notify(struct xfrm_state *x, int event); +extern void xfrm_state_replay_update(struct xfrm_state *x, struct xfrm_replay_state *replay); extern int xfrm_check_selectors(struct xfrm_state **x, int n, struct flowi *fl); extern int xfrm_state_check(struct xfrm_state *x, struct sk_buff *skb); extern int xfrm4_rcv(struct sk_buff *skb); Index: linux-2.6.9/net/ipv4/ah4.c =================================================================== --- linux-2.6.9.orig/net/ipv4/ah4.c 2004-10-18 23:55:06.000000000 +0200 +++ linux-2.6.9/net/ipv4/ah4.c 2004-10-29 11:14:00.700963876 +0200 @@ -98,6 +98,7 @@ ah->reserved = 0; ah->spi = x->id.spi; ah->seq_no = htonl(++x->replay.oseq); + xfrm_replay_notify(x, XFRM_REPLAY_UPDATE); ahp->icv(ahp, skb, ah->auth_data); top_iph->tos = iph->tos; Index: linux-2.6.9/net/ipv4/esp4.c =================================================================== --- linux-2.6.9.orig/net/ipv4/esp4.c 2004-10-18 23:54:32.000000000 +0200 +++ linux-2.6.9/net/ipv4/esp4.c 2004-10-29 11:12:48.656359005 +0200 @@ -98,6 +98,8 @@ esph->spi = x->id.spi; esph->seq_no = htonl(++x->replay.oseq); + xfrm_replay_notify(x, XFRM_REPLAY_UPDATE); + if (esp->conf.ivlen) crypto_cipher_set_iv(tfm, esp->conf.ivec, crypto_tfm_alg_ivsize(tfm)); Index: linux-2.6.9/net/ipv6/ah6.c =================================================================== --- linux-2.6.9.orig/net/ipv6/ah6.c 2004-10-18 23:54:39.000000000 +0200 +++ linux-2.6.9/net/ipv6/ah6.c 2004-10-29 11:14:23.076870730 +0200 @@ -214,6 +214,7 @@ ah->reserved = 0; ah->spi = x->id.spi; ah->seq_no = htonl(++x->replay.oseq); + xfrm_replay_notify(x, XFRM_REPLAY_UPDATE); ahp->icv(ahp, skb, ah->auth_data); err = 0; Index: linux-2.6.9/net/ipv6/esp6.c =================================================================== --- linux-2.6.9.orig/net/ipv6/esp6.c 2004-10-18 23:54:37.000000000 +0200 +++ linux-2.6.9/net/ipv6/esp6.c 2004-10-29 11:12:48.658358550 +0200 @@ -95,6 +95,8 @@ esph->spi = x->id.spi; esph->seq_no = htonl(++x->replay.oseq); + xfrm_replay_notify(x, XFRM_REPLAY_UPDATE); + if (esp->conf.ivlen) crypto_cipher_set_iv(tfm, esp->conf.ivec, crypto_tfm_alg_ivsize(tfm)); Index: linux-2.6.9/net/key/af_key.c =================================================================== --- linux-2.6.9.orig/net/key/af_key.c 2004-10-18 23:55:36.000000000 +0200 +++ linux-2.6.9/net/key/af_key.c 2004-10-29 11:12:48.662357640 +0200 @@ -336,6 +336,7 @@ [SADB_X_EXT_NAT_T_SPORT] = (u8) sizeof(struct sadb_x_nat_t_port), [SADB_X_EXT_NAT_T_DPORT] = (u8) sizeof(struct sadb_x_nat_t_port), [SADB_X_EXT_NAT_T_OA] = (u8) sizeof(struct sadb_address), + [SADB_X_EXT_SASEQ_NOTIFY] = (u8) sizeof(struct sadb_x_saseq_notify), }; /* Verify sadb_address_{len,prefixlen} against sa_family. */ @@ -606,9 +607,9 @@ sizeof(struct sadb_lifetime) + ((hsc & 1) ? sizeof(struct sadb_lifetime) : 0) + ((hsc & 2) ? sizeof(struct sadb_lifetime) : 0) + - sizeof(struct sadb_address)*2 + - sockaddr_size*2 + - sizeof(struct sadb_x_sa2); + sizeof(struct sadb_address)*2 + + sockaddr_size*2 + + sizeof(struct sadb_x_sa2); /* identity & sensitivity */ if ((x->props.family == AF_INET && @@ -641,6 +642,9 @@ size += sizeof(struct sadb_x_nat_t_port); } + if (x->replay_maxage || x->replay_maxdiff) + size += sizeof(struct sadb_x_saseq_notify); + skb = alloc_skb(size + 16, GFP_ATOMIC); if (skb == NULL) return ERR_PTR(-ENOBUFS); @@ -892,6 +896,17 @@ n_port->sadb_x_nat_t_port_reserved = 0; } + if (x->replay_maxage || x->replay_maxdiff) { + struct sadb_x_saseq_notify *seqn; + + seqn = (struct sadb_x_saseq_notify *) skb_put(skb, sizeof (*seqn)); + seqn->sadb_x_saseq_notify_len = sizeof(*seqn)/sizeof(uint64_t); + seqn->sadb_x_saseq_notify_exttype = SADB_X_EXT_SASEQ_NOTIFY; + seqn->sadb_x_saseq_notify_maxage = x->replay_maxage * 10 / HZ; + seqn->sadb_x_saseq_notify_maxdiff = x->replay_maxdiff; + seqn->sadb_x_saseq_notify_reserved = 0; + } + return skb; } @@ -1091,6 +1106,13 @@ } } + if (ext_hdrs[SADB_X_EXT_SASEQ_NOTIFY-1]) { + struct sadb_x_saseq_notify *seqn = ext_hdrs[SADB_X_EXT_SASEQ_NOTIFY-1]; + + x->replay_maxage = seqn->sadb_x_saseq_notify_maxage * HZ / 10; + x->replay_maxdiff = seqn->sadb_x_saseq_notify_maxdiff; + } + x->type = xfrm_get_type(proto, x->props.family); if (x->type == NULL) { err = -ENOPROTOOPT; @@ -2122,6 +2144,52 @@ return 0; } +static int pfkey_seqno_update(struct sock *sk, struct sk_buff *skb, struct sadb_msg *hdr, void **ext_hdrs) +{ + struct xfrm_state *x; + struct sadb_x_saseq *seq; + struct xfrm_replay_state replay; + struct sk_buff *skb_out; + struct sadb_msg *hdr_out; + + if (!ext_hdrs[SADB_EXT_SA-1] || + !present_and_same_family(ext_hdrs[SADB_EXT_ADDRESS_SRC-1], + ext_hdrs[SADB_EXT_ADDRESS_DST-1])) + return -EINVAL; + + x = pfkey_xfrm_state_lookup(hdr, ext_hdrs); + if (x == NULL) + return -ESRCH; + + seq = ext_hdrs[SADB_X_EXT_SASEQ-1]; + if (!seq) { + xfrm_state_put(x); + return -EINVAL; + } + + skb_out = alloc_skb(sizeof(struct sadb_msg) + 16, GFP_KERNEL); + if (!skb_out) { + xfrm_state_put(x); + return -ENOBUFS; + } + + replay.seq = seq->sadb_x_saseq_iseq; + replay.bitmap = seq->sadb_x_saseq_iwnd; + replay.oseq = seq->sadb_x_saseq_oseq; + + xfrm_state_replay_update(x, &replay); + xfrm_state_put(x); + + hdr_out = (struct sadb_msg *) skb_put(skb_out, sizeof(struct sadb_msg)); + pfkey_hdr_dup(hdr_out, hdr); + hdr_out->sadb_msg_errno = (uint8_t) 0; + hdr_out->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t)); + + pfkey_broadcast(skb_out, GFP_KERNEL, BROADCAST_ALL, sk); + + return 0; +} + typedef int (*pfkey_handler)(struct sock *sk, struct sk_buff *skb, struct sadb_msg *hdr, void **ext_hdrs); static pfkey_handler pfkey_funcs[SADB_MAX + 1] = { @@ -2147,6 +2215,7 @@ [SADB_X_SPDFLUSH] = pfkey_spdflush, [SADB_X_SPDSETIDX] = pfkey_spdadd, [SADB_X_SPDDELETE2] = pfkey_spdget, + [SADB_X_SEQNO_UPDATE] = pfkey_seqno_update, }; static int pfkey_process(struct sock *sk, struct sk_buff *skb, struct sadb_msg *hdr) @@ -2688,6 +2757,134 @@ return pfkey_broadcast(skb, GFP_ATOMIC, BROADCAST_REGISTERED, NULL); } +static int pfkey_send_replay_notify(struct xfrm_state *x, int event) +{ + struct sk_buff *skb; + struct sadb_msg *hdr; + struct sadb_sa *sa; + struct sadb_address *addr; + struct sockaddr_in *sin; +#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) + struct sockaddr_in6 *sin6; +#endif + struct sadb_x_saseq *seq; + int sockaddr_size; + int size; + __u8 satype = (x->id.proto == IPPROTO_ESP ? SADB_SATYPE_ESP : 0); + + sockaddr_size = pfkey_sockaddr_size(x->props.family); + if (!sockaddr_size) + return -EINVAL; + + if (!satype) + return -EINVAL; + + size = sizeof(struct sadb_msg) + + sizeof(struct sadb_sa) + + sizeof(struct sadb_address) * 2 + + sockaddr_size * 2 + + sizeof(struct sadb_x_saseq); + + skb = alloc_skb(size + 16, GFP_ATOMIC); + if (skb == NULL) + return -ENOMEM; + + hdr = (struct sadb_msg *) skb_put(skb, sizeof(struct sadb_msg)); + hdr->sadb_msg_version = PF_KEY_V2; + hdr->sadb_msg_type = SADB_X_SEQNO_NOTIFY; + hdr->sadb_msg_satype = satype; + hdr->sadb_msg_len = size / sizeof(uint64_t); + hdr->sadb_msg_errno = 0; + hdr->sadb_msg_reserved = 0; + hdr->sadb_msg_seq = x->km.seq; + hdr->sadb_msg_pid = 0; + + /* SA */ + sa = (struct sadb_sa *) skb_put(skb, sizeof(struct sadb_sa)); + sa->sadb_sa_len = sizeof(struct sadb_sa)/sizeof(uint64_t); + sa->sadb_sa_exttype = SADB_EXT_SA; + sa->sadb_sa_spi = x->id.spi; + sa->sadb_sa_replay = x->props.replay_window; + sa->sadb_sa_state = 0; + sa->sadb_sa_auth = 0; + sa->sadb_sa_encrypt = 0; + sa->sadb_sa_flags = 0; + + /* src address */ + addr = (struct sadb_address *) skb_put(skb, + sizeof(struct sadb_address) + sockaddr_size); + addr->sadb_address_len = + (sizeof(struct sadb_address) + sockaddr_size) / sizeof(uint64_t); + addr->sadb_address_exttype = SADB_EXT_ADDRESS_SRC; + addr->sadb_address_proto = 0; + addr->sadb_address_reserved = 0; + if (x->props.family == AF_INET) { + addr->sadb_address_prefixlen = 32; + sin = (struct sockaddr_in *) (addr + 1); + sin->sin_family = AF_INET; + sin->sin_addr.s_addr = x->props.saddr.a4; + sin->sin_port = 0; + memset(sin->sin_zero, 0, sizeof(sin->sin_zero)); + } +#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) + else if (x->props.family == AF_INET6) { + addr->sadb_address_prefixlen = 128; + + sin6 = (struct sockaddr_in6 *) (addr + 1); + sin6->sin6_family = AF_INET6; + sin6->sin6_port = 0; + sin6->sin6_flowinfo = 0; + memcpy(&sin6->sin6_addr, x->props.saddr.a6, + sizeof(struct in6_addr)); + sin6->sin6_scope_id = 0; + } +#endif + else + BUG(); + + /* dst address */ + addr = (struct sadb_address *) skb_put(skb, + sizeof(struct sadb_address) + sockaddr_size); + addr->sadb_address_len = + (sizeof(struct sadb_address) + sockaddr_size) / sizeof(uint64_t); + addr->sadb_address_exttype = SADB_EXT_ADDRESS_DST; + addr->sadb_address_proto = 0; + addr->sadb_address_reserved = 0; + if (x->props.family == AF_INET) { + addr->sadb_address_prefixlen = 32; + sin = (struct sockaddr_in *) (addr + 1); + sin->sin_family = AF_INET; + sin->sin_addr.s_addr = x->id.daddr.a4; + sin->sin_port = 0; + memset(sin->sin_zero, 0, sizeof(sin->sin_zero)); + } +#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) + else if (x->props.family == AF_INET6) { + addr->sadb_address_prefixlen = 128; + + sin6 = (struct sockaddr_in6 *) (addr + 1); + sin6->sin6_family = AF_INET6; + sin6->sin6_port = 0; + sin6->sin6_flowinfo = 0; + memcpy(&sin6->sin6_addr, x->id.daddr.a6, + sizeof(struct in6_addr)); + sin6->sin6_scope_id = 0; + } +#endif + else + BUG(); + + /* replay detection sequence numbers */ + seq = (struct sadb_x_saseq*) skb_put(skb, sizeof(*seq)); + seq->sadb_x_saseq_len = sizeof(*seq)/sizeof(uint64_t); + seq->sadb_x_saseq_exttype = SADB_X_EXT_SASEQ; + seq->sadb_x_saseq_iseq = x->replay.seq; + seq->sadb_x_saseq_iwnd = x->replay.bitmap; + seq->sadb_x_saseq_oseq = x->replay.oseq; + + return pfkey_broadcast(skb, GFP_ATOMIC, BROADCAST_REGISTERED, NULL); +} + static int pfkey_sendmsg(struct kiocb *kiocb, struct socket *sock, struct msghdr *msg, size_t len) { @@ -2856,6 +3053,7 @@ .acquire = pfkey_send_acquire, .compile_policy = pfkey_compile_policy, .new_mapping = pfkey_send_new_mapping, + .notify_seq = pfkey_send_replay_notify, }; static void __exit ipsec_pfkey_exit(void) Index: linux-2.6.9/net/xfrm/xfrm_export.c =================================================================== --- linux-2.6.9.orig/net/xfrm/xfrm_export.c 2004-10-18 23:54:27.000000000 +0200 +++ linux-2.6.9/net/xfrm/xfrm_export.c 2004-10-29 11:12:48.662357640 +0200 @@ -27,6 +27,8 @@ EXPORT_SYMBOL(xfrm_state_delete_tunnel); EXPORT_SYMBOL(xfrm_replay_check); EXPORT_SYMBOL(xfrm_replay_advance); +EXPORT_SYMBOL(xfrm_replay_notify); +EXPORT_SYMBOL(xfrm_state_replay_update); EXPORT_SYMBOL(xfrm_check_selectors); EXPORT_SYMBOL(__secpath_destroy); EXPORT_SYMBOL(secpath_dup); Index: linux-2.6.9/net/xfrm/xfrm_state.c =================================================================== --- linux-2.6.9.orig/net/xfrm/xfrm_state.c 2004-10-18 23:54:40.000000000 +0200 +++ linux-2.6.9/net/xfrm/xfrm_state.c 2004-10-29 11:12:48.664357185 +0200 @@ -52,6 +52,8 @@ { if (del_timer(&x->timer)) BUG(); + if (del_timer(&x->rtimer)) + BUG(); if (x->aalg) kfree(x->aalg); if (x->ealg) @@ -92,6 +94,20 @@ return secs*HZ; } +void xfrm_replay_notify(struct xfrm_state *, int); + +static void xfrm_replay_timer_handler(unsigned long data) +{ + struct xfrm_state *x = (struct xfrm_state*)data; + + spin_lock(&x->lock); + + if (x->km.state == XFRM_STATE_VALID) + xfrm_replay_notify(x, XFRM_REPLAY_TIMEOUT); + + spin_unlock(&x->lock); +} + static void xfrm_timer_handler(unsigned long data) { struct xfrm_state *x = (struct xfrm_state*)data; @@ -178,11 +194,16 @@ init_timer(&x->timer); x->timer.function = xfrm_timer_handler; x->timer.data = (unsigned long)x; + init_timer(&x->rtimer); + x->rtimer.function = xfrm_replay_timer_handler; + x->rtimer.data = (unsigned long)x; x->curlft.add_time = (unsigned long)xtime.tv_sec; x->lft.soft_byte_limit = XFRM_INF; x->lft.soft_packet_limit = XFRM_INF; x->lft.hard_byte_limit = XFRM_INF; x->lft.hard_packet_limit = XFRM_INF; + x->replay_maxage = 0; + x->replay_maxdiff = 0; x->lock = SPIN_LOCK_UNLOCKED; } return x; @@ -212,6 +233,8 @@ spin_unlock(&xfrm_state_lock); if (del_timer(&x->timer)) atomic_dec(&x->refcnt); + if (del_timer(&x->rtimer)) + atomic_dec(&x->refcnt); /* The number two in this test is the reference * mentioned in the comment below plus the reference @@ -377,6 +400,10 @@ if (!mod_timer(&x->timer, jiffies + HZ)) xfrm_state_hold(x); + if (x->replay_maxage && + !mod_timer(&x->rtimer, jiffies + x->replay_maxage)) + xfrm_state_hold(x); + wake_up(&km_waitq); } @@ -696,6 +723,48 @@ } +void km_replay_notify(struct xfrm_state *, int); + +void xfrm_replay_notify(struct xfrm_state *x, int event) +{ + /* we send notify messages in case + * 1. we updated on of the sequence numbers, and the seqno difference + * is at least x->replay_maxdiff, in this case we also update the + * timeout of our timer function + * 2. if x->replay_maxage has elapsed since last update, + * and there were changes + * + * The state structure must be locked! + */ + + switch (event & XFRM_REPLAY_ACTION_MASK) { + case XFRM_REPLAY_UPDATE: + if (x->replay_maxdiff && + (x->replay.seq - x->preplay.seq < x->replay_maxdiff) && + (x->replay.oseq - x->preplay.oseq < x->replay_maxdiff)) + return; + + break; + + case XFRM_REPLAY_TIMEOUT: + if ((x->replay.seq == x->preplay.seq) && + (x->replay.bitmap == x->preplay.bitmap) && + (x->replay.oseq == x->preplay.oseq)) + goto resched; + + break; + } + + memcpy(&x->preplay, &x->replay, sizeof(struct xfrm_replay_state)); + km_replay_notify(x, event); + +resched: + if (x->replay_maxage && + !mod_timer(&x->rtimer, jiffies + x->replay_maxage)) + xfrm_state_hold(x); + +} + int xfrm_replay_check(struct xfrm_state *x, u32 seq) { u32 diff; @@ -738,6 +807,16 @@ diff = x->replay.seq - seq; x->replay.bitmap |= (1U << diff); } + + xfrm_replay_notify(x, XFRM_REPLAY_UPDATE); +} + +void xfrm_state_replay_update(struct xfrm_state *x, struct xfrm_replay_state *replay) +{ + spin_lock(&x->lock); + memcpy(&x->replay, replay, sizeof(*replay)); + memcpy(&x->preplay, replay, sizeof(*replay)); + spin_unlock(&x->lock); } int xfrm_check_selectors(struct xfrm_state **x, int n, struct flowi *fl) @@ -819,6 +898,17 @@ wake_up(&km_waitq); } +void km_replay_notify(struct xfrm_state *x, int event) +{ + struct xfrm_mgr *km; + + read_lock(&xfrm_km_lock); + list_for_each_entry(km, &xfrm_km_list, list) + if (km->notify_seq) + km->notify_seq(x, event); + read_unlock(&xfrm_km_lock); +} + int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optval, int optlen) { int err; --=-+wYg4lem0EGz4c5sfVBn-- From tgraf@suug.ch Fri Oct 29 03:26:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 03:26:19 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TAQF9Q012975 for ; Fri, 29 Oct 2004 03:26:16 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 1135A82; Fri, 29 Oct 2004 12:25:37 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 2C0221C0E9; Fri, 29 Oct 2004 12:26:20 +0200 (CEST) Date: Fri, 29 Oct 2004 12:26:20 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 7/6] cls_fw: CONFIG_NET_CLS_IND is not dependant on CONFIG_NET_CLS_ACT Message-ID: <20041029102620.GH12289@postel.suug.ch> References: <20041029002113.GY12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041029002113.GY12289@postel.suug.ch> X-archive-position: 11088 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Signed-off-by: Thomas Graf --- linux-2.6.10-rc1-bk7.orig/net/sched/cls_fw.c 2004-10-29 12:14:07.000000000 +0200 +++ linux-2.6.10-rc1-bk7/net/sched/cls_fw.c 2004-10-29 12:15:27.000000000 +0200 @@ -56,11 +56,11 @@ struct fw_filter *next; u32 id; struct tcf_result res; -#ifdef CONFIG_NET_CLS_ACT - struct tc_action *action; #ifdef CONFIG_NET_CLS_IND char indev[IFNAMSIZ]; #endif /* CONFIG_NET_CLS_IND */ +#ifdef CONFIG_NET_CLS_ACT + struct tc_action *action; #else /* CONFIG_NET_CLS_ACT */ #ifdef CONFIG_NET_CLS_POLICE struct tcf_police *police; @@ -88,11 +88,11 @@ for (f=head->ht[fw_hash(id)]; f; f=f->next) { if (f->id == id) { *res = f->res; -#ifdef CONFIG_NET_CLS_ACT #ifdef CONFIG_NET_CLS_IND if (!tcf_match_indev(skb, f->indev)) continue; #endif /* CONFIG_NET_CLS_IND */ +#ifdef CONFIG_NET_CLS_ACT if (f->action) { int act_res = tcf_action_exec(skb, f->action, res); if (act_res >= 0) @@ -217,6 +217,14 @@ tcf_bind_filter(tp, &f->res, base); } +#ifdef CONFIG_NET_CLS_IND + if (tb[TCA_FW_INDEV-1]) { + err = tcf_change_indev(tp, f->indev, tb[TCA_FW_INDEV-1]); + if (err < 0) + goto errout; + } +#endif /* CONFIG_NET_CLS_IND */ + #ifdef CONFIG_NET_CLS_ACT if (tb[TCA_FW_POLICE-1]) { err = tcf_change_act_police(tp, &f->action, tb[TCA_FW_POLICE-1], @@ -231,14 +239,6 @@ if (err < 0) goto errout; } - -#ifdef CONFIG_NET_CLS_IND - if (tb[TCA_FW_INDEV-1]) { - err = tcf_change_indev(tp, f->indev, tb[TCA_FW_INDEV-1]); - if (err < 0) - goto errout; - } -#endif /* CONFIG_NET_CLS_IND */ #else /* CONFIG_NET_CLS_ACT */ #ifdef CONFIG_NET_CLS_POLICE if (tb[TCA_FW_POLICE-1]) { @@ -373,13 +373,13 @@ if (f->res.classid) RTA_PUT(skb, TCA_FW_CLASSID, 4, &f->res.classid); -#ifdef CONFIG_NET_CLS_ACT - if (tcf_dump_act(skb, f->action, TCA_FW_ACT, TCA_FW_POLICE) < 0) - goto rtattr_failure; #ifdef CONFIG_NET_CLS_IND if (strlen(f->indev)) RTA_PUT(skb, TCA_FW_INDEV, IFNAMSIZ, f->indev); #endif /* CONFIG_NET_CLS_IND */ +#ifdef CONFIG_NET_CLS_ACT + if (tcf_dump_act(skb, f->action, TCA_FW_ACT, TCA_FW_POLICE) < 0) + goto rtattr_failure; #else /* CONFIG_NET_CLS_ACT */ #ifdef CONFIG_NET_CLS_POLICE if (tcf_dump_police(skb, f->police, TCA_FW_POLICE) < 0) From hadi@cyberus.ca Fri Oct 29 04:40:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 04:40:08 -0700 (PDT) Received: from mx01.cybersurf.com (mx01.cybersurf.com [209.197.145.104]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TBe3hn020158 for ; Fri, 29 Oct 2004 04:40:03 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx01.cybersurf.com with esmtp (Exim 4.30) id 1CNV6e-0002la-J4 for netdev@oss.sgi.com; Fri, 29 Oct 2004 07:39:44 -0400 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CNV6c-0000zG-4n; Fri, 29 Oct 2004 07:39:42 -0400 Subject: Re: [PATCH 7/6] cls_fw: CONFIG_NET_CLS_IND is not dependant on CONFIG_NET_CLS_ACT From: jamal Reply-To: hadi@cyberus.ca To: Thomas Graf Cc: "David S. Miller" , netdev@oss.sgi.com In-Reply-To: <20041029102620.GH12289@postel.suug.ch> References: <20041029002113.GY12289@postel.suug.ch> <20041029102620.GH12289@postel.suug.ch> Content-Type: text/plain Organization: jamalopolous Message-Id: <1099049980.1024.21.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 29 Oct 2004 07:39:40 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 11089 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev Thomas, Can you submit equivalent patches for cls_u32.c? Dave, these all look fine. Thomas, I will let Dave suck these in first and test against resulting bk. cheers, jamal From tgraf@suug.ch Fri Oct 29 04:53:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 04:53:33 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TBrS0Z020749 for ; Fri, 29 Oct 2004 04:53:29 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 4EA5E82; Fri, 29 Oct 2004 13:52:50 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 4C12E1C0E9; Fri, 29 Oct 2004 13:53:33 +0200 (CEST) Date: Fri, 29 Oct 2004 13:53:33 +0200 From: Thomas Graf To: jamal Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 7/6] cls_fw: CONFIG_NET_CLS_IND is not dependant on CONFIG_NET_CLS_ACT Message-ID: <20041029115333.GK12289@postel.suug.ch> References: <20041029002113.GY12289@postel.suug.ch> <20041029102620.GH12289@postel.suug.ch> <1099049980.1024.21.camel@jzny.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1099049980.1024.21.camel@jzny.localdomain> X-archive-position: 11091 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev * jamal <1099049980.1024.21.camel@jzny.localdomain> 2004-10-29 07:39 > Thomas, Can you submit equivalent patches for cls_u32.c? Sure, already done and queued for submission. I will submit them today. > Thomas, I will let Dave suck these in first and test against resulting > bk. OK. Regarding the generic statistics for actions: I thought about dumping the most common stats basic,queue,rate_est in tcf_action_copy_stats and let the action module dump additional stats in its get_stats implementation. Any objections in creating struct tca_act_gen with the content of tca_gen and use it to access a->priv from act_api.c to get my hands on the statistics and stats_lock? From SRS0+d8a8dca525a694af5047+432+infradead.org+hch@phoenix.srs.infradead.org Fri Oct 29 04:53:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 04:53:05 -0700 (PDT) Received: from phoenix.infradead.org (phoenix.infradead.org [81.187.226.98]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TBqxJV020663 for ; Fri, 29 Oct 2004 04:53:00 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.42 #1 (Red Hat Linux)) id 1CNVJ3-0002yK-MX; Fri, 29 Oct 2004 12:52:33 +0100 Date: Fri, 29 Oct 2004 12:52:33 +0100 From: Christoph Hellwig To: Pekka Enberg Cc: davem@davemloft.net, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCH 0/3] net: generic netdev_ioaddr Message-ID: <20041029115233.GA11391@infradead.org> Mail-Followup-To: Christoph Hellwig , Pekka Enberg , davem@davemloft.net, netdev@oss.sgi.com, linux-kernel@vger.kernel.org References: <1099044244.9566.0.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1099044244.9566.0.camel@localhost> User-Agent: Mutt/1.4.1i X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 11090 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: netdev On Fri, Oct 29, 2004 at 01:04:04PM +0300, Pekka Enberg wrote: > Hi, > > This patch introduces a generic netdev_ioaddr and converts natsemi and > 8139too drivers to use it. > > With the recent __iomem annotations, the network drivers need to either > invent this wrapper (like natsemi has done) or duplicate the IO base > address in their private data (similar to 8139too). Therefore, lets > make netdev_ioaddr generic before it is all over the place. This casting around sounds like a bad idea. Either add another void __iomem *mmioaddr; member to struct net_device, or better move that completely into the driver-private structure which seems the better level of abstraction. From ganesh.venkatesan@intel.com Fri Oct 29 05:08:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 05:08:38 -0700 (PDT) Received: from fmsfmr001.fm.intel.com ([192.55.52.67]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TC8Yrr021823 for ; Fri, 29 Oct 2004 05:08:34 -0700 Received: from petasus-pilot.fm.intel.com (petasus-pilot.fm.intel.com [10.1.192.44]) by fmsfmr001.fm.intel.com (8.12.10/8.12.10/d: major-outer.mc,v 1.1 2004/09/17 17:50:56 root Exp $) with ESMTP id i9TC8DqX014356; Fri, 29 Oct 2004 12:08:13 GMT Received: from fmsmsxvs040.fm.intel.com (fmsmsxvs040.fm.intel.com [132.233.42.124]) by petasus-pilot.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9TCD1NM027319; Fri, 29 Oct 2004 12:13:08 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs040.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004102905080717615 ; Fri, 29 Oct 2004 05:08:07 -0700 Date: Fri, 29 Oct 2004 05:08:07 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [PATCH netdev-2.6 1/10] ixgb: Fix NAPI driver crash on ifdown during traffic Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 11093 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Signed-off-by: ganesh venkatesan diff -up netdev-2.6/drivers/net/ixgb/ixgb_main.c netdev-2.6/drivers/net/ixgb.new/ixgb_main.c --- netdev-2.6/drivers/net/ixgb/ixgb_main.c 2004-10-15 13:15:38.000000000 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb_main.c 2004-10-15 13:15:55.000000000 -0700 @@ -1655,6 +1655,7 @@ static irqreturn_t ixgb_intr(int irq, vo netif_rx_complete(netdev); /* RAIDC will be automatically restarted by irq_enable */ ixgb_irq_enable(adapter); + return 0; } return (work_done >= work_to_do); From ganesh.venkatesan@intel.com Fri Oct 29 05:07:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 05:07:58 -0700 (PDT) Received: from caduceus.fm.intel.com (fmr02.intel.com [192.55.52.25]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TC7sEU021681 for ; Fri, 29 Oct 2004 05:07:54 -0700 Received: from fmsfmr100.fm.intel.com (fmsfmr100.fm.intel.com [10.1.192.58]) by caduceus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9TC6sXC007207; Fri, 29 Oct 2004 12:06:55 GMT Received: from fmsmsxvs042.fm.intel.com (fmsmsxvs042.fm.intel.com [132.233.42.128]) by fmsfmr100.fm.intel.com (8.12.10/8.12.10/d: major-inner.mc,v 1.2 2004/09/17 18:05:01 root Exp $) with SMTP id i9TC7XO7007787; Fri, 29 Oct 2004 12:07:33 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs042.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004102905073307572 ; Fri, 29 Oct 2004 05:07:33 -0700 Date: Fri, 29 Oct 2004 05:07:33 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [PATCH netdev-2.6 0/10] ixgb: driver update Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.44 X-archive-position: 11092 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Signed-off-by: ganesh venkatesan 1. Fix NAPI driver crash on ifdown during traffic 2. Fix error in setting Frame Size register while changing mtu 3. Prevent infinite loop trying to re-establish link while actively communicating 4. Remove sub-device ids for non-existant hardware 5. Limit Rx Address Filter Array entries to 3 6. Shrink size of ixgb_buffer (use uint16_t for length/next_to_watch) 7. Replace kmalloc with vmalloc to allocate driver local data structures 8. Ethtool_ops support 9. Version number update 10. White space corrections From ganesh.venkatesan@intel.com Fri Oct 29 05:09:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 05:09:18 -0700 (PDT) Received: from caduceus.fm.intel.com (fmr02.intel.com [192.55.52.25]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TC9Dtq022060 for ; Fri, 29 Oct 2004 05:09:13 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by caduceus.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9TC8DXC007543; Fri, 29 Oct 2004 12:08:13 GMT Received: from fmsmsxvs043.fm.intel.com (fmsmsxvs043.fm.intel.com [132.233.42.129]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9TCCEDi003524; Fri, 29 Oct 2004 12:12:40 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs043.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004102905085115484 ; Fri, 29 Oct 2004 05:08:51 -0700 Date: Fri, 29 Oct 2004 05:08:51 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [PATCH netdev-2.6 2/10] ixgb: Fix error in setting Frame Size register while changing mtu Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 11094 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Signed-off-by: ganesh venkatesan diff -up netdev-2.6/drivers/net/ixgb/ixgb_main.c netdev-2.6/drivers/net/ixgb.new/ixgb_main.c --- netdev-2.6/drivers/net/ixgb/ixgb_main.c 2004-10-15 13:15:38.000000000 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb_main.c 2004-10-15 13:15:55.000000000 -0700 @@ -1436,8 +1436,8 @@ static struct net_device_stats *ixgb_get static int ixgb_change_mtu(struct net_device *netdev, int new_mtu) { struct ixgb_adapter *adapter = netdev->priv; - uint32_t old_mtu = adapter->rx_buffer_len; int max_frame = new_mtu + ENET_HEADER_SIZE + ENET_FCS_LENGTH; + int old_max_frame = netdev->mtu + ENET_HEADER_SIZE + ENET_FCS_LENGTH; if ((max_frame < IXGB_MIN_ENET_FRAME_SIZE_WITHOUT_FCS + ENET_FCS_LENGTH) || (max_frame > IXGB_MAX_JUMBO_FRAME_SIZE + ENET_FCS_LENGTH)) { @@ -1462,7 +1477,7 @@ static int ixgb_change_mtu(struct net_de netdev->mtu = new_mtu; - if (old_mtu != adapter->rx_buffer_len && netif_running(netdev)) { + if(old_max_frame != max_frame && netif_running(netdev)) { ixgb_down(adapter, TRUE); ixgb_up(adapter); From ganesh.venkatesan@intel.com Fri Oct 29 05:09:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 05:09:47 -0700 (PDT) Received: from hermes.jf.intel.com (fmr05.intel.com [134.134.136.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TC9hHM022290 for ; Fri, 29 Oct 2004 05:09:43 -0700 Received: from petasus.jf.intel.com (petasus.jf.intel.com [10.7.209.6]) by hermes.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9TCDQpr002224; Fri, 29 Oct 2004 12:13:26 GMT Received: from orsmsxvs040.jf.intel.com (orsmsxvs040.jf.intel.com [192.168.65.206]) by petasus.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9TCCjuQ018333; Fri, 29 Oct 2004 12:13:08 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by orsmsxvs040.jf.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004102905092214141 ; Fri, 29 Oct 2004 05:09:22 -0700 Date: Fri, 29 Oct 2004 05:09:22 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [PATCH netdev-2.6 3/10] ixgb: Prevent infinite loop trying to re-establish link while actively communicating Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 11095 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Signed-off-by: ganesh venkatesan diff -up netdev-2.6/drivers/net/ixgb/ixgb_main.c netdev-2.6/drivers/net/ixgb.new/ixgb_main.c --- netdev-2.6/drivers/net/ixgb/ixgb_main.c 2004-10-15 13:15:38.000000000 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb_main.c 2004-10-15 13:15:55.000000000 -0700 @@ -1404,10 +1404,8 @@ static void ixgb_tx_timeout(struct net_d { struct ixgb_adapter *adapter = netdev->priv; - netif_device_detach(netdev); ixgb_down(adapter, TRUE); ixgb_up(adapter); - netif_device_attach(netdev); } /** From ganesh.venkatesan@intel.com Fri Oct 29 05:10:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 05:10:12 -0700 (PDT) Received: from fmsfmr004.fm.intel.com (fmr11.intel.com [192.55.52.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TCA8qr022675 for ; Fri, 29 Oct 2004 05:10:08 -0700 Received: from fmsfmr100.fm.intel.com (fmsfmr100.fm.intel.com [10.1.192.58]) by fmsfmr004.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9TCD1gD010253; Fri, 29 Oct 2004 12:13:02 GMT Received: from fmsmsxvs042.fm.intel.com (fmsmsxvs042.fm.intel.com [132.233.42.128]) by fmsfmr100.fm.intel.com (8.12.10/8.12.10/d: major-inner.mc,v 1.2 2004/09/17 18:05:01 root Exp $) with SMTP id i9TC9eOJ008550; Fri, 29 Oct 2004 12:09:46 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs042.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004102905094607797 ; Fri, 29 Oct 2004 05:09:46 -0700 Date: Fri, 29 Oct 2004 05:09:46 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [PATCH netdev-2.6 4/10] ixgb: Remove sub-device ids for non-existant hardware Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.44 X-archive-position: 11096 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Signed-off-by: ganesh venkatesan diff -up netdev-2.6/drivers/net/ixgb/ixgb_ids.h netdev-2.6/drivers/net/ixgb.new/ixgb_ids.h --- netdev-2.6/drivers/net/ixgb/ixgb_ids.h 2004-10-15 13:15:38.000000000 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb_ids.h 2004-10-15 13:15:54.000000000 -0700 @@ -42,11 +42,7 @@ #define IXGB_SUBDEVICE_ID_A11F 0xA11F #define IXGB_SUBDEVICE_ID_A01F 0xA01F -#define IXGB_SUBDEVICE_ID_A15F 0xA15F -#define IXGB_SUBDEVICE_ID_A05F 0xA05F -#define IXGB_SUBDEVICE_ID_A12F 0xA12F -#define IXGB_SUBDEVICE_ID_A02F 0xA02F #endif /* #ifndef _IXGB_IDS_H_ */ From ganesh.venkatesan@intel.com Fri Oct 29 05:11:20 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 05:11:23 -0700 (PDT) Received: from hermes.fm.intel.com (fmr01.intel.com [192.55.52.18]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TCBJtn023281 for ; Fri, 29 Oct 2004 05:11:20 -0700 Received: from petasus-pilot.fm.intel.com (petasus-pilot.fm.intel.com [10.1.192.44]) by hermes.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9TCDb33020092; Fri, 29 Oct 2004 12:13:37 GMT Received: from fmsmsxvs040.fm.intel.com (fmsmsxvs040.fm.intel.com [132.233.42.124]) by petasus-pilot.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9TCG4NE028598; Fri, 29 Oct 2004 12:16:04 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs040.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004102905105317987 ; Fri, 29 Oct 2004 05:10:54 -0700 Date: Fri, 29 Oct 2004 05:10:54 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [PATCH netdev-2.6 5/10] ixgb: Limit Rx Address Filter Array entries to 3 Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 11097 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Signed-off-by: ganesh venkatesan diff -up netdev-2.6/drivers/net/ixgb/ixgb_hw.h netdev-2.6/drivers/net/ixgb.new/ixgb_hw.h --- netdev-2.6/drivers/net/ixgb/ixgb_hw.h 2004-10-15 13:15:38.000000000 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb_hw.h 2004-10-15 13:15:53.000000000 -0700 @@ -616,9 +616,9 @@ struct ixgb_context_desc { #define IXGB_CONTEXT_DESC_STATUS_DD 0x01 /* Filters */ -#define IXGB_RAR_ENTRIES 16 /* Number of entries in Rx Address array */ #define IXGB_MC_TBL_SIZE 128 /* Multicast Filter Table (4096 bits) */ #define IXGB_VLAN_FILTER_TBL_SIZE 128 /* VLAN Filter Table (4096 bits) */ +#define IXGB_RAR_ENTRIES 3 /* Number of entries in Rx Address array */ #define IXGB_MEMORY_REGISTER_BASE_ADDRESS 0 #define ENET_HEADER_SIZE 14 From ganesh.venkatesan@intel.com Fri Oct 29 05:11:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 05:11:43 -0700 (PDT) Received: from fmsfmr003.fm.intel.com (fmr10.intel.com [192.55.52.30]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TCBd52023457 for ; Fri, 29 Oct 2004 05:11:40 -0700 Received: from fmsfmr100.fm.intel.com (fmsfmr100.fm.intel.com [10.1.192.58]) by fmsfmr003.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9TCDCxF029975; Fri, 29 Oct 2004 12:13:12 GMT Received: from fmsmsxvs042.fm.intel.com (fmsmsxvs042.fm.intel.com [132.233.42.128]) by fmsfmr100.fm.intel.com (8.12.10/8.12.10/d: major-inner.mc,v 1.2 2004/09/17 18:05:01 root Exp $) with SMTP id i9TCBDOB009386; Fri, 29 Oct 2004 12:11:18 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs042.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004102905111808001 ; Fri, 29 Oct 2004 05:11:18 -0700 Date: Fri, 29 Oct 2004 05:11:18 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [PATCH netdev-2.6 6/10] ixgb: Shrink size of ixgb_buffer (use uint16_t for length/next_to_watch) Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.44 X-archive-position: 11098 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Signed-off-by: ganesh venkatesan diff -up netdev-2.6/drivers/net/ixgb/ixgb.h netdev-2.6/drivers/net/ixgb.new/ixgb.h --- netdev-2.6/drivers/net/ixgb/ixgb.h 2004-10-15 13:15:38.000000000 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb.h 2004-10-15 13:15:51.000000000 -0700 @@ -105,9 +105,9 @@ struct ixgb_adapter; struct ixgb_buffer { struct sk_buff *skb; uint64_t dma; - unsigned long length; + uint16_t length; unsigned long time_stamp; - unsigned int next_to_watch; + uint16_t next_to_watch; }; struct ixgb_desc_ring { From ganesh.venkatesan@intel.com Fri Oct 29 05:12:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 05:12:15 -0700 (PDT) Received: from orsfmr001.jf.intel.com (fmr12.intel.com [134.134.136.15]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TCCBXv023713 for ; Fri, 29 Oct 2004 05:12:12 -0700 Received: from petasus.jf.intel.com (petasus.jf.intel.com [10.7.209.6]) by orsfmr001.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9TCCaCl027266; Fri, 29 Oct 2004 12:12:36 GMT Received: from orsmsxvs040.jf.intel.com (orsmsxvs040.jf.intel.com [192.168.65.206]) by petasus.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9TCFau8019774; Fri, 29 Oct 2004 12:15:36 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by orsmsxvs040.jf.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004102905114914390 ; Fri, 29 Oct 2004 05:11:49 -0700 Date: Fri, 29 Oct 2004 05:11:49 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [PATCH netdev-2.6 7/10] ixgb: Replace kmalloc with vmalloc to allocate driver local data structures Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 11099 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Signed-off-by: ganesh venkatesan diff -up netdev-2.6/drivers/net/ixgb/ixgb.h netdev-2.6/drivers/net/ixgb.new/ixgb.h --- netdev-2.6/drivers/net/ixgb/ixgb.h 2004-10-15 13:15:38.000000000 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb.h 2004-10-15 13:15:51.000000000 -0700 @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include diff -up netdev-2.6/drivers/net/ixgb/ixgb_main.c netdev-2.6/drivers/net/ixgb.new/ixgb_main.c --- netdev-2.6/drivers/net/ixgb/ixgb_main.c 2004-10-15 13:15:38.000000000 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb_main.c 2004-10-15 13:15:55.000000000 -0700 @@ -608,8 +608,8 @@ static int ixgb_close(struct net_device int size; size = sizeof(struct ixgb_buffer) * txdr->count; - txdr->buffer_info = kmalloc(size, GFP_KERNEL); if (!txdr->buffer_info) { + txdr->buffer_info = vmalloc(size); return -ENOMEM; } memset(txdr->buffer_info, 0, size); @@ -621,7 +620,7 @@ static int ixgb_setup_tx_resources(struc txdr->desc = pci_alloc_consistent(pdev, txdr->size, &txdr->dma); if (!txdr->desc) { - kfree(txdr->buffer_info); + vfree(txdr->buffer_info); return -ENOMEM; } memset(txdr->desc, 0, txdr->size); @@ -697,8 +692,8 @@ static void ixgb_configure_tx(struct ixg int size; size = sizeof(struct ixgb_buffer) * rxdr->count; - rxdr->buffer_info = kmalloc(size, GFP_KERNEL); if (!rxdr->buffer_info) { + rxdr->buffer_info = vmalloc(size); return -ENOMEM; } memset(rxdr->buffer_info, 0, size); @@ -711,7 +713,7 @@ static int ixgb_setup_rx_resources(struc rxdr->desc = pci_alloc_consistent(pdev, rxdr->size, &rxdr->dma); if (!rxdr->desc) { - kfree(rxdr->buffer_info); + vfree(rxdr->buffer_info); return -ENOMEM; } memset(rxdr->desc, 0, rxdr->size); @@ -865,7 +867,7 @@ static void ixgb_configure_rx(struct ixg ixgb_clean_tx_ring(adapter); - kfree(adapter->tx_ring.buffer_info); + vfree(adapter->tx_ring.buffer_info); adapter->tx_ring.buffer_info = NULL; pci_free_consistent(pdev, adapter->tx_ring.size, @@ -931,7 +935,7 @@ static void ixgb_clean_tx_ring(struct ix ixgb_clean_rx_ring(adapter); - kfree(rx_ring->buffer_info); + vfree(rx_ring->buffer_info); rx_ring->buffer_info = NULL; pci_free_consistent(pdev, rx_ring->size, rx_ring->desc, rx_ring->dma); From ganesh.venkatesan@intel.com Fri Oct 29 05:12:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 05:13:03 -0700 (PDT) Received: from fmsfmr003.fm.intel.com (fmr10.intel.com [192.55.52.30]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TCCuUq024138 for ; Fri, 29 Oct 2004 05:12:56 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by fmsfmr003.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9TCETxF030397; Fri, 29 Oct 2004 12:14:29 GMT Received: from fmsmsxvs043.fm.intel.com (fmsmsxvs043.fm.intel.com [132.233.42.129]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9TCG9De005144; Fri, 29 Oct 2004 12:16:22 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs043.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004102905123315906 ; Fri, 29 Oct 2004 05:12:33 -0700 Date: Fri, 29 Oct 2004 05:12:33 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [PATCH netdev-2.6 8/10] ixgb: Ethtool_ops support Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 11100 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Signed-off-by: ganesh venkatesan diff -up netdev-2.6/drivers/net/ixgb/ixgb_ethtool.c netdev-2.6/drivers/net/ixgb.new/ixgb_ethtool.c --- netdev-2.6/drivers/net/ixgb/ixgb_ethtool.c 2004-10-15 13:15:38.000000000 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb_ethtool.c 2004-10-15 13:15:50.000000000 -0700 @@ -37,6 +37,12 @@ extern char ixgb_driver_version[]; extern int ixgb_up(struct ixgb_adapter *adapter); extern void ixgb_down(struct ixgb_adapter *adapter, boolean_t kill_watchdog); +extern void ixgb_reset(struct ixgb_adapter *adapter); +extern int ixgb_setup_rx_resources(struct ixgb_adapter *adapter); +extern int ixgb_setup_tx_resources(struct ixgb_adapter *adapter); +extern void ixgb_free_rx_resources(struct ixgb_adapter *adapter); +extern void ixgb_free_tx_resources(struct ixgb_adapter *adapter); +extern void ixgb_update_stats(struct ixgb_adapter *adapter); struct ixgb_stats { char stat_string[ETH_GSTRING_LEN]; @@ -89,7 +50,7 @@ struct ixgb_stats { sizeof(ixgb_gstrings_stats) / sizeof(struct ixgb_stats) static int -ixgb_ethtool_gset(struct net_device *netdev, struct ethtool_cmd *ecmd) +ixgb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) { struct ixgb_adapter *adapter = netdev->priv; ecmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE); @@ -110,92 +115,149 @@ ixgb_ethtool_gset(struct net_device *net } static int -ixgb_ethtool_sset(struct net_device *netdev, struct ethtool_cmd *ecmd) +ixgb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) { struct ixgb_adapter *adapter = netdev->priv; if (ecmd->autoneg == AUTONEG_ENABLE || ecmd->speed + ecmd->duplex != SPEED_10000 + DUPLEX_FULL) return -EINVAL; - else { + + if(netif_running(adapter->netdev)) { ixgb_down(adapter, TRUE); + ixgb_reset(adapter); ixgb_up(adapter); - } + } else + ixgb_reset(adapter); + return 0; } static void -ixgb_ethtool_gpause(struct net_device *dev, - struct ethtool_pauseparam *epause) +ixgb_get_pauseparam(struct net_device *netdev, + struct ethtool_pauseparam *pause) { - struct ixgb_adapter *adapter = dev->priv; + struct ixgb_adapter *adapter = netdev->priv; struct ixgb_hw *hw = &adapter->hw; - - epause->autoneg = AUTONEG_DISABLE; - - if (hw->fc.type == ixgb_fc_rx_pause) - epause->rx_pause = 1; - else if (hw->fc.type == ixgb_fc_tx_pause) - epause->tx_pause = 1; - else if (hw->fc.type == ixgb_fc_full) { - epause->rx_pause = 1; - epause->tx_pause = 1; + + pause->autoneg = AUTONEG_DISABLE; + + + if(hw->fc.type == ixgb_fc_rx_pause) + pause->rx_pause = 1; + else if(hw->fc.type == ixgb_fc_tx_pause) + pause->tx_pause = 1; + else if(hw->fc.type == ixgb_fc_full) { + pause->rx_pause = 1; + pause->tx_pause = 1; } } static int -ixgb_ethtool_spause(struct net_device *dev, - struct ethtool_pauseparam *epause) +ixgb_set_pauseparam(struct net_device *netdev, + struct ethtool_pauseparam *pause) { - struct ixgb_adapter *adapter = dev->priv; + struct ixgb_adapter *adapter = netdev->priv; struct ixgb_hw *hw = &adapter->hw; - - if (epause->autoneg == AUTONEG_ENABLE) + + if(pause->autoneg == AUTONEG_ENABLE) return -EINVAL; - if (epause->rx_pause && epause->tx_pause) + if(pause->rx_pause && pause->tx_pause) hw->fc.type = ixgb_fc_full; - else if (epause->rx_pause && !epause->tx_pause) + else if(pause->rx_pause && !pause->tx_pause) hw->fc.type = ixgb_fc_rx_pause; - else if (!epause->rx_pause && epause->tx_pause) + else if(!pause->rx_pause && pause->tx_pause) hw->fc.type = ixgb_fc_tx_pause; - else if (!epause->rx_pause && !epause->tx_pause) + else if(!pause->rx_pause && !pause->tx_pause) hw->fc.type = ixgb_fc_none; - ixgb_down(adapter, TRUE); - ixgb_up(adapter); - + if(netif_running(adapter->netdev)) { + ixgb_down(adapter, TRUE); + ixgb_up(adapter); + } else + ixgb_reset(adapter); + return 0; } -static void -ixgb_ethtool_gdrvinfo(struct net_device *netdev, - struct ethtool_drvinfo *drvinfo) +static uint32_t +ixgb_get_rx_csum(struct net_device *netdev) { struct ixgb_adapter *adapter = netdev->priv; - strncpy(drvinfo->driver, ixgb_driver_name, 32); - strncpy(drvinfo->version, ixgb_driver_version, 32); - strncpy(drvinfo->fw_version, "N/A", 32); - strncpy(drvinfo->bus_info, pci_name(adapter->pdev), 32); + return adapter->rx_csum; +} + +static int +ixgb_set_rx_csum(struct net_device *netdev, uint32_t data) +{ + struct ixgb_adapter *adapter = netdev->priv; + adapter->rx_csum = data; + + if(netif_running(netdev)) { + ixgb_down(adapter,TRUE); + ixgb_up(adapter); + } else + ixgb_reset(adapter); + return 0; +} + +static uint32_t +ixgb_get_tx_csum(struct net_device *netdev) +{ + return (netdev->features & NETIF_F_HW_CSUM) != 0; +} + +static int +ixgb_set_tx_csum(struct net_device *netdev, uint32_t data) +{ + + if (data) + netdev->features |= NETIF_F_HW_CSUM; + else + netdev->features &= ~NETIF_F_HW_CSUM; + + return 0; } +#ifdef NETIF_F_TSO +static int +ixgb_set_tso(struct net_device *netdev, uint32_t data) +{ + + if (data) + netdev->features |= NETIF_F_TSO; + else + netdev->features &= ~NETIF_F_TSO; + return 0; +} +#endif /* NETIF_F_TSO */ + #define IXGB_GET_STAT(_A_, _R_) _A_->stats._R_ + +static int +ixgb_get_regs_len(struct net_device *netdev) +{ +#define IXGB_REG_DUMP_LEN 136*sizeof(uint32_t) + return IXGB_REG_DUMP_LEN; +} + static void -ixgb_ethtool_gregs(struct net_device *dev, struct ethtool_regs *regs, void *buf) +ixgb_get_regs(struct net_device *netdev, + struct ethtool_regs *regs, void *p) { - struct ixgb_adapter *adapter = dev->priv; + struct ixgb_adapter *adapter = netdev->priv; struct ixgb_hw *hw = &adapter->hw; - uint32_t *reg = buf; + uint32_t *reg = p; uint32_t *reg_start = reg; uint8_t i; - regs->version = - (adapter->hw.device_id << 16) | adapter->hw.subsystem_id; + regs->version = (adapter->hw.device_id << 16) | adapter->hw.subsystem_id; /* General Registers */ - *reg++ = IXGB_READ_REG(hw, CTRL0); /* 0 */ - *reg++ = IXGB_READ_REG(hw, CTRL1); /* 1 */ - *reg++ = IXGB_READ_REG(hw, STATUS); /* 2 */ - *reg++ = IXGB_READ_REG(hw, EECD); /* 3 */ + *reg++ = IXGB_READ_REG(hw, CTRL0); /* 0 */ + *reg++ = IXGB_READ_REG(hw, CTRL1); /* 1 */ + *reg++ = IXGB_READ_REG(hw, STATUS); /* 2 */ + *reg++ = IXGB_READ_REG(hw, EECD); /* 3 */ *reg++ = IXGB_READ_REG(hw, MFS); /* 4 */ /* Interrupt */ @@ -205,54 +205,55 @@ ixgb_ethtool_gregs(struct net_device *de *reg++ = IXGB_READ_REG(hw, IMC); /* 8 */ /* Receive */ - *reg++ = IXGB_READ_REG(hw, RCTL); /* 9 */ - *reg++ = IXGB_READ_REG(hw, FCRTL); /* 10 */ - *reg++ = IXGB_READ_REG(hw, FCRTH); /* 11 */ - *reg++ = IXGB_READ_REG(hw, RDBAL); /* 12 */ - *reg++ = IXGB_READ_REG(hw, RDBAH); /* 13 */ - *reg++ = IXGB_READ_REG(hw, RDLEN); /* 14 */ + *reg++ = IXGB_READ_REG(hw, RCTL); /* 9 */ + *reg++ = IXGB_READ_REG(hw, FCRTL); /* 10 */ + *reg++ = IXGB_READ_REG(hw, FCRTH); /* 11 */ + *reg++ = IXGB_READ_REG(hw, RDBAL); /* 12 */ + *reg++ = IXGB_READ_REG(hw, RDBAH); /* 13 */ + *reg++ = IXGB_READ_REG(hw, RDLEN); /* 14 */ *reg++ = IXGB_READ_REG(hw, RDH); /* 15 */ *reg++ = IXGB_READ_REG(hw, RDT); /* 16 */ - *reg++ = IXGB_READ_REG(hw, RDTR); /* 17 */ - *reg++ = IXGB_READ_REG(hw, RXDCTL); /* 18 */ - *reg++ = IXGB_READ_REG(hw, RAIDC); /* 19 */ - *reg++ = IXGB_READ_REG(hw, RXCSUM); /* 20 */ - - for (i = 0; i < IXGB_RAR_ENTRIES; i++) { - *reg++ = IXGB_READ_REG_ARRAY(hw, RAL, (i << 1)); /*21,...,51 */ - *reg++ = IXGB_READ_REG_ARRAY(hw, RAH, (i << 1)); /*22,...,52 */ + *reg++ = IXGB_READ_REG(hw, RDTR); /* 17 */ + *reg++ = IXGB_READ_REG(hw, RXDCTL); /* 18 */ + *reg++ = IXGB_READ_REG(hw, RAIDC); /* 19 */ + *reg++ = IXGB_READ_REG(hw, RXCSUM); /* 20 */ + + for(i = 0; i < IXGB_RAR_ENTRIES; i++) { + *reg++ = IXGB_READ_REG_ARRAY(hw, RAL, (i << 1)); /*21,...,51 */ + *reg++ = IXGB_READ_REG_ARRAY(hw, RAH, (i << 1)); /*22,...,52 */ } /* Transmit */ - *reg++ = IXGB_READ_REG(hw, TCTL); /* 53 */ - *reg++ = IXGB_READ_REG(hw, TDBAL); /* 54 */ - *reg++ = IXGB_READ_REG(hw, TDBAH); /* 55 */ - *reg++ = IXGB_READ_REG(hw, TDLEN); /* 56 */ + *reg++ = IXGB_READ_REG(hw, TCTL); /* 53 */ + *reg++ = IXGB_READ_REG(hw, TDBAL); /* 54 */ + *reg++ = IXGB_READ_REG(hw, TDBAH); /* 55 */ + *reg++ = IXGB_READ_REG(hw, TDLEN); /* 56 */ *reg++ = IXGB_READ_REG(hw, TDH); /* 57 */ *reg++ = IXGB_READ_REG(hw, TDT); /* 58 */ - *reg++ = IXGB_READ_REG(hw, TIDV); /* 59 */ - *reg++ = IXGB_READ_REG(hw, TXDCTL); /* 60 */ - *reg++ = IXGB_READ_REG(hw, TSPMT); /* 61 */ + *reg++ = IXGB_READ_REG(hw, TIDV); /* 59 */ + *reg++ = IXGB_READ_REG(hw, TXDCTL); /* 60 */ + *reg++ = IXGB_READ_REG(hw, TSPMT); /* 61 */ *reg++ = IXGB_READ_REG(hw, PAP); /* 62 */ /* Physical */ - *reg++ = IXGB_READ_REG(hw, PCSC1); /* 63 */ - *reg++ = IXGB_READ_REG(hw, PCSC2); /* 64 */ - *reg++ = IXGB_READ_REG(hw, PCSS1); /* 65 */ - *reg++ = IXGB_READ_REG(hw, PCSS2); /* 66 */ - *reg++ = IXGB_READ_REG(hw, XPCSS); /* 67 */ - *reg++ = IXGB_READ_REG(hw, UCCR); /* 68 */ - *reg++ = IXGB_READ_REG(hw, XPCSTC); /* 69 */ - *reg++ = IXGB_READ_REG(hw, MACA); /* 70 */ - *reg++ = IXGB_READ_REG(hw, APAE); /* 71 */ + *reg++ = IXGB_READ_REG(hw, PCSC1); /* 63 */ + *reg++ = IXGB_READ_REG(hw, PCSC2); /* 64 */ + *reg++ = IXGB_READ_REG(hw, PCSS1); /* 65 */ + *reg++ = IXGB_READ_REG(hw, PCSS2); /* 66 */ + *reg++ = IXGB_READ_REG(hw, XPCSS); /* 67 */ + *reg++ = IXGB_READ_REG(hw, UCCR); /* 68 */ + *reg++ = IXGB_READ_REG(hw, XPCSTC); /* 69 */ + *reg++ = IXGB_READ_REG(hw, MACA); /* 70 */ + *reg++ = IXGB_READ_REG(hw, APAE); /* 71 */ *reg++ = IXGB_READ_REG(hw, ARD); /* 72 */ *reg++ = IXGB_READ_REG(hw, AIS); /* 73 */ - *reg++ = IXGB_READ_REG(hw, MSCA); /* 74 */ - *reg++ = IXGB_READ_REG(hw, MSRWD); /* 75 */ + *reg++ = IXGB_READ_REG(hw, MSCA); /* 74 */ + *reg++ = IXGB_READ_REG(hw, MSRWD); /* 75 */ + /* Statistics */ - *reg++ = IXGB_GET_STAT(adapter, tprl); /* 76 */ - *reg++ = IXGB_GET_STAT(adapter, tprh); /* 77 */ + *reg++ = IXGB_GET_STAT(adapter, tprl); /* 76 */ + *reg++ = IXGB_GET_STAT(adapter, tprh); /* 77 */ *reg++ = IXGB_GET_STAT(adapter, gprcl); /* 78 */ *reg++ = IXGB_GET_STAT(adapter, gprch); /* 79 */ *reg++ = IXGB_GET_STAT(adapter, bprcl); /* 80 */ @@ -267,18 +331,18 @@ ixgb_ethtool_gregs(struct net_device *de *reg++ = IXGB_GET_STAT(adapter, jprch); /* 89 */ *reg++ = IXGB_GET_STAT(adapter, gorcl); /* 90 */ *reg++ = IXGB_GET_STAT(adapter, gorch); /* 91 */ - *reg++ = IXGB_GET_STAT(adapter, torl); /* 92 */ - *reg++ = IXGB_GET_STAT(adapter, torh); /* 93 */ - *reg++ = IXGB_GET_STAT(adapter, rnbc); /* 94 */ - *reg++ = IXGB_GET_STAT(adapter, ruc); /* 95 */ - *reg++ = IXGB_GET_STAT(adapter, roc); /* 96 */ - *reg++ = IXGB_GET_STAT(adapter, rlec); /* 97 */ - *reg++ = IXGB_GET_STAT(adapter, crcerrs); /* 98 */ - *reg++ = IXGB_GET_STAT(adapter, icbc); /* 99 */ - *reg++ = IXGB_GET_STAT(adapter, ecbc); /* 100 */ - *reg++ = IXGB_GET_STAT(adapter, mpc); /* 101 */ - *reg++ = IXGB_GET_STAT(adapter, tptl); /* 102 */ - *reg++ = IXGB_GET_STAT(adapter, tpth); /* 103 */ + *reg++ = IXGB_GET_STAT(adapter, torl); /* 92 */ + *reg++ = IXGB_GET_STAT(adapter, torh); /* 93 */ + *reg++ = IXGB_GET_STAT(adapter, rnbc); /* 94 */ + *reg++ = IXGB_GET_STAT(adapter, ruc); /* 95 */ + *reg++ = IXGB_GET_STAT(adapter, roc); /* 96 */ + *reg++ = IXGB_GET_STAT(adapter, rlec); /* 97 */ + *reg++ = IXGB_GET_STAT(adapter, crcerrs); /* 98 */ + *reg++ = IXGB_GET_STAT(adapter, icbc); /* 99 */ + *reg++ = IXGB_GET_STAT(adapter, ecbc); /* 100 */ + *reg++ = IXGB_GET_STAT(adapter, mpc); /* 101 */ + *reg++ = IXGB_GET_STAT(adapter, tptl); /* 102 */ + *reg++ = IXGB_GET_STAT(adapter, tpth); /* 103 */ *reg++ = IXGB_GET_STAT(adapter, gptcl); /* 104 */ *reg++ = IXGB_GET_STAT(adapter, gptch); /* 105 */ *reg++ = IXGB_GET_STAT(adapter, bptcl); /* 106 */ @@ -293,96 +357,252 @@ ixgb_ethtool_gregs(struct net_device *de *reg++ = IXGB_GET_STAT(adapter, jptch); /* 115 */ *reg++ = IXGB_GET_STAT(adapter, gotcl); /* 116 */ *reg++ = IXGB_GET_STAT(adapter, gotch); /* 117 */ - *reg++ = IXGB_GET_STAT(adapter, totl); /* 118 */ - *reg++ = IXGB_GET_STAT(adapter, toth); /* 119 */ - *reg++ = IXGB_GET_STAT(adapter, dc); /* 120 */ - *reg++ = IXGB_GET_STAT(adapter, plt64c); /* 121 */ + *reg++ = IXGB_GET_STAT(adapter, totl); /* 118 */ + *reg++ = IXGB_GET_STAT(adapter, toth); /* 119 */ + *reg++ = IXGB_GET_STAT(adapter, dc); /* 120 */ + *reg++ = IXGB_GET_STAT(adapter, plt64c); /* 121 */ *reg++ = IXGB_GET_STAT(adapter, tsctc); /* 122 */ - *reg++ = IXGB_GET_STAT(adapter, tsctfc); /* 123 */ - *reg++ = IXGB_GET_STAT(adapter, ibic); /* 124 */ - *reg++ = IXGB_GET_STAT(adapter, rfc); /* 125 */ - *reg++ = IXGB_GET_STAT(adapter, lfc); /* 126 */ - *reg++ = IXGB_GET_STAT(adapter, pfrc); /* 127 */ - *reg++ = IXGB_GET_STAT(adapter, pftc); /* 128 */ + *reg++ = IXGB_GET_STAT(adapter, tsctfc); /* 123 */ + *reg++ = IXGB_GET_STAT(adapter, ibic); /* 124 */ + *reg++ = IXGB_GET_STAT(adapter, rfc); /* 125 */ + *reg++ = IXGB_GET_STAT(adapter, lfc); /* 126 */ + *reg++ = IXGB_GET_STAT(adapter, pfrc); /* 127 */ + *reg++ = IXGB_GET_STAT(adapter, pftc); /* 128 */ *reg++ = IXGB_GET_STAT(adapter, mcfrc); /* 129 */ *reg++ = IXGB_GET_STAT(adapter, mcftc); /* 130 */ - *reg++ = IXGB_GET_STAT(adapter, xonrxc); /* 131 */ - *reg++ = IXGB_GET_STAT(adapter, xontxc); /* 132 */ - *reg++ = IXGB_GET_STAT(adapter, xoffrxc); /* 133 */ - *reg++ = IXGB_GET_STAT(adapter, xofftxc); /* 134 */ - *reg++ = IXGB_GET_STAT(adapter, rjc); /* 135 */ + *reg++ = IXGB_GET_STAT(adapter, xonrxc); /* 131 */ + *reg++ = IXGB_GET_STAT(adapter, xontxc); /* 132 */ + *reg++ = IXGB_GET_STAT(adapter, xoffrxc); /* 133 */ + *reg++ = IXGB_GET_STAT(adapter, xofftxc); /* 134 */ + *reg++ = IXGB_GET_STAT(adapter, rjc); /* 135 */ regs->len = (reg - reg_start) * sizeof(uint32_t); } static int -ixgb_ethtool_geeprom(struct net_device *dev, - struct ethtool_eeprom *eeprom, u8 *data) +ixgb_get_eeprom_len(struct net_device *netdev) +{ + /* return size in bytes */ + return (IXGB_EEPROM_SIZE << 1); +} + +static int +ixgb_get_eeprom(struct net_device *netdev, + struct ethtool_eeprom *eeprom, uint8_t *bytes) { - struct ixgb_adapter *adapter = dev->priv; + struct ixgb_adapter *adapter = netdev->priv; struct ixgb_hw *hw = &adapter->hw; + uint16_t *eeprom_buff; + int i, max_len, first_word, last_word; + int ret_val = 0; + + if(eeprom->len == 0) { + ret_val = -EINVAL; + goto geeprom_error; + } eeprom->magic = hw->vendor_id | (hw->device_id << 16); - /* use our function to read the eeprom and update our cache */ - ixgb_get_eeprom_data(hw); - memcpy(data, (char *)hw->eeprom + eeprom->offset, eeprom->len); - return 0; + max_len = ixgb_get_eeprom_len(netdev); + + if(eeprom->offset > eeprom->offset + eeprom->len) { + ret_val = -EINVAL; + goto geeprom_error; + } + + if((eeprom->offset + eeprom->len) > max_len) + eeprom->len = (max_len - eeprom->offset); + + first_word = eeprom->offset >> 1; + last_word = (eeprom->offset + eeprom->len - 1) >> 1; + + eeprom_buff = kmalloc(sizeof(uint16_t) * + (last_word - first_word + 1), GFP_KERNEL); + if(!eeprom_buff) + return -ENOMEM; + + /* note the eeprom was good because the driver loaded */ + for(i = 0; i <= (last_word - first_word); i++) { + eeprom_buff[i] = ixgb_get_eeprom_word(hw, (first_word + i)); + } + + memcpy(bytes, (uint8_t *)eeprom_buff + (eeprom->offset & 1), + eeprom->len); + kfree(eeprom_buff); + +geeprom_error: + return ret_val; } static int -ixgb_ethtool_seeprom(struct net_device *dev, - struct ethtool_eeprom *eeprom, u8 *data) +ixgb_set_eeprom(struct net_device *netdev, + struct ethtool_eeprom *eeprom, uint8_t *bytes) { - struct ixgb_adapter *adapter = dev->priv; + struct ixgb_adapter *adapter = netdev->priv; struct ixgb_hw *hw = &adapter->hw; - /* We are under rtnl, so static is OK */ - static uint16_t eeprom_buff[IXGB_EEPROM_SIZE]; - int i, first_word, last_word; - char *ptr; + uint16_t *eeprom_buff; + void *ptr; + int max_len, first_word, last_word; + uint16_t i; - if (eeprom->magic != (hw->vendor_id | (hw->device_id << 16))) + if(eeprom->len == 0) + return -EINVAL; + + if(eeprom->magic != (hw->vendor_id | (hw->device_id << 16))) return -EFAULT; + max_len = ixgb_get_eeprom_len(netdev); + + if(eeprom->offset > eeprom->offset + eeprom->len) + return -EINVAL; + + if((eeprom->offset + eeprom->len) > max_len) + eeprom->len = (max_len - eeprom->offset); + first_word = eeprom->offset >> 1; last_word = (eeprom->offset + eeprom->len - 1) >> 1; - ptr = (char *)eeprom_buff; + eeprom_buff = kmalloc(max_len, GFP_KERNEL); + if(!eeprom_buff) + return -ENOMEM; - if (eeprom->offset & 1) { + ptr = (void *)eeprom_buff; + + if(eeprom->offset & 1) { /* need read/modify/write of first changed EEPROM word */ /* only the second byte of the word is being modified */ eeprom_buff[0] = ixgb_read_eeprom(hw, first_word); ptr++; } - if ((eeprom->offset + eeprom->len) & 1) { + if((eeprom->offset + eeprom->len) & 1) { /* need read/modify/write of last changed EEPROM word */ /* only the first byte of the word is being modified */ - eeprom_buff[last_word - first_word] - = ixgb_read_eeprom(hw, last_word); + eeprom_buff[last_word - first_word] + = ixgb_read_eeprom(hw, last_word); } - memcpy(ptr, data, eeprom->len); - for (i = 0; i <= (last_word - first_word); i++) + + memcpy(ptr, bytes, eeprom->len); + + for(i = 0; i <= (last_word - first_word); i++) ixgb_write_eeprom(hw, first_word + i, eeprom_buff[i]); /* Update the checksum over the first part of the EEPROM if needed */ - if (first_word <= EEPROM_CHECKSUM_REG) + if(first_word <= EEPROM_CHECKSUM_REG) ixgb_update_eeprom_checksum(hw); + kfree(eeprom_buff); return 0; } +static void +ixgb_get_drvinfo(struct net_device *netdev, + struct ethtool_drvinfo *drvinfo) +{ + struct ixgb_adapter *adapter = netdev->priv; + + strncpy(drvinfo->driver, ixgb_driver_name, 32); + strncpy(drvinfo->version, ixgb_driver_version, 32); + strncpy(drvinfo->fw_version, "N/A", 32); + strncpy(drvinfo->bus_info, pci_name(adapter->pdev), 32); + drvinfo->n_stats = IXGB_STATS_LEN; + drvinfo->regdump_len = ixgb_get_regs_len(netdev); + drvinfo->eedump_len = ixgb_get_eeprom_len(netdev); +} + +static void +ixgb_get_ringparam(struct net_device *netdev, + struct ethtool_ringparam *ring) +{ + struct ixgb_adapter *adapter = netdev->priv; + struct ixgb_desc_ring *txdr = &adapter->tx_ring; + struct ixgb_desc_ring *rxdr = &adapter->rx_ring; + + ring->rx_max_pending = MAX_RXD; + ring->tx_max_pending = MAX_TXD; + ring->rx_mini_max_pending = 0; + ring->rx_jumbo_max_pending = 0; + ring->rx_pending = rxdr->count; + ring->tx_pending = txdr->count; + ring->rx_mini_pending = 0; + ring->rx_jumbo_pending = 0; +} + +static int +ixgb_set_ringparam(struct net_device *netdev, + struct ethtool_ringparam *ring) +{ + struct ixgb_adapter *adapter = netdev->priv; + struct ixgb_desc_ring *txdr = &adapter->tx_ring; + struct ixgb_desc_ring *rxdr = &adapter->rx_ring; + struct ixgb_desc_ring tx_old, tx_new, rx_old, rx_new; + int err; + + tx_old = adapter->tx_ring; + rx_old = adapter->rx_ring; + + if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) + return -EINVAL; + + if(netif_running(adapter->netdev)) + ixgb_down(adapter,TRUE); + + rxdr->count = max(ring->rx_pending,(uint32_t)MIN_RXD); + rxdr->count = min(rxdr->count,(uint32_t)MAX_RXD); + IXGB_ROUNDUP(rxdr->count, IXGB_REQ_RX_DESCRIPTOR_MULTIPLE); + + txdr->count = max(ring->tx_pending,(uint32_t)MIN_TXD); + txdr->count = min(txdr->count,(uint32_t)MAX_TXD); + IXGB_ROUNDUP(txdr->count, IXGB_REQ_TX_DESCRIPTOR_MULTIPLE); + + if(netif_running(adapter->netdev)) { + /* Try to get new resources before deleting old */ + if((err = ixgb_setup_rx_resources(adapter))) + goto err_setup_rx; + if((err = ixgb_setup_tx_resources(adapter))) + goto err_setup_tx; + + /* save the new, restore the old in order to free it, + * then restore the new back again */ + + rx_new = adapter->rx_ring; + tx_new = adapter->tx_ring; + adapter->rx_ring = rx_old; + adapter->tx_ring = tx_old; + ixgb_free_rx_resources(adapter); + ixgb_free_tx_resources(adapter); + adapter->rx_ring = rx_new; + adapter->tx_ring = tx_new; + if((err = ixgb_up(adapter))) + return err; + } + + return 0; +err_setup_tx: + ixgb_free_rx_resources(adapter); +err_setup_rx: + adapter->rx_ring = rx_old; + adapter->tx_ring = tx_old; + ixgb_up(adapter); + return err; +} + + + + + + /* toggle LED 4 times per second = 2 "blinks" per second */ #define IXGB_ID_INTERVAL (HZ/4) /* bit defines for adapter->led_status */ #define IXGB_LED_ON 0 -static void ixgb_led_blink_callback(unsigned long data) +static void +ixgb_led_blink_callback(unsigned long data) { - struct ixgb_adapter *adapter = (struct ixgb_adapter *)data; + struct ixgb_adapter *adapter = (struct ixgb_adapter *) data; - if (test_and_change_bit(IXGB_LED_ON, &adapter->led_status)) + if(test_and_change_bit(IXGB_LED_ON, &adapter->led_status)) ixgb_led_off(&adapter->hw); else ixgb_led_on(&adapter->hw); @@ -391,19 +611,23 @@ static void ixgb_led_blink_callback(unsi } static int -ixgb_ethtool_led_blink(struct net_device *netdev, u32 data) +ixgb_phys_id(struct net_device *netdev, uint32_t data) { struct ixgb_adapter *adapter = netdev->priv; - if (!adapter->blink_timer.function) { + + if(!data || data > (uint32_t)(MAX_SCHEDULE_TIMEOUT / HZ)) + data = (uint32_t)(MAX_SCHEDULE_TIMEOUT / HZ); + + if(!adapter->blink_timer.function) { init_timer(&adapter->blink_timer); adapter->blink_timer.function = ixgb_led_blink_callback; - adapter->blink_timer.data = (unsigned long)adapter; + adapter->blink_timer.data = (unsigned long) adapter; } mod_timer(&adapter->blink_timer, jiffies); set_current_state(TASK_INTERRUPTIBLE); - if (data) + if(data) schedule_timeout(data * HZ); else schedule_timeout(MAX_SCHEDULE_TIMEOUT); @@ -415,141 +639,74 @@ ixgb_ethtool_led_blink(struct net_device return 0; } -static int ixgb_nway_reset(struct net_device *netdev) -{ - if (netif_running(netdev)) { - struct ixgb_adapter *adapter = netdev->priv; - ixgb_down(adapter, TRUE); - ixgb_up(adapter); - } - return 0; -} - -static int ixgb_get_stats_count(struct net_device *dev) +static int +ixgb_get_stats_count(struct net_device *netdev) { return IXGB_STATS_LEN; } -static void ixgb_get_strings(struct net_device *dev, u32 stringset, u8 *data) +static void +ixgb_get_ethtool_stats(struct net_device *netdev, + struct ethtool_stats *stats, uint64_t *data) { + struct ixgb_adapter *adapter = netdev->priv; int i; - for (i = 0; i < IXGB_STATS_LEN; i++) { - memcpy(data + i * ETH_GSTRING_LEN, - ixgb_gstrings_stats[i].stat_string, - ETH_GSTRING_LEN); - } -} - -static int ixgb_get_regs_len(struct net_device *dev) -{ - return 136*sizeof(uint32_t); -} -static int ixgb_get_eeprom_len(struct net_device *dev) -{ - /* return size in bytes */ - return (IXGB_EEPROM_SIZE << 1); + ixgb_update_stats(adapter); + for(i = 0; i < IXGB_STATS_LEN; i++) { + char *p = (char *)adapter+ixgb_gstrings_stats[i].stat_offset; + data[i] = (ixgb_gstrings_stats[i].sizeof_stat == + sizeof(uint64_t)) ? *(uint64_t *)p : *(uint32_t *)p; + } } -static void get_ethtool_stats(struct net_device *dev, - struct ethtool_stats *stats, u64 *data) +static void +ixgb_get_strings(struct net_device *netdev, uint32_t stringset, uint8_t *data) { - struct ixgb_adapter *adapter = dev->priv; int i; - for (i = 0; i < IXGB_STATS_LEN; i++) { - void *p = (char *)adapter + ixgb_gstrings_stats[i].stat_offset; - stats->data[i] = - (ixgb_gstrings_stats[i].sizeof_stat == sizeof(uint64_t)) - ? *(uint64_t *) p - : *(uint32_t *) p; + switch(stringset) { + case ETH_SS_STATS: + for (i=0; i < IXGB_STATS_LEN; i++) { + memcpy(data + i * ETH_GSTRING_LEN, + ixgb_gstrings_stats[i].stat_string, + ETH_GSTRING_LEN); + } + break; } } -static u32 ixgb_get_rx_csum(struct net_device *dev) -{ - struct ixgb_adapter *adapter = dev->priv; - return adapter->rx_csum; -} - -static int ixgb_set_rx_csum(struct net_device *dev, u32 sum) -{ - struct ixgb_adapter *adapter = dev->priv; - adapter->rx_csum = sum; - ixgb_down(adapter, TRUE); - ixgb_up(adapter); - return 0; -} - -static u32 ixgb_get_tx_csum(struct net_device *dev) -{ - return (dev->features & NETIF_F_HW_CSUM) != 0; -} - -static int ixgb_set_tx_csum(struct net_device *dev, u32 sum) -{ - if (sum) - dev->features |= NETIF_F_HW_CSUM; - else - dev->features &= ~NETIF_F_HW_CSUM; - return 0; -} - -static u32 ixgb_get_sg(struct net_device *dev) -{ - return (dev->features & NETIF_F_SG) != 0; -} - -static int ixgb_set_sg(struct net_device *dev, u32 sum) -{ - if (sum) - dev->features |= NETIF_F_SG; - else - dev->features &= ~NETIF_F_SG; - return 0; -} - -#ifdef NETIF_F_TSO -static u32 ixgb_get_tso(struct net_device *dev) -{ - return (dev->features & NETIF_F_TSO) != 0; -} - -static int ixgb_set_tso(struct net_device *dev, u32 sum) -{ - if (sum) - dev->features |= NETIF_F_TSO; - else - dev->features &= ~NETIF_F_TSO; - return 0; -} -#endif - struct ethtool_ops ixgb_ethtool_ops = { - .get_settings = ixgb_ethtool_gset, - .set_settings = ixgb_ethtool_sset, - .get_drvinfo = ixgb_ethtool_gdrvinfo, - .nway_reset = ixgb_nway_reset, - .get_link = ethtool_op_get_link, - .phys_id = ixgb_ethtool_led_blink, - .get_strings = ixgb_get_strings, - .get_stats_count = ixgb_get_stats_count, - .get_regs = ixgb_ethtool_gregs, - .get_regs_len = ixgb_get_regs_len, - .get_eeprom_len = ixgb_get_eeprom_len, - .get_eeprom = ixgb_ethtool_geeprom, - .set_eeprom = ixgb_ethtool_seeprom, - .get_pauseparam = ixgb_ethtool_gpause, - .set_pauseparam = ixgb_ethtool_spause, - .get_ethtool_stats = get_ethtool_stats, - .get_rx_csum = ixgb_get_rx_csum, - .set_rx_csum = ixgb_set_rx_csum, - .get_tx_csum = ixgb_get_tx_csum, - .set_tx_csum = ixgb_set_tx_csum, - .get_sg = ixgb_get_sg, - .set_sg = ixgb_set_sg, + .get_settings = ixgb_get_settings, + .set_settings = ixgb_set_settings, + .get_drvinfo = ixgb_get_drvinfo, + .get_regs_len = ixgb_get_regs_len, + .get_regs = ixgb_get_regs, + .get_link = ethtool_op_get_link, + .get_eeprom_len = ixgb_get_eeprom_len, + .get_eeprom = ixgb_get_eeprom, + .set_eeprom = ixgb_set_eeprom, + .get_ringparam = ixgb_get_ringparam, + .set_ringparam = ixgb_set_ringparam, + .get_pauseparam = ixgb_get_pauseparam, + .set_pauseparam = ixgb_set_pauseparam, + .get_rx_csum = ixgb_get_rx_csum, + .set_rx_csum = ixgb_set_rx_csum, + .get_tx_csum = ixgb_get_tx_csum, + .set_tx_csum = ixgb_set_tx_csum, + .get_sg = ethtool_op_get_sg, + .set_sg = ethtool_op_set_sg, #ifdef NETIF_F_TSO - .get_tso = ixgb_get_tso, - .set_tso = ixgb_set_tso, + .get_tso = ethtool_op_get_tso, + .set_tso = ixgb_set_tso, #endif + .get_strings = ixgb_get_strings, + .phys_id = ixgb_phys_id, + .get_stats_count = ixgb_get_stats_count, + .get_ethtool_stats = ixgb_get_ethtool_stats, }; + +void set_ethtool_ops(struct net_device *netdev) +{ + SET_ETHTOOL_OPS(netdev, &ixgb_ethtool_ops); +} diff -up netdev-2.6/drivers/net/ixgb/ixgb.h netdev-2.6/drivers/net/ixgb.new/ixgb.h --- netdev-2.6/drivers/net/ixgb/ixgb.h 2004-10-15 13:15:38.000000000 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb.h 2004-10-15 13:15:51.000000000 -0700 @@ -86,6 +86,15 @@ struct ixgb_adapter; #define IXGB_ERR(args...) printk(KERN_ERR "ixgb: " args) +/* TX/RX descriptor defines */ +#define DEFAULT_TXD 256 +#define MAX_TXD 4096 +#define MIN_TXD 64 + +#define DEFAULT_RXD 1024 +#define MAX_RXD 4096 +#define MIN_RXD 64 + /* Supported Rx Buffer Sizes */ #define IXGB_RXBUFFER_2048 2048 #define IXGB_RXBUFFER_4096 4096 diff -up netdev-2.6/drivers/net/ixgb/ixgb_main.c netdev-2.6/drivers/net/ixgb.new/ixgb_main.c --- netdev-2.6/drivers/net/ixgb/ixgb_main.c 2004-10-15 13:15:38.000000000 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb_main.c 2004-10-15 13:15:55.000000000 -0700 @@ -60,6 +60,11 @@ MODULE_DEVICE_TABLE(pci, ixgb_pci_tbl); int ixgb_up(struct ixgb_adapter *adapter); void ixgb_down(struct ixgb_adapter *adapter, boolean_t kill_watchdog); void ixgb_reset(struct ixgb_adapter *adapter); +int ixgb_setup_tx_resources(struct ixgb_adapter *adapter); +int ixgb_setup_rx_resources(struct ixgb_adapter *adapter); +void ixgb_free_tx_resources(struct ixgb_adapter *adapter); +void ixgb_free_rx_resources(struct ixgb_adapter *adapter); +void ixgb_update_stats(struct ixgb_adapter *adapter); static int ixgb_init_module(void); static void ixgb_exit_module(void); @@ -68,15 +71,11 @@ static void __devexit ixgb_remove(struct static int ixgb_sw_init(struct ixgb_adapter *adapter); static int ixgb_open(struct net_device *netdev); static int ixgb_close(struct net_device *netdev); -static int ixgb_setup_tx_resources(struct ixgb_adapter *adapter); -static int ixgb_setup_rx_resources(struct ixgb_adapter *adapter); static void ixgb_configure_tx(struct ixgb_adapter *adapter); static void ixgb_configure_rx(struct ixgb_adapter *adapter); static void ixgb_setup_rctl(struct ixgb_adapter *adapter); static void ixgb_clean_tx_ring(struct ixgb_adapter *adapter); static void ixgb_clean_rx_ring(struct ixgb_adapter *adapter); -static void ixgb_free_tx_resources(struct ixgb_adapter *adapter); -static void ixgb_free_rx_resources(struct ixgb_adapter *adapter); static void ixgb_set_multi(struct net_device *netdev); static void ixgb_watchdog(unsigned long data); static int ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev); @@ -83,7 +71,6 @@ static struct net_device_stats *ixgb_get_stats(struct net_device *netdev); static int ixgb_change_mtu(struct net_device *netdev, int new_mtu); static int ixgb_set_mac(struct net_device *netdev, void *p); -static void ixgb_update_stats(struct ixgb_adapter *adapter); static irqreturn_t ixgb_intr(int irq, void *data, struct pt_regs *regs); static boolean_t ixgb_clean_tx_irq(struct ixgb_adapter *adapter); static inline void ixgb_rx_checksum(struct ixgb_adapter *adapter, @@ -97,6 +71,7 @@ static boolean_t ixgb_clean_rx_irq(struct ixgb_adapter *adapter); #endif static void ixgb_alloc_rx_buffers(struct ixgb_adapter *adapter); +void set_ethtool_ops(struct net_device *netdev); static void ixgb_tx_timeout(struct net_device *dev); static void ixgb_tx_timeout_task(struct net_device *dev); static void ixgb_vlan_rx_register(struct net_device *netdev, @@ -123,7 +71,6 @@ /* Exported from other modules */ extern void ixgb_check_options(struct ixgb_adapter *adapter); -extern struct ethtool_ops ixgb_ethtool_ops; static struct pci_driver ixgb_driver = { .name = ixgb_driver_name, @@ -371,9 +357,9 @@ ixgb_probe(struct pci_dev *pdev, const s netdev->set_multicast_list = &ixgb_set_multi; netdev->set_mac_address = &ixgb_set_mac; netdev->change_mtu = &ixgb_change_mtu; + set_ethtool_ops(netdev); netdev->tx_timeout = &ixgb_tx_timeout; netdev->watchdog_timeo = HZ; - SET_ETHTOOL_OPS(netdev, &ixgb_ethtool_ops); #ifdef CONFIG_IXGB_NAPI netdev->poll = &ixgb_clean; netdev->weight = 64; @@ -601,7 +600,8 @@ static int ixgb_close(struct net_device * Return 0 on success, negative on failure **/ -static int ixgb_setup_tx_resources(struct ixgb_adapter *adapter) +int +ixgb_setup_tx_resources(struct ixgb_adapter *adapter) { struct ixgb_desc_ring *txdr = &adapter->tx_ring; struct pci_dev *pdev = adapter->pdev; @@ -690,7 +691,8 @@ static void ixgb_configure_tx(struct ixg * Returns 0 on success, negative on failure **/ -static int ixgb_setup_rx_resources(struct ixgb_adapter *adapter) +int +ixgb_setup_rx_resources(struct ixgb_adapter *adapter) { struct ixgb_desc_ring *rxdr = &adapter->rx_ring; struct pci_dev *pdev = adapter->pdev; @@ -859,7 +865,8 @@ static void ixgb_configure_rx(struct ixg * Free all transmit software resources **/ -static void ixgb_free_tx_resources(struct ixgb_adapter *adapter) +void +ixgb_free_tx_resources(struct ixgb_adapter *adapter) { struct pci_dev *pdev = adapter->pdev; @@ -924,7 +932,8 @@ static void ixgb_clean_tx_ring(struct ix * Free all receive software resources **/ -static void ixgb_free_rx_resources(struct ixgb_adapter *adapter) +void +ixgb_free_rx_resources(struct ixgb_adapter *adapter) { struct ixgb_desc_ring *rx_ring = &adapter->rx_ring; struct pci_dev *pdev = adapter->pdev; @@ -1474,7 +1474,8 @@ static int ixgb_change_mtu(struct net_de * @adapter: board private structure **/ -static void ixgb_update_stats(struct ixgb_adapter *adapter) +void +ixgb_update_stats(struct ixgb_adapter *adapter) { adapter->stats.tprl += IXGB_READ_REG(&adapter->hw, TPRL); adapter->stats.tprh += IXGB_READ_REG(&adapter->hw, TPRH); diff -up netdev-2.6/drivers/net/ixgb/ixgb_param.c netdev-2.6/drivers/net/ixgb.new/ixgb_param.c --- netdev-2.6/drivers/net/ixgb/ixgb_param.c 2004-10-15 13:15:38.000000000 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb_param.c 2004-10-15 13:15:57.000000000 -0700 @@ -173,13 +173,6 @@ IXGB_PARAM(FCReqTimeout, "Flow Control R IXGB_PARAM(IntDelayEnable, "Transmit Interrupt Delay Enable"); -#define DEFAULT_TXD 256 -#define MAX_TXD 4096 -#define MIN_TXD 64 - -#define DEFAULT_RXD 1024 -#define MAX_RXD 4096 -#define MIN_RXD 64 #define DEFAULT_TIDV 32 #define MAX_TIDV 0xFFFF From ganesh.venkatesan@intel.com Fri Oct 29 05:13:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 05:13:26 -0700 (PDT) Received: from hermes.jf.intel.com (fmr05.intel.com [134.134.136.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TCDLhP024417 for ; Fri, 29 Oct 2004 05:13:21 -0700 Received: from petasus.jf.intel.com (petasus.jf.intel.com [10.7.209.6]) by hermes.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9TCH4pr003592; Fri, 29 Oct 2004 12:17:04 GMT Received: from orsmsxvs040.jf.intel.com (orsmsxvs040.jf.intel.com [192.168.65.206]) by petasus.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9TCGfuA020299; Fri, 29 Oct 2004 12:16:46 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by orsmsxvs040.jf.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004102905130014538 ; Fri, 29 Oct 2004 05:13:00 -0700 Date: Fri, 29 Oct 2004 05:13:00 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [PATCH netdev-2.6 9/10] ixgb: Version number update Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 11101 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Signed-off-by: ganesh venkatesan diff -up netdev-2.6/drivers/net/ixgb/ixgb_main.c netdev-2.6/drivers/net/ixgb.new/ixgb_main.c --- netdev-2.6/drivers/net/ixgb/ixgb_main.c 2004-10-15 13:15:38.000000000 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb_main.c 2004-10-15 13:15:55.000000000 -0700 @@ -30,8 +30,13 @@ char ixgb_driver_name[] = "ixgb"; char ixgb_driver_string[] = "Intel(R) PRO/10GbE Network Driver"; -char ixgb_driver_version[] = "1.0.66-k2"; -char ixgb_copyright[] = "Copyright (c) 2001-2004 Intel Corporation."; +#ifndef CONFIG_IXGB_NAPI +#define DRIVERNAPI +#else +#define DRIVERNAPI "-NAPI" +#endif +char ixgb_driver_version[] = "1.0.82-k2"DRIVERNAPI; +char ixgb_copyright[] = "Copyright (c) 1999-2004 Intel Corporation."; /* ixgb_pci_tbl - PCI Device ID Table * From ganesh.venkatesan@intel.com Fri Oct 29 05:13:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 05:14:00 -0700 (PDT) Received: from fmsfmr001.fm.intel.com ([192.55.52.67]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TCDl9J024835 for ; Fri, 29 Oct 2004 05:13:47 -0700 Received: from talaria.fm.intel.com (talaria.fm.intel.com [10.1.192.39]) by fmsfmr001.fm.intel.com (8.12.10/8.12.10/d: major-outer.mc,v 1.1 2004/09/17 17:50:56 root Exp $) with ESMTP id i9TCDQqX016186; Fri, 29 Oct 2004 12:13:26 GMT Received: from fmsmsxvs041.fm.intel.com (fmsmsxvs041.fm.intel.com [132.233.42.126]) by talaria.fm.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9TCH0Dg005567; Fri, 29 Oct 2004 12:17:14 GMT Received: from isotope.jf.intel.com ([10.23.51.23]) by fmsmsxvs041.fm.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004102905132532316 ; Fri, 29 Oct 2004 05:13:25 -0700 Date: Fri, 29 Oct 2004 05:13:25 -0700 (PDT) From: Ganesh Venkatesan To: "jgarzik@pobox.com" cc: netdev Subject: [PATCH netdev-2.6 10/10] ixgb: White space corrections Message-ID: ReplyTo: "Ganesh Venkatesan" MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) X-archive-position: 11102 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev Signed-off-by: ganesh venkatesan diff -up netdev-2.6/drivers/net/ixgb/ixgb_ee.c netdev-2.6/drivers/net/ixgb.new/ixgb_ee.c --- netdev-2.6/drivers/net/ixgb/ixgb_ee.c 2004-10-15 13:15:38.000000000 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb_ee.c 2004-10-15 13:15:44.000000000 -0700 @@ -32,7 +32,8 @@ static uint16_t ixgb_shift_in_bits(struct ixgb_hw *hw); static void ixgb_shift_out_bits(struct ixgb_hw *hw, - uint16_t data, uint16_t count); + uint16_t data, + uint16_t count); static void ixgb_standby_eeprom(struct ixgb_hw *hw); static boolean_t ixgb_wait_eeprom_command(struct ixgb_hw *hw); @@ -45,7 +46,9 @@ static void ixgb_cleanup_eeprom(struct i * hw - Struct containing variables accessed by shared code * eecd_reg - EECD's current value *****************************************************************************/ -static void ixgb_raise_clock(struct ixgb_hw *hw, uint32_t * eecd_reg) +static void +ixgb_raise_clock(struct ixgb_hw *hw, + uint32_t *eecd_reg) { /* Raise the clock input to the EEPROM (by setting the SK bit), and then * wait 50 microseconds. @@ -62,7 +63,9 @@ static void ixgb_raise_clock(struct ixgb * hw - Struct containing variables accessed by shared code * eecd_reg - EECD's current value *****************************************************************************/ -static void ixgb_lower_clock(struct ixgb_hw *hw, uint32_t * eecd_reg) +static void +ixgb_lower_clock(struct ixgb_hw *hw, + uint32_t *eecd_reg) { /* Lower the clock input to the EEPROM (by clearing the SK bit), and then * wait 50 microseconds. @@ -81,7 +82,9 @@ static void ixgb_lower_clock(struct ixgb * count - number of bits to shift out *****************************************************************************/ static void -ixgb_shift_out_bits(struct ixgb_hw *hw, uint16_t data, uint16_t count) +ixgb_shift_out_bits(struct ixgb_hw *hw, + uint16_t data, + uint16_t count) { uint32_t eecd_reg; uint32_t mask; @@ -101,7 +101,7 @@ ixgb_shift_out_bits(struct ixgb_hw *hw, */ eecd_reg &= ~IXGB_EECD_DI; - if (data & mask) + if(data & mask) eecd_reg |= IXGB_EECD_DI; IXGB_WRITE_REG(hw, EECD, eecd_reg); @@ -113,7 +120,7 @@ ixgb_shift_out_bits(struct ixgb_hw *hw, mask = mask >> 1; - } while (mask); + } while(mask); /* We leave the "DI" bit set to "0" when we leave this routine. */ eecd_reg &= ~IXGB_EECD_DI; @@ -126,7 +133,8 @@ ixgb_shift_out_bits(struct ixgb_hw *hw, * * hw - Struct containing variables accessed by shared code *****************************************************************************/ -static uint16_t ixgb_shift_in_bits(struct ixgb_hw *hw) +static uint16_t +ixgb_shift_in_bits(struct ixgb_hw *hw) { uint32_t eecd_reg; uint32_t i; @@ -144,14 +152,14 @@ static uint16_t ixgb_shift_in_bits(struc eecd_reg &= ~(IXGB_EECD_DO | IXGB_EECD_DI); data = 0; - for (i = 0; i < 16; i++) { + for(i = 0; i < 16; i++) { data = data << 1; ixgb_raise_clock(hw, &eecd_reg); eecd_reg = IXGB_READ_REG(hw, EECD); eecd_reg &= ~(IXGB_EECD_DI); - if (eecd_reg & IXGB_EECD_DO) + if(eecd_reg & IXGB_EECD_DO) data |= 1; ixgb_lower_clock(hw, &eecd_reg); @@ -168,7 +176,8 @@ static uint16_t ixgb_shift_in_bits(struc * Lowers EEPROM clock. Clears input pin. Sets the chip select pin. This * function should be called before issuing a command to the EEPROM. *****************************************************************************/ -static void ixgb_setup_eeprom(struct ixgb_hw *hw) +static void +ixgb_setup_eeprom(struct ixgb_hw *hw) { uint32_t eecd_reg; @@ -189,7 +198,8 @@ static void ixgb_setup_eeprom(struct ixg * * hw - Struct containing variables accessed by shared code *****************************************************************************/ -static void ixgb_standby_eeprom(struct ixgb_hw *hw) +static void +ixgb_standby_eeprom(struct ixgb_hw *hw) { uint32_t eecd_reg; @@ -222,7 +232,8 @@ static void ixgb_standby_eeprom(struct i * * hw - Struct containing variables accessed by shared code *****************************************************************************/ -static void ixgb_clock_eeprom(struct ixgb_hw *hw) +static void +ixgb_clock_eeprom(struct ixgb_hw *hw) { uint32_t eecd_reg; @@ -245,7 +256,8 @@ static void ixgb_clock_eeprom(struct ixg * * hw - Struct containing variables accessed by shared code *****************************************************************************/ -static void ixgb_cleanup_eeprom(struct ixgb_hw *hw) +static void +ixgb_cleanup_eeprom(struct ixgb_hw *hw) { uint32_t eecd_reg; @@ -270,7 +268,8 @@ static void ixgb_cleanup_eeprom(struct i * TRUE: EEPROM data pin is high before timeout. * FALSE: Time expired. *****************************************************************************/ -static boolean_t ixgb_wait_eeprom_command(struct ixgb_hw *hw) +static boolean_t +ixgb_wait_eeprom_command(struct ixgb_hw *hw) { uint32_t eecd_reg; uint32_t i; @@ -284,10 +297,10 @@ static boolean_t ixgb_wait_eeprom_comman * signal that the command has been completed by raising the DO signal. * If DO does not go high in 10 milliseconds, then error out. */ - for (i = 0; i < 200; i++) { + for(i = 0; i < 200; i++) { eecd_reg = IXGB_READ_REG(hw, EECD); - if (eecd_reg & IXGB_EECD_DO) + if(eecd_reg & IXGB_EECD_DO) return (TRUE); udelay(50); @@ -309,15 +322,16 @@ static boolean_t ixgb_wait_eeprom_comman * TRUE: Checksum is valid * FALSE: Checksum is not valid. *****************************************************************************/ -boolean_t ixgb_validate_eeprom_checksum(struct ixgb_hw * hw) +boolean_t +ixgb_validate_eeprom_checksum(struct ixgb_hw *hw) { uint16_t checksum = 0; uint16_t i; - for (i = 0; i < (EEPROM_CHECKSUM_REG + 1); i++) + for(i = 0; i < (EEPROM_CHECKSUM_REG + 1); i++) checksum += ixgb_read_eeprom(hw, i); - if (checksum == (uint16_t) EEPROM_SUM) + if(checksum == (uint16_t) EEPROM_SUM) return (TRUE); else return (FALSE); @@ -331,12 +345,13 @@ boolean_t ixgb_validate_eeprom_checksum( * Sums the first 63 16 bit words of the EEPROM. Subtracts the sum from 0xBABA. * Writes the difference to word offset 63 of the EEPROM. *****************************************************************************/ -void ixgb_update_eeprom_checksum(struct ixgb_hw *hw) +void +ixgb_update_eeprom_checksum(struct ixgb_hw *hw) { uint16_t checksum = 0; uint16_t i; - for (i = 0; i < EEPROM_CHECKSUM_REG; i++) + for(i = 0; i < EEPROM_CHECKSUM_REG; i++) checksum += ixgb_read_eeprom(hw, i); checksum = (uint16_t) EEPROM_SUM - checksum; @@ -356,7 +371,10 @@ void ixgb_update_eeprom_checksum(struct * EEPROM will most likely contain an invalid checksum. * *****************************************************************************/ -void ixgb_write_eeprom(struct ixgb_hw *hw, uint16_t offset, uint16_t data) +void +ixgb_write_eeprom(struct ixgb_hw *hw, + uint16_t offset, + uint16_t data) { /* Prepare the EEPROM for writing */ ixgb_setup_eeprom(hw); @@ -404,7 +422,9 @@ void ixgb_write_eeprom(struct ixgb_hw *h * Returns: * The 16-bit value read from the eeprom *****************************************************************************/ -uint16_t ixgb_read_eeprom(struct ixgb_hw * hw, uint16_t offset) +uint16_t +ixgb_read_eeprom(struct ixgb_hw *hw, + uint16_t offset) { uint16_t data; @@ -437,7 +437,8 @@ uint16_t ixgb_read_eeprom(struct ixgb_hw * TRUE: if eeprom read is successful * FALSE: otherwise. *****************************************************************************/ -boolean_t ixgb_get_eeprom_data(struct ixgb_hw * hw) +boolean_t +ixgb_get_eeprom_data(struct ixgb_hw *hw) { uint16_t i; uint16_t checksum = 0; @@ -448,7 +448,7 @@ boolean_t ixgb_get_eeprom_data(struct ix ee_map = (struct ixgb_ee_map_type *)hw->eeprom; DEBUGOUT("ixgb_ee: Reading eeprom data\n"); - for (i = 0; i < IXGB_EEPROM_SIZE; i++) { + for(i=0; i < IXGB_EEPROM_SIZE ; i++) { uint16_t ee_data; ee_data = ixgb_read_eeprom(hw, i); checksum += ee_data; @@ -463,10 +464,10 @@ boolean_t ixgb_get_eeprom_data(struct ix if ((ee_map->init_ctrl_reg_1 & le16_to_cpu(EEPROM_ICW1_SIGNATURE_MASK)) != le16_to_cpu(EEPROM_ICW1_SIGNATURE_VALID)) { DEBUGOUT("ixgb_ee: Signature invalid.\n"); - return (FALSE); + return(FALSE); } - return (TRUE); + return(TRUE); } /****************************************************************************** @@ -479,12 +480,13 @@ boolean_t ixgb_get_eeprom_data(struct ix * TRUE: eeprom signature was good and the eeprom read was successful * FALSE: otherwise. ******************************************************************************/ -static boolean_t ixgb_check_and_get_eeprom_data(struct ixgb_hw *hw) +static boolean_t +ixgb_check_and_get_eeprom_data (struct ixgb_hw* hw) { struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; if ((ee_map->init_ctrl_reg_1 & le16_to_cpu(EEPROM_ICW1_SIGNATURE_MASK)) - == le16_to_cpu(EEPROM_ICW1_SIGNATURE_VALID)) { + == le16_to_cpu(EEPROM_ICW1_SIGNATURE_VALID)) { return (TRUE); } else { return ixgb_get_eeprom_data(hw); @@ -500,15 +503,16 @@ static boolean_t ixgb_check_and_get_eepr * Returns: * Word at indexed offset in eeprom, if valid, 0 otherwise. ******************************************************************************/ -uint16_t ixgb_get_eeprom_word(struct ixgb_hw * hw, uint16_t index) +uint16_t +ixgb_get_eeprom_word(struct ixgb_hw *hw, uint16_t index) { if ((index < IXGB_EEPROM_SIZE) && - (ixgb_check_and_get_eeprom_data(hw) == TRUE)) { - return (hw->eeprom[index]); + (ixgb_check_and_get_eeprom_data (hw) == TRUE)) { + return(hw->eeprom[index]); } - return (0); + return(0); } /****************************************************************************** @@ -519,7 +503,9 @@ * * Returns: None. ******************************************************************************/ -void ixgb_get_ee_mac_addr(struct ixgb_hw *hw, uint8_t * mac_addr) +void +ixgb_get_ee_mac_addr(struct ixgb_hw *hw, + uint8_t *mac_addr) { int i; struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; @@ -526,7 +503,7 @@ DEBUGFUNC("ixgb_get_ee_mac_addr"); - if (ixgb_check_and_get_eeprom_data(hw) == TRUE) { + if(ixgb_check_and_get_eeprom_data(hw) == TRUE) { for (i = 0; i < IXGB_ETH_LENGTH_OF_ADDRESS; i++) { mac_addr[i] = ee_map->mac_addr[i]; DEBUGOUT2("mac(%d) = %.2X\n", i, mac_addr[i]); @@ -542,14 +546,15 @@ void ixgb_get_ee_mac_addr(struct ixgb_hw * Returns: * compatibility flags if EEPROM contents are valid, 0 otherwise ******************************************************************************/ -uint16_t ixgb_get_ee_compatibility(struct ixgb_hw *hw) +uint16_t +ixgb_get_ee_compatibility(struct ixgb_hw *hw) { struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; - if (ixgb_check_and_get_eeprom_data(hw) == TRUE) - return (ee_map->compatibility); + if(ixgb_check_and_get_eeprom_data(hw) == TRUE) + return(ee_map->compatibility); - return (0); + return(0); } /****************************************************************************** @@ -560,13 +564,14 @@ uint16_t ixgb_get_ee_compatibility(struc * Returns: * PBA number if EEPROM contents are valid, 0 otherwise ******************************************************************************/ -uint32_t ixgb_get_ee_pba_number(struct ixgb_hw * hw) +uint32_t +ixgb_get_ee_pba_number(struct ixgb_hw *hw) { - if (ixgb_check_and_get_eeprom_data(hw) == TRUE) - return (le16_to_cpu(hw->eeprom[EEPROM_PBA_1_2_REG]) - | (le16_to_cpu(hw->eeprom[EEPROM_PBA_3_4_REG]) << 16)); + if(ixgb_check_and_get_eeprom_data(hw) == TRUE) + return(le16_to_cpu(hw->eeprom[EEPROM_PBA_1_2_REG]) | + (le16_to_cpu(hw->eeprom[EEPROM_PBA_3_4_REG])<<16)); - return (0); + return(0); } /****************************************************************************** @@ -577,14 +581,15 @@ uint32_t ixgb_get_ee_pba_number(struct i * Returns: * Initialization Control Word 1 if EEPROM contents are valid, 0 otherwise ******************************************************************************/ -uint16_t ixgb_get_ee_init_ctrl_reg_1(struct ixgb_hw * hw) +uint16_t +ixgb_get_ee_init_ctrl_reg_1(struct ixgb_hw *hw) { struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; - if (ixgb_check_and_get_eeprom_data(hw) == TRUE) - return (ee_map->init_ctrl_reg_1); + if(ixgb_check_and_get_eeprom_data(hw) == TRUE) + return(ee_map->init_ctrl_reg_1); - return (0); + return(0); } /****************************************************************************** @@ -595,14 +599,15 @@ uint16_t ixgb_get_ee_init_ctrl_reg_1(str * Returns: * Initialization Control Word 2 if EEPROM contents are valid, 0 otherwise ******************************************************************************/ -uint16_t ixgb_get_ee_init_ctrl_reg_2(struct ixgb_hw * hw) +uint16_t +ixgb_get_ee_init_ctrl_reg_2(struct ixgb_hw *hw) { struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; - if (ixgb_check_and_get_eeprom_data(hw) == TRUE) - return (ee_map->init_ctrl_reg_2); + if(ixgb_check_and_get_eeprom_data(hw) == TRUE) + return(ee_map->init_ctrl_reg_2); - return (0); + return(0); } /****************************************************************************** @@ -613,14 +617,15 @@ uint16_t ixgb_get_ee_init_ctrl_reg_2(str * Returns: * Subsystem Id if EEPROM contents are valid, 0 otherwise ******************************************************************************/ -uint16_t ixgb_get_ee_subsystem_id(struct ixgb_hw * hw) +uint16_t +ixgb_get_ee_subsystem_id(struct ixgb_hw *hw) { struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; - if (ixgb_check_and_get_eeprom_data(hw) == TRUE) - return (ee_map->subsystem_id); + if(ixgb_check_and_get_eeprom_data(hw) == TRUE) + return(ee_map->subsystem_id); - return (0); + return(0); } /****************************************************************************** @@ -631,14 +635,15 @@ uint16_t ixgb_get_ee_subsystem_id(struct * Returns: * Sub Vendor Id if EEPROM contents are valid, 0 otherwise ******************************************************************************/ -uint16_t ixgb_get_ee_subvendor_id(struct ixgb_hw * hw) +uint16_t +ixgb_get_ee_subvendor_id(struct ixgb_hw *hw) { struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; - if (ixgb_check_and_get_eeprom_data(hw) == TRUE) - return (ee_map->subvendor_id); + if (ixgb_check_and_get_eeprom_data (hw) == TRUE) + return(ee_map->subvendor_id); - return (0); + return(0); } /****************************************************************************** @@ -649,14 +653,15 @@ uint16_t ixgb_get_ee_subvendor_id(struct * Returns: * Device Id if EEPROM contents are valid, 0 otherwise ******************************************************************************/ -uint16_t ixgb_get_ee_device_id(struct ixgb_hw * hw) +uint16_t +ixgb_get_ee_device_id(struct ixgb_hw *hw) { struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; - if (ixgb_check_and_get_eeprom_data(hw) == TRUE) - return (ee_map->device_id); + if(ixgb_check_and_get_eeprom_data(hw) == TRUE) + return(ee_map->device_id); - return (0); + return(0); } /****************************************************************************** @@ -667,14 +671,15 @@ uint16_t ixgb_get_ee_device_id(struct ix * Returns: * Device Id if EEPROM contents are valid, 0 otherwise ******************************************************************************/ -uint16_t ixgb_get_ee_vendor_id(struct ixgb_hw * hw) +uint16_t +ixgb_get_ee_vendor_id(struct ixgb_hw *hw) { struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; - if (ixgb_check_and_get_eeprom_data(hw) == TRUE) - return (ee_map->vendor_id); + if(ixgb_check_and_get_eeprom_data(hw) == TRUE) + return(ee_map->vendor_id); - return (0); + return(0); } /****************************************************************************** @@ -685,14 +689,15 @@ uint16_t ixgb_get_ee_vendor_id(struct ix * Returns: * SDP Register if EEPROM contents are valid, 0 otherwise ******************************************************************************/ -uint16_t ixgb_get_ee_swdpins_reg(struct ixgb_hw * hw) +uint16_t +ixgb_get_ee_swdpins_reg(struct ixgb_hw *hw) { struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; - if (ixgb_check_and_get_eeprom_data(hw) == TRUE) - return (ee_map->swdpins_reg); + if(ixgb_check_and_get_eeprom_data(hw) == TRUE) + return(ee_map->swdpins_reg); - return (0); + return(0); } /****************************************************************************** @@ -703,14 +707,15 @@ uint16_t ixgb_get_ee_swdpins_reg(struct * Returns: * D3 Power Management Bits if EEPROM contents are valid, 0 otherwise ******************************************************************************/ -uint8_t ixgb_get_ee_d3_power(struct ixgb_hw * hw) +uint8_t +ixgb_get_ee_d3_power(struct ixgb_hw *hw) { struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; - if (ixgb_check_and_get_eeprom_data(hw) == TRUE) - return (ee_map->d3_power); + if(ixgb_check_and_get_eeprom_data(hw) == TRUE) + return(ee_map->d3_power); - return (0); + return(0); } /****************************************************************************** @@ -721,12 +725,13 @@ uint8_t ixgb_get_ee_d3_power(struct ixgb * Returns: * D0 Power Management Bits if EEPROM contents are valid, 0 otherwise ******************************************************************************/ -uint8_t ixgb_get_ee_d0_power(struct ixgb_hw * hw) +uint8_t +ixgb_get_ee_d0_power(struct ixgb_hw *hw) { struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; - if (ixgb_check_and_get_eeprom_data(hw) == TRUE) - return (ee_map->d0_power); + if(ixgb_check_and_get_eeprom_data(hw) == TRUE) + return(ee_map->d0_power); - return (0); + return(0); } diff -up netdev-2.6/drivers/net/ixgb/ixgb_ee.h netdev-2.6/drivers/net/ixgb.new/ixgb_ee.h --- netdev-2.6/drivers/net/ixgb/ixgb_ee.h 2004-10-15 13:15:38.000000000 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb_ee.h 2004-10-15 13:15:49.000000000 -0700 @@ -29,35 +29,35 @@ #ifndef _IXGB_EE_H_ #define _IXGB_EE_H_ -#define IXGB_EEPROM_SIZE 64 /* Size in words */ +#define IXGB_EEPROM_SIZE 64 /* Size in words */ #define IXGB_ETH_LENGTH_OF_ADDRESS 6 /* EEPROM Commands */ -#define EEPROM_READ_OPCODE 0x6 /* EERPOM read opcode */ -#define EEPROM_WRITE_OPCODE 0x5 /* EERPOM write opcode */ -#define EEPROM_ERASE_OPCODE 0x7 /* EERPOM erase opcode */ -#define EEPROM_EWEN_OPCODE 0x13 /* EERPOM erase/write enable */ -#define EEPROM_EWDS_OPCODE 0x10 /* EERPOM erast/write disable */ +#define EEPROM_READ_OPCODE 0x6 /* EERPOM read opcode */ +#define EEPROM_WRITE_OPCODE 0x5 /* EERPOM write opcode */ +#define EEPROM_ERASE_OPCODE 0x7 /* EERPOM erase opcode */ +#define EEPROM_EWEN_OPCODE 0x13 /* EERPOM erase/write enable */ +#define EEPROM_EWDS_OPCODE 0x10 /* EERPOM erase/write disable */ /* EEPROM MAP (Word Offsets) */ -#define EEPROM_IA_1_2_REG 0x0000 -#define EEPROM_IA_3_4_REG 0x0001 -#define EEPROM_IA_5_6_REG 0x0002 +#define EEPROM_IA_1_2_REG 0x0000 +#define EEPROM_IA_3_4_REG 0x0001 +#define EEPROM_IA_5_6_REG 0x0002 #define EEPROM_COMPATIBILITY_REG 0x0003 -#define EEPROM_PBA_1_2_REG 0x0008 -#define EEPROM_PBA_3_4_REG 0x0009 +#define EEPROM_PBA_1_2_REG 0x0008 +#define EEPROM_PBA_3_4_REG 0x0009 #define EEPROM_INIT_CONTROL1_REG 0x000A -#define EEPROM_SUBSYS_ID_REG 0x000B -#define EEPROM_SUBVEND_ID_REG 0x000C -#define EEPROM_DEVICE_ID_REG 0x000D -#define EEPROM_VENDOR_ID_REG 0x000E +#define EEPROM_SUBSYS_ID_REG 0x000B +#define EEPROM_SUBVEND_ID_REG 0x000C +#define EEPROM_DEVICE_ID_REG 0x000D +#define EEPROM_VENDOR_ID_REG 0x000E #define EEPROM_INIT_CONTROL2_REG 0x000F -#define EEPROM_SWDPINS_REG 0x0020 +#define EEPROM_SWDPINS_REG 0x0020 #define EEPROM_CIRCUIT_CTRL_REG 0x0021 #define EEPROM_D0_D3_POWER_REG 0x0022 -#define EEPROM_FLASH_VERSION 0x0032 -#define EEPROM_CHECKSUM_REG 0x003F +#define EEPROM_FLASH_VERSION 0x0032 +#define EEPROM_CHECKSUM_REG 0x003F /* Mask bits for fields in Word 0x0a of the EEPROM */ @@ -73,26 +75,26 @@ /* EEPROM Map defines (WORD OFFSETS)*/ /* EEPROM structure */ -struct ixgb_ee_map_type { - uint8_t mac_addr[IXGB_ETH_LENGTH_OF_ADDRESS]; - uint16_t compatibility; - uint16_t reserved1[4]; - uint32_t pba_number; - uint16_t init_ctrl_reg_1; - uint16_t subsystem_id; - uint16_t subvendor_id; - uint16_t device_id; - uint16_t vendor_id; - uint16_t init_ctrl_reg_2; - uint16_t oem_reserved[16]; - uint16_t swdpins_reg; - uint16_t circuit_ctrl_reg; - uint8_t d3_power; - uint8_t d0_power; - uint16_t reserved2[28]; - uint16_t checksum; -}; +struct ixgb_ee_map_type{ + uint8_t mac_addr[IXGB_ETH_LENGTH_OF_ADDRESS]; + uint16_t compatibility; + uint16_t reserved1[4]; + uint32_t pba_number; + uint16_t init_ctrl_reg_1; + uint16_t subsystem_id; + uint16_t subvendor_id; + uint16_t device_id; + uint16_t vendor_id; + uint16_t init_ctrl_reg_2; + uint16_t oem_reserved[16]; + uint16_t swdpins_reg; + uint16_t circuit_ctrl_reg; + uint8_t d3_power; + uint8_t d0_power; + uint16_t reserved2[28]; + uint16_t checksum; +}; /* EEPROM Functions */ uint16_t ixgb_read_eeprom(struct ixgb_hw *hw, uint16_t reg); @@ -101,5 +75,5 @@ void ixgb_update_eeprom_checksum(struct ixgb_hw *hw); void ixgb_write_eeprom(struct ixgb_hw *hw, uint16_t reg, uint16_t data); +#endif /* IXGB_EE_H */ -#endif /* IXGB_EE_H */ diff -up netdev-2.6/drivers/net/ixgb/ixgb_ethtool.c netdev-2.6/drivers/net/ixgb.new/ixgb_ethtool.c --- netdev-2.6/drivers/net/ixgb/ixgb_ethtool.c 2004-10-15 13:15:38.000000000 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb_ethtool.c 2004-10-15 13:15:50.000000000 -0700 @@ -51,7 +51,7 @@ struct ixgb_stats { }; #define IXGB_STAT(m) sizeof(((struct ixgb_adapter *)0)->m), \ - offsetof(struct ixgb_adapter, m) + offsetof(struct ixgb_adapter, m) static struct ixgb_stats ixgb_gstrings_stats[] = { {"rx_packets", IXGB_STAT(net_stats.rx_packets)}, {"tx_packets", IXGB_STAT(net_stats.tx_packets)}, @@ -98,12 +98,13 @@ ixgb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) { struct ixgb_adapter *adapter = netdev->priv; + ecmd->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE); ecmd->advertising = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE); ecmd->port = PORT_FIBRE; ecmd->transceiver = XCVR_EXTERNAL; - if (netif_carrier_ok(adapter->netdev)) { + if(netif_carrier_ok(adapter->netdev)) { ecmd->speed = SPEED_10000; ecmd->duplex = DUPLEX_FULL; } else { @@ -119,8 +114,8 @@ ixgb_ethtool_gset(struct net_device *net ixgb_set_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) { struct ixgb_adapter *adapter = netdev->priv; - if (ecmd->autoneg == AUTONEG_ENABLE || - ecmd->speed + ecmd->duplex != SPEED_10000 + DUPLEX_FULL) + if(ecmd->autoneg == AUTONEG_ENABLE || + ecmd->speed + ecmd->duplex != SPEED_10000 + DUPLEX_FULL) return -EINVAL; if(netif_running(adapter->netdev)) { diff -up netdev-2.6/drivers/net/ixgb/ixgb.h netdev-2.6/drivers/net/ixgb.new/ixgb.h --- netdev-2.6/drivers/net/ixgb/ixgb.h 2004-10-15 13:15:38.000000000 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb.h 2004-10-15 13:15:51.000000000 -0700 @@ -190,4 +190,4 @@ struct ixgb_adapter { struct ixgb_hw_stats stats; uint32_t pci_state[16]; }; -#endif /* _IXGB_H_ */ +#endif /* _IXGB_H_ */ diff -up netdev-2.6/drivers/net/ixgb/ixgb_hw.c netdev-2.6/drivers/net/ixgb.new/ixgb_hw.c --- netdev-2.6/drivers/net/ixgb/ixgb_hw.c 2004-10-15 13:15:38.000000000 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb_hw.c 2004-10-15 13:15:52.000000000 -0700 @@ -53,9 +53,14 @@ static void ixgb_optics_reset(struct ixg { uint32_t ctrl_reg; - ctrl_reg = IXGB_CTRL0_RST | IXGB_CTRL0_SDP3_DIR | /* All pins are Output=1 */ - IXGB_CTRL0_SDP2_DIR | IXGB_CTRL0_SDP1_DIR | IXGB_CTRL0_SDP0_DIR | IXGB_CTRL0_SDP3 | /* Initial value 1101 */ - IXGB_CTRL0_SDP2 | IXGB_CTRL0_SDP0; + ctrl_reg = IXGB_CTRL0_RST | + IXGB_CTRL0_SDP3_DIR | /* All pins are Output=1 */ + IXGB_CTRL0_SDP2_DIR | + IXGB_CTRL0_SDP1_DIR | + IXGB_CTRL0_SDP0_DIR | + IXGB_CTRL0_SDP3 | /* Initial value 1101 */ + IXGB_CTRL0_SDP2 | + IXGB_CTRL0_SDP0; #ifdef HP_ZX1 /* Workaround for 82597EX reset errata */ @@ -84,7 +82,8 @@ uint32_t ixgb_mac_reset(struct ixgb_hw * * * hw - Struct containing variables accessed by shared code *****************************************************************************/ -boolean_t ixgb_adapter_stop(struct ixgb_hw * hw) +boolean_t +ixgb_adapter_stop(struct ixgb_hw *hw) { uint32_t ctrl_reg; uint32_t icr_reg; @@ -94,7 +94,7 @@ boolean_t ixgb_adapter_stop(struct ixgb_ /* If we are stopped or resetting exit gracefully and wait to be * started again before accessing the hardware. */ - if (hw->adapter_stopped) { + if(hw->adapter_stopped) { DEBUGOUT("Exiting because the adapter is already stopped!!!\n"); return FALSE; } @@ -144,7 +149,8 @@ boolean_t ixgb_adapter_stop(struct ixgb_ * * Returns: the vendor of the XPAK optics module. *****************************************************************************/ -static ixgb_xpak_vendor ixgb_identify_xpak_vendor(struct ixgb_hw *hw) +static ixgb_xpak_vendor +ixgb_identify_xpak_vendor(struct ixgb_hw *hw) { uint32_t i; uint16_t vendor_name[5]; @@ -156,17 +161,18 @@ static ixgb_xpak_vendor ixgb_identify_xp * registers. These are standard XENPAK/XPAK registers, so all XPAK * devices should implement them. */ for (i = 0; i < 5; i++) { - vendor_name[i] = ixgb_read_phy_reg(hw, - MDIO_PMA_PMD_XPAK_VENDOR_NAME - + i, IXGB_PHY_ADDRESS, - MDIO_PMA_PMD_DID); + vendor_name[i] = ixgb_read_phy_reg(hw, + MDIO_PMA_PMD_XPAK_VENDOR_NAME + i, + IXGB_PHY_ADDRESS, + MDIO_PMA_PMD_DID); } /* Determine the actual vendor */ if (vendor_name[0] == 'I' && - vendor_name[1] == 'N' && - vendor_name[2] == 'T' && - vendor_name[3] == 'E' && vendor_name[4] == 'L') { + vendor_name[1] == 'N' && + vendor_name[2] == 'T' && + vendor_name[3] == 'E' && + vendor_name[4] == 'L') { xpak_vendor = ixgb_xpak_vendor_intel; } else { xpak_vendor = ixgb_xpak_vendor_infineon; @@ -183,7 +161,8 @@ * * Returns: the phy type of the adapter. *****************************************************************************/ -static ixgb_phy_type ixgb_identify_phy(struct ixgb_hw *hw) +static ixgb_phy_type +ixgb_identify_phy(struct ixgb_hw *hw) { ixgb_phy_type phy_type; ixgb_xpak_vendor xpak_vendor; @@ -237,7 +243,8 @@ static ixgb_phy_type ixgb_identify_phy(s * TRUE if successful, * FALSE if unrecoverable problems were encountered. *****************************************************************************/ -boolean_t ixgb_init_hw(struct ixgb_hw * hw) +boolean_t +ixgb_init_hw(struct ixgb_hw *hw) { uint32_t i; uint32_t ctrl_reg; @@ -266,7 +275,7 @@ boolean_t ixgb_init_hw(struct ixgb_hw * msec_delay(IXGB_DELAY_AFTER_EE_RESET); if (ixgb_get_eeprom_data(hw) == FALSE) { - return (FALSE); + return(FALSE); } /* Use the device id to determine the type of phy/transceiver. */ @@ -295,7 +305,7 @@ boolean_t ixgb_init_hw(struct ixgb_hw * /* Zero out the Multicast HASH table */ DEBUGOUT("Zeroing the MTA\n"); - for (i = 0; i < IXGB_MC_TBL_SIZE; i++) + for(i = 0; i < IXGB_MC_TBL_SIZE; i++) IXGB_WRITE_REG_ARRAY(hw, MTA, i, 0); /* Zero out the VLAN Filter Table Array */ @@ -322,7 +332,8 @@ boolean_t ixgb_init_hw(struct ixgb_hw * * of the receive addresss registers. Clears the multicast table. Assumes * the receiver is in reset when the routine is called. *****************************************************************************/ -void ixgb_init_rx_addrs(struct ixgb_hw *hw) +void +ixgb_init_rx_addrs(struct ixgb_hw *hw) { uint32_t i; @@ -338,22 +344,27 @@ void ixgb_init_rx_addrs(struct ixgb_hw * /* Get the MAC address from the eeprom for later reference */ ixgb_get_ee_mac_addr(hw, hw->curr_mac_addr); - DEBUGOUT3(" Keeping Permanent MAC Addr =%.2X %.2X %.2X ", - hw->curr_mac_addr[0], - hw->curr_mac_addr[1], hw->curr_mac_addr[2]); - DEBUGOUT3("%.2X %.2X %.2X\n", - hw->curr_mac_addr[3], - hw->curr_mac_addr[4], hw->curr_mac_addr[5]); + DEBUGOUT3(" Keeping Permanent MAC Addr =%.2X %.2X %.2X ", + hw->curr_mac_addr[0], + hw->curr_mac_addr[1], + hw->curr_mac_addr[2]); + DEBUGOUT3("%.2X %.2X %.2X\n", + hw->curr_mac_addr[3], + hw->curr_mac_addr[4], + hw->curr_mac_addr[5]); } else { - /* Setup the receive address. */ - DEBUGOUT("Overriding MAC Address in RAR[0]\n"); - DEBUGOUT3(" New MAC Addr =%.2X %.2X %.2X ", - hw->curr_mac_addr[0], - hw->curr_mac_addr[1], hw->curr_mac_addr[2]); - DEBUGOUT3("%.2X %.2X %.2X\n", - hw->curr_mac_addr[3], - hw->curr_mac_addr[4], hw->curr_mac_addr[5]); + /* Setup the receive address. */ + DEBUGOUT("Overriding MAC Address in RAR[0]\n"); + DEBUGOUT3(" New MAC Addr =%.2X %.2X %.2X ", + hw->curr_mac_addr[0], + hw->curr_mac_addr[1], + hw->curr_mac_addr[2]); + DEBUGOUT3("%.2X %.2X %.2X\n", + hw->curr_mac_addr[3], + hw->curr_mac_addr[4], + hw->curr_mac_addr[5]); + ixgb_rar_set(hw, hw->curr_mac_addr, 0); } @@ -360,7 +344,7 @@ /* Zero out the other 15 receive addresses. */ DEBUGOUT("Clearing RAR[1-15]\n"); - for (i = 1; i < IXGB_RAR_ENTRIES; i++) { + for(i = 1; i < IXGB_RAR_ENTRIES; i++) { IXGB_WRITE_REG_ARRAY(hw, RA, (i << 1), 0); IXGB_WRITE_REG_ARRAY(hw, RA, ((i << 1) + 1), 0); } @@ -383,8 +392,9 @@ void ixgb_init_rx_addrs(struct ixgb_hw * *****************************************************************************/ void ixgb_mc_addr_list_update(struct ixgb_hw *hw, - uint8_t * mc_addr_list, - uint32_t mc_addr_count, uint32_t pad) + uint8_t *mc_addr_list, + uint32_t mc_addr_count, + uint32_t pad) { uint32_t hash_value; uint32_t i; @@ -397,7 +406,7 @@ ixgb_mc_addr_list_update(struct ixgb_hw /* Clear RAR[1-15] */ DEBUGOUT(" Clearing RAR[1-15]\n"); - for (i = rar_used_count; i < IXGB_RAR_ENTRIES; i++) { + for(i = rar_used_count; i < IXGB_RAR_ENTRIES; i++) { IXGB_WRITE_REG_ARRAY(hw, RA, (i << 1), 0); IXGB_WRITE_REG_ARRAY(hw, RA, ((i << 1) + 1), 0); } @@ -404,30 +406,25 @@ /* Clear the MTA */ DEBUGOUT(" Clearing MTA\n"); - for (i = 0; i < IXGB_MC_TBL_SIZE; i++) { + for(i = 0; i < IXGB_MC_TBL_SIZE; i++) { IXGB_WRITE_REG_ARRAY(hw, MTA, i, 0); } /* Add the new addresses */ - for (i = 0; i < mc_addr_count; i++) { + for(i = 0; i < mc_addr_count; i++) { DEBUGOUT(" Adding the multicast addresses:\n"); DEBUGOUT7(" MC Addr #%d =%.2X %.2X %.2X %.2X %.2X %.2X\n", i, - mc_addr_list[i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad)], - mc_addr_list[i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad) + - 1], - mc_addr_list[i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad) + - 2], - mc_addr_list[i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad) + - 3], - mc_addr_list[i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad) + - 4], - mc_addr_list[i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad) + - 5]); + mc_addr_list[i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad)], + mc_addr_list[i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad) + 1], + mc_addr_list[i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad) + 2], + mc_addr_list[i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad) + 3], + mc_addr_list[i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad) + 4], + mc_addr_list[i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad) + 5]); /* Place this multicast address in the RAR if there is room, * * else put it in the MTA */ - if (rar_used_count < IXGB_RAR_ENTRIES) { + if(rar_used_count < IXGB_RAR_ENTRIES) { ixgb_rar_set(hw, mc_addr_list + (i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad)), @@ -435,11 +406,9 @@ DEBUGOUT1("Added a multicast address to RAR[%d]\n", i); rar_used_count++; } else { - hash_value = ixgb_hash_mc_addr(hw, - mc_addr_list + - (i * - (IXGB_ETH_LENGTH_OF_ADDRESS - + pad))); + hash_value = ixgb_hash_mc_addr(hw, + mc_addr_list + + (i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad))); DEBUGOUT1(" Hash value = 0x%03X\n", hash_value); @@ -460,7 +466,9 @@ ixgb_mc_addr_list_update(struct ixgb_hw * Returns: * The hash value *****************************************************************************/ -static uint32_t ixgb_hash_mc_addr(struct ixgb_hw *hw, uint8_t * mc_addr) +static uint32_t +ixgb_hash_mc_addr(struct ixgb_hw *hw, + uint8_t *mc_addr) { uint32_t hash_value = 0; @@ -472,28 +484,25 @@ static uint32_t ixgb_hash_mc_addr(struct switch (hw->mc_filter_type) { /* [0] [1] [2] [3] [4] [5] * 01 AA 00 12 34 56 - * LSB MSB - According to H/W docs */ - case 0: - /* [47:36] i.e. 0x563 for above example address */ - hash_value = - ((mc_addr[4] >> 4) | (((uint16_t) mc_addr[5]) << 4)); - break; - case 1: /* [46:35] i.e. 0xAC6 for above example address */ - hash_value = - ((mc_addr[4] >> 3) | (((uint16_t) mc_addr[5]) << 5)); - break; - case 2: /* [45:34] i.e. 0x5D8 for above example address */ - hash_value = - ((mc_addr[4] >> 2) | (((uint16_t) mc_addr[5]) << 6)); - break; - case 3: /* [43:32] i.e. 0x634 for above example address */ - hash_value = ((mc_addr[4]) | (((uint16_t) mc_addr[5]) << 8)); - break; - default: - /* Invalid mc_filter_type, what should we do? */ - DEBUGOUT("MC filter type param set incorrectly\n"); - ASSERT(0); - break; + * LSB MSB - According to H/W docs */ + case 0: + /* [47:36] i.e. 0x563 for above example address */ + hash_value = ((mc_addr[4] >> 4) | (((uint16_t) mc_addr[5]) << 4)); + break; + case 1: /* [46:35] i.e. 0xAC6 for above example address */ + hash_value = ((mc_addr[4] >> 3) | (((uint16_t) mc_addr[5]) << 5)); + break; + case 2: /* [45:34] i.e. 0x5D8 for above example address */ + hash_value = ((mc_addr[4] >> 2) | (((uint16_t) mc_addr[5]) << 6)); + break; + case 3: /* [43:32] i.e. 0x634 for above example address */ + hash_value = ((mc_addr[4]) | (((uint16_t) mc_addr[5]) << 8)); + break; + default: + /* Invalid mc_filter_type, what should we do? */ + DEBUGOUT("MC filter type param set incorrectly\n"); + ASSERT(0); + break; } hash_value &= 0xFFF; @@ -506,7 +515,9 @@ static uint32_t ixgb_hash_mc_addr(struct * hw - Struct containing variables accessed by shared code * hash_value - Multicast address hash value *****************************************************************************/ -static void ixgb_mta_set(struct ixgb_hw *hw, uint32_t hash_value) +static void +ixgb_mta_set(struct ixgb_hw *hw, + uint32_t hash_value) { uint32_t hash_bit, hash_reg; uint32_t mta_reg; @@ -538,7 +549,10 @@ static void ixgb_mta_set(struct ixgb_hw * addr - Address to put into receive address register * index - Receive address register to write *****************************************************************************/ -void ixgb_rar_set(struct ixgb_hw *hw, uint8_t * addr, uint32_t index) +void +ixgb_rar_set(struct ixgb_hw *hw, + uint8_t *addr, + uint32_t index) { uint32_t rar_low, rar_high; @@ -548,11 +562,13 @@ void ixgb_rar_set(struct ixgb_hw *hw, ui * from network order (big endian) to little endian */ rar_low = ((uint32_t) addr[0] | - ((uint32_t) addr[1] << 8) | - ((uint32_t) addr[2] << 16) | ((uint32_t) addr[3] << 24)); + ((uint32_t) addr[1] << 8) | + ((uint32_t) addr[2] << 16) | + ((uint32_t) addr[3] << 24)); rar_high = ((uint32_t) addr[4] | - ((uint32_t) addr[5] << 8) | IXGB_RAH_AV); + ((uint32_t) addr[5] << 8) | + IXGB_RAH_AV); IXGB_WRITE_REG_ARRAY(hw, RA, (index << 1), rar_low); IXGB_WRITE_REG_ARRAY(hw, RA, ((index << 1) + 1), rar_high); @@ -566,7 +582,10 @@ void ixgb_rar_set(struct ixgb_hw *hw, ui * offset - Offset in VLAN filer table to write * value - Value to write into VLAN filter table *****************************************************************************/ -void ixgb_write_vfta(struct ixgb_hw *hw, uint32_t offset, uint32_t value) +void +ixgb_write_vfta(struct ixgb_hw *hw, + uint32_t offset, + uint32_t value) { IXGB_WRITE_REG_ARRAY(hw, VFTA, offset, value); return; @@ -577,11 +596,12 @@ void ixgb_write_vfta(struct ixgb_hw *hw, * * hw - Struct containing variables accessed by shared code *****************************************************************************/ -void ixgb_clear_vfta(struct ixgb_hw *hw) +void +ixgb_clear_vfta(struct ixgb_hw *hw) { uint32_t offset; - for (offset = 0; offset < IXGB_VLAN_FILTER_TBL_SIZE; offset++) + for(offset = 0; offset < IXGB_VLAN_FILTER_TBL_SIZE; offset++) IXGB_WRITE_REG_ARRAY(hw, VFTA, offset, 0); return; } @@ -592,7 +600,8 @@ void ixgb_clear_vfta(struct ixgb_hw *hw) * hw - Struct containing variables accessed by shared code *****************************************************************************/ -boolean_t ixgb_setup_fc(struct ixgb_hw * hw) +boolean_t +ixgb_setup_fc(struct ixgb_hw *hw) { uint32_t ctrl_reg; uint32_t pap_reg = 0; /* by default, assume no pause time */ @@ -660,16 +668,16 @@ boolean_t ixgb_setup_fc(struct ixgb_hw * * ability to transmit pause frames in not enabled, then these * registers will be set to 0. */ - if (!(hw->fc.type & ixgb_fc_tx_pause)) { + if(!(hw->fc.type & ixgb_fc_tx_pause)) { IXGB_WRITE_REG(hw, FCRTL, 0); IXGB_WRITE_REG(hw, FCRTH, 0); } else { - /* We need to set up the Receive Threshold high and low water - * marks as well as (optionally) enabling the transmission of XON frames. - */ - if (hw->fc.send_xon) { + /* We need to set up the Receive Threshold high and low water + * marks as well as (optionally) enabling the transmission of XON frames. + */ + if(hw->fc.send_xon) { IXGB_WRITE_REG(hw, FCRTL, - (hw->fc.low_water | IXGB_FCRTL_XONE)); + (hw->fc.low_water | IXGB_FCRTL_XONE)); } else { IXGB_WRITE_REG(hw, FCRTL, hw->fc.low_water); } @@ -694,9 +702,10 @@ boolean_t ixgb_setup_fc(struct ixgb_hw * * read command. *****************************************************************************/ uint16_t -ixgb_read_phy_reg(struct ixgb_hw * hw, - uint32_t reg_address, - uint32_t phy_address, uint32_t device_type) +ixgb_read_phy_reg(struct ixgb_hw *hw, + uint32_t reg_address, + uint32_t phy_address, + uint32_t device_type) { uint32_t i; uint32_t data; @@ -714,14 +715,14 @@ ixgb_read_phy_reg(struct ixgb_hw * hw, IXGB_WRITE_REG(hw, MSCA, command); - /************************************************************** - ** Check every 10 usec to see if the address cycle completed - ** The COMMAND bit will clear when the operation is complete. - ** This may take as long as 64 usecs (we'll wait 100 usecs max) - ** from the CPU Write to the Ready bit assertion. - **************************************************************/ + /************************************************************** + ** Check every 10 usec to see if the address cycle completed + ** The COMMAND bit will clear when the operation is complete. + ** This may take as long as 64 usecs (we'll wait 100 usecs max) + ** from the CPU Write to the Ready bit assertion. + **************************************************************/ - for (i = 0; i < 10; i++) { + for(i = 0; i < 10; i++) { udelay(10); command = IXGB_READ_REG(hw, MSCA); @@ -740,14 +742,14 @@ ixgb_read_phy_reg(struct ixgb_hw * hw, IXGB_WRITE_REG(hw, MSCA, command); - /************************************************************** - ** Check every 10 usec to see if the read command completed - ** The COMMAND bit will clear when the operation is complete. - ** The read may take as long as 64 usecs (we'll wait 100 usecs max) - ** from the CPU Write to the Ready bit assertion. - **************************************************************/ + /************************************************************** + ** Check every 10 usec to see if the read command completed + ** The COMMAND bit will clear when the operation is complete. + ** The read may take as long as 64 usecs (we'll wait 100 usecs max) + ** from the CPU Write to the Ready bit assertion. + **************************************************************/ - for (i = 0; i < 10; i++) { + for(i = 0; i < 10; i++) { udelay(10); command = IXGB_READ_REG(hw, MSCA); @@ -763,7 +773,7 @@ ixgb_read_phy_reg(struct ixgb_hw * hw, */ data = IXGB_READ_REG(hw, MSRWD); data >>= IXGB_MSRWD_READ_DATA_SHIFT; - return ((uint16_t) data); + return((uint16_t)data); } /****************************************************************************** @@ -785,8 +795,10 @@ ixgb_read_phy_reg(struct ixgb_hw * hw, *****************************************************************************/ void ixgb_write_phy_reg(struct ixgb_hw *hw, - uint32_t reg_address, - uint32_t phy_address, uint32_t device_type, uint16_t data) + uint32_t reg_address, + uint32_t phy_address, + uint32_t device_type, + uint16_t data) { uint32_t i; uint32_t command = 0; @@ -796,7 +806,7 @@ ixgb_write_phy_reg(struct ixgb_hw *hw, ASSERT(device_type <= IXGB_MAX_PHY_DEV_TYPE); /* Put the data in the MDIO Read/Write Data register */ - IXGB_WRITE_REG(hw, MSRWD, (uint32_t) data); + IXGB_WRITE_REG(hw, MSRWD, (uint32_t)data); /* Setup and write the address cycle command */ command = ((reg_address << IXGB_MSCA_NP_ADDR_SHIFT) | @@ -806,14 +806,14 @@ IXGB_WRITE_REG(hw, MSCA, command); - /************************************************************** - ** Check every 10 usec to see if the address cycle completed - ** The COMMAND bit will clear when the operation is complete. - ** This may take as long as 64 usecs (we'll wait 100 usecs max) - ** from the CPU Write to the Ready bit assertion. - **************************************************************/ + /************************************************************** + ** Check every 10 usec to see if the address cycle completed + ** The COMMAND bit will clear when the operation is complete. + ** This may take as long as 64 usecs (we'll wait 100 usecs max) + ** from the CPU Write to the Ready bit assertion. + **************************************************************/ - for (i = 0; i < 10; i++) { + for(i = 0; i < 10; i++) { udelay(10); command = IXGB_READ_REG(hw, MSCA); @@ -832,14 +836,14 @@ ixgb_write_phy_reg(struct ixgb_hw *hw, IXGB_WRITE_REG(hw, MSCA, command); - /************************************************************** - ** Check every 10 usec to see if the read command completed - ** The COMMAND bit will clear when the operation is complete. - ** The write may take as long as 64 usecs (we'll wait 100 usecs max) - ** from the CPU Write to the Ready bit assertion. - **************************************************************/ + /************************************************************** + ** Check every 10 usec to see if the read command completed + ** The COMMAND bit will clear when the operation is complete. + ** The write may take as long as 64 usecs (we'll wait 100 usecs max) + ** from the CPU Write to the Ready bit assertion. + **************************************************************/ - for (i = 0; i < 10; i++) { + for(i = 0; i < 10; i++) { udelay(10); command = IXGB_READ_REG(hw, MSCA); @@ -860,7 +884,8 @@ ixgb_write_phy_reg(struct ixgb_hw *hw, * * Called by any function that needs to check the link status of the adapter. *****************************************************************************/ -void ixgb_check_for_link(struct ixgb_hw *hw) +void +ixgb_check_for_link(struct ixgb_hw *hw) { uint32_t status_reg; uint32_t xpcss_reg; @@ -922,7 +928,8 @@ boolean_t ixgb_check_for_bad_link(struct * * hw - Struct containing variables accessed by shared code *****************************************************************************/ -void ixgb_clear_hw_cntrs(struct ixgb_hw *hw) +void +ixgb_clear_hw_cntrs(struct ixgb_hw *hw) { volatile uint32_t temp_reg; @@ -929,7 +928,7 @@ DEBUGFUNC("ixgb_clear_hw_cntrs"); /* if we are stopped or resetting exit gracefully */ - if (hw->adapter_stopped) { + if(hw->adapter_stopped) { DEBUGOUT("Exiting because the adapter is stopped!!!\n"); return; } @@ -1002,7 +1009,8 @@ void ixgb_clear_hw_cntrs(struct ixgb_hw * * hw - Struct containing variables accessed by shared code *****************************************************************************/ -void ixgb_led_on(struct ixgb_hw *hw) +void +ixgb_led_on(struct ixgb_hw *hw) { uint32_t ctrl0_reg = IXGB_READ_REG(hw, CTRL0); @@ -1017,7 +1030,8 @@ void ixgb_led_on(struct ixgb_hw *hw) * * hw - Struct containing variables accessed by shared code *****************************************************************************/ -void ixgb_led_off(struct ixgb_hw *hw) +void +ixgb_led_off(struct ixgb_hw *hw) { uint32_t ctrl0_reg = IXGB_READ_REG(hw, CTRL0); @@ -1032,7 +1040,8 @@ void ixgb_led_off(struct ixgb_hw *hw) * * hw - Struct containing variables accessed by shared code *****************************************************************************/ -static void ixgb_get_bus_info(struct ixgb_hw *hw) +static void +ixgb_get_bus_info(struct ixgb_hw *hw) { uint32_t status_reg; @@ -1039,11 +1040,11 @@ status_reg = IXGB_READ_REG(hw, STATUS); hw->bus.type = (status_reg & IXGB_STATUS_PCIX_MODE) ? - ixgb_bus_type_pcix : ixgb_bus_type_pci; + ixgb_bus_type_pcix : ixgb_bus_type_pci; if (hw->bus.type == ixgb_bus_type_pci) { hw->bus.speed = (status_reg & IXGB_STATUS_PCI_SPD) ? - ixgb_bus_speed_66 : ixgb_bus_speed_33; + ixgb_bus_speed_66 : ixgb_bus_speed_33; } else { switch (status_reg & IXGB_STATUS_PCIX_SPD_MASK) { case IXGB_STATUS_PCIX_SPD_66: @@ -1062,7 +1076,7 @@ static void ixgb_get_bus_info(struct ixg } hw->bus.width = (status_reg & IXGB_STATUS_BUS64) ? - ixgb_bus_width_64 : ixgb_bus_width_32; + ixgb_bus_width_64 : ixgb_bus_width_32; return; } @@ -1073,7 +1076,8 @@ * mac_addr - pointer to MAC address. * *****************************************************************************/ -boolean_t mac_addr_valid(uint8_t * mac_addr) +boolean_t +mac_addr_valid(uint8_t *mac_addr) { boolean_t is_valid = TRUE; DEBUGFUNC("mac_addr_valid"); @@ -1090,9 +1120,11 @@ boolean_t mac_addr_valid(uint8_t * mac_a } /* Reject the zero address */ else if (mac_addr[0] == 0 && - mac_addr[1] == 0 && - mac_addr[2] == 0 && - mac_addr[3] == 0 && mac_addr[4] == 0 && mac_addr[5] == 0) { + mac_addr[1] == 0 && + mac_addr[2] == 0 && + mac_addr[3] == 0 && + mac_addr[4] == 0 && + mac_addr[5] == 0) { DEBUGOUT("MAC address is all zeros\n"); is_valid = FALSE; } @@ -1105,7 +1122,8 @@ boolean_t mac_addr_valid(uint8_t * mac_a * * hw - Struct containing variables accessed by shared code *****************************************************************************/ -boolean_t ixgb_link_reset(struct ixgb_hw * hw) +boolean_t +ixgb_link_reset(struct ixgb_hw *hw) { boolean_t link_status = FALSE; uint8_t wait_retries = MAX_RESET_ITERATIONS; @@ -1135,21 +1122,24 @@ * * hw - Struct containing variables accessed by shared code *****************************************************************************/ -void ixgb_optics_reset(struct ixgb_hw *hw) +void +ixgb_optics_reset(struct ixgb_hw *hw) { if (hw->phy_type == ixgb_phy_type_txn17401) { uint16_t mdio_reg; - ixgb_write_phy_reg(hw, - MDIO_PMA_PMD_CR1, - IXGB_PHY_ADDRESS, - MDIO_PMA_PMD_DID, MDIO_PMA_PMD_CR1_RESET); - - mdio_reg = ixgb_read_phy_reg(hw, - MDIO_PMA_PMD_CR1, - IXGB_PHY_ADDRESS, - MDIO_PMA_PMD_DID); + ixgb_write_phy_reg( hw, + MDIO_PMA_PMD_CR1, + IXGB_PHY_ADDRESS, + MDIO_PMA_PMD_DID, + MDIO_PMA_PMD_CR1_RESET); + + mdio_reg = ixgb_read_phy_reg( hw, + MDIO_PMA_PMD_CR1, + IXGB_PHY_ADDRESS, + MDIO_PMA_PMD_DID); } return; } + diff -up netdev-2.6/drivers/net/ixgb/ixgb_hw.h netdev-2.6/drivers/net/ixgb.new/ixgb_hw.h --- netdev-2.6/drivers/net/ixgb/ixgb_hw.h 2004-10-15 13:15:38.000000000 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb_hw.h 2004-10-15 13:15:53.000000000 -0700 @@ -536,8 +536,8 @@ struct ixgb_rx_desc { uint64_t buff_addr; uint16_t length; uint16_t reserved; - uint8_t status; - uint8_t errors; + uint8_t status; + uint8_t errors; uint16_t special; }; @@ -568,8 +570,8 @@ struct ixgb_rx_desc { struct ixgb_tx_desc { uint64_t buff_addr; uint32_t cmd_type_len; - uint8_t status; - uint8_t popts; + uint8_t status; + uint8_t popts; uint16_t vlan; }; @@ -593,15 +570,15 @@ #define IXGB_TX_DESC_SPECIAL_PRI_SHIFT IXGB_RX_DESC_SPECIAL_PRI_SHIFT /* Priority is in upper 3 of 16 */ struct ixgb_context_desc { - uint8_t ipcss; - uint8_t ipcso; + uint8_t ipcss; + uint8_t ipcso; uint16_t ipcse; - uint8_t tucss; - uint8_t tucso; + uint8_t tucss; + uint8_t tucso; uint16_t tucse; uint32_t cmd_type_len; - uint8_t status; - uint8_t hdr_len; + uint8_t status; + uint8_t hdr_len; uint16_t mss; }; @@ -648,7 +650,7 @@ struct ixgb_flash_buffer { * This is a little-endian specific check. */ #define IS_MULTICAST(Address) \ - (boolean_t)(((uint8_t *)(Address))[0] & ((uint8_t)0x01)) + (boolean_t)(((uint8_t *)(Address))[0] & ((uint8_t)0x01)) /* * Check whether an address is broadcast. @@ -789,32 +792,39 @@ extern void ixgb_check_for_link(struct i extern boolean_t ixgb_check_for_bad_link(struct ixgb_hw *hw); extern boolean_t ixgb_setup_fc(struct ixgb_hw *hw); extern void ixgb_clear_hw_cntrs(struct ixgb_hw *hw); -extern boolean_t mac_addr_valid(uint8_t * mac_addr); +extern boolean_t mac_addr_valid(uint8_t *mac_addr); extern uint16_t ixgb_read_phy_reg(struct ixgb_hw *hw, - uint32_t reg_addr, - uint32_t phy_addr, uint32_t device_type); + uint32_t reg_addr, + uint32_t phy_addr, + uint32_t device_type); extern void ixgb_write_phy_reg(struct ixgb_hw *hw, - uint32_t reg_addr, - uint32_t phy_addr, - uint32_t device_type, uint16_t data); + uint32_t reg_addr, + uint32_t phy_addr, + uint32_t device_type, + uint16_t data); + +extern void ixgb_rar_set(struct ixgb_hw *hw, + uint8_t *addr, + uint32_t index); -extern void ixgb_rar_set(struct ixgb_hw *hw, uint8_t * addr, uint32_t index); /* Filters (multicast, vlan, receive) */ extern void ixgb_mc_addr_list_update(struct ixgb_hw *hw, - uint8_t * mc_addr_list, - uint32_t mc_addr_count, uint32_t pad); + uint8_t * mc_addr_list, + uint32_t mc_addr_count, + uint32_t pad); /* Vfta functions */ extern void ixgb_write_vfta(struct ixgb_hw *hw, - uint32_t offset, uint32_t value); + uint32_t offset, + uint32_t value); extern void ixgb_clear_vfta(struct ixgb_hw *hw); /* Access functions to eeprom data */ -void ixgb_get_ee_mac_addr(struct ixgb_hw *hw, uint8_t * mac_addr); +void ixgb_get_ee_mac_addr(struct ixgb_hw *hw, uint8_t *mac_addr); uint16_t ixgb_get_ee_compatibility(struct ixgb_hw *hw); uint32_t ixgb_get_ee_pba_number(struct ixgb_hw *hw); uint16_t ixgb_get_ee_init_ctrl_reg_1(struct ixgb_hw *hw); @@ -832,6 +828,9 @@ uint16_t ixgb_get_ee_subvendor_id(struct /* Everything else */ void ixgb_led_on(struct ixgb_hw *hw); void ixgb_led_off(struct ixgb_hw *hw); -void ixgb_write_pci_cfg(struct ixgb_hw *hw, uint32_t reg, uint16_t * value); +void ixgb_write_pci_cfg(struct ixgb_hw *hw, + uint32_t reg, + uint16_t * value); + -#endif /* _IXGB_HW_H_ */ +#endif /* _IXGB_HW_H_ */ diff -up netdev-2.6/drivers/net/ixgb/ixgb_ids.h netdev-2.6/drivers/net/ixgb.new/ixgb_ids.h --- netdev-2.6/drivers/net/ixgb/ixgb_ids.h 2004-10-15 13:15:38.000000000 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb_ids.h 2004-10-15 13:15:54.000000000 -0700 @@ -33,17 +33,17 @@ ** The Device and Vendor IDs for 10 Gigabit MACs **********************************************************************/ -#define INTEL_VENDOR_ID 0x8086 -#define INTEL_SUBVENDOR_ID 0x8086 -#define IXGB_DEVICE_ID_82597EX 0x1048 -#define IXGB_DEVICE_ID_82597EX_SR 0x1A48 -#define IXGB_SUBDEVICE_ID_A11F 0xA11F -#define IXGB_SUBDEVICE_ID_A01F 0xA01F +#define INTEL_VENDOR_ID 0x8086 +#define INTEL_SUBVENDOR_ID 0x8086 +#define IXGB_DEVICE_ID_82597EX 0x1048 +#define IXGB_DEVICE_ID_82597EX_SR 0x1A48 +#define IXGB_SUBDEVICE_ID_A11F 0xA11F +#define IXGB_SUBDEVICE_ID_A01F 0xA01F -#endif /* #ifndef _IXGB_IDS_H_ */ +#endif /* #ifndef _IXGB_IDS_H_ */ /* End of File */ diff -up netdev-2.6/drivers/net/ixgb/ixgb_main.c netdev-2.6/drivers/net/ixgb.new/ixgb_main.c --- netdev-2.6/drivers/net/ixgb/ixgb_main.c 2004-10-15 13:15:38.000000000 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb_main.c 2004-10-15 13:15:55.000000000 -0700 @@ -97,7 +97,7 @@ static void __devexit ixgb_remove(struct #ifdef CONFIG_IXGB_NAPI static int ixgb_clean(struct net_device *netdev, int *budget); static boolean_t ixgb_clean_rx_irq(struct ixgb_adapter *adapter, - int *work_done, int work_to_do); + int *work_done, int work_to_do); #else static boolean_t ixgb_clean_rx_irq(struct ixgb_adapter *adapter); #endif @@ -121,9 +121,9 @@ #endif struct notifier_block ixgb_notifier_reboot = { - .notifier_call = ixgb_notify_reboot, - .next = NULL, - .priority = 0 + .notifier_call = ixgb_notify_reboot, + .next = NULL, + .priority = 0 }; /* Exported from other modules */ @@ -131,13 +131,13 @@ extern void ixgb_check_options(struct ixgb_adapter *adapter); static struct pci_driver ixgb_driver = { - .name = ixgb_driver_name, + .name = ixgb_driver_name, .id_table = ixgb_pci_tbl, - .probe = ixgb_probe, - .remove = __devexit_p(ixgb_remove), + .probe = ixgb_probe, + .remove = __devexit_p(ixgb_remove), /* Power Managment Hooks */ - .suspend = NULL, - .resume = NULL + .suspend = NULL, + .resume = NULL }; MODULE_AUTHOR("Intel Corporation, "); @@ -145,10 +142,10 @@ MODULE_DESCRIPTION("Intel(R) PRO/10GbE N MODULE_LICENSE("GPL"); /* some defines for controlling descriptor fetches in h/w */ -#define RXDCTL_PTHRESH_DEFAULT 128 /* chip considers prefech below this */ -#define RXDCTL_HTHRESH_DEFAULT 16 /* chip will only prefetch if tail is - pushed this many descriptors from head */ -#define RXDCTL_WTHRESH_DEFAULT 16 /* chip writes back at this many or RXT0 */ +#define RXDCTL_PTHRESH_DEFAULT 128 /* chip considers prefech below this */ +#define RXDCTL_HTHRESH_DEFAULT 16 /* chip will only prefetch if tail is + pushed this many descriptors from head */ +#define RXDCTL_WTHRESH_DEFAULT 16 /* chip writes back at this many or RXT0 */ /** * ixgb_init_module - Driver Registration Routine @@ -157,16 +154,17 @@ MODULE_LICENSE("GPL"); * loaded. All it does is register with the PCI subsystem. **/ -static int __init ixgb_init_module(void) +static int __init +ixgb_init_module(void) { int ret; printk(KERN_INFO "%s - version %s\n", - ixgb_driver_string, ixgb_driver_version); + ixgb_driver_string, ixgb_driver_version); printk(KERN_INFO "%s\n", ixgb_copyright); ret = pci_module_init(&ixgb_driver); - if (ret >= 0) { + if(ret >= 0) { register_reboot_notifier(&ixgb_notifier_reboot); } return ret; @@ -181,7 +178,8 @@ module_init(ixgb_init_module); * from memory. **/ -static void __exit ixgb_exit_module(void) +static void __exit +ixgb_exit_module(void) { unregister_reboot_notifier(&ixgb_notifier_reboot); pci_unregister_driver(&ixgb_driver); @@ -217,7 +186,8 @@ static void __exit ixgb_exit_module(void } } -int ixgb_up(struct ixgb_adapter *adapter) +int +ixgb_up(struct ixgb_adapter *adapter) { struct net_device *netdev = adapter->netdev; int err; @@ -235,27 +205,27 @@ int ixgb_up(struct ixgb_adapter *adapter ixgb_configure_rx(adapter); ixgb_alloc_rx_buffers(adapter); - if ((err = request_irq(adapter->pdev->irq, &ixgb_intr, - SA_SHIRQ | SA_SAMPLE_RANDOM, - netdev->name, netdev))) + if((err = request_irq(adapter->pdev->irq, &ixgb_intr, + SA_SHIRQ | SA_SAMPLE_RANDOM, + netdev->name, netdev))) return err; /* disable interrupts and get the hardware into a known state */ IXGB_WRITE_REG(&adapter->hw, IMC, 0xffffffff); - if ((hw->max_frame_size != max_frame) || - (hw->max_frame_size != - (IXGB_READ_REG(hw, MFS) >> IXGB_MFS_SHIFT))) { + if((hw->max_frame_size != max_frame) || + (hw->max_frame_size != + (IXGB_READ_REG(hw, MFS) >> IXGB_MFS_SHIFT))) { hw->max_frame_size = max_frame; IXGB_WRITE_REG(hw, MFS, hw->max_frame_size << IXGB_MFS_SHIFT); - if (hw->max_frame_size > - IXGB_MAX_ENET_FRAME_SIZE_WITHOUT_FCS + ENET_FCS_LENGTH) { + if(hw->max_frame_size > + IXGB_MAX_ENET_FRAME_SIZE_WITHOUT_FCS + ENET_FCS_LENGTH) { uint32_t ctrl0 = IXGB_READ_REG(hw, CTRL0); - if (!(ctrl0 & IXGB_CTRL0_JFE)) { + if(!(ctrl0 & IXGB_CTRL0_JFE)) { ctrl0 |= IXGB_CTRL0_JFE; IXGB_WRITE_REG(hw, CTRL0, ctrl0); } @@ -268,13 +238,14 @@ int ixgb_up(struct ixgb_adapter *adapter return 0; } -void ixgb_down(struct ixgb_adapter *adapter, boolean_t kill_watchdog) +void +ixgb_down(struct ixgb_adapter *adapter, boolean_t kill_watchdog) { struct net_device *netdev = adapter->netdev; ixgb_irq_disable(adapter); free_irq(adapter->pdev->irq, netdev); - if (kill_watchdog) + if(kill_watchdog) del_timer_sync(&adapter->watchdog_timer); adapter->link_speed = 0; adapter->link_duplex = 0; @@ -286,11 +256,12 @@ void ixgb_down(struct ixgb_adapter *adap ixgb_clean_rx_ring(adapter); } -void ixgb_reset(struct ixgb_adapter *adapter) +void +ixgb_reset(struct ixgb_adapter *adapter) { ixgb_adapter_stop(&adapter->hw); - if (!ixgb_init_hw(&adapter->hw)) + if(!ixgb_init_hw(&adapter->hw)) IXGB_DBG("ixgb_init_hw failed.\n"); } @@ -307,7 +277,8 @@ void ixgb_reset(struct ixgb_adapter *ada **/ static int __devinit -ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) +ixgb_probe(struct pci_dev *pdev, + const struct pci_device_id *ent) { struct net_device *netdev = NULL; struct ixgb_adapter *adapter; @@ -318,13 +288,13 @@ ixgb_probe(struct pci_dev *pdev, const s int i; int err; - if ((err = pci_enable_device(pdev))) + if((err = pci_enable_device(pdev))) return err; - if (!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) { + if(!(err = pci_set_dma_mask(pdev, DMA_64BIT_MASK))) { pci_using_dac = 1; } else { - if ((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) { + if((err = pci_set_dma_mask(pdev, DMA_32BIT_MASK))) { IXGB_ERR("No usable DMA configuration, aborting\n"); return err; } @@ -331,13 +288,13 @@ pci_using_dac = 0; } - if ((err = pci_request_regions(pdev, ixgb_driver_name))) + if((err = pci_request_regions(pdev, ixgb_driver_name))) return err; pci_set_master(pdev); netdev = alloc_etherdev(sizeof(struct ixgb_adapter)); - if (!netdev) { + if(!netdev) { err = -ENOMEM; goto err_alloc_etherdev; } @@ -355,15 +325,15 @@ ixgb_probe(struct pci_dev *pdev, const s mmio_len = pci_resource_len(pdev, BAR_0); adapter->hw.hw_addr = ioremap(mmio_start, mmio_len); - if (!adapter->hw.hw_addr) { + if(!adapter->hw.hw_addr) { err = -EIO; goto err_ioremap; } - for (i = BAR_1; i <= BAR_5; i++) { - if (pci_resource_len(pdev, i) == 0) + for(i = BAR_1; i <= BAR_5; i++) { + if(pci_resource_len(pdev, i) == 0) continue; - if (pci_resource_flags(pdev, i) & IORESOURCE_IO) { + if(pci_resource_flags(pdev, i) & IORESOURCE_IO) { adapter->hw.io_base = pci_resource_start(pdev, i); break; } @@ -400,22 +371,24 @@ ixgb_probe(struct pci_dev *pdev, const s /* setup the private structure */ - if ((err = ixgb_sw_init(adapter))) + if((err = ixgb_sw_init(adapter))) goto err_sw_init; netdev->features = NETIF_F_SG | - NETIF_F_HW_CSUM | - NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER; + NETIF_F_HW_CSUM | + NETIF_F_HW_VLAN_TX | + NETIF_F_HW_VLAN_RX | + NETIF_F_HW_VLAN_FILTER; #ifdef NETIF_F_TSO netdev->features |= NETIF_F_TSO; #endif - if (pci_using_dac) + if(pci_using_dac) netdev->features |= NETIF_F_HIGHDMA; /* make sure the EEPROM is good */ - if (!ixgb_validate_eeprom_checksum(&adapter->hw)) { + if(!ixgb_validate_eeprom_checksum(&adapter->hw)) { printk(KERN_ERR "The EEPROM Checksum Is Not Valid\n"); err = -EIO; goto err_eeprom; @@ -423,7 +394,7 @@ ixgb_probe(struct pci_dev *pdev, const s ixgb_get_ee_mac_addr(&adapter->hw, netdev->dev_addr); - if (!is_valid_ether_addr(netdev->dev_addr)) { + if(!is_valid_ether_addr(netdev->dev_addr)) { err = -EIO; goto err_eeprom; } @@ -435,9 +394,9 @@ adapter->watchdog_timer.data = (unsigned long)adapter; INIT_WORK(&adapter->tx_timeout_task, - (void (*)(void *))ixgb_tx_timeout_task, netdev); + (void (*)(void *))ixgb_tx_timeout_task, netdev); - if ((err = register_netdev(netdev))) + if((err = register_netdev(netdev))) goto err_register; /* we're going to reset, so assume we have no link for now */ @@ -446,7 +419,7 @@ ixgb_probe(struct pci_dev *pdev, const s netif_stop_queue(netdev); printk(KERN_INFO "%s: Intel(R) PRO/10GbE Network Connection\n", - netdev->name); + netdev->name); ixgb_check_options(adapter); /* reset the hardware with the new settings */ @@ -455,13 +428,13 @@ ixgb_probe(struct pci_dev *pdev, const s cards_found++; return 0; - err_register: - err_sw_init: - err_eeprom: +err_register: +err_sw_init: +err_eeprom: iounmap(adapter->hw.hw_addr); - err_ioremap: +err_ioremap: free_netdev(netdev); - err_alloc_etherdev: +err_alloc_etherdev: pci_release_regions(pdev); return err; } @@ -476,7 +449,8 @@ ixgb_probe(struct pci_dev *pdev, const s * memory. **/ -static void __devexit ixgb_remove(struct pci_dev *pdev) +static void __devexit +ixgb_remove(struct pci_dev *pdev) { struct net_device *netdev = pci_get_drvdata(pdev); struct ixgb_adapter *adapter = netdev->priv; @@ -498,7 +473,8 @@ static void __devexit ixgb_remove(struct * OS network device settings (MTU size). **/ -static int __devinit ixgb_sw_init(struct ixgb_adapter *adapter) +static int __devinit +ixgb_sw_init(struct ixgb_adapter *adapter) { struct ixgb_hw *hw = &adapter->hw; struct net_device *netdev = adapter->netdev; @@ -515,9 +486,9 @@ static int __devinit ixgb_sw_init(struct hw->max_frame_size = netdev->mtu + ENET_HEADER_SIZE + ENET_FCS_LENGTH; - if ((hw->device_id == IXGB_DEVICE_ID_82597EX) - || (hw->device_id == IXGB_DEVICE_ID_82597EX_SR)) - hw->mac_type = ixgb_82597; + if((hw->device_id == IXGB_DEVICE_ID_82597EX) + ||(hw->device_id == IXGB_DEVICE_ID_82597EX_SR)) + hw->mac_type = ixgb_82597; else { /* should never have loaded on this device */ printk(KERN_ERR "ixgb: unsupported device id\n"); @@ -545,7 +522,8 @@ static int __devinit ixgb_sw_init(struct * and the stack is notified that the interface is ready. **/ -static int ixgb_open(struct net_device *netdev) +static int +ixgb_open(struct net_device *netdev) { struct ixgb_adapter *adapter = netdev->priv; int err; @@ -552,24 +522,24 @@ /* allocate transmit descriptors */ - if ((err = ixgb_setup_tx_resources(adapter))) + if((err = ixgb_setup_tx_resources(adapter))) goto err_setup_tx; /* allocate receive descriptors */ - if ((err = ixgb_setup_rx_resources(adapter))) + if((err = ixgb_setup_rx_resources(adapter))) goto err_setup_rx; - if ((err = ixgb_up(adapter))) + if((err = ixgb_up(adapter))) goto err_up; return 0; - err_up: +err_up: ixgb_free_rx_resources(adapter); - err_setup_rx: +err_setup_rx: ixgb_free_tx_resources(adapter); - err_setup_tx: +err_setup_tx: ixgb_reset(adapter); return err; @@ -587,7 +587,8 @@ static int ixgb_open(struct net_device * * hardware, and all transmit and receive resources are freed. **/ -static int ixgb_close(struct net_device *netdev) +static int +ixgb_close(struct net_device *netdev) { struct ixgb_adapter *adapter = netdev->priv; @@ -614,8 +583,8 @@ static int ixgb_close(struct net_device int size; size = sizeof(struct ixgb_buffer) * txdr->count; - if (!txdr->buffer_info) { txdr->buffer_info = vmalloc(size); + if(!txdr->buffer_info) { return -ENOMEM; } memset(txdr->buffer_info, 0, size); @@ -626,7 +602,7 @@ static int ixgb_setup_tx_resources(struc IXGB_ROUNDUP(txdr->size, 4096); txdr->desc = pci_alloc_consistent(pdev, txdr->size, &txdr->dma); - if (!txdr->desc) { + if(!txdr->desc) { vfree(txdr->buffer_info); return -ENOMEM; } @@ -645,7 +621,8 @@ static int ixgb_setup_tx_resources(struc * Configure the Tx unit of the MAC after a reset. **/ -static void ixgb_configure_tx(struct ixgb_adapter *adapter) +static void +ixgb_configure_tx(struct ixgb_adapter *adapter) { uint64_t tdba = adapter->tx_ring.dma; uint32_t tdlen = adapter->tx_ring.count * sizeof(struct ixgb_tx_desc); @@ -685,8 +698,8 @@ static void ixgb_configure_tx(struct ixg /* Setup Transmit Descriptor Settings for this adapter */ adapter->tx_cmd_type = - IXGB_TX_DESC_TYPE - | (adapter->tx_int_delay_enable ? IXGB_TX_DESC_CMD_IDE : 0); + IXGB_TX_DESC_TYPE + | (adapter->tx_int_delay_enable ? IXGB_TX_DESC_CMD_IDE : 0); } /** @@ -704,8 +673,8 @@ static void ixgb_configure_tx(struct ixg int size; size = sizeof(struct ixgb_buffer) * rxdr->count; - if (!rxdr->buffer_info) { rxdr->buffer_info = vmalloc(size); + if(!rxdr->buffer_info) { return -ENOMEM; } memset(rxdr->buffer_info, 0, size); @@ -717,7 +693,7 @@ static int ixgb_setup_rx_resources(struc rxdr->desc = pci_alloc_consistent(pdev, rxdr->size, &rxdr->dma); - if (!rxdr->desc) { + if(!rxdr->desc) { vfree(rxdr->buffer_info); return -ENOMEM; } @@ -734,7 +747,8 @@ static int ixgb_setup_rx_resources(struc * @adapter: Board private structure **/ -static void ixgb_setup_rctl(struct ixgb_adapter *adapter) +static void +ixgb_setup_rctl(struct ixgb_adapter *adapter) { uint32_t rctl; @@ -743,9 +757,9 @@ static void ixgb_setup_rctl(struct ixgb_ rctl &= ~(3 << IXGB_RCTL_MO_SHIFT); rctl |= - IXGB_RCTL_BAM | IXGB_RCTL_RDMTS_1_2 | - IXGB_RCTL_RXEN | IXGB_RCTL_CFF | - (adapter->hw.mc_filter_type << IXGB_RCTL_MO_SHIFT); + IXGB_RCTL_BAM | IXGB_RCTL_RDMTS_1_2 | + IXGB_RCTL_RXEN | IXGB_RCTL_CFF | + (adapter->hw.mc_filter_type << IXGB_RCTL_MO_SHIFT); rctl |= IXGB_RCTL_SECRC; @@ -775,7 +789,8 @@ static void ixgb_setup_rctl(struct ixgb_ * Configure the Rx unit of the MAC after a reset. **/ -static void ixgb_configure_rx(struct ixgb_adapter *adapter) +static void +ixgb_configure_rx(struct ixgb_adapter *adapter) { uint64_t rdba = adapter->rx_ring.dma; uint32_t rdlen = adapter->rx_ring.count * sizeof(struct ixgb_rx_desc); @@ -805,9 +780,9 @@ static void ixgb_configure_rx(struct ixg IXGB_WRITE_REG(hw, RDT, 0); /* burst 16 or burst when RXT0 */ - rxdctl = RXDCTL_WTHRESH_DEFAULT << IXGB_RXDCTL_WTHRESH_SHIFT - | RXDCTL_HTHRESH_DEFAULT << IXGB_RXDCTL_HTHRESH_SHIFT - | RXDCTL_PTHRESH_DEFAULT << IXGB_RXDCTL_PTHRESH_SHIFT; + rxdctl = RXDCTL_WTHRESH_DEFAULT << IXGB_RXDCTL_WTHRESH_SHIFT + | RXDCTL_HTHRESH_DEFAULT << IXGB_RXDCTL_HTHRESH_SHIFT + | RXDCTL_PTHRESH_DEFAULT << IXGB_RXDCTL_PTHRESH_SHIFT; IXGB_WRITE_REG(hw, RXDCTL, rxdctl); if (adapter->raidc) { @@ -821,34 +797,35 @@ static void ixgb_configure_rx(struct ixg * min is 0 */ /* polling times are 1 == 0.8192us - 2 == 1.6384us - 3 == 3.2768us etc - ... - 511 == 418 us + 2 == 1.6384us + 3 == 3.2768us etc + ... + 511 == 418 us */ -#define IXGB_RAIDC_POLL_DEFAULT 122 /* set to poll every ~100 us under load - also known as 10000 interrupts / sec */ +#define IXGB_RAIDC_POLL_DEFAULT 122 /* set to poll every ~100 us under load + also known as 10000 interrupts / sec */ /* divide this by 2^3 (8) to get a register size count */ - poll_threshold = ((adapter->rx_ring.count - 1) >> 3); + poll_threshold = ((adapter->rx_ring.count-1) >> 3); /* poll at half of that size */ poll_threshold >>= 1; /* make sure its not bigger than our max */ poll_threshold &= 0x3F; - raidc = IXGB_RAIDC_EN | /* turn on raidc style moderation */ - IXGB_RAIDC_RXT_GATE | /* don't interrupt with rxt0 while - in RBD mode (polling) */ - (IXGB_RAIDC_POLL_DEFAULT << IXGB_RAIDC_POLL_SHIFT) | - /* this sets the regular "min interrupt delay" */ - (adapter->rx_int_delay << IXGB_RAIDC_DELAY_SHIFT) | - poll_threshold; + raidc = + IXGB_RAIDC_EN | /* turn on raidc style moderation */ + IXGB_RAIDC_RXT_GATE | /* don't interrupt with rxt0 while + in RBD mode (polling) */ + (IXGB_RAIDC_POLL_DEFAULT << IXGB_RAIDC_POLL_SHIFT) | + /* this sets the regular "min interrupt delay" */ + (adapter-> rx_int_delay << IXGB_RAIDC_DELAY_SHIFT) | + poll_threshold; IXGB_WRITE_REG(hw, RAIDC, raidc); } /* Enable Receive Checksum Offload for TCP and UDP */ - if (adapter->rx_csum == TRUE) { + if(adapter->rx_csum == TRUE) { rxcsum = IXGB_READ_REG(hw, RXCSUM); rxcsum |= IXGB_RXCSUM_TUOFL; IXGB_WRITE_REG(hw, RXCSUM, rxcsum); @@ -877,7 +844,7 @@ static void ixgb_configure_rx(struct ixg adapter->tx_ring.buffer_info = NULL; pci_free_consistent(pdev, adapter->tx_ring.size, - adapter->tx_ring.desc, adapter->tx_ring.dma); + adapter->tx_ring.desc, adapter->tx_ring.dma); adapter->tx_ring.desc = NULL; } @@ -887,7 +903,8 @@ static void ixgb_free_tx_resources(struc * @adapter: board private structure **/ -static void ixgb_clean_tx_ring(struct ixgb_adapter *adapter) +static void +ixgb_clean_tx_ring(struct ixgb_adapter *adapter) { struct ixgb_desc_ring *tx_ring = &adapter->tx_ring; struct ixgb_buffer *buffer_info; @@ -897,13 +914,14 @@ static void ixgb_clean_tx_ring(struct ix /* Free all the Tx ring sk_buffs */ - for (i = 0; i < tx_ring->count; i++) { + for(i = 0; i < tx_ring->count; i++) { buffer_info = &tx_ring->buffer_info[i]; - if (buffer_info->skb) { + if(buffer_info->skb) { pci_unmap_page(pdev, - buffer_info->dma, - buffer_info->length, PCI_DMA_TODEVICE); + buffer_info->dma, + buffer_info->length, + PCI_DMA_TODEVICE); dev_kfree_skb(buffer_info->skb); @@ -953,7 +971,8 @@ static void ixgb_free_rx_resources(struc * @adapter: board private structure **/ -static void ixgb_clean_rx_ring(struct ixgb_adapter *adapter) +static void +ixgb_clean_rx_ring(struct ixgb_adapter *adapter) { struct ixgb_desc_ring *rx_ring = &adapter->rx_ring; struct ixgb_buffer *buffer_info; @@ -963,9 +939,9 @@ static void ixgb_clean_rx_ring(struct ix /* Free all the Rx ring sk_buffs */ - for (i = 0; i < rx_ring->count; i++) { + for(i = 0; i < rx_ring->count; i++) { buffer_info = &rx_ring->buffer_info[i]; - if (buffer_info->skb) { + if(buffer_info->skb) { pci_unmap_single(pdev, buffer_info->dma, @@ -1000,12 +1019,13 @@ static void ixgb_clean_rx_ring(struct ix * Returns 0 on success, negative on failure **/ -static int ixgb_set_mac(struct net_device *netdev, void *p) +static int +ixgb_set_mac(struct net_device *netdev, void *p) { struct ixgb_adapter *adapter = netdev->priv; struct sockaddr *addr = p; - if (!is_valid_ether_addr(addr->sa_data)) + if(!is_valid_ether_addr(addr->sa_data)) return -EADDRNOTAVAIL; memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len); @@ -1025,7 +1045,8 @@ static int ixgb_set_mac(struct net_devic * promiscuous mode, and all-multi behavior. **/ -static void ixgb_set_multi(struct net_device *netdev) +static void +ixgb_set_multi(struct net_device *netdev) { struct ixgb_adapter *adapter = netdev->priv; struct ixgb_hw *hw = &adapter->hw; @@ -1037,16 +1058,16 @@ static void ixgb_set_multi(struct net_de rctl = IXGB_READ_REG(hw, RCTL); - if (netdev->flags & IFF_PROMISC) { + if(netdev->flags & IFF_PROMISC) { rctl |= (IXGB_RCTL_UPE | IXGB_RCTL_MPE); - } else if (netdev->flags & IFF_ALLMULTI) { + } else if(netdev->flags & IFF_ALLMULTI) { rctl |= IXGB_RCTL_MPE; rctl &= ~IXGB_RCTL_UPE; } else { rctl &= ~(IXGB_RCTL_UPE | IXGB_RCTL_MPE); } - if (netdev->mc_count > IXGB_MAX_NUM_MULTICAST_ADDRESSES) { + if(netdev->mc_count > IXGB_MAX_NUM_MULTICAST_ADDRESSES) { rctl |= IXGB_RCTL_MPE; IXGB_WRITE_REG(hw, RCTL, rctl); } else { @@ -1054,10 +1075,10 @@ static void ixgb_set_multi(struct net_de IXGB_WRITE_REG(hw, RCTL, rctl); - for (i = 0, mc_ptr = netdev->mc_list; mc_ptr; - i++, mc_ptr = mc_ptr->next) + for(i = 0, mc_ptr = netdev->mc_list; mc_ptr; + i++, mc_ptr = mc_ptr->next) memcpy(&mta[i * IXGB_ETH_LENGTH_OF_ADDRESS], - mc_ptr->dmi_addr, IXGB_ETH_LENGTH_OF_ADDRESS); + mc_ptr->dmi_addr, IXGB_ETH_LENGTH_OF_ADDRESS); ixgb_mc_addr_list_update(hw, mta, netdev->mc_count, 0); } @@ -1068,7 +1043,8 @@ static void ixgb_set_multi(struct net_de * @data: pointer to netdev cast into an unsigned long **/ -static void ixgb_watchdog(unsigned long data) +static void +ixgb_watchdog(unsigned long data) { struct ixgb_adapter *adapter = (struct ixgb_adapter *)data; struct net_device *netdev = adapter->netdev; @@ -1082,10 +1057,10 @@ static void ixgb_watchdog(unsigned long netif_stop_queue(netdev); } - if (adapter->hw.link_up) { - if (!netif_carrier_ok(netdev)) { + if(adapter->hw.link_up) { + if(!netif_carrier_ok(netdev)) { printk(KERN_INFO "ixgb: %s NIC Link is Up %d Mbps %s\n", - netdev->name, 10000, "Full Duplex"); + netdev->name, 10000, "Full Duplex"); adapter->link_speed = 10000; adapter->link_duplex = FULL_DUPLEX; netif_carrier_on(netdev); @@ -1092,11 +1057,12 @@ netif_wake_queue(netdev); } } else { - if (netif_carrier_ok(netdev)) { + if(netif_carrier_ok(netdev)) { adapter->link_speed = 0; adapter->link_duplex = 0; printk(KERN_INFO - "ixgb: %s NIC Link is Down\n", netdev->name); + "ixgb: %s NIC Link is Down\n", + netdev->name); netif_carrier_off(netdev); netif_stop_queue(netdev); @@ -1105,8 +1128,8 @@ static void ixgb_watchdog(unsigned long ixgb_update_stats(adapter); - if (!netif_carrier_ok(netdev)) { - if (IXGB_DESC_UNUSED(txdr) + 1 < txdr->count) { + if(!netif_carrier_ok(netdev)) { + if(IXGB_DESC_UNUSED(txdr) + 1 < txdr->count) { /* We've lost link, so the controller stops DMA, * but we've got queued Tx work that's never going * to get done, so reset controller to flush Tx. @@ -1117,13 +1140,13 @@ static void ixgb_watchdog(unsigned long /* Early detection of hung controller */ i = txdr->next_to_clean; - if (txdr->buffer_info[i].dma && - time_after(jiffies, txdr->buffer_info[i].time_stamp + HZ) && - !(IXGB_READ_REG(&adapter->hw, STATUS) & IXGB_STATUS_TXOFF)) + if(txdr->buffer_info[i].dma && + time_after(jiffies, txdr->buffer_info[i].time_stamp + HZ) && + !(IXGB_READ_REG(&adapter->hw, STATUS) & IXGB_STATUS_TXOFF)) netif_stop_queue(netdev); /* generate an interrupt to force clean up of any stragglers */ - IXGB_WRITE_REG(&adapter->hw, ICS, IXGB_INT_TXDW); + IXGB_WRITE_REG (&adapter->hw, ICS, IXGB_INT_TXDW); /* Reset the timer */ mod_timer(&adapter->watchdog_timer, jiffies + 2 * HZ); @@ -1142,14 +1165,16 @@ ixgb_tso(struct ixgb_adapter *adapter, s uint8_t ipcss, ipcso, tucss, tucso, hdr_len; uint16_t ipcse, tucse, mss; - if (likely(skb_shinfo(skb)->tso_size)) { + if(likely(skb_shinfo(skb)->tso_size)) { hdr_len = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2)); mss = skb_shinfo(skb)->tso_size; skb->nh.iph->tot_len = 0; skb->nh.iph->check = 0; skb->h.th->check = ~csum_tcpudp_magic(skb->nh.iph->saddr, - skb->nh.iph->daddr, - 0, IPPROTO_TCP, 0); + skb->nh.iph->daddr, + 0, + IPPROTO_TCP, + 0); ipcss = skb->nh.raw - skb->data; ipcso = (void *)&(skb->nh.iph->check) - (void *)skb->data; ipcse = skb->h.raw - skb->data - 1; @@ -1159,32 +1184,26 @@ ixgb_tso(struct ixgb_adapter *adapter, s i = adapter->tx_ring.next_to_use; context_desc = IXGB_CONTEXT_DESC(adapter->tx_ring, i); - - context_desc->ipcss = ipcss; - context_desc->ipcso = ipcso; - context_desc->ipcse = cpu_to_le16(ipcse); - context_desc->tucss = tucss; - context_desc->tucso = tucso; - context_desc->tucse = cpu_to_le16(tucse); - context_desc->mss = cpu_to_le16(mss); - context_desc->hdr_len = hdr_len; + + context_desc->ipcss = ipcss; + context_desc->ipcso = ipcso; + context_desc->ipcse = cpu_to_le16(ipcse); + context_desc->tucss = tucss; + context_desc->tucso = tucso; + context_desc->tucse = cpu_to_le16(tucse); + context_desc->mss = cpu_to_le16(mss); + context_desc->hdr_len= hdr_len; context_desc->status = 0; - context_desc->cmd_type_len = cpu_to_le32(IXGB_CONTEXT_DESC_TYPE - | - IXGB_CONTEXT_DESC_CMD_TSE - | - IXGB_CONTEXT_DESC_CMD_IP - | - IXGB_CONTEXT_DESC_CMD_TCP - | - IXGB_CONTEXT_DESC_CMD_RS - | - IXGB_CONTEXT_DESC_CMD_IDE - | (skb->len - - (hdr_len))); + context_desc->cmd_type_len = cpu_to_le32( + IXGB_CONTEXT_DESC_TYPE + | IXGB_CONTEXT_DESC_CMD_TSE + | IXGB_CONTEXT_DESC_CMD_IP + | IXGB_CONTEXT_DESC_CMD_TCP + | IXGB_CONTEXT_DESC_CMD_RS + | IXGB_CONTEXT_DESC_CMD_IDE + | (skb->len - (hdr_len))); - if (++i == adapter->tx_ring.count) - i = 0; + if(++i == adapter->tx_ring.count) i = 0; adapter->tx_ring.next_to_use = i; return TRUE; @@ -1201,7 +1177,7 @@ ixgb_tx_csum(struct ixgb_adapter *adapte unsigned int i; uint8_t css, cso; - if (likely(skb->ip_summed == CHECKSUM_HW)) { + if(likely(skb->ip_summed == CHECKSUM_HW)) { css = skb->h.raw - skb->data; cso = (skb->h.raw + skb->csum) - skb->data; @@ -1212,16 +1188,16 @@ ixgb_tx_csum(struct ixgb_adapter *adapte context_desc->tucso = cso; context_desc->tucse = 0; /* zero out any previously existing data in one instruction */ - *(uint32_t *) & (context_desc->ipcss) = 0; + *(uint32_t *)&(context_desc->ipcss) = 0; context_desc->status = 0; context_desc->hdr_len = 0; context_desc->mss = 0; context_desc->cmd_type_len = - cpu_to_le32(IXGB_CONTEXT_DESC_TYPE - | IXGB_TX_DESC_CMD_RS | IXGB_TX_DESC_CMD_IDE); + cpu_to_le32(IXGB_CONTEXT_DESC_TYPE + | IXGB_TX_DESC_CMD_RS + | IXGB_TX_DESC_CMD_IDE); - if (++i == adapter->tx_ring.count) - i = 0; + if(++i == adapter->tx_ring.count) i = 0; adapter->tx_ring.next_to_use = i; return TRUE; @@ -1235,7 +1211,7 @@ ixgb_tx_csum(struct ixgb_adapter *adapte static inline int ixgb_tx_map(struct ixgb_adapter *adapter, struct sk_buff *skb, - unsigned int first) + unsigned int first) { struct ixgb_desc_ring *tx_ring = &adapter->tx_ring; struct ixgb_buffer *buffer_info; @@ -1248,23 +1224,24 @@ ixgb_tx_map(struct ixgb_adapter *adapter i = tx_ring->next_to_use; - while (len) { + while(len) { buffer_info = &tx_ring->buffer_info[i]; size = min(len, IXGB_MAX_JUMBO_FRAME_SIZE); buffer_info->length = size; buffer_info->dma = - pci_map_single(adapter->pdev, - skb->data + offset, size, PCI_DMA_TODEVICE); + pci_map_single(adapter->pdev, + skb->data + offset, + size, + PCI_DMA_TODEVICE); buffer_info->time_stamp = jiffies; len -= size; offset += size; count++; - if (++i == tx_ring->count) - i = 0; + if(++i == tx_ring->count) i = 0; } - for (f = 0; f < nr_frags; f++) { + for(f = 0; f < nr_frags; f++) { struct skb_frag_struct *frag; frag = &skb_shinfo(skb)->frags[f]; @@ -1271,22 +1224,22 @@ len = frag->size; offset = 0; - while (len) { + while(len) { buffer_info = &tx_ring->buffer_info[i]; size = min(len, IXGB_MAX_JUMBO_FRAME_SIZE); buffer_info->length = size; buffer_info->dma = - pci_map_page(adapter->pdev, - frag->page, - frag->page_offset + offset, - size, PCI_DMA_TODEVICE); + pci_map_page(adapter->pdev, + frag->page, + frag->page_offset + offset, + size, + PCI_DMA_TODEVICE); buffer_info->time_stamp = jiffies; len -= size; offset += size; count++; - if (++i == tx_ring->count) - i = 0; + if(++i == tx_ring->count) i = 0; } } i = (i == 0) ? tx_ring->count - 1 : i - 1; @@ -1297,8 +1273,7 @@ ixgb_tx_map(struct ixgb_adapter *adapter } static inline void -ixgb_tx_queue(struct ixgb_adapter *adapter, int count, int vlan_id, - int tx_flags) +ixgb_tx_queue(struct ixgb_adapter *adapter, int count, int vlan_id,int tx_flags) { struct ixgb_desc_ring *tx_ring = &adapter->tx_ring; struct ixgb_tx_desc *tx_desc = NULL; @@ -1308,36 +1284,35 @@ ixgb_tx_queue(struct ixgb_adapter *adapt uint8_t popts = 0; unsigned int i; - if (tx_flags & IXGB_TX_FLAGS_TSO) { + if(tx_flags & IXGB_TX_FLAGS_TSO) { cmd_type_len |= IXGB_TX_DESC_CMD_TSE; popts |= (IXGB_TX_DESC_POPTS_IXSM | IXGB_TX_DESC_POPTS_TXSM); } - if (tx_flags & IXGB_TX_FLAGS_CSUM) + if(tx_flags & IXGB_TX_FLAGS_CSUM) popts |= IXGB_TX_DESC_POPTS_TXSM; - if (tx_flags & IXGB_TX_FLAGS_VLAN) { + if(tx_flags & IXGB_TX_FLAGS_VLAN) { cmd_type_len |= IXGB_TX_DESC_CMD_VLE; } i = tx_ring->next_to_use; - while (count--) { + while(count--) { buffer_info = &tx_ring->buffer_info[i]; tx_desc = IXGB_TX_DESC(*tx_ring, i); tx_desc->buff_addr = cpu_to_le64(buffer_info->dma); tx_desc->cmd_type_len = - cpu_to_le32(cmd_type_len | buffer_info->length); + cpu_to_le32(cmd_type_len | buffer_info->length); tx_desc->status = status; tx_desc->popts = popts; tx_desc->vlan = cpu_to_le16(vlan_id); - if (++i == tx_ring->count) - i = 0; + if(++i == tx_ring->count) i = 0; } - tx_desc->cmd_type_len |= cpu_to_le32(IXGB_TX_DESC_CMD_EOP - | IXGB_TX_DESC_CMD_RS); + tx_desc->cmd_type_len |= cpu_to_le32(IXGB_TX_DESC_CMD_EOP + | IXGB_TX_DESC_CMD_RS ); /* Force memory writes to complete before letting h/w * know there are new descriptors to fetch. (Only @@ -1355,7 +1331,8 @@ ixgb_tx_queue(struct ixgb_adapter *adapt #define DESC_NEEDED TXD_USE_COUNT(IXGB_MAX_DATA_PER_TXD) + \ MAX_SKB_FRAGS * TXD_USE_COUNT(PAGE_SIZE) + 1 -static int ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev) +static int +ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev) { struct ixgb_adapter *adapter = netdev->priv; unsigned int first; @@ -1363,13 +1339,13 @@ static int ixgb_xmit_frame(struct sk_buf unsigned long flags; int vlan_id = 0; - if (skb->len <= 0) { + if(skb->len <= 0) { dev_kfree_skb_any(skb); return 0; } spin_lock_irqsave(&adapter->tx_lock, flags); - if (unlikely(IXGB_DESC_UNUSED(&adapter->tx_ring) < DESC_NEEDED)) { + if(unlikely(IXGB_DESC_UNUSED(&adapter->tx_ring) < DESC_NEEDED)) { netif_stop_queue(netdev); spin_unlock_irqrestore(&adapter->tx_lock, flags); return 1; @@ -1376,20 +1339,20 @@ } spin_unlock_irqrestore(&adapter->tx_lock, flags); - if (adapter->vlgrp && vlan_tx_tag_present(skb)) { + if(adapter->vlgrp && vlan_tx_tag_present(skb)) { tx_flags |= IXGB_TX_FLAGS_VLAN; vlan_id = vlan_tx_tag_get(skb); } first = adapter->tx_ring.next_to_use; - - if (ixgb_tso(adapter, skb)) + + if(ixgb_tso(adapter, skb)) tx_flags |= IXGB_TX_FLAGS_TSO; - else if (ixgb_tx_csum(adapter, skb)) + else if(ixgb_tx_csum(adapter, skb)) tx_flags |= IXGB_TX_FLAGS_CSUM; ixgb_tx_queue(adapter, ixgb_tx_map(adapter, skb, first), vlan_id, - tx_flags); + tx_flags); netdev->trans_start = jiffies; @@ -1401,7 +1377,8 @@ static int ixgb_xmit_frame(struct sk_buf * @netdev: network interface device structure **/ -static void ixgb_tx_timeout(struct net_device *netdev) +static void +ixgb_tx_timeout(struct net_device *netdev) { struct ixgb_adapter *adapter = netdev->priv; @@ -1409,7 +1385,8 @@ static void ixgb_tx_timeout(struct net_d schedule_work(&adapter->tx_timeout_task); } -static void ixgb_tx_timeout_task(struct net_device *netdev) +static void +ixgb_tx_timeout_task(struct net_device *netdev) { struct ixgb_adapter *adapter = netdev->priv; @@ -1425,7 +1403,8 @@ static void ixgb_tx_timeout_task(struct * The statistics are actually updated from the timer callback. **/ -static struct net_device_stats *ixgb_get_stats(struct net_device *netdev) +static struct net_device_stats * +ixgb_get_stats(struct net_device *netdev) { struct ixgb_adapter *adapter = netdev->priv; @@ -1440,27 +1418,27 @@ static struct net_device_stats *ixgb_get * Returns 0 on success, negative on failure **/ -static int ixgb_change_mtu(struct net_device *netdev, int new_mtu) +static int +ixgb_change_mtu(struct net_device *netdev, int new_mtu) { struct ixgb_adapter *adapter = netdev->priv; int max_frame = new_mtu + ENET_HEADER_SIZE + ENET_FCS_LENGTH; int old_max_frame = netdev->mtu + ENET_HEADER_SIZE + ENET_FCS_LENGTH; - if ((max_frame < IXGB_MIN_ENET_FRAME_SIZE_WITHOUT_FCS + ENET_FCS_LENGTH) - || (max_frame > IXGB_MAX_JUMBO_FRAME_SIZE + ENET_FCS_LENGTH)) { + if((max_frame < IXGB_MIN_ENET_FRAME_SIZE_WITHOUT_FCS + ENET_FCS_LENGTH) + || (max_frame > IXGB_MAX_JUMBO_FRAME_SIZE + ENET_FCS_LENGTH)) { IXGB_ERR("Invalid MTU setting\n"); return -EINVAL; } - if ((max_frame <= - IXGB_MAX_ENET_FRAME_SIZE_WITHOUT_FCS + ENET_FCS_LENGTH) - || (max_frame <= IXGB_RXBUFFER_2048)) { + if((max_frame <= IXGB_MAX_ENET_FRAME_SIZE_WITHOUT_FCS + ENET_FCS_LENGTH) + || (max_frame <= IXGB_RXBUFFER_2048)) { adapter->rx_buffer_len = IXGB_RXBUFFER_2048; - } else if (max_frame <= IXGB_RXBUFFER_4096) { + } else if(max_frame <= IXGB_RXBUFFER_4096) { adapter->rx_buffer_len = IXGB_RXBUFFER_4096; - } else if (max_frame <= IXGB_RXBUFFER_8192) { + } else if(max_frame <= IXGB_RXBUFFER_8192) { adapter->rx_buffer_len = IXGB_RXBUFFER_8192; } else { @@ -1593,28 +1600,29 @@ static void ixgb_update_stats(struct ixg * @pt_regs: CPU registers structure **/ -static irqreturn_t ixgb_intr(int irq, void *data, struct pt_regs *regs) +static irqreturn_t +ixgb_intr(int irq, void *data, struct pt_regs *regs) { struct net_device *netdev = data; struct ixgb_adapter *adapter = netdev->priv; struct ixgb_hw *hw = &adapter->hw; - uint32_t icr = IXGB_READ_REG(&adapter->hw, ICR); + uint32_t icr = IXGB_READ_REG(hw, ICR); #ifndef CONFIG_IXGB_NAPI unsigned int i; #endif - if (unlikely(!icr)) - return IRQ_NONE; /* Not our interrupt */ + if(unlikely(!icr)) + return IRQ_NONE; /* Not our interrupt */ - if (unlikely(icr & (IXGB_INT_RXSEQ | IXGB_INT_LSC))) { + if(unlikely(icr & (IXGB_INT_RXSEQ | IXGB_INT_LSC))) { mod_timer(&adapter->watchdog_timer, jiffies); } #ifdef CONFIG_IXGB_NAPI - if (netif_rx_schedule_prep(netdev)) { + if(netif_rx_schedule_prep(netdev)) { /* Disable interrupts and register for poll. The flush - of the posted write is intentionally left out. - */ + of the posted write is intentionally left out. + */ atomic_inc(&adapter->irq_sem); IXGB_WRITE_REG(hw, IMC, ~0); @@ -1647,7 +1652,8 @@ static irqreturn_t ixgb_intr(int irq, vo * @adapter: board private structure **/ -static int ixgb_clean(struct net_device *netdev, int *budget) +static int +ixgb_clean(struct net_device *netdev, int *budget) { struct ixgb_adapter *adapter = netdev->priv; int work_to_do = min(*budget, netdev->quota); @@ -1678,7 +1702,8 @@ static int ixgb_clean(struct net_device * @adapter: board private structure **/ -static boolean_t ixgb_clean_tx_irq(struct ixgb_adapter *adapter) +static boolean_t +ixgb_clean_tx_irq(struct ixgb_adapter *adapter) { struct ixgb_desc_ring *tx_ring = &adapter->tx_ring; struct net_device *netdev = adapter->netdev; @@ -1692,9 +1693,9 @@ static boolean_t ixgb_clean_tx_irq(struc eop = tx_ring->buffer_info[i].next_to_watch; eop_desc = IXGB_TX_DESC(*tx_ring, eop); - while (eop_desc->status & IXGB_TX_DESC_STATUS_DD) { + while(eop_desc->status & IXGB_TX_DESC_STATUS_DD) { - for (cleaned = FALSE; !cleaned;) { + for(cleaned = FALSE; !cleaned; ) { tx_desc = IXGB_TX_DESC(*tx_ring, i); buffer_info = &tx_ring->buffer_info[i]; @@ -1703,17 +1693,17 @@ IXGB_TX_DESC_POPTS_IXSM)) adapter->hw_csum_tx_good++; - if (buffer_info->dma) { + if(buffer_info->dma) { pci_unmap_page(pdev, - buffer_info->dma, - buffer_info->length, - PCI_DMA_TODEVICE); + buffer_info->dma, + buffer_info->length, + PCI_DMA_TODEVICE); buffer_info->dma = 0; } - if (buffer_info->skb) { + if(buffer_info->skb) { dev_kfree_skb_any(buffer_info->skb); @@ -1720,13 +1693,12 @@ buffer_info->skb = NULL; } - *(uint32_t *) & (tx_desc->status) = 0; + *(uint32_t *)&(tx_desc->status) = 0; cleaned = (i == eop); - if (++i == tx_ring->count) - i = 0; + if(++i == tx_ring->count) i = 0; } - + eop = tx_ring->buffer_info[i].next_to_watch; eop_desc = IXGB_TX_DESC(*tx_ring, eop); } @@ -1734,8 +1758,8 @@ static boolean_t ixgb_clean_tx_irq(struc tx_ring->next_to_clean = i; spin_lock(&adapter->tx_lock); - if (cleaned && netif_queue_stopped(netdev) && netif_carrier_ok(netdev) - && (IXGB_DESC_UNUSED(tx_ring) > IXGB_TX_QUEUE_WAKE)) { + if(cleaned && netif_queue_stopped(netdev) && netif_carrier_ok(netdev) && + (IXGB_DESC_UNUSED(tx_ring) > IXGB_TX_QUEUE_WAKE)) { netif_wake_queue(netdev); } @@ -1784,7 +1745,8 @@ static boolean_t ixgb_clean_tx_irq(struc static boolean_t #ifdef CONFIG_IXGB_NAPI -ixgb_clean_rx_irq(struct ixgb_adapter *adapter, int *work_done, int work_to_do) +ixgb_clean_rx_irq(struct ixgb_adapter *adapter, int *work_done, + int work_to_do) #else ixgb_clean_rx_irq(struct ixgb_adapter *adapter) #endif @@ -1803,7 +1770,7 @@ ixgb_clean_rx_irq(struct ixgb_adapter *a rx_desc = IXGB_RX_DESC(*rx_ring, i); buffer_info = &rx_ring->buffer_info[i]; - while (rx_desc->status & IXGB_RX_DESC_STATUS_DD) { + while(rx_desc->status & IXGB_RX_DESC_STATUS_DD) { #ifdef CONFIG_IXGB_NAPI if(*work_done >= work_to_do) break; @@ -1813,13 +1770,11 @@ skb = buffer_info->skb; prefetch(skb->data); - if (++i == rx_ring->count) - i = 0; + if(++i == rx_ring->count) i = 0; next_rxd = IXGB_RX_DESC(*rx_ring, i); prefetch(next_rxd); - if ((j = i + 1) == rx_ring->count) - j = 0; + if((j = i + 1) == rx_ring->count) j = 0; next2_buffer = &rx_ring->buffer_info[j]; prefetch(next2_buffer); @@ -1831,17 +1790,18 @@ ixgb_clean_rx_irq(struct ixgb_adapter *a cleaned = TRUE; pci_unmap_single(pdev, - buffer_info->dma, - buffer_info->length, PCI_DMA_FROMDEVICE); + buffer_info->dma, + buffer_info->length, + PCI_DMA_FROMDEVICE); length = le16_to_cpu(rx_desc->length); - if (unlikely(!(rx_desc->status & IXGB_RX_DESC_STATUS_EOP))) { + if(unlikely(!(rx_desc->status & IXGB_RX_DESC_STATUS_EOP))) { /* All receives must fit into a single buffer */ IXGB_DBG("Receive packet consumed multiple buffers " - "length<%x>\n", length); + "length<%x>\n", length); dev_kfree_skb_irq(skb); rx_desc->status = 0; @@ -1852,10 +1876,10 @@ ixgb_clean_rx_irq(struct ixgb_adapter *a continue; } - if (unlikely(rx_desc->errors - & (IXGB_RX_DESC_ERRORS_CE | IXGB_RX_DESC_ERRORS_SE - | IXGB_RX_DESC_ERRORS_P | - IXGB_RX_DESC_ERRORS_RXE))) { + if(unlikely(rx_desc->errors + & (IXGB_RX_DESC_ERRORS_CE | IXGB_RX_DESC_ERRORS_SE | + IXGB_RX_DESC_ERRORS_P | IXGB_RX_DESC_ERRORS_RXE))) { + dev_kfree_skb_irq(skb); rx_desc->status = 0; @@ -1891,7 +1836,7 @@ ixgb_clean_rx_irq(struct ixgb_adapter *a } else { netif_rx(skb); } -#endif /* CONFIG_IXGB_NAPI */ +#endif /* CONFIG_IXGB_NAPI */ netdev->last_rx = jiffies; rx_desc->status = 0; @@ -1913,7 +1937,8 @@ ixgb_clean_rx_irq(struct ixgb_adapter *a * @adapter: address of board private structure **/ -static void ixgb_alloc_rx_buffers(struct ixgb_adapter *adapter) +static void +ixgb_alloc_rx_buffers(struct ixgb_adapter *adapter) { struct ixgb_desc_ring *rx_ring = &adapter->rx_ring; struct net_device *netdev = adapter->netdev; @@ -1927,21 +1952,22 @@ static void ixgb_alloc_rx_buffers(struct i = rx_ring->next_to_use; buffer_info = &rx_ring->buffer_info[i]; - cleancount = IXGB_DESC_UNUSED(rx_ring); + cleancount = IXGB_DESC_UNUSED (rx_ring); /* lessen this to 4 if we're * in the midst of raidc and rbd is occuring * because we don't want to delay returning buffers when low */ - num_group_tail_writes = adapter->raidc ? 4 : IXGB_RX_BUFFER_WRITE; - + num_group_tail_writes + = adapter->raidc ? 4 : IXGB_RX_BUFFER_WRITE; + /* leave one descriptor unused */ - while (--cleancount > 0) { + while(--cleancount > 0) { rx_desc = IXGB_RX_DESC(*rx_ring, i); skb = dev_alloc_skb(adapter->rx_buffer_len + NET_IP_ALIGN); - if (unlikely(!skb)) { + if(unlikely(!skb)) { /* Better luck next round */ break; } @@ -1957,13 +1983,14 @@ static void ixgb_alloc_rx_buffers(struct buffer_info->skb = skb; buffer_info->length = adapter->rx_buffer_len; buffer_info->dma = - pci_map_single(pdev, - skb->data, - adapter->rx_buffer_len, PCI_DMA_FROMDEVICE); + pci_map_single(pdev, + skb->data, + adapter->rx_buffer_len, + PCI_DMA_FROMDEVICE); rx_desc->buff_addr = cpu_to_le64(buffer_info->dma); - if ((i & ~(num_group_tail_writes - 1)) == i) { + if((i & ~(num_group_tail_writes- 1)) == i) { /* Force memory writes to complete before letting h/w * know there are new descriptors to fetch. (Only * applicable for weak-ordered memory model archs, @@ -1973,8 +2000,7 @@ static void ixgb_alloc_rx_buffers(struct IXGB_WRITE_REG(&adapter->hw, RDT, i); } - if (++i == rx_ring->count) - i = 0; + if(++i == rx_ring->count) i = 0; buffer_info = &rx_ring->buffer_info[i]; } @@ -1996,7 +2022,7 @@ ixgb_vlan_rx_register(struct net_device ixgb_irq_disable(adapter); adapter->vlgrp = grp; - if (grp) { + if(grp) { /* enable VLAN tag insert/strip */ ctrl = IXGB_READ_REG(&adapter->hw, CTRL0); ctrl |= IXGB_CTRL0_VME; @@ -2025,7 +2051,8 @@ ixgb_vlan_rx_register(struct net_device ixgb_irq_enable(adapter); } -static void ixgb_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid) +static void +ixgb_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid) { struct ixgb_adapter *adapter = netdev->priv; uint32_t vfta, index; @@ -2038,7 +2064,8 @@ static void ixgb_vlan_rx_add_vid(struct ixgb_write_vfta(&adapter->hw, index, vfta); } -static void ixgb_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid) +static void +ixgb_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid) { struct ixgb_adapter *adapter = netdev->priv; uint32_t vfta, index; @@ -2045,7 +2064,7 @@ ixgb_irq_disable(adapter); - if (adapter->vlgrp) + if(adapter->vlgrp) adapter->vlgrp->vlan_devices[vid] = NULL; ixgb_irq_enable(adapter); @@ -2058,14 +2084,15 @@ static void ixgb_vlan_rx_kill_vid(struct ixgb_write_vfta(&adapter->hw, index, vfta); } -static void ixgb_restore_vlan(struct ixgb_adapter *adapter) +static void +ixgb_restore_vlan(struct ixgb_adapter *adapter) { ixgb_vlan_rx_register(adapter->netdev, adapter->vlgrp); - if (adapter->vlgrp) { + if(adapter->vlgrp) { uint16_t vid; - for (vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) { - if (!adapter->vlgrp->vlan_devices[vid]) + for(vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) { + if(!adapter->vlgrp->vlan_devices[vid]) continue; ixgb_vlan_rx_add_vid(adapter->netdev, vid); } @@ -2083,12 +2111,12 @@ ixgb_notify_reboot(struct notifier_block { struct pci_dev *pdev = NULL; - switch (event) { + switch(event) { case SYS_DOWN: case SYS_HALT: case SYS_POWER_OFF: - while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev))) { - if (pci_dev_driver(pdev) == &ixgb_driver) + while((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev))) { + if(pci_dev_driver(pdev) == &ixgb_driver) ixgb_suspend(pdev, 3); } } @@ -2100,7 +2111,8 @@ * @param pdev pci driver structure used for passing to * @param state power state to enter **/ -static int ixgb_suspend(struct pci_dev *pdev, uint32_t state) +static int +ixgb_suspend(struct pci_dev *pdev, uint32_t state) { struct net_device *netdev = pci_get_drvdata(pdev); struct ixgb_adapter *adapter = netdev->priv; @@ -2107,7 +2111,7 @@ netif_device_detach(netdev); - if (netif_running(netdev)) + if(netif_running(netdev)) ixgb_down(adapter, TRUE); pci_save_state(pdev, adapter->pci_state); diff -up netdev-2.6/drivers/net/ixgb/ixgb_osdep.h netdev-2.6/drivers/net/ixgb.new/ixgb_osdep.h --- netdev-2.6/drivers/net/ixgb/ixgb_osdep.h 2004-10-15 13:15:38.000000000 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb_osdep.h 2004-10-15 13:15:56.000000000 -0700 @@ -77,20 +77,21 @@ typedef enum { #define DEBUGOUT3 DEBUGOUT2 #define DEBUGOUT7 DEBUGOUT3 + #define IXGB_WRITE_REG(a, reg, value) ( \ - writel((value), ((a)->hw_addr + IXGB_##reg))) + writel((value), ((a)->hw_addr + IXGB_##reg))) #define IXGB_READ_REG(a, reg) ( \ - readl((a)->hw_addr + IXGB_##reg)) + readl((a)->hw_addr + IXGB_##reg)) #define IXGB_WRITE_REG_ARRAY(a, reg, offset, value) ( \ - writel((value), ((a)->hw_addr + IXGB_##reg + ((offset) << 2)))) + writel((value), ((a)->hw_addr + IXGB_##reg + ((offset) << 2)))) #define IXGB_READ_REG_ARRAY(a, reg, offset) ( \ - readl((a)->hw_addr + IXGB_##reg + ((offset) << 2))) + readl((a)->hw_addr + IXGB_##reg + ((offset) << 2))) #define IXGB_WRITE_FLUSH(a) IXGB_READ_REG(a, STATUS) #define IXGB_MEMCPY memcpy -#endif /* _IXGB_OSDEP_H_ */ +#endif /* _IXGB_OSDEP_H_ */ diff -up netdev-2.6/drivers/net/ixgb/ixgb_param.c netdev-2.6/drivers/net/ixgb.new/ixgb_param.c --- netdev-2.6/drivers/net/ixgb/ixgb_param.c 2004-10-15 13:15:38.000000000 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb_param.c 2004-10-15 13:15:57.000000000 -0700 @@ -34,7 +34,7 @@ #define IXGB_MAX_NIC 8 -#define OPTION_UNSET -1 +#define OPTION_UNSET -1 #define OPTION_DISABLED 0 #define OPTION_ENABLED 1 @@ -188,38 +188,37 @@ IXGB_PARAM(IntDelayEnable, "Transmit Int #define FLOW_CONTROL_DEFAULT FLOW_CONTROL_FULL #define DEFAULT_FCRTL 0x28000 #define DEFAULT_FCRTH 0x30000 -#define MIN_FCRTL 0 +#define MIN_FCRTL 0 #define MAX_FCRTL 0x3FFE8 -#define MIN_FCRTH 8 +#define MIN_FCRTH 8 #define MAX_FCRTH 0x3FFF0 -#define DEFAULT_FCPAUSE 0x100 /* this may be too long */ -#define MIN_FCPAUSE 1 +#define DEFAULT_FCPAUSE 0x100 /* this may be too long */ +#define MIN_FCPAUSE 1 #define MAX_FCPAUSE 0xffff + struct ixgb_option { enum { enable_option, range_option, list_option } type; char *name; char *err; - int def; + int def; union { - struct { /* range_option info */ + struct { /* range_option info */ int min; int max; } r; - struct { /* list_option info */ + struct { /* list_option info */ int nr; - struct ixgb_opt_list { - int i; - char *str; - } *p; + struct ixgb_opt_list { int i; char *str; } *p; } l; } arg; }; -static int __devinit ixgb_validate_option(int *value, struct ixgb_option *opt) +static int __devinit +ixgb_validate_option(int *value, struct ixgb_option *opt) { - if (*value == OPTION_UNSET) { + if(*value == OPTION_UNSET) { *value = opt->def; return 0; } @@ -236,32 +235,31 @@ static int __devinit ixgb_validate_optio } break; case range_option: - if (*value >= opt->arg.r.min && *value <= opt->arg.r.max) { + if(*value >= opt->arg.r.min && *value <= opt->arg.r.max) { printk(KERN_INFO "%s set to %i\n", opt->name, *value); return 0; } break; - case list_option:{ - int i; - struct ixgb_opt_list *ent; - - for (i = 0; i < opt->arg.l.nr; i++) { - ent = &opt->arg.l.p[i]; - if (*value == ent->i) { - if (ent->str[0] != '\0') - printk(KERN_INFO "%s\n", - ent->str); - return 0; - } + case list_option: { + int i; + struct ixgb_opt_list *ent; + + for(i = 0; i < opt->arg.l.nr; i++) { + ent = &opt->arg.l.p[i]; + if(*value == ent->i) { + if(ent->str[0] != '\0') + printk(KERN_INFO "%s\n", ent->str); + return 0; } } + } break; default: BUG(); } printk(KERN_INFO "Invalid %s specified (%i) %s\n", - opt->name, *value, opt->err); + opt->name, *value, opt->err); *value = opt->def; return -1; } @@ -278,24 +276,25 @@ static int __devinit ixgb_validate_optio * in a variable in the adapter structure. **/ -void __devinit ixgb_check_options(struct ixgb_adapter *adapter) +void __devinit +ixgb_check_options(struct ixgb_adapter *adapter) { int bd = adapter->bd_number; - if (bd >= IXGB_MAX_NIC) { + if(bd >= IXGB_MAX_NIC) { printk(KERN_NOTICE - "Warning: no configuration for board #%i\n", bd); + "Warning: no configuration for board #%i\n", bd); printk(KERN_NOTICE "Using defaults for all values\n"); bd = IXGB_MAX_NIC; } - { /* Transmit Descriptor Count */ + { /* Transmit Descriptor Count */ struct ixgb_option opt = { .type = range_option, .name = "Transmit Descriptors", - .err = "using default of " __MODULE_STRING(DEFAULT_TXD), - .def = DEFAULT_TXD, - .arg = {.r = {.min = MIN_TXD, - .max = MAX_TXD}} + .err = "using default of " __MODULE_STRING(DEFAULT_TXD), + .def = DEFAULT_TXD, + .arg = { .r = { .min = MIN_TXD, + .max = MAX_TXD}} }; struct ixgb_desc_ring *tx_ring = &adapter->tx_ring; @@ -303,14 +302,14 @@ void __devinit ixgb_check_options(struct ixgb_validate_option(&tx_ring->count, &opt); IXGB_ROUNDUP(tx_ring->count, IXGB_REQ_TX_DESCRIPTOR_MULTIPLE); } - { /* Receive Descriptor Count */ + { /* Receive Descriptor Count */ struct ixgb_option opt = { .type = range_option, .name = "Receive Descriptors", - .err = "using default of " __MODULE_STRING(DEFAULT_RXD), - .def = DEFAULT_RXD, - .arg = {.r = {.min = MIN_RXD, - .max = MAX_RXD}} + .err = "using default of " __MODULE_STRING(DEFAULT_RXD), + .def = DEFAULT_RXD, + .arg = { .r = { .min = MIN_RXD, + .max = MAX_RXD}} }; struct ixgb_desc_ring *rx_ring = &adapter->rx_ring; @@ -318,12 +328,12 @@ void __devinit ixgb_check_options(struct ixgb_validate_option(&rx_ring->count, &opt); IXGB_ROUNDUP(rx_ring->count, IXGB_REQ_RX_DESCRIPTOR_MULTIPLE); } - { /* Receive Checksum Offload Enable */ + { /* Receive Checksum Offload Enable */ struct ixgb_option opt = { .type = enable_option, .name = "Receive Checksum Offload", - .err = "defaulting to Enabled", - .def = OPTION_ENABLED + .err = "defaulting to Enabled", + .def = OPTION_ENABLED }; int rx_csum = XsumRX[bd]; @@ -330,23 +328,22 @@ ixgb_validate_option(&rx_csum, &opt); adapter->rx_csum = rx_csum; } - { /* Flow Control */ + { /* Flow Control */ struct ixgb_opt_list fc_list[] = - { {ixgb_fc_none, "Flow Control Disabled"}, - {ixgb_fc_rx_pause, "Flow Control Receive Only"}, - {ixgb_fc_tx_pause, "Flow Control Transmit Only"}, - {ixgb_fc_full, "Flow Control Enabled"}, - {ixgb_fc_default, "Flow Control Hardware Default"} - }; + {{ ixgb_fc_none, "Flow Control Disabled" }, + { ixgb_fc_rx_pause,"Flow Control Receive Only" }, + { ixgb_fc_tx_pause,"Flow Control Transmit Only" }, + { ixgb_fc_full, "Flow Control Enabled" }, + { ixgb_fc_default, "Flow Control Hardware Default" }}; struct ixgb_option opt = { .type = list_option, .name = "Flow Control", - .err = "reading default settings from EEPROM", - .def = ixgb_fc_full, - .arg = {.l = {.nr = LIST_LEN(fc_list), - .p = fc_list}} + .err = "reading default settings from EEPROM", + .def = ixgb_fc_full, + .arg = { .l = { .nr = LIST_LEN(fc_list), + .p = fc_list }} }; int fc = FlowControl[bd]; @@ -353,7 +328,7 @@ ixgb_validate_option(&fc, &opt); adapter->hw.fc.type = fc; } - { /* Receive Flow Control High Threshold */ + { /* Receive Flow Control High Threshold */ struct ixgb_option opt = { .type = range_option, .name = "Rx Flow Control High Threshold", @@ -366,11 +328,11 @@ adapter->hw.fc.high_water = RxFCHighThresh[bd]; ixgb_validate_option(&adapter->hw.fc.high_water, &opt); - if (!(adapter->hw.fc.type & ixgb_fc_rx_pause)) - printk(KERN_INFO - "Ignoring RxFCHighThresh when no RxFC\n"); + if ( !(adapter->hw.fc.type & ixgb_fc_rx_pause) ) + printk (KERN_INFO + "Ignoring RxFCHighThresh when no RxFC\n"); } - { /* Receive Flow Control Low Threshold */ + { /* Receive Flow Control Low Threshold */ struct ixgb_option opt = { .type = range_option, .name = "Rx Flow Control Low Threshold", @@ -383,11 +328,11 @@ adapter->hw.fc.low_water = RxFCLowThresh[bd]; ixgb_validate_option(&adapter->hw.fc.low_water, &opt); - if (!(adapter->hw.fc.type & ixgb_fc_rx_pause)) - printk(KERN_INFO - "Ignoring RxFCLowThresh when no RxFC\n"); + if ( !(adapter->hw.fc.type & ixgb_fc_rx_pause) ) + printk (KERN_INFO + "Ignoring RxFCLowThresh when no RxFC\n"); } - { /* Flow Control Pause Time Request */ + { /* Flow Control Pause Time Request*/ struct ixgb_option opt = { .type = range_option, .name = "Flow Control Pause Time Request", @@ -402,9 +328,9 @@ int pause_time = FCReqTimeout[bd]; ixgb_validate_option(&pause_time, &opt); - if (!(adapter->hw.fc.type & ixgb_fc_rx_pause)) - printk(KERN_INFO - "Ignoring FCReqTimeout when no RxFC\n"); + if ( !(adapter->hw.fc.type & ixgb_fc_rx_pause) ) + printk (KERN_INFO + "Ignoring FCReqTimeout when no RxFC\n"); adapter->hw.fc.pause_time = pause_time; } /* high low and spacing check for rx flow control thresholds */ @@ -412,60 +410,58 @@ void __devinit ixgb_check_options(struct /* high must be greater than low */ if (adapter->hw.fc.high_water < (adapter->hw.fc.low_water + 8)) { /* set defaults */ - printk(KERN_INFO - "RxFCHighThresh must be >= (RxFCLowThresh + 8), " - "Using Defaults\n"); + printk (KERN_INFO + "RxFCHighThresh must be >= (RxFCLowThresh + 8), " + "Using Defaults\n"); adapter->hw.fc.high_water = DEFAULT_FCRTH; - adapter->hw.fc.low_water = DEFAULT_FCRTL; + adapter->hw.fc.low_water = DEFAULT_FCRTL; } } - { /* Receive Interrupt Delay */ + { /* Receive Interrupt Delay */ struct ixgb_option opt = { .type = range_option, .name = "Receive Interrupt Delay", - .err = - "using default of " __MODULE_STRING(DEFAULT_RDTR), - .def = DEFAULT_RDTR, - .arg = {.r = {.min = MIN_RDTR, - .max = MAX_RDTR}} + .err = "using default of " __MODULE_STRING(DEFAULT_RDTR), + .def = DEFAULT_RDTR, + .arg = { .r = { .min = MIN_RDTR, + .max = MAX_RDTR}} }; adapter->rx_int_delay = RxIntDelay[bd]; ixgb_validate_option(&adapter->rx_int_delay, &opt); } - { /* Receive Interrupt Moderation */ + { /* Receive Interrupt Moderation */ struct ixgb_option opt = { .type = enable_option, .name = "Advanced Receive Interrupt Moderation", - .err = "defaulting to Enabled", - .def = OPTION_ENABLED + .err = "defaulting to Enabled", + .def = OPTION_ENABLED }; int raidc = RAIDC[bd]; ixgb_validate_option(&raidc, &opt); adapter->raidc = raidc; } - { /* Transmit Interrupt Delay */ + { /* Transmit Interrupt Delay */ struct ixgb_option opt = { .type = range_option, .name = "Transmit Interrupt Delay", - .err = - "using default of " __MODULE_STRING(DEFAULT_TIDV), - .def = DEFAULT_TIDV, - .arg = {.r = {.min = MIN_TIDV, - .max = MAX_TIDV}} + .err = "using default of " __MODULE_STRING(DEFAULT_TIDV), + .def = DEFAULT_TIDV, + .arg = { .r = { .min = MIN_TIDV, + .max = MAX_TIDV}} }; adapter->tx_int_delay = TxIntDelay[bd]; ixgb_validate_option(&adapter->tx_int_delay, &opt); } - { /* Transmit Interrupt Delay Enable */ + { /* Transmit Interrupt Delay Enable */ struct ixgb_option opt = { .type = enable_option, .name = "Tx Interrupt Delay Enable", - .err = "defaulting to Enabled", - .def = OPTION_ENABLED + .err = "defaulting to Enabled", + .def = OPTION_ENABLED }; int ide = IntDelayEnable[bd]; From SRS0+d8a8dca525a694af5047+432+infradead.org+hch@phoenix.srs.infradead.org Fri Oct 29 05:15:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 05:15:24 -0700 (PDT) Received: from phoenix.infradead.org (phoenix.infradead.org [81.187.226.98]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TCFIZC025559 for ; Fri, 29 Oct 2004 05:15:19 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.42 #1 (Red Hat Linux)) id 1CNVeh-00034Y-Hr; Fri, 29 Oct 2004 13:14:55 +0100 Date: Fri, 29 Oct 2004 13:14:55 +0100 From: Christoph Hellwig To: Ganesh Venkatesan Cc: "jgarzik@pobox.com" , netdev Subject: Re: [PATCH netdev-2.6 7/10] ixgb: Replace kmalloc with vmalloc to allocate driver local data structures Message-ID: <20041029121455.GA11807@infradead.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 11103 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: netdev this uses up vmalloc space and thus is a regression. From hadi@cyberus.ca Fri Oct 29 05:35:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 05:35:41 -0700 (PDT) Received: from mx02.cybersurf.com (mx02.cybersurf.com [209.197.145.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TCZZSs026318 for ; Fri, 29 Oct 2004 05:35:35 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1CNVyN-0001tY-GN for netdev@oss.sgi.com; Fri, 29 Oct 2004 08:35:15 -0400 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CNVyH-0008K0-2j; Fri, 29 Oct 2004 08:35:09 -0400 Subject: Re: [PATCH 7/6] cls_fw: CONFIG_NET_CLS_IND is not dependant on CONFIG_NET_CLS_ACT From: jamal Reply-To: hadi@cyberus.ca To: Thomas Graf Cc: "David S. Miller" , netdev@oss.sgi.com In-Reply-To: <20041029115333.GK12289@postel.suug.ch> References: <20041029002113.GY12289@postel.suug.ch> <20041029102620.GH12289@postel.suug.ch> <1099049980.1024.21.camel@jzny.localdomain> <20041029115333.GK12289@postel.suug.ch> Content-Type: text/plain Organization: jamalopolous Message-Id: <1099053306.1025.95.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 29 Oct 2004 08:35:06 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 11104 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev On Fri, 2004-10-29 at 07:53, Thomas Graf wrote: > * jamal <1099049980.1024.21.camel@jzny.localdomain> 2004-10-29 07:39 > > Thomas, Can you submit equivalent patches for cls_u32.c? > > Sure, already done and queued for submission. I will submit them today. > Ok, that will be good because it will help do a one shot test on bk. > Regarding the generic statistics for actions: > > I thought about dumping the most common stats basic,queue,rate_est > in tcf_action_copy_stats and let the action module dump additional > stats in its get_stats implementation. I think the action code seems clean to me as is. Here are my thoughts: Most of them just need queue stats (actually at the moment all of them) so in tca_gen, struct tc_stats stats needs replacement to make sure they only have a queue stat because it is generic. All actions call qdisc_copy_stats calls in their stats dumpers. Replace that call with the magic you have in the new stats dumping scheme. I think the same lock can be used for all stats in an action (if new ones are added by an action). > Any objections in creating > struct tca_act_gen with the content of tca_gen and use it to > access a->priv from act_api.c to get my hands on the statistics > and stats_lock? Refer to above. cheers, jamal PS:- I hope this is after the bk snapshot with current cleanups you have is tested? From hadi@cyberus.ca Fri Oct 29 05:42:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 05:42:50 -0700 (PDT) Received: from mx01.cybersurf.com (mx01.cybersurf.com [209.197.145.104]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TCgjYv026748 for ; Fri, 29 Oct 2004 05:42:46 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx01.cybersurf.com with esmtp (Exim 4.30) id 1CNW5L-0001Bv-4O for netdev@oss.sgi.com; Fri, 29 Oct 2004 08:42:27 -0400 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CNW5F-0000wE-0K; Fri, 29 Oct 2004 08:42:21 -0400 Subject: Re: Asynchronous crypto layer. From: jamal Reply-To: hadi@cyberus.ca To: johnpol@2ka.mipt.ru Cc: netdev@oss.sgi.com, cryptoapi@lists.logix.cz In-Reply-To: <1099030958.4944.148.camel@uganda> References: <1099030958.4944.148.camel@uganda> Content-Type: text/plain Organization: jamalopolous Message-Id: <1099053738.1024.104.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 29 Oct 2004 08:42:18 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 11105 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev On Fri, 2004-10-29 at 02:22, Evgeniy Polyakov wrote: > I'm pleased to announce asynchronous crypto layer for Linux kernel 2.6. > It support following features: > - multiple asynchronous crypto device queues > - crypto session routing > - crypto session binding > - modular load balancing > - crypto session batching genetically implemented by design > - crypto session priority > - different kinds of crypto operation(RNG, asymmetrical crypto, HMAC and > any other) > Very nice. I am very curious if you see perfomance improvements over old scheme in the case of a single crypto chip in a fast CPU. It has been shown in the past that with a xeon in the range of 2Ghz the context setup and the big lock (and lack of async) implied that performance enhancement using a crypto chip was negligible. IIRC, the only time it started showing anything useful was when a compute intensive alg like 3DES was chewing packets >= 1000 bytes. My suspicion is you will show it is better to use a crypto chip with async;-> In the minimal you should show some improvement. cheers, jamal From ganesh.venkatesan@intel.com Fri Oct 29 05:51:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 05:51:20 -0700 (PDT) Received: from hermes.jf.intel.com (fmr05.intel.com [134.134.136.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TCpErM027257 for ; Fri, 29 Oct 2004 05:51:14 -0700 Received: from petasus.jf.intel.com (petasus.jf.intel.com [10.7.209.6]) by hermes.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9TCsppr017535; Fri, 29 Oct 2004 12:54:52 GMT Received: from orsmsxvs041.jf.intel.com (orsmsxvs041.jf.intel.com [192.168.65.54]) by petasus.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9TCsYu8005053; Fri, 29 Oct 2004 12:54:34 GMT Received: from orsmsx332.amr.corp.intel.com ([192.168.65.60]) by orsmsxvs041.jf.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004102905504728057 ; Fri, 29 Oct 2004 05:50:47 -0700 Received: from orsmsx408.amr.corp.intel.com ([192.168.65.52]) by orsmsx332.amr.corp.intel.com with Microsoft SMTPSVC(6.0.3790.0); Fri, 29 Oct 2004 05:50:47 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: RE: [PATCH netdev-2.6 7/10] ixgb: Replace kmalloc with vmalloc to allocate driver local data structures Date: Fri, 29 Oct 2004 05:50:45 -0700 Message-ID: <468F3FDA28AA87429AD807992E22D07E0312853C@orsmsx408> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH netdev-2.6 7/10] ixgb: Replace kmalloc with vmalloc to allocate driver local data structures Thread-Index: AcS9sOvP+I4++ZzkTkWAHohvq1hNkAABGcfA From: "Venkatesan, Ganesh" To: "Christoph Hellwig" Cc: , "netdev" X-OriginalArrivalTime: 29 Oct 2004 12:50:47.0325 (UTC) FILETIME=[E94044D0:01C4BDB5] X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i9TCpErM027257 X-archive-position: 11106 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev This is a trade-off between space allocated via kmalloc and vmalloc. My understanding is that kmalloc space is more limited than vmalloc. Is this incorrect? With the original implementation that used kmalloc for all allocations in the driver, I have noticed allocation failures when the ring sizes were set to 4096. Switching the allocation of this space from kmalloc to vmalloc guarantees successful allocation. What am I missing? Ganesh. -----Original Message----- From: Christoph Hellwig [mailto:hch@infradead.org] Sent: Friday, October 29, 2004 5:15 AM To: Venkatesan, Ganesh Cc: jgarzik@pobox.com; netdev Subject: Re: [PATCH netdev-2.6 7/10] ixgb: Replace kmalloc with vmalloc to allocate driver local data structures this uses up vmalloc space and thus is a regression. From tgraf@suug.ch Fri Oct 29 05:53:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 05:53:58 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TCrsBW027600 for ; Fri, 29 Oct 2004 05:53:54 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 46D5482; Fri, 29 Oct 2004 14:53:15 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 081A41C0E9; Fri, 29 Oct 2004 14:53:56 +0200 (CEST) Date: Fri, 29 Oct 2004 14:53:56 +0200 From: Thomas Graf To: jamal Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 7/6] cls_fw: CONFIG_NET_CLS_IND is not dependant on CONFIG_NET_CLS_ACT Message-ID: <20041029125356.GM12289@postel.suug.ch> References: <20041029002113.GY12289@postel.suug.ch> <20041029102620.GH12289@postel.suug.ch> <1099049980.1024.21.camel@jzny.localdomain> <20041029115333.GK12289@postel.suug.ch> <1099053306.1025.95.camel@jzny.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1099053306.1025.95.camel@jzny.localdomain> X-archive-position: 11107 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev > > Regarding the generic statistics for actions: > > > > I thought about dumping the most common stats basic,queue,rate_est > > in tcf_action_copy_stats and let the action module dump additional > > stats in its get_stats implementation. > > I think the action code seems clean to me as is. > Here are my thoughts: > Most of them just need queue stats (actually at the moment all of them) > so in tca_gen, struct tc_stats stats needs replacement to make sure they > only have a queue stat because it is generic. What about the rate estimator and basic stats in pkt_act.h? tca_gen requires at least basic,queue and rate_est for me to compile. > All actions call > qdisc_copy_stats calls in their stats dumpers. Replace that call with > the magic you have in the new stats dumping scheme. That's a lot of duplicated code which could be avoided easly. It's only a cosmetic thing but I don't see any reason for duplicating code :-> So this would be my way of doing it: tcf_action_copy_stats { start_copy() copy_basic_stats() copy_queue_stats() copy_rate_est() call get_stats() and let the action module dump additional stats finish_copy } I'd also suggest to make a new TLV type TCA_ACT_STATS and not reuse TCA_STATS. Another issue... do we want the compatibility stuff and provide the old tc_stats? I'd say no but it's your call. > PS:- I hope this is after the bk snapshot with current cleanups you have > is tested? Sure. Always planning ahead. From hadi@cyberus.ca Fri Oct 29 05:59:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 05:59:09 -0700 (PDT) Received: from mx02.cybersurf.com (mx02.cybersurf.com [209.197.145.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TCx5Fu028071 for ; Fri, 29 Oct 2004 05:59:05 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1CNWL8-0002jx-0Z for netdev@oss.sgi.com; Fri, 29 Oct 2004 08:58:46 -0400 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CNWL5-0003H0-K7; Fri, 29 Oct 2004 08:58:43 -0400 Subject: Re: [RFC] IPSEC failover and replay detection sequence numbers From: jamal Reply-To: hadi@cyberus.ca To: KOVACS Krisztian Cc: netdev@oss.sgi.com, ipsec-tools-devel@lists.sourceforge.net, vpn-failover@lists.balabit.hu In-Reply-To: <1099045435.2888.47.camel@nienna.balabit> References: <1099045435.2888.47.camel@nienna.balabit> Content-Type: text/plain Organization: jamalopolous Message-Id: <1099054721.1027.118.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 29 Oct 2004 08:58:41 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 11108 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev Krisztian, To take a rough estimate of 5K users, how often do you think these replay messages will be generated? Is there a (clever) way to avoid transporting them and still achieve an accurate failover? cheers, jamal From SRS0+d8a8dca525a694af5047+432+infradead.org+hch@phoenix.srs.infradead.org Fri Oct 29 06:08:39 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 06:08:43 -0700 (PDT) Received: from phoenix.infradead.org (phoenix.infradead.org [81.187.226.98]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TD8c2B028598 for ; Fri, 29 Oct 2004 06:08:38 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.42 #1 (Red Hat Linux)) id 1CNWUL-0003Cd-WD; Fri, 29 Oct 2004 14:08:18 +0100 Date: Fri, 29 Oct 2004 14:08:17 +0100 From: Christoph Hellwig To: "Venkatesan, Ganesh" Cc: Christoph Hellwig , jgarzik@pobox.com, netdev Subject: Re: [PATCH netdev-2.6 7/10] ixgb: Replace kmalloc with vmalloc to allocate driver local data structures Message-ID: <20041029130817.GA12301@infradead.org> References: <468F3FDA28AA87429AD807992E22D07E0312853C@orsmsx408> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <468F3FDA28AA87429AD807992E22D07E0312853C@orsmsx408> User-Agent: Mutt/1.4.1i X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 11109 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: netdev On Fri, Oct 29, 2004 at 05:50:45AM -0700, Venkatesan, Ganesh wrote: > This is a trade-off between space allocated via kmalloc and vmalloc. My > understanding is that kmalloc space is more limited than vmalloc. Is > this incorrect? Yes. kmalloc space is only limited by the amount of free memory you have in your system, vmalloc has very low absolute limits (down to 64MB in some configurations).. > With the original implementation that used kmalloc for all allocations > in the driver, I have noticed allocation failures when the ring sizes > were set to 4096. 4096 what? From hadi@cyberus.ca Fri Oct 29 06:13:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 06:13:09 -0700 (PDT) Received: from mx01.cybersurf.com (mx01.cybersurf.com [209.197.145.104]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TDD5vB029270 for ; Fri, 29 Oct 2004 06:13:05 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx01.cybersurf.com with esmtp (Exim 4.30) id 1CNWYg-0006tr-UI for netdev@oss.sgi.com; Fri, 29 Oct 2004 09:12:46 -0400 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CNWYe-0005nT-Nk; Fri, 29 Oct 2004 09:12:45 -0400 Subject: Re: [PATCH 7/6] cls_fw: CONFIG_NET_CLS_IND is not dependant on CONFIG_NET_CLS_ACT From: jamal Reply-To: hadi@cyberus.ca To: Thomas Graf Cc: "David S. Miller" , netdev@oss.sgi.com In-Reply-To: <20041029125356.GM12289@postel.suug.ch> References: <20041029002113.GY12289@postel.suug.ch> <20041029102620.GH12289@postel.suug.ch> <1099049980.1024.21.camel@jzny.localdomain> <20041029115333.GK12289@postel.suug.ch> <1099053306.1025.95.camel@jzny.localdomain> <20041029125356.GM12289@postel.suug.ch> Content-Type: text/plain Organization: jamalopolous Message-Id: <1099055561.1028.133.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 29 Oct 2004 09:12:41 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 11110 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev On Fri, 2004-10-29 at 08:53, Thomas Graf wrote: > What about the rate estimator and basic stats in pkt_act.h? tca_gen > requires at least basic,queue and rate_est for me to compile. > Ok. tca_gen sub for current stats. Also most of them have no use for the estimator. I suppose if you ifdef in tca_gen, then thats fine. > > All actions call > > qdisc_copy_stats calls in their stats dumpers. Replace that call with > > the magic you have in the new stats dumping scheme. > > That's a lot of duplicated code which could be avoided easly. It's > only a cosmetic thing but I don't see any reason for duplicating code :-> > > So this would be my way of doing it: > > tcf_action_copy_stats { > start_copy() > copy_basic_stats() > copy_queue_stats() > copy_rate_est() > call get_stats() and let the action module dump additional stats > finish_copy > } > Good idea. > I'd also suggest to make a new TLV type TCA_ACT_STATS and not reuse > TCA_STATS. > Fine by me. > Another issue... do we want the compatibility stuff and provide the > old tc_stats? I'd say no but it's your call. > no need for backward compat here. We have an opportunity since its not widely deployed. I wont feel sorry for any apps that somehow depend on old stats. cheers, jamal PS:- iproute2 patch needed. PPS:- I hope all the actions i queued to Dave are in ;-> From viro@www.linux.org.uk Fri Oct 29 06:16:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 06:16:30 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TDGOrt029936 for ; Fri, 29 Oct 2004 06:16:25 -0700 Received: from viro by www.linux.org.uk with local (Exim 4.33) id 1CNWbv-0000c6-WA; Fri, 29 Oct 2004 14:16:08 +0100 Date: Fri, 29 Oct 2004 14:16:07 +0100 From: Al Viro To: Pekka Enberg Cc: davem@davemloft.net, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCH 0/3] net: generic netdev_ioaddr Message-ID: <20041029131607.GU24336@parcelfarce.linux.theplanet.co.uk> References: <1099044244.9566.0.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1099044244.9566.0.camel@localhost> User-Agent: Mutt/1.4.1i X-archive-position: 11111 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: viro@parcelfarce.linux.theplanet.co.uk Precedence: bulk X-list: netdev On Fri, Oct 29, 2004 at 01:04:04PM +0300, Pekka Enberg wrote: > Hi, > > This patch introduces a generic netdev_ioaddr and converts natsemi and > 8139too drivers to use it. > > With the recent __iomem annotations, the network drivers need to either > invent this wrapper (like natsemi has done) or duplicate the IO base > address in their private data (similar to 8139too). Therefore, lets > make netdev_ioaddr generic before it is all over the place. NAK. ->base_addr casting is a Bad Idea(tm) and natsemi "solution" isn't (thanks for spotting that crap in natsemi, though; will fix...) Note that there is no such thing as "generic IO base address" - it _is_ private and in the best case current ->base_addr is a scratch register probably used for something vaguely connected with some IO, but it's really up to driver... From hidden@balabit.hu Fri Oct 29 06:24:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 06:25:02 -0700 (PDT) Received: from balabit.hu (balabit.hu [195.70.34.196]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TDOuOf030495 for ; Fri, 29 Oct 2004 06:24:57 -0700 Subject: Re: [RFC] IPSEC failover and replay detection sequence numbers From: KOVACS Krisztian To: hadi@cyberus.ca Cc: netdev@oss.sgi.com, ipsec-tools-devel@lists.sourceforge.net, vpn-failover@lists.balabit.hu In-Reply-To: <1099054721.1027.118.camel@jzny.localdomain> References: <1099045435.2888.47.camel@nienna.balabit> <1099054721.1027.118.camel@jzny.localdomain> Content-Type: text/plain; charset=iso-8859-2 Message-Id: <1099056277.2888.71.camel@nienna.balabit> Mime-Version: 1.0 Date: Fri, 29 Oct 2004 15:24:37 +0200 Content-Transfer-Encoding: 8bit X-archive-position: 11112 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hidden@balabit.hu Precedence: bulk X-list: netdev Hi, 2004-10-29, p keltezéssel 14:58-kor jamal ezt írta: > To take a rough estimate of 5K users, how often do you think > these replay messages will be generated? > > Is there a (clever) way to avoid transporting them and still achieve > an accurate failover? There is, provided that you do not want replay detection to work after a failover. The more often you would send sequence number updates the smaller the possible replay window will be. If you sacrifice scalability you get more accurate replay detection. To play with numbers: say that you have 5K users, so let's suppose there are at most 20K IPSEC SAs. If you decide to send an update per second, that would mean 20K updates/second. If each update message is 20 bytes long, that means that on Ethernet you can transmit all of them in about 280 packets. That's not too much. (I suppose the 20K pfkey messages would be much more of a problem, though...) -- Regards, Krisztian KOVACS From johnpol@2ka.mipt.ru Fri Oct 29 06:50:03 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 06:50:09 -0700 (PDT) Received: from mailer.campus.mipt.ru (mailer.campus.mipt.ru [194.85.82.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TDo2WM031405 for ; Fri, 29 Oct 2004 06:50:03 -0700 Received: from ffke-campus-gw.mipt.ru (2ka [194.85.82.65]) by mailer.campus.mipt.ru (8.13.1/8.13.1) with ESMTP id i9TDnnIK020287; Fri, 29 Oct 2004 17:49:49 +0400 Received: from zanzibar.2ka.mipt.ru (zanzibar.2ka.mipt.ru [194.85.82.77]) by ffke-campus-gw.mipt.ru (8.12.11/8.12.11) with SMTP id i9TDnX6L017316; Fri, 29 Oct 2004 17:49:34 +0400 Date: Fri, 29 Oct 2004 18:06:52 +0400 From: Evgeniy Polyakov To: hadi@cyberus.ca Cc: netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. Message-ID: <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> In-Reply-To: <1099053738.1024.104.camel@jzny.localdomain> References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> Reply-To: johnpol@2ka.mipt.ru Organization: MIPT X-Mailer: Sylpheed-Claws 0.9.12b (GTK+ 1.2.10; i386-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11113 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: johnpol@2ka.mipt.ru Precedence: bulk X-list: netdev On 29 Oct 2004 08:42:18 -0400 jamal wrote: > On Fri, 2004-10-29 at 02:22, Evgeniy Polyakov wrote: > > I'm pleased to announce asynchronous crypto layer for Linux kernel 2.6. > > It support following features: > > - multiple asynchronous crypto device queues > > - crypto session routing > > - crypto session binding > > - modular load balancing > > - crypto session batching genetically implemented by design > > - crypto session priority > > - different kinds of crypto operation(RNG, asymmetrical crypto, HMAC and > > any other) > > > > Very nice. > I am very curious if you see perfomance improvements over old scheme > in the case of a single crypto chip in a fast CPU. > It has been shown in the past that with a xeon in the range of 2Ghz the > context setup and the big lock (and lack of async) implied that > performance enhancement using a crypto chip was negligible. > IIRC, the only time it started showing anything useful was when a > compute intensive alg like 3DES was chewing packets >= 1000 bytes. > > My suspicion is you will show it is better to use a crypto chip with > async;-> In the minimal you should show some improvement. If we have a hardware accelerator chip, than we _already_ have improvements with even the worst async crypto layer, since software and hardware will work in parrallel. I agree that multigigahertz box will beat my HIFN card, but I doubt it can beat 1gghz VIA. And what about random numbers, async crypto, TPM? They all requires some kind of generalization. > > cheers, > jamal Evgeniy Polyakov Only failure makes us experts. -- Theo de Raadt From michal@logix.cz Fri Oct 29 07:03:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 07:03:40 -0700 (PDT) Received: from maxipes.logix.cz (maxipes.logix.cz [81.0.234.97]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TE3W7N000308 for ; Fri, 29 Oct 2004 07:03:33 -0700 Received: from [10.20.1.72] (styx.suse.cz [82.119.242.94]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Michal Ludvig", Issuer "Thawte Personal Freemail Issuing CA" (verified OK)) by maxipes.logix.cz (Postfix) with ESMTP id 1B4731F9D6; Fri, 29 Oct 2004 16:03:13 +0200 (CEST) Message-ID: <41824D9A.3070407@logix.cz> Date: Fri, 29 Oct 2004 16:03:06 +0200 From: Michal Ludvig User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8a4) Gecko/20040927 X-Accept-Language: cs, cz, en MIME-Version: 1.0 To: johnpol@2ka.mipt.ru Cc: hadi@cyberus.ca, netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> In-Reply-To: <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-archive-position: 11114 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: michal@logix.cz Precedence: bulk X-list: netdev Evgeniy Polyakov told me that: > On 29 Oct 2004 08:42:18 -0400 > jamal wrote: > >>>I am very curious if you see perfomance improvements over old scheme >>in the case of a single crypto chip in a fast CPU. >>It has been shown in the past that with a xeon in the range of 2Ghz the >>context setup and the big lock (and lack of async) implied that >>performance enhancement using a crypto chip was negligible. >>IIRC, the only time it started showing anything useful was when a >>compute intensive alg like 3DES was chewing packets >= 1000 bytes. >> >>My suspicion is you will show it is better to use a crypto chip with >>async;-> In the minimal you should show some improvement. > > > If we have a hardware accelerator chip, than we _already_ have improvements > with even the worst async crypto layer, since software and hardware > will work in parrallel. > I agree that multigigahertz box will beat my HIFN card, > but I doubt it can beat 1gghz VIA. I have a very preliminary driver for FastCrypt PCI board for 3DES at http://www.logix.cz/michal/devel/fcrypt/ For now it works with some very ugly hacks in the current cryptoapi, but I can give it a try with your acrypto and report the results. I admit I haven't read your sources too deeply yet so excuse me a dumb question - does acrypto replace or extend cryptoapi? Once I get it running will it take over e.g. encryption for IPsec? Michal Ludvig -- * A mouse is a device used to point at the xterm you want to type in. * Personal homepage - http://www.logix.cz/michal From tgraf@suug.ch Fri Oct 29 07:06:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 07:06:13 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TE685E000692 for ; Fri, 29 Oct 2004 07:06:09 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 00EE282; Fri, 29 Oct 2004 16:05:29 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id D1DC21C0E9; Fri, 29 Oct 2004 16:06:12 +0200 (CEST) Date: Fri, 29 Oct 2004 16:06:12 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCHSET 0/4] PKT_SCHED: More classifier cleanups Message-ID: <20041029140612.GO12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 11115 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Dave, Cleans up route,rsvp,tcindex, and u32 classifier to use the generic classifier routines. All trivial changes not changing any behaviour. Relative to patchset "Generic classifier routines / cls_fw cleanup" Remaining on the road to clean classifier statistics: - transform action to generic statistics - transform policer to generic statistics - iproute2 patch for those - remove old estimator and copy stats routines Cheers From tgraf@suug.ch Fri Oct 29 07:06:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 07:07:01 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TE6s28001011 for ; Fri, 29 Oct 2004 07:06:54 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 3980682; Fri, 29 Oct 2004 16:06:16 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 6CF0E1C0E9; Fri, 29 Oct 2004 16:06:59 +0200 (CEST) Date: Fri, 29 Oct 2004 16:06:59 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 1/4] cls_route: Use generic routines for class binding and police config/dump Message-ID: <20041029140659.GP12289@postel.suug.ch> References: <20041029140612.GO12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041029140612.GO12289@postel.suug.ch> X-archive-position: 11116 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Signed-off-by: Thomas Graf --- linux-2.6.10-rc1-bk7.orig/net/sched/cls_route.c 2004-10-29 11:18:17.000000000 +0200 +++ linux-2.6.10-rc1-bk7/net/sched/cls_route.c 2004-10-29 10:57:07.000000000 +0200 @@ -292,11 +292,8 @@ struct route4_filter *f; while ((f = b->ht[h2]) != NULL) { - unsigned long cl; - b->ht[h2] = f->next; - if ((cl = __cls_set_class(&f->res.class, 0)) != 0) - tp->q->ops->cl_ops->unbind_tcf(tp->q, cl); + tcf_unbind_filter(tp, &f->res); #ifdef CONFIG_NET_CLS_POLICE tcf_police_release(f->police,TCA_ACT_UNBIND); #endif @@ -325,17 +322,12 @@ for (fp = &b->ht[from_hash(h>>16)]; *fp; fp = &(*fp)->next) { if (*fp == f) { - unsigned long cl; - tcf_tree_lock(tp); *fp = f->next; tcf_tree_unlock(tp); route4_reset_fastmap(tp->q->dev, head, f->id); - - if ((cl = cls_set_class(tp, &f->res.class, 0)) != 0) - tp->q->ops->cl_ops->unbind_tcf(tp->q, cl); - + tcf_unbind_filter(tp, &f->res); #ifdef CONFIG_NET_CLS_POLICE tcf_police_release(f->police,TCA_ACT_UNBIND); #endif @@ -379,27 +371,18 @@ return -EINVAL; if ((f = (struct route4_filter*)*arg) != NULL) { - /* Node exists: adjust only classid */ - if (f->handle != handle && handle) return -EINVAL; if (tb[TCA_ROUTE4_CLASSID-1]) { - unsigned long cl; - f->res.classid = *(u32*)RTA_DATA(tb[TCA_ROUTE4_CLASSID-1]); - cl = cls_set_class(tp, &f->res.class, tp->q->ops->cl_ops->bind_tcf(tp->q, base, f->res.classid)); - if (cl) - tp->q->ops->cl_ops->unbind_tcf(tp->q, cl); + tcf_bind_filter(tp, &f->res, base); } #ifdef CONFIG_NET_CLS_POLICE if (tb[TCA_ROUTE4_POLICE-1]) { - struct tcf_police *police = tcf_police_locate(tb[TCA_ROUTE4_POLICE-1], tca[TCA_RATE-1]); - - tcf_tree_lock(tp); - police = xchg(&f->police, police); - tcf_tree_unlock(tp); - - tcf_police_release(police,TCA_ACT_UNBIND); + err = tcf_change_police(tp, &f->police, + tb[TCA_ROUTE4_POLICE-1], tca[TCA_RATE-1]); + if (err < 0) + return err; } #endif return 0; @@ -492,10 +475,10 @@ goto errout; } - cls_set_class(tp, &f->res.class, tp->q->ops->cl_ops->bind_tcf(tp->q, base, f->res.classid)); + tcf_bind_filter(tp, &f->res, base); #ifdef CONFIG_NET_CLS_POLICE if (tb[TCA_ROUTE4_POLICE-1]) - f->police = tcf_police_locate(tb[TCA_ROUTE4_POLICE-1], tca[TCA_RATE-1]); + tcf_change_police(tp, &f->police, tb[TCA_ROUTE4_POLICE-1], tca[TCA_RATE-1]); #endif f->next = f1; @@ -577,16 +560,8 @@ if (f->res.classid) RTA_PUT(skb, TCA_ROUTE4_CLASSID, 4, &f->res.classid); #ifdef CONFIG_NET_CLS_POLICE - if (f->police) { - struct rtattr * p_rta = (struct rtattr*)skb->tail; - - RTA_PUT(skb, TCA_ROUTE4_POLICE, 0, NULL); - - if (tcf_police_dump(skb, f->police) < 0) - goto rtattr_failure; - - p_rta->rta_len = skb->tail - (u8*)p_rta; - } + if (tcf_dump_police(skb, f->police, TCA_ROUTE4_POLICE) < 0) + goto rtattr_failure; #endif rta->rta_len = skb->tail - b; From tgraf@suug.ch Fri Oct 29 07:07:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 07:07:56 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TE7pkT001387 for ; Fri, 29 Oct 2004 07:07:51 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 05AD682; Fri, 29 Oct 2004 16:07:13 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 402791C0E9; Fri, 29 Oct 2004 16:07:56 +0200 (CEST) Date: Fri, 29 Oct 2004 16:07:56 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 2/4] cls_rsvp*: Use generic routines for class binding and police config/dump Message-ID: <20041029140756.GQ12289@postel.suug.ch> References: <20041029140612.GO12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041029140612.GO12289@postel.suug.ch> X-archive-position: 11117 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Signed-off-by: Thomas Graf --- linux-2.6.10-rc1-bk7.orig/net/sched/cls_rsvp.h 2004-10-29 11:18:17.000000000 +0200 +++ linux-2.6.10-rc1-bk7/net/sched/cls_rsvp.h 2004-10-29 11:24:07.000000000 +0200 @@ -272,11 +272,8 @@ struct rsvp_filter *f; while ((f = s->ht[h2]) != NULL) { - unsigned long cl; - s->ht[h2] = f->next; - if ((cl = __cls_set_class(&f->res.class, 0)) != 0) - tp->q->ops->cl_ops->unbind_tcf(tp->q, cl); + tcf_unbind_filter(tp, &f->res); #ifdef CONFIG_NET_CLS_POLICE tcf_police_release(f->police,TCA_ACT_UNBIND); #endif @@ -299,16 +296,10 @@ for (fp = &s->ht[(h>>8)&0xFF]; *fp; fp = &(*fp)->next) { if (*fp == f) { - unsigned long cl; - - tcf_tree_lock(tp); *fp = f->next; tcf_tree_unlock(tp); - - if ((cl = cls_set_class(tp, &f->res.class, 0)) != 0) - tp->q->ops->cl_ops->unbind_tcf(tp->q, cl); - + tcf_unbind_filter(tp, &f->res); #ifdef CONFIG_NET_CLS_POLICE tcf_police_release(f->police,TCA_ACT_UNBIND); #endif @@ -437,22 +428,15 @@ if (f->handle != handle && handle) return -EINVAL; if (tb[TCA_RSVP_CLASSID-1]) { - unsigned long cl; - f->res.classid = *(u32*)RTA_DATA(tb[TCA_RSVP_CLASSID-1]); - cl = cls_set_class(tp, &f->res.class, tp->q->ops->cl_ops->bind_tcf(tp->q, base, f->res.classid)); - if (cl) - tp->q->ops->cl_ops->unbind_tcf(tp->q, cl); + tcf_bind_filter(tp, &f->res, base); } #ifdef CONFIG_NET_CLS_POLICE if (tb[TCA_RSVP_POLICE-1]) { - struct tcf_police *police = tcf_police_locate(tb[TCA_RSVP_POLICE-1], tca[TCA_RATE-1]); - - tcf_tree_lock(tp); - police = xchg(&f->police, police); - tcf_tree_unlock(tp); - - tcf_police_release(police,TCA_ACT_UNBIND); + err = tcf_change_police(tp, &f->police, + tb[TCA_RSVP_POLICE-1], tca[TCA_RATE-1]); + if (err < 0) + return err; } #endif return 0; @@ -531,10 +515,10 @@ f->sess = s; if (f->tunnelhdr == 0) - cls_set_class(tp, &f->res.class, tp->q->ops->cl_ops->bind_tcf(tp->q, base, f->res.classid)); + tcf_bind_filter(tp, &f->res, base); #ifdef CONFIG_NET_CLS_POLICE if (tb[TCA_RSVP_POLICE-1]) - f->police = tcf_police_locate(tb[TCA_RSVP_POLICE-1], tca[TCA_RATE-1]); + tcf_change_police(tp, &f->police, tb[TCA_RSVP_POLICE-1], tca[TCA_RATE-1]); #endif for (fp = &s->ht[h2]; *fp; fp = &(*fp)->next) @@ -641,16 +625,8 @@ if (((f->handle>>8)&0xFF) != 16) RTA_PUT(skb, TCA_RSVP_SRC, sizeof(f->src), f->src); #ifdef CONFIG_NET_CLS_POLICE - if (f->police) { - struct rtattr * p_rta = (struct rtattr*)skb->tail; - - RTA_PUT(skb, TCA_RSVP_POLICE, 0, NULL); - - if (tcf_police_dump(skb, f->police) < 0) - goto rtattr_failure; - - p_rta->rta_len = skb->tail - (u8*)p_rta; - } + if (tcf_dump_police(skb, f->police, TCA_RSVP_POLICE) < 0) + got rtattr_failure; #endif rta->rta_len = skb->tail - b; From tgraf@suug.ch Fri Oct 29 07:08:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 07:08:58 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TE8rrG001738 for ; Fri, 29 Oct 2004 07:08:53 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 18C5D82; Fri, 29 Oct 2004 16:08:14 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 59FED1C0E9; Fri, 29 Oct 2004 16:08:56 +0200 (CEST) Date: Fri, 29 Oct 2004 16:08:56 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 3/4] cls_tcindex: Use generic routines for class binding and police config/dump Message-ID: <20041029140856.GR12289@postel.suug.ch> References: <20041029140612.GO12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041029140612.GO12289@postel.suug.ch> X-archive-position: 11118 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Signed-off-by: Thomas Graf --- linux-2.6.10-rc1-bk7.orig/net/sched/cls_tcindex.c 2004-10-28 22:03:29.000000000 +0200 +++ linux-2.6.10-rc1-bk7/net/sched/cls_tcindex.c 2004-10-29 11:43:29.000000000 +0200 @@ -165,7 +165,6 @@ struct tcindex_data *p = PRIV(tp); struct tcindex_filter_result *r = (struct tcindex_filter_result *) arg; struct tcindex_filter *f = NULL; - unsigned long cl; DPRINTK("tcindex_delete(tp %p,arg 0x%lx),p %p,f %p\n",tp,arg,p,f); if (p->perfect) { @@ -187,9 +186,7 @@ *walk = f->next; tcf_tree_unlock(tp); } - cl = __cls_set_class(&r->res.class,0); - if (cl) - tp->q->ops->cl_ops->unbind_tcf(tp->q,cl); + tcf_unbind_filter(tp, &r->res); #ifdef CONFIG_NET_CLS_POLICE tcf_police_release(r->police, TCA_ACT_UNBIND); #endif @@ -313,28 +310,19 @@ } DPRINTK("r=%p\n",r); if (tb[TCA_TCINDEX_CLASSID-1]) { - unsigned long cl = cls_set_class(tp,&r->res.class,0); - - if (cl) - tp->q->ops->cl_ops->unbind_tcf(tp->q,cl); r->res.classid = *(__u32 *) RTA_DATA(tb[TCA_TCINDEX_CLASSID-1]); - r->res.class = tp->q->ops->cl_ops->bind_tcf(tp->q,base, - r->res.classid); + tcf_bind_filter(tp, &r->res, base); + if (!r->res.class) { r->res.classid = 0; return -ENOENT; } - } + } #ifdef CONFIG_NET_CLS_POLICE - { - struct tcf_police *police; - - police = tb[TCA_TCINDEX_POLICE-1] ? - tcf_police_locate(tb[TCA_TCINDEX_POLICE-1],NULL) : NULL; - tcf_tree_lock(tp); - police = xchg(&r->police,police); - tcf_tree_unlock(tp); - tcf_police_release(police,TCA_ACT_UNBIND); + if (tb[TCA_TCINDEX_POLICE-1]) { + int err = tcf_change_police(tp, &r->police, tb[TCA_TCINDEX_POLICE-1], NULL); + if (err < 0) + return err; } #endif if (r != &new_filter_result) @@ -459,14 +447,8 @@ if (r->res.class) RTA_PUT(skb, TCA_TCINDEX_CLASSID, 4, &r->res.classid); #ifdef CONFIG_NET_CLS_POLICE - if (r->police) { - struct rtattr *p_rta = (struct rtattr *) skb->tail; - - RTA_PUT(skb,TCA_TCINDEX_POLICE,0,NULL); - if (tcf_police_dump(skb,r->police) < 0) - goto rtattr_failure; - p_rta->rta_len = skb->tail-(u8 *) p_rta; - } + if (tcf_dump_police(skb, r->police, TCA_TCINDEX_POLICE) < 0) + goto rtattr_failure; #endif } rta->rta_len = skb->tail-b; From tgraf@suug.ch Fri Oct 29 07:09:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 07:09:31 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TE9Q9T001969 for ; Fri, 29 Oct 2004 07:09:26 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 2660182; Fri, 29 Oct 2004 16:08:48 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 5A04F1C0E9; Fri, 29 Oct 2004 16:09:31 +0200 (CEST) Date: Fri, 29 Oct 2004 16:09:31 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [PATCH 4/4] cls_u32: Use generic routines for class binding and police/action config/dump Message-ID: <20041029140931.GS12289@postel.suug.ch> References: <20041029140612.GO12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041029140612.GO12289@postel.suug.ch> X-archive-position: 11119 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Signed-off-by: Thomas Graf --- linux-2.6.10-rc1-bk7.orig/net/sched/cls_u32.c 2004-10-28 22:03:29.000000000 +0200 +++ linux-2.6.10-rc1-bk7/net/sched/cls_u32.c 2004-10-29 12:04:11.000000000 +0200 @@ -156,18 +156,9 @@ *res = n->res; #ifdef CONFIG_NET_CLS_IND - /* yes, i know it sucks but the feature is - ** optional dammit! - JHS */ - if (0 != n->indev[0]) { - if (NULL == skb->input_dev) { - n = n->next; - goto next_knode; - } else { - if (0 != strcmp(n->indev, skb->input_dev->name)) { - n = n->next; - goto next_knode; - } - } + if (!tcf_match_indev(skb, n->indev)) { + n = n->next; + goto next_knode; } #endif #ifdef CONFIG_CLS_U32_PERF @@ -346,10 +337,7 @@ static int u32_destroy_key(struct tcf_proto *tp, struct tc_u_knode *n) { - unsigned long cl; - - if ((cl = __cls_set_class(&n->res.class, 0)) != 0) - tp->q->ops->cl_ops->unbind_tcf(tp->q, cl); + tcf_unbind_filter(tp, &n->res); #ifdef CONFIG_NET_CLS_ACT if (n->action) { tcf_action_destroy(n->action, TCA_ACT_UNBIND); @@ -495,15 +483,11 @@ return handle|(i>0xFFF ? 0xFFF : i); } -static int u32_set_parms(struct Qdisc *q, unsigned long base, +static int u32_set_parms(struct tcf_proto *tp, unsigned long base, struct tc_u_hnode *ht, struct tc_u_knode *n, struct rtattr **tb, struct rtattr *est) { -#ifdef CONFIG_NET_CLS_ACT - struct tc_action *act = NULL; - int ret; -#endif if (tb[TCA_U32_LINK-1]) { u32 handle = *(u32*)RTA_DATA(tb[TCA_U32_LINK-1]); struct tc_u_hnode *ht_down = NULL; @@ -519,88 +503,43 @@ ht_down->refcnt++; } - sch_tree_lock(q); + tcf_tree_lock(tp); ht_down = xchg(&n->ht_down, ht_down); - sch_tree_unlock(q); + tcf_tree_unlock(tp); if (ht_down) ht_down->refcnt--; } if (tb[TCA_U32_CLASSID-1]) { - unsigned long cl; - n->res.classid = *(u32*)RTA_DATA(tb[TCA_U32_CLASSID-1]); - sch_tree_lock(q); - cl = __cls_set_class(&n->res.class, q->ops->cl_ops->bind_tcf(q, base, n->res.classid)); - sch_tree_unlock(q); - if (cl) - q->ops->cl_ops->unbind_tcf(q, cl); + tcf_bind_filter(tp, &n->res, base); } #ifdef CONFIG_NET_CLS_ACT - /*backward compatibility */ - if (tb[TCA_U32_POLICE-1]) - { - act = kmalloc(sizeof(*act),GFP_KERNEL); - if (NULL == act) - return -ENOMEM; - - memset(act,0,sizeof(*act)); - ret = tcf_action_init_1(tb[TCA_U32_POLICE-1], est,act,"police", TCA_ACT_NOREPLACE, TCA_ACT_BIND); - if (0 > ret){ - tcf_action_destroy(act, TCA_ACT_UNBIND); - return ret; - } - act->type = TCA_OLD_COMPAT; - - sch_tree_lock(q); - act = xchg(&n->action, act); - sch_tree_unlock(q); - - tcf_action_destroy(act, TCA_ACT_UNBIND); - + if (tb[TCA_U32_POLICE-1]) { + int err = tcf_change_act_police(tp, &n->action, tb[TCA_U32_POLICE-1], est); + if (err < 0) + return err; } - if(tb[TCA_U32_ACT-1]) { - act = kmalloc(sizeof(*act),GFP_KERNEL); - if (NULL == act) - return -ENOMEM; - memset(act,0,sizeof(*act)); - ret = tcf_action_init(tb[TCA_U32_ACT-1], est,act,NULL,TCA_ACT_NOREPLACE, TCA_ACT_BIND); - if (0 > ret) { - tcf_action_destroy(act, TCA_ACT_UNBIND); - return ret; - } - - sch_tree_lock(q); - act = xchg(&n->action, act); - sch_tree_unlock(q); - - tcf_action_destroy(act, TCA_ACT_UNBIND); + if (tb[TCA_U32_ACT-1]) { + int err = tcf_change_act(tp, &n->action, tb[TCA_U32_ACT-1], est); + if (err < 0) + return err; } - - #else #ifdef CONFIG_NET_CLS_POLICE if (tb[TCA_U32_POLICE-1]) { - struct tcf_police *police = tcf_police_locate(tb[TCA_U32_POLICE-1], est); - sch_tree_lock(q); - police = xchg(&n->police, police); - sch_tree_unlock(q); - tcf_police_release(police, TCA_ACT_UNBIND); + int err = tcf_change_police(tp, &n->police, tb[TCA_U32_POLICE-1], est); + if (err < 0) + return err; } #endif #endif #ifdef CONFIG_NET_CLS_IND - n->indev[0] = 0; - if(tb[TCA_U32_INDEV-1]) { - struct rtattr *input_dev = tb[TCA_U32_INDEV-1]; - if (RTA_PAYLOAD(input_dev) >= IFNAMSIZ) { - printk("cls_u32: bad indev name %s\n",(char*)RTA_DATA(input_dev)); - /* should we clear state first? */ - return -EINVAL; - } - sprintf(n->indev, "%s", (char*)RTA_DATA(input_dev)); - printk("got IND %s\n",n->indev); + if (tb[TCA_U32_INDEV-1]) { + int err = tcf_change_indev(tp, n->indev, tb[TCA_U32_INDEV-1]); + if (err < 0) + return err; } #endif @@ -630,7 +569,7 @@ if (TC_U32_KEY(n->handle) == 0) return -EINVAL; - return u32_set_parms(tp->q, base, n->ht_up, n, tb, tca[TCA_RATE-1]); + return u32_set_parms(tp, base, n->ht_up, n, tb, tca[TCA_RATE-1]); } if (tb[TCA_U32_DIVISOR-1]) { @@ -718,7 +657,7 @@ } n->fshift = i; } - err = u32_set_parms(tp->q, base, ht, n, tb, tca[TCA_RATE-1]); + err = u32_set_parms(tp, base, ht, n, tb, tca[TCA_RATE-1]); if (err == 0) { struct tc_u_knode **ins; for (ins = &ht->ht[TC_U32_HASH(handle)]; *ins; ins = &(*ins)->next) @@ -806,49 +745,18 @@ if (n->ht_down) RTA_PUT(skb, TCA_U32_LINK, 4, &n->ht_down->handle); #ifdef CONFIG_NET_CLS_ACT - /* again for backward compatible mode - we want - * to work with both old and new modes of entering - * tc data even if iproute2 was newer - jhs - */ - if (n->action) { - struct rtattr * p_rta = (struct rtattr*)skb->tail; - - if (n->action->type != TCA_OLD_COMPAT) { - RTA_PUT(skb, TCA_U32_ACT, 0, NULL); - if (tcf_action_dump(skb,n->action, 0, 0) < 0) { - goto rtattr_failure; - } - } else { - RTA_PUT(skb, TCA_U32_POLICE, 0, NULL); - if (tcf_action_dump_old(skb,n->action,0,0) < 0) { - goto rtattr_failure; - } - } - - p_rta->rta_len = skb->tail - (u8*)p_rta; - } - + if (tcf_dump_act(skb, n->action, TCA_U32_ACT, TCA_U32_POLICE) < 0) + goto rtattr_failure; #else #ifdef CONFIG_NET_CLS_POLICE - if (n->police) { - struct rtattr * p_rta = (struct rtattr*)skb->tail; - RTA_PUT(skb, TCA_U32_POLICE, 0, NULL); - - if (tcf_police_dump(skb, n->police) < 0) - goto rtattr_failure; - - p_rta->rta_len = skb->tail - (u8*)p_rta; - - } + if (tcf_dump_police(skb, n->police, TCA_U32_POLICE) < 0) + goto rtattr_failure; #endif #endif #ifdef CONFIG_NET_CLS_IND - if(strlen(n->indev)) { - struct rtattr * p_rta = (struct rtattr*)skb->tail; + if(strlen(n->indev)) RTA_PUT(skb, TCA_U32_INDEV, IFNAMSIZ, n->indev); - p_rta->rta_len = skb->tail - (u8*)p_rta; - } #endif #ifdef CONFIG_CLS_U32_PERF RTA_PUT(skb, TCA_U32_PCNT, From johnpol@2ka.mipt.ru Fri Oct 29 07:19:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 07:19:18 -0700 (PDT) Received: from mailer.campus.mipt.ru (mailer.campus.mipt.ru [194.85.82.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TEJ9oc002520 for ; Fri, 29 Oct 2004 07:19:10 -0700 Received: from ffke-campus-gw.mipt.ru (2ka [194.85.82.65]) by mailer.campus.mipt.ru (8.13.1/8.13.1) with ESMTP id i9TEJ4QD024906; Fri, 29 Oct 2004 18:19:04 +0400 Received: from zanzibar.2ka.mipt.ru (zanzibar.2ka.mipt.ru [194.85.82.77]) by ffke-campus-gw.mipt.ru (8.12.11/8.12.11) with SMTP id i9TEIkxW014169; Fri, 29 Oct 2004 18:18:46 +0400 Date: Fri, 29 Oct 2004 18:36:06 +0400 From: Evgeniy Polyakov To: Michal Ludvig Cc: netdev@oss.sgi.com, cryptoapi@lists.logix.cz, hadi@cyberus.ca Subject: Re: Asynchronous crypto layer. Message-ID: <20041029183606.0b1a0538@zanzibar.2ka.mipt.ru> In-Reply-To: <41824D9A.3070407@logix.cz> References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> <41824D9A.3070407@logix.cz> Reply-To: johnpol@2ka.mipt.ru Organization: MIPT X-Mailer: Sylpheed-Claws 0.9.12b (GTK+ 1.2.10; i386-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11120 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: johnpol@2ka.mipt.ru Precedence: bulk X-list: netdev On Fri, 29 Oct 2004 16:03:06 +0200 Michal Ludvig wrote: > Evgeniy Polyakov told me that: > > On 29 Oct 2004 08:42:18 -0400 > > jamal wrote: > > > >>>I am very curious if you see perfomance improvements over old scheme > >>in the case of a single crypto chip in a fast CPU. > >>It has been shown in the past that with a xeon in the range of 2Ghz the > >>context setup and the big lock (and lack of async) implied that > >>performance enhancement using a crypto chip was negligible. > >>IIRC, the only time it started showing anything useful was when a > >>compute intensive alg like 3DES was chewing packets >= 1000 bytes. > >> > >>My suspicion is you will show it is better to use a crypto chip with > >>async;-> In the minimal you should show some improvement. > > > > > > If we have a hardware accelerator chip, than we _already_ have improvements > > with even the worst async crypto layer, since software and hardware > > will work in parrallel. > > I agree that multigigahertz box will beat my HIFN card, > > but I doubt it can beat 1gghz VIA. > > I have a very preliminary driver for FastCrypt PCI board for 3DES at > http://www.logix.cz/michal/devel/fcrypt/ > For now it works with some very ugly hacks in the current cryptoapi, but > I can give it a try with your acrypto and report the results. It would be very appreciated> > I admit I haven't read your sources too deeply yet so excuse me a dumb > question - does acrypto replace or extend cryptoapi? Once I get it > running will it take over e.g. encryption for IPsec? They are both an addendum to each other, any crypto layer can be "tunrned into compatibility mode" - i.e. anyone can write bridges like attached sha1_provider.c (it is bridge from async into sync mode). So I can not answer - but in _current_ implementation without any kind of bridges it is an extension. If you compile this sources then you will still have old sync behaviour, IPsec and any other old-style application should be rewritten(like attached consumer.c) to use new asynchronous crypto layer features. > Michal Ludvig > -- > * A mouse is a device used to point at the xterm you want to type in. > * Personal homepage - http://www.logix.cz/michal > _______________________________________________ > > Subscription: http://lists.logix.cz/mailman/listinfo/cryptoapi > List archive: http://lists.logix.cz/pipermail/cryptoapi Evgeniy Polyakov Only failure makes us experts. -- Theo de Raadt From tgraf@suug.ch Fri Oct 29 07:24:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 07:24:12 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TEO7ea002928 for ; Fri, 29 Oct 2004 07:24:08 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 03C9D82; Fri, 29 Oct 2004 16:23:28 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 52F851C0E9; Fri, 29 Oct 2004 16:24:11 +0200 (CEST) Date: Fri, 29 Oct 2004 16:24:11 +0200 From: Thomas Graf To: jamal Cc: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [PATCH 7/6] cls_fw: CONFIG_NET_CLS_IND is not dependant on CONFIG_NET_CLS_ACT Message-ID: <20041029142411.GT12289@postel.suug.ch> References: <20041029002113.GY12289@postel.suug.ch> <20041029102620.GH12289@postel.suug.ch> <1099049980.1024.21.camel@jzny.localdomain> <20041029115333.GK12289@postel.suug.ch> <1099053306.1025.95.camel@jzny.localdomain> <20041029125356.GM12289@postel.suug.ch> <1099055561.1028.133.camel@jzny.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1099055561.1028.133.camel@jzny.localdomain> X-archive-position: 11121 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev > no need for backward compat here. We have an opportunity since its not > widely deployed. I wont feel sorry for any apps that somehow depend on > old stats. My thoughts as well. > PS:- iproute2 patch needed. Should be straight forward if my last patch made it in. Stephen? > PPS:- I hope all the actions i queued to Dave are in ;-> So far gact, mirred and pedit, any more I need to take care of? From Dan.Dickey@savvis.net Fri Oct 29 07:26:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 07:26:42 -0700 (PDT) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TEQbkN003341 for ; Fri, 29 Oct 2004 07:26:37 -0700 Received: from out001.email.savvis.net (out001.apptix.savvis.net [216.91.32.44]) by mailgate1b.savvis.net (8.12.10/8.12.1) with ESMTP id i9TEQ3hF014937 for ; Fri, 29 Oct 2004 09:26:03 -0500 Received: from s228130hz1ew17.apptix-01.savvis.net ([10.146.4.29]) by out001.email.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Fri, 29 Oct 2004 09:26:01 -0500 Received: from [216.89.203.147] ([216.89.203.147]) by s228130hz1ew17.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Fri, 29 Oct 2004 09:25:56 -0500 From: "Dan A. Dickey" Reply-To: dan.dickey@savvis.net Organization: WAM!NET a Division of SAVVIS, Inc. To: netdev@oss.sgi.com Subject: TCP Hang (or close to it): Windows XP -> Linux (w/tcp_bic) Date: Fri, 29 Oct 2004 09:25:48 -0500 User-Agent: KMail/1.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410290925.48955.dan.dickey@savvis.net> X-OriginalArrivalTime: 29 Oct 2004 14:25:57.0009 (UTC) FILETIME=[347CE810:01C4BDC3] X-ECS-MailScanner: No virus is found X-archive-position: 11122 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dan.dickey@savvis.net Precedence: bulk X-list: netdev All, We are able to reproduce what appears to be a tcp hang with Windows XP sending to a Linux box (2.6.7 kernel) that has tcp_bic turned on. At the moment, I'm unsure that tcp_bic has anything to do with it - I'll be testing with tcp_bic turned off today to see if I can reproduce this problem or not. I'm looking for someone to help me determine what the cause of this hang is - I have a 3MB ethereal capture file that I can send if you think you can help out. Let me know, and I'll send you the file and some more information about the application and what we are doing. Just in case this might help you to figure it out, here is a small portion of the display from ethereal at the point of failure. 192.168.168.126 is the Windows XP machine, and 192.168.168.25 is the Linux box. 14:25:58.260109 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack 1101042 win 39272 14:25:58.260116 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack 1102502 win 42192 14:25:58.260133 IP 192.168.168.126.2519 > 192.168.168.25.15100: . 1102502:1103962(1460) ack 1 win 65535 14:25:58.260143 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack 1103962 win 45112 14:25:58.260147 IP 192.168.168.126.2519 > 192.168.168.25.15100: . 1103962:1105422(1460) ack 1 win 65535 14:25:58.260155 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack 1105422 win 48032 14:25:58.260184 IP 192.168.168.126.2519 > 192.168.168.25.15100: . 1105422:1106882(1460) ack 1 win 65535 14:25:58.260191 IP 192.168.168.126.2519 > 192.168.168.25.15100: . 1106882:1108342(1460) ack 1 win 65535 14:25:58.260206 IP 192.168.168.126.2519 > 192.168.168.25.15100: . 1108342:1109802(1460) ack 1 win 65535 14:25:58.260228 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack 1106882 win 50952 14:25:58.260252 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack 1108342 win 53872 14:25:58.260273 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack 1109802 win 56792 14:25:58.260279 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack 1111262 win 59712 14:25:58.260286 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack 1112722 win 62632 14:25:58.260293 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack 1114182 win 16 14:25:58.260348 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack 1114506 win 16 14:25:58.534331 IP 192.168.168.126.2451 > 192.168.168.25.15100: . 160:176(16) ack 1 win 65535 14:25:58.534493 IP 192.168.168.25.15100 > 192.168.168.126.2451: . ack 176 win 16 14:26:03.237624 IP 192.168.168.126.2519 > 192.168.168.25.15100: . 1114506:1114522(16) ack 1 win 65535 14:26:03.237803 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack 1114522 win 16 14:26:03.565752 IP 192.168.168.126.2451 > 192.168.168.25.15100: . 176:192(16) ack 1 win 65535 14:26:03.565914 IP 192.168.168.25.15100 > 192.168.168.126.2451: . ack 192 win 16 14:26:08.269049 IP 192.168.168.126.2519 > 192.168.168.25.15100: . 1114522:1114538(16) ack 1 win 65535 14:26:08.269217 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack 1114538 win 16 14:26:08.597185 IP 192.168.168.126.2451 > 192.168.168.25.15100: . 192:208(16) ack 1 win 65535 14:26:08.597347 IP 192.168.168.25.15100 > 192.168.168.126.2451: . ack 208 win 16 14:26:13.300469 IP 192.168.168.126.2519 > 192.168.168.25.15100: . 1114538:1114554(16) ack 1 win 65535 14:26:13.300640 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack 1114554 win 16 14:26:13.628603 IP 192.168.168.126.2451 > 192.168.168.25.15100: . 208:224(16) ack 1 win 65535 14:26:13.628774 IP 192.168.168.25.15100 > 192.168.168.126.2451: . ack 224 win 16 14:26:18.331909 IP 192.168.168.126.2519 > 192.168.168.25.15100: . 1114554:1114570(16) ack 1 win 65535 14:26:18.332075 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack 1114570 win 16 14:26:18.660013 IP 192.168.168.126.2451 > 192.168.168.25.15100: . 224:240(16) ack 1 win 65535 14:26:18.660174 IP 192.168.168.25.15100 > 192.168.168.126.2451: . ack 240 win 16 I'm not sure how well this is going to come across, but as I said - I can send the capture file. Please help! Thanks in advance. (My concern is the window on the Linux side dropping from 62632 to 16 at the 14:25:58.260293 point - this just doesn't seem right). -Dan -- Dan A. Dickey dan.dickey@savvis.net SAVVIS Transforming Information Technology From simlo@phys.au.dk Fri Oct 29 07:46:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 07:47:01 -0700 (PDT) Received: from lirs02.phys.au.dk (lirs02.phys.au.dk [130.225.28.43]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TEkrjF004051 for ; Fri, 29 Oct 2004 07:46:55 -0700 Received: from da410.ifa.au.dk (da410 [10.12.1.21]) by lirs02.phys.au.dk (8.12.6/8.12.6) with SMTP id i9TEkSsx026502; Fri, 29 Oct 2004 16:46:28 +0200 Received: from localhost by da410.ifa.au.dk (5.65v4.0/1.1.19.2/02Feb99-1132AM) id AA11194; Fri, 29 Oct 2004 16:46:28 +0200 Date: Fri, 29 Oct 2004 16:46:28 +0200 (METDST) From: Esben Nielsen X-Sender: simlo@da410.ifa.au.dk To: "David S. Miller" Cc: akpm@osdl.org, jgarzik@pobox.com, netdev@oss.sgi.com Subject: Re: [patch 1/9] arcnet fixes In-Reply-To: <20041028164111.5ffaca70.davem@redhat.com> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-DAIMI-Spam-Score: -2.82 () ALL_TRUSTED X-Scanned-By: MIMEDefang 2.44 X-archive-position: 11123 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: simlo@phys.au.dk Precedence: bulk X-list: netdev On Thu, 28 Oct 2004, David S. Miller wrote: > On Thu, 28 Oct 2004 00:19:38 -0700 > akpm@osdl.org wrote: > > I don't know what to do with this kind of thing. > Jeff, what do you think? Do we have anyone in any > way active with Arcnet other than this guy? > I know others probably haven't used ArcNet under the 2.6 kernel lately since it was completely broken in 2.6.8.1 (fixed in 2.6.9) and have been for some time when I try to trace it back. This means this patch will have a hard time breaking anything for anybody! It does fix the preemptive problem. I have even used it under Igno Molnar's realtime-patch which must be the ultimate check for preemptiveness :-) Seen from the Linux community point of view: The patch can't hurt anybody but ArcNet users but add to the value of Linux. There are very few people using these drivers and all the rest can just ignore them (especially if the below mistake is fixed *blush*) The more drivers Linux has the more attractive Linux is when you have to pick an OS. In fact I am telling others at work about how it only took me 2 hours to make ArcNet run under Linux on our StrongARM processor board whereas it took my co-worker month to make an driver for the commercial OS we usually run on the boards :-) (Ofcourse making the patch isn't included in the 2 hours.) > One problem with the patch though. > > > diff -puN include/linux/if_ether.h~arcnet-fixes include/linux/if_ether.h > > --- 25/include/linux/if_ether.h~arcnet-fixes 2004-10-28 00:17:07.230704752 -0700 > > +++ 25-akpm/include/linux/if_ether.h 2004-10-28 00:17:07.247702168 -0700 > > @@ -91,6 +91,7 @@ > > #define ETH_P_IRDA 0x0017 /* Linux-IrDA */ > > #define ETH_P_ECONET 0x0018 /* Acorn Econet */ > > #define ETH_P_HDLC 0x0019 /* HDLC frames */ > > +#define ETH_P_ARCNET 0x0020 /* ArcNet */ > > You should use 0x001a or similar, so you don't have > to do this next part of your patch, bumping NPROTO > in net.h > Doh! I can't count in hex it seems. This would probably also mean I won't have to recompile the whole kernel but just the modules and I don't have to reboot to make it work on a new machine - but just until somebody else picks the same protocol number ofcourse. Do I have to fix the problem and resubmit? The number does itself does ofcourse matter to me - it is just used to avoid listening to ETH_P_ALL such the IP-frames are filtered out on the raw-socket I used to connect to user-space. Esben (="this guy":-) > [...] From hadi@cyberus.ca Fri Oct 29 07:54:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 07:54:29 -0700 (PDT) Received: from mx02.cybersurf.com (mx02.cybersurf.com [209.197.145.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TEsMQp004598 for ; Fri, 29 Oct 2004 07:54:23 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1CNY8i-0004AA-3y for netdev@oss.sgi.com; Fri, 29 Oct 2004 10:54:04 -0400 Received: from [216.209.86.2] (helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CNY8f-0007CR-8v; Fri, 29 Oct 2004 10:54:01 -0400 Subject: Re: [PATCH 7/6] cls_fw: CONFIG_NET_CLS_IND is not dependant on CONFIG_NET_CLS_ACT From: jamal Reply-To: hadi@cyberus.ca To: Thomas Graf Cc: "David S. Miller" , netdev@oss.sgi.com In-Reply-To: <20041029142411.GT12289@postel.suug.ch> References: <20041029002113.GY12289@postel.suug.ch> <20041029102620.GH12289@postel.suug.ch> <1099049980.1024.21.camel@jzny.localdomain> <20041029115333.GK12289@postel.suug.ch> <1099053306.1025.95.camel@jzny.localdomain> <20041029125356.GM12289@postel.suug.ch> <1099055561.1028.133.camel@jzny.localdomain> <20041029142411.GT12289@postel.suug.ch> Content-Type: multipart/mixed; boundary="=-d+hrhb7AStBo9QI1Zo2m" Organization: jamalopolous Message-Id: <1099061638.1024.7.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 29 Oct 2004 10:53:58 -0400 X-archive-position: 11125 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev --=-d+hrhb7AStBo9QI1Zo2m Content-Type: text/plain Content-Transfer-Encoding: 7bit On Fri, 2004-10-29 at 10:24, Thomas Graf wrote: > > no need for backward compat here. We have an opportunity since its not > > widely deployed. I wont feel sorry for any apps that somehow depend on > > old stats. > > My thoughts as well. > > > PS:- iproute2 patch needed. > > Should be straight forward if my last patch made it in. Stephen? > > > PPS:- I hope all the actions i queued to Dave are in ;-> > > So far gact, mirred and pedit, any more I need to take care of? ipt - You could wait for Dave to push the one he has in or use the attached one - Depends on Dave but should be fair to update attached one before he wakes up ;-> cheers, jamal --=-d+hrhb7AStBo9QI1Zo2m Content-Disposition: attachment; filename=ipt-2610-patch-0 Content-Type: text/plain; name=ipt-2610-patch-0; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit --- /dev/null 2003-09-15 09:40:47.000000000 -0400 +++ b/include/linux/tc_act/tc_ipt.h 2004-10-24 12:31:13.000000000 -0400 @@ -0,0 +1,21 @@ +#ifndef __LINUX_TC_IPT_H +#define __LINUX_TC_IPT_H + +#include + +#define TCA_ACT_IPT 6 + +enum +{ + TCA_IPT_UNSPEC, + TCA_IPT_TABLE, + TCA_IPT_HOOK, + TCA_IPT_INDEX, + TCA_IPT_CNT, + TCA_IPT_TM, + TCA_IPT_TARG, + __TCA_IPT_MAX +}; +#define TCA_IPT_MAX (__TCA_IPT_MAX - 1) + +#endif --- /dev/null 2003-09-15 09:40:47.000000000 -0400 +++ b/include/net/tc_act/tc_ipt.h 2004-10-24 12:31:13.000000000 -0400 @@ -0,0 +1,16 @@ +#ifndef __NET_TC_IPT_H +#define __NET_TC_IPT_H + +#include + +struct ipt_entry_target; + +struct tcf_ipt +{ + tca_gen(ipt); + u32 hook; + char *tname; + struct ipt_entry_target *t; +}; + +#endif --- /dev/null 2003-09-15 09:40:47.000000000 -0400 +++ b/net/sched/ipt.c 2004-10-24 12:53:41.000000000 -0400 @@ -0,0 +1,392 @@ +/* + * net/sched/ipt.c iptables target interface + * + *TODO: Add other tables. For now we only support the ipv4 table targets + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * Copyright: Jamal Hadi Salim (2002-4) + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +/* use generic hash table */ +#define MY_TAB_SIZE 16 +#define MY_TAB_MASK 15 + +u32 idx_gen; +static struct tcf_ipt *tcf_ipt_ht[MY_TAB_SIZE]; +/* ipt hash table lock */ +static rwlock_t ipt_lock = RW_LOCK_UNLOCKED; + +/* ovewrride the defaults */ +#define tcf_st tcf_ipt +#define tcf_t_lock ipt_lock +#define tcf_ht tcf_ipt_ht + +#include + +static inline int +init_targ(struct tcf_ipt *p) +{ + struct ipt_target *target; + int ret = 0; + struct ipt_entry_target *t = p->t; + target = __ipt_find_target_lock(t->u.user.name, &ret); + + if (!target) { + printk("init_targ: Failed to find %s\n", + t->u.kernel.target->name); + return -1; + } + + DPRINTK("init_targ: found %s\n", target->name); + /* we really need proper ref counting + seems to be only needed for modules?? Talk to laforge */ +/* if (target->me) + __MOD_INC_USE_COUNT(target->me); +*/ + t->u.kernel.target = target; + + __ipt_mutex_up(); + + if (t->u.kernel.target->checkentry + && !t->u.kernel.target->checkentry(p->tname, NULL, t->data, + t->u.target_size + - sizeof (*t), p->hook)) { +/* if (t->u.kernel.target->me) + __MOD_DEC_USE_COUNT(t->u.kernel.target->me); +*/ + DPRINTK("ip_tables: check failed for `%s'.\n", + t->u.kernel.target->name); + ret = -EINVAL; + } + + return ret; +} + +int +tcf_ipt_init(struct rtattr *rta, struct rtattr *est, struct tc_action *a, int ovr, int bind) +{ + struct ipt_entry_target *t; + unsigned h; + struct rtattr *tb[TCA_IPT_MAX]; + struct tcf_ipt *p; + int ret = 0; + u32 index = 0; + u32 hook = 0; + + if (NULL == a || NULL == rta || + (rtattr_parse(tb, TCA_IPT_MAX, RTA_DATA(rta), RTA_PAYLOAD(rta)) < + 0)) { + return -1; + } + + + if (tb[TCA_IPT_INDEX - 1]) { + index = *(u32 *) RTA_DATA(tb[TCA_IPT_INDEX - 1]); + DPRINTK("ipt index %d\n", index); + } + + if (index && (p = tcf_hash_lookup(index)) != NULL) { + a->priv = (void *) p; + spin_lock(&p->lock); + if (bind) { + p->bindcnt += 1; + p->refcnt += 1; + } + if (ovr) { + goto override; + } + spin_unlock(&p->lock); + return ret; + } + + if (NULL == tb[TCA_IPT_TARG - 1] || NULL == tb[TCA_IPT_HOOK - 1]) { + return -1; + } + + p = kmalloc(sizeof (*p), GFP_KERNEL); + if (p == NULL) + return -1; + + memset(p, 0, sizeof (*p)); + p->refcnt = 1; + ret = 1; + spin_lock_init(&p->lock); + p->stats_lock = &p->lock; + if (bind) + p->bindcnt = 1; + +override: + hook = *(u32 *) RTA_DATA(tb[TCA_IPT_HOOK - 1]); + + t = (struct ipt_entry_target *) RTA_DATA(tb[TCA_IPT_TARG - 1]); + + p->t = kmalloc(t->u.target_size, GFP_KERNEL); + if (p->t == NULL) { + if (ovr) { + printk("ipt policy messed up \n"); + spin_unlock(&p->lock); + return -1; + } + kfree(p); + return -1; + } + + memcpy(p->t, RTA_DATA(tb[TCA_IPT_TARG - 1]), t->u.target_size); + DPRINTK(" target NAME %s size %d data[0] %x data[1] %x\n", + t->u.user.name, t->u.target_size, t->data[0], t->data[1]); + + p->tname = kmalloc(IFNAMSIZ, GFP_KERNEL); + + if (p->tname == NULL) { + if (ovr) { + printk("ipt policy messed up 2 \n"); + spin_unlock(&p->lock); + return -1; + } + kfree(p->t); + kfree(p); + return -1; + } else { + int csize = IFNAMSIZ - 1; + + memset(p->tname, 0, IFNAMSIZ); + if (tb[TCA_IPT_TABLE - 1]) { + if (strlen((char *) RTA_DATA(tb[TCA_IPT_TABLE - 1])) < + csize) + csize = strlen(RTA_DATA(tb[TCA_IPT_TABLE - 1])); + strncpy(p->tname, RTA_DATA(tb[TCA_IPT_TABLE - 1]), + csize); + DPRINTK("table name %s\n", p->tname); + } else { + strncpy(p->tname, "mangle", 1 + strlen("mangle")); + } + } + + if (0 > init_targ(p)) { + if (ovr) { + printk("ipt policy messed up 2 \n"); + spin_unlock(&p->lock); + return -1; + } + kfree(p->tname); + kfree(p->t); + kfree(p); + return -1; + } + + if (ovr) { + spin_unlock(&p->lock); + return -1; + } + + p->index = index ? : tcf_hash_new_index(); + + p->tm.lastuse = jiffies; + /* + p->tm.expires = jiffies; + */ + p->tm.install = jiffies; +#ifdef CONFIG_NET_ESTIMATOR + if (est) { + qdisc_new_estimator(&p->stats, p->stats_lock, est); + } +#endif + h = tcf_hash(p->index); + write_lock_bh(&ipt_lock); + p->next = tcf_ipt_ht[h]; + tcf_ipt_ht[h] = p; + write_unlock_bh(&ipt_lock); + a->priv = (void *) p; + return ret; + +} + +int +tcf_ipt_cleanup(struct tc_action *a, int bind) +{ + struct tcf_ipt *p; + p = PRIV(a,ipt); + if (NULL != p) + return tcf_hash_release(p, bind); + return 0; +} + +int +tcf_ipt(struct sk_buff **pskb, struct tc_action *a) +{ + int ret = 0, result = 0; + struct tcf_ipt *p; + struct sk_buff *skb = *pskb; + + p = PRIV(a,ipt); + + if (NULL == p || NULL == skb) { + return -1; + } + + spin_lock(&p->lock); + + p->tm.lastuse = jiffies; + p->stats.bytes += skb->len; + p->stats.packets++; + + if (skb_cloned(skb) ) { + if (pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) { + return -1; + } + } + /* yes, we have to worry about both in and out dev + worry later - danger - this API seems to have changed + from earlier kernels */ + + ret = p->t->u.kernel.target->target(&skb, skb->dev, NULL, + p->hook, p->t->data, (void *)NULL); + switch (ret) { + case NF_ACCEPT: + result = TC_ACT_OK; + break; + case NF_DROP: + result = TC_ACT_SHOT; + p->stats.drops++; + break; + case IPT_CONTINUE: + result = TC_ACT_PIPE; + break; + default: + if (net_ratelimit()) + printk("Bogus netfilter code %d assume ACCEPT\n", ret); + result = TC_POLICE_OK; + break; + } + spin_unlock(&p->lock); + return result; + +} + +int +tcf_ipt_dump(struct sk_buff *skb, struct tc_action *a, int bind, int ref) +{ + struct ipt_entry_target *t; + struct tcf_t tm; + struct tc_cnt c; + unsigned char *b = skb->tail; + + struct tcf_ipt *p; + + p = PRIV(a,ipt); + if (NULL == p) { + printk("BUG: tcf_ipt_dump called with NULL params\n"); + goto rtattr_failure; + } + /* for simple targets kernel size == user size + ** user name = target name + ** for foolproof you need to not assume this + */ + + t = kmalloc(p->t->u.user.target_size, GFP_ATOMIC); + + if (NULL == t) + goto rtattr_failure; + + c.bindcnt = p->bindcnt - bind; + c.refcnt = p->refcnt - ref; + memcpy(t, p->t, p->t->u.user.target_size); + strcpy(t->u.user.name, p->t->u.kernel.target->name); + + DPRINTK("\ttcf_ipt_dump tablename %s length %d\n", p->tname, + strlen(p->tname)); + DPRINTK + ("\tdump target name %s size %d size user %d data[0] %x data[1] %x\n", + p->t->u.kernel.target->name, p->t->u.target_size, p->t->u.user.target_size, + p->t->data[0], p->t->data[1]); + RTA_PUT(skb, TCA_IPT_TARG, p->t->u.user.target_size, t); + RTA_PUT(skb, TCA_IPT_INDEX, 4, &p->index); + RTA_PUT(skb, TCA_IPT_HOOK, 4, &p->hook); + RTA_PUT(skb, TCA_IPT_CNT, sizeof(struct tc_cnt), &c); + RTA_PUT(skb, TCA_IPT_TABLE, IFNAMSIZ, p->tname); + tm.install = jiffies - p->tm.install; + tm.lastuse = jiffies - p->tm.lastuse; + tm.expires = p->tm.expires; + RTA_PUT(skb, TCA_IPT_TM, sizeof (tm), &tm); + return skb->len; + + rtattr_failure: + skb_trim(skb, b - skb->data); + return -1; +} + +int +tcf_ipt_stats(struct sk_buff *skb, struct tc_action *a) +{ + struct tcf_ipt *p; + p = PRIV(a,ipt); + if (NULL != p) + return qdisc_copy_stats(skb, &p->stats, p->stats_lock); + + return 1; +} + +struct tc_action_ops act_ipt_ops = { + .next = NULL, + .kind = "ipt", + .type = TCA_ACT_IPT, + .capab = TCA_CAP_NONE, + .owner = THIS_MODULE, + .act = tcf_ipt, + .get_stats = tcf_ipt_stats, + .dump = tcf_ipt_dump, + .cleanup = tcf_ipt_cleanup, + .lookup = tcf_hash_search, + .init = tcf_ipt_init, + .walk = tcf_generic_walker +}; + +MODULE_AUTHOR("Jamal Hadi Salim(2002-4)"); +MODULE_DESCRIPTION("Iptables target actions"); +MODULE_LICENSE("GPL"); + +static int __init +ipt_init_module(void) +{ + return tcf_register_action(&act_ipt_ops); +} + +static void __exit +ipt_cleanup_module(void) +{ + tcf_unregister_action(&act_ipt_ops); +} + +module_init(ipt_init_module); +module_exit(ipt_cleanup_module); --- a/net/sched/Makefile 2004-10-24 06:10:45.000000000 -0400 +++ b/net/sched/Makefile 2004-10-24 12:34:16.000000000 -0400 @@ -12,6 +12,7 @@ obj-$(CONFIG_NET_CLS_POLICE) += police.o obj-$(CONFIG_NET_ACT_GACT) += gact.o obj-$(CONFIG_NET_ACT_MIRRED) += mirred.o +obj-$(CONFIG_NET_ACT_IPT) += ipt.o obj-$(CONFIG_NET_SCH_CBQ) += sch_cbq.o obj-$(CONFIG_NET_SCH_HTB) += sch_htb.o obj-$(CONFIG_NET_SCH_HPFQ) += sch_hpfq.o --- a/net/sched/Kconfig 2004-10-24 06:10:45.000000000 -0400 +++ b/net/sched/Kconfig 2004-10-24 12:33:31.000000000 -0400 @@ -406,3 +406,11 @@ ---help--- requires new iproute2 This allows packets to be mirrored or redirected to netdevices + +config NET_ACT_IPT + tristate ' iptables Actions' + depends on NET_CLS_ACT && NETFILTER && IP_NF_IPTABLES + ---help--- + requires new iproute2 + This allows iptables targets to be used by tc filters + --=-d+hrhb7AStBo9QI1Zo2m-- From mic@maxipes.logix.cz Fri Oct 29 07:53:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 07:53:53 -0700 (PDT) Received: from maxipes.logix.cz (maxipes.logix.cz [81.0.234.97]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TErknp004474 for ; Fri, 29 Oct 2004 07:53:47 -0700 Received: by maxipes.logix.cz (Postfix, from userid 500) id 6FD2C1F9EB; Fri, 29 Oct 2004 16:53:30 +0200 (CEST) Date: Fri, 29 Oct 2004 16:53:30 +0200 (CEST) From: Michal Ludvig To: Evgeniy Polyakov Cc: netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. In-Reply-To: <20041029183606.0b1a0538@zanzibar.2ka.mipt.ru> Message-ID: References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> <41824D9A.3070407@logix.cz> <20041029183606.0b1a0538@zanzibar.2ka.mipt.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 11124 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: michal@logix.cz Precedence: bulk X-list: netdev On Fri, 29 Oct 2004, Evgeniy Polyakov wrote: > > I have a very preliminary driver for FastCrypt PCI board for 3DES at > > http://www.logix.cz/michal/devel/fcrypt/ > > For now it works with some very ugly hacks in the current cryptoapi, but > > I can give it a try with your acrypto and report the results. > > It would be very appreciated> Re Hifn - you may be interested in this Linux driver: http://kernel.ebshome.net/hifn7955-2.6-4.diff > > I admit I haven't read your sources too deeply yet so excuse me a dumb > > question - does acrypto replace or extend cryptoapi? Once I get it > > running will it take over e.g. encryption for IPsec? > > They are both an addendum to each other, > any crypto layer can be "tunrned into compatibility mode" - > i.e. anyone can write bridges like attached sha1_provider.c (it is bridge > from async into sync mode). So I can not answer - but in _current_ > implementation without any kind of bridges it is an extension. > > If you compile this sources then you will still have old sync behaviour, > IPsec and any other old-style application should be rewritten(like > attached consumer.c) to use new asynchronous crypto layer features. This could be a bit of problem, because AFAIK the IPsec code doesn't allow sleeping while processing the packet. It will likely need a bigger rewrite. Anyway, have you got any tool to measure the cipher throughput without IPsec/dm-crypt being updated for acrypto? Michal Ludvig -- * A mouse is a device used to point at the xterm you want to type in. * Personal homepage - http://www.logix.cz/michal From hadi@cyberus.ca Fri Oct 29 08:02:09 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 08:02:21 -0700 (PDT) Received: from mx01.cybersurf.com (mx01.cybersurf.com [209.197.145.104]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TF299F005322 for ; Fri, 29 Oct 2004 08:02:09 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx01.cybersurf.com with esmtp (Exim 4.30) id 1CNYGE-0001h6-TI for netdev@oss.sgi.com; Fri, 29 Oct 2004 11:01:50 -0400 Received: from [216.209.86.2] (helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CNYG9-00006f-HD; Fri, 29 Oct 2004 11:01:45 -0400 Subject: Re: [RFC] IPSEC failover and replay detection sequence numbers From: jamal Reply-To: hadi@cyberus.ca To: KOVACS Krisztian Cc: netdev@oss.sgi.com, ipsec-tools-devel@lists.sourceforge.net, vpn-failover@lists.balabit.hu In-Reply-To: <1099056277.2888.71.camel@nienna.balabit> References: <1099045435.2888.47.camel@nienna.balabit> <1099054721.1027.118.camel@jzny.localdomain> <1099056277.2888.71.camel@nienna.balabit> Content-Type: text/plain; charset=ISO-8859-1 Organization: jamalopolous Message-Id: <1099062095.1023.14.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 29 Oct 2004 11:01:35 -0400 Content-Transfer-Encoding: 8bit X-archive-position: 11126 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev On Fri, 2004-10-29 at 09:24, KOVACS Krisztian wrote: > Hi, > > 2004-10-29, p keltezéssel 14:58-kor jamal ezt írta: > > To take a rough estimate of 5K users, how often do you think > > these replay messages will be generated? > > > > Is there a (clever) way to avoid transporting them and still achieve > > an accurate failover? > > There is, provided that you do not want replay detection to work after > a failover. The more often you would send sequence number updates the > smaller the possible replay window will be. If you sacrifice scalability > you get more accurate replay detection. > ok. It should still get better in a short period of time though. Moral in my point is i hope you make it an optional feature. > To play with numbers: say that you have 5K users, so let's suppose > there are at most 20K IPSEC SAs. If you decide to send an update per > second, that would mean 20K updates/second. If each update message is 20 > bytes long, that means that on Ethernet you can transmit all of them in > about 280 packets. Are you batching? In my count: Assuming 20bytes is in a packet of its own - your numbers translate to 20Kpps which is > 10Mbps ;-> I suppose SAs will be much lower rate. So you need probably a dedicated 100Mbps just for the syncing. I would also say SA updates should be prioritized over replay messages. > That's not too much. (I suppose the 20K pfkey > messages would be much more of a problem, though...) Why not use the netlink events (you mention pfkey). Batching them with a timeout should help. cheers, jamal From hadi@cyberus.ca Fri Oct 29 08:08:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 08:08:30 -0700 (PDT) Received: from mx01.cybersurf.com (mx01.cybersurf.com [209.197.145.104]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TF8PsE005768 for ; Fri, 29 Oct 2004 08:08:25 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx01.cybersurf.com with esmtp (Exim 4.30) id 1CNYMJ-0006D1-H6 for netdev@oss.sgi.com; Fri, 29 Oct 2004 11:08:07 -0400 Received: from [216.209.86.2] (helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CNYMH-0001Nb-E4; Fri, 29 Oct 2004 11:08:05 -0400 Subject: Re: Asynchronous crypto layer. From: jamal Reply-To: hadi@cyberus.ca To: johnpol@2ka.mipt.ru Cc: netdev@oss.sgi.com, cryptoapi@lists.logix.cz In-Reply-To: <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> Content-Type: text/plain Organization: jamalopolous Message-Id: <1099062483.1023.21.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 29 Oct 2004 11:08:03 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 11127 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev On Fri, 2004-10-29 at 10:06, Evgeniy Polyakov wrote: > If we have a hardware accelerator chip, than we _already_ have improvements > with even the worst async crypto layer, since software and hardware > will work in parrallel. Thats what i am hoping - and theory points to it. Numbers, numbers please ;-> > I agree that multigigahertz box will beat my HIFN card, > but I doubt it can beat 1gghz VIA. The VIA is an interesting one; but it would still be interesting to see comparisons. Actually I should say a good comparison will be with a dual opteron >= 2Ghz which i have no doubt will smoke a xeon - all in s/ware. > And what about random numbers, async crypto, TPM? > They all requires some kind of generalization. > Similar deferal approach should do it. If you are brave, you should probably experiment as well with non-crypto stuff to defer things like gettimeofday computes. (i.e ask the hardware for time, defer response and then call netif_rx with a tag saying time has been computed). cheers, jamal From johnpol@2ka.mipt.ru Fri Oct 29 08:10:42 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 08:10:47 -0700 (PDT) Received: from mailer.campus.mipt.ru (mailer.campus.mipt.ru [194.85.82.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TFAedA006151 for ; Fri, 29 Oct 2004 08:10:41 -0700 Received: from ffke-campus-gw.mipt.ru (2ka [194.85.82.65]) by mailer.campus.mipt.ru (8.13.1/8.13.1) with ESMTP id i9TFAbqt032448; Fri, 29 Oct 2004 19:10:37 +0400 Received: from zanzibar.2ka.mipt.ru (zanzibar.2ka.mipt.ru [194.85.82.77]) by ffke-campus-gw.mipt.ru (8.12.11/8.12.11) with SMTP id i9TFAMwQ031910; Fri, 29 Oct 2004 19:10:22 +0400 Date: Fri, 29 Oct 2004 19:27:41 +0400 From: Evgeniy Polyakov To: Michal Ludvig Cc: netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. Message-ID: <20041029192741.5344ad0f@zanzibar.2ka.mipt.ru> In-Reply-To: References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> <41824D9A.3070407@logix.cz> <20041029183606.0b1a0538@zanzibar.2ka.mipt.ru> Reply-To: johnpol@2ka.mipt.ru Organization: MIPT X-Mailer: Sylpheed-Claws 0.9.12b (GTK+ 1.2.10; i386-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11128 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: johnpol@2ka.mipt.ru Precedence: bulk X-list: netdev On Fri, 29 Oct 2004 16:53:30 +0200 (CEST) Michal Ludvig wrote: > On Fri, 29 Oct 2004, Evgeniy Polyakov wrote: > > > > I have a very preliminary driver for FastCrypt PCI board for 3DES at > > > http://www.logix.cz/michal/devel/fcrypt/ > > > For now it works with some very ugly hacks in the current cryptoapi, but > > > I can give it a try with your acrypto and report the results. > > > > It would be very appreciated> > > Re Hifn - you may be interested in this Linux driver: > http://kernel.ebshome.net/hifn7955-2.6-4.diff Yes, I've seen this patch. but it was designed to be usefull only in custom MX box, so it has some design notes that I do not agree with. > > > I admit I haven't read your sources too deeply yet so excuse me a dumb > > > question - does acrypto replace or extend cryptoapi? Once I get it > > > running will it take over e.g. encryption for IPsec? > > > > They are both an addendum to each other, > > any crypto layer can be "tunrned into compatibility mode" - > > i.e. anyone can write bridges like attached sha1_provider.c (it is bridge > > from async into sync mode). So I can not answer - but in _current_ > > implementation without any kind of bridges it is an extension. > > > > If you compile this sources then you will still have old sync behaviour, > > IPsec and any other old-style application should be rewritten(like > > attached consumer.c) to use new asynchronous crypto layer features. > > This could be a bit of problem, because AFAIK the IPsec code doesn't allow > sleeping while processing the packet. It will likely need a bigger > rewrite. It is design issue. In this schema IPsec can not win with acrypto. but wireless stack, which currently under heavy development, can find acrypto very effective. > Anyway, have you got any tool to measure the cipher throughput without > IPsec/dm-crypt being updated for acrypto? Currently I'm porting from 2.4 my simple block device which was used as communicator between host cpu and embedded pci based board. Probably it can be used as simple measurement tool. Or even I will write from scratch this weekend simple block device like cryptoloop. > Michal Ludvig > -- > * A mouse is a device used to point at the xterm you want to type in. > * Personal homepage - http://www.logix.cz/michal Evgeniy Polyakov Only failure makes us experts. -- Theo de Raadt From hadi@cyberus.ca Fri Oct 29 08:11:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 08:11:41 -0700 (PDT) Received: from mx01.cybersurf.com (mx01.cybersurf.com [209.197.145.104]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TFBb91006474 for ; Fri, 29 Oct 2004 08:11:37 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx01.cybersurf.com with esmtp (Exim 4.30) id 1CNYPP-0007qr-7F for netdev@oss.sgi.com; Fri, 29 Oct 2004 11:11:19 -0400 Received: from [216.209.86.2] (helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CNYPM-0001tJ-Q8; Fri, 29 Oct 2004 11:11:17 -0400 Subject: Re: Asynchronous crypto layer. From: jamal Reply-To: hadi@cyberus.ca To: Michal Ludvig Cc: Evgeniy Polyakov , netdev@oss.sgi.com, cryptoapi@lists.logix.cz In-Reply-To: References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> <41824D9A.3070407@logix.cz> <20041029183606.0b1a0538@zanzibar.2ka.mipt.ru> Content-Type: text/plain Organization: jamalopolous Message-Id: <1099062674.1026.24.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 29 Oct 2004 11:11:14 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 11129 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev On Fri, 2004-10-29 at 10:53, Michal Ludvig wrote: > On Fri, 29 Oct 2004, Evgeniy Polyakov wrote: . > > > > If you compile this sources then you will still have old sync behaviour, > > IPsec and any other old-style application should be rewritten(like > > attached consumer.c) to use new asynchronous crypto layer features. > > This could be a bit of problem, because AFAIK the IPsec code doesn't allow > sleeping while processing the packet. It will likely need a bigger > rewrite. > I dont think its a big rewrite. cheers, jamal From johnpol@2ka.mipt.ru Fri Oct 29 08:20:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 08:20:30 -0700 (PDT) Received: from mailer.campus.mipt.ru (mailer.campus.mipt.ru [194.85.82.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TFKMiC010185 for ; Fri, 29 Oct 2004 08:20:23 -0700 Received: from ffke-campus-gw.mipt.ru (2ka [194.85.82.65]) by mailer.campus.mipt.ru (8.13.1/8.13.1) with ESMTP id i9TFKGFl001789; Fri, 29 Oct 2004 19:20:16 +0400 Received: from zanzibar.2ka.mipt.ru (zanzibar.2ka.mipt.ru [194.85.82.77]) by ffke-campus-gw.mipt.ru (8.12.11/8.12.11) with SMTP id i9TFK0Kc009478; Fri, 29 Oct 2004 19:20:01 +0400 Date: Fri, 29 Oct 2004 19:37:20 +0400 From: Evgeniy Polyakov To: hadi@cyberus.ca Cc: netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. Message-ID: <20041029193720.53235ec3@zanzibar.2ka.mipt.ru> In-Reply-To: <1099062483.1023.21.camel@jzny.localdomain> References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> <1099062483.1023.21.camel@jzny.localdomain> Reply-To: johnpol@2ka.mipt.ru Organization: MIPT X-Mailer: Sylpheed-Claws 0.9.12b (GTK+ 1.2.10; i386-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11130 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: johnpol@2ka.mipt.ru Precedence: bulk X-list: netdev On 29 Oct 2004 11:08:03 -0400 jamal wrote: > On Fri, 2004-10-29 at 10:06, Evgeniy Polyakov wrote: > > > > If we have a hardware accelerator chip, than we _already_ have improvements > > with even the worst async crypto layer, since software and hardware > > will work in parrallel. > > Thats what i am hoping - and theory points to it. Numbers, numbers > please ;-> Michal already have numbers with his patches, that(I studied crypto-dev patch) implements acrypto not from the scratch but as a addendum for syncronous crypto layer, so this approach already has nitpicks. > > I agree that multigigahertz box will beat my HIFN card, > > but I doubt it can beat 1gghz VIA. > > The VIA is an interesting one; but it would still be interesting to see > comparisons. > Actually I should say a good comparison will be with a dual opteron > >= 2Ghz which i have no doubt will smoke a xeon - all in s/ware. He-he, dual Opteron? It costs as 5 Via boards :) ok, I will follow this plan: I will create simple block device like cryptoloop, it will be _really_ simple without any kind of portability and/or stability (I hope it will be one day, at least it took so for 2.4) and I will measure async vs sync. Then Michal can measure it's fcrypt driver also. > > And what about random numbers, async crypto, TPM? > > They all requires some kind of generalization. > > > > Similar deferal approach should do it. > If you are brave, you should probably experiment as well with > non-crypto stuff to defer things like gettimeofday computes. > (i.e ask the hardware for time, defer response and then call netif_rx > with a tag saying time has been computed). gettimeofday is to fast to use in async schema - in such times context switching already plays big role. > cheers, > jamal > > Evgeniy Polyakov Only failure makes us experts. -- Theo de Raadt From jdmason@us.ibm.com Fri Oct 29 08:28:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 08:29:04 -0700 (PDT) Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.131]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TFSr07010716 for ; Fri, 29 Oct 2004 08:28:59 -0700 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e33.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id i9TFSP1p159268 for ; Fri, 29 Oct 2004 11:28:25 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i9TFSPRw474220 for ; Fri, 29 Oct 2004 09:28:25 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id i9TFSOWT032028 for ; Fri, 29 Oct 2004 09:28:24 -0600 Received: from dreadnought.austin.ibm.com (dreadnought.austin.ibm.com [9.41.94.123]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id i9TFSOOv031966; Fri, 29 Oct 2004 09:28:24 -0600 From: Jon Mason Organization: IBM To: Christoph Hellwig Subject: Re: [PATCH netdev-2.6 7/10] ixgb: Replace kmalloc with vmalloc to allocate driver local data structures Date: Fri, 29 Oct 2004 10:28:18 -0500 User-Agent: KMail/1.6.2 Cc: "Venkatesan, Ganesh" , jgarzik@pobox.com, netdev References: <468F3FDA28AA87429AD807992E22D07E0312853C@orsmsx408> <20041029130817.GA12301@infradead.org> In-Reply-To: <20041029130817.GA12301@infradead.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200410291028.18536.jdmason@us.ibm.com> X-archive-position: 11132 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jdmason@us.ibm.com Precedence: bulk X-list: netdev On Friday 29 October 2004 08:08 am, Christoph Hellwig wrote: > On Fri, Oct 29, 2004 at 05:50:45AM -0700, Venkatesan, Ganesh wrote: > > This is a trade-off between space allocated via kmalloc and vmalloc. My > > understanding is that kmalloc space is more limited than vmalloc. Is > > this incorrect? > > Yes. kmalloc space is only limited by the amount of free memory you have > in your system, vmalloc has very low absolute limits (down to 64MB in > some configurations).. > > > With the original implementation that used kmalloc for all allocations > > in the driver, I have noticed allocation failures when the ring sizes > > were set to 4096. > > 4096 what? When the Tx or Rx descriptor queues are set greater than 3000 descriptors on 64bit systems, the amount of memory the driver tries to allocate for this queue is too large for kmalloc. See ixgb_setup_tx_resources() of ixgb_main.c (line 611). The cause of the problem is that ixgb_buffer grows large on 64bit systems because of unsigned long fields in the struct. There seems to be 3 ways around this problem. 1) change the unsigned long fields in ixgb_buffer to unsigned ints (this decreases the size of the struct enough to use kmalloc) 2) Modify the driver to move/remove one of the unsigned long fields (most likely time_stamp) 3) replace kmalloc with vmalloc e1000 made a similar change recently, which was accepted after some discussion. -- Jon Mason jdmason@us.ibm.com From mludvig@suse.cz Fri Oct 29 08:28:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 08:29:01 -0700 (PDT) Received: from maxipes.logix.cz (maxipes.logix.cz [81.0.234.97]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TFStAt010720 for ; Fri, 29 Oct 2004 08:28:55 -0700 Received: from [10.20.1.72] (styx.suse.cz [82.119.242.94]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Michal Ludvig", Issuer "Thawte Personal Freemail Issuing CA" (verified OK)) by maxipes.logix.cz (Postfix) with ESMTP id A24FA1F9FD; Fri, 29 Oct 2004 17:28:38 +0200 (CEST) Message-ID: <418261A2.5070302@suse.cz> Date: Fri, 29 Oct 2004 17:28:34 +0200 From: Michal Ludvig Organization: SuSE CR, s.r.o. User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8a4) Gecko/20040927 X-Accept-Language: cs, cz, en MIME-Version: 1.0 To: johnpol@2ka.mipt.ru Cc: hadi@cyberus.ca, netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> <1099062483.1023.21.camel@jzny.localdomain> <20041029193720.53235ec3@zanzibar.2ka.mipt.ru> In-Reply-To: <20041029193720.53235ec3@zanzibar.2ka.mipt.ru> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-archive-position: 11131 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mludvig@suse.cz Precedence: bulk X-list: netdev -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Evgeniy Polyakov told me that: > On 29 Oct 2004 11:08:03 -0400 jamal wrote: > >> On Fri, 2004-10-29 at 10:06, Evgeniy Polyakov wrote: >> >>> I agree that multigigahertz box will beat my HIFN card, but I >>> doubt it can beat 1gghz VIA. >> >> The VIA is an interesting one; but it would still be interesting to >> see comparisons. Actually I should say a good comparison will be >> with a dual opteron >= 2Ghz which i have no doubt will smoke a xeon >> - all in s/ware. > > He-he, dual Opteron? It costs as 5 Via boards :) > > ok, I will follow this plan: I will create simple block device like > cryptoloop, it will be _really_ simple without any kind of > portability and/or stability (I hope it will be one day, at least it > took so for 2.4) and I will measure async vs sync. Then I could give the numbers for dual (and quad-) Opteron as well ;-)) But make sure that your cryptodriver could take advantage of SMP! > Then Michal can measure it's fcrypt driver also. I'll have to port it to acrypto first. But I'll do so :-) Michal Ludvig - -- SUSE Labs mludvig@suse.cz (+420) 296.542.396 http://www.suse.cz Personal homepage http://www.logix.cz/michal -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFBgmGfDDolCcRbIhgRAvpjAJ4+YPJh3+UTtuBvuaU2lfHaHzhNeQCbBJo9 QGUpOlP/OifPWLmhPpnmayI= =16lO -----END PGP SIGNATURE----- From ganesh.venkatesan@intel.com Fri Oct 29 08:35:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 08:35:54 -0700 (PDT) Received: from hermes.jf.intel.com (fmr05.intel.com [134.134.136.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TFZoVi011453 for ; Fri, 29 Oct 2004 08:35:50 -0700 Received: from talaria.jf.intel.com (talaria.jf.intel.com [10.7.209.7]) by hermes.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-outer.mc,v 1.15 2004/01/30 18:16:28 root Exp $) with ESMTP id i9TFdSpr032628; Fri, 29 Oct 2004 15:39:28 GMT Received: from orsmsxvs040.jf.intel.com (orsmsxvs040.jf.intel.com [192.168.65.206]) by talaria.jf.intel.com (8.12.9-20030918-01/8.12.9/d: major-inner.mc,v 1.11 2004/07/29 22:51:53 root Exp $) with SMTP id i9TFSZ1w009990; Fri, 29 Oct 2004 15:28:36 GMT Received: from orsmsx332.amr.corp.intel.com ([192.168.65.60]) by orsmsxvs040.jf.intel.com (SAVSMTP 3.1.2.35) with SMTP id M2004102908352305237 ; Fri, 29 Oct 2004 08:35:23 -0700 Received: from orsmsx408.amr.corp.intel.com ([192.168.65.52]) by orsmsx332.amr.corp.intel.com with Microsoft SMTPSVC(6.0.3790.0); Fri, 29 Oct 2004 08:35:22 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: RE: [PATCH netdev-2.6 7/10] ixgb: Replace kmalloc with vmalloc to allocate driver local data structures Date: Fri, 29 Oct 2004 08:35:21 -0700 Message-ID: <468F3FDA28AA87429AD807992E22D07E031286C0@orsmsx408> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH netdev-2.6 7/10] ixgb: Replace kmalloc with vmalloc to allocate driver local data structures Thread-Index: AcS9y/aEU7Z9qsbzSX+Gt4e4muEE6wAANT3g From: "Venkatesan, Ganesh" To: "Jon Mason" , "Christoph Hellwig" Cc: , "netdev" X-OriginalArrivalTime: 29 Oct 2004 15:35:23.0179 (UTC) FILETIME=[E7B7FFB0:01C4BDCC] X-Scanned-By: MIMEDefang 2.31 (www . roaringpenguin . com / mimedefang) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by oss.sgi.com id i9TFZoVi011453 X-archive-position: 11133 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ganesh.venkatesan@intel.com Precedence: bulk X-list: netdev >There seems to be 3 ways around this problem. >1) change the unsigned long fields in ixgb_buffer to unsigned ints (this >decreases the size of the struct enough to use kmalloc) PATCH netdev-2.6 6/10 does this. From rddunlap@osdl.org Fri Oct 29 08:39:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 08:39:43 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TFdcQg011845 for ; Fri, 29 Oct 2004 08:39:38 -0700 Received: from [172.20.1.27] (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9TFa6WL014963 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Fri, 29 Oct 2004 08:36:06 -0700 Message-ID: <418260FB.4080807@osdl.org> Date: Fri, 29 Oct 2004 08:25:47 -0700 From: "Randy.Dunlap" Organization: OSDL User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ganesh Venkatesan CC: "jgarzik@pobox.com" , netdev Subject: Re: [PATCH netdev-2.6 8/10] ixgb: Ethtool_ops support References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 11134 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: rddunlap@osdl.org Precedence: bulk X-list: netdev > + > + if(netif_running(adapter->netdev)) { > ixgb_down(adapter, TRUE); > + ixgb_reset(adapter); > ixgb_up(adapter); > - } _Many_ cases where "if(" should be "if (" (same for "for"). > +static int > +ixgb_get_regs_len(struct net_device *netdev) > +{ > +#define IXGB_REG_DUMP_LEN 136*sizeof(uint32_t) > + return IXGB_REG_DUMP_LEN; > +} Might as well #undef this constant if you want it to be "local". There are several places where an if () also does an assignment without doing a comparison. sparse will beep/gong on those. Have you tried sparse? E.g.: + if((err = ixgb_up(adapter))) + return err; Instead of using double parens to appease gcc, do this: if ((err = ixgb_up(adapter) != 0) return err; -- ~Randy From mlindner@syskonnect.de Fri Oct 29 08:43:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 08:43:25 -0700 (PDT) Received: from gatekeeper.syskonnect.de (gatekeeper.syskonnect.de [213.144.13.149]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TFhImD012782 for ; Fri, 29 Oct 2004 08:43:19 -0700 Received: from syskonnect.de (skd.de [10.9.15.1]) by gatekeeper.syskonnect.de (8.12.10/8.12.11) with ESMTP id i9TFh5kT029326; Fri, 29 Oct 2004 17:43:05 +0200 (MET DST) Received: from [10.9.1.171] (localhost [127.0.0.1]) by syskonnect.de (8.12.11/8.12.11) with ESMTP id i9TFgsNk019919; Fri, 29 Oct 2004 17:42:55 +0200 (MEST) Message-ID: <4182812D.8020407@syskonnect.de> Date: Fri, 29 Oct 2004 19:43:09 +0200 From: Mirko Lindner User-Agent: Mozilla Thunderbird 0.8 (X11/20041021) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Stephen Hemminger CC: netdev@oss.sgi.com, jgarzik@pobox.com, rroesler@syskonnect.de Subject: Re: [PATCH] sk98lin: Driver update v7.09 References: <417907C1.6050407@syskonnect.de> <20041027102519.0fc3c7a9@guest-251-240.pdx.osdl.net> In-Reply-To: <20041027102519.0fc3c7a9@guest-251-240.pdx.osdl.net> X-Enigmail-Version: 0.86.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11135 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mlindner@syskonnect.de Precedence: bulk X-list: netdev Stephen, thank You for the help! Should we help you in any case to check or change the defines? We have the problem that the Linux driver consists of multiple files which are also used for other drivers running on other OSes (e.g. Sun, HP-UX, MacOS X, *BSD, Windows, PXE, AIX, Unixware...). This is for instance the reason why we must use redefines for the different data types (e.g. SK_U32). Can you please explain what you mean with "UglyReDefineTheWorld"? Are there any special defines you do not like? I am wondering why the style plays such an important role when looking at the driver source. I am not sure what redefines you are referring to, but the datatype redefines for example have been in the kernel tree for years without any complains. If you could send us a list about the requested changes you'd like to perform, we can help you or provide additional support. We would really appreciate it, if you could inform us in advance about those changes, because the driver was tested extensively in our test&verification department and by a considerably amount of OEM vendors. Changing now parts of the code may break the driver functionality or the functionality of the driver files used on other OSes. Cheers Mirko Stephen Hemminger wrote: > On Fri, 22 Oct 2004 15:14:41 +0200 > Mirko Lindner wrote: > > >>Hi dev-list, >>Hi Jeff, >> >>here is the new version (v7.09) from our sk98lin driver for Kernel 2.6. >>Sorry for this huge patch but this version has a lot of new functions >>and changes. The driver was tested by our Test & Verification group and >>our OEM customers and include all kernel changes during the latest >>kernel release. >> >>Please send me an email if you like a version of the driver for kernel >>2.4 or if you have any problems or questions. >> >>The new patch for BK version 2.6.9 bk6 can be find at: >>http://www.syskonnect.de/support/temp/sk98lin_v7.09_2.6.9-bk6_patch > > > Since you won't... > I'll break this up in pieces (and merge in my changes), and get > rid of the UglyReDefineTheWorld style. > > From jmorris@redhat.com Fri Oct 29 09:17:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 09:17:11 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TGH5q1027919 for ; Fri, 29 Oct 2004 09:17:06 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9TGGctE006543; Fri, 29 Oct 2004 12:16:38 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9TGGcr00867; Fri, 29 Oct 2004 12:16:38 -0400 Received: from thoron.boston.redhat.com (thoron.boston.redhat.com [172.16.80.63]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9TGGXFF004082; Fri, 29 Oct 2004 12:16:34 -0400 Date: Fri, 29 Oct 2004 12:16:35 -0400 (EDT) From: James Morris X-X-Sender: jmorris@thoron.boston.redhat.com To: jamal cc: johnpol@2ka.mipt.ru, , Subject: Re: Asynchronous crypto layer. In-Reply-To: <1099062483.1023.21.camel@jzny.localdomain> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 11137 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jmorris@redhat.com Precedence: bulk X-list: netdev On 29 Oct 2004, jamal wrote: > On Fri, 2004-10-29 at 10:06, Evgeniy Polyakov wrote: > > > > If we have a hardware accelerator chip, than we _already_ have improvements > > with even the worst async crypto layer, since software and hardware > > will work in parrallel. > > Thats what i am hoping - and theory points to it. Numbers, numbers > please ;-> There's an OpenBSD paper which demonstrates the usefulness of crypto hardware for reducing cpu contention. I can't get to their web site now, but it's there somewhere under a security link. - James -- James Morris From hidden@balabit.hu Fri Oct 29 09:16:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 09:16:10 -0700 (PDT) Received: from dawn.sch.bme.hu (dawn.sch.bme.hu [152.66.215.30]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TGG5L5027611 for ; Fri, 29 Oct 2004 09:16:05 -0700 Received: from [127.0.0.1] (localhost [127.0.0.1]) by dawn.sch.bme.hu (Postfix) with ESMTP id ED6C834BC4; Fri, 29 Oct 2004 18:16:13 +0200 (CEST) Message-ID: <41826CB3.2080306@balabit.hu> Date: Fri, 29 Oct 2004 18:15:47 +0200 From: KOVACS Krisztian User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5 X-Accept-Language: hu, en MIME-Version: 1.0 To: hadi@cyberus.ca Cc: netdev@oss.sgi.com, ipsec-tools-devel@lists.sourceforge.net, vpn-failover@lists.balabit.hu Subject: Re: [RFC] IPSEC failover and replay detection sequence numbers References: <1099045435.2888.47.camel@nienna.balabit> <1099054721.1027.118.camel@jzny.localdomain> <1099056277.2888.71.camel@nienna.balabit> <1099062095.1023.14.camel@jzny.localdomain> In-Reply-To: <1099062095.1023.14.camel@jzny.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11136 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hidden@balabit.hu Precedence: bulk X-list: netdev Hi, jamal wrote: > ok. It should still get better in a short period of time though. > Moral in my point is i hope you make it an optional feature. Definitely. >> To play with numbers: say that you have 5K users, so let's suppose >>there are at most 20K IPSEC SAs. If you decide to send an update per >>second, that would mean 20K updates/second. If each update message is 20 >>bytes long, that means that on Ethernet you can transmit all of them in >>about 280 packets. > > Are you batching? Of course! I think it is a must, especially if we use such tiny messages. But this is dependant on the user-space code of course. > In my count: Assuming 20bytes is in a packet of its own - your numbers > translate to 20Kpps which is > 10Mbps ;-> > I suppose SAs will be much lower rate. So you need probably a dedicated > 100Mbps just for the syncing. I would also say SA updates should be > prioritized over replay messages. I think a dedicated 100mbps/1Gbps interface is not a problem anyway... >>That's not too much. (I suppose the 20K pfkey >>messages would be much more of a problem, though...) > > Why not use the netlink events (you mention pfkey). > > Batching them with a timeout should help. Agreed. However, for the initial tests I chose pfkey because racoon uses pfkey only, so it would be good enough for me as a prototype. I think it would not be too much work to implement the netlink interface as well - with batching included. -- Regards, Krisztian KOVACS From shemminger@osdl.org Fri Oct 29 09:24:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 09:24:48 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TGOgv3028567 for ; Fri, 29 Oct 2004 09:24:43 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9TGOKWL020200 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 29 Oct 2004 09:24:21 -0700 Date: Fri, 29 Oct 2004 09:26:03 -0700 From: Stephen Hemminger To: Mirko Lindner Cc: netdev@oss.sgi.com, jgarzik@pobox.com, rroesler@syskonnect.de Subject: Re: [PATCH] sk98lin: Driver update v7.09 Message-Id: <20041029092603.0aab72de@zqx3.pdx.osdl.net> In-Reply-To: <4182812D.8020407@syskonnect.de> References: <417907C1.6050407@syskonnect.de> <20041027102519.0fc3c7a9@guest-251-240.pdx.osdl.net> <4182812D.8020407@syskonnect.de> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 11138 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 Fri, 29 Oct 2004 19:43:09 +0200 Mirko Lindner wrote: > Stephen, > > thank You for the help! Should we help you in any case to check or > change the defines? > > We have the problem that the Linux driver consists of multiple files > which are also used for other drivers running on other OSes > (e.g. Sun, HP-UX, MacOS X, *BSD, Windows, PXE, AIX, Unixware...). > > This is for instance the reason why we must use redefines for the > different data types (e.g. SK_U32). Can you please explain what you mean > with "UglyReDefineTheWorld"? Are there any special defines you do not > like? I am wondering why the style plays such an important role when > looking at the driver source. I am not sure what redefines you are > referring to, but the datatype redefines for example have been in the > kernel tree for years without any complains. Style matters especially things like: #define SK_NET_DEVICE net_device #define SK_IOC char __iomem * because it means that source code inspection tools like cscope will not easily pickup all usages of the structure when developers need to do audit's to change interfaces. My goal is to make all the linux only pieces look as close to linux style as possible without going to the extreme of changing variable names and function names. The common parts will not be touched at all. My plan will be to make one of the patch steps up these in one chunk. > If you could send us a list about the requested changes you'd like to > perform, we can help you or provide additional support. We would really > appreciate it, if you could inform us in advance about those changes, > because the driver was tested extensively in our test&verification > department and by a considerably amount of OEM vendors. Changing now > parts of the code may break the driver functionality or the > functionality of the driver files used on other OSes. > > Cheers > Mirko So far I have about 10 patches done, and most of the way through getting ethtool working using your code. EMany ethtool functions needed minor work to resolve issues like not checking parameters and error handling. From johnpol@2ka.mipt.ru Fri Oct 29 09:28:56 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 09:29:04 -0700 (PDT) Received: from mailer.campus.mipt.ru (mailer.campus.mipt.ru [194.85.82.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TGSrMi028957 for ; Fri, 29 Oct 2004 09:28:56 -0700 Received: from ffke-campus-gw.mipt.ru (2ka [194.85.82.65]) by mailer.campus.mipt.ru (8.13.1/8.13.1) with ESMTP id i9TGSlXM011582; Fri, 29 Oct 2004 20:28:47 +0400 Received: from zanzibar.2ka.mipt.ru (zanzibar.2ka.mipt.ru [194.85.82.77]) by ffke-campus-gw.mipt.ru (8.12.11/8.12.11) with SMTP id i9TGSVaQ015833; Fri, 29 Oct 2004 20:28:32 +0400 Date: Fri, 29 Oct 2004 20:45:51 +0400 From: Evgeniy Polyakov To: James Morris Cc: jamal , , Subject: Re: Asynchronous crypto layer. Message-ID: <20041029204551.06caaf4b@zanzibar.2ka.mipt.ru> In-Reply-To: References: <1099062483.1023.21.camel@jzny.localdomain> Reply-To: johnpol@2ka.mipt.ru Organization: MIPT X-Mailer: Sylpheed-Claws 0.9.12b (GTK+ 1.2.10; i386-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11139 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: johnpol@2ka.mipt.ru Precedence: bulk X-list: netdev On Fri, 29 Oct 2004 12:16:35 -0400 (EDT) James Morris wrote: > On 29 Oct 2004, jamal wrote: > > > On Fri, 2004-10-29 at 10:06, Evgeniy Polyakov wrote: > > > > > > > If we have a hardware accelerator chip, than we _already_ have improvements > > > with even the worst async crypto layer, since software and hardware > > > will work in parrallel. > > > > Thats what i am hoping - and theory points to it. Numbers, numbers > > please ;-> > > There's an OpenBSD paper which demonstrates the usefulness of crypto > hardware for reducing cpu contention. I can't get to their web site now, > but it's there somewhere under a security link. Asynchronous crypto layer was written under impression of those paper. OpenBSD layer is very good, but it has some nitpics some of which are really not good, but I hope all of them are resolved in my driver. You can find paper for example there: http://www.madchat.org/crypto/ocf.pdf > > - James > -- > James Morris > > > Evgeniy Polyakov Only failure makes us experts. -- Theo de Raadt From jdmason@us.ibm.com Fri Oct 29 09:42:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 09:42:38 -0700 (PDT) Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.132]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TGgR7C029540 for ; Fri, 29 Oct 2004 09:42:33 -0700 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e34.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id i9TGg5J8460842 for ; Fri, 29 Oct 2004 12:42:05 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i9TGg4Rw445264 for ; Fri, 29 Oct 2004 10:42:04 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id i9TGfI9o008487 for ; Fri, 29 Oct 2004 10:41:18 -0600 Received: from dreadnought.austin.ibm.com (dreadnought.austin.ibm.com [9.41.94.123]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id i9TGfIVh008437; Fri, 29 Oct 2004 10:41:18 -0600 From: Jon Mason Organization: IBM To: "Venkatesan, Ganesh" Subject: Re: [PATCH netdev-2.6 7/10] ixgb: Replace kmalloc with vmalloc to allocate driver local data structures Date: Fri, 29 Oct 2004 11:41:12 -0500 User-Agent: KMail/1.6.2 Cc: "Christoph Hellwig" , , "netdev" References: <468F3FDA28AA87429AD807992E22D07E031286C0@orsmsx408> In-Reply-To: <468F3FDA28AA87429AD807992E22D07E031286C0@orsmsx408> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200410291141.12330.jdmason@us.ibm.com> X-archive-position: 11140 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jdmason@us.ibm.com Precedence: bulk X-list: netdev On Friday 29 October 2004 10:35 am, Venkatesan, Ganesh wrote: > >There seems to be 3 ways around this problem. > >1) change the unsigned long fields in ixgb_buffer to unsigned ints > > (this > > >decreases the size of the struct enough to use kmalloc) > > PATCH netdev-2.6 6/10 does this. Problem with patch 6/10. --- netdev-2.6/drivers/net/ixgb/ixgb.h 2004-10-15 13:15:38.000000000 -0700 +++ netdev-2.6/drivers/net/ixgb.new/ixgb.h 2004-10-15 13:15:51.000000000 -0700 @@ -105,9 +105,9 @@ struct ixgb_adapter; struct ixgb_buffer { struct sk_buff *skb; uint64_t dma; - unsigned long length; + uint16_t length; unsigned long time_stamp; - unsigned int next_to_watch; + uint16_t next_to_watch; }; Since the 2 16bit fields are not contigious, they will take up 32bits each. This ballons the struct to still be too large. By moving thse 2 fields next to one another, this fixes the problem and makes the struct small enough to use kmalloc for up to 4096 descriptors. The patch below removes the need for patch 7/10 (and I have verified this). --- ixgb.h.orig 2004-10-29 11:36:06.757879120 -0700 +++ ixgb.h 2004-10-29 11:35:51.065001784 -0700 @@ -123,8 +123,8 @@ struct ixgb_adapter; struct ixgb_buffer { struct sk_buff *skb; uint64_t dma; - uint16_t length; unsigned long time_stamp; + uint16_t length; uint16_t next_to_watch; }; -- Jon Mason jdmason@us.ibm.com From jgarzik@pobox.com Fri Oct 29 10:03:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 10:03:23 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TH3Iod030346 for ; Fri, 29 Oct 2004 10:03:18 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CNa9U-0007Uv-T6; Fri, 29 Oct 2004 18:03:01 +0100 Message-ID: <418277B7.7000705@pobox.com> Date: Fri, 29 Oct 2004 13:02:47 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Christoph Hellwig CC: "Venkatesan, Ganesh" , netdev , Andrew Morton , William Lee Irwin III Subject: Re: [PATCH netdev-2.6 7/10] ixgb: Replace kmalloc with vmalloc to allocate driver local data structures References: <468F3FDA28AA87429AD807992E22D07E0312853C@orsmsx408> <20041029130817.GA12301@infradead.org> In-Reply-To: <20041029130817.GA12301@infradead.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11141 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 Christoph Hellwig wrote: > On Fri, Oct 29, 2004 at 05:50:45AM -0700, Venkatesan, Ganesh wrote: > >>This is a trade-off between space allocated via kmalloc and vmalloc. My >>understanding is that kmalloc space is more limited than vmalloc. Is >>this incorrect? > > > Yes. kmalloc space is only limited by the amount of free memory you have > in your system, vmalloc has very low absolute limits (down to 64MB in > some configurations).. However, kmalloc() has much lower per-call limits than vmalloc(). I'm interested to see a VM person weigh in on this... Drivers are certainly allowed to use vmalloc. Jeff From sri@us.ibm.com Fri Oct 29 10:11:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 10:11:14 -0700 (PDT) Received: from e5.ny.us.ibm.com (e5.ny.us.ibm.com [32.97.182.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9THB6ce030856 for ; Fri, 29 Oct 2004 10:11:06 -0700 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e5.ny.us.ibm.com (8.12.10/8.12.9) with ESMTP id i9THAipA583006; Fri, 29 Oct 2004 13:10:44 -0400 Received: from w-sridhar2.beaverton.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay04.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i9THAheM287136; Fri, 29 Oct 2004 13:10:43 -0400 Date: Fri, 29 Oct 2004 10:10:42 -0700 (PDT) From: Sridhar Samudrala X-X-Sender: sridhar@w-sridhar.beaverton.ibm.com To: "Dan A. Dickey" cc: netdev@oss.sgi.com Subject: Re: TCP Hang (or close to it): Windows XP -> Linux (w/tcp_bic) In-Reply-To: <200410290925.48955.dan.dickey@savvis.net> Message-ID: References: <200410290925.48955.dan.dickey@savvis.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 11142 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sri@us.ibm.com Precedence: bulk X-list: netdev This looks like the same TCP window overflow problem in 2.6.7 that came up a couple of days back. See the thread http://marc.theaimsgroup.com/?t=109887532400001&r=1&w=2 and the patch posted by davem. Thanks Sridhar On Fri, 29 Oct 2004, Dan A. Dickey wrote: > All, > We are able to reproduce what appears to be a tcp hang with > Windows XP sending to a Linux box (2.6.7 kernel) that has > tcp_bic turned on. At the moment, I'm unsure that tcp_bic > has anything to do with it - I'll be testing with tcp_bic turned > off today to see if I can reproduce this problem or not. > > I'm looking for someone to help me determine what the > cause of this hang is - I have a 3MB ethereal capture file > that I can send if you think you can help out. Let me know, > and I'll send you the file and some more information about > the application and what we are doing. > > Just in case this might help you to figure it out, > here is a small portion of the display from ethereal at > the point of failure. 192.168.168.126 is the Windows > XP machine, and 192.168.168.25 is the Linux box. > > 14:25:58.260109 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack > 1101042 win 39272 > 14:25:58.260116 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack > 1102502 win 42192 > 14:25:58.260133 IP 192.168.168.126.2519 > 192.168.168.25.15100: . > 1102502:1103962(1460) ack 1 win 65535 > 14:25:58.260143 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack > 1103962 win 45112 > 14:25:58.260147 IP 192.168.168.126.2519 > 192.168.168.25.15100: . > 1103962:1105422(1460) ack 1 win 65535 > 14:25:58.260155 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack > 1105422 win 48032 > 14:25:58.260184 IP 192.168.168.126.2519 > 192.168.168.25.15100: . > 1105422:1106882(1460) ack 1 win 65535 > 14:25:58.260191 IP 192.168.168.126.2519 > 192.168.168.25.15100: . > 1106882:1108342(1460) ack 1 win 65535 > 14:25:58.260206 IP 192.168.168.126.2519 > 192.168.168.25.15100: . > 1108342:1109802(1460) ack 1 win 65535 > 14:25:58.260228 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack > 1106882 win 50952 > 14:25:58.260252 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack > 1108342 win 53872 > 14:25:58.260273 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack > 1109802 win 56792 > 14:25:58.260279 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack > 1111262 win 59712 > 14:25:58.260286 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack > 1112722 win 62632 > 14:25:58.260293 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack > 1114182 win 16 > 14:25:58.260348 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack > 1114506 win 16 > 14:25:58.534331 IP 192.168.168.126.2451 > 192.168.168.25.15100: . > 160:176(16) ack 1 win 65535 > 14:25:58.534493 IP 192.168.168.25.15100 > 192.168.168.126.2451: . ack > 176 win 16 > 14:26:03.237624 IP 192.168.168.126.2519 > 192.168.168.25.15100: . > 1114506:1114522(16) ack 1 win 65535 > 14:26:03.237803 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack > 1114522 win 16 > 14:26:03.565752 IP 192.168.168.126.2451 > 192.168.168.25.15100: . > 176:192(16) ack 1 win 65535 > 14:26:03.565914 IP 192.168.168.25.15100 > 192.168.168.126.2451: . ack > 192 win 16 > 14:26:08.269049 IP 192.168.168.126.2519 > 192.168.168.25.15100: . > 1114522:1114538(16) ack 1 win 65535 > 14:26:08.269217 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack > 1114538 win 16 > 14:26:08.597185 IP 192.168.168.126.2451 > 192.168.168.25.15100: . > 192:208(16) ack 1 win 65535 > 14:26:08.597347 IP 192.168.168.25.15100 > 192.168.168.126.2451: . ack > 208 win 16 > 14:26:13.300469 IP 192.168.168.126.2519 > 192.168.168.25.15100: . > 1114538:1114554(16) ack 1 win 65535 > 14:26:13.300640 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack > 1114554 win 16 > 14:26:13.628603 IP 192.168.168.126.2451 > 192.168.168.25.15100: . > 208:224(16) ack 1 win 65535 > 14:26:13.628774 IP 192.168.168.25.15100 > 192.168.168.126.2451: . ack > 224 win 16 > 14:26:18.331909 IP 192.168.168.126.2519 > 192.168.168.25.15100: . > 1114554:1114570(16) ack 1 win 65535 > 14:26:18.332075 IP 192.168.168.25.15100 > 192.168.168.126.2519: . ack > 1114570 win 16 > 14:26:18.660013 IP 192.168.168.126.2451 > 192.168.168.25.15100: . > 224:240(16) ack 1 win 65535 > 14:26:18.660174 IP 192.168.168.25.15100 > 192.168.168.126.2451: . ack > 240 win 16 > > > I'm not sure how well this is going to come across, but as I said - I > can send the capture file. Please help! Thanks in advance. > (My concern is the window on the Linux side dropping from 62632 > to 16 at the 14:25:58.260293 point - this just doesn't seem right). > -Dan > > -- > Dan A. Dickey > dan.dickey@savvis.net > > SAVVIS > Transforming Information Technology > > From shemminger@osdl.org Fri Oct 29 10:27:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 10:27:29 -0700 (PDT) Received: from fire-1.osdl.org (fire.osdl.org [65.172.181.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9THRKTb031711 for ; Fri, 29 Oct 2004 10:27:21 -0700 Received: from zqx3.pdx.osdl.net (fw.osdl.org [65.172.181.6]) (authenticated bits=0) by fire-1.osdl.org (8.12.8/8.12.8) with ESMTP id i9THQkWL030831 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 29 Oct 2004 10:26:47 -0700 Date: Fri, 29 Oct 2004 10:28:28 -0700 From: Stephen Hemminger To: "David S. Miller" Cc: Michael Vittrup Larsen , netdev@oss.sgi.com Subject: [PATCH] tcp: efficient port randomisation Message-Id: <20041029102828.123502e7@zqx3.pdx.osdl.net> In-Reply-To: <200410291048.01955.michael.vittrup.larsen@ericsson.com> References: <20041027092531.78fe438c@guest-251-240.pdx.osdl.net> <200410291048.01955.michael.vittrup.larsen@ericsson.com> Organization: Open Source Development Lab X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.93 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 11143 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 Provide port randomization for incoming connections using variation of existing sequence number hash. Replace tcp_portalloc_lock and tcp_port_rover with atomic operation to allow better parallelism. This is based on http://www.ietf.org/internet-drafts/draft-larsen-tsvwg-port-randomisation-00.txt (with confirmation of of no IPR issues). Signed-off-by: Stephen Hemminger diff -urNp -X dontdiff linux-2.6/drivers/char/random.c port-2.6/drivers/char/random.c --- linux-2.6/drivers/char/random.c 2004-10-28 11:06:09.000000000 -0700 +++ port-2.6/drivers/char/random.c 2004-10-28 15:53:50.000000000 -0700 @@ -2352,6 +2352,24 @@ __u32 secure_ip_id(__u32 daddr) return halfMD4Transform(hash, keyptr->secret); } +/* Generate secure starting point for ephemeral TCP port search */ +__u32 secure_tcp_port_ephemeral(__u32 saddr, __u32 daddr, __u16 dport) +{ + struct keydata *keyptr = get_keyptr(); + u32 hash[4]; + + /* + * Pick a unique starting offset for each ephemeral port search + * (saddr, daddr, dport). + */ + hash[0] = saddr; + hash[1] = daddr; + hash[2] = dport << 16 | smp_processor_id(); + hash[3] = keyptr->secret[11]; + + return halfMD4Transform(hash, keyptr->secret); +} + #ifdef CONFIG_SYN_COOKIES /* * Secure SYN cookie computation. This is the algorithm worked out by diff -urNp -X dontdiff linux-2.6/include/linux/random.h port-2.6/include/linux/random.h --- linux-2.6/include/linux/random.h 2004-09-13 09:09:19.000000000 -0700 +++ port-2.6/include/linux/random.h 2004-10-28 15:13:34.000000000 -0700 @@ -54,6 +54,7 @@ extern void get_random_bytes(void *buf, void generate_random_uuid(unsigned char uuid_out[16]); extern __u32 secure_ip_id(__u32 daddr); +extern __u32 secure_tcp_port_ephemeral(__u32 saddr, __u32 daddr, __u16 dport); extern __u32 secure_tcp_sequence_number(__u32 saddr, __u32 daddr, __u16 sport, __u16 dport); extern __u32 secure_tcp_syn_cookie(__u32 saddr, __u32 daddr, diff -urNp -X dontdiff linux-2.6/include/net/tcp.h port-2.6/include/net/tcp.h --- linux-2.6/include/net/tcp.h 2004-10-26 16:57:47.000000000 -0700 +++ port-2.6/include/net/tcp.h 2004-10-28 15:13:34.000000000 -0700 @@ -140,7 +140,6 @@ extern struct tcp_hashinfo { rwlock_t __tcp_lhash_lock ____cacheline_aligned; atomic_t __tcp_lhash_users; wait_queue_head_t __tcp_lhash_wait; - spinlock_t __tcp_portalloc_lock; } tcp_hashinfo; #define tcp_ehash (tcp_hashinfo.__tcp_ehash) @@ -151,14 +150,19 @@ extern struct tcp_hashinfo { #define tcp_lhash_lock (tcp_hashinfo.__tcp_lhash_lock) #define tcp_lhash_users (tcp_hashinfo.__tcp_lhash_users) #define tcp_lhash_wait (tcp_hashinfo.__tcp_lhash_wait) -#define tcp_portalloc_lock (tcp_hashinfo.__tcp_portalloc_lock) extern kmem_cache_t *tcp_bucket_cachep; extern struct tcp_bind_bucket *tcp_bucket_create(struct tcp_bind_hashbucket *head, unsigned short snum); extern void tcp_bucket_destroy(struct tcp_bind_bucket *tb); extern void tcp_bucket_unlock(struct sock *sk); -extern int tcp_port_rover; +extern atomic_t tcp_rover_next; + +/* offset in ephemeral port space to start next scan */ +static inline u32 tcp_port_rover(void) +{ + return (u32) atomic_inc_return(&tcp_rover_next); +} /* These are AF independent. */ static __inline__ int tcp_bhashfn(__u16 lport) diff -urNp -X dontdiff linux-2.6/net/ipv4/tcp.c port-2.6/net/ipv4/tcp.c --- linux-2.6/net/ipv4/tcp.c 2004-10-28 11:06:09.000000000 -0700 +++ port-2.6/net/ipv4/tcp.c 2004-10-28 15:13:34.000000000 -0700 @@ -2342,7 +2342,6 @@ void __init tcp_init(void) sysctl_tcp_max_orphans >>= (3 - order); sysctl_max_syn_backlog = 128; } - tcp_port_rover = sysctl_local_port_range[0] - 1; sysctl_tcp_mem[0] = 768 << order; sysctl_tcp_mem[1] = 1024 << order; diff -urNp -X dontdiff linux-2.6/net/ipv4/tcp_ipv4.c port-2.6/net/ipv4/tcp_ipv4.c --- linux-2.6/net/ipv4/tcp_ipv4.c 2004-10-26 16:57:48.000000000 -0700 +++ port-2.6/net/ipv4/tcp_ipv4.c 2004-10-28 15:13:34.000000000 -0700 @@ -93,7 +93,6 @@ struct tcp_hashinfo __cacheline_aligned .__tcp_lhash_users = ATOMIC_INIT(0), .__tcp_lhash_wait = __WAIT_QUEUE_HEAD_INITIALIZER(tcp_hashinfo.__tcp_lhash_wait), - .__tcp_portalloc_lock = SPIN_LOCK_UNLOCKED }; /* @@ -102,7 +101,8 @@ struct tcp_hashinfo __cacheline_aligned * 32768-61000 */ int sysctl_local_port_range[2] = { 1024, 4999 }; -int tcp_port_rover = 1024 - 1; + +atomic_t tcp_rover_next = ATOMIC_INIT(0); static __inline__ int tcp_hashfn(__u32 laddr, __u16 lport, __u32 faddr, __u16 fport) @@ -219,14 +219,10 @@ static int tcp_v4_get_port(struct sock * int low = sysctl_local_port_range[0]; int high = sysctl_local_port_range[1]; int remaining = (high - low) + 1; - int rover; + __u16 rover; - spin_lock(&tcp_portalloc_lock); - rover = tcp_port_rover; + rover = low + tcp_port_rover() % (high - low); do { - rover++; - if (rover < low || rover > high) - rover = low; head = &tcp_bhash[tcp_bhashfn(rover)]; spin_lock(&head->lock); tb_for_each(tb, node, &head->chain) @@ -235,9 +231,9 @@ static int tcp_v4_get_port(struct sock * break; next: spin_unlock(&head->lock); + if (++rover >= high) + rover = low; } while (--remaining > 0); - tcp_port_rover = rover; - spin_unlock(&tcp_portalloc_lock); /* Exhausted local port range during search? */ ret = 1; @@ -634,6 +630,13 @@ not_unique: return -EADDRNOTAVAIL; } +static inline u32 connect_port_offset(const struct sock *sk) +{ + const struct inet_opt *inet = inet_sk(sk); + return secure_tcp_port_ephemeral(inet->rcv_saddr, inet->daddr, + inet->dport); +} + /* * Bind a port for a connect operation and hash it. */ @@ -645,35 +648,17 @@ static int tcp_v4_hash_connect(struct so int ret; if (!snum) { - int rover; int low = sysctl_local_port_range[0]; int high = sysctl_local_port_range[1]; int remaining = (high - low) + 1; struct hlist_node *node; struct tcp_tw_bucket *tw = NULL; + __u16 rover; + rover = low + (tcp_port_rover() + connect_port_offset(sk)) + % (high - low); local_bh_disable(); - - /* TODO. Actually it is not so bad idea to remove - * tcp_portalloc_lock before next submission to Linus. - * As soon as we touch this place at all it is time to think. - * - * Now it protects single _advisory_ variable tcp_port_rover, - * hence it is mostly useless. - * Code will work nicely if we just delete it, but - * I am afraid in contented case it will work not better or - * even worse: another cpu just will hit the same bucket - * and spin there. - * So some cpu salt could remove both contention and - * memory pingpong. Any ideas how to do this in a nice way? - */ - spin_lock(&tcp_portalloc_lock); - rover = tcp_port_rover; - do { - rover++; - if ((rover < low) || (rover > high)) - rover = low; head = &tcp_bhash[tcp_bhashfn(rover)]; spin_lock(&head->lock); @@ -704,9 +689,10 @@ static int tcp_v4_hash_connect(struct so next_port: spin_unlock(&head->lock); + + if (++rover >= high) + rover = low; } while (--remaining > 0); - tcp_port_rover = rover; - spin_unlock(&tcp_portalloc_lock); local_bh_enable(); @@ -714,9 +700,6 @@ static int tcp_v4_hash_connect(struct so ok: /* All locks still held and bhs disabled */ - tcp_port_rover = rover; - spin_unlock(&tcp_portalloc_lock); - tcp_bind_hash(sk, tb, rover); if (sk_unhashed(sk)) { inet_sk(sk)->sport = htons(rover); @@ -2646,8 +2629,8 @@ EXPORT_SYMBOL(tcp_bucket_create); EXPORT_SYMBOL(tcp_hashinfo); EXPORT_SYMBOL(tcp_inherit_port); EXPORT_SYMBOL(tcp_listen_wlock); -EXPORT_SYMBOL(tcp_port_rover); EXPORT_SYMBOL(tcp_prot); +EXPORT_SYMBOL(tcp_rover_next); EXPORT_SYMBOL(tcp_put_port); EXPORT_SYMBOL(tcp_unhash); EXPORT_SYMBOL(tcp_v4_conn_request); diff -urNp -X dontdiff linux-2.6/net/ipv6/tcp_ipv6.c port-2.6/net/ipv6/tcp_ipv6.c --- linux-2.6/net/ipv6/tcp_ipv6.c 2004-10-26 16:57:48.000000000 -0700 +++ port-2.6/net/ipv6/tcp_ipv6.c 2004-10-28 15:13:34.000000000 -0700 @@ -136,13 +136,10 @@ static int tcp_v6_get_port(struct sock * int low = sysctl_local_port_range[0]; int high = sysctl_local_port_range[1]; int remaining = (high - low) + 1; - int rover; + u16 rover; - spin_lock(&tcp_portalloc_lock); - rover = tcp_port_rover; - do { rover++; - if ((rover < low) || (rover > high)) - rover = low; + rover = low + tcp_port_rover() % (high - low); + do { head = &tcp_bhash[tcp_bhashfn(rover)]; spin_lock(&head->lock); tb_for_each(tb, node, &head->chain) @@ -151,9 +148,9 @@ static int tcp_v6_get_port(struct sock * break; next: spin_unlock(&head->lock); + if (++rover >= high) + rover = low; } while (--remaining > 0); - tcp_port_rover = rover; - spin_unlock(&tcp_portalloc_lock); /* Exhausted local port range during search? */ ret = 1; From wli@holomorphy.com Fri Oct 29 10:37:14 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 10:37:19 -0700 (PDT) Received: from holomorphy.com (mail@holomorphy.com [207.189.100.168]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9THbEnZ032184 for ; Fri, 29 Oct 2004 10:37:14 -0700 Received: from wli by holomorphy.com with local (Exim 3.36 #1 (Debian)) id 1CNag1-0005LU-00; Fri, 29 Oct 2004 10:36:37 -0700 Date: Fri, 29 Oct 2004 10:36:36 -0700 From: William Lee Irwin III To: Jeff Garzik Cc: Christoph Hellwig , "Venkatesan, Ganesh" , netdev , Andrew Morton Subject: Re: [PATCH netdev-2.6 7/10] ixgb: Replace kmalloc with vmalloc to allocate driver local data structures Message-ID: <20041029173636.GB12934@holomorphy.com> References: <468F3FDA28AA87429AD807992E22D07E0312853C@orsmsx408> <20041029130817.GA12301@infradead.org> <418277B7.7000705@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <418277B7.7000705@pobox.com> Organization: The Domain of Holomorphy User-Agent: Mutt/1.5.6+20040722i X-archive-position: 11144 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: wli@holomorphy.com Precedence: bulk X-list: netdev On Fri, Oct 29, 2004 at 05:50:45AM -0700, Venkatesan, Ganesh wrote: >>> This is a trade-off between space allocated via kmalloc and vmalloc. My >>> understanding is that kmalloc space is more limited than vmalloc. Is >>> this incorrect? Christoph Hellwig wrote: >> Yes. kmalloc space is only limited by the amount of free memory you have >> in your system, vmalloc has very low absolute limits (down to 64MB in >> some configurations).. On Fri, Oct 29, 2004 at 01:02:47PM -0400, Jeff Garzik wrote: > However, kmalloc() has much lower per-call limits than vmalloc(). > I'm interested to see a VM person weigh in on this... > Drivers are certainly allowed to use vmalloc. vmalloc is relatively highly penalized. For instance, global TLB flushes associated with vfree() and so on. Aggregate vmallocspace limitations are a big concern. I probably wouldn't use vmallocspace for much besides infrequent allocations, e.g. things allocated during driver initialization. One per driver instance won't really hurt much because vmallocspace limits prevent large numbers of drivers from being simultaneously loaded as it stands now anyway. -- wli From jmorris@redhat.com Fri Oct 29 10:45:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 10:45:04 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9THiwH1032626 for ; Fri, 29 Oct 2004 10:44:59 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9THibgm032495; Fri, 29 Oct 2004 13:44:37 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9THiQr29115; Fri, 29 Oct 2004 13:44:27 -0400 Received: from thoron.boston.redhat.com (thoron.boston.redhat.com [172.16.80.63]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9THiNFF010774; Fri, 29 Oct 2004 13:44:23 -0400 Date: Fri, 29 Oct 2004 13:44:24 -0400 (EDT) From: James Morris X-X-Sender: jmorris@thoron.boston.redhat.com To: Evgeniy Polyakov cc: netdev@oss.sgi.com, Subject: Re: Asynchronous crypto layer. In-Reply-To: <1099030958.4944.148.camel@uganda> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 11145 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jmorris@redhat.com Precedence: bulk X-list: netdev On Fri, 29 Oct 2004, Evgeniy Polyakov wrote: > I'm pleased to announce asynchronous crypto layer for Linux kernel 2.6. Could you please resend as a patch against the latest bk snapshot? i.e. output of 'diff -purN tree-a tree-b' - James -- James Morris From greearb@candelatech.com Fri Oct 29 10:45:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 10:46:04 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9THjvTu000383 for ; Fri, 29 Oct 2004 10:45:57 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i9THrJLH018064; Fri, 29 Oct 2004 10:53:19 -0700 Message-ID: <418281C1.9080707@candelatech.com> Date: Fri, 29 Oct 2004 10:45:37 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tommy Christensen CC: "'netdev@oss.sgi.com'" , "Linux 802.1Q VLAN" , Francois Romieu , "David S. Miller" Subject: Re: [PATCH] 802.1Q VLAN References: <41797696.9070905@candelatech.com> <20041022214611.GA4948@electric-eye.fr.zoreil.com> <41798506.1030909@candelatech.com> <417D675F.3000909@candelatech.com> <4181838B.6040002@tpack.net> <41818D99.9020300@candelatech.com> <1099038566.1813.99.camel@cyan.cph.tpack.net> In-Reply-To: <1099038566.1813.99.camel@cyan.cph.tpack.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11146 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Tommy Christensen wrote: > On Fri, 2004-10-29 at 02:23, Ben Greear wrote: > >>> o It is considered an error if a queue-less device returns anything but >>>zero from its >>> hard_start_xmit() function (see dev_queue_xmit()). >> >>This certainly was not clear to me. The comments in dev_queue_xmit are >>wrong about the return value (failure cases can be > zero too). Are >>there other errors or ommissions there? > > > A return value > zero doesn't mean failure. It indicates congestion. Ok, but the skb is always deleted by the net_queue_xmit code if the return is not zero? The difference between a hard-start-xmit failure on eth0 when the hardware-queue is full and having a rate-limiting queue drop a packet is virtually identical to me.... >>What sorts of things go wrong if you do return an error here when you don't >>have a queue? > > It is interpreted as a tx failure rather than congestion. So it doesn't > help the upper layers like you wanted it to. > And it spews out an error message. The e1000 and probably other NICs have failed hard_start_xmit for a long time, and they are some of the most stable and high-performance NICs. So, the upper layers must be handling it OK some how or another. Can you point me to some code that takes a different action based on the return values of dev_queue_xmit? That may help me understand better. >>> o So, lets add a tx queue to it. Sure, that would be nice. Now we can >>>even do shaping >>> and other fancy stuff. But then how do we manage netif_queue_stopped? >>>Especially >>> restarting the queue could be tricky. >> >>Right... it would probably be an O(N) thing to wake the queues for all virtual >>devices on a physical device, and we certainly don't want to do that >>often. Maybe if you only tried to wake the blocked queues (ie, kept a list >>of just blocked queues), then that would be less painful on average, >>but the worst-case is still bad. > > Yeah, we probably would need some sort of notification from the > qdisc of the underlying device when it can accept packets again. I did something like this for my non-busy-spin pktgen re-write and it works fine with both VLANs and physical devices. I just hooked directly into this code in netdevice.h: static inline void netif_wake_queue(struct net_device *dev) { #ifdef CONFIG_NETPOLL_TRAP if (netpoll_trap()) return; #endif if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state)) { __netif_schedule(dev); if (dev->notify_queue_woken) { dev->notify_queue_woken(dev); } } } pktgen registers this hook on the physical device when it starts generating on the physical device or any VLANs attached to it. To make a scheme like this work in general, we'd probably need a chain of callbacks instead of a single method pointer... >>> o But couldn't we skip netif_stop_queue() and just return >>>NETDEV_TX_BUSY when congested? >>> No, that would make the qdisc system "busy-retry" untill it succeeds. >>>BAD. >>> >>> o It is unsafe to pass a shared skb to dev_queue_xmit() unless you >>>control all the >>> references yourself. (It will likely be enqueued on a list.) >> >>Since we either free the duplicate copy, or pass it to the queue and forget >>about it, this last point does not matter in the patch I submitted, right? > > > Yes. This is the right way to do it. *Unless* the skb is already shared > when you receive it (e.g. from pktgen). You can't send shared skbs regardless, because the vlan Xmit changes the skb->dev at least, so you just have to set the multi-skb setting in pktgen to 0 so that it does not share when using VLANs. >>>And specifically for this patch: >>> >>> o The skb could be freed (replaced) in __vlan_put_tag(), so you cannot >>>tell the caller >>> to hang on to it. >> >>Yep, that is quite nasty...I had not noticed. If I kept a copy of the original >>pointer (using skb_get() to bump the reference) passed in, >>that would fix this particular problem? > > > Yes, I would think so. I will test this change and send a follow-up patch if it proves stable. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com From jmorris@redhat.com Fri Oct 29 10:46:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 10:46:39 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9THkXPQ000774 for ; Fri, 29 Oct 2004 10:46:34 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9THk5VU000423; Fri, 29 Oct 2004 13:46:05 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9THk5r29733; Fri, 29 Oct 2004 13:46:05 -0400 Received: from thoron.boston.redhat.com (thoron.boston.redhat.com [172.16.80.63]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9THk3FF010930; Fri, 29 Oct 2004 13:46:03 -0400 Date: Fri, 29 Oct 2004 13:46:04 -0400 (EDT) From: James Morris X-X-Sender: jmorris@thoron.boston.redhat.com To: Evgeniy Polyakov cc: netdev@oss.sgi.com, Subject: Re: Asynchronous crypto layer. In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 11147 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jmorris@redhat.com Precedence: bulk X-list: netdev On Fri, 29 Oct 2004, James Morris wrote: > On Fri, 29 Oct 2004, Evgeniy Polyakov wrote: > > > I'm pleased to announce asynchronous crypto layer for Linux kernel 2.6. > Also, please consider EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL. - James -- James Morris From davem@davemloft.net Fri Oct 29 11:09:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 11:09:36 -0700 (PDT) Received: from cheetah.davemloft.net (mail@adsl-63-197-226-105.dsl.snfc21.pacbell.net [63.197.226.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TI9Tv5001719 for ; Fri, 29 Oct 2004 11:09:30 -0700 Received: from localhost ([127.0.0.1] helo=cheetah.davemloft.net ident=davem) by cheetah.davemloft.net with smtp (Exim 3.36 #1 (Debian)) id 1CNb2x-0002gm-00; Fri, 29 Oct 2004 11:00:19 -0700 Date: Fri, 29 Oct 2004 11:00:19 -0700 From: "David S. Miller" To: Sridhar Samudrala Cc: dan.dickey@savvis.net, netdev@oss.sgi.com Subject: Re: TCP Hang (or close to it): Windows XP -> Linux (w/tcp_bic) Message-Id: <20041029110019.4f175979.davem@davemloft.net> In-Reply-To: References: <200410290925.48955.dan.dickey@savvis.net> X-Mailer: Sylpheed version 0.9.99 (GTK+ 1.2.10; sparc-unknown-linux-gnu) X-Face: "_;p5u5aPsO,_Vsx"^v-pEq09'CU4&Dc1$fQExov$62l60cgCc%FnIwD=.UF^a>?5'9Kn[;433QFVV9M..2eN.@4ZWPGbdi<=?[:T>y?SD(R*-3It"Vj:)"dP Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11148 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: davem@davemloft.net Precedence: bulk X-list: netdev On Fri, 29 Oct 2004 10:10:42 -0700 (PDT) Sridhar Samudrala wrote: > This looks like the same TCP window overflow problem in 2.6.7 that came up a > couple of days back. > > See the thread > http://marc.theaimsgroup.com/?t=109887532400001&r=1&w=2 > and the patch posted by davem. Yes, and BTW for the original poster, BIC only effects sender behavior whereas in your test case the Linux system with BIC enabled is the receiver. From Dan.Dickey@savvis.net Fri Oct 29 11:22:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 11:22:16 -0700 (PDT) Received: from mailgate1b.savvis.net (mailgate1b.savvis.net [216.91.182.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TIMBB1002233 for ; Fri, 29 Oct 2004 11:22:12 -0700 Received: from out002.email.savvis.net (out002.apptix.savvis.net [216.91.32.45]) by mailgate1b.savvis.net (8.12.10/8.12.1) with ESMTP id i9TILe9O001749; Fri, 29 Oct 2004 13:21:45 -0500 Received: from s228130hz1ew03.apptix-01.savvis.net ([10.146.4.28]) by out002.email.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Fri, 29 Oct 2004 13:21:39 -0500 Received: from [216.89.203.147] ([216.89.203.147]) by s228130hz1ew03.apptix-01.savvis.net with Microsoft SMTPSVC(6.0.3790.211); Fri, 29 Oct 2004 13:21:33 -0500 From: "Dan A. Dickey" Reply-To: dan.dickey@savvis.net Organization: WAM!NET a Division of SAVVIS, Inc. To: "David S. Miller" Subject: Re: TCP Hang (or close to it): Windows XP -> Linux (w/tcp_bic) Date: Fri, 29 Oct 2004 13:21:25 -0500 User-Agent: KMail/1.7.1 Cc: Sridhar Samudrala , netdev@oss.sgi.com References: <200410290925.48955.dan.dickey@savvis.net> <20041029110019.4f175979.davem@davemloft.net> In-Reply-To: <20041029110019.4f175979.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410291321.25723.dan.dickey@savvis.net> X-OriginalArrivalTime: 29 Oct 2004 18:21:33.0236 (UTC) FILETIME=[1E55F740:01C4BDE4] X-ECS-MailScanner: No virus is found X-archive-position: 11149 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: dan.dickey@savvis.net Precedence: bulk X-list: netdev On Friday 29 October 2004 13:00, David S. Miller wrote: > On Fri, 29 Oct 2004 10:10:42 -0700 (PDT) > > Sridhar Samudrala wrote: > > This looks like the same TCP window overflow problem in 2.6.7 > > that came up a couple of days back. > > > > See the thread > > http://marc.theaimsgroup.com/?t=109887532400001&r=1&w=2 > > and the patch posted by davem. > > Yes, and BTW for the original poster, BIC only effects sender > behavior whereas in your test case the Linux system with BIC > enabled is the receiver. That's a good point. I was concerned that it might be playing a role in what window size got sent back to the sending machine. Glad to hear it's not a worry. BTW - any idea if tcp_bic would be easily modified to be configurable on a per interface basis? We typically have a 100Mb interface on a LAN; and another 100Mb interface going out to a WAN (DS3 or E3). We're using tcp_bic to get near 95+% utilization of the WAN connection; but I don't think we need it on the LAN, and in some situations it may interfere... or, is this not a concern? Thanks again all. Sridhar, thank's for the pointer. I'll be updating to 2.6.9 and will let you know the results of my testing. -Dan -- Dan A. Dickey dan.dickey@savvis.net SAVVIS Transforming Information Technology From jgarzik@pobox.com Fri Oct 29 11:27:11 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 11:27:15 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TIRAi8002638 for ; Fri, 29 Oct 2004 11:27:11 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CNbSf-0001MP-Be; Fri, 29 Oct 2004 19:26:53 +0100 Message-ID: <41828B5D.7090908@pobox.com> Date: Fri, 29 Oct 2004 14:26:37 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: William Lee Irwin III CC: Christoph Hellwig , "Venkatesan, Ganesh" , netdev , Andrew Morton Subject: Re: [PATCH netdev-2.6 7/10] ixgb: Replace kmalloc with vmalloc to allocate driver local data structures References: <468F3FDA28AA87429AD807992E22D07E0312853C@orsmsx408> <20041029130817.GA12301@infradead.org> <418277B7.7000705@pobox.com> <20041029173636.GB12934@holomorphy.com> In-Reply-To: <20041029173636.GB12934@holomorphy.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11150 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 William Lee Irwin III wrote: > vmalloc is relatively highly penalized. For instance, global TLB > flushes associated with vfree() and so on. Aggregate vmallocspace > limitations are a big concern. I probably wouldn't use vmallocspace > for much besides infrequent allocations, e.g. things allocated during > driver initialization. One per driver instance won't really hurt much > because vmallocspace limits prevent large numbers of drivers from being > simultaneously loaded as it stands now anyway. That's precisely what we're contemplating -- a once per driver allocation that remains static for the entire driver runtime (descriptors) Jeff From wli@holomorphy.com Fri Oct 29 11:29:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 11:29:53 -0700 (PDT) Received: from holomorphy.com (mail@holomorphy.com [207.189.100.168]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TITmV2003003 for ; Fri, 29 Oct 2004 11:29:48 -0700 Received: from wli by holomorphy.com with local (Exim 3.36 #1 (Debian)) id 1CNbV8-0007Au-00; Fri, 29 Oct 2004 11:29:26 -0700 Date: Fri, 29 Oct 2004 11:29:26 -0700 From: William Lee Irwin III To: Jeff Garzik Cc: Christoph Hellwig , "Venkatesan, Ganesh" , netdev , Andrew Morton Subject: Re: [PATCH netdev-2.6 7/10] ixgb: Replace kmalloc with vmalloc to allocate driver local data structures Message-ID: <20041029182926.GF12934@holomorphy.com> References: <468F3FDA28AA87429AD807992E22D07E0312853C@orsmsx408> <20041029130817.GA12301@infradead.org> <418277B7.7000705@pobox.com> <20041029173636.GB12934@holomorphy.com> <41828B5D.7090908@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41828B5D.7090908@pobox.com> Organization: The Domain of Holomorphy User-Agent: Mutt/1.5.6+20040722i X-archive-position: 11151 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: wli@holomorphy.com Precedence: bulk X-list: netdev William Lee Irwin III wrote: >> vmalloc is relatively highly penalized. For instance, global TLB >> flushes associated with vfree() and so on. Aggregate vmallocspace >> limitations are a big concern. I probably wouldn't use vmallocspace >> for much besides infrequent allocations, e.g. things allocated during >> driver initialization. One per driver instance won't really hurt much >> because vmallocspace limits prevent large numbers of drivers from being >> simultaneously loaded as it stands now anyway. On Fri, Oct 29, 2004 at 02:26:37PM -0400, Jeff Garzik wrote: > That's precisely what we're contemplating -- a once per driver > allocation that remains static for the entire driver runtime (descriptors) An infrastructural change that does this would probably need to be considered more carefully. I think you can probably just do it. -- wli From penberg@cs.helsinki.fi Fri Oct 29 11:50:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 11:50:42 -0700 (PDT) Received: from mail.cs.helsinki.fi (courier.cs.helsinki.fi [128.214.9.1]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TIob1G003650 for ; Fri, 29 Oct 2004 11:50:38 -0700 Received: from localhost (localhost [127.0.0.1]) (uid 54704) by mail.cs.helsinki.fi with local; Fri, 29 Oct 2004 21:50:20 +0300 id 00070E9F.418290EC.00002E85 References: <1099044244.9566.0.camel@localhost> <20041029131607.GU24336@parcelfarce.linux.theplanet.co.uk> In-Reply-To: <20041029131607.GU24336@parcelfarce.linux.theplanet.co.uk> From: "Pekka J Enberg" To: Al Viro Cc: davem@davemloft.net, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: net: generic netdev_ioaddr Date: Fri, 29 Oct 2004 21:50:20 +0300 Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8,iso-8859-1" Content-Transfer-Encoding: 7bit Message-ID: X-archive-position: 11152 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: penberg@cs.helsinki.fi Precedence: bulk X-list: netdev Hi, Al Viro writes: > NAK. ->base_addr casting is a Bad Idea(tm) and natsemi "solution" isn't > (thanks for spotting that crap in natsemi, though; will fix...) > > Note that there is no such thing as "generic IO base address" - it _is_ > private and in the best case current ->base_addr is a scratch register > probably used for something vaguely connected with some IO, but it's > really up to driver... Yup, I thought about that after I sent the patch. However, as it stands now, many network drivers use netdev->base_addr for just that. Perhaps it should be nuked completely instead? Pekka From khc@pm.waw.pl Fri Oct 29 12:20:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 12:20:26 -0700 (PDT) Received: from inx.pm.waw.pl (postfix@inx.pm.waw.pl [195.116.170.20]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TJKIX0007665 for ; Fri, 29 Oct 2004 12:20:18 -0700 Received: from defiant.pm.waw.pl (cmj183.neoplus.adsl.tpnet.pl [83.31.137.183]) by inx.pm.waw.pl (Postfix) with ESMTP id 49948DF92; Fri, 29 Oct 2004 21:22:27 +0200 (CEST) Received: by defiant.pm.waw.pl (Postfix, from userid 500) id 4A52110AB1; Fri, 29 Oct 2004 21:18:19 +0200 (CEST) To: "Pekka J Enberg" Cc: Al Viro , davem@davemloft.net, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: net: generic netdev_ioaddr References: <1099044244.9566.0.camel@localhost> <20041029131607.GU24336@parcelfarce.linux.theplanet.co.uk> From: Krzysztof Halasa Date: Fri, 29 Oct 2004 21:18:18 +0200 In-Reply-To: (Pekka J. Enberg's message of "Fri, 29 Oct 2004 21:50:20 +0300") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 11153 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: khc@pm.waw.pl Precedence: bulk X-list: netdev "Pekka J Enberg" writes: > Yup, I thought about that after I sent the patch. However, as it > stands now, many network drivers use netdev->base_addr for just that. > Perhaps it should be nuked completely instead? I thinks so. With ifmap, SIOCSIFMAP, ifr_map, mem_end etc., irq, if_port, dma. -- Krzysztof Halasa From viro@www.linux.org.uk Fri Oct 29 12:38:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 12:38:52 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TJci8u008274 for ; Fri, 29 Oct 2004 12:38:44 -0700 Received: from viro by www.linux.org.uk with local (Exim 4.33) id 1CNcZv-0003LR-9X; Fri, 29 Oct 2004 20:38:27 +0100 Date: Fri, 29 Oct 2004 20:38:27 +0100 From: Al Viro To: Krzysztof Halasa Cc: Pekka J Enberg , davem@davemloft.net, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: net: generic netdev_ioaddr Message-ID: <20041029193827.GV24336@parcelfarce.linux.theplanet.co.uk> References: <1099044244.9566.0.camel@localhost> <20041029131607.GU24336@parcelfarce.linux.theplanet.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-archive-position: 11154 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: viro@parcelfarce.linux.theplanet.co.uk Precedence: bulk X-list: netdev On Fri, Oct 29, 2004 at 09:18:18PM +0200, Krzysztof Halasa wrote: > "Pekka J Enberg" writes: > > > Yup, I thought about that after I sent the patch. However, as it > > stands now, many network drivers use netdev->base_addr for just that. > > Perhaps it should be nuked completely instead? > > I thinks so. With ifmap, SIOCSIFMAP, ifr_map, mem_end etc., > irq, if_port, dma. SIOCSIFMAP is unfortunate, but legitimate - it passes more or less opaque structure to driver and lets driver interpret it. SIOCGIFMAP, OTOH, is really bad - among other things, for many drivers it leaks ioremapped addresses to userland. And *that* is a LARTable offense - it's an information that makes no sense whatsoever for userland code and should never be exposed, just as with any kernel pointers. What uses ->base_addr from the data returned by SIOCGIFMAP? From sam@errno.com Fri Oct 29 12:56:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 12:56:28 -0700 (PDT) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TJuNGQ008860 for ; Fri, 29 Oct 2004 12:56:23 -0700 Received: from [66.127.85.93] ([66.127.85.93]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id i9TJthWi000235 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 29 Oct 2004 12:55:43 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <4182A05F.1080505@errno.com> Date: Fri, 29 Oct 2004 12:56:15 -0700 From: Sam Leffler Organization: Errno Consulting User-Agent: Mozilla Thunderbird 0.8 (Macintosh/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: johnpol@2ka.mipt.ru CC: netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. References: <1099030958.4944.148.camel@uganda> In-Reply-To: <1099030958.4944.148.camel@uganda> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11155 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sam@errno.com Precedence: bulk X-list: netdev Evgeniy Polyakov wrote: > I'm pleased to announce asynchronous crypto layer for Linux kernel 2.6. > It support following features: > - multiple asynchronous crypto device queues > - crypto session routing > - crypto session binding > - modular load balancing > - crypto session batching genetically implemented by design > - crypto session priority > - different kinds of crypto operation(RNG, asymmetrical crypto, HMAC and > any other) It's really great to see this stuff come in to Linux. Hopefully you're aware of existing functionality of this sort in each of the BSD systems? It would be interesting to compare performance between systems. I realize this suggestion will be met with the usual boo's and catcalls but it'd also be nice if all systems could share a common user-level api so, for example, you could just _use_ the support in openssl that's been around for several years. Sam From penberg@cs.helsinki.fi Fri Oct 29 13:00:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 13:00:36 -0700 (PDT) Received: from mail.cs.helsinki.fi (courier.cs.helsinki.fi [128.214.9.1]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TK0SO8009290 for ; Fri, 29 Oct 2004 13:00:29 -0700 Received: from cs181096176.pp.htv.fi (cs181096176.pp.htv.fi [82.181.96.176]) (AUTH: LOGIN penberg, SSL: TLSv1/SSLv3,128bits,RC4-MD5) by mail.cs.helsinki.fi with esmtp; Fri, 29 Oct 2004 23:00:11 +0300 id 000740D8.4182A14B.00002B96 Subject: [PATCH] net: fix natsemi base_addr casting From: Pekka Enberg To: Al Viro Cc: davem@davemloft.net, netdev@oss.sgi.com, linux-kernel@vger.kernel.org, hch@infradead.org In-Reply-To: <20041029131607.GU24336@parcelfarce.linux.theplanet.co.uk> References: <1099044244.9566.0.camel@localhost> <20041029131607.GU24336@parcelfarce.linux.theplanet.co.uk> Date: Fri, 29 Oct 2004 23:01:28 +0300 Message-Id: <1099080089.9572.2.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Mailer: Evolution 2.0.2 X-archive-position: 11156 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: penberg@cs.helsinki.fi Precedence: bulk X-list: netdev Hi, This patch adds a mmioaddr field with proper void __iomem* type to netdev_private struct and removes the ns_ioaddr function that messes around with netdev->base_addr. I tested this with actual hardware. The code also passes sparse checks. Signed-off-by: Pekka Enberg --- natsemi.c | 83 +++++++++++++++++++++++++++++++------------------------------- 1 files changed, 42 insertions(+), 41 deletions(-) Index: 2.6.10-rc1-mm1/drivers/net/natsemi.c =================================================================== --- 2.6.10-rc1-mm1.orig/drivers/net/natsemi.c 2004-10-29 22:03:06.000000000 +0300 +++ 2.6.10-rc1-mm1/drivers/net/natsemi.c 2004-10-29 22:47:09.000000000 +0300 @@ -668,6 +668,7 @@ }; struct netdev_private { + void __iomem *mmioaddr; /* Descriptor rings first for alignment */ dma_addr_t ring_dma; struct netdev_desc *rx_ring; @@ -770,15 +771,10 @@ static int netdev_get_eeprom(struct net_device *dev, u8 *buf); static struct ethtool_ops ethtool_ops; -static inline void __iomem *ns_ioaddr(struct net_device *dev) -{ - return (void __iomem *) dev->base_addr; -} - static void move_int_phy(struct net_device *dev, int addr) { struct netdev_private *np = netdev_priv(dev); - void __iomem *ioaddr = ns_ioaddr(dev); + void __iomem *ioaddr = np->mmioaddr; int target = 31; /* @@ -867,11 +863,11 @@ prev_eedata = eedata; } - dev->base_addr = (unsigned long __force) ioaddr; dev->irq = irq; np = netdev_priv(dev); + np->mmioaddr = ioaddr; np->pci_dev = pdev; pci_set_drvdata(pdev, dev); np->iosize = iosize; @@ -1073,7 +1069,8 @@ static int mii_getbit (struct net_device *dev) { int data; - void __iomem *ioaddr = ns_ioaddr(dev); + struct netdev_private *np = netdev_priv(dev); + void __iomem *ioaddr = np->mmioaddr; writel(MII_ShiftClk, ioaddr + EECtrl); data = readl(ioaddr + EECtrl); @@ -1085,7 +1082,8 @@ static void mii_send_bits (struct net_device *dev, u32 data, int len) { u32 i; - void __iomem *ioaddr = ns_ioaddr(dev); + struct netdev_private *np = netdev_priv(dev); + void __iomem *ioaddr = np->mmioaddr; for (i = (1 << (len-1)); i; i >>= 1) { @@ -1141,7 +1139,7 @@ static int mdio_read(struct net_device *dev, int reg) { struct netdev_private *np = netdev_priv(dev); - void __iomem *ioaddr = ns_ioaddr(dev); + void __iomem *ioaddr = np->mmioaddr; /* The 83815 series has two ports: * - an internal transceiver @@ -1156,7 +1154,7 @@ static void mdio_write(struct net_device *dev, int reg, u16 data) { struct netdev_private *np = netdev_priv(dev); - void __iomem *ioaddr = ns_ioaddr(dev); + void __iomem *ioaddr = np->mmioaddr; /* The 83815 series has an internal transceiver; handle separately */ if (dev->if_port == PORT_TP) @@ -1168,7 +1166,7 @@ static void init_phy_fixup(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - void __iomem *ioaddr = ns_ioaddr(dev); + void __iomem *ioaddr = np->mmioaddr; int i; u32 cfg; u16 tmp; @@ -1280,7 +1278,7 @@ static int switch_port_external(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - void __iomem *ioaddr = ns_ioaddr(dev); + void __iomem *ioaddr = np->mmioaddr; u32 cfg; cfg = readl(ioaddr + ChipConfig); @@ -1313,7 +1311,7 @@ static int switch_port_internal(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - void __iomem *ioaddr = ns_ioaddr(dev); + void __iomem *ioaddr = np->mmioaddr; int i; u32 cfg; u16 bmcr; @@ -1414,7 +1412,7 @@ u16 pmatch[3]; u16 sopass[3]; struct netdev_private *np = netdev_priv(dev); - void __iomem *ioaddr = ns_ioaddr(dev); + void __iomem *ioaddr = np->mmioaddr; /* * Resetting the chip causes some registers to be lost. @@ -1485,7 +1483,7 @@ static void natsemi_reload_eeprom(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - void __iomem *ioaddr = ns_ioaddr(dev); + void __iomem *ioaddr = np->mmioaddr; int i; writel(EepromReload, ioaddr + PCIBusCfg); @@ -1505,8 +1503,8 @@ static void natsemi_stop_rxtx(struct net_device *dev) { - void __iomem * ioaddr = ns_ioaddr(dev); struct netdev_private *np = netdev_priv(dev); + void __iomem * ioaddr = np->mmioaddr; int i; writel(RxOff | TxOff, ioaddr + ChipCmd); @@ -1527,7 +1525,7 @@ static int netdev_open(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = np->mmioaddr; int i; /* Reset the chip, just in case. */ @@ -1576,7 +1574,7 @@ static void do_cable_magic(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - void __iomem *ioaddr = ns_ioaddr(dev); + void __iomem *ioaddr = np->mmioaddr; if (dev->if_port != PORT_TP) return; @@ -1621,7 +1619,7 @@ { u16 data; struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = np->mmioaddr; if (dev->if_port != PORT_TP) return; @@ -1640,7 +1638,7 @@ static void check_link(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = np->mmioaddr; int duplex; u16 bmsr; @@ -1701,7 +1699,7 @@ static void init_registers(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = np->mmioaddr; init_phy_fixup(dev); @@ -1780,7 +1778,7 @@ { struct net_device *dev = (struct net_device *)data; struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = np->mmioaddr; int next_tick = 5*HZ; if (netif_msg_timer(np)) { @@ -1868,7 +1866,7 @@ static void tx_timeout(struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = np->mmioaddr; disable_irq(dev->irq); spin_lock_irq(&np->lock); @@ -2068,7 +2066,7 @@ static int start_tx(struct sk_buff *skb, struct net_device *dev) { struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = np->mmioaddr; unsigned entry; /* Note: Ordering is important here, set the field with the @@ -2162,7 +2160,7 @@ { struct net_device *dev = dev_instance; struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = np->mmioaddr; int boguscnt = max_interrupt_work; unsigned int handled = 0; @@ -2224,7 +2222,7 @@ int boguscnt = np->dirty_rx + RX_RING_SIZE - np->cur_rx; s32 desc_status = le32_to_cpu(np->rx_head_desc->cmd_status); unsigned int buflen = np->rx_buf_sz; - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = np->mmioaddr; /* If the driver owns the next entry it's a new packet. Send it up. */ while (desc_status < 0) { /* e.g. & DescOwn */ @@ -2312,7 +2310,7 @@ static void netdev_error(struct net_device *dev, int intr_status) { struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = np->mmioaddr; spin_lock(&np->lock); if (intr_status & LinkChange) { @@ -2371,8 +2369,8 @@ static void __get_stats(struct net_device *dev) { - void __iomem * ioaddr = ns_ioaddr(dev); struct netdev_private *np = netdev_priv(dev); + void __iomem * ioaddr = np->mmioaddr; /* The chip only need report frame silently dropped. */ np->stats.rx_crc_errors += readl(ioaddr + RxCRCErrs); @@ -2404,8 +2402,8 @@ #define HASH_TABLE 0x200 static void __set_rx_mode(struct net_device *dev) { - void __iomem * ioaddr = ns_ioaddr(dev); struct netdev_private *np = netdev_priv(dev); + void __iomem * ioaddr = np->mmioaddr; u8 mc_filter[64]; /* Multicast hash filter */ u32 rx_mode; @@ -2450,7 +2448,7 @@ /* synchronized against open : rtnl_lock() held by caller */ if (netif_running(dev)) { struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = np->mmioaddr; disable_irq(dev->irq); spin_lock(&np->lock); @@ -2612,7 +2610,7 @@ static int netdev_set_wol(struct net_device *dev, u32 newval) { struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = np->mmioaddr; u32 data = readl(ioaddr + WOLCmd) & ~WakeOptsSummary; /* translate to bitmasks this chip understands */ @@ -2642,7 +2640,7 @@ static int netdev_get_wol(struct net_device *dev, u32 *supported, u32 *cur) { struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = np->mmioaddr; u32 regval = readl(ioaddr + WOLCmd); *supported = (WAKE_PHY | WAKE_UCAST | WAKE_MCAST | WAKE_BCAST @@ -2678,7 +2676,7 @@ static int netdev_set_sopass(struct net_device *dev, u8 *newval) { struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = np->mmioaddr; u16 *sval = (u16 *)newval; u32 addr; @@ -2710,7 +2708,7 @@ static int netdev_get_sopass(struct net_device *dev, u8 *data) { struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = np->mmioaddr; u16 *sval = (u16 *)data; u32 addr; @@ -2894,7 +2892,8 @@ int j; u32 rfcr; u32 *rbuf = (u32 *)buf; - void __iomem * ioaddr = ns_ioaddr(dev); + struct netdev_private *np = netdev_priv(dev); + void __iomem * ioaddr = np->mmioaddr; /* read non-mii page 0 of registers */ for (i = 0; i < NATSEMI_PG0_NREGS/2; i++) { @@ -2944,7 +2943,8 @@ { int i; u16 *ebuf = (u16 *)buf; - void __iomem * ioaddr = ns_ioaddr(dev); + struct netdev_private *np = netdev_priv(dev); + void __iomem * ioaddr = np->mmioaddr; /* eeprom_read reads 16 bits, and indexes by 16 bits */ for (i = 0; i < NATSEMI_EEPROM_SIZE/2; i++) { @@ -3016,8 +3016,8 @@ static void enable_wol_mode(struct net_device *dev, int enable_intr) { - void __iomem * ioaddr = ns_ioaddr(dev); struct netdev_private *np = netdev_priv(dev); + void __iomem * ioaddr = np->mmioaddr; if (netif_msg_wol(np)) printk(KERN_INFO "%s: remaining active for wake-on-lan\n", @@ -3049,8 +3049,8 @@ static int netdev_close(struct net_device *dev) { - void __iomem * ioaddr = ns_ioaddr(dev); struct netdev_private *np = netdev_priv(dev); + void __iomem * ioaddr = np->mmioaddr; if (netif_msg_ifdown(np)) printk(KERN_DEBUG @@ -3126,7 +3126,8 @@ static void __devexit natsemi_remove1 (struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); - void __iomem * ioaddr = ns_ioaddr(dev); + struct netdev_private *np = netdev_priv(dev); + void __iomem * ioaddr = np->mmioaddr; unregister_netdev (dev); pci_release_regions (pdev); @@ -3164,7 +3165,7 @@ { struct net_device *dev = pci_get_drvdata (pdev); struct netdev_private *np = netdev_priv(dev); - void __iomem * ioaddr = ns_ioaddr(dev); + void __iomem * ioaddr = np->mmioaddr; rtnl_lock(); if (netif_running (dev)) { From sam@errno.com Fri Oct 29 13:00:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 13:01:02 -0700 (PDT) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TK0vMP009460 for ; Fri, 29 Oct 2004 13:00:57 -0700 Received: from [66.127.85.93] ([66.127.85.93]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id i9TK0LWi000292 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 29 Oct 2004 13:00:21 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <4182A175.8050706@errno.com> Date: Fri, 29 Oct 2004 13:00:53 -0700 From: Sam Leffler Organization: Errno Consulting User-Agent: Mozilla Thunderbird 0.8 (Macintosh/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: johnpol@2ka.mipt.ru CC: James Morris , jamal , netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. References: <1099062483.1023.21.camel@jzny.localdomain> <20041029204551.06caaf4b@zanzibar.2ka.mipt.ru> In-Reply-To: <20041029204551.06caaf4b@zanzibar.2ka.mipt.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11157 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sam@errno.com Precedence: bulk X-list: netdev Evgeniy Polyakov wrote: > On Fri, 29 Oct 2004 12:16:35 -0400 (EDT) > James Morris wrote: > > >>On 29 Oct 2004, jamal wrote: >> >> >>>On Fri, 2004-10-29 at 10:06, Evgeniy Polyakov wrote: >>> >>> >>> >>>>If we have a hardware accelerator chip, than we _already_ have improvements >>>>with even the worst async crypto layer, since software and hardware >>>>will work in parrallel. >>> >>>Thats what i am hoping - and theory points to it. Numbers, numbers >>>please ;-> >> >>There's an OpenBSD paper which demonstrates the usefulness of crypto >>hardware for reducing cpu contention. I can't get to their web site now, >>but it's there somewhere under a security link. > > > Asynchronous crypto layer was written under impression of those paper. > OpenBSD layer is very good, but it has some nitpics some of which are really > not good, but I hope all of them are resolved in my driver. > > You can find paper for example there: http://www.madchat.org/crypto/ocf.pdf And a paper I wrote explains how I fixed many of the problems with the openbsd code in freebsd. http://www.usenix.org/publications/library/proceedings/bsdcon03/tech/leffler_crypto/leffler_crpto_html/ In the same proceedings you'll also find a horrible paper I wrote about some performance tuning I did in my IPsec implementation that uses the crypto infrastructure. http://www.usenix.org/publications/library/proceedings/bsdcon03/tech/full_papers/leffler_ipsec/leffler_ipsec_html/ Sam From akpm@osdl.org Fri Oct 29 13:42:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 13:42:19 -0700 (PDT) Received: from mail.osdl.org (fw.osdl.org [65.172.181.6]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TKgDC4010667 for ; Fri, 29 Oct 2004 13:42:13 -0700 Received: from bix (build.pdx.osdl.net [172.20.1.2]) by mail.osdl.org (8.11.6/8.11.6) with SMTP id i9TKfO926308; Fri, 29 Oct 2004 13:41:24 -0700 Date: Fri, 29 Oct 2004 13:39:23 -0700 From: Andrew Morton To: Esben Nielsen Cc: davem@redhat.com, jgarzik@pobox.com, netdev@oss.sgi.com Subject: Re: [patch 1/9] arcnet fixes Message-Id: <20041029133923.66dd719f.akpm@osdl.org> In-Reply-To: References: <20041028164111.5ffaca70.davem@redhat.com> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11158 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 Esben Nielsen wrote: > > > One problem with the patch though. > > > > > diff -puN include/linux/if_ether.h~arcnet-fixes include/linux/if_ether.h > > > --- 25/include/linux/if_ether.h~arcnet-fixes 2004-10-28 00:17:07.230704752 -0700 > > > +++ 25-akpm/include/linux/if_ether.h 2004-10-28 00:17:07.247702168 -0700 > > > @@ -91,6 +91,7 @@ > > > #define ETH_P_IRDA 0x0017 /* Linux-IrDA */ > > > #define ETH_P_ECONET 0x0018 /* Acorn Econet */ > > > #define ETH_P_HDLC 0x0019 /* HDLC frames */ > > > +#define ETH_P_ARCNET 0x0020 /* ArcNet */ > > > > You should use 0x001a or similar, so you don't have > > to do this next part of your patch, bumping NPROTO > > in net.h > > > > Doh! I can't count in hex it seems. This would probably also mean I won't > have to recompile the whole kernel but just the modules and I don't have > to reboot to make it work on a new machine - but just until somebody else > picks the same protocol number ofcourse. > > Do I have to fix the problem and resubmit? Yes please. A patch relative to the previous one would be nice. From khc@pm.waw.pl Fri Oct 29 14:15:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 14:15:29 -0700 (PDT) Received: from inx.pm.waw.pl (postfix@inx.pm.waw.pl [195.116.170.20]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TLFMaL011475 for ; Fri, 29 Oct 2004 14:15:23 -0700 Received: from defiant.pm.waw.pl (cmj183.neoplus.adsl.tpnet.pl [83.31.137.183]) by inx.pm.waw.pl (Postfix) with ESMTP id 104AADF92; Fri, 29 Oct 2004 23:17:31 +0200 (CEST) Received: by defiant.pm.waw.pl (Postfix, from userid 500) id 1F37B34735; Fri, 29 Oct 2004 23:13:25 +0200 (CEST) To: Al Viro Cc: Pekka J Enberg , davem@davemloft.net, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: net: generic netdev_ioaddr References: <1099044244.9566.0.camel@localhost> <20041029131607.GU24336@parcelfarce.linux.theplanet.co.uk> <20041029193827.GV24336@parcelfarce.linux.theplanet.co.uk> From: Krzysztof Halasa Date: Fri, 29 Oct 2004 23:13:24 +0200 In-Reply-To: <20041029193827.GV24336@parcelfarce.linux.theplanet.co.uk> (Al Viro's message of "Fri, 29 Oct 2004 20:38:27 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 11159 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: khc@pm.waw.pl Precedence: bulk X-list: netdev Al Viro writes: > What uses ->base_addr from the data returned by SIOCGIFMAP? ifconfig I think: eth0 Link encap:Ethernet HWaddr 00:50:BA:70:68:3E inet addr:10.0.0.2 Bcast:10.0.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2796430 errors:1 dropped:0 overruns:0 frame:0 TX packets:4056563 errors:3 dropped:0 overruns:0 carrier:3 collisions:0 txqueuelen:1000 RX bytes:285233613 (272.0 Mb) TX bytes:1252627624 (1194.5 Mb) Interrupt:10 Base address:0x4000 With this driver it happens to be MMIO address. I understand presenting this value to users might have some value: it can help determine the physical port/card for a given netdev. But it should be something like a description text set by the driver (ie. containing PCI bus/device, or even ISA address for ISA non-PnP card, possibly with other information). It seems while some devices use SIOCGIFMAP (ie. by setting the fields in netdev struct), support for SIOCSIFMAP doesn't make sense for most hardware. Drivers using SIOCSIFMAP (selecting media only?): arch/cris/arch-v10/drivers/ethernet.c: dev->set_config = e100_set_config; drivers/net/au1000_eth.c: dev->set_config = &au1000_set_config; drivers/net/sis900.c: net_dev->set_config = &sis900_set_config; drivers/net/arm/etherh.c: dev->set_config = etherh_set_config; drivers/net/pcmcia/3c589_cs.c: dev->set_config = &el3_config; drivers/net/pcmcia/fmvj18x_cs.c: dev->set_config = &fjn_config; drivers/net/pcmcia/nmclan_cs.c: dev->set_config = &mace_config; drivers/net/pcmcia/pcnet_cs.c: dev->set_config = &set_config; drivers/net/pcmcia/smc91c92_cs.c: dev->set_config = &s9k_config; drivers/net/pcmcia/xirc2ps_cs.c: dev->set_config = &do_config; drivers/net/wan/sdla.c: dev->set_config = sdla_set_config; drivers/net/wireless/ray_cs.c: dev->set_config = &ray_dev_config; I think I would mark this stuff obsolete, and remove when the drivers are updated (if they need an update at all, they may support ethtool/mii-tool already). -- Krzysztof Halasa From Michael.Waychison@Sun.COM Fri Oct 29 14:31:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 14:31:52 -0700 (PDT) Received: from nwkea-mail-1.sun.com (nwkea-mail-1.sun.com [192.18.42.13]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TLVj0U012167 for ; Fri, 29 Oct 2004 14:31:45 -0700 Received: from phys-mpk-2 ([129.146.11.82]) by nwkea-mail-1.sun.com (8.12.10/8.12.9) with ESMTP id i9TLVSs5019195 for ; Fri, 29 Oct 2004 14:31:29 -0700 (PDT) Received: from conversion-daemon.mpk-mail1.sfbay.sun.com by mpk-mail1.sfbay.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) id <0I6D006017OS29@mpk-mail1.sfbay.sun.com> (original mail from Michael.Waychison@Sun.COM) for netdev@oss.sgi.com; Fri, 29 Oct 2004 14:31:28 -0700 (PDT) Received: from [129.150.24.157] (vpn-129-150-24-157.SFBay.Sun.COM [129.150.24.157]) by mpk-mail1.sfbay.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) with ESMTP id <0I6D00DKF7SFUO@mpk-mail1.sfbay.sun.com>; Fri, 29 Oct 2004 14:31:28 -0700 (PDT) Date: Fri, 29 Oct 2004 17:31:19 -0400 From: Mike Waychison Subject: [PATCH] TG3: fiber hw autoneg bounces To: "David S. Miller" Cc: Brian Somers , netdev@oss.sgi.com Message-id: <4182B6A7.90700@sun.com> MIME-version: 1.0 Content-type: multipart/mixed; boundary="Boundary_(ID_t4iqKJrvjhPq07Zcg938/g)" X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 0.8 (X11/20040918) X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime X-archive-position: 11160 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Michael.Waychison@Sun.COM Precedence: bulk X-list: netdev This is a multi-part message in MIME format. --Boundary_(ID_t4iqKJrvjhPq07Zcg938/g) Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7BIT -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi David, We've recently noticed that the autonegotiation cleanup made a while back (between tg3 3.8 and 3.9) has issues which make the link bounce up and down. I've traced it to be caused by the tg3_timer 1 second work noticing that MAC_STATUS_LNKSTATE_CHANGED was set, which driver would see as the link going down. Upon further inspection, it appears that we don't wait long enough between setting SG_DIG_CTRL and reading the SG_DIG_STATUS for the result. The following patch (from a quasi recent bk tree) makes this code path wait up to 200ms for the link to establish. In my testing, I'm seeing it take around 20ms for the negotiation to complete. I haven't had the chance to test how this patch affects the case where the switch doesn't have autoneg enabled, although I suspect fallback should work correctly. Please consider applying, thanks, Signed-off-by: Mike Waychison - -- Mike Waychison Sun Microsystems, Inc. 1 (650) 352-5299 voice 1 (416) 202-8336 voice ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ NOTICE: The opinions expressed in this email are held by me, and may not represent the views of Sun Microsystems, Inc. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBgrandQs4kOxk3/MRAhWnAJ9eD+qmG8/NCImsRuLCksXbLfwVCgCcDn8G dnOG2USQhPV1q13rXr4xot8= =GSM2 -----END PGP SIGNATURE----- --Boundary_(ID_t4iqKJrvjhPq07Zcg938/g) Content-type: text/x-patch; name=tg3-hw-autoneg-wait.patch Content-transfer-encoding: 7BIT Content-disposition: inline; filename=tg3-hw-autoneg-wait.patch # 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.2192 -> 1.2193 # drivers/net/tg3.c 1.204 -> 1.205 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 04/10/29 michael.waychison@sun.com 1.2193 # The tg3 driver's fiber hw autonegotiation path wasn't waiting for the # negotiation to complete. This caused a delayed change in link state which was # picked up by the per-second timer and caused the link to bounce up and down # once every second. The attached patch fixes this by waiting up to 200ms to get # a success or error from the chip's built in autonegotiation. # -------------------------------------------- # diff -Nru a/drivers/net/tg3.c b/drivers/net/tg3.c --- a/drivers/net/tg3.c Fri Oct 29 20:08:53 2004 +++ b/drivers/net/tg3.c Fri Oct 29 20:08:53 2004 @@ -2140,7 +2140,16 @@ tp->tg3_flags2 |= TG3_FLG2_PHY_JUST_INITTED; } else if (mac_status & (MAC_STATUS_PCS_SYNCED | MAC_STATUS_SIGNAL_DET)) { - sg_dig_status = tr32(SG_DIG_STATUS); + int i; + + /* Giver time to negotiate (~200ms) */ + for (i = 0; i < 40000; i++) { + sg_dig_status = tr32(SG_DIG_STATUS); + if (sg_dig_status & (0x3)) + break; + udelay(5); + } + mac_status = tr32(MAC_STATUS); if ((sg_dig_status & (1 << 1)) && (mac_status & MAC_STATUS_PCS_SYNCED)) { --Boundary_(ID_t4iqKJrvjhPq07Zcg938/g)-- From mdomsch@lists.us.dell.com Fri Oct 29 14:51:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 14:51:59 -0700 (PDT) Received: from lists.us.dell.com (linux.us.dell.com [143.166.224.162]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TLpruG012877 for ; Fri, 29 Oct 2004 14:51:54 -0700 Received: from lists.us.dell.com (localhost.localdomain [127.0.0.1]) by lists.us.dell.com (8.12.10/8.12.10/Dell.IT.3.31.03) with ESMTP id i9TLpYMU015486 for ; Fri, 29 Oct 2004 16:51:34 -0500 Received: (from mdomsch@localhost) by lists.us.dell.com (8.12.10/8.12.10/Submit) id i9TLpYsN015484 for netdev@oss.sgi.com; Fri, 29 Oct 2004 16:51:34 -0500 Date: Fri, 29 Oct 2004 16:51:34 -0500 From: Matt Domsch To: netdev@oss.sgi.com Subject: [PATCH 2.6] dev.c: clear SIOCGIFHWADDR buffer if !dev->addr_len Message-ID: <20041029215134.GA15414@lists.us.dell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-archive-position: 11161 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Matt_Domsch@dell.com Precedence: bulk X-list: netdev If dev->dev_addr is zero, then the memcpy() never takes place, and the same data that was in the caller's buffer is still in the caller's buffer on successful return. The caller can't know that the data in its buffer isn't the right answer. So, if dev->dev_dev_addr == 0, clear the buffer before returning success. Thanks, Matt -- Matt Domsch Sr. Software Engineer, Lead Engineer Dell Linux Solutions linux.dell.com & www.dell.com/linux Linux on Dell mailing lists @ http://lists.us.dell.com ===== linux-2.6/net/core/dev.c 1.169 vs edited ===== --- 1.169/net/core/dev.c 2004-10-26 11:09:33 -05:00 +++ edited/linux-2.6/net/core/dev.c 2004-10-29 16:39:33 -05:00 @@ -2375,8 +2375,11 @@ return dev_set_mtu(dev, ifr->ifr_mtu); case SIOCGIFHWADDR: - memcpy(ifr->ifr_hwaddr.sa_data, dev->dev_addr, - min(sizeof ifr->ifr_hwaddr.sa_data, (size_t) dev->addr_len)); + if (!dev->addr_len) + memset(ifr->ifr_hwaddr.sa_data, 0, sizeof ifr->ifr_hwaddr.sa_data); + else + memcpy(ifr->ifr_hwaddr.sa_data, dev->dev_addr, + min(sizeof ifr->ifr_hwaddr.sa_data, (size_t) dev->addr_len)); ifr->ifr_hwaddr.sa_family = dev->type; return 0; From herbert@gondor.apana.org.au Fri Oct 29 16:13:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 16:13:45 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TNDahl014581 for ; Fri, 29 Oct 2004 16:13:37 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CNfvp-0008OU-00; Sat, 30 Oct 2004 09:13:17 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CNfvm-0004fP-00; Sat, 30 Oct 2004 09:13:14 +1000 Date: Sat, 30 Oct 2004 09:13:14 +1000 To: "David S. Miller" , netdev@oss.sgi.com Subject: Re: [TCP] Modularise tcpdiag Message-ID: <20041029231314.GA17928@gondor.apana.org.au> References: <20041029043858.GA27907@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041029043858.GA27907@gondor.apana.org.au> User-Agent: Mutt/1.5.6+20040722i From: Herbert Xu X-archive-position: 11162 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev On Fri, Oct 29, 2004 at 02:38:58PM +1000, herbert wrote: > > Next we can move out the IPv6-specific stuff. Actually, perhaps it's time to turn tcpdiag into sockdiag and do all families & protocols. It's a bit ironic that we have to poke into procfs to see netlink sockets :) -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From tommy.christensen@tpack.net Fri Oct 29 16:37:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 16:37:29 -0700 (PDT) Received: from mail.tpack.net (ip18.tpack.net [213.173.228.18]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9TNbMAZ018502 for ; Fri, 29 Oct 2004 16:37:23 -0700 Received: (qmail 12596 invoked from network); 29 Oct 2004 23:37:00 -0000 Received: from dhcp-222.cph.tpack.net (HELO ?172.17.159.11?) (192.168.0.222) by 0 with SMTP; 29 Oct 2004 23:37:00 -0000 Message-ID: <4182D44E.7070507@tpack.net> Date: Sat, 30 Oct 2004 01:37:50 +0200 From: Tommy Christensen User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ben Greear CC: "'netdev@oss.sgi.com'" , "Linux 802.1Q VLAN" , Francois Romieu , "David S. Miller" Subject: Re: [PATCH] 802.1Q VLAN References: <41797696.9070905@candelatech.com> <20041022214611.GA4948@electric-eye.fr.zoreil.com> <41798506.1030909@candelatech.com> <417D675F.3000909@candelatech.com> <4181838B.6040002@tpack.net> <41818D99.9020300@candelatech.com> <1099038566.1813.99.camel@cyan.cph.tpack.net> <418281C1.9080707@candelatech.com> In-Reply-To: <418281C1.9080707@candelatech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11163 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tommy.christensen@tpack.net Precedence: bulk X-list: netdev Ben Greear wrote: > Tommy Christensen wrote: > >> On Fri, 2004-10-29 at 02:23, Ben Greear wrote: >> >>>> o It is considered an error if a queue-less device returns anything >>>> but zero from its >>>> hard_start_xmit() function (see dev_queue_xmit()). >>> >>> >>> This certainly was not clear to me. The comments in dev_queue_xmit are >>> wrong about the return value (failure cases can be > zero too). Are >>> there other errors or ommissions there? >> >> >> A return value > zero doesn't mean failure. It indicates congestion. > > > Ok, but the skb is always deleted by the net_queue_xmit code if the > return is not zero? The difference between a hard-start-xmit failure > on eth0 when the hardware-queue is full and having a rate-limiting > queue drop a packet is virtually identical to me.... For a virtual device: yes, dev_queue_xmit() drops the skb. What else could it do with it? The semantic is that dev_queue_xmit always consumes skb's given to it. A physical device will have a qdisc attached to it, so you don't get to see that the hardware queue is full. qdisc handles this case for you by retrying the transmission later. This is not (yet) congestion. OTOH if qdisc doesn't have room for a new skb in its *software* queue, the skb is dropped and congestion is reported upwards the stack. >>> What sorts of things go wrong if you do return an error here when you >>> don't >>> have a queue? >> >> >> It is interpreted as a tx failure rather than congestion. So it doesn't >> help the upper layers like you wanted it to. >> And it spews out an error message. > > > The e1000 and probably other NICs have failed hard_start_xmit for a long > time, and they are some of the most stable and high-performance NICs. > So, the upper layers must be handling it OK some how or another. Yes, this is perfectly valid for real devices. It is handled by the qdisc system - specifically qdisc_restart(). > Can you point me to some code that takes a different action based on the > return values of dev_queue_xmit? That may help me understand better. This is hard to track due to indirect function calls, but take a look at tcp_transmit_skb(). It ultimately calls dev_queue_xmit(). >>>> o So, lets add a tx queue to it. Sure, that would be nice. Now we >>>> can even do shaping >>>> and other fancy stuff. But then how do we manage >>>> netif_queue_stopped? Especially >>>> restarting the queue could be tricky. >>> >>> >>> Right... it would probably be an O(N) thing to wake the queues for >>> all virtual >>> devices on a physical device, and we certainly don't want to do that >>> often. Maybe if you only tried to wake the blocked queues (ie, kept >>> a list >>> of just blocked queues), then that would be less painful on average, >>> but the worst-case is still bad. >> >> >> Yeah, we probably would need some sort of notification from the >> qdisc of the underlying device when it can accept packets again. > > > I did something like this for my non-busy-spin pktgen re-write and it > works fine with both VLANs and physical devices. I just hooked > directly into this code in netdevice.h: > > static inline void netif_wake_queue(struct net_device *dev) > { > #ifdef CONFIG_NETPOLL_TRAP > if (netpoll_trap()) > return; > #endif > if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state)) { > __netif_schedule(dev); > > if (dev->notify_queue_woken) { > dev->notify_queue_woken(dev); > } > } > } > > pktgen registers this hook on the physical device when it starts > generating on > the physical device or any VLANs attached to it. To make a scheme like > this work > in general, we'd probably need a chain of callbacks instead of a single > method > pointer... Nice. This idea is definitely worth persuing. However, ideally we would want to be notified when the *qdisc* queue opens up - this is our "tx ring buffer". >>>> o But couldn't we skip netif_stop_queue() and just return >>>> NETDEV_TX_BUSY when congested? >>>> No, that would make the qdisc system "busy-retry" untill it >>>> succeeds. BAD. >>>> >>>> o It is unsafe to pass a shared skb to dev_queue_xmit() unless you >>>> control all the >>>> references yourself. (It will likely be enqueued on a list.) >>> >>> >>> Since we either free the duplicate copy, or pass it to the queue and >>> forget >>> about it, this last point does not matter in the patch I submitted, >>> right? >> >> >> >> Yes. This is the right way to do it. *Unless* the skb is already shared >> when you receive it (e.g. from pktgen). > > > You can't send shared skbs regardless, because the vlan Xmit changes the > skb->dev at least, so > you just have to set the multi-skb setting in pktgen to 0 so that it > does not > share when using VLANs. By sheer accident, this would actually work! Nevertheless, the code should obviously handle this correctly (whatever that means?!). -Tommy From greearb@candelatech.com Fri Oct 29 16:56:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 16:56:43 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9TNubUd019104 for ; Fri, 29 Oct 2004 16:56:37 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i9U041LH023445; Fri, 29 Oct 2004 17:04:01 -0700 Message-ID: <4182D8A1.1070801@candelatech.com> Date: Fri, 29 Oct 2004 16:56:17 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tommy Christensen CC: "'netdev@oss.sgi.com'" , "Linux 802.1Q VLAN" , Francois Romieu , "David S. Miller" Subject: Re: [PATCH] 802.1Q VLAN References: <41797696.9070905@candelatech.com> <20041022214611.GA4948@electric-eye.fr.zoreil.com> <41798506.1030909@candelatech.com> <417D675F.3000909@candelatech.com> <4181838B.6040002@tpack.net> <41818D99.9020300@candelatech.com> <1099038566.1813.99.camel@cyan.cph.tpack.net> <418281C1.9080707@candelatech.com> <4182D44E.7070507@tpack.net> In-Reply-To: <4182D44E.7070507@tpack.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11164 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Tommy Christensen wrote: > Ben Greear wrote: > >> You can't send shared skbs regardless, because the vlan Xmit changes >> the skb->dev at least, so >> you just have to set the multi-skb setting in pktgen to 0 so that it >> does not >> share when using VLANs. > > > By sheer accident, this would actually work! Nevertheless, the code > should obviously handle this correctly (whatever that means?!). It definately crashed on my system when I tried it, so I don't think it actually works. Think about a SMP system where pktgen is re-sending the same pkt while the other CPU is handling the previous send..or something like that. The fact that skb->dev is changing cannot be healthy. From what I can tell, a net-devices hard_start_xmit method must either return 0 and consume the skb, or return a non-zero value and not consume the skb. Since we can detect immediate drops due to the dev_queue_xmit call failing, I don't see how it can hurt anything to preserve the skb and return the error code. Code that cares about retransmitting can, and if it doesn't, it can just delete the skb. I believe this is the same as the case where the e1000 does not show netif_queue_stopped() but still returns failure when you try the hard_start_xmit. I know that this case will probably eventually be fixed, but the fact that it *does* work leads me to believe I can get away with what I'm trying to do with VLANs. -- Ben Greear Candela Technologies Inc http://www.candelatech.com From tgraf@suug.ch Fri Oct 29 17:01:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 17:01:12 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9U014gt019489 for ; Fri, 29 Oct 2004 17:01:04 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 58B8782; Sat, 30 Oct 2004 02:00:24 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 1472F1C0E9; Sat, 30 Oct 2004 02:01:06 +0200 (CEST) Date: Sat, 30 Oct 2004 02:01:05 +0200 From: Thomas Graf To: "David S. Miller" Cc: netdev@oss.sgi.com, hadi@cyberus.ca Subject: [RESEND 2/4] cls_rsvp*: Use generic routines for class binding and police config/dump Message-ID: <20041030000105.GY12289@postel.suug.ch> References: <20041029140612.GO12289@postel.suug.ch> <20041029140756.GQ12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041029140756.GQ12289@postel.suug.ch> X-archive-position: 11165 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Resend of original patch with a typo fix included. Signed-off-by: Thomas Graf --- linux-2.6.10-rc1-bk7.orig/net/sched/cls_rsvp.h 2004-10-29 11:18:17.000000000 +0200 +++ linux-2.6.10-rc1-bk7/net/sched/cls_rsvp.h 2004-10-29 11:24:07.000000000 +0200 @@ -272,11 +272,8 @@ struct rsvp_filter *f; while ((f = s->ht[h2]) != NULL) { - unsigned long cl; - s->ht[h2] = f->next; - if ((cl = __cls_set_class(&f->res.class, 0)) != 0) - tp->q->ops->cl_ops->unbind_tcf(tp->q, cl); + tcf_unbind_filter(tp, &f->res); #ifdef CONFIG_NET_CLS_POLICE tcf_police_release(f->police,TCA_ACT_UNBIND); #endif @@ -299,16 +296,10 @@ for (fp = &s->ht[(h>>8)&0xFF]; *fp; fp = &(*fp)->next) { if (*fp == f) { - unsigned long cl; - - tcf_tree_lock(tp); *fp = f->next; tcf_tree_unlock(tp); - - if ((cl = cls_set_class(tp, &f->res.class, 0)) != 0) - tp->q->ops->cl_ops->unbind_tcf(tp->q, cl); - + tcf_unbind_filter(tp, &f->res); #ifdef CONFIG_NET_CLS_POLICE tcf_police_release(f->police,TCA_ACT_UNBIND); #endif @@ -437,22 +428,15 @@ if (f->handle != handle && handle) return -EINVAL; if (tb[TCA_RSVP_CLASSID-1]) { - unsigned long cl; - f->res.classid = *(u32*)RTA_DATA(tb[TCA_RSVP_CLASSID-1]); - cl = cls_set_class(tp, &f->res.class, tp->q->ops->cl_ops->bind_tcf(tp->q, base, f->res.classid)); - if (cl) - tp->q->ops->cl_ops->unbind_tcf(tp->q, cl); + tcf_bind_filter(tp, &f->res, base); } #ifdef CONFIG_NET_CLS_POLICE if (tb[TCA_RSVP_POLICE-1]) { - struct tcf_police *police = tcf_police_locate(tb[TCA_RSVP_POLICE-1], tca[TCA_RATE-1]); - - tcf_tree_lock(tp); - police = xchg(&f->police, police); - tcf_tree_unlock(tp); - - tcf_police_release(police,TCA_ACT_UNBIND); + err = tcf_change_police(tp, &f->police, + tb[TCA_RSVP_POLICE-1], tca[TCA_RATE-1]); + if (err < 0) + return err; } #endif return 0; @@ -531,10 +515,10 @@ f->sess = s; if (f->tunnelhdr == 0) - cls_set_class(tp, &f->res.class, tp->q->ops->cl_ops->bind_tcf(tp->q, base, f->res.classid)); + tcf_bind_filter(tp, &f->res, base); #ifdef CONFIG_NET_CLS_POLICE if (tb[TCA_RSVP_POLICE-1]) - f->police = tcf_police_locate(tb[TCA_RSVP_POLICE-1], tca[TCA_RATE-1]); + tcf_change_police(tp, &f->police, tb[TCA_RSVP_POLICE-1], tca[TCA_RATE-1]); #endif for (fp = &s->ht[h2]; *fp; fp = &(*fp)->next) @@ -641,16 +625,8 @@ if (((f->handle>>8)&0xFF) != 16) RTA_PUT(skb, TCA_RSVP_SRC, sizeof(f->src), f->src); #ifdef CONFIG_NET_CLS_POLICE - if (f->police) { - struct rtattr * p_rta = (struct rtattr*)skb->tail; - - RTA_PUT(skb, TCA_RSVP_POLICE, 0, NULL); - - if (tcf_police_dump(skb, f->police) < 0) - goto rtattr_failure; - - p_rta->rta_len = skb->tail - (u8*)p_rta; - } + if (tcf_dump_police(skb, f->police, TCA_RSVP_POLICE) < 0) + goto rtattr_failure; #endif rta->rta_len = skb->tail - b; From greearb@candelatech.com Fri Oct 29 17:05:40 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 17:05:44 -0700 (PDT) Received: from www.lanforge.com (ns1.lanforge.com [66.165.47.210]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9U05dR0019967 for ; Fri, 29 Oct 2004 17:05:40 -0700 Received: from [4.35.49.74] (evrtwa1-ar2-4-35-049-074.evrtwa1.dsl-verizon.net [4.35.49.74]) (authenticated bits=0) by www.lanforge.com (8.12.8/8.12.8) with ESMTP id i9U0D4LH023649; Fri, 29 Oct 2004 17:13:04 -0700 Message-ID: <4182DABE.7000502@candelatech.com> Date: Fri, 29 Oct 2004 17:05:18 -0700 From: Ben Greear Organization: Candela Technologies User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tommy Christensen CC: "'netdev@oss.sgi.com'" , "Linux 802.1Q VLAN" , Francois Romieu , "David S. Miller" Subject: Re: [PATCH] 802.1Q VLAN References: <41797696.9070905@candelatech.com> <20041022214611.GA4948@electric-eye.fr.zoreil.com> <41798506.1030909@candelatech.com> <417D675F.3000909@candelatech.com> <4181838B.6040002@tpack.net> <41818D99.9020300@candelatech.com> <1099038566.1813.99.camel@cyan.cph.tpack.net> <418281C1.9080707@candelatech.com> <4182D44E.7070507@tpack.net> In-Reply-To: <4182D44E.7070507@tpack.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11166 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: greearb@candelatech.com Precedence: bulk X-list: netdev Tommy Christensen wrote: > Ben Greear wrote: > >> Tommy Christensen wrote: >>> A return value > zero doesn't mean failure. It indicates congestion. >> >> >> >> Ok, but the skb is always deleted by the net_queue_xmit code if the >> return is not zero? The difference between a hard-start-xmit failure >> on eth0 when the hardware-queue is full and having a rate-limiting >> queue drop a packet is virtually identical to me.... > > > For a virtual device: yes, dev_queue_xmit() drops the skb. What else > could it do with it? The semantic is that dev_queue_xmit always consumes > skb's given to it. > > A physical device will have a qdisc attached to it, so you don't get to > see that the hardware queue is full. qdisc handles this case for you by > retrying the transmission later. This is not (yet) congestion. > OTOH if qdisc doesn't have room for a new skb in its *software* queue, > the skb is dropped and congestion is reported upwards the stack. Can't you also add a queue to a VLAN device? eth1.1009 Link encap:Ethernet HWaddr 00:07:E9:1F:CE:02 inet addr:172.100.1.109 Bcast:172.100.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:2000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) I see fairly high latency when I overdrive the network, but it does seem to work just fine. >> pktgen registers this hook on the physical device when it starts >> generating on >> the physical device or any VLANs attached to it. To make a scheme >> like this work >> in general, we'd probably need a chain of callbacks instead of a >> single method >> pointer... > > > Nice. This idea is definitely worth persuing. However, ideally we > would want to be notified when the *qdisc* queue opens up - this > is our "tx ring buffer". Maybe the qdisc could automatically flush what it could to lower level devices/queues whenever it was asked to enqueue a packet? This way, waking the writers could automatically wake the various queues under the writers. That could be happening already, and might explain why my pktgen hacks work. -- Ben Greear Candela Technologies Inc http://www.candelatech.com From tommy.christensen@tpack.net Fri Oct 29 17:30:35 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 17:30:41 -0700 (PDT) Received: from mail.tpack.net (ip18.tpack.net [213.173.228.18]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9U0UY8D020912 for ; Fri, 29 Oct 2004 17:30:34 -0700 Received: (qmail 21385 invoked from network); 30 Oct 2004 00:30:12 -0000 Received: from dhcp-222.cph.tpack.net (HELO ?172.17.159.11?) (192.168.0.222) by 0 with SMTP; 30 Oct 2004 00:30:12 -0000 Message-ID: <4182E0C6.6090205@tpack.net> Date: Sat, 30 Oct 2004 02:31:02 +0200 From: Tommy Christensen User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ben Greear CC: "'netdev@oss.sgi.com'" , "Linux 802.1Q VLAN" , Francois Romieu , "David S. Miller" Subject: Re: [PATCH] 802.1Q VLAN References: <41797696.9070905@candelatech.com> <20041022214611.GA4948@electric-eye.fr.zoreil.com> <41798506.1030909@candelatech.com> <417D675F.3000909@candelatech.com> <4181838B.6040002@tpack.net> <41818D99.9020300@candelatech.com> <1099038566.1813.99.camel@cyan.cph.tpack.net> <418281C1.9080707@candelatech.com> <4182D44E.7070507@tpack.net> <4182DABE.7000502@candelatech.com> In-Reply-To: <4182DABE.7000502@candelatech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11167 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tommy.christensen@tpack.net Precedence: bulk X-list: netdev Ben Greear wrote: > Can't you also add a queue to a VLAN device? Sure you can. This is the best solution, if you have a way of waking up the queue. >> Nice. This idea is definitely worth persuing. However, ideally we >> would want to be notified when the *qdisc* queue opens up - this >> is our "tx ring buffer". > > > Maybe the qdisc could automatically flush what it could to lower > level devices/queues whenever it was asked to enqueue a packet? > This way, waking the writers could automatically wake the various > queues under the writers. > > That could be happening already, and might explain why my pktgen hacks > work. Yes, this is what qdisc does. It just isn't good enough to have to wait for the next packet, IMO. -Tommy From mdomsch@lists.us.dell.com Fri Oct 29 18:37:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 18:37:24 -0700 (PDT) Received: from lists.us.dell.com (linux.us.dell.com [143.166.224.162]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9U1bGcY022641 for ; Fri, 29 Oct 2004 18:37:17 -0700 Received: from lists.us.dell.com (localhost.localdomain [127.0.0.1]) by lists.us.dell.com (8.12.10/8.12.10/Dell.IT.3.31.03) with ESMTP id i9U1b0MU023428 for ; Fri, 29 Oct 2004 20:37:00 -0500 Received: (from mdomsch@localhost) by lists.us.dell.com (8.12.10/8.12.10/Submit) id i9U1b0Vk023426 for netdev@oss.sgi.com; Fri, 29 Oct 2004 20:37:00 -0500 Date: Fri, 29 Oct 2004 20:37:00 -0500 From: Matt Domsch To: netdev@oss.sgi.com Subject: Re: [PATCH 2.6] dev.c: clear SIOCGIFHWADDR buffer if !dev->addr_len Message-ID: <20041030013700.GA21540@lists.us.dell.com> References: <20041029215134.GA15414@lists.us.dell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041029215134.GA15414@lists.us.dell.com> User-Agent: Mutt/1.4.1i X-archive-position: 11168 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Matt_Domsch@dell.com Precedence: bulk X-list: netdev On Fri, Oct 29, 2004 at 04:51:34PM -0500, Matt Domsch wrote: > If dev->dev_addr is zero, then the memcpy() never takes place, and the > same data that was in the caller's buffer is still in the caller's > buffer on successful return. The caller can't know that the data in > its buffer isn't the right answer. So, if dev->dev_addr == 0, > clear the buffer before returning success. Some additional detail I forgot to include. s/dev_addr/addr_len in the comments above, that's the field we care about being non-zero. This directly affects ppp devices, as those have dev->addr_len == 0. This was seen because net-snmp reports the MAC address of devices in the system, and for ppp devices was reporting an address of 0x00FFFFFF because that was the data in the buffer prior to calling ioctl(). This patch causes the 2.6 behaviour to match that of the 2.4 kernel which has a fixed length MAX_ADDR_LEN instead of a variable addr_len and always copies MAX_ADDR_LEN bytes. Thanks to Jordan Hargrave for root cause analysis and suggesting the fix. Signed-off-by: Matt Domsch -- Matt Domsch Sr. Software Engineer, Lead Engineer Dell Linux Solutions linux.dell.com & www.dell.com/linux Linux on Dell mailing lists @ http://lists.us.dell.com From herbert@gondor.apana.org.au Fri Oct 29 18:48:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 18:48:54 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9U1mde2023104 for ; Fri, 29 Oct 2004 18:48:46 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CNiLq-000170-00; Sat, 30 Oct 2004 11:48:18 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CNiLo-0008Fj-00; Sat, 30 Oct 2004 11:48:16 +1000 From: Herbert Xu To: Matt_Domsch@dell.com (Matt Domsch) Subject: Re: [PATCH 2.6] dev.c: clear SIOCGIFHWADDR buffer if !dev->addr_len Cc: netdev@oss.sgi.com Organization: Core In-Reply-To: <20041029215134.GA15414@lists.us.dell.com> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) Message-Id: Date: Sat, 30 Oct 2004 11:48:16 +1000 X-archive-position: 11169 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Matt Domsch wrote: > If dev->dev_addr is zero, then the memcpy() never takes place, and the Huh? You mean dev->addr_len? Surely the caller has to know what the address length is to use this anyway, no? -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From herbert@gondor.apana.org.au Fri Oct 29 18:51:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 18:51:30 -0700 (PDT) Received: from arnor.apana.org.au (mail@arnor.apana.org.au [203.14.152.115]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9U1pNP6023493 for ; Fri, 29 Oct 2004 18:51:24 -0700 Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail) by arnor.apana.org.au with esmtp (Exim 3.35 #1 (Debian)) id 1CNiOV-00019Y-00; Sat, 30 Oct 2004 11:51:03 +1000 Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian)) id 1CNiOT-0008GU-00; Sat, 30 Oct 2004 11:51:01 +1000 From: Herbert Xu To: Matt_Domsch@dell.com (Matt Domsch) Subject: Re: [PATCH 2.6] dev.c: clear SIOCGIFHWADDR buffer if !dev->addr_len Cc: netdev@oss.sgi.com Organization: Core In-Reply-To: <20041030013700.GA21540@lists.us.dell.com> X-Newsgroups: apana.lists.os.linux.netdev User-Agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) Message-Id: Date: Sat, 30 Oct 2004 11:51:01 +1000 X-archive-position: 11170 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: herbert@gondor.apana.org.au Precedence: bulk X-list: netdev Matt Domsch wrote: > > s/dev_addr/addr_len in the comments above, that's the field we care > about being non-zero. This still doesn't make sense. What if dev->addr_len is less than the size of the buffer? The caller has to know what the length is anyway. BTW, the ioctl interface is obsolete. Please use the rtnetlink interface where dev->addr_len can be read properly. -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt From mdomsch@lists.us.dell.com Fri Oct 29 20:10:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 20:10:07 -0700 (PDT) Received: from lists.us.dell.com (linux.us.dell.com [143.166.224.162]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9U39x36025720 for ; Fri, 29 Oct 2004 20:10:00 -0700 Received: from lists.us.dell.com (localhost.localdomain [127.0.0.1]) by lists.us.dell.com (8.12.10/8.12.10/Dell.IT.3.31.03) with ESMTP id i9U39aMU025480; Fri, 29 Oct 2004 22:09:36 -0500 Received: (from mdomsch@localhost) by lists.us.dell.com (8.12.10/8.12.10/Submit) id i9U39aXF025478; Fri, 29 Oct 2004 22:09:36 -0500 Date: Fri, 29 Oct 2004 22:09:36 -0500 From: Matt Domsch To: Herbert Xu Cc: netdev@oss.sgi.com Subject: Re: [PATCH 2.6] dev.c: clear SIOCGIFHWADDR buffer if !dev->addr_len Message-ID: <20041030030936.GA25102@lists.us.dell.com> References: <20041030013700.GA21540@lists.us.dell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-archive-position: 11171 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Matt_Domsch@dell.com Precedence: bulk X-list: netdev On Sat, Oct 30, 2004 at 11:51:01AM +1000, Herbert Xu wrote: > > s/dev_addr/addr_len in the comments above, that's the field we care > > about being non-zero. > > This still doesn't make sense. What if dev->addr_len is less than the > size of the buffer? The caller has to know what the length is anyway. Ahh, indeed. net-snmp has hard-coded the number 6 or uses the definition of IFHWADDRLEN (from include/linux/if.h, a copy of which is in /usr/include/linux/if.h of course) in several places for this. > BTW, the ioctl interface is obsolete. Please use the rtnetlink > interface where dev->addr_len can be read properly. More than I wanted to do tonight, but will investigate. Thanks, Matt -- Matt Domsch Sr. Software Engineer, Lead Engineer Dell Linux Solutions linux.dell.com & www.dell.com/linux Linux on Dell mailing lists @ http://lists.us.dell.com From johnpol@2ka.mipt.ru Fri Oct 29 22:03:32 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 22:03:37 -0700 (PDT) Received: from mailer.campus.mipt.ru (mailer.campus.mipt.ru [194.85.82.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9U53ULC031905 for ; Fri, 29 Oct 2004 22:03:31 -0700 Received: from ffke-campus-gw.mipt.ru (2ka [194.85.82.65]) by mailer.campus.mipt.ru (8.13.1/8.13.1) with ESMTP id i9U53UN5024739; Sat, 30 Oct 2004 09:03:30 +0400 Received: from zanzibar.2ka.mipt.ru (zanzibar.2ka.mipt.ru [194.85.82.77]) by ffke-campus-gw.mipt.ru (8.12.11/8.12.11) with SMTP id i9U53G8b003332; Sat, 30 Oct 2004 09:03:16 +0400 Date: Sat, 30 Oct 2004 09:20:36 +0400 From: Evgeniy Polyakov To: James Morris Cc: netdev@oss.sgi.com, Subject: Re: Asynchronous crypto layer. Message-ID: <20041030092036.4f954d89@zanzibar.2ka.mipt.ru> In-Reply-To: References: Reply-To: johnpol@2ka.mipt.ru Organization: MIPT X-Mailer: Sylpheed-Claws 0.9.12b (GTK+ 1.2.10; i386-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11173 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: johnpol@2ka.mipt.ru Precedence: bulk X-list: netdev On Fri, 29 Oct 2004 13:46:04 -0400 (EDT) James Morris wrote: > On Fri, 29 Oct 2004, James Morris wrote: > > > On Fri, 29 Oct 2004, Evgeniy Polyakov wrote: > > > > > I'm pleased to announce asynchronous crypto layer for Linux kernel 2.6. > > > > Also, please consider EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL. I'm not insisting, but why? > > - James > -- > James Morris > > Evgeniy Polyakov Only failure makes us experts. -- Theo de Raadt From johnpol@2ka.mipt.ru Fri Oct 29 22:02:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 22:02:45 -0700 (PDT) Received: from mailer.campus.mipt.ru (mailer.campus.mipt.ru [194.85.82.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9U52X5Q031819 for ; Fri, 29 Oct 2004 22:02:34 -0700 Received: from ffke-campus-gw.mipt.ru (2ka [194.85.82.65]) by mailer.campus.mipt.ru (8.13.1/8.13.1) with ESMTP id i9U52Tmb024650; Sat, 30 Oct 2004 09:02:29 +0400 Received: from zanzibar.2ka.mipt.ru (zanzibar.2ka.mipt.ru [194.85.82.77]) by ffke-campus-gw.mipt.ru (8.12.11/8.12.11) with SMTP id i9U52EeX001559; Sat, 30 Oct 2004 09:02:14 +0400 Date: Sat, 30 Oct 2004 09:19:32 +0400 From: Evgeniy Polyakov To: James Morris Cc: netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. Message-ID: <20041030091932.6a74bdae@zanzibar.2ka.mipt.ru> In-Reply-To: References: <1099030958.4944.148.camel@uganda> Reply-To: johnpol@2ka.mipt.ru Organization: MIPT X-Mailer: Sylpheed-Claws 0.9.12b (GTK+ 1.2.10; i386-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Sat__30_Oct_2004_09_19_32_+0400_=lr9kbHw/ulSvHkd" X-archive-position: 11172 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: johnpol@2ka.mipt.ru Precedence: bulk X-list: netdev This is a multi-part message in MIME format. --Multipart=_Sat__30_Oct_2004_09_19_32_+0400_=lr9kbHw/ulSvHkd Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 29 Oct 2004 13:44:24 -0400 (EDT) James Morris wrote: > On Fri, 29 Oct 2004, Evgeniy Polyakov wrote: > > > I'm pleased to announce asynchronous crypto layer for Linux kernel 2.6. > > Could you please resend as a patch against the latest bk snapshot? > > i.e. output of 'diff -purN tree-a tree-b' > Attached following patches: Kconfig.connector.patch Kconfig.crypto.patch Makefile.connector.patch Makefile.crypto.patch acrypto.patch connector.patch Any other files are examples and do not included here. > > - James > -- > James Morris > > > > _______________________________________________ > > Subscription: http://lists.logix.cz/mailman/listinfo/cryptoapi > List archive: http://lists.logix.cz/pipermail/cryptoapi Evgeniy Polyakov Only failure makes us experts. -- Theo de Raadt --Multipart=_Sat__30_Oct_2004_09_19_32_+0400_=lr9kbHw/ulSvHkd Content-Type: application/octet-stream; name="connector.patch" Content-Disposition: attachment; filename="connector.patch" Content-Transfer-Encoding: base64 ZGlmZiAtTnJ1IC90bXAvZW1wdHkvS2NvbmZpZyBsaW51eC0yLjYvZHJpdmVycy9jb25uZWN0b3Iv S2NvbmZpZwotLS0gL3RtcC9lbXB0eS9LY29uZmlnCTE5NzAtMDEtMDEgMDM6MDA6MDAuMDAwMDAw MDAwICswMzAwCisrKyBsaW51eC0yLjYvZHJpdmVycy9jb25uZWN0b3IvS2NvbmZpZwkyMDA0LTA5 LTI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TItPmxlbikKKwkJcmV0dXJuIDA7 CisKKwlpZiAoKG0xLT5pZHhfbm90aWZ5X251bSArIG0xLT52YWxfbm90aWZ5X251bSkqc2l6ZW9m KCpyZXExKSAhPSBtMS0+bGVuKSB7CisJCXByaW50ayhLRVJOX0VSUiAiTm90aWZ5IGVudHJ5W2lk eF9udW09JXgsIHZhbF9udW09JXgsIGxlbj0ldV0gY29udGFpbnMgZ2FyYmFnZS4gUmVtb3Zpbmcu XG4iLCAKKwkJCQltMS0+aWR4X25vdGlmeV9udW0sIG0xLT52YWxfbm90aWZ5X251bSwgbTEtPmxl bik7CisJCXJldHVybiAxOworCX0KKworCXJlcTEgPSAoc3RydWN0IGNuX25vdGlmeV9yZXEgKilt MS0+ZGF0YTsKKwlyZXEyID0gKHN0cnVjdCBjbl9ub3RpZnlfcmVxICopbTItPmRhdGE7CisJCisJ Zm9yIChpPTA7IGk8bTEtPmlkeF9ub3RpZnlfbnVtOyArK2kpIHsKKwkJaWYgKG1lbWNtcChyZXEx LCByZXEyLCBzaXplb2YoKnJlcTEpKSkKKwkJCXJldHVybiAwOworCisJCXJlcTErKzsKKwkJcmVx MisrOworCX0KKworCWZvciAoaT0wOyBpPG0xLT52YWxfbm90aWZ5X251bTsgKytpKSB7CisJCWlm IChtZW1jbXAocmVxMSwgcmVxMiwgc2l6ZW9mKCpyZXExKSkpCisJCQlyZXR1cm4gMDsKKworCQly ZXExKys7CisJCXJlcTIrKzsKKwl9CisKKwlyZXR1cm4gMTsKK30KKworc3RhdGljIHZvaWQgY25f Y2FsbGJhY2sodm9pZCAqIGRhdGEpCit7CisJc3RydWN0IGNuX21zZyAqbXNnID0gKHN0cnVjdCBj bl9tc2cgKilkYXRhOworCXN0cnVjdCBjbl9jdGxfbXNnICpjdGw7CisJc3RydWN0IGNuX2N0bF9l bnRyeSAqZW50OworCXUzMiBzaXplOworIAorCWlmIChtc2ctPmxlbiA8IHNpemVvZigqY3RsKSkg eworCQlwcmludGsoS0VSTl9FUlIgI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lbCgmZW50LT5ub3RpZnlfZW50 cnkpOworCQkJCWtmcmVlKGVudCk7CisJCQl9CisJCX0KKwkJc3Bpbl91bmxvY2soJm5vdGlmeV9s b2NrKTsKKworCQlyZXR1cm47CisJfQorCisJc2l6ZSArPSBzaXplb2YoKmVudCk7CisKKwllbnQg PSBrbWFsbG9jKHNpemUsIEdGUF9BVE9NSUMpOworCWlmICghZW50KSB7CisJCXByaW50ayhLRVJO X0VSUiAiRmFpbGVkIHRvIGFsbG9jYXRlICVkIGJ5dGVzIGZvciBuZXcgbm90aWZ5IGVudHJ5Llxu Iiwgc2l6ZSk7CisJCXJldHVybjsKKwl9CisKKwltZW1zZXQoZW50LCAwLCBzaXplKTsKKworCWVu dC0+bXNnID0gKHN0cnVjdCBjbl9jdGxfbXNnICopKGVudCArIDEpOworCisJbWVtY3B5KGVudC0+ bXNnLCBjdGwsIHNpemUgLSBzaXplb2YoKmVudCkpOworCisJc3Bpbl9sb2NrKCZub3RpZnlfbG9j ayk7CisJbGlzdF9hZGQoJmVudC0+bm90aWZ5X2VudHJ5LCAmbm90aWZ5X2xpc3QpOworCXNwaW5f dW5sb2NrKCZub3RpZnlfbG9jayk7CisKKwl7CisJCWludCBpOworCQlzdHJ1Y3QgY25fbm90aWZ5 X3JlcSAqcmVxOworCQorCQlwcmludGsoIk5vdGlmeSBncm91cCAleCBmb3IgaWR4OiAiLCBjdGwt Pmdyb3VwKTsKKworCQlyZXEgPSAoc3RydWN0IGNuX25vdGlmeV9yZXEgKiljdGwtPmRhdGE7CisJ CWZvciAoaT0wOyBpPGN0bC0+aWR4X25vdGlmeV9udW07ICsraSwgKytyZXEpIHsKKwkJCXByaW50 aygiJXUtJXUgIiwgcmVxLT5maXJzdCwgcmVxLT5maXJzdCtyZXEtPnJhbmdlLTEpOworCQl9CisJ CQorCQlwcmludGsoIlxuTm90aWZ5IGdyb3VwICV4IGZvciB2YWw6ICIsIGN0bC0+Z3JvdXApOwor CisJCWZvciAoaT0wOyBpPGN0b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9jdGxfbXNnCit7CisJX191MzIJCQlpZHhfbm90aWZ5X251bTsKKwlfX3Uz MgkJCXZhbF9ub3RpZnlfbnVtOworCV9fdTMyCQkJZ3JvdXA7CisJX191MzIJCQlsZW47CisJX191 OAkJCWRhdGFbMF07Cit9OworCisjaWZkZWYgX19LRVJORUxfXworCisjaW5jbHVkZSA8bmV0L3Nv Y2suaD4KKworc3RydWN0IGNuX2N0bF9lbnRyeQoreworCXN0cnVjdCBsaXN0X2hlYWQJbm90aWZ5 X2VudHJ5OworCXN0cnVjdCBjbl9jdGxfbXNnCSptc2c7Cit9OworCitzdHJ1Y3QgY25fZGV2Cit7 CisJc3RydWN0IGNiX2lkIAkJaWQ7CisKKwl1MzIJCQlzZXEsIGdyb3VwczsKKwlzdHJ1Y3Qgc29j ayAJCSpubHM7CisJdm9pZCAJCQkoKmlucHV0KShzdHJ1Y3Qgc29jayAqc2ssIGludCBsZW4pOwor CisJc3RydWN0IGNuX3F1ZXVlX2RldgkqY2JkZXY7Cit9OworCitpbnQgY25fYWRkX2NhbGxiYWNr KHN0cnVjdCBjYl9pZCAqLCBjaGFyICosIHZvaWQgKCogY2FsbGJhY2spKHZvaWQgKikpOwordm9p ZCBjbl9kZWxfY2FsbGJhY2soc3RydWN0IGNiX2lkICopOwordm9pZCBjbl9uZXRsaW5rX3NlbmQo c3RydWN0IGNuX21zZyAqLCB1MzIpOworCisjZW5kaWYgLyogX19LRVJORUxfXyAqLworI2VuZGlm IC8qIF9fQ09OTkVDVE9SX0ggKi8K --Multipart=_Sat__30_Oct_2004_09_19_32_+0400_=lr9kbHw/ulSvHkd Content-Type: application/octet-stream; name="Kconfig.connector.patch" Content-Disposition: attachment; filename="Kconfig.connector.patch" Content-Transfer-Encoding: base64 LS0tIGxpbnV4LTIuNi9kcml2ZXJzL0tjb25maWcub3JpZwkyMDA0LTA5LTI2IDEzOjM0OjQ4LjAw MDAwMDAwMCArMDQwMAorKysgbGludXgtMi42L2RyaXZlcnMvS2NvbmZpZwkyMDA0LTA5LTI2IDEz OjM0OjU3LjAwMDAwMDAwMCArMDQwMApAQCAtNDQsNiArNDQsOCBAQAogCiBzb3VyY2UgImRyaXZl cnMvdzEvS2NvbmZpZyIKIAorc291cmNlICJkcml2ZXJzL2Nvbm5lY3Rvci9LY29uZmlnIgorCiBz b3VyY2UgImRyaXZlcnMvbWlzYy9LY29uZmlnIgogCiBzb3VyY2UgImRyaXZlcnMvbWVkaWEvS2Nv bmZpZyIKCg== --Multipart=_Sat__30_Oct_2004_09_19_32_+0400_=lr9kbHw/ulSvHkd Content-Type: application/octet-stream; name="Kconfig.crypto.patch" Content-Disposition: attachment; filename="Kconfig.crypto.patch" Content-Transfer-Encoding: base64 LS0tIGxpbnV4LTIuNi9kcml2ZXJzL0tjb25maWcubm9jcnlwdG8JMjAwNC0xMC0zMCAwOTowNTo1 Mi4wMDAwMDAwMDAgKzA0MDAKKysrIGxpbnV4LTIuNi9kcml2ZXJzL0tjb25maWcJMjAwNC0xMC0z MCAwOTowNjoxMS4wMDAwMDAwMDAgKzA0MDAKQEAgLTQyLDYgKzQyLDggQEAKIAogc291cmNlICJk cml2ZXJzL2kyYy9LY29uZmlnIgogCitzb3VyY2UgImRyaXZlcnMvYWNyeXB0by9LY29uZmlnIgor CiBzb3VyY2UgImRyaXZlcnMvdzEvS2NvbmZpZyIKIAogc291cmNlICJkcml2ZXJzL2Nvbm5lY3Rv ci9LY29uZmlnIgo= --Multipart=_Sat__30_Oct_2004_09_19_32_+0400_=lr9kbHw/ulSvHkd Content-Type: application/octet-stream; name="Makefile.connector.patch" Content-Disposition: attachment; filename="Makefile.connector.patch" Content-Transfer-Encoding: base64 LS0tIGxpbnV4LTIuNi9kcml2ZXJzL01ha2VmaWxlLm9yaWcJMjAwNC0wOS0yNSAyMzo0NzowOC4w MDAwMDAwMDAgKzA0MDAKKysrIGxpbnV4LTIuNi9kcml2ZXJzL01ha2VmaWxlCTIwMDQtMDktMjYg MTM6MzQ6MjUuMDAwMDAwMDAwICswNDAwCkBAIC00NCw2ICs0NCw3IEBACiBvYmotJChDT05GSUdf STJPKQkJKz0gbWVzc2FnZS8KIG9iai0kKENPTkZJR19JMkMpCQkrPSBpMmMvCiBvYmotJChDT05G SUdfVzEpCQkrPSB3MS8KK29iai0kKENPTkZJR19DT05ORUNUT1IpCSs9IGNvbm5lY3Rvci8KIG9i ai0kKENPTkZJR19QSE9ORSkJCSs9IHRlbGVwaG9ueS8KIG9iai0kKENPTkZJR19NRCkJCSs9IG1k Lwogb2JqLSQoQ09ORklHX0JUKQkJKz0gYmx1ZXRvb3RoLwoK --Multipart=_Sat__30_Oct_2004_09_19_32_+0400_=lr9kbHw/ulSvHkd Content-Type: application/octet-stream; name="Makefile.crypto.patch" Content-Disposition: attachment; filename="Makefile.crypto.patch" Content-Transfer-Encoding: base64 LS0tIGxpbnV4LTIuNi9kcml2ZXJzL01ha2VmaWxlLm5vY3J5cHRvCTIwMDQtMTAtMzAgMDk6MDU6 MDIuMDAwMDAwMDAwICswNDAwCisrKyBsaW51eC0yLjYvZHJpdmVycy9NYWtlZmlsZQkyMDA0LTEw LTMwIDA5OjA1OjMxLjAwMDAwMDAwMCArMDQwMApAQCAtNDksNSArNDksNiBAQAogb2JqLSQoQ09O RklHX0dBTUVQT1JUKQkJKz0gaW5wdXQvZ2FtZXBvcnQvCiBvYmotJChDT05GSUdfSTJPKQkJKz0g bWVzc2FnZS8KIG9iai0kKENPTkZJR19JMkMpCQkrPSBpMmMvCitvYmotJChDT05GSUdfQUNSWVBU TykJCSs9IGFjcnlwdG8vCiBvYmotJChDT05GSUdfVzEpCQkrPSB3MS8KIG9iai0kKENPTkZJR19D T05ORUNUT1IpCQkrPSBjb25uZWN0b3IvCg== --Multipart=_Sat__30_Oct_2004_09_19_32_+0400_=lr9kbHw/ulSvHkd Content-Type: application/octet-stream; name="acrypto.patch" Content-Disposition: attachment; filename="acrypto.patch" Content-Transfer-Encoding: base64 ZGlmZiAtTnJ1IC90bXAvZW1wdHkvTWF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UzMl90b19jcHUoKihjb25zdCB1MzIgKikoeCkpCisjZGVmaW5l IHUzMl9vdXQodG8sIGZyb20pICgqKHUzMiAqKSh0bykgPSBjcHVfdG9fbGUzMihmcm9tKSkKKwor c3RhdGljIHU4IHBvd190YWJbMjU2XTsKK3N0YXRpYyB1OCBsb2dfdGFiWzI1Nl07CitzdGF0aWMg dTggc2J4X3RhYlsyNTZdOworc3RhdGljIHU4IGlzYl90YWJbMjU2XTsKK3N0YXRpYyB1MzIgcmNv X3RhYlsxMF07CitzdGF0aWMgdTMyIGZ0X3RhYls0XVsyNTZdOworc3RhdGljIHUzMiBpdF90YWJb NF1bMjU2XTsKKworc3RhdGljIHUzMiBmbF90YWJbNF1bMjU2XTsKK3N0YXRpYyB1MzIgaWxfdGFi WzRdWzI1Nl07CisKK3N0YXRpYyBpbmxpbmUgdTgKK2ZfbXVsdCAodTggYSwgdTggYikKK3sKKwl1 OCBhYSA9IGxvZ190YWJbYV0sIGNjID0gYWEgKyBsb2dfdGFiW2JdOworCisJcmV0dXJuIHBvd190 YWJbY2MgKyAoY2MgPCBhYSA/IDEgOiAwKV07Cit9CisKKyNkZWZpbmUgZmZfbXVsdChhLGIpICAg IChhICYmIGIgPyBmX211bHQoYSwgYikgOiAwKQorCisjZGVmaW5lIGZfcm4oYm8sIGJpLCBuLCBr KQkJCQkJXAorICAgIGJvW25dID0gIGZ0X3RhYlswXVtieXRlKGJpW25dLDApXSBeCQkJCVwKKyAg ICAgICAgICAgICBmdF90YWJbMV1bYnl0ZShiaVsobiArIDEpICYgM10sMSldIF4JCVwKKyAgICAg ICAgICAgICBmdF90YWJbMl1bYnl0ZShiaVsobiArIDIpICYgM10sMildIF4JCVwKKyAgICAgICAg ICAgICBmdF90YWJbM11bYnl0ZShiaVsobiArIDMpICYgM10sMyldIF4gKihrICsgbikKKworI2Rl ZmluZSBpX3JuKGJvLCBiaSwgbiwgaykJCQkJCVwKKyAgICBib1tuXSA9ICBpdF90YWJbMF1bYnl0 ZShiaVtuXSwwKV0gXgkJCQlcCisgICAgICAgICAgICAgaXRfdGFiWzFdW2J5dGUoYmlbKG4gKyAz KSAmIDNdLDEpXSBeCQlcCisgICAgICAgICAgICAgaXRfdGFiWzJdW2J5dGUoYmlbKG4gKyAyKSAm IDNdLDIpXSBeCQlcCisgICAgICAgICAgICAgaXRfdGFiWzNdW2J5dGUoYmlbKG4gKyAxKSAmIDNd LDMpXSBeICooayArIG4pCisKKyNkZWZpbmUgbHNfYm94KHgpCQkJCVwKKyAgICAoIGZsX3RhYlsw XVtieXRlKHgsIDApXSBeCQkJXAorICAgICAgZmxfdGFiWzFdW2J5dGUoeCwgMSldIF4JCQlcCisg ICAgICBmbF90YWJbMl1bYnl0ZSh4LCAyKV0gXgkJCVwKKyAgICAgIGZsX3RhYlszXVtieXRlKHgs IDMpXSApCisKKyNkZWZpbmUgZl9ybChibywgYmksIG4sIGspCQkJCQlcCisgICAgYm9bbl0gPSAg ZmxfdGFiWzBdW2J5dGUoYmlbbl0sMCldIF4JCQkJXAorICAgICAgICAgICAgIGZsX3RhYlsxXVti eXRlKGJpWyhuICsgMSkgJiAzXSwxKV0gXgkJXAorICAgICAgICAgICAgIGZsX3RhYlsyXVtieXRl KGJpWyhuICsgMikgJiAzXSwyKV0gXgkJXAorICAgICAgICAgICAgIGZsX3RhYlszXVtieXRlKGJp WyhuICsgMykgJiAzXSwzKV0gXiAqKGsgKyBuKQorCisjZGVmaW5lIGlfcmwoYm8sIGJpLCBuLCBr KQkJCQkJXAorICAgIGJvW25dID0gIGlsX3RhYlswXVtieXRlKGJpW25dLDApXSBeCQkJCVwKKyAg ICAgICAgICAgICBpbF90YWJbMV1bYnl0ZShiaVsobiArIDMpICYgM10sMSldIF4JCVwKKyAgICAg ICAgICAgICBpbF90YWJbMl1bYnl0ZShiaVsobiArIDIpICYgM10sMildIF4JCVwKKyAgICAgICAg ICAgICBpbF90YWJbM11bYnl0ZShiaVsobiArIDEpICYgM10sMyldIF4gKihrICsgbikKKworc3Rh dGljIHZvaWQKK2dlbl90YWJzICh2b2lkKQoreworCXUzMiBpLCB0OworCXU4IHAsIHE7CisKKwkv KiBsb2cgYW5kIHBvd2VyIHRhYmxlcyBmb3IgR0YoMioqOCkgZmluaXRlIGZpZWxkIHdpdGgKKwkg ICAweDAxMWIgYXMgbW9kdWxhciBwb2x5bm9taWFsIC0gdGhlIHNpbXBsZXN0IHBybWl0aXZlCisJ ICAgcm9vdCBpcyAweDAzLCB1c2VkIGhlcmUgdG8gZ2VuZXJhdGUgdGhlIHRhYmxlcyAqLworCisJ Zm9yIChpID0gMCwgcCA9IDE7IGkgPCAyNTY7ICsraSkgeworCQlwb3dfdGFiW2ldID0gKHU4KSBw OworCQlsb2dfdGFiW3BdID0gKHU4KSBpOworCisJCXAgXj0gKHAgPDwgMSkgXiAocCAmIDB4ODAg PyAweDAxYiA6IDApOworCX0KKworCWxvZ190YWJbMV0gPSAwOworCisJZm9yIChpID0gMCwgcCA9 IDE7IGkgPCAxMDsgKytpKSB7CisJCXJjb190YWJbaV0gPSBwOworCisJCXAgPSAocCA8PCAxKSBe IChwICYgMHg4MCA/IDB4MDFiIDogMCk7CisJfQorCisJZm9yIChpID0gMDsgaSA8IDI1NjsgKytp KSB7CisJCXAgPSAoaSA/IHBvd190YWJbMjU1IC0gbG9nX3RhYltpXV0gOiAwKTsKKwkJcSA9ICgo cCA+PiA3KSB8IChwIDw8IDEpKSBeICgocCA+PiA2KSB8IChwIDw8IDIpKTsKKwkJcCBePSAweDYz IF4gcSBeICgocSA+PiA2KSB8IChxIDw8IDIpKTsKKwkJc2J4X3RhYltpXSA9IHA7CisJCWlzYl90 YWJbcF0gPSAodTgpIGk7CisJfQorCisJZm9yIChpID0gMDsgaSA8IDI1NjsgKytpKSB7CisJCXAg PSBzYnhfdGFiW2ldOworCisJCXQgPSBwOworCQlmbF90YWJbMF1baV0gPSB0OworCQlmbF90YWJb MV1baV0gPSByb3RsICh0LCA4KTsKKwkJZmxfdGFiWzJdW2ldID0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94KHgpOyAgICAgICAgXAorICAgIHYgICA9IHN0YXJfeCh1KTsgICAg ICAgIFwKKyAgICB3ICAgPSBzdGFyX3godik7ICAgICAgICBcCisgICAgdCAgID0gdyBeICh4KTsg ICAgICAgICAgXAorICAgKHkpICA9IHUgXiB2IF4gdzsgICAgICAgIFwKKyAgICh5KSBePSByb3Ry KHUgXiB0LCAgOCkgXiBcCisgICAgICAgICAgcm90cih2IF4gdCwgMTYpIF4gXAorICAgICAgICAg IHJvdHIodCwyNCkKKworLyogaW5pdGlhbGlzZSB0aGUga2V5IHNjaGVkdWxlIGZyb20gdGhlIHVz ZXIgc3VwcGxpZWQga2V5ICovCisKKyNkZWZpbmUgbG9vcDQoaSkgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBcCit7ICAgdCA9IHJvdHIodCwgIDgpOyB0ID0gbHNfYm94KHQpIF4g cmNvX3RhYltpXTsgICAgXAorICAgIHQgXj0gRV9LRVlbNCAqIGldOyAgICAgRV9LRVlbNCAqIGkg KyA0XSA9IHQ7ICAgIFwKKyAgICB0IF49IEVfS0VZWzQgKiBpICsgMV07IEVfS0VZWzQgKiBpICsg NV0gPSB0OyAgICBcCisgICAgdCBePSBFX0tFWVs0ICogaSArIDJdOyBFX0tFWVs0ICogaSArIDZd ID0gdDsgICAgXAorICAgIHQgXj0gRV9LRVlbNCAqIGkgKyAzXTsgRV9LRVlbNCAqIGkgKyA3XSA9 IHQ7ICAgIFwKK30KKworI2RlZmluZSBsb29wNihpKSAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIFwKK3sgICB0ID0gcm90cih0LCAgOCk7IHQgPSBsc19ib3godCkgXiByY29fdGFi W2ldOyAgICBcCisgICAgdCBePSBFX0tFWVs2ICogaV07ICAgICBFX0tFWVs2ICogaSArIDZdID0g dDsgICAgXAorICAgIHQgXj0gRV9LRVlbNiAqIGkgKyAxXTsgRV9LRVlbNiAqIGkgKyA3XSA9IHQ7 ICAgIFwKKyAgICB0IF49IEVfS0VZWzYgKiBpICsgMl07IEVfS0VZWzYgKiBpICsgOF0gPSB0OyAg ICBcCisgICAgdCBePSBFX0tFWVs2ICogaSArIDNdOyBFX0tFWVs2ICogaSArIDldID0gdDsgICAg XAorICAgIHQgXj0gRV9LRVlbNiAqIGkgKyA0XTsgRV9LRVlbNiAqIGkgKyAxMF0gPSB0OyAgIFwK KyAgICB0IF49IEVfS0VZWzYgKiBpICsgNV07IEVfS0VZWzYgKiBpICsgMTFdID0gdDsgICBcCit9 CisKKyNkZWZpbmUgbG9vcDgoaSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBc Cit7ICAgdCA9IHJvdHIodCwgIDgpOyA7IHQgPSBsc19ib3godCkgXiByY29fdGFiW2ldOyAgXAor ICAgIHQgXj0gRV9LRVlbOCAqIGldOyAgICAgRV9LRVlbOCAqIGkgKyA4XSA9IHQ7ICAgIFwKKyAg ICB0IF49IEVfS0VZWzggKiBpICsgMV07IEVfS0VZWzggKiBpICsgOV0gPSB0OyAgICBcCisgICAg dCBePSBFX0tFWVs4ICogaSArIDJdOyBFX0tFWVs4ICogaSArIDEwXSA9IHQ7ICAgXAorICAgIHQg Xj0gRV9LRVlbOCAqIGkgKyAzXTsgRV9LRVlbOCAqIGkgKyAxMV0gPSB0OyAgIFwKKyAgICB0ICA9 IEVfS0VZWzggKiBpICsgNF0gXiBsc19ib3godCk7ICAgIFwKKyAgICBFX0tFWVs4ICogaSArIDEy XSA9IHQ7ICAgICAgICAgICAgICAgIFwKKyAgICB0IF49IEVfS0VZWzggKiBpICsgNV07IEVfS0VZ WzggKiBpICsgMTNdID0gdDsgICBcCisgICAgdCBePSBFX0tFWVs4ICogaSArIDZdOyBFX0tFWVs4 ICogaSArIDE0XSA9IHQ7ICAgXAorICAgIHQgXj0gRV9LRVlbOCAqIGkgKyA3XTsgRV9LRVlbOCAq IGkgKyAxNV0gPSB0OyAgIFwKK30KKworc3RhdGljIGludAorYWVzX3NldF9rZXkodm9pZCAq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V0KSwgIitEIihvdXRwdXQpCisJ CSAgICAgIDogImQiKGNvbnRyb2xfd29yZCksICJiIihrZXkpLCAiYyIoY291bnQpLCAiYSIoaXYp KTsKK30KKworc3RhdGljIGlubGluZSB2b2lkIHBhZGxvY2tfeGNyeXB0X29mYih1OCAqaW5wdXQs IHU4ICpvdXRwdXQsIHU4ICprZXksCisJCQkJICAgICAgdTggKml2LCB2b2lkICpjb250cm9sX3dv cmQsIHUzMiBjb3VudCkKK3sKKwlhc20gdm9sYXRpbGUgKCJwdXNoZmw7IHBvcGZsIik7CQkvKiBl bmZvcmNlIGtleSByZWxvYWQuICovCisJYXNtIHZvbGF0aWxlICgiLmJ5dGUgMHhmMywweDBmLDB4 YTcsMHhlOCIJLyogcmVwIHhjcnlwdG9mYiAqLworCQkgICAgICA6ICI9bSIoKm91dHB1dCksICIr UyIoaW5wdXQpLCAiK0QiKG91dHB1dCkKKwkJICAgICAgOiAiZCIoY29udHJvbF93b3JkKSwgImIi KGtleSksICJjIihjb3VudCksICJhIihpdikpOworfQorCit2b2lkICpjcnlwdG9fYWxpZ25lZF9r bWFsbG9jKHNpemVfdCBzaXplLCBpbnQgbW9kZSwgc2l6ZV90IGFsaWdubWVudCwgdm9pZCAqKmlu ZGV4KQoreworICAgICAgIGNoYXIgKnB0cjsKKworICAgICAgIHB0ciA9IGttYWxsb2Moc2l6ZSAr IGFsaWdubWVudCwgbW9kZSk7CisgICAgICAgKmluZGV4ID0gcHRyOworICAgICAgIGlmIChhbGln bm1lbnQgPiAxICYmICgobG9uZylwdHIgJiAoYWxpZ25tZW50IC0gMSkpKSB7CisgICAgICAgICAg ICAgICBwdHIgKz0gYWxpZ25tZW50IC0gKChsb25nKXB0ciAmIChhbGlnbm1lbnQgLSAxKSk7Cisg ICAgICAgfQorCisgICAgICAgcmV0dXJuIHB0cjsKK30KKwordm9pZCBwYWRsb2NrX2FsaWduZXIo dTggKm91dF9hcmcsIGNvbnN0IHU4ICppbl9hcmcsIGNvbnN0IHU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Ymxpc2hlZCBieSB0aGUgRnJlZQor ICogU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNpb24gMiBvZiB0aGUgTGljZW5zZSwg b3IgKGF0IHlvdXIgb3B0aW9uKSAKKyAqIGFueSBsYXRlciB2ZXJzaW9uLgorICoKKyAqLworCisj aWZuZGVmIF9DUllQVE9fUEFETE9DS19ICisjZGVmaW5lIF9DUllQVE9fUEFETE9DS19ICisKKyNk ZWZpbmUgQUVTX01JTl9LRVlfU0laRQkxNgkvKiBpbiB1OCB1bml0cyAqLworI2RlZmluZSBBRVNf TUFYX0tFWV9TSVpFCTMyCS8qIGRpdHRvICovCisjZGVmaW5lIEFFU19CTE9DS19TSVpFCQkxNgkv KiBkaXR0byAqLworI2RlZmluZSBBRVNfRVhURU5ERURfS0VZX1NJWkUJNjQJLyogaW4gdTMyIHVu aXRzICovCisjZGVmaW5lIEFFU19FWFRFTkRFRF9LRVlfU0laRV9CCShBRVNfRVhURU5ERURfS0VZ X1NJWkUgKiBzaXplb2YodTMyKSkKKworc3RydWN0IGFlc19jdHggeworCXUzMiBlX2RhdGFbQUVT X0VYVEVOREVEX0tFWV9TSVpFKzRdOworCXUzMiBkX2RhdGFbQUVTX0VYVEVOREVEX0tFWV9TSVpF KzRdOworCWludCBrZXlfbGVuZ3RoOworCXUzMiAqRTsKKwl1MzIgKkQ7Cit9OworCisjZGVmaW5l IEVfS0VZIGN0eC0+RQorI2RlZmluZSBEX0tFWSBjdHgtPkQKKworCisvKiBDb250cm9sIHdvcmQu ICovCisjaWYgMQordW5pb24gY3dvcmQgeworCXUzMiBjd29yZFs0XTsKKwlzdHJ1Y3QgeworCQlp bnQgcm91bmRzOjQ7CisJCWludCBhbGdvOjM7CisJCWludCBrZXlnZW46MTsKKwkJaW50IGludGVy bToxOworCQlpbnQgZW5jZGVjOjE7CisJCWludCBrc2l6ZToyOworCX0gYjsKK307CisjZWxzZQor dW5pb24gY3dvcmQgeworCXUzMiBjd29yZFs0XTsKKwlzdHJ1Y3QgeworCQl1bnNpZ25lZAlyb3Vu ZHM6NCwKKwkJCQlhbGdvOjMsCisJCQkJa2V5Z2VuOjEsCisJCQkJaW50ZXJtOjEsCisJCQkJZW5j ZGVjOjEsCisJCQkJa3NpemU6MjsKKwl9IGI7Cit9OworI2VuZGlmCisKKyNkZWZpbmUgUEZYCSJw YWRsb2NrOiAiCisKK3ZvaWQgcGFkbG9ja19hbGlnbmVyKHU4ICpvdXRfYXJnLCBjb25zdCB1OCAq aW5fYXJnLCBjb25zdCB1OCAqaXZfYXJnLAorCQkgICAgIHZvaWQgKmtleSwgdW5pb24gY3dvcmQg KmN3b3JkLAorCQkgICAgIHNpemVfdCBuYnl0ZXMsIHNpemVfdCBibG9ja3NpemUsCisJCSAgICAg aW50IGVuY2RlYywgaW50IG1vZGUpOworCitpbnQgcGFkbG9ja19pbml0X2Flcyh2b2lkKTsKK3Zv aWQgcGFkbG9ja19maW5pX2Flcyh2b2lkKTsKKworI2VuZGlmCS8qIF9DUllQVE9fUEFETE9DS19I ICovCg== --Multipart=_Sat__30_Oct_2004_09_19_32_+0400_=lr9kbHw/ulSvHkd-- From bunk@stusta.de Fri Oct 29 22:38:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 22:38:59 -0700 (PDT) Received: from mailout.stusta.mhn.de (emailhub.stusta.mhn.de [141.84.69.5]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9U5creQ000889 for ; Fri, 29 Oct 2004 22:38:53 -0700 Received: (qmail 22380 invoked from network); 30 Oct 2004 05:38:31 -0000 Received: from r063144.stusta.swh.mhn.de (10.150.63.144) by mailout.stusta.mhn.de with SMTP; 30 Oct 2004 05:38:31 -0000 Received: by r063144.stusta.swh.mhn.de (Postfix, from userid 1000) id AF318BBAAF; Sat, 30 Oct 2004 07:38:00 +0200 (CEST) Date: Sat, 30 Oct 2004 07:38:00 +0200 From: Adrian Bunk To: Margit Schubert-While Cc: prism54-private@prism54.org, netdev@oss.sgi.com, jgarzik@pobox.com, linux-net@vger.kernel.org Subject: [2.6 patch] prism54: small prismcompat cleanup Message-ID: <20041030053800.GB4374@stusta.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6+20040907i X-archive-position: 11174 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@stusta.de Precedence: bulk X-list: netdev - the FW_LOADER is already guaranteed through the Kconfig file - prism54_synchronize_irq is also #define'd to synchronize_irq in prismcompat24.h, so there's no need for it diffstat output: drivers/net/wireless/prism54/islpci_dev.c | 2 +- drivers/net/wireless/prism54/prismcompat.h | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) Signed-off-by: Adrian Bunk --- linux-2.6.10-rc1-mm2-full/drivers/net/wireless/prism54/prismcompat.h.old 2004-10-30 07:21:59.000000000 +0200 +++ linux-2.6.10-rc1-mm2-full/drivers/net/wireless/prism54/prismcompat.h 2004-10-30 07:22:40.000000000 +0200 @@ -34,12 +34,6 @@ #include #include -#if !defined(CONFIG_FW_LOADER) && !defined(CONFIG_FW_LOADER_MODULE) -#error Firmware Loading is not configured in the kernel ! -#endif - -#define prism54_synchronize_irq(irq) synchronize_irq(irq) - #define PRISM_FW_PDEV &priv->pdev->dev #endif /* _PRISM_COMPAT_H */ --- linux-2.6.10-rc1-mm2-full/drivers/net/wireless/prism54/islpci_dev.c.old2 2004-10-30 07:23:07.000000000 +0200 +++ linux-2.6.10-rc1-mm2-full/drivers/net/wireless/prism54/islpci_dev.c 2004-10-30 07:23:19.000000000 +0200 @@ -420,7 +420,7 @@ * currently in progress by emptying the TX and RX queues. */ /* wait until interrupts have finished executing on other CPUs */ - prism54_synchronize_irq(priv->pdev->irq); + synchronize_irq(priv->pdev->irq); reg = readl(device_base + ISL38XX_CTRL_STAT_REG); reg &= ~(ISL38XX_CTRL_STAT_RESET | ISL38XX_CTRL_STAT_RAMBOOT); From nakasima@kumin.ne.jp Fri Oct 29 22:40:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 22:41:05 -0700 (PDT) Received: from emerald.kumin.ne.jp (leviathan.kumin.ne.jp [211.9.65.12]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9U5ewSB001261 for ; Fri, 29 Oct 2004 22:40:59 -0700 Received: (qmail 786 invoked from network); 30 Oct 2004 14:40:35 +0900 Received: from unknown (HELO prism.kumin.ne.jp) (202.55.204.160) by emerald.kumin.ne.jp with SMTP; 30 Oct 2004 14:40:35 +0900 Message-Id: <200410300540.AA00005@prism.kumin.ne.jp> Date: Sat, 30 Oct 2004 14:40:28 +0900 To: linux-kernel@vger.kernel.org Cc: Jeff Garzik , Netdev , Terje Kvernes Subject: Re: linux-2.6.9 eepro100 warning From: Seiichi Nakashima In-Reply-To: References: MIME-Version: 1.0 X-Mailer: AL-Mail32 Version 1.13 Content-Type: text/plain; charset=us-ascii X-archive-position: 11175 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: nakasima@kumin.ne.jp Precedence: bulk X-list: netdev Thanks. I update a kernel's parameter from eepro100 to PRO/100. linux-2.6.9 work fine. == > > [ ... ] > >> If there are e100 problems, report them to the maintainers so we can >> get them resolved ASAP... > > I got a very nice mail from Jesse Brandeburg saying pretty much the > same thing... so, I've pushed kernels for around 75 boxen over to > e100 today, from eepro100. I'm not _quite_ sure when I'll have the > chance to boot them all, but when they do, and if they have > problems, I'll report back. > >> INTEL PRO/100 ETHERNET SUPPORT >> P: John Ronciak >> M: john.ronciak@intel.com >> P: Ganesh Venkatesan >> M: ganesh.venkatesan@intel.com >> P: Scott Feldman >> M: scott.feldman@intel.com >> W: http://sourceforge.net/projects/e1000/ >> S: Supported >> >> (and of course netdev@oss.sgi.com as well) > > ack. > >-- >Terje - still waiting to test hotswap SATA. =) > > -------------------------------- Seiichi Nakashima Email nakasima@kumin.ne.jp -------------------------------- From bunk@stusta.de Fri Oct 29 22:46:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 22:46:36 -0700 (PDT) Received: from mailout.stusta.mhn.de (mailout.stusta.mhn.de [141.84.69.5]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9U5kSBx001722 for ; Fri, 29 Oct 2004 22:46:29 -0700 Received: (qmail 22943 invoked from network); 30 Oct 2004 05:46:07 -0000 Received: from r063144.stusta.swh.mhn.de (10.150.63.144) by mailout.stusta.mhn.de with SMTP; 30 Oct 2004 05:46:07 -0000 Received: by r063144.stusta.swh.mhn.de (Postfix, from userid 1000) id 966A9BBAAF; Sat, 30 Oct 2004 07:45:35 +0200 (CEST) Date: Sat, 30 Oct 2004 07:45:34 +0200 From: Adrian Bunk To: Margit Schubert-While Cc: prism54-private@prism54.org, netdev@oss.sgi.com, jgarzik@pobox.com, linux-net@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [2.6 patch] prism54: make some functions static Message-ID: <20041030054534.GC4374@stusta.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6+20040907i X-archive-position: 11176 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: bunk@stusta.de Precedence: bulk X-list: netdev the patch below makes some functions in prism54 that are only required locally static. As a side effect it turned out that the mgt_unlatch_all function was completely unused, and I've therefore removed it. I also considered moving display_buffer as static inline into islpci_mgt.h, but I wasn't 100% sure and therefore left it. diffstat output: drivers/net/wireless/prism54/isl_ioctl.c | 32 +++++++++++------- drivers/net/wireless/prism54/isl_ioctl.h | 5 -- drivers/net/wireless/prism54/islpci_dev.c | 5 +- drivers/net/wireless/prism54/islpci_dev.h | 2 - drivers/net/wireless/prism54/islpci_mgt.c | 2 + drivers/net/wireless/prism54/oid_mgt.c | 38 +--------------------- drivers/net/wireless/prism54/oid_mgt.h | 4 -- 7 files changed, 28 insertions(+), 60 deletions(-) Signed-off-by: Adrian Bunk --- linux-2.6.10-rc1-mm2-full/drivers/net/wireless/prism54/isl_ioctl.h.old 2004-10-30 06:52:18.000000000 +0200 +++ linux-2.6.10-rc1-mm2-full/drivers/net/wireless/prism54/isl_ioctl.h 2004-10-30 07:02:58.000000000 +0200 @@ -41,15 +41,10 @@ void prism54_wpa_ie_init(islpci_private *priv); void prism54_wpa_ie_clean(islpci_private *priv); -void prism54_wpa_ie_add(islpci_private *priv, u8 *bssid, - u8 *wpa_ie, size_t wpa_ie_len); -size_t prism54_wpa_ie_get(islpci_private *priv, u8 *bssid, u8 *wpa_ie); int prism54_set_mac_address(struct net_device *, void *); int prism54_ioctl(struct net_device *, struct ifreq *, int); -int prism54_set_wpa(struct net_device *, struct iw_request_info *, - __u32 *, char *); extern const struct iw_handler_def prism54_handler_def; --- linux-2.6.10-rc1-mm2-full/drivers/net/wireless/prism54/isl_ioctl.c.old 2004-10-30 06:43:10.000000000 +0200 +++ linux-2.6.10-rc1-mm2-full/drivers/net/wireless/prism54/isl_ioctl.c 2004-10-30 07:11:26.000000000 +0200 @@ -36,6 +36,14 @@ #include /* New driver API */ + +static void prism54_wpa_ie_add(islpci_private *priv, u8 *bssid, + u8 *wpa_ie, size_t wpa_ie_len); +static size_t prism54_wpa_ie_get(islpci_private *priv, u8 *bssid, u8 *wpa_ie); +static int prism54_set_wpa(struct net_device *, struct iw_request_info *, + __u32 *, char *); + + /** * prism54_mib_mode_helper - MIB change mode helper function * @mib: the &struct islpci_mib object to modify @@ -47,7 +55,7 @@ * Wireless API modes to Device firmware modes. It also checks for * correct valid Linux wireless modes. */ -int +static int prism54_mib_mode_helper(islpci_private *priv, u32 iw_mode) { u32 config = INL_CONFIG_MANUALRUN; @@ -647,7 +655,7 @@ return current_ev; } -int +static int prism54_get_scan(struct net_device *ndev, struct iw_request_info *info, struct iw_point *dwrq, char *extra) { @@ -1582,7 +1590,7 @@ #define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5] #define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x" -void +static void prism54_wpa_ie_add(islpci_private *priv, u8 *bssid, u8 *wpa_ie, size_t wpa_ie_len) { @@ -1649,7 +1657,7 @@ up(&priv->wpa_sem); } -size_t +static size_t prism54_wpa_ie_get(islpci_private *priv, u8 *bssid, u8 *wpa_ie) { struct list_head *ptr; @@ -1736,7 +1744,7 @@ } } -int +static int prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid, char *data) { @@ -2314,7 +2322,7 @@ return ret; } -int +static int prism54_set_wpa(struct net_device *ndev, struct iw_request_info *info, __u32 * uwrq, char *extra) { @@ -2358,7 +2366,7 @@ return 0; } -int +static int prism54_get_wpa(struct net_device *ndev, struct iw_request_info *info, __u32 * uwrq, char *extra) { @@ -2367,7 +2375,7 @@ return 0; } -int +static int prism54_set_prismhdr(struct net_device *ndev, struct iw_request_info *info, __u32 * uwrq, char *extra) { @@ -2380,7 +2388,7 @@ return 0; } -int +static int prism54_get_prismhdr(struct net_device *ndev, struct iw_request_info *info, __u32 * uwrq, char *extra) { @@ -2389,7 +2397,7 @@ return 0; } -int +static int prism54_debug_oid(struct net_device *ndev, struct iw_request_info *info, __u32 * uwrq, char *extra) { @@ -2401,7 +2409,7 @@ return 0; } -int +static int prism54_debug_get_oid(struct net_device *ndev, struct iw_request_info *info, struct iw_point *data, char *extra) { @@ -2437,7 +2445,7 @@ return ret; } -int +static int prism54_debug_set_oid(struct net_device *ndev, struct iw_request_info *info, struct iw_point *data, char *extra) { --- linux-2.6.10-rc1-mm2-full/drivers/net/wireless/prism54/islpci_dev.h.old 2004-10-30 06:58:23.000000000 +0200 +++ linux-2.6.10-rc1-mm2-full/drivers/net/wireless/prism54/islpci_dev.h 2004-10-30 07:04:02.000000000 +0200 @@ -211,8 +211,6 @@ priv->device_base); } -struct net_device_stats *islpci_statistics(struct net_device *); - int islpci_free_memory(islpci_private *); struct net_device *islpci_setup(struct pci_dev *); #endif /* _ISLPCI_DEV_H */ --- linux-2.6.10-rc1-mm2-full/drivers/net/wireless/prism54/islpci_dev.c.old 2004-10-30 06:46:08.000000000 +0200 +++ linux-2.6.10-rc1-mm2-full/drivers/net/wireless/prism54/islpci_dev.c 2004-10-30 07:12:13.000000000 +0200 @@ -44,6 +44,7 @@ static int prism54_bring_down(islpci_private *); static int islpci_alloc_memory(islpci_private *); +static struct net_device_stats *islpci_statistics(struct net_device *); /* Temporary dummy MAC address to use until firmware is loaded. * The idea there is that some tools (such as nameif) may query @@ -52,7 +53,7 @@ * Of course, this is not the final/real MAC address. It doesn't * matter, as you are suppose to be able to change it anytime via * ndev->set_mac_address. Jean II */ -const unsigned char dummy_mac[6] = { 0x00, 0x30, 0xB4, 0x00, 0x00, 0x00 }; +static const unsigned char dummy_mac[6] = { 0x00, 0x30, 0xB4, 0x00, 0x00, 0x00 }; static int isl_upload_firmware(islpci_private *priv) @@ -607,7 +608,7 @@ return rc; } -struct net_device_stats * +static struct net_device_stats * islpci_statistics(struct net_device *ndev) { islpci_private *priv = netdev_priv(ndev); --- linux-2.6.10-rc1-mm2-full/drivers/net/wireless/prism54/islpci_mgt.c.old 2004-10-30 06:46:45.000000000 +0200 +++ linux-2.6.10-rc1-mm2-full/drivers/net/wireless/prism54/islpci_mgt.c 2004-10-30 07:15:39.000000000 +0200 @@ -44,6 +44,7 @@ /****************************************************************************** Driver general functions ******************************************************************************/ +#if VERBOSE > SHOW_ERROR_MESSAGES void display_buffer(char *buffer, int length) { @@ -58,6 +59,7 @@ printk("\n"); } +#endif /***************************************************************************** Queue handling for management frames --- linux-2.6.10-rc1-mm2-full/drivers/net/wireless/prism54/oid_mgt.c.old 2004-10-30 06:47:10.000000000 +0200 +++ linux-2.6.10-rc1-mm2-full/drivers/net/wireless/prism54/oid_mgt.c 2004-10-30 06:48:08.000000000 +0200 @@ -24,8 +24,8 @@ #include "isl_ioctl.h" /* to convert between channel and freq */ -const int frequency_list_bg[] = { 2412, 2417, 2422, 2427, 2432, 2437, 2442, - 2447, 2452, 2457, 2462, 2467, 2472, 2484 +static const int frequency_list_bg[] = { 2412, 2417, 2422, 2427, 2432, + 2437, 2442, 2447, 2452, 2457, 2462, 2467, 2472, 2484 }; int @@ -723,40 +723,6 @@ return rvalue; } -/* The following OIDs need to be "unlatched": - * - * MEDIUMLIMIT,BEACONPERIOD,DTIMPERIOD,ATIMWINDOW,LISTENINTERVAL - * FREQUENCY,EXTENDEDRATES. - * - * The way to do this is to set ESSID. Note though that they may get - * unlatch before though by setting another OID. */ -void -mgt_unlatch_all(islpci_private *priv) -{ - u32 u; - int rvalue = 0; - - if (islpci_get_state(priv) < PRV_STATE_INIT) - return; - - u = DOT11_OID_SSID; - rvalue = mgt_commit_list(priv, &u, 1); - /* Necessary if in MANUAL RUN mode? */ -#if 0 - u = OID_INL_MODE; - rvalue |= mgt_commit_list(priv, &u, 1); - - u = DOT11_OID_MLMEAUTOLEVEL; - rvalue |= mgt_commit_list(priv, &u, 1); - - u = OID_INL_MODE; - rvalue |= mgt_commit_list(priv, &u, 1); -#endif - - if (rvalue) - printk(KERN_DEBUG "%s: Unlatching OIDs failed\n", priv->ndev->name); -} - /* This will tell you if you are allowed to answer a mlme(ex) request .*/ int --- linux-2.6.10-rc1-mm2-full/drivers/net/wireless/prism54/oid_mgt.h.old 2004-10-30 07:05:55.000000000 +0200 +++ linux-2.6.10-rc1-mm2-full/drivers/net/wireless/prism54/oid_mgt.h 2004-10-30 07:42:02.000000000 +0200 @@ -28,8 +28,7 @@ void mgt_clean(islpci_private *); -/* I don't know where to put these 3 */ -extern const int frequency_list_bg[]; +/* I don't know where to put these 2 */ extern const int frequency_list_a[]; int channel_of_freq(int); @@ -49,7 +48,6 @@ void mgt_get(islpci_private *, enum oid_num_t, void *); int mgt_commit(islpci_private *); -void mgt_unlatch_all(islpci_private *); int mgt_mlme_answer(islpci_private *); From SRS0+e1ab05c2624a0ef7e2e3+433+infradead.org+hch@phoenix.srs.infradead.org Fri Oct 29 23:17:23 2004 Received: with ECARTIS (v1.0.0; list netdev); Fri, 29 Oct 2004 23:17:27 -0700 (PDT) Received: from phoenix.infradead.org (phoenix.infradead.org [81.187.226.98]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9U6HMfX003134 for ; Fri, 29 Oct 2004 23:17:22 -0700 Received: from hch by phoenix.infradead.org with local (Exim 4.42 #1 (Red Hat Linux)) id 1CNmXl-0005wm-Ha; Sat, 30 Oct 2004 07:16:53 +0100 Date: Sat, 30 Oct 2004 07:16:53 +0100 From: Christoph Hellwig To: Sam Leffler Cc: johnpol@2ka.mipt.ru, netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. Message-ID: <20041030061653.GA22838@infradead.org> References: <1099030958.4944.148.camel@uganda> <4182A05F.1080505@errno.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4182A05F.1080505@errno.com> User-Agent: Mutt/1.4.1i X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html X-archive-position: 11177 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: netdev On Fri, Oct 29, 2004 at 12:56:15PM -0700, Sam Leffler wrote: > I realize this suggestion will be met with the usual boo's and catcalls > but it'd also be nice if all systems could share a common user-level api > so, for example, you could just _use_ the support in openssl that's been > around for several years. Does FreeBSD have a less broken user API than OpenBSD? The OpenBSD API had been implemented for Linux and had been rejected dueto execessive bogusness. From johnpol@2ka.mipt.ru Sat Oct 30 01:17:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 01:17:53 -0700 (PDT) Received: from mailer.campus.mipt.ru (mailer.campus.mipt.ru [194.85.82.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9U8Hk1K009224 for ; Sat, 30 Oct 2004 01:17:46 -0700 Received: from ffke-campus-gw.mipt.ru (2ka [194.85.82.65]) by mailer.campus.mipt.ru (8.13.1/8.13.1) with ESMTP id i9U8HiGb019952; Sat, 30 Oct 2004 12:17:44 +0400 Received: from zanzibar.2ka.mipt.ru (zanzibar.2ka.mipt.ru [194.85.82.77]) by ffke-campus-gw.mipt.ru (8.12.11/8.12.11) with SMTP id i9U8HT8X022592; Sat, 30 Oct 2004 12:17:29 +0400 Date: Sat, 30 Oct 2004 12:34:49 +0400 From: Evgeniy Polyakov To: johnpol@2ka.mipt.ru Cc: James Morris , netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. Message-ID: <20041030123449.5568d03f@zanzibar.2ka.mipt.ru> In-Reply-To: <20041030091932.6a74bdae@zanzibar.2ka.mipt.ru> References: <1099030958.4944.148.camel@uganda> <20041030091932.6a74bdae@zanzibar.2ka.mipt.ru> Reply-To: johnpol@2ka.mipt.ru Organization: MIPT X-Mailer: Sylpheed-Claws 0.9.12b (GTK+ 1.2.10; i386-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11178 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: johnpol@2ka.mipt.ru Precedence: bulk X-list: netdev On Sat, 30 Oct 2004 09:19:32 +0400 Evgeniy Polyakov wrote: > On Fri, 29 Oct 2004 13:44:24 -0400 (EDT) > James Morris wrote: > > > On Fri, 29 Oct 2004, Evgeniy Polyakov wrote: > > > > > I'm pleased to announce asynchronous crypto layer for Linux kernel 2.6. > > > > Could you please resend as a patch against the latest bk snapshot? > > > > i.e. output of 'diff -purN tree-a tree-b' > > > > Attached following patches: > > Kconfig.connector.patch > Kconfig.crypto.patch > Makefile.connector.patch > Makefile.crypto.patch > acrypto.patch > connector.patch > > Any other files are examples and do not included here. Forget Kconfig for acrypto. > > > > - James > > -- > > James Morris > > Evgeniy Polyakov Only failure makes us experts. -- Theo de Raadt From johnpol@2ka.mipt.ru Sat Oct 30 01:19:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 01:19:40 -0700 (PDT) Received: from mailer.campus.mipt.ru (mailer.campus.mipt.ru [194.85.82.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9U8JXj5009360 for ; Sat, 30 Oct 2004 01:19:34 -0700 Received: from ffke-campus-gw.mipt.ru (2ka [194.85.82.65]) by mailer.campus.mipt.ru (8.13.1/8.13.1) with ESMTP id i9U8JWRs020188; Sat, 30 Oct 2004 12:19:32 +0400 Received: from zanzibar.2ka.mipt.ru (zanzibar.2ka.mipt.ru [194.85.82.77]) by ffke-campus-gw.mipt.ru (8.12.11/8.12.11) with SMTP id i9U8JIv4023944; Sat, 30 Oct 2004 12:19:19 +0400 Date: Sat, 30 Oct 2004 12:36:38 +0400 From: Evgeniy Polyakov To: johnpol@2ka.mipt.ru Cc: James Morris , cryptoapi@lists.logix.cz, netdev@oss.sgi.com Subject: Re: Asynchronous crypto layer. Message-ID: <20041030123638.619f4de4@zanzibar.2ka.mipt.ru> In-Reply-To: <20041030123449.5568d03f@zanzibar.2ka.mipt.ru> References: <1099030958.4944.148.camel@uganda> <20041030091932.6a74bdae@zanzibar.2ka.mipt.ru> <20041030123449.5568d03f@zanzibar.2ka.mipt.ru> Reply-To: johnpol@2ka.mipt.ru Organization: MIPT X-Mailer: Sylpheed-Claws 0.9.12b (GTK+ 1.2.10; i386-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Sat__30_Oct_2004_12_36_38_+0400_aA=4JPOYlB.TYYl=" X-archive-position: 11179 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: johnpol@2ka.mipt.ru Precedence: bulk X-list: netdev This is a multi-part message in MIME format. --Multipart=_Sat__30_Oct_2004_12_36_38_+0400_aA=4JPOYlB.TYYl= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Now attached needed file. --- /dev/null 2004-09-17 14:58:06.000000000 +0400 +++ linux-2.6/drivers/acrypto/Kconfig 2004-10-30 12:32:53.000000000 +0400 @@ -0,0 +1,15 @@ +menu "Asynchronous crypto layer" + +config ACRYPTO + tristate "Asynchronous crypto layer" + depends on CONNECTOR && CRYPTO + ---help--- + Asynchronous crypto layer. + +config SIMPLE_LB + tristate "Simple load balancer" + depends on ACRYPTO + ---help--- + Simple load balancer. +endmenu + Evgeniy Polyakov Only failure makes us experts. -- Theo de Raadt --Multipart=_Sat__30_Oct_2004_12_36_38_+0400_aA=4JPOYlB.TYYl= Content-Type: application/octet-stream; name="acrypto.patch.addon" Content-Disposition: attachment; filename="acrypto.patch.addon" Content-Transfer-Encoding: base64 LS0tIC9kZXYvbnVsbAkyMDA0LTA5LTE3IDE0OjU4OjA2LjAwMDAwMDAwMCArMDQwMAorKysgbGlu dXgtMi42L2RyaXZlcnMvYWNyeXB0by9LY29uZmlnCTIwMDQtMTAtMzAgMTI6MzI6NTMuMDAwMDAw MDAwICswNDAwCkBAIC0wLDAgKzEsMTUgQEAKK21lbnUgIkFzeW5jaHJvbm91cyBjcnlwdG8gbGF5 ZXIiCisKK2NvbmZpZyBBQ1JZUFRPCisJdHJpc3RhdGUgIkFzeW5jaHJvbm91cyBjcnlwdG8gbGF5 ZXIiCisJZGVwZW5kcyBvbiBDT05ORUNUT1IgJiYgQ1JZUFRPCisJLS0taGVscC0tLQorCQlBc3lu Y2hyb25vdXMgY3J5cHRvIGxheWVyLgorCitjb25maWcgU0lNUExFX0xCCisJdHJpc3RhdGUgIlNp bXBsZSBsb2FkIGJhbGFuY2VyIgorCWRlcGVuZHMgb24gQUNSWVBUTworCS0tLWhlbHAtLS0KKwkJ U2ltcGxlIGxvYWQgYmFsYW5jZXIuCitlbmRtZW51CisK --Multipart=_Sat__30_Oct_2004_12_36_38_+0400_aA=4JPOYlB.TYYl=-- From penberg@cs.helsinki.fi Sat Oct 30 02:51:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 02:51:27 -0700 (PDT) Received: from mail.cs.helsinki.fi (courier.cs.helsinki.fi [128.214.9.1]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9U9pLEs013542 for ; Sat, 30 Oct 2004 02:51:22 -0700 Received: from cs181096176.pp.htv.fi (cs181096176.pp.htv.fi [82.181.96.176]) (AUTH: LOGIN penberg, SSL: TLSv1/SSLv3,128bits,RC4-MD5) by mail.cs.helsinki.fi with esmtp; Sat, 30 Oct 2004 12:51:04 +0300 id 0007415A.41836408.000015EF Subject: Re: net: generic netdev_ioaddr From: Pekka Enberg To: Krzysztof Halasa Cc: Al Viro , davem@davemloft.net, netdev@oss.sgi.com, linux-kernel@vger.kernel.org In-Reply-To: References: <1099044244.9566.0.camel@localhost> <20041029131607.GU24336@parcelfarce.linux.theplanet.co.uk> <20041029193827.GV24336@parcelfarce.linux.theplanet.co.uk> Date: Sat, 30 Oct 2004 12:52:26 +0300 Message-Id: <1099129946.10961.9.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Mailer: Evolution 2.0.2 X-archive-position: 11180 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: penberg@cs.helsinki.fi Precedence: bulk X-list: netdev Hi, Al Viro writes: > > What uses ->base_addr from the data returned by SIOCGIFMAP? On Fri, 2004-10-29 at 23:13 +0200, Krzysztof Halasa wrote: > > ifconfig I think: [snip] > With this driver it happens to be MMIO address. > > I understand presenting this value to users might have some value: > it can help determine the physical port/card for a given netdev. > But it should be something like a description text set by the driver > (ie. containing PCI bus/device, or even ISA address for ISA non-PnP > card, possibly with other information). It seems that the user can also setup dev->base_addr with "netdev=" kernel parameter before a driver starts probing (for example drivers/net/appletalk/cops.c). Should we get rid of "netdev=" too and push preconfiguring down to the drivers that actually use it? Pekka From jgarzik@pobox.com Sat Oct 30 05:37:59 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 05:38:05 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UCbvPq020539 for ; Sat, 30 Oct 2004 05:37:58 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CNsUG-0006n6-KN; Sat, 30 Oct 2004 13:37:40 +0100 Message-ID: <41838B08.8070709@pobox.com> Date: Sat, 30 Oct 2004 08:37:28 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Christoph Hellwig CC: netdev@oss.sgi.com Subject: Re: [PATCH] unexport ei_tx_timeout References: <20041024131256.GC19567@lst.de> In-Reply-To: <20041024131256.GC19567@lst.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11181 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 Christoph Hellwig wrote: > not used by any module, and the API doesn't make sense as export either next time include a signed-off-by line. Also, the API _does_ make sense as an export, as it is a generic helper that can be plugged directly into the netdev->tx_timeout hook. However, I applied your patch due to the first argument -- no users. Jeff From manfred@colorfullife.com Sat Oct 30 05:53:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 05:53:54 -0700 (PDT) Received: from dbl.q-ag.de (dbl.q-ag.de [213.172.117.3]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UCrfM6021101 for ; Sat, 30 Oct 2004 05:53:43 -0700 Received: from dbl.q-ag.de (dbl [127.0.0.1]) by dbl.q-ag.de (8.12.3/8.12.3/Debian-6.6) with ESMTP id i9UCrASL026091; Sat, 30 Oct 2004 14:53:11 +0200 Received: from localhost (manfred@localhost) by dbl.q-ag.de (8.12.3/8.12.3/Debian-6.6) with ESMTP id i9UCr8ev026087; Sat, 30 Oct 2004 14:53:09 +0200 X-Authentication-Warning: dbl.q-ag.de: manfred owned process doing -bs Date: Sat, 30 Oct 2004 14:53:08 +0200 (CEST) From: Manfred Spraul X-X-Sender: manfred@dbl.q-ag.de To: jgarzik@pobox.com cc: marcelo.tosatti@cyclades.com, , Subject: [PATCH 2.4.28-rc1-bk3] forcedeth: Backport of gigabit ethernet support and media detection rewrite Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 11182 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: manfred@colorfullife.com Precedence: bulk X-list: netdev Backport of the 0.30 forcedeth driver to 2.4. It's a new backport, starting from the 2.6 tree. Changes that were applied to the 2.6 tree since the last backport: - lots of bugfixes. - completely rewritten PHY initialization and media detection - gigabit ethernet support - hardware checksuming support for nForce 250-Gb Differences between 2.6 and 2.4: - static msleep helper added. - invocations of synchronize_irq changed to take no parameters After applying this patch, the driver is nearly in sync with 2.6.10-rc1: The only additional differences are __iomem annotations and the use of netdev_priv. Signed-Off-By: --- 2.4/drivers/net/forcedeth.c 2004-10-17 16:23:05.672096642 +0200 +++ build-2.4/drivers/net/forcedeth.c 2004-10-17 16:17:35.653011008 +0200 @@ -10,8 +10,11 @@ * trademarks of NVIDIA Corporation in the United States and other * countries. * - * Copyright (C) 2003 Manfred Spraul + * Copyright (C) 2003,4 Manfred Spraul * Copyright (C) 2004 Andrew de Quincey (wol support) + * Copyright (C) 2004 Carl-Daniel Hailfinger (invalid MAC handling, insane + * IRQ rate fixes, bigendian fixes, cleanups, verification) + * Copyright (c) 2004 NVIDIA Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -60,15 +63,22 @@ * 0.19: 29 Nov 2003: Handle RxNoBuf, detect & handle invalid mac * addresses, really stop rx if already running * in nv_start_rx, clean up a bit. - * (C) Carl-Daniel Hailfinger * 0.20: 07 Dec 2003: alloc fixes * 0.21: 12 Jan 2004: additional alloc fix, nic polling fix. * 0.22: 19 Jan 2004: reprogram timer to a sane rate, avoid lockup - * on close. - * (C) Carl-Daniel Hailfinger, Manfred Spraul + * on close. * 0.23: 26 Jan 2004: various small cleanups * 0.24: 27 Feb 2004: make driver even less anonymous in backtraces * 0.25: 09 Mar 2004: wol support + * 0.26: 03 Jun 2004: netdriver specific annotation, sparse-related fixes + * 0.27: 19 Jun 2004: Gigabit support, new descriptor rings, + * added CK804/MCP04 device IDs, code fixes + * for registers, link status and other minor fixes. + * 0.28: 21 Jun 2004: Big cleanup, making driver mostly endian safe + * 0.29: 31 Aug 2004: Add backup timer for link change notification. + * 0.30: 25 Sep 2004: rx checksum support for nf 250 Gb. Add rx reset + * into nv_close, otherwise reenabling for wol can + * cause DMA to kfree'd memory. * * Known bugs: * We suspect that on some hardware no TX done interrupts are generated. @@ -80,9 +90,11 @@ * DEV_NEED_TIMERIRQ will not harm you on sane hardware, only generating a few * superfluous timer interrupts from the nic. */ -#define FORCEDETH_VERSION "0.25" +#define FORCEDETH_VERSION "0.30" +#define DRV_NAME "forcedeth" #include +#include #include #include #include @@ -113,16 +125,18 @@ * Hardware access: */ -#define DEV_NEED_LASTPACKET1 0x0001 -#define DEV_IRQMASK_1 0x0002 -#define DEV_IRQMASK_2 0x0004 -#define DEV_NEED_TIMERIRQ 0x0008 +#define DEV_NEED_LASTPACKET1 0x0001 /* set LASTPACKET1 in tx flags */ +#define DEV_IRQMASK_1 0x0002 /* use NVREG_IRQMASK_WANTED_1 for irq mask */ +#define DEV_IRQMASK_2 0x0004 /* use NVREG_IRQMASK_WANTED_2 for irq mask */ +#define DEV_NEED_TIMERIRQ 0x0008 /* set the timer irq flag in the irq mask */ +#define DEV_NEED_LINKTIMER 0x0010 /* poll link settings. Relies on the timer irq */ enum { NvRegIrqStatus = 0x000, #define NVREG_IRQSTAT_MIIEVENT 0x040 #define NVREG_IRQSTAT_MASK 0x1ff NvRegIrqMask = 0x004, +#define NVREG_IRQ_RX_ERROR 0x0001 #define NVREG_IRQ_RX 0x0002 #define NVREG_IRQ_RX_NOBUF 0x0004 #define NVREG_IRQ_TX_ERR 0x0008 @@ -132,7 +146,7 @@ enum { #define NVREG_IRQ_TX1 0x0100 #define NVREG_IRQMASK_WANTED_1 0x005f #define NVREG_IRQMASK_WANTED_2 0x0147 -#define NVREG_IRQ_UNKNOWN (~(NVREG_IRQ_RX|NVREG_IRQ_RX_NOBUF|NVREG_IRQ_TX_ERR|NVREG_IRQ_TX2|NVREG_IRQ_TIMER|NVREG_IRQ_LINK|NVREG_IRQ_TX1)) +#define NVREG_IRQ_UNKNOWN (~(NVREG_IRQ_RX_ERROR|NVREG_IRQ_RX|NVREG_IRQ_RX_NOBUF|NVREG_IRQ_TX_ERR|NVREG_IRQ_TX2|NVREG_IRQ_TIMER|NVREG_IRQ_LINK|NVREG_IRQ_TX1)) NvRegUnknownSetupReg6 = 0x008, #define NVREG_UNKSETUP6_VAL 3 @@ -159,7 +173,7 @@ enum { NvRegOffloadConfig = 0x90, #define NVREG_OFFLOAD_HOMEPHY 0x601 -#define NVREG_OFFLOAD_NORMAL 0x5ee +#define NVREG_OFFLOAD_NORMAL RX_NIC_BUFSIZE NvRegReceiverControl = 0x094, #define NVREG_RCVCTL_START 0x01 NvRegReceiverStatus = 0x98, @@ -168,6 +182,8 @@ enum { NvRegRandomSeed = 0x9c, #define NVREG_RNDSEED_MASK 0x00ff #define NVREG_RNDSEED_FORCE 0x7f00 +#define NVREG_RNDSEED_FORCE2 0x2d00 +#define NVREG_RNDSEED_FORCE3 0x7400 NvRegUnknownSetupReg1 = 0xA0, #define NVREG_UNKSETUP1_VAL 0x16070f @@ -181,6 +197,9 @@ enum { NvRegMulticastMaskA = 0xB8, NvRegMulticastMaskB = 0xBC, + NvRegPhyInterface = 0xC0, +#define PHY_RGMII 0x10000000 + NvRegTxRingPhysAddr = 0x100, NvRegRxRingPhysAddr = 0x104, NvRegRingSizes = 0x108, @@ -189,12 +208,12 @@ enum { NvRegUnknownTransmitterReg = 0x10c, NvRegLinkSpeed = 0x110, #define NVREG_LINKSPEED_FORCE 0x10000 -#define NVREG_LINKSPEED_10 10 +#define NVREG_LINKSPEED_10 1000 #define NVREG_LINKSPEED_100 100 -#define NVREG_LINKSPEED_1000 1000 +#define NVREG_LINKSPEED_1000 50 NvRegUnknownSetupReg5 = 0x130, #define NVREG_UNKSETUP5_BIT31 (1<<31) - NvRegUnknownSetupReg3 = 0x134, + NvRegUnknownSetupReg3 = 0x13c, #define NVREG_UNKSETUP3_VAL1 0x200010 NvRegTxRxControl = 0x144, #define NVREG_TXRXCTL_KICK 0x0001 @@ -202,6 +221,7 @@ enum { #define NVREG_TXRXCTL_BIT2 0x0004 #define NVREG_TXRXCTL_IDLE 0x0008 #define NVREG_TXRXCTL_RESET 0x0010 +#define NVREG_TXRXCTL_RXCHECK 0x0400 NvRegMIIStatus = 0x180, #define NVREG_MIISTAT_ERROR 0x0001 #define NVREG_MIISTAT_LINKCHANGE 0x0008 @@ -213,15 +233,15 @@ enum { NvRegAdapterControl = 0x188, #define NVREG_ADAPTCTL_START 0x02 #define NVREG_ADAPTCTL_LINKUP 0x04 -#define NVREG_ADAPTCTL_PHYVALID 0x4000 +#define NVREG_ADAPTCTL_PHYVALID 0x40000 #define NVREG_ADAPTCTL_RUNNING 0x100000 #define NVREG_ADAPTCTL_PHYSHIFT 24 NvRegMIISpeed = 0x18c, #define NVREG_MIISPEED_BIT8 (1<<8) #define NVREG_MIIDELAY 5 NvRegMIIControl = 0x190, -#define NVREG_MIICTL_INUSE 0x10000 -#define NVREG_MIICTL_WRITE 0x08000 +#define NVREG_MIICTL_INUSE 0x08000 +#define NVREG_MIICTL_WRITE 0x00400 #define NVREG_MIICTL_ADDRSHIFT 5 NvRegMIIData = 0x194, NvRegWakeUpFlags = 0x200, @@ -253,34 +273,67 @@ enum { #define NVREG_POWERSTATE_D3 0x0003 }; +/* Big endian: should work, but is untested */ struct ring_desc { u32 PacketBuffer; - u16 Length; - u16 Flags; + u32 FlagLen; }; -#define NV_TX_LASTPACKET (1<<0) -#define NV_TX_RETRYERROR (1<<3) -#define NV_TX_LASTPACKET1 (1<<8) -#define NV_TX_DEFERRED (1<<10) -#define NV_TX_CARRIERLOST (1<<11) -#define NV_TX_LATECOLLISION (1<<12) -#define NV_TX_UNDERFLOW (1<<13) -#define NV_TX_ERROR (1<<14) -#define NV_TX_VALID (1<<15) - -#define NV_RX_DESCRIPTORVALID (1<<0) -#define NV_RX_MISSEDFRAME (1<<1) -#define NV_RX_SUBSTRACT1 (1<<3) -#define NV_RX_ERROR1 (1<<7) -#define NV_RX_ERROR2 (1<<8) -#define NV_RX_ERROR3 (1<<9) -#define NV_RX_ERROR4 (1<<10) -#define NV_RX_CRCERR (1<<11) -#define NV_RX_OVERFLOW (1<<12) -#define NV_RX_FRAMINGERR (1<<13) -#define NV_RX_ERROR (1<<14) -#define NV_RX_AVAIL (1<<15) +#define FLAG_MASK_V1 0xffff0000 +#define FLAG_MASK_V2 0xffffc000 +#define LEN_MASK_V1 (0xffffffff ^ FLAG_MASK_V1) +#define LEN_MASK_V2 (0xffffffff ^ FLAG_MASK_V2) + +#define NV_TX_LASTPACKET (1<<16) +#define NV_TX_RETRYERROR (1<<19) +#define NV_TX_LASTPACKET1 (1<<24) +#define NV_TX_DEFERRED (1<<26) +#define NV_TX_CARRIERLOST (1<<27) +#define NV_TX_LATECOLLISION (1<<28) +#define NV_TX_UNDERFLOW (1<<29) +#define NV_TX_ERROR (1<<30) +#define NV_TX_VALID (1<<31) + +#define NV_TX2_LASTPACKET (1<<29) +#define NV_TX2_RETRYERROR (1<<18) +#define NV_TX2_LASTPACKET1 (1<<23) +#define NV_TX2_DEFERRED (1<<25) +#define NV_TX2_CARRIERLOST (1<<26) +#define NV_TX2_LATECOLLISION (1<<27) +#define NV_TX2_UNDERFLOW (1<<28) +/* error and valid are the same for both */ +#define NV_TX2_ERROR (1<<30) +#define NV_TX2_VALID (1<<31) + +#define NV_RX_DESCRIPTORVALID (1<<16) +#define NV_RX_MISSEDFRAME (1<<17) +#define NV_RX_SUBSTRACT1 (1<<18) +#define NV_RX_ERROR1 (1<<23) +#define NV_RX_ERROR2 (1<<24) +#define NV_RX_ERROR3 (1<<25) +#define NV_RX_ERROR4 (1<<26) +#define NV_RX_CRCERR (1<<27) +#define NV_RX_OVERFLOW (1<<28) +#define NV_RX_FRAMINGERR (1<<29) +#define NV_RX_ERROR (1<<30) +#define NV_RX_AVAIL (1<<31) + +#define NV_RX2_CHECKSUMMASK (0x1C000000) +#define NV_RX2_CHECKSUMOK1 (0x10000000) +#define NV_RX2_CHECKSUMOK2 (0x14000000) +#define NV_RX2_CHECKSUMOK3 (0x18000000) +#define NV_RX2_DESCRIPTORVALID (1<<29) +#define NV_RX2_SUBSTRACT1 (1<<25) +#define NV_RX2_ERROR1 (1<<18) +#define NV_RX2_ERROR2 (1<<19) +#define NV_RX2_ERROR3 (1<<20) +#define NV_RX2_ERROR4 (1<<21) +#define NV_RX2_CRCERR (1<<22) +#define NV_RX2_OVERFLOW (1<<23) +#define NV_RX2_FRAMINGERR (1<<24) +/* error and avail are the same for both */ +#define NV_RX2_ERROR (1<<30) +#define NV_RX2_AVAIL (1<<31) /* Miscelaneous hardware related defines: */ #define NV_PCI_REGSZ 0x270 @@ -306,28 +359,74 @@ struct ring_desc { /* General driver defaults */ #define NV_WATCHDOG_TIMEO (5*HZ) -#define DEFAULT_MTU 1500 /* also maximum supported, at least for now */ #define RX_RING 128 -#define TX_RING 16 -/* limited to 1 packet until we understand NV_TX_LASTPACKET */ -#define TX_LIMIT_STOP 10 -#define TX_LIMIT_START 5 +#define TX_RING 64 +/* + * If your nic mysteriously hangs then try to reduce the limits + * to 1/0: It might be required to set NV_TX_LASTPACKET in the + * last valid ring entry. But this would be impossible to + * implement - probably a disassembly error. + */ +#define TX_LIMIT_STOP 63 +#define TX_LIMIT_START 62 /* rx/tx mac addr + type + vlan + align + slack*/ -#define RX_NIC_BUFSIZE (DEFAULT_MTU + 64) +#define RX_NIC_BUFSIZE (ETH_DATA_LEN + 64) /* even more slack */ -#define RX_ALLOC_BUFSIZE (DEFAULT_MTU + 128) +#define RX_ALLOC_BUFSIZE (ETH_DATA_LEN + 128) #define OOM_REFILL (1+HZ/20) #define POLL_WAIT (1+HZ/100) +#define LINK_TIMEOUT (3*HZ) + +/* + * desc_ver values: + * This field has two purposes: + * - Newer nics uses a different ring layout. The layout is selected by + * comparing np->desc_ver with DESC_VER_xy. + * - It contains bits that are forced on when writing to NvRegTxRxControl. + */ +#define DESC_VER_1 0x0 +#define DESC_VER_2 (0x02100|NVREG_TXRXCTL_RXCHECK) + +/* PHY defines */ +#define PHY_OUI_MARVELL 0x5043 +#define PHY_OUI_CICADA 0x03f1 +#define PHYID1_OUI_MASK 0x03ff +#define PHYID1_OUI_SHFT 6 +#define PHYID2_OUI_MASK 0xfc00 +#define PHYID2_OUI_SHFT 10 +#define PHY_INIT1 0x0f000 +#define PHY_INIT2 0x0e00 +#define PHY_INIT3 0x01000 +#define PHY_INIT4 0x0200 +#define PHY_INIT5 0x0004 +#define PHY_INIT6 0x02000 +#define PHY_GIGABIT 0x0100 + +#define PHY_TIMEOUT 0x1 +#define PHY_ERROR 0x2 + +#define PHY_100 0x1 +#define PHY_1000 0x2 +#define PHY_HALF 0x100 + +/* FIXME: MII defines that should be added to */ +#define MII_1000BT_CR 0x09 +#define MII_1000BT_SR 0x0a +#define ADVERTISE_1000FULL 0x0200 +#define ADVERTISE_1000HALF 0x0100 +#define LPA_1000FULL 0x0800 +#define LPA_1000HALF 0x0400 + /* * SMP locking: * All hardware access under dev->priv->lock, except the performance * critical parts: * - rx is (pseudo-) lockless: it relies on the single-threading provided - * by the arch code for interrupts. + * by the arch code for interrupts. * - tx setup is lockless: it relies on dev->xmit_lock. Actual submission * needs dev->priv->lock :-( * - set_multicast_list: preparation lockless, relies on dev->xmit_lock. @@ -345,12 +444,15 @@ struct fe_priv { int duplex; int phyaddr; int wolenabled; + unsigned int phy_oui; + u16 gigabit; /* General data: RO fields */ dma_addr_t ring_addr; struct pci_dev *pci_dev; u32 orig_mac[2]; u32 irqmask; + u32 desc_ver; /* rx specific fields. * Locking: Within irq hander or disable_irq+spin_lock(&np->lock); @@ -363,6 +465,11 @@ struct fe_priv { struct timer_list oom_kick; struct timer_list nic_poll; + /* media detection workaround. + * Locking: Within irq hander or disable_irq+spin_lock(&np->lock); + */ + int need_linktimer; + unsigned long link_timeout; /* * tx specific fields. */ @@ -370,7 +477,7 @@ struct fe_priv { unsigned int next_tx, nic_tx; struct sk_buff *tx_skbuff[TX_RING]; dma_addr_t tx_dma[TX_RING]; - u16 tx_flags; + u32 tx_flags; }; /* @@ -395,6 +502,12 @@ static inline void pci_push(u8 * base) readl(base); } +static inline u32 nv_descr_getlength(struct ring_desc *prd, u32 v) +{ + return le32_to_cpu(prd->FlagLen) + & ((v == DESC_VER_1) ? LEN_MASK_V1 : LEN_MASK_V2); +} + static int reg_delay(struct net_device *dev, int offset, u32 mask, u32 target, int delay, int delaymax, const char *msg) { @@ -421,24 +534,18 @@ static int reg_delay(struct net_device * static int mii_rw(struct net_device *dev, int addr, int miireg, int value) { u8 *base = get_hwbase(dev); - int was_running; u32 reg; int retval; writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus); - was_running = 0; - reg = readl(base + NvRegAdapterControl); - if (reg & NVREG_ADAPTCTL_RUNNING) { - was_running = 1; - writel(reg & ~NVREG_ADAPTCTL_RUNNING, base + NvRegAdapterControl); - } + reg = readl(base + NvRegMIIControl); if (reg & NVREG_MIICTL_INUSE) { writel(NVREG_MIICTL_INUSE, base + NvRegMIIControl); udelay(NV_MIIBUSY_DELAY); } - reg = NVREG_MIICTL_INUSE | (addr << NVREG_MIICTL_ADDRSHIFT) | miireg; + reg = (addr << NVREG_MIICTL_ADDRSHIFT) | miireg; if (value != MII_READ) { writel(value, base + NvRegMIIData); reg |= NVREG_MIICTL_WRITE; @@ -460,19 +567,123 @@ static int mii_rw(struct net_device *dev dev->name, miireg, addr); retval = -1; } else { - /* FIXME: why is that required? */ - udelay(50); retval = readl(base + NvRegMIIData); dprintk(KERN_DEBUG "%s: mii_rw read from reg %d at PHY %d: 0x%x.\n", dev->name, miireg, addr, retval); } - if (was_running) { - reg = readl(base + NvRegAdapterControl); - writel(reg | NVREG_ADAPTCTL_RUNNING, base + NvRegAdapterControl); - } + return retval; } +static void msleep(unsigned long msecs) +{ + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout((HZ * msecs + 999) / 1000); +} + +static int phy_reset(struct net_device *dev) +{ + struct fe_priv *np = get_nvpriv(dev); + u32 miicontrol; + unsigned int tries = 0; + + miicontrol = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); + miicontrol |= BMCR_RESET; + if (mii_rw(dev, np->phyaddr, MII_BMCR, miicontrol)) { + return -1; + } + + /* wait for 500ms */ + msleep(500); + + /* must wait till reset is deasserted */ + while (miicontrol & BMCR_RESET) { + msleep(10); + miicontrol = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); + /* FIXME: 100 tries seem excessive */ + if (tries++ > 100) + return -1; + } + return 0; +} + +static int phy_init(struct net_device *dev) +{ + struct fe_priv *np = get_nvpriv(dev); + u8 *base = get_hwbase(dev); + u32 phyinterface, phy_reserved, mii_status, mii_control, mii_control_1000,reg; + + /* set advertise register */ + reg = mii_rw(dev, np->phyaddr, MII_ADVERTISE, MII_READ); + reg |= (ADVERTISE_10HALF|ADVERTISE_10FULL|ADVERTISE_100HALF|ADVERTISE_100FULL|0x800|0x400); + if (mii_rw(dev, np->phyaddr, MII_ADVERTISE, reg)) { + printk(KERN_INFO "%s: phy write to advertise failed.\n", pci_name(np->pci_dev)); + return PHY_ERROR; + } + + /* get phy interface type */ + phyinterface = readl(base + NvRegPhyInterface); + + /* see if gigabit phy */ + mii_status = mii_rw(dev, np->phyaddr, MII_BMSR, MII_READ); + if (mii_status & PHY_GIGABIT) { + np->gigabit = PHY_GIGABIT; + mii_control_1000 = mii_rw(dev, np->phyaddr, MII_1000BT_CR, MII_READ); + mii_control_1000 &= ~ADVERTISE_1000HALF; + if (phyinterface & PHY_RGMII) + mii_control_1000 |= ADVERTISE_1000FULL; + else + mii_control_1000 &= ~ADVERTISE_1000FULL; + + if (mii_rw(dev, np->phyaddr, MII_1000BT_CR, mii_control_1000)) { + printk(KERN_INFO "%s: phy init failed.\n", pci_name(np->pci_dev)); + return PHY_ERROR; + } + } + else + np->gigabit = 0; + + /* reset the phy */ + if (phy_reset(dev)) { + printk(KERN_INFO "%s: phy reset failed\n", pci_name(np->pci_dev)); + return PHY_ERROR; + } + + /* phy vendor specific configuration */ + if ((np->phy_oui == PHY_OUI_CICADA) && (phyinterface & PHY_RGMII) ) { + phy_reserved = mii_rw(dev, np->phyaddr, MII_RESV1, MII_READ); + phy_reserved &= ~(PHY_INIT1 | PHY_INIT2); + phy_reserved |= (PHY_INIT3 | PHY_INIT4); + if (mii_rw(dev, np->phyaddr, MII_RESV1, phy_reserved)) { + printk(KERN_INFO "%s: phy init failed.\n", pci_name(np->pci_dev)); + return PHY_ERROR; + } + phy_reserved = mii_rw(dev, np->phyaddr, MII_NCONFIG, MII_READ); + phy_reserved |= PHY_INIT5; + if (mii_rw(dev, np->phyaddr, MII_NCONFIG, phy_reserved)) { + printk(KERN_INFO "%s: phy init failed.\n", pci_name(np->pci_dev)); + return PHY_ERROR; + } + } + if (np->phy_oui == PHY_OUI_CICADA) { + phy_reserved = mii_rw(dev, np->phyaddr, MII_SREVISION, MII_READ); + phy_reserved |= PHY_INIT6; + if (mii_rw(dev, np->phyaddr, MII_SREVISION, phy_reserved)) { + printk(KERN_INFO "%s: phy init failed.\n", pci_name(np->pci_dev)); + return PHY_ERROR; + } + } + + /* restart auto negotiation */ + mii_control = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); + mii_control |= (BMCR_ANRESTART | BMCR_ANENABLE); + if (mii_rw(dev, np->phyaddr, MII_BMCR, mii_control)) { + return PHY_ERROR; + } + + return 0; +} + static void nv_start_rx(struct net_device *dev) { struct fe_priv *np = get_nvpriv(dev); @@ -487,6 +698,8 @@ static void nv_start_rx(struct net_devic writel(np->linkspeed, base + NvRegLinkSpeed); pci_push(base); writel(NVREG_RCVCTL_START, base + NvRegReceiverControl); + dprintk(KERN_DEBUG "%s: nv_start_rx to duplex %d, speed 0x%08x.\n", + dev->name, np->duplex, np->linkspeed); pci_push(base); } @@ -497,8 +710,8 @@ static void nv_stop_rx(struct net_device dprintk(KERN_DEBUG "%s: nv_stop_rx\n", dev->name); writel(0, base + NvRegReceiverControl); reg_delay(dev, NvRegReceiverStatus, NVREG_RCVSTAT_BUSY, 0, - NV_RXSTOP_DELAY1, NV_RXSTOP_DELAY1MAX, - KERN_INFO "nv_stop_rx: ReceiverStatus remained busy"); + NV_RXSTOP_DELAY1, NV_RXSTOP_DELAY1MAX, + KERN_INFO "nv_stop_rx: ReceiverStatus remained busy"); udelay(NV_RXSTOP_DELAY2); writel(0, base + NvRegLinkSpeed); @@ -520,8 +733,8 @@ static void nv_stop_tx(struct net_device dprintk(KERN_DEBUG "%s: nv_stop_tx\n", dev->name); writel(0, base + NvRegTransmitterControl); reg_delay(dev, NvRegTransmitterStatus, NVREG_XMITSTAT_BUSY, 0, - NV_TXSTOP_DELAY1, NV_TXSTOP_DELAY1MAX, - KERN_INFO "nv_stop_tx: TransmitterStatus remained busy"); + NV_TXSTOP_DELAY1, NV_TXSTOP_DELAY1MAX, + KERN_INFO "nv_stop_tx: TransmitterStatus remained busy"); udelay(NV_TXSTOP_DELAY2); writel(0, base + NvRegUnknownTransmitterReg); @@ -529,13 +742,14 @@ static void nv_stop_tx(struct net_device static void nv_txrx_reset(struct net_device *dev) { + struct fe_priv *np = get_nvpriv(dev); u8 *base = get_hwbase(dev); dprintk(KERN_DEBUG "%s: nv_txrx_reset\n", dev->name); - writel(NVREG_TXRXCTL_BIT2 | NVREG_TXRXCTL_RESET, base + NvRegTxRxControl); + writel(NVREG_TXRXCTL_BIT2 | NVREG_TXRXCTL_RESET | np->desc_ver, base + NvRegTxRxControl); pci_push(base); udelay(NV_TXRX_RESET_DELAY); - writel(NVREG_TXRXCTL_BIT2, base + NvRegTxRxControl); + writel(NVREG_TXRXCTL_BIT2 | np->desc_ver, base + NvRegTxRxControl); pci_push(base); } @@ -556,91 +770,50 @@ static struct net_device_stats *nv_get_s return &np->stats; } -static int nv_ethtool_ioctl(struct net_device *dev, void *useraddr) +static void nv_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { struct fe_priv *np = get_nvpriv(dev); - u8 *base = get_hwbase(dev); - u32 ethcmd; - - if (copy_from_user(ðcmd, useraddr, sizeof (ethcmd))) - return -EFAULT; - - switch (ethcmd) { - case ETHTOOL_GDRVINFO: - { - struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO }; - strcpy(info.driver, "forcedeth"); - strcpy(info.version, FORCEDETH_VERSION); - strcpy(info.bus_info, pci_name(np->pci_dev)); - if (copy_to_user(useraddr, &info, sizeof (info))) - return -EFAULT; - return 0; - } - case ETHTOOL_GLINK: - { - struct ethtool_value edata = { ETHTOOL_GLINK }; - - edata.data = !!netif_carrier_ok(dev); - - if (copy_to_user(useraddr, &edata, sizeof(edata))) - return -EFAULT; - return 0; - } - case ETHTOOL_GWOL: - { - struct ethtool_wolinfo wolinfo; - memset(&wolinfo, 0, sizeof(wolinfo)); - wolinfo.supported = WAKE_MAGIC; - - spin_lock_irq(&np->lock); - if (np->wolenabled) - wolinfo.wolopts = WAKE_MAGIC; - spin_unlock_irq(&np->lock); - - if (copy_to_user(useraddr, &wolinfo, sizeof(wolinfo))) - return -EFAULT; - return 0; - } - case ETHTOOL_SWOL: - { - struct ethtool_wolinfo wolinfo; - if (copy_from_user(&wolinfo, useraddr, sizeof(wolinfo))) - return -EFAULT; - - spin_lock_irq(&np->lock); - if (wolinfo.wolopts == 0) { - writel(0, base + NvRegWakeUpFlags); - np->wolenabled = 0; - } - if (wolinfo.wolopts & WAKE_MAGIC) { - writel(NVREG_WAKEUPFLAGS_ENABLE, base + NvRegWakeUpFlags); - np->wolenabled = 1; - } - spin_unlock_irq(&np->lock); - return 0; - } + strcpy(info->driver, "forcedeth"); + strcpy(info->version, FORCEDETH_VERSION); + strcpy(info->bus_info, pci_name(np->pci_dev)); +} - default: - break; - } +static void nv_get_wol(struct net_device *dev, struct ethtool_wolinfo *wolinfo) +{ + struct fe_priv *np = get_nvpriv(dev); + wolinfo->supported = WAKE_MAGIC; - return -EOPNOTSUPP; + spin_lock_irq(&np->lock); + if (np->wolenabled) + wolinfo->wolopts = WAKE_MAGIC; + spin_unlock_irq(&np->lock); } -/* - * nv_ioctl: dev->do_ioctl function - * Called with rtnl_lock held. - */ -static int nv_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) + +static int nv_set_wol(struct net_device *dev, struct ethtool_wolinfo *wolinfo) { - switch(cmd) { - case SIOCETHTOOL: - return nv_ethtool_ioctl(dev, (void *) rq->ifr_data); + struct fe_priv *np = get_nvpriv(dev); + u8 *base = get_hwbase(dev); - default: - return -EOPNOTSUPP; + spin_lock_irq(&np->lock); + if (wolinfo->wolopts == 0) { + writel(0, base + NvRegWakeUpFlags); + np->wolenabled = 0; + } + if (wolinfo->wolopts & WAKE_MAGIC) { + writel(NVREG_WAKEUPFLAGS_ENABLE, base + NvRegWakeUpFlags); + np->wolenabled = 1; } + spin_unlock_irq(&np->lock); + return 0; } +static struct ethtool_ops ops = { + .get_drvinfo = nv_get_drvinfo, + .get_link = ethtool_op_get_link, + .get_wol = nv_get_wol, + .set_wol = nv_set_wol, +}; + /* * nv_alloc_rx: fill rx ring entries. * Return 1 if the allocations for the skbs failed and the @@ -650,11 +823,12 @@ static int nv_alloc_rx(struct net_device { struct fe_priv *np = get_nvpriv(dev); unsigned int refill_rx = np->refill_rx; + int nr; while (np->cur_rx != refill_rx) { - int nr = refill_rx % RX_RING; struct sk_buff *skb; + nr = refill_rx % RX_RING; if (np->rx_skbuff[nr] == NULL) { skb = dev_alloc_skb(RX_ALLOC_BUFSIZE); @@ -669,10 +843,9 @@ static int nv_alloc_rx(struct net_device np->rx_dma[nr] = pci_map_single(np->pci_dev, skb->data, skb->len, PCI_DMA_FROMDEVICE); np->rx_ring[nr].PacketBuffer = cpu_to_le32(np->rx_dma[nr]); - np->rx_ring[nr].Length = cpu_to_le16(RX_NIC_BUFSIZE); wmb(); - np->rx_ring[nr].Flags = cpu_to_le16(NV_RX_AVAIL); - dprintk(KERN_DEBUG "%s: nv_alloc_rx: Packet %d marked as Available\n", + np->rx_ring[nr].FlagLen = cpu_to_le32(RX_NIC_BUFSIZE | NV_RX_AVAIL); + dprintk(KERN_DEBUG "%s: nv_alloc_rx: Packet %d marked as Available\n", dev->name, refill_rx); refill_rx++; } @@ -703,15 +876,13 @@ static int nv_init_ring(struct net_devic int i; np->next_tx = np->nic_tx = 0; - for (i = 0; i < TX_RING; i++) { - np->tx_ring[i].Flags = 0; - } + for (i = 0; i < TX_RING; i++) + np->tx_ring[i].FlagLen = 0; np->cur_rx = RX_RING; np->refill_rx = 0; - for (i = 0; i < RX_RING; i++) { - np->rx_ring[i].Flags = 0; - } + for (i = 0; i < RX_RING; i++) + np->rx_ring[i].FlagLen = 0; return nv_alloc_rx(dev); } @@ -720,7 +891,7 @@ static void nv_drain_tx(struct net_devic struct fe_priv *np = get_nvpriv(dev); int i; for (i = 0; i < TX_RING; i++) { - np->tx_ring[i].Flags = 0; + np->tx_ring[i].FlagLen = 0; if (np->tx_skbuff[i]) { pci_unmap_single(np->pci_dev, np->tx_dma[i], np->tx_skbuff[i]->len, @@ -737,7 +908,7 @@ static void nv_drain_rx(struct net_devic struct fe_priv *np = get_nvpriv(dev); int i; for (i = 0; i < RX_RING; i++) { - np->rx_ring[i].Flags = 0; + np->rx_ring[i].FlagLen = 0; wmb(); if (np->rx_skbuff[i]) { pci_unmap_single(np->pci_dev, np->rx_dma[i], @@ -769,11 +940,10 @@ static int nv_start_xmit(struct sk_buff PCI_DMA_TODEVICE); np->tx_ring[nr].PacketBuffer = cpu_to_le32(np->tx_dma[nr]); - np->tx_ring[nr].Length = cpu_to_le16(skb->len-1); spin_lock_irq(&np->lock); wmb(); - np->tx_ring[nr].Flags = np->tx_flags; + np->tx_ring[nr].FlagLen = cpu_to_le32( (skb->len-1) | np->tx_flags ); dprintk(KERN_DEBUG "%s: nv_start_xmit: packet packet %d queued for transmission.\n", dev->name, np->next_tx); { @@ -792,7 +962,7 @@ static int nv_start_xmit(struct sk_buff if (np->next_tx - np->nic_tx >= TX_LIMIT_STOP) netif_stop_queue(dev); spin_unlock_irq(&np->lock); - writel(NVREG_TXRXCTL_KICK, get_hwbase(dev) + NvRegTxRxControl); + writel(NVREG_TXRXCTL_KICK|np->desc_ver, get_hwbase(dev) + NvRegTxRxControl); pci_push(get_hwbase(dev)); return 0; } @@ -805,27 +975,42 @@ static int nv_start_xmit(struct sk_buff static void nv_tx_done(struct net_device *dev) { struct fe_priv *np = get_nvpriv(dev); + u32 Flags; + int i; - while (np->nic_tx < np->next_tx) { - struct ring_desc *prd; - int i = np->nic_tx % TX_RING; + while (np->nic_tx != np->next_tx) { + i = np->nic_tx % TX_RING; - prd = &np->tx_ring[i]; + Flags = le32_to_cpu(np->tx_ring[i].FlagLen); dprintk(KERN_DEBUG "%s: nv_tx_done: looking at packet %d, Flags 0x%x.\n", - dev->name, np->nic_tx, prd->Flags); - if (prd->Flags & cpu_to_le16(NV_TX_VALID)) + dev->name, np->nic_tx, Flags); + if (Flags & NV_TX_VALID) break; - if (prd->Flags & cpu_to_le16(NV_TX_RETRYERROR|NV_TX_CARRIERLOST|NV_TX_LATECOLLISION| - NV_TX_UNDERFLOW|NV_TX_ERROR)) { - if (prd->Flags & cpu_to_le16(NV_TX_UNDERFLOW)) - np->stats.tx_fifo_errors++; - if (prd->Flags & cpu_to_le16(NV_TX_CARRIERLOST)) - np->stats.tx_carrier_errors++; - np->stats.tx_errors++; + if (np->desc_ver == DESC_VER_1) { + if (Flags & (NV_TX_RETRYERROR|NV_TX_CARRIERLOST|NV_TX_LATECOLLISION| + NV_TX_UNDERFLOW|NV_TX_ERROR)) { + if (Flags & NV_TX_UNDERFLOW) + np->stats.tx_fifo_errors++; + if (Flags & NV_TX_CARRIERLOST) + np->stats.tx_carrier_errors++; + np->stats.tx_errors++; + } else { + np->stats.tx_packets++; + np->stats.tx_bytes += np->tx_skbuff[i]->len; + } } else { - np->stats.tx_packets++; - np->stats.tx_bytes += np->tx_skbuff[i]->len; + if (Flags & (NV_TX2_RETRYERROR|NV_TX2_CARRIERLOST|NV_TX2_LATECOLLISION| + NV_TX2_UNDERFLOW|NV_TX2_ERROR)) { + if (Flags & NV_TX2_UNDERFLOW) + np->stats.tx_fifo_errors++; + if (Flags & NV_TX2_CARRIERLOST) + np->stats.tx_carrier_errors++; + np->stats.tx_errors++; + } else { + np->stats.tx_packets++; + np->stats.tx_bytes += np->tx_skbuff[i]->len; + } } pci_unmap_single(np->pci_dev, np->tx_dma[i], np->tx_skbuff[i]->len, @@ -875,9 +1060,9 @@ static void nv_tx_timeout(struct net_dev static void nv_rx_process(struct net_device *dev) { struct fe_priv *np = get_nvpriv(dev); + u32 Flags; for (;;) { - struct ring_desc *prd; struct sk_buff *skb; int len; int i; @@ -885,11 +1070,13 @@ static void nv_rx_process(struct net_dev break; /* we scanned the whole ring - do not continue */ i = np->cur_rx % RX_RING; - prd = &np->rx_ring[i]; + Flags = le32_to_cpu(np->rx_ring[i].FlagLen); + len = nv_descr_getlength(&np->rx_ring[i], np->desc_ver); + dprintk(KERN_DEBUG "%s: nv_rx_process: looking at packet %d, Flags 0x%x.\n", - dev->name, np->cur_rx, prd->Flags); + dev->name, np->cur_rx, Flags); - if (prd->Flags & cpu_to_le16(NV_RX_AVAIL)) + if (Flags & NV_RX_AVAIL) break; /* still owned by hardware, */ /* @@ -903,7 +1090,7 @@ static void nv_rx_process(struct net_dev { int j; - dprintk(KERN_DEBUG "Dumping packet (flags 0x%x).",prd->Flags); + dprintk(KERN_DEBUG "Dumping packet (flags 0x%x).",Flags); for (j=0; j<64; j++) { if ((j%16) == 0) dprintk("\n%03x:", j); @@ -912,41 +1099,78 @@ static void nv_rx_process(struct net_dev dprintk("\n"); } /* look at what we actually got: */ - if (!(prd->Flags & cpu_to_le16(NV_RX_DESCRIPTORVALID))) - goto next_pkt; - - - len = le16_to_cpu(prd->Length); + if (np->desc_ver == DESC_VER_1) { + if (!(Flags & NV_RX_DESCRIPTORVALID)) + goto next_pkt; - if (prd->Flags & cpu_to_le16(NV_RX_MISSEDFRAME)) { - np->stats.rx_missed_errors++; - np->stats.rx_errors++; - goto next_pkt; - } - if (prd->Flags & cpu_to_le16(NV_RX_ERROR1|NV_RX_ERROR2|NV_RX_ERROR3|NV_RX_ERROR4)) { - np->stats.rx_errors++; - goto next_pkt; - } - if (prd->Flags & cpu_to_le16(NV_RX_CRCERR)) { - np->stats.rx_crc_errors++; - np->stats.rx_errors++; - goto next_pkt; - } - if (prd->Flags & cpu_to_le16(NV_RX_OVERFLOW)) { - np->stats.rx_over_errors++; - np->stats.rx_errors++; - goto next_pkt; - } - if (prd->Flags & cpu_to_le16(NV_RX_ERROR)) { - /* framing errors are soft errors, the rest is fatal. */ - if (prd->Flags & cpu_to_le16(NV_RX_FRAMINGERR)) { - if (prd->Flags & cpu_to_le16(NV_RX_SUBSTRACT1)) { - len--; + if (Flags & NV_RX_MISSEDFRAME) { + np->stats.rx_missed_errors++; + np->stats.rx_errors++; + goto next_pkt; + } + if (Flags & (NV_RX_ERROR1|NV_RX_ERROR2|NV_RX_ERROR3|NV_RX_ERROR4)) { + np->stats.rx_errors++; + goto next_pkt; + } + if (Flags & NV_RX_CRCERR) { + np->stats.rx_crc_errors++; + np->stats.rx_errors++; + goto next_pkt; + } + if (Flags & NV_RX_OVERFLOW) { + np->stats.rx_over_errors++; + np->stats.rx_errors++; + goto next_pkt; + } + if (Flags & NV_RX_ERROR) { + /* framing errors are soft errors, the rest is fatal. */ + if (Flags & NV_RX_FRAMINGERR) { + if (Flags & NV_RX_SUBSTRACT1) { + len--; + } + } else { + np->stats.rx_errors++; + goto next_pkt; } - } else { + } + } else { + if (!(Flags & NV_RX2_DESCRIPTORVALID)) + goto next_pkt; + + if (Flags & (NV_RX2_ERROR1|NV_RX2_ERROR2|NV_RX2_ERROR3|NV_RX2_ERROR4)) { np->stats.rx_errors++; goto next_pkt; } + if (Flags & NV_RX2_CRCERR) { + np->stats.rx_crc_errors++; + np->stats.rx_errors++; + goto next_pkt; + } + if (Flags & NV_RX2_OVERFLOW) { + np->stats.rx_over_errors++; + np->stats.rx_errors++; + goto next_pkt; + } + if (Flags & NV_RX2_ERROR) { + /* framing errors are soft errors, the rest is fatal. */ + if (Flags & NV_RX2_FRAMINGERR) { + if (Flags & NV_RX2_SUBSTRACT1) { + len--; + } + } else { + np->stats.rx_errors++; + goto next_pkt; + } + } + Flags &= NV_RX2_CHECKSUMMASK; + if (Flags == NV_RX2_CHECKSUMOK1 || + Flags == NV_RX2_CHECKSUMOK2 || + Flags == NV_RX2_CHECKSUMOK3) { + dprintk(KERN_DEBUG "%s: hw checksum hit!.\n", dev->name); + np->rx_skbuff[i]->ip_summed = CHECKSUM_UNNECESSARY; + } else { + dprintk(KERN_DEBUG "%s: hwchecksum miss!.\n", dev->name); + } } /* got a valid packet - forward it to the network core */ skb = np->rx_skbuff[i]; @@ -971,7 +1195,7 @@ next_pkt: */ static int nv_change_mtu(struct net_device *dev, int new_mtu) { - if (new_mtu > DEFAULT_MTU) + if (new_mtu > ETH_DATA_LEN) return -EINVAL; dev->mtu = new_mtu; return 0; @@ -1035,6 +1259,8 @@ static void nv_set_multicast(struct net_ writel(mask[0], base + NvRegMulticastMaskA); writel(mask[1], base + NvRegMulticastMaskB); writel(pff, base + NvRegPacketFilterFlags); + dprintk(KERN_INFO "%s: reconfiguration for multicast lists.\n", + dev->name); nv_start_rx(dev); spin_unlock_irq(&np->lock); } @@ -1042,16 +1268,62 @@ static void nv_set_multicast(struct net_ static int nv_update_linkspeed(struct net_device *dev) { struct fe_priv *np = get_nvpriv(dev); - int adv, lpa, newls, newdup; + u8 *base = get_hwbase(dev); + int adv, lpa; + int newls = np->linkspeed; + int newdup = np->duplex; + int mii_status; + int retval = 0; + u32 control_1000, status_1000, phyreg; + + /* BMSR_LSTATUS is latched, read it twice: + * we want the current value. + */ + mii_rw(dev, np->phyaddr, MII_BMSR, MII_READ); + mii_status = mii_rw(dev, np->phyaddr, MII_BMSR, MII_READ); + + if (!(mii_status & BMSR_LSTATUS)) { + dprintk(KERN_DEBUG "%s: no link detected by phy - falling back to 10HD.\n", + dev->name); + newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10; + newdup = 0; + retval = 0; + goto set_speed; + } + + /* check auto negotiation is complete */ + if (!(mii_status & BMSR_ANEGCOMPLETE)) { + /* still in autonegotiation - configure nic for 10 MBit HD and wait. */ + newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10; + newdup = 0; + retval = 0; + dprintk(KERN_DEBUG "%s: autoneg not completed - falling back to 10HD.\n", dev->name); + goto set_speed; + } + + retval = 1; + if (np->gigabit == PHY_GIGABIT) { + control_1000 = mii_rw(dev, np->phyaddr, MII_1000BT_CR, MII_READ); + status_1000 = mii_rw(dev, np->phyaddr, MII_1000BT_SR, MII_READ); + + if ((control_1000 & ADVERTISE_1000FULL) && + (status_1000 & LPA_1000FULL)) { + dprintk(KERN_DEBUG "%s: nv_update_linkspeed: GBit ethernet detected.\n", + dev->name); + newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_1000; + newdup = 1; + goto set_speed; + } + } adv = mii_rw(dev, np->phyaddr, MII_ADVERTISE, MII_READ); lpa = mii_rw(dev, np->phyaddr, MII_LPA, MII_READ); dprintk(KERN_DEBUG "%s: nv_update_linkspeed: PHY advertises 0x%04x, lpa 0x%04x.\n", dev->name, adv, lpa); - /* FIXME: handle parallel detection properly, handle gigabit ethernet */ + /* FIXME: handle parallel detection properly */ lpa = lpa & adv; - if (lpa & LPA_100FULL) { + if (lpa & LPA_100FULL) { newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_100; newdup = 1; } else if (lpa & LPA_100HALF) { @@ -1068,37 +1340,57 @@ static int nv_update_linkspeed(struct ne newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10; newdup = 0; } - if (np->duplex != newdup || np->linkspeed != newls) { - np->duplex = newdup; - np->linkspeed = newls; - return 1; - } - return 0; -} -static void nv_link_irq(struct net_device *dev) -{ - struct fe_priv *np = get_nvpriv(dev); - u8 *base = get_hwbase(dev); - u32 miistat; - int miival; +set_speed: + if (np->duplex == newdup && np->linkspeed == newls) + return retval; + + dprintk(KERN_INFO "%s: changing link setting from %d/%d to %d/%d.\n", + dev->name, np->linkspeed, np->duplex, newls, newdup); + + np->duplex = newdup; + np->linkspeed = newls; + + if (np->gigabit == PHY_GIGABIT) { + phyreg = readl(base + NvRegRandomSeed); + phyreg &= ~(0x3FF00); + if ((np->linkspeed & 0xFFF) == NVREG_LINKSPEED_10) + phyreg |= NVREG_RNDSEED_FORCE3; + else if ((np->linkspeed & 0xFFF) == NVREG_LINKSPEED_100) + phyreg |= NVREG_RNDSEED_FORCE2; + else if ((np->linkspeed & 0xFFF) == NVREG_LINKSPEED_1000) + phyreg |= NVREG_RNDSEED_FORCE; + writel(phyreg, base + NvRegRandomSeed); + } + + phyreg = readl(base + NvRegPhyInterface); + phyreg &= ~(PHY_HALF|PHY_100|PHY_1000); + if (np->duplex == 0) + phyreg |= PHY_HALF; + if ((np->linkspeed & 0xFFF) == NVREG_LINKSPEED_100) + phyreg |= PHY_100; + else if ((np->linkspeed & 0xFFF) == NVREG_LINKSPEED_1000) + phyreg |= PHY_1000; + writel(phyreg, base + NvRegPhyInterface); - miistat = readl(base + NvRegMIIStatus); - writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus); - printk(KERN_DEBUG "%s: link change notification, status 0x%x.\n", dev->name, miistat); + writel(NVREG_MISC1_FORCE | ( np->duplex ? 0 : NVREG_MISC1_HD), + base + NvRegMisc1); + pci_push(base); + writel(np->linkspeed, base + NvRegLinkSpeed); + pci_push(base); - miival = mii_rw(dev, np->phyaddr, MII_BMSR, MII_READ); - if (miival & BMSR_ANEGCOMPLETE) { - nv_update_linkspeed(dev); + return retval; +} +static void nv_linkchange(struct net_device *dev) +{ + if (nv_update_linkspeed(dev)) { if (netif_carrier_ok(dev)) { nv_stop_rx(dev); } else { netif_carrier_on(dev); printk(KERN_INFO "%s: link up.\n", dev->name); } - writel(NVREG_MISC1_FORCE | ( np->duplex ? 0 : NVREG_MISC1_HD), - base + NvRegMisc1); nv_start_rx(dev); } else { if (netif_carrier_ok(dev)) { @@ -1106,11 +1398,23 @@ static void nv_link_irq(struct net_devic printk(KERN_INFO "%s: link down.\n", dev->name); nv_stop_rx(dev); } - writel(np->linkspeed, base + NvRegLinkSpeed); - pci_push(base); } } +static void nv_link_irq(struct net_device *dev) +{ + u8 *base = get_hwbase(dev); + u32 miistat; + + miistat = readl(base + NvRegMIIStatus); + writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus); + dprintk(KERN_INFO "%s: link change irq, status 0x%x.\n", dev->name, miistat); + + if (miistat & (NVREG_MIISTAT_LINKCHANGE)) + nv_linkchange(dev); + dprintk(KERN_DEBUG "%s: link change notification done.\n", dev->name); +} + static irqreturn_t nv_nic_irq(int foo, void *data, struct pt_regs *regs) { struct net_device *dev = (struct net_device *) data; @@ -1135,7 +1439,7 @@ static irqreturn_t nv_nic_irq(int foo, v spin_unlock(&np->lock); } - if (events & (NVREG_IRQ_RX|NVREG_IRQ_RX_NOBUF)) { + if (events & (NVREG_IRQ_RX_ERROR|NVREG_IRQ_RX|NVREG_IRQ_RX_NOBUF)) { nv_rx_process(dev); if (nv_alloc_rx(dev)) { spin_lock(&np->lock); @@ -1150,6 +1454,12 @@ static irqreturn_t nv_nic_irq(int foo, v nv_link_irq(dev); spin_unlock(&np->lock); } + if (np->need_linktimer && time_after(jiffies, np->link_timeout)) { + spin_lock(&np->lock); + nv_linkchange(dev); + spin_unlock(&np->lock); + np->link_timeout = jiffies + LINK_TIMEOUT; + } if (events & (NVREG_IRQ_TX_ERR)) { dprintk(KERN_DEBUG "%s: received irq with events 0x%x. Probably TX fail.\n", dev->name, events); @@ -1157,7 +1467,7 @@ static irqreturn_t nv_nic_irq(int foo, v if (events & (NVREG_IRQ_UNKNOWN)) { printk(KERN_DEBUG "%s: received irq with unknown events 0x%x. Please report\n", dev->name, events); - } + } if (i > max_interrupt_work) { spin_lock(&np->lock); /* disable interrupts on the nic */ @@ -1210,21 +1520,27 @@ static int nv_open(struct net_device *de writel(0, base + NvRegMulticastMaskA); writel(0, base + NvRegMulticastMaskB); writel(0, base + NvRegPacketFilterFlags); + + writel(0, base + NvRegTransmitterControl); + writel(0, base + NvRegReceiverControl); + writel(0, base + NvRegAdapterControl); + + /* 2) initialize descriptor rings */ + oom = nv_init_ring(dev); + writel(0, base + NvRegLinkSpeed); writel(0, base + NvRegUnknownTransmitterReg); nv_txrx_reset(dev); writel(0, base + NvRegUnknownSetupReg6); - /* 2) initialize descriptor rings */ np->in_shutdown = 0; - oom = nv_init_ring(dev); /* 3) set mac address */ { u32 mac[2]; - mac[0] = (dev->dev_addr[0] << 0) + (dev->dev_addr[1] << 8) + + mac[0] = (dev->dev_addr[0] << 0) + (dev->dev_addr[1] << 8) + (dev->dev_addr[2] << 16) + (dev->dev_addr[3] << 24); mac[1] = (dev->dev_addr[4] << 0) + (dev->dev_addr[5] << 8); @@ -1232,53 +1548,31 @@ static int nv_open(struct net_device *de writel(mac[1], base + NvRegMacAddrB); } - /* 4) continue setup */ + /* 4) give hw rings */ + writel((u32) np->ring_addr, base + NvRegRxRingPhysAddr); + writel((u32) (np->ring_addr + RX_RING*sizeof(struct ring_desc)), base + NvRegTxRingPhysAddr); + writel( ((RX_RING-1) << NVREG_RINGSZ_RXSHIFT) + ((TX_RING-1) << NVREG_RINGSZ_TXSHIFT), + base + NvRegRingSizes); + + /* 5) continue setup */ np->linkspeed = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10; np->duplex = 0; + + writel(np->linkspeed, base + NvRegLinkSpeed); writel(NVREG_UNKSETUP3_VAL1, base + NvRegUnknownSetupReg3); - writel(0, base + NvRegTxRxControl); + writel(np->desc_ver, base + NvRegTxRxControl); pci_push(base); - writel(NVREG_TXRXCTL_BIT1, base + NvRegTxRxControl); + writel(NVREG_TXRXCTL_BIT1|np->desc_ver, base + NvRegTxRxControl); reg_delay(dev, NvRegUnknownSetupReg5, NVREG_UNKSETUP5_BIT31, NVREG_UNKSETUP5_BIT31, NV_SETUP5_DELAY, NV_SETUP5_DELAYMAX, KERN_INFO "open: SetupReg5, Bit 31 remained off\n"); - writel(0, base + NvRegUnknownSetupReg4); - - /* 5) Find a suitable PHY */ - writel(NVREG_MIISPEED_BIT8|NVREG_MIIDELAY, base + NvRegMIISpeed); - for (i = 1; i < 32; i++) { - int id1, id2; - - spin_lock_irq(&np->lock); - id1 = mii_rw(dev, i, MII_PHYSID1, MII_READ); - spin_unlock_irq(&np->lock); - if (id1 < 0 || id1 == 0xffff) - continue; - spin_lock_irq(&np->lock); - id2 = mii_rw(dev, i, MII_PHYSID2, MII_READ); - spin_unlock_irq(&np->lock); - if (id2 < 0 || id2 == 0xffff) - continue; - dprintk(KERN_DEBUG "%s: open: Found PHY %04x:%04x at address %d.\n", - dev->name, id1, id2, i); - np->phyaddr = i; - spin_lock_irq(&np->lock); - nv_update_linkspeed(dev); - spin_unlock_irq(&np->lock); - - break; - } - if (i == 32) { - printk(KERN_INFO "%s: open: failing due to lack of suitable PHY.\n", - dev->name); - ret = -EINVAL; - goto out_drain; - } + writel(0, base + NvRegUnknownSetupReg4); + writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus); + writel(NVREG_MIISTAT_MASK2, base + NvRegMIIStatus); /* 6) continue setup */ - writel(NVREG_MISC1_FORCE | ( np->duplex ? 0 : NVREG_MISC1_HD), - base + NvRegMisc1); + writel(NVREG_MISC1_FORCE | NVREG_MISC1_HD, base + NvRegMisc1); writel(readl(base + NvRegTransmitterStatus), base + NvRegTransmitterStatus); writel(NVREG_PFF_ALWAYS, base + NvRegPacketFilterFlags); writel(NVREG_OFFLOAD_NORMAL, base + NvRegOffloadConfig); @@ -1290,17 +1584,12 @@ static int nv_open(struct net_device *de writel(NVREG_UNKSETUP2_VAL, base + NvRegUnknownSetupReg2); writel(NVREG_POLL_DEFAULT, base + NvRegPollingInterval); writel(NVREG_UNKSETUP6_VAL, base + NvRegUnknownSetupReg6); - writel((np->phyaddr << NVREG_ADAPTCTL_PHYSHIFT)|NVREG_ADAPTCTL_PHYVALID, + writel((np->phyaddr << NVREG_ADAPTCTL_PHYSHIFT)|NVREG_ADAPTCTL_PHYVALID|NVREG_ADAPTCTL_RUNNING, base + NvRegAdapterControl); + writel(NVREG_MIISPEED_BIT8|NVREG_MIIDELAY, base + NvRegMIISpeed); writel(NVREG_UNKSETUP4_VAL, base + NvRegUnknownSetupReg4); writel(NVREG_WAKEUPFLAGS_VAL, base + NvRegWakeUpFlags); - /* 7) start packet processing */ - writel((u32) np->ring_addr, base + NvRegRxRingPhysAddr); - writel((u32) (np->ring_addr + RX_RING*sizeof(struct ring_desc)), base + NvRegTxRingPhysAddr); - writel( ((RX_RING-1) << NVREG_RINGSZ_RXSHIFT) + ((TX_RING-1) << NVREG_RINGSZ_TXSHIFT), - base + NvRegRingSizes); - i = readl(base + NvRegPowerState); if ( (i & NVREG_POWERSTATE_POWEREDUP) == 0) writel(NVREG_POWERSTATE_POWEREDUP|i, base + NvRegPowerState); @@ -1308,13 +1597,9 @@ static int nv_open(struct net_device *de pci_push(base); udelay(10); writel(readl(base + NvRegPowerState) | NVREG_POWERSTATE_VALID, base + NvRegPowerState); - writel(NVREG_ADAPTCTL_RUNNING, base + NvRegAdapterControl); - writel(0, base + NvRegIrqMask); pci_push(base); - writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus); - pci_push(base); writel(NVREG_MIISTAT_MASK2, base + NvRegMIIStatus); writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus); pci_push(base); @@ -1323,6 +1608,7 @@ static int nv_open(struct net_device *de if (ret) goto out_drain; + /* ask for interrupts */ writel(np->irqmask, base + NvRegIrqMask); spin_lock_irq(&np->lock); @@ -1331,18 +1617,27 @@ static int nv_open(struct net_device *de writel(0, base + NvRegMulticastMaskA); writel(0, base + NvRegMulticastMaskB); writel(NVREG_PFF_ALWAYS|NVREG_PFF_MYADDR, base + NvRegPacketFilterFlags); + /* One manual link speed update: Interrupts are enabled, future link + * speed changes cause interrupts and are handled by nv_link_irq(). + */ + { + u32 miistat; + miistat = readl(base + NvRegMIIStatus); + writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus); + dprintk(KERN_INFO "startup: got 0x%08x.\n", miistat); + } + ret = nv_update_linkspeed(dev); nv_start_rx(dev); nv_start_tx(dev); netif_start_queue(dev); - if (oom) - mod_timer(&np->oom_kick, jiffies + OOM_REFILL); - if (mii_rw(dev, np->phyaddr, MII_BMSR, MII_READ) & BMSR_ANEGCOMPLETE) { + if (ret) { netif_carrier_on(dev); } else { printk("%s: no link during initialization.\n", dev->name); netif_carrier_off(dev); } - + if (oom) + mod_timer(&np->oom_kick, jiffies + OOM_REFILL); spin_unlock_irq(&np->lock); return 0; @@ -1368,9 +1663,10 @@ static int nv_close(struct net_device *d spin_lock_irq(&np->lock); nv_stop_tx(dev); nv_stop_rx(dev); - base = get_hwbase(dev); + nv_txrx_reset(dev); /* disable interrupts on the nic or we will lock up */ + base = get_hwbase(dev); writel(0, base + NvRegIrqMask); pci_push(base); dprintk(KERN_INFO "%s: Irqmask is zero again\n", dev->name); @@ -1424,7 +1720,7 @@ static int __devinit nv_probe(struct pci pci_set_master(pci_dev); - err = pci_request_regions(pci_dev, dev->name); + err = pci_request_regions(pci_dev, DRV_NAME); if (err < 0) goto out_disable; @@ -1447,6 +1743,14 @@ static int __devinit nv_probe(struct pci goto out_relreg; } + /* handle different descriptor versions */ + if (pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_1 || + pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_2 || + pci_dev->device == PCI_DEVICE_ID_NVIDIA_NVENET_3) + np->desc_ver = DESC_VER_1; + else + np->desc_ver = DESC_VER_2; + err = -ENOMEM; dev->base_addr = (unsigned long) ioremap(addr, NV_PCI_REGSZ); if (!dev->base_addr) @@ -1464,7 +1768,7 @@ static int __devinit nv_probe(struct pci dev->get_stats = nv_get_stats; dev->change_mtu = nv_change_mtu; dev->set_multicast_list = nv_set_multicast; - dev->do_ioctl = nv_ioctl; + SET_ETHTOOL_OPS(dev, &ops); dev->tx_timeout = nv_tx_timeout; dev->watchdog_timeo = NV_WATCHDOG_TIMEO; @@ -1506,15 +1810,65 @@ static int __devinit nv_probe(struct pci writel(0, base + NvRegWakeUpFlags); np->wolenabled = 0; - np->tx_flags = cpu_to_le16(NV_TX_LASTPACKET|NV_TX_LASTPACKET1|NV_TX_VALID); - if (id->driver_data & DEV_NEED_LASTPACKET1) - np->tx_flags |= cpu_to_le16(NV_TX_LASTPACKET1); + if (np->desc_ver == DESC_VER_1) { + np->tx_flags = NV_TX_LASTPACKET|NV_TX_VALID; + if (id->driver_data & DEV_NEED_LASTPACKET1) + np->tx_flags |= NV_TX_LASTPACKET1; + } else { + np->tx_flags = NV_TX2_LASTPACKET|NV_TX2_VALID; + if (id->driver_data & DEV_NEED_LASTPACKET1) + np->tx_flags |= NV_TX2_LASTPACKET1; + } if (id->driver_data & DEV_IRQMASK_1) np->irqmask = NVREG_IRQMASK_WANTED_1; if (id->driver_data & DEV_IRQMASK_2) np->irqmask = NVREG_IRQMASK_WANTED_2; if (id->driver_data & DEV_NEED_TIMERIRQ) np->irqmask |= NVREG_IRQ_TIMER; + if (id->driver_data & DEV_NEED_LINKTIMER) { + dprintk(KERN_INFO "%s: link timer on.\n", pci_name(pci_dev)); + np->need_linktimer = 1; + np->link_timeout = jiffies + LINK_TIMEOUT; + } else { + dprintk(KERN_INFO "%s: link timer off.\n", pci_name(pci_dev)); + np->need_linktimer = 0; + } + + /* find a suitable phy */ + for (i = 1; i < 32; i++) { + int id1, id2; + + spin_lock_irq(&np->lock); + id1 = mii_rw(dev, i, MII_PHYSID1, MII_READ); + spin_unlock_irq(&np->lock); + if (id1 < 0 || id1 == 0xffff) + continue; + spin_lock_irq(&np->lock); + id2 = mii_rw(dev, i, MII_PHYSID2, MII_READ); + spin_unlock_irq(&np->lock); + if (id2 < 0 || id2 == 0xffff) + continue; + + id1 = (id1 & PHYID1_OUI_MASK) << PHYID1_OUI_SHFT; + id2 = (id2 & PHYID2_OUI_MASK) >> PHYID2_OUI_SHFT; + dprintk(KERN_DEBUG "%s: open: Found PHY %04x:%04x at address %d.\n", + pci_name(pci_dev), id1, id2, i); + np->phyaddr = i; + np->phy_oui = id1 | id2; + break; + } + if (i == 32) { + /* PHY in isolate mode? No phy attached and user wants to + * test loopback? Very odd, but can be correct. + */ + printk(KERN_INFO "%s: open: Could not find a valid PHY.\n", + pci_name(pci_dev)); + } + + if (i != 32) { + /* reset it */ + phy_init(dev); + } err = register_netdev(dev); if (err) { @@ -1569,21 +1923,77 @@ static void __devexit nv_remove(struct p static struct pci_device_id pci_tbl[] = { { /* nForce Ethernet Controller */ .vendor = PCI_VENDOR_ID_NVIDIA, - .device = 0x1C3, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_1, .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, - .driver_data = DEV_IRQMASK_1|DEV_NEED_TIMERIRQ, + .driver_data = DEV_IRQMASK_1|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER, }, { /* nForce2 Ethernet Controller */ .vendor = PCI_VENDOR_ID_NVIDIA, - .device = 0x0066, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_2, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER, + }, + { /* nForce3 Ethernet Controller */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_3, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER, + }, + { /* nForce3 Ethernet Controller */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_4, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, + }, + { /* nForce3 Ethernet Controller */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_5, .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, }, { /* nForce3 Ethernet Controller */ .vendor = PCI_VENDOR_ID_NVIDIA, - .device = 0x00D6, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_6, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, + }, + { /* nForce3 Ethernet Controller */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_7, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, + }, + { /* CK804 Ethernet Controller */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_8, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, + }, + { /* CK804 Ethernet Controller */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_9, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, + }, + { /* MCP04 Ethernet Controller */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_10, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, + }, + { /* MCP04 Ethernet Controller */ + .vendor = PCI_VENDOR_ID_NVIDIA, + .device = PCI_DEVICE_ID_NVIDIA_NVENET_11, .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, .driver_data = DEV_NEED_LASTPACKET1|DEV_IRQMASK_2|DEV_NEED_TIMERIRQ, @@ -1610,9 +2020,9 @@ static void __exit exit_nic(void) pci_unregister_driver(&driver); } -MODULE_PARM(max_interrupt_work, "i"); +module_param(max_interrupt_work, int, 0); MODULE_PARM_DESC(max_interrupt_work, "forcedeth maximum events handled per interrupt"); - + MODULE_AUTHOR("Manfred Spraul "); MODULE_DESCRIPTION("Reverse Engineered nForce ethernet driver"); MODULE_LICENSE("GPL"); --- 2.4/include/linux/pci_ids.h 2004-10-17 16:23:05.702090106 +0200 +++ build-2.4/include/linux/pci_ids.h 2004-10-17 12:09:35.374632012 +0200 @@ -981,24 +981,34 @@ #define PCI_DEVICE_ID_NVIDIA_UVTNT2 0x002D #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE 0x0035 #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA 0x0036 +#define PCI_DEVICE_ID_NVIDIA_NVENET_10 0x0037 +#define PCI_DEVICE_ID_NVIDIA_NVENET_11 0x0038 #define PCI_DEVICE_ID_NVIDIA_MCP04_AUDIO 0x003a #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2 0x003e #define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE 0x0053 #define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA 0x0054 #define PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2 0x0055 +#define PCI_DEVICE_ID_NVIDIA_NVENET_8 0x0056 +#define PCI_DEVICE_ID_NVIDIA_NVENET_9 0x0057 #define PCI_DEVICE_ID_NVIDIA_CK804_AUDIO 0x0059 #define PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE 0x0065 +#define PCI_DEVICE_ID_NVIDIA_NVENET_2 0x0066 #define PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO 0x006a #define PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE 0x0085 +#define PCI_DEVICE_ID_NVIDIA_NVENET_4 0x0086 +#define PCI_DEVICE_ID_NVIDIA_NVENET_5 0x008c #define PCI_DEVICE_ID_NVIDIA_MCP2S_AUDIO 0x008a #define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA 0x008e #define PCI_DEVICE_ID_NVIDIA_ITNT2 0x00A0 #define PCI_DEVICE_ID_NVIDIA_NFORCE3 0x00d1 #define PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE 0x00d5 +#define PCI_DEVICE_ID_NVIDIA_NVENET_3 0x00d6 #define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da +#define PCI_DEVICE_ID_NVIDIA_NVENET_7 0x00df #define PCI_DEVICE_ID_NVIDIA_NFORCE3S 0x00e1 #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA 0x00e3 #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE 0x00e5 +#define PCI_DEVICE_ID_NVIDIA_NVENET_6 0x00e6 #define PCI_DEVICE_ID_NVIDIA_CK8S_AUDIO 0x00ea #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2 0x00ee #define PCI_DEVICE_ID_NVIDIA_GEFORCE_SDR 0x0100 @@ -1016,6 +1026,7 @@ #define PCI_DEVICE_ID_NVIDIA_NFORCE 0x01a4 #define PCI_DEVICE_ID_NVIDIA_MCP1_AUDIO 0x01b1 #define PCI_DEVICE_ID_NVIDIA_NFORCE_IDE 0x01bc +#define PCI_DEVICE_ID_NVIDIA_NVENET_1 0x01c3 #define PCI_DEVICE_ID_NVIDIA_NFORCE2 0x01e0 #define PCI_DEVICE_ID_NVIDIA_GEFORCE3 0x0200 #define PCI_DEVICE_ID_NVIDIA_GEFORCE3_1 0x0201 From garzik@havoc.gtf.org Sat Oct 30 06:00:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 06:00:40 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [69.28.190.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UD0ZSR021636 for ; Sat, 30 Oct 2004 06:00:36 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id B697779F5; Sat, 30 Oct 2004 09:00:11 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i9UD0Bai004325; Sat, 30 Oct 2004 09:00:11 -0400 Date: Sat, 30 Oct 2004 09:00:11 -0400 From: Jeff Garzik To: Manfred Spraul Cc: marcelo.tosatti@cyclades.com, blazara@nvidia.com, netdev@oss.sgi.com Subject: Re: [PATCH 2.4.28-rc1-bk3] forcedeth: Backport of gigabit ethernet support and media detection rewrite Message-ID: <20041030130011.GA4261@havoc.gtf.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-archive-position: 11183 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 On Sat, Oct 30, 2004 at 02:53:08PM +0200, Manfred Spraul wrote: > Differences between 2.6 and 2.4: > > - static msleep helper added. Sigh, libata has this too. I'll work up a patch to make it public. > After applying this patch, the driver is nearly in sync with 2.6.10-rc1: > The only additional differences are __iomem annotations and the use of > netdev_priv. Will __iomem and netdev_priv() changes be in a separate patch? 2.4.x has both. Jeff From jgarzik@pobox.com Sat Oct 30 06:03:17 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 06:03:24 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UD3GUX021997 for ; Sat, 30 Oct 2004 06:03:17 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CNssh-0007F0-Ez; Sat, 30 Oct 2004 14:02:55 +0100 Message-ID: <418390F2.7080901@pobox.com> Date: Sat, 30 Oct 2004 09:02:42 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Randy.Dunlap" CC: netdev@oss.sgi.com, rl@hellgate.ch Subject: Re: [PATCH] via-rhine: references __init code during resume References: <4179543F.1020407@osdl.org> In-Reply-To: <4179543F.1020407@osdl.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11184 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 Randy.Dunlap wrote: > > > ------------------------------------------------------------------------ > > > Fix __init section usage: > rhine_resume calls enable_mmio, so latter cannot be __devinit; > Error: ./drivers/net/via-rhine.o .text refers to 0000000000000925 R_X86_64_PC32 .init.text+0xfffffffffffffffc > > Signed-off-by: Randy Dunlap Attaching patches in this way breaks Linus's patch merge scripts (which I use), causing the description to be completely omitted. Please include descriptions and patches inline. "sendmail -t < mail" works well for this. You need only supply the From, To, and Subject headers, and a blank line, in order for this to work. Jeff From manfred@colorfullife.com Sat Oct 30 06:10:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 06:10:11 -0700 (PDT) Received: from dbl.q-ag.de (dbl.q-ag.de [213.172.117.3]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UDA5j5022485 for ; Sat, 30 Oct 2004 06:10:06 -0700 Received: from [127.0.0.2] (dbl [127.0.0.1]) by dbl.q-ag.de (8.12.3/8.12.3/Debian-6.6) with ESMTP id i9UD9dSL026312; Sat, 30 Oct 2004 15:09:40 +0200 Message-ID: <41839292.7080305@colorfullife.com> Date: Sat, 30 Oct 2004 15:09:38 +0200 From: Manfred Spraul User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jeff Garzik CC: marcelo.tosatti@cyclades.com, blazara@nvidia.com, netdev@oss.sgi.com Subject: Re: [PATCH 2.4.28-rc1-bk3] forcedeth: Backport of gigabit ethernet support and media detection rewrite References: <20041030130011.GA4261@havoc.gtf.org> In-Reply-To: <20041030130011.GA4261@havoc.gtf.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11185 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: manfred@colorfullife.com Precedence: bulk X-list: netdev Jeff Garzik wrote: > > >>After applying this patch, the driver is nearly in sync with 2.6.10-rc1: >>The only additional differences are __iomem annotations and the use of >>netdev_priv. >> >> > >Will __iomem and netdev_priv() changes be in a separate patch? > >2.4.x has both. > > > Not now, they would appear in the next backport. I'm backporting from a moving target. Two weeks ago I posted the patch for review to linux-netdev (based on a 2.6 -mm kernel). I haven't received any complaints, thus I'm submitting it now for merging. During these two weeks the __iomem and netdev_priv change were added to 2.6 and that causes the difference between my patch and 2.6.10-rc1. -- Manfred From garzik@havoc.gtf.org Sat Oct 30 06:32:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 06:32:58 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [69.28.190.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UDWrm8023130 for ; Sat, 30 Oct 2004 06:32:53 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id 8DC277992; Sat, 30 Oct 2004 09:32:14 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i9UDWEDA005688; Sat, 30 Oct 2004 09:32:14 -0400 Date: Sat, 30 Oct 2004 09:32:14 -0400 From: Jeff Garzik To: Andrew Morton , Linus Torvalds Cc: netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: [BK PATCHES] 2.6.x net driver updates Message-ID: <20041030133214.GA5657@havoc.gtf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-archive-position: 11186 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 Please do a bk pull bk://gkernel.bkbits.net/net-drivers-2.6 This will update the following files: MAINTAINERS | 4 drivers/net/8390.c | 2 drivers/net/amd8111e.c | 220 +++++++++++++++++++++++++++--------------------- drivers/net/amd8111e.h | 3 drivers/net/smc91x.h | 4 drivers/net/via-rhine.c | 2 6 files changed, 132 insertions(+), 103 deletions(-) through these ChangeSets: (04/10/30 1.2350) [PATCH] via-rhine: references __init code during resume Fix __init section usage: rhine_resume calls enable_mmio, so latter cannot be __devinit; Error: ./drivers/net/via-rhine.o .text refers to 0000000000000925 R_X86_64_PC32 .init.text+0xfffffffffffffffc Signed-off-by: Randy Dunlap Signed-off-by: Jeff Garzik (04/10/30 1.2349) [PATCH] amd8111e: Add support for ppc64 eval board This patch adds a few memory barriers, cleans up a little bit the use of the "status" field in the rx & tx routines, and adds probing for the external PHY to the driver. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Jeff Garzik (04/10/30 1.2348) [PATCH] amd8111e: Fix identation of amd8111e_rx_poll() This patch does an indentation fix to amd8111e_rx_poll() which was incorrectly shifting left in the middle of a while() loop, thus rendering the function difficult to read. There is no actual code change. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Jeff Garzik (04/10/30 1.2347) [PATCH] e100: update maintainer My intel.com address will bounce. Signed-off-by: Scott Feldman Signed-off-by: Jeff Garzik (04/10/30 1.2346) [PATCH] fix smc91x compilation error It looks like this bit got mismerged (pci.h removed but DMA arguments convertion missing). Signed-off-by: Nicolas Pitre Signed-off-by: Jeff Garzik (04/10/30 1.2345) [PATCH] 8390.c: Use mdelay(10) rather than udelay(10*1000) ARM udelay can't cope with >2ms delays. Signed-off-by: Russell King Signed-off-by: Jeff Garzik diff -Nru a/MAINTAINERS b/MAINTAINERS --- a/MAINTAINERS 2004-10-30 09:31:01 -04:00 +++ b/MAINTAINERS 2004-10-30 09:31:01 -04:00 @@ -1110,8 +1110,8 @@ M: john.ronciak@intel.com P: Ganesh Venkatesan M: ganesh.venkatesan@intel.com -P: Scott Feldman -M: scott.feldman@intel.com +P: Jesse Brandeburg +M: jesse.brandeburg@intel.com W: http://sourceforge.net/projects/e1000/ S: Supported diff -Nru a/drivers/net/8390.c b/drivers/net/8390.c --- a/drivers/net/8390.c 2004-10-30 09:31:01 -04:00 +++ b/drivers/net/8390.c 2004-10-30 09:31:01 -04:00 @@ -813,7 +813,7 @@ * We wait at least 10ms. */ - udelay(10*1000); + mdelay(10); /* * Reset RBCR[01] back to zero as per magic incantation. diff -Nru a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c --- a/drivers/net/amd8111e.c 2004-10-30 09:31:01 -04:00 +++ b/drivers/net/amd8111e.c 2004-10-30 09:31:01 -04:00 @@ -211,7 +211,7 @@ u32 bmcr,advert,tmp; /* Determine mii register values to set the speed */ - advert = amd8111e_mdio_read(dev, PHY_ID, MII_ADVERTISE); + advert = amd8111e_mdio_read(dev, lp->ext_phy_addr, MII_ADVERTISE); tmp = advert & ~(ADVERTISE_ALL | ADVERTISE_100BASE4); switch (lp->ext_phy_option){ @@ -235,11 +235,11 @@ } if(advert != tmp) - amd8111e_mdio_write(dev, PHY_ID, MII_ADVERTISE, tmp); + amd8111e_mdio_write(dev, lp->ext_phy_addr, MII_ADVERTISE, tmp); /* Restart auto negotiation */ - bmcr = amd8111e_mdio_read(dev, PHY_ID, MII_BMCR); + bmcr = amd8111e_mdio_read(dev, lp->ext_phy_addr, MII_BMCR); bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART); - amd8111e_mdio_write(dev, PHY_ID, MII_BMCR, bmcr); + amd8111e_mdio_write(dev, lp->ext_phy_addr, MII_BMCR, bmcr); } @@ -350,6 +350,7 @@ lp->rx_ring[i].buff_phy_addr = cpu_to_le32(lp->rx_dma_addr[i]); lp->rx_ring[i].buff_count = cpu_to_le16(lp->rx_buff_len-2); + wmb(); lp->rx_ring[i].rx_flags = cpu_to_le16(OWN_BIT); } @@ -529,7 +530,7 @@ writel(RUN, mmio + CMD0); /* AUTOPOLL0 Register *//*TBD default value is 8100 in FPS */ - writew( 0x8101, mmio + AUTOPOLL0); + writew( 0x8100 | lp->ext_phy_addr, mmio + AUTOPOLL0); /* Clear RCV_RING_BASE_ADDR */ writel(0, mmio + RCV_RING_BASE_ADDR0); @@ -740,11 +741,11 @@ do{ /* process receive packets until we use the quota*/ /* If we own the next entry, it's a new packet. Send it up. */ - while(!(lp->rx_ring[rx_index].rx_flags & OWN_BIT)){ - - /* check if err summary bit is set */ - if(le16_to_cpu(lp->rx_ring[rx_index].rx_flags) - & ERR_BIT){ + while(1) { + status = le16_to_cpu(lp->rx_ring[rx_index].rx_flags); + if (status & OWN_BIT) + break; + /* * There is a tricky error noted by John Murphy, * to Russ Nelson: Even with @@ -753,89 +754,88 @@ * the last correctly noting the error. */ - /* reseting flags */ - lp->rx_ring[rx_index].rx_flags &=RESET_RX_FLAGS; - goto err_next_pkt; - + if(status & ERR_BIT) { + /* reseting flags */ + lp->rx_ring[rx_index].rx_flags &= RESET_RX_FLAGS; + goto err_next_pkt; } /* check for STP and ENP */ - status = le16_to_cpu(lp->rx_ring[rx_index].rx_flags); - if(!((status & STP_BIT) && (status & ENP_BIT))){ - /* reseting flags */ - lp->rx_ring[rx_index].rx_flags &=RESET_RX_FLAGS; - goto err_next_pkt; - } - pkt_len = le16_to_cpu(lp->rx_ring[rx_index].msg_count) - 4; + if(!((status & STP_BIT) && (status & ENP_BIT))){ + /* reseting flags */ + lp->rx_ring[rx_index].rx_flags &= RESET_RX_FLAGS; + goto err_next_pkt; + } + pkt_len = le16_to_cpu(lp->rx_ring[rx_index].msg_count) - 4; #if AMD8111E_VLAN_TAG_USED - vtag = le16_to_cpu(lp->rx_ring[rx_index].rx_flags) & TT_MASK; - /*MAC will strip vlan tag*/ - if(lp->vlgrp != NULL && vtag !=0) - min_pkt_len =MIN_PKT_LEN - 4; - else + vtag = status & TT_MASK; + /*MAC will strip vlan tag*/ + if(lp->vlgrp != NULL && vtag !=0) + min_pkt_len =MIN_PKT_LEN - 4; + else #endif - min_pkt_len =MIN_PKT_LEN; + min_pkt_len =MIN_PKT_LEN; - if (pkt_len < min_pkt_len) { - lp->rx_ring[rx_index].rx_flags &= RESET_RX_FLAGS; - lp->drv_rx_errors++; - goto err_next_pkt; - } - if(--rx_pkt_limit < 0) - goto rx_not_empty; - if(!(new_skb = dev_alloc_skb(lp->rx_buff_len))){ - /* if allocation fail, - ignore that pkt and go to next one */ - lp->rx_ring[rx_index].rx_flags &= RESET_RX_FLAGS; - lp->drv_rx_errors++; - goto err_next_pkt; - } + if (pkt_len < min_pkt_len) { + lp->rx_ring[rx_index].rx_flags &= RESET_RX_FLAGS; + lp->drv_rx_errors++; + goto err_next_pkt; + } + if(--rx_pkt_limit < 0) + goto rx_not_empty; + if(!(new_skb = dev_alloc_skb(lp->rx_buff_len))){ + /* if allocation fail, + ignore that pkt and go to next one */ + lp->rx_ring[rx_index].rx_flags &= RESET_RX_FLAGS; + lp->drv_rx_errors++; + goto err_next_pkt; + } - skb_reserve(new_skb, 2); - skb = lp->rx_skbuff[rx_index]; - pci_unmap_single(lp->pci_dev,lp->rx_dma_addr[rx_index], - lp->rx_buff_len-2, PCI_DMA_FROMDEVICE); - skb_put(skb, pkt_len); - skb->dev = dev; - lp->rx_skbuff[rx_index] = new_skb; - new_skb->dev = dev; - lp->rx_dma_addr[rx_index] = pci_map_single(lp->pci_dev, - new_skb->data, lp->rx_buff_len-2,PCI_DMA_FROMDEVICE); + skb_reserve(new_skb, 2); + skb = lp->rx_skbuff[rx_index]; + pci_unmap_single(lp->pci_dev,lp->rx_dma_addr[rx_index], + lp->rx_buff_len-2, PCI_DMA_FROMDEVICE); + skb_put(skb, pkt_len); + skb->dev = dev; + lp->rx_skbuff[rx_index] = new_skb; + new_skb->dev = dev; + lp->rx_dma_addr[rx_index] = pci_map_single(lp->pci_dev, + new_skb->data, + lp->rx_buff_len-2, + PCI_DMA_FROMDEVICE); - skb->protocol = eth_type_trans(skb, dev); + skb->protocol = eth_type_trans(skb, dev); #if AMD8111E_VLAN_TAG_USED - - vtag = lp->rx_ring[rx_index].rx_flags & TT_MASK; - if(lp->vlgrp != NULL && (vtag == TT_VLAN_TAGGED)){ - amd8111e_vlan_rx(lp, skb, - lp->rx_ring[rx_index].tag_ctrl_info); - } else + if(lp->vlgrp != NULL && (vtag == TT_VLAN_TAGGED)){ + amd8111e_vlan_rx(lp, skb, + le16_to_cpy(lp->rx_ring[rx_index].tag_ctrl_info)); + } else #endif - - netif_receive_skb(skb); - /*COAL update rx coalescing parameters*/ - lp->coal_conf.rx_packets++; - lp->coal_conf.rx_bytes += pkt_len; - num_rx_pkt++; - dev->last_rx = jiffies; + netif_receive_skb(skb); + /*COAL update rx coalescing parameters*/ + lp->coal_conf.rx_packets++; + lp->coal_conf.rx_bytes += pkt_len; + num_rx_pkt++; + dev->last_rx = jiffies; -err_next_pkt: - lp->rx_ring[rx_index].buff_phy_addr - = cpu_to_le32(lp->rx_dma_addr[rx_index]); - lp->rx_ring[rx_index].buff_count = + err_next_pkt: + lp->rx_ring[rx_index].buff_phy_addr + = cpu_to_le32(lp->rx_dma_addr[rx_index]); + lp->rx_ring[rx_index].buff_count = cpu_to_le16(lp->rx_buff_len-2); - lp->rx_ring[rx_index].rx_flags |= cpu_to_le16(OWN_BIT); - rx_index = (++lp->rx_idx) & RX_RING_DR_MOD_MASK; - } - /* Check the interrupt status register for more packets in the - mean time. Process them since we have not used up our quota.*/ + wmb(); + lp->rx_ring[rx_index].rx_flags |= cpu_to_le16(OWN_BIT); + rx_index = (++lp->rx_idx) & RX_RING_DR_MOD_MASK; + } + /* Check the interrupt status register for more packets in the + mean time. Process them since we have not used up our quota.*/ + + intr0 = readl(mmio + INT0); + /*Ack receive packets */ + writel(intr0 & RINT0,mmio + INT0); - intr0 = readl(mmio + INT0); - /*Ack receive packets */ - writel(intr0 & RINT0,mmio + INT0); - - }while(intr0 & RINT0); + } while(intr0 & RINT0); /* Receive descriptor is empty now */ dev->quota -= num_rx_pkt; @@ -873,11 +873,12 @@ /* If we own the next entry, it's a new packet. Send it up. */ while(++num_rx_pkt <= max_rx_pkt){ - if(lp->rx_ring[rx_index].rx_flags & OWN_BIT) + status = le16_to_cpu(lp->rx_ring[rx_index].rx_flags); + if(status & OWN_BIT) return 0; /* check if err summary bit is set */ - if(le16_to_cpu(lp->rx_ring[rx_index].rx_flags) & ERR_BIT){ + if(status & ERR_BIT){ /* * There is a tricky error noted by John Murphy, * to Russ Nelson: Even with full-sized @@ -888,7 +889,6 @@ goto err_next_pkt; } /* check for STP and ENP */ - status = le16_to_cpu(lp->rx_ring[rx_index].rx_flags); if(!((status & STP_BIT) && (status & ENP_BIT))){ /* reseting flags */ lp->rx_ring[rx_index].rx_flags &= RESET_RX_FLAGS; @@ -897,7 +897,7 @@ pkt_len = le16_to_cpu(lp->rx_ring[rx_index].msg_count) - 4; #if AMD8111E_VLAN_TAG_USED - vtag = le16_to_cpu(lp->rx_ring[rx_index].rx_flags) & TT_MASK; + vtag = status & TT_MASK; /*MAC will strip vlan tag*/ if(lp->vlgrp != NULL && vtag !=0) min_pkt_len =MIN_PKT_LEN - 4; @@ -931,12 +931,10 @@ skb->protocol = eth_type_trans(skb, dev); -#if AMD8111E_VLAN_TAG_USED - - vtag = lp->rx_ring[rx_index].rx_flags & TT_MASK; +#if AMD8111E_VLAN_TAG_USED if(lp->vlgrp != NULL && (vtag == TT_VLAN_TAGGED)){ amd8111e_vlan_rx(lp, skb, - lp->rx_ring[rx_index].tag_ctrl_info); + le16_to_cpu(lp->rx_ring[rx_index].tag_ctrl_info)); } else #endif @@ -952,6 +950,7 @@ = cpu_to_le32(lp->rx_dma_addr[rx_index]); lp->rx_ring[rx_index].buff_count = cpu_to_le16(lp->rx_buff_len-2); + wmb(); lp->rx_ring[rx_index].rx_flags |= cpu_to_le16(OWN_BIT); rx_index = (++lp->rx_idx) & RX_RING_DR_MOD_MASK; } @@ -1432,7 +1431,7 @@ #if AMD8111E_VLAN_TAG_USED if((lp->vlgrp != NULL) && vlan_tx_tag_present(skb)){ lp->tx_ring[tx_index].tag_ctrl_cmd |= - cpu_to_le32(TCC_VLAN_INSERT); + cpu_to_le16(TCC_VLAN_INSERT); lp->tx_ring[tx_index].tag_ctrl_info = cpu_to_le16(vlan_tx_tag_get(skb)); @@ -1444,6 +1443,7 @@ (u32) cpu_to_le32(lp->tx_dma_addr[tx_index]); /* Set FCS and LTINT bits */ + wmb(); lp->tx_ring[tx_index].tx_flags |= cpu_to_le16(OWN_BIT | STP_BIT | ENP_BIT|ADD_FCS_BIT|LTINT_BIT); @@ -1667,7 +1667,7 @@ switch(cmd) { case SIOCGMIIPHY: - data->phy_id = PHY_ID; + data->phy_id = lp->ext_phy_addr; /* fallthru */ case SIOCGMIIREG: @@ -1940,6 +1940,26 @@ } +static void __devinit amd8111e_probe_ext_phy(struct net_device* dev) +{ + struct amd8111e_priv *lp = netdev_priv(dev); + int i; + + for (i = 0x1e; i >= 0; i--) { + u32 id1, id2; + + if (amd8111e_read_phy(lp, i, MII_PHYSID1, &id1)) + continue; + if (amd8111e_read_phy(lp, i, MII_PHYSID2, &id2)) + continue; + lp->ext_phy_id = (id1 << 16) | id2; + lp->ext_phy_addr = i; + return; + } + lp->ext_phy_id = 0; + lp->ext_phy_addr = 1; +} + static int __devinit amd8111e_probe_one(struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -2010,12 +2030,6 @@ lp->amd8111e_net_dev = dev; lp->pm_cap = pm_cap; - /* setting mii default values */ - lp->mii_if.dev = dev; - lp->mii_if.mdio_read = amd8111e_mdio_read; - lp->mii_if.mdio_write = amd8111e_mdio_write; - lp->mii_if.phy_id = PHY_ID; - spin_lock_init(&lp->lock); lp->mmio = ioremap(reg_addr, reg_len); @@ -2063,7 +2077,15 @@ dev->vlan_rx_register =amd8111e_vlan_rx_register; dev->vlan_rx_kill_vid = amd8111e_vlan_rx_kill_vid; #endif - + /* Probe the external PHY */ + amd8111e_probe_ext_phy(dev); + + /* setting mii default values */ + lp->mii_if.dev = dev; + lp->mii_if.mdio_read = amd8111e_mdio_read; + lp->mii_if.mdio_write = amd8111e_mdio_write; + lp->mii_if.phy_id = lp->ext_phy_addr; + /* Set receive buffer length and set jumbo option*/ amd8111e_set_rx_buff_len(dev); @@ -2096,6 +2118,12 @@ for (i = 0; i < 6; i++) printk("%2.2x%c",dev->dev_addr[i],i == 5 ? ' ' : ':'); printk( "\n"); + if (lp->ext_phy_id) + printk(KERN_INFO "%s: Found MII PHY ID 0x%08x at address 0x%02x\n", + dev->name, lp->ext_phy_id, lp->ext_phy_addr); + else + printk(KERN_INFO "%s: Couldn't detect MII PHY, assuming address 0x01\n", + dev->name); return 0; err_iounmap: iounmap(lp->mmio); diff -Nru a/drivers/net/amd8111e.h b/drivers/net/amd8111e.h --- a/drivers/net/amd8111e.h 2004-10-30 09:31:01 -04:00 +++ b/drivers/net/amd8111e.h 2004-10-30 09:31:01 -04:00 @@ -649,7 +649,6 @@ #define TCC_MASK 0x0003 /* driver ioctl parameters */ -#define PHY_ID 0x01 /* currently it is fixed */ #define AMD8111E_REG_DUMP_LEN 13*sizeof(u32) /* crc generator constants */ @@ -777,6 +776,8 @@ int options; /* Options enabled/disabled for the device */ unsigned long ext_phy_option; + int ext_phy_addr; + u32 ext_phy_id; struct amd8111e_link_config link_config; int pm_cap; diff -Nru a/drivers/net/smc91x.h b/drivers/net/smc91x.h --- a/drivers/net/smc91x.h 2004-10-30 09:31:01 -04:00 +++ b/drivers/net/smc91x.h 2004-10-30 09:31:01 -04:00 @@ -245,7 +245,7 @@ while (!(DCSR(dma) & DCSR_STOPSTATE)) cpu_relax(); DCSR(dma) = 0; - dma_unmap_single(NULL, dmabuf, len, PCI_DMA_FROMDEVICE); + dma_unmap_single(NULL, dmabuf, len, DMA_FROM_DEVICE); } #endif @@ -273,7 +273,7 @@ } len *= 2; - dmabuf = dma_map_single(NULL, buf, len, PCI_DMA_FROMDEVICE); + dmabuf = dma_map_single(NULL, buf, len, DMA_FROM_DEVICE); DCSR(dma) = DCSR_NODESC; DTADR(dma) = dmabuf; DSADR(dma) = physaddr + reg; diff -Nru a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c --- a/drivers/net/via-rhine.c 2004-10-30 09:31:01 -04:00 +++ b/drivers/net/via-rhine.c 2004-10-30 09:31:01 -04:00 @@ -627,7 +627,7 @@ } #ifdef USE_MMIO -static void __devinit enable_mmio(long pioaddr, u32 quirks) +static void enable_mmio(long pioaddr, u32 quirks) { int n; if (quirks & rqRhineI) { From jgarzik@pobox.com Sat Oct 30 07:13:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 07:13:53 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UEDlSw024193 for ; Sat, 30 Oct 2004 07:13:48 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CNtyy-00005t-Tb; Sat, 30 Oct 2004 15:13:29 +0100 Message-ID: <4183A17C.3090502@pobox.com> Date: Sat, 30 Oct 2004 10:13:16 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Manfred Spraul CC: marcelo.tosatti@cyclades.com, blazara@nvidia.com, netdev@oss.sgi.com Subject: Re: [PATCH 2.4.28-rc1-bk3] forcedeth: Backport of gigabit ethernet support and media detection rewrite References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11187 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 applied From jgarzik@pobox.com Sat Oct 30 08:02:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 08:02:38 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UF2X83025582 for ; Sat, 30 Oct 2004 08:02:33 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CNukC-0000zh-As; Sat, 30 Oct 2004 16:02:16 +0100 Message-ID: <4183ACEB.7090501@pobox.com> Date: Sat, 30 Oct 2004 11:02:03 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Margit Schubert-While CC: netdev@oss.sgi.com, prism54-devel@prism54.org Subject: Re: [PATCH 1/2 linux-2.6.9-rc3/linux-2.4.28-pre4] prism54 fix resume processing References: <200410101530.08274.margitsw@t-online.de> In-Reply-To: <200410101530.08274.margitsw@t-online.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11188 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 applied to 2.4 and 2.6 From pranav@nodeinfotech.com Sat Oct 30 08:31:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 08:31:34 -0700 (PDT) Received: from localhost.localdomain (dialpool-210-214-19-216.maa.sify.net [210.214.19.216]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UFVQR1029806; Sat, 30 Oct 2004 08:31:28 -0700 Received: from pranav ([192.168.10.220]) by localhost.localdomain (8.11.2/8.11.2) with SMTP id i9UFhXr01035; Sat, 30 Oct 2004 21:13:34 +0530 Reply-To: From: "Pranav" To: , Cc: Subject: Small Help required Date: Sat, 30 Oct 2004 21:01:06 +0530 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-archive-position: 11189 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pranav@nodeinfotech.com Precedence: bulk X-list: netdev hi, I needed some information about how to proceed with implementing a Name Switch Server plugin that allows to resolve multicast DNS names using normal libc calls(such as gethostbyname()). If someone has knowledge in this regard,please mail me back. Thank's With Regards, Pranav. From pranav@nodeinfotech.com Sat Oct 30 08:33:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 08:33:20 -0700 (PDT) Received: from localhost.localdomain (dialpool-210-214-19-216.maa.sify.net [210.214.19.216]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UFXEEj030078; Sat, 30 Oct 2004 08:33:15 -0700 Received: from pranav ([192.168.10.220]) by localhost.localdomain (8.11.2/8.11.2) with SMTP id i9UFjMr01039; Sat, 30 Oct 2004 21:15:22 +0530 Reply-To: From: "Pranav" To: , Cc: Subject: Small Help required!!! Date: Sat, 30 Oct 2004 21:02:55 +0530 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-archive-position: 11190 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: pranav@nodeinfotech.com Precedence: bulk X-list: netdev hi, I needed some information about how to proceed with implementing a Name Switch Server plugin that allows to resolve multicast DNS names using normal libc calls(such as gethostbyname()). If someone has knowledge in this regard,please mail me back. Thank's With Regards, Pranav. From garzik@havoc.gtf.org Sat Oct 30 08:53:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 08:54:00 -0700 (PDT) Received: from havoc.gtf.org (havoc.gtf.org [69.28.190.101]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UFrrOu031087 for ; Sat, 30 Oct 2004 08:53:54 -0700 Received: from havoc.gtf.org (havoc.gtf.org [127.0.0.1]) by havoc.gtf.org (Postfix) with ESMTP id F2C1E7A10; Sat, 30 Oct 2004 11:53:30 -0400 (EDT) Received: (from garzik@localhost) by havoc.gtf.org (8.12.10/8.12.10/Submit) id i9UFrUTi011941; Sat, 30 Oct 2004 11:53:30 -0400 Date: Sat, 30 Oct 2004 11:53:30 -0400 From: Jeff Garzik To: netdev@oss.sgi.com Cc: akpm@osdl.org Subject: [BK PATCHES] netdev-2.6 queue updated Message-ID: <20041030155330.GA11929@havoc.gtf.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.4.1i X-archive-position: 11191 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 BK users: bk pull bk://gkernel.bkbits.net/netdev-2.6 Patch users: I'm too slack to do a patch today. This will update the following files: drivers/net/3c505.c | 10 drivers/net/3c507.c | 148 ++-- drivers/net/3c59x.c | 1 drivers/net/8139cp.c | 102 ++- drivers/net/8139too.c | 98 +- drivers/net/8390.c | 1 drivers/net/8390.h | 1 drivers/net/Kconfig | 19 drivers/net/ac3200.c | 64 - drivers/net/atp.c | 2 drivers/net/bonding/bond_3ad.c | 10 drivers/net/depca.c | 24 drivers/net/e100.c | 1 drivers/net/e2100.c | 18 drivers/net/eepro100.c | 293 +++----- drivers/net/fealnx.c | 275 +++----- drivers/net/hp100.c | 65 + drivers/net/lne390.c | 64 - drivers/net/mace.c | 66 -- drivers/net/ne3210.c | 34 - drivers/net/pcmcia/fmvj18x_cs.c | 4 drivers/net/pcmcia/ibmtr_cs.c | 7 drivers/net/pcmcia/pcnet_cs.c | 39 - drivers/net/pcmcia/smc91c92_cs.c | 2 drivers/net/pcmcia/xirc2ps_cs.c | 2 drivers/net/r8169.c | 855 +++++++++++++++++++------- drivers/net/skfp/h/fplustm.h | 6 drivers/net/skfp/h/targethw.h | 6 drivers/net/skfp/h/targetos.h | 2 drivers/net/skfp/h/types.h | 21 drivers/net/skfp/skfddi.c | 25 drivers/net/skfp/smt.c | 7 drivers/net/smc91x.h | 43 + drivers/net/starfire.c | 79 +- drivers/net/sundance.c | 259 +++---- drivers/net/tlan.c | 72 +- drivers/net/tlan.h | 88 -- drivers/net/tokenring/3c359.c | 36 - drivers/net/tokenring/3c359.h | 2 drivers/net/tokenring/ibmtr.c | 158 ++-- drivers/net/tokenring/lanstreamer.c | 24 drivers/net/tokenring/lanstreamer.h | 2 drivers/net/tokenring/olympic.c | 94 +- drivers/net/tulip/de2104x.c | 1 drivers/net/tulip/dmfe.c | 1 drivers/net/tulip/tulip_core.c | 3 drivers/net/tulip/winbond-840.c | 3 drivers/net/tulip/xircom_tulip_cb.c | 1 drivers/net/typhoon.c | 3 drivers/net/via-rhine.c | 276 ++++---- drivers/net/via-velocity.h | 4 drivers/net/wan/c101.c | 3 drivers/net/wan/n2.c | 5 drivers/net/wireless/airo.c | 42 - drivers/net/wireless/airport.c | 5 drivers/net/wireless/arlan-main.c | 90 +- drivers/net/wireless/arlan-proc.c | 15 drivers/net/wireless/arlan.h | 26 drivers/net/wireless/hermes.c | 43 - drivers/net/wireless/hermes.h | 62 - drivers/net/wireless/netwave_cs.c | 75 +- drivers/net/wireless/orinoco_cs.c | 10 drivers/net/wireless/orinoco_pci.c | 7 drivers/net/wireless/orinoco_plx.c | 82 +- drivers/net/wireless/orinoco_tmd.c | 51 - drivers/net/wireless/prism54/isl_ioctl.c | 24 drivers/net/wireless/prism54/islpci_hotplug.c | 2 drivers/net/wireless/prism54/prismcompat.h | 4 drivers/net/wireless/ray_cs.c | 4 drivers/net/wireless/wavelan_cs.c | 25 drivers/net/wireless/wavelan_cs.p.h | 1 include/linux/ibmtr.h | 15 include/linux/pci_ids.h | 3 include/pcmcia/mem_op.h | 89 +- 74 files changed, 2208 insertions(+), 1896 deletions(-) through these ChangeSets: : o [netdrvr 8139cp] add PCI ID Adrian Bunk: o net/skfp/smt.c: remove an unused function o net/3c505.c: remove unused functions o bonding: remove an unused function o net/wan/n2.c: remove an unused function Alexander Viro: o mace iomem annotations - trivial part o airo iomem annotations o wavelan_cs iomem annotations o lne390 iomem annotations and fixes o fealnx iomem annotations, switch to io{read,write} o wireless iomem annotations and fixes, switch to io{read,write} o ibmtr annotations - the rest o skfp iomem annotations, switch to io{read,write} o olympic_open() cleanup and fixes o sundance iomem annotations, switch to io{read,write} o via-rhine iomem annotations, switch to io{read,write} o net/pcmcia iomem annotations o netwave iomem annotations o arlan iomem annotations and cleanups o netdev_priv() in netwave_cs o netdev_priv() in arlan o (25/32) lanstreamer iomem annotations o beginning of ibmtr iomem annotations o e2100 iomem annotations and fixes o 3c359 iomem annotations o depca iomem annotations o killed isa_... in 3c507 o starfire iomem annotations o ne3210 iomem annotations o ac3200 iomem annotations and fixes o iomem annotations in r8169 Andrew Morton: o r8169 module_param build fix Arjan van de Ven: o ray_cs export cleanup Christoph Hellwig: o unexport ei_tx_timeout David Dillow: o net/typhoon.c: use previously-unused function David S. Miller: o eepro100.c iomap conversion Felipe Damasio: o 8139cp net driver: add MODULE_VERSION François Romieu: o r8169: netconsole support o r8169: unneeded synchronize_irq() o r8169: always clean Tx desc o r8169: cleanup o r8169: rtl8169_close() races o r8169: automatic pci dac step down o r8169: wrong advertisement of VLAN features o r8169: Tx timeout rework o r8169: default on disabling PCIDAC o r8169: Mac identifier extracted from Realtek's driver v2.2 o r8169: TSO support o r8169: hint for Tx flow control o r8169: miscalculation of available Tx descriptors o 8139cp: SG support fixes o r8169: vlan support o r8169: Rx checksum support o r8169: advertise DMA to high memory o r8169: Tx checksum offload o r8169: comment a gcc 2.95.x bug o r8169: sync the names of a few bits with the 8139cp driver o r8169: bump version number o r8169: enable MWI o r8169: code cleanup o r8169: per device receive buffer size o r8169: add ethtool_ops.{get_regs_len/get_regs} Jeff Garzik: o [netdrvr eepro100] fix pci_iomap() args and info msg that follows o [netdrvr 8139cp] TSO support John W. Linville: o tulip: Add MODULE_VERSION o e100: Add MODULE_VERSION o r8169: Add MODULE_VERSION o 8139too: Add MODULE_VERSION o 3c59x: Add MODULE_VERSION o r8169: simplify trick if() expression o r8169: fix RxVlan bit manipulation o r8169: endian-swap return of rtl8169_tx_vlan_tag() Krzysztof Halasa: o net/wan/n2.c: remove an unused function Margit Schubert-While: o prism54 sparse fixes o prism54 fix resume processing Rene Herman: o 8139too Interframe Gap Time Roger Luethi: o mc_filter on big-endian arch Steffen Klassert: o 8139cp - add netpoll support Stephen Hemminger: o tlan: enable faster hash function o tlan: make inline's static (rev2) o tlan: get rid of unneeded global vars (rev 2) o tlan: use netdev_priv (rev 2) o hp100: use inline for comple usage of dev->priv o hp100: use netdev_priv (rev 2) o via-velocity: get rid of unused global o via-rhine: free_ring should be static o via-rhine: use module_param o 8139too: use netdev_priv o r8169: use netdev_priv o r8169: use module_param o 8139cp - module_param Thomas Gleixner: o rtl8139too.c: Fix missing pci_disable_dev o rtl8139too.c: Fix missing pci_disable_dev From mic@maxipes.logix.cz Sat Oct 30 09:57:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 09:57:44 -0700 (PDT) Received: from maxipes.logix.cz ([217.11.251.249]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UGvbMT000862 for ; Sat, 30 Oct 2004 09:57:38 -0700 Received: by maxipes.logix.cz (Postfix, from userid 500) id BD7F01F476; Sat, 30 Oct 2004 18:57:20 +0200 (CEST) Date: Sat, 30 Oct 2004 18:57:20 +0200 (CEST) From: Michal Ludvig To: Evgeniy Polyakov Cc: netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. In-Reply-To: <20041030091932.6a74bdae@zanzibar.2ka.mipt.ru> Message-ID: References: <1099030958.4944.148.camel@uganda> <20041030091932.6a74bdae@zanzibar.2ka.mipt.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 11192 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: michal@logix.cz Precedence: bulk X-list: netdev On Sat, 30 Oct 2004, Evgeniy Polyakov wrote: > On Fri, 29 Oct 2004 13:44:24 -0400 (EDT) > James Morris wrote: > > > On Fri, 29 Oct 2004, Evgeniy Polyakov wrote: > > > > > I'm pleased to announce asynchronous crypto layer for Linux kernel 2.6. > > > > Could you please resend as a patch against the latest bk snapshot? > > > > i.e. output of 'diff -purN tree-a tree-b' > > > > Attached following patches: > > Kconfig.connector.patch > Kconfig.crypto.patch > Makefile.connector.patch > Makefile.crypto.patch > acrypto.patch > connector.patch Hi Evgeniy, I have compiled and booted with your patches. Not too much playing around so far. Anyway some quick observations: - "rmmod simple_lb" hangs because: | <6>You are removing crypto load balancer simple_lb which is current and | default. | There is no other crypto load balancers. Removing is delayed untill new | load balancer is registered. Of course I can't re-add it because the module is still there. In this case rmmod should fail with a gentle message (-EBUSY) instead of hang. Or let it go if not in use. - In the kernel config ACRYPTO depends on CONNECTOR, but is above it in the menuconfig. - I would choose a different directory strucrure. Instead of drivers/acrypto and drivers/connector I'd put the device-independent parrts info e.g. crypto/acrypto and the drivers (e.g. Fcrypt or PadLock) into drivers/crypto. - For other interested: concatenated patch with some very minor tweaks is at http://www.logix.cz/michal/dl/acrypto/acrypto.diff My changes are in mludvig.diff in the same directory. It applies cleanly to BitKeeper tree as well. Michal Ludvig -- * A mouse is a device used to point at the xterm you want to type in. * Personal homepage - http://www.logix.cz/michal From johnpol@2ka.mipt.ru Sat Oct 30 10:23:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 10:24:01 -0700 (PDT) Received: from mailer.campus.mipt.ru (mailer.campus.mipt.ru [194.85.82.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UHNmqF001759 for ; Sat, 30 Oct 2004 10:23:48 -0700 Received: from ffke-campus-gw.mipt.ru (2ka [194.85.82.65]) by mailer.campus.mipt.ru (8.13.1/8.13.1) with ESMTP id i9UHNhSQ002015; Sat, 30 Oct 2004 21:23:43 +0400 Received: from zanzibar.2ka.mipt.ru (zanzibar.2ka.mipt.ru [194.85.82.77]) by ffke-campus-gw.mipt.ru (8.12.11/8.12.11) with SMTP id i9UHNUZb024129; Sat, 30 Oct 2004 21:23:31 +0400 Date: Sat, 30 Oct 2004 21:40:50 +0400 From: Evgeniy Polyakov To: Michal Ludvig Cc: netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. Message-ID: <20041030214050.7e23d7b8@zanzibar.2ka.mipt.ru> In-Reply-To: References: <1099030958.4944.148.camel@uganda> <20041030091932.6a74bdae@zanzibar.2ka.mipt.ru> Reply-To: johnpol@2ka.mipt.ru Organization: MIPT X-Mailer: Sylpheed-Claws 0.9.12b (GTK+ 1.2.10; i386-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11193 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: johnpol@2ka.mipt.ru Precedence: bulk X-list: netdev On Sat, 30 Oct 2004 18:57:20 +0200 (CEST) Michal Ludvig wrote: > On Sat, 30 Oct 2004, Evgeniy Polyakov wrote: > > > On Fri, 29 Oct 2004 13:44:24 -0400 (EDT) > > James Morris wrote: > > > > > On Fri, 29 Oct 2004, Evgeniy Polyakov wrote: > > > > > > > I'm pleased to announce asynchronous crypto layer for Linux kernel 2.6. > > > > > > Could you please resend as a patch against the latest bk snapshot? > > > > > > i.e. output of 'diff -purN tree-a tree-b' > > > > > > > Attached following patches: > > > > Kconfig.connector.patch > > Kconfig.crypto.patch > > Makefile.connector.patch > > Makefile.crypto.patch > > acrypto.patch > > connector.patch > > Hi Evgeniy, > > I have compiled and booted with your patches. Not too much > playing around so far. Anyway some quick observations: I've wrote mega block device which can work(without hang) only with 10mb "disks", but what did you expect from midnight hack after several Staropramen's :) Give me several minutes to complete async_provider.c and I will post numbers, which I expect will be the same for both sync and async driver since I do not have neither SMP(which should benefit I believe) nor crypto card here. > - "rmmod simple_lb" hangs because: > | <6>You are removing crypto load balancer simple_lb which is current and > | default. > | There is no other crypto load balancers. Removing is delayed untill new > | load balancer is registered. > Of course I can't re-add it because the module is still there. In this > case rmmod should fail with a gentle message (-EBUSY) instead of hang. Or > let it go if not in use. acrypto module has parameter force_lb_remove which if is set allows to remove last crypto load balancer. But ut has atricky moment - since any crypto_session_alloc() may occur asyncronously then we can not say if there are any load balancer users without some locks. Currently if there is no any crypto load balancer, then acrypto will catch BUG_ON(). I will think of it some more. > - In the kernel config ACRYPTO depends on CONNECTOR, but is above it in > the menuconfig. > > - I would choose a different directory strucrure. Instead of > drivers/acrypto and drivers/connector I'd put the device-independent > parrts info e.g. crypto/acrypto and the drivers (e.g. Fcrypt or PadLock) > into drivers/crypto. connector is independent module - it is used instead of ioctl for diagnostic. So I think it should live in drivers/connector. I do not have any objection against your tree schema for crypto stuff. > - For other interested: concatenated patch with some very minor tweaks is > at http://www.logix.cz/michal/dl/acrypto/acrypto.diff > My changes are in mludvig.diff in the same directory. > It applies cleanly to BitKeeper tree as well. I totally agree with your changes, thank you. Note: KERN_EMERG was put into dprintk to allow netconsole send this data by default. > Michal Ludvig > -- > * A mouse is a device used to point at the xterm you want to type in. > * Personal homepage - http://www.logix.cz/michal Evgeniy Polyakov Only failure makes us experts. -- Theo de Raadt From webvenza@libero.it Sat Oct 30 12:00:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 12:00:31 -0700 (PDT) Received: from gateway.milesteg.arr (venza@adsl-ull-116-134.44-151.net24.it [151.44.134.116]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UJ0NkZ004534 for ; Sat, 30 Oct 2004 12:00:24 -0700 Date: Sat, 30 Oct 2004 21:00:01 +0200 From: Daniele Venzano To: NetDev Cc: Malte =?iso-8859-1?Q?Schr=F6der?= , Jeff Garzik Subject: Re: [PATCH] WOL for sis900 Message-ID: <20041030185959.GA7088@renditai.milesteg.arr> Mail-Followup-To: NetDev , Malte =?iso-8859-1?Q?Schr=F6der?= , Jeff Garzik References: <4183B6B0.7010906@gmx.de> <4183BDB3.8000302@pobox.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="J2SCkAp4GZ/dPZZf" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4183BDB3.8000302@pobox.com> X-Operating-System: Debian GNU/Linux on kernel Linux 2.6.9 X-Copyright: Forwarding or publishing without permission is prohibited. X-Truth: La vita e' una questione di culo, o ce l'hai o te lo fanno. X-GPG-Fingerprint: 642A A345 1CEF B6E3 925C 23CE DAB9 8764 25B3 57ED User-Agent: Mutt/1.5.6+20040722i X-archive-position: 11194 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: webvenza@libero.it Precedence: bulk X-list: netdev --J2SCkAp4GZ/dPZZf Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Sat, Oct 30, 2004 at 12:13:39PM -0400, Jeff Garzik wrote: > Malte Schröder wrote: > >Hello, > >I have applied the patch from http://lkml.org/lkml/2003/7/16/88 manually > >to 2.6.7 (also works on 2.6.{8,9}) and have been using it since then. > >Attached is a diff against 2.6.9. > > 2) Please use ethtool to enable/disable WOL. No need for a module option. Attached is a first try at this wol via ethtool thing. I don't think to have got it right, but here it is. I tried to test WoL on my laptop, obvioulsy it didn't work, but I don't even know if I have the hardware support for it. On this page: http://www.sis.com/products/connectivity/900.htm it says that the magic packet feature is optional. I would really like to have some way to check if WoL is supported by the hardware before thinking to include this. I didn't find any documentation of some use for this. Finally, I have never realized the sorry state of sis900 wrt ethtool, I'll try to get some more support... The attached patch is against clean 2.6.9 and is NOT for inclusion. -- ------------------------------ Daniele Venzano Web: http://teg.homeunix.org --J2SCkAp4GZ/dPZZf Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="sis900_wol_ethtool.diff" Index: sis900.c =================================================================== --- sis900.c (revision 13) +++ sis900.c (working copy) @@ -120,6 +120,7 @@ } mii_chip_table[] = { { "SiS 900 Internal MII PHY", 0x001d, 0x8000, LAN }, { "SiS 7014 Physical Layer Solution", 0x0016, 0xf830, LAN }, + { "Altimata AC101LF PHY", 0x0022, 0x5520, LAN }, { "AMD 79C901 10BASE-T PHY", 0x0000, 0x6B70, LAN }, { "AMD 79C901 HomePNA PHY", 0x0000, 0x6B90, HOME}, { "ICS LAN PHY", 0x0015, 0xF440, LAN }, @@ -1903,8 +1904,41 @@ strcpy (info->bus_info, pci_name(sis_priv->pci_dev)); } +static int sis900_set_wol(struct net_device *net_dev, struct ethtool_wolinfo *wol) +{ + struct sis900_private *sis_priv = net_dev->priv; + long ioaddr = net_dev->base_addr; + u32 cfgpmcsr; + + if (wol->wolopts & WAKE_MAGIC) { + pci_read_config_dword(sis_priv->pci_dev, CFGPMCSR, &cfgpmcsr); + cfgpmcsr |= PME_EN; + pci_write_config_dword(sis_priv->pci_dev, CFGPMCSR, cfgpmcsr); + outl(inl(ioaddr + pmctrl) | MAGICPKT | ALGORITHM, ioaddr + pmctrl); + } else if (wol->wolopts) { + return -EINVAL; + } else { + pci_read_config_dword(sis_priv->pci_dev, CFGPMCSR, &cfgpmcsr); + cfgpmcsr |= ~PME_EN; + pci_write_config_dword(sis_priv->pci_dev, CFGPMCSR, cfgpmcsr); + outl(inl(ioaddr + pmctrl) & ~MAGICPKT, ioaddr + pmctrl); + } + + return 0; +} + +static void sis900_get_wol(struct net_device *net_dev, struct ethtool_wolinfo *wol) +{ + long ioaddr = net_dev->base_addr; + + if (inl(ioaddr + pmctrl) & MAGICPKT, ioaddr + pmctrl) + wol->wolopts |= WAKE_MAGIC; +} + static struct ethtool_ops sis900_ethtool_ops = { .get_drvinfo = sis900_get_drvinfo, + .get_wol = sis900_get_wol, + .set_wol = sis900_set_wol, }; /** Index: sis900.h =================================================================== --- sis900.h (revision 13) +++ sis900.h (working copy) @@ -140,6 +140,25 @@ EEREQ = 0x00000400, EEDONE = 0x00000200, EEGNT = 0x00000100 }; +/* Wake-on-LAN support. */ +enum sis900_power_management_control_register_bits { + LINKLOSS = 0x00000001, + LINKON = 0x00000002, + MAGICPKT = 0x00000400, + ALGORITHM = 0x00000800, + FRM1EN = 0x00100000, + FRM2EN = 0x00200000, + FRM3EN = 0x00400000, + FRM1ACS = 0x01000000, + FRM2ACS = 0x02000000, + FRM3ACS = 0x04000000, + WAKEALL = 0x40000000, + GATECLK = 0x80000000 +}; + +#define CFGPMCSR 0x44 +#define PME_EN 0x100 + /* Management Data I/O (mdio) frame */ #define MIIread 0x6000 #define MIIwrite 0x5002 --J2SCkAp4GZ/dPZZf-- From hadi@cyberus.ca Sat Oct 30 12:10:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 12:10:48 -0700 (PDT) Received: from mx02.cybersurf.com (mx02.cybersurf.com [209.197.145.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UJAgWW005122 for ; Sat, 30 Oct 2004 12:10:43 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1CNycK-0005RG-O7 for netdev@oss.sgi.com; Sat, 30 Oct 2004 15:10:24 -0400 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CNycI-0001CM-9T; Sat, 30 Oct 2004 15:10:22 -0400 Subject: Re: [PATCH 2.6] dev.c: clear SIOCGIFHWADDR buffer if !dev->addr_len From: jamal Reply-To: hadi@cyberus.ca To: Matt Domsch Cc: Herbert Xu , netdev@oss.sgi.com In-Reply-To: <20041030030936.GA25102@lists.us.dell.com> References: <20041030013700.GA21540@lists.us.dell.com> <20041030030936.GA25102@lists.us.dell.com> Content-Type: text/plain Organization: jamalopolous Message-Id: <1099163419.1039.97.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 30 Oct 2004 15:10:19 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 11195 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev On Fri, 2004-10-29 at 23:09, Matt Domsch wrote: > On Sat, Oct 30, 2004 at 11:51:01AM +1000, Herbert Xu wrote: > > > s/dev_addr/addr_len in the comments above, that's the field we care > > > about being non-zero. > > > > This still doesn't make sense. What if dev->addr_len is less than the > > size of the buffer? The caller has to know what the length is anyway. > > Ahh, indeed. net-snmp has hard-coded the number 6 or uses the > definition of IFHWADDRLEN (from include/linux/if.h, a copy of which is > in /usr/include/linux/if.h of course) in several places for this. fix the net-snmp code. The addr_len is dependent on the device type. 6 is good for ethernet but may not equate for others. Having said that i think we should somehow signal that info to user space. perhaps returning -EINVAL in the case the L2 address is 0? EINVAL will break a few apps and make them puke as opposed to silently returning something wrong. cheers, jamal From jmorris@redhat.com Sat Oct 30 12:42:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 12:42:48 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UJgifn009372 for ; Sat, 30 Oct 2004 12:42:44 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9UJgI2B021767; Sat, 30 Oct 2004 15:42:18 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9UJgIr11503; Sat, 30 Oct 2004 15:42:18 -0400 Received: from thoron.boston.redhat.com (thoron.boston.redhat.com [172.16.80.63]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9UJgGFF000830; Sat, 30 Oct 2004 15:42:16 -0400 Date: Sat, 30 Oct 2004 15:42:17 -0400 (EDT) From: James Morris X-X-Sender: jmorris@thoron.boston.redhat.com To: Michal Ludvig cc: Evgeniy Polyakov , , Subject: Re: Asynchronous crypto layer. In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 11196 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jmorris@redhat.com Precedence: bulk X-list: netdev On Sat, 30 Oct 2004, Michal Ludvig wrote: > - I would choose a different directory strucrure. Instead of > drivers/acrypto and drivers/connector I'd put the device-independent > parrts info e.g. crypto/acrypto and the drivers (e.g. Fcrypt or PadLock) Agreed, do we need a separate acrypto subdirectory? Why not just put the async code directly under crypto. - James -- James Morris From tgraf@suug.ch Sat Oct 30 12:44:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 12:44:40 -0700 (PDT) Received: from b.mx.projectdream.org (eth0-0.arisu.projectdream.org [194.158.4.191]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UJiVLE009677 for ; Sat, 30 Oct 2004 12:44:32 -0700 Received: from postel.suug.ch (unknown [195.134.158.23]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by b.mx.projectdream.org (Postfix) with ESMTP id 7639882 for ; Sat, 30 Oct 2004 21:43:52 +0200 (CEST) Received: by postel.suug.ch (Postfix, from userid 10001) id 595171C0E9; Sat, 30 Oct 2004 21:44:35 +0200 (CEST) Date: Sat, 30 Oct 2004 21:44:35 +0200 From: Thomas Graf To: netdev@oss.sgi.com Subject: [ANNOUNCE] netlink library Message-ID: <20041030194435.GG12289@postel.suug.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-archive-position: 11197 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: tgraf@suug.ch Precedence: bulk X-list: netdev Fellow netlink supporters, This might be interesting for everyone planning to write a netlink application in the future. I will work further on it but I think it's worth a release and a short annoucenement. Comments very much appreciated. libnl - netlink library ======================= http://people.suug.ch/~tgr/libnl/ The library is divided into a core providing: o handling netlink connections o sending of raw data or complete netlink messages. o receiving of single messages with MSG_PEEK support to ajdust receive buffer o receiving of complete multipart message sets with the support of callbacks o callback points for handlers, currently the following are implemented: - "valid" message (multipart/single) - "finish" end of multipart message - "overrun" overrun occured - "skipped" message to be skipped - "ack" netlink ack message - "error" netlink error message - "invalid" invalid/malformed message - "msg_in" called for every message received - "msg_out" called before a message gets sent out Handlers of such callbacks can return one of the actions: proceed,skip,exit to change the behaviour of the parser. 3 sets of default handlers exist: - default: what you would expect, quiet - verbose: same as default but prints error messages and warns if a valid message is not handled, etc. - debug: same as verbose but prints message headers for every callback and does hex/ascii dumps in msg_in and msg_out. o abstract data types for network addresses and arbitary data o netlink message construction tools to build netlink messages. Supports appending of raw data, TLVs and nested TLVs and results in a nlmsghdr that can be directly used, reqired memory is allocated as needed, etc. o character string from/to type number transformation routines ... a caching API for netlink users: o caching API that netlink users can use to store a list of items from a dump. o cache_ops which can be implemented by netlink users to abstract their functionality to a generic API. Currently the following must be implemented: - request_update, must request a dump via netlink message - msg_parser, must parse a responose and add items to cache - free_data, must free data of a cache item - dump_brief, must briefly dump item attributes (1-line) - dump_full, must dump all attributes - dump_with_stas, must dump all attributes including statistics - filter, must compare 2 objects of its own and tell if they match o generic routines to access such caches: dump_cache dump_cache_with_filter foreach foreach_filter ... implementation for specific netlink families/users: o the core provides an API for netlink families/users implementions to register themselves. Link Layer ---------- o implements above cache API o setting of link attributes o name <-> ifindex conversions Neighbour -------- o implements above cache API o adding/modyfing/deleting of neighbours TCA (Generic routines for all generic TC related routines) ---------------------------------------------------------- o statistic API with backward compatibility if new stats are being added. o generic message parsers Qdisc/Classes ------------- o implements above cache API o provides register API to qdisc/class sub implementations. The following are implemented so far: cbq, dsmark, fifo, prio, sfq, tbf o Deletion of single, root, and ingress qdisc o Add/Modify yet to be written Filters ------- o implements above cache API o provides register API to cls sub implementations. u32 is the only supported so far. o Add/Deletion of filters Some Design Notes ----------------- o No kernel headers are included in public header files, all definitions used in public header files are included in those header files but protected with ifdefs so they can be overruled by including the kernel header before the library headers. o Own strctures are used instead of just providing the kernel structures received in the TLVs so older applications can live forever. Examples (Probably better than the huge list above ;->) ====================================================== Link layer ---------- Retrieving a local cache: struct nl_cache link_cache = RTNL_INIT_LINK_CACHE(); nl_cache_update(&nl_handle, &link_cache); Translating link names to corresponding ifindex: int ifindex = rtnl_link_name2i(&link_cache, "eth0"); Retrieving the link handle for a given ifindex: struct rtnl_link *l = rtnl_link_get(&link_cache, ifindex); Dumping all links: nl_cache_dump(NL_DUMP_BRIEF, &link_cache, stdout); Dumping links based on filter: struct rtnl_link filter = RTNL_INIT_LINK(); rtnl_link_set_mtu(&filter, 1500); rtnl_link_set_txqlen(&filter, 0); nl_cache_dump_filter(NL_DUMP_FULL, &link_cache, (struct nl_common *) &filter, stdout); Changing link settings struct rtnl_link change_req = RTNL_INIT_LINK(); rtnl_link_set_weight(&change_req, 300); rtnl_link_change(&nl_handle, l, &change_req); Printing all links with classes/qdiscs/filters appended to them nicely formatted: (Read Bottom-Up) --------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include static struct nl_handle h = NL_INIT_HANDLE(); static int type = NL_DUMP_FULL; void print_qdisc(struct nl_common *c, void *arg); struct xdata { int level; uint32_t parent; }; static void update_cache(struct nl_cache *c) { if (nl_cache_update(&h, c) < 0) { fprintf(stderr, "%s\n", nl_geterror()); exit(1); } } static void print_filters(uint32_t ifindex, uint32_t parent, int level) { struct nl_cache fc = RTNL_INIT_FILTER_CACHE(); struct rtnl_filter f = RTNL_INIT_FILTER(); rtnl_filter_set_parent(&f, parent); rtnl_filter_set_ifindex(&f, ifindex); FILTER_CACHE_IFINDEX(&fc) = ifindex; update_cache(&fc); nl_set_dump_prefix(level); nl_cache_dump_filter(type, &fc, (struct nl_common *) &f, stdout); nl_cache_clear(&fc); } static void print_class(struct nl_common *a, void *arg) { struct xdata *x = arg; struct rtnl_class *c = (struct rtnl_class *) a; nl_set_dump_prefix(x->level); rtnl_class_dump(type, c, stdout); if (c->tc_info) { struct nl_cache qc = RTNL_INIT_QDISC_CACHE(); struct rtnl_qdisc f = RTNL_INIT_QDISC(); struct xdata z = { .level = (x->level + 2), .parent = c->tc_info, }; /* * class has qdisc attatched, get and print it */ rtnl_qdisc_set_handle(&f, c->tc_info); QDISC_CACHE_IFINDEX(&qc) = c->tc_ifindex; update_cache(&qc); nl_cache_foreach_filter(&qc, (struct nl_common *) &f, &print_qdisc, &z); nl_cache_clear(&qc); } if (1) { struct nl_cache cc = RTNL_INIT_CLASS_CACHE(); struct rtnl_class f = RTNL_INIT_CLASS(); struct xdata z = { .level = (x->level + 2), }; /* * get child classes of this class */ rtnl_class_set_parent(&f, c->tc_handle); CLASS_CACHE_IFINDEX(&cc) = c->tc_ifindex; update_cache(&cc); nl_cache_foreach_filter(&cc, (struct nl_common *) &f, &print_class, &z); nl_cache_clear(&cc); } print_filters(c->tc_ifindex, c->tc_handle, (x->level + 2)); } void print_qdisc(struct nl_common *c, void *arg) { struct xdata *x = arg; struct rtnl_qdisc *q = (struct rtnl_qdisc *) c; nl_set_dump_prefix(x->level); rtnl_qdisc_dump(type, q, stdout); if (1) { struct nl_cache cc = RTNL_INIT_CLASS_CACHE(); struct rtnl_class f = RTNL_INIT_CLASS(); struct xdata z = { .level = (x->level + 2), }; /* * get child classes */ rtnl_class_set_parent(&f, x->parent); rtnl_class_set_kind(&f, q->tc_kind); CLASS_CACHE_IFINDEX(&cc) = q->tc_ifindex; update_cache(&cc); nl_cache_foreach_filter(&cc, (struct nl_common *) &f, &print_class, &z); nl_cache_clear(&cc); } print_filters(q->tc_ifindex, q->tc_handle, (x->level + 2)); } void print_link(struct nl_common *c, void *arg) { struct rtnl_link *l = (struct rtnl_link *) c; rtnl_link_dump(type, l, stdout); if (1) { struct nl_cache qc = RTNL_INIT_QDISC_CACHE(); struct rtnl_qdisc f = RTNL_INIT_QDISC(); struct xdata x = { .level = 2, .parent = TC_H_ROOT, }; /* * get all qdiscs with no parent (root qdiscs) */ rtnl_qdisc_set_parent(&f, TC_H_UNSPEC); rtnl_qdisc_set_ifindex(&f, l->l_index); QDISC_CACHE_IFINDEX(&qc) = l->l_index; update_cache(&qc); nl_cache_foreach_filter(&qc, (struct nl_common *) &f, &print_qdisc, &x); nl_cache_clear(&qc); } } int main(int argc, char *argv[]) { struct nl_cache lc = RTNL_INIT_LINK_CACHE(); if (argc > 1) { if (!strcasecmp(argv[1], "brief")) type = NL_DUMP_BRIEF; else if (!strcasecmp(argv[1], "full")) type = NL_DUMP_FULL; else if (!strcasecmp(argv[1], "stats")) type = NL_DUMP_STATS; } nl_use_default_verbose_handlers(&h); if (nl_connect(&h, NETLINK_ROUTE) < 0) { fprintf(stderr, "%s\n", nl_geterror()); return 1; } update_cache(&lc); nl_cache_provide(&lc); nl_cache_foreach(&lc, &print_link, NULL); nl_cache_clear(&lc); nl_close(&h); return 0; } From mic@maxipes.logix.cz Sat Oct 30 13:17:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 13:17:49 -0700 (PDT) Received: from maxipes.logix.cz ([217.11.251.249]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UKHgMO010909 for ; Sat, 30 Oct 2004 13:17:43 -0700 Received: by maxipes.logix.cz (Postfix, from userid 500) id DD86A1F9EF; Sat, 30 Oct 2004 22:17:25 +0200 (CEST) Date: Sat, 30 Oct 2004 22:17:25 +0200 (CEST) From: Michal Ludvig To: Evgeniy Polyakov Cc: netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. In-Reply-To: <20041030214050.7e23d7b8@zanzibar.2ka.mipt.ru> Message-ID: References: <1099030958.4944.148.camel@uganda> <20041030091932.6a74bdae@zanzibar.2ka.mipt.ru> <20041030214050.7e23d7b8@zanzibar.2ka.mipt.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 11198 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: michal@logix.cz Precedence: bulk X-list: netdev On Sat, 30 Oct 2004, Evgeniy Polyakov wrote: > On Sat, 30 Oct 2004 18:57:20 +0200 (CEST) > Michal Ludvig wrote: > > > I have compiled and booted with your patches. Not too much > > playing around so far. Anyway some quick observations: > > I've wrote mega block device which can work(without hang) only > with 10mb "disks", but what did you expect from midnight hack after > several Staropramen's :) 10MB is probably too small to get some reliable numbers. The testing should last for at least couple of seconds... > Give me several minutes to complete async_provider.c and I will post > numbers, which I expect will be the same for both sync and async > driver since I do not have neither SMP(which should benefit I believe) > nor crypto card here. At least try it with a SMP kernel (on UP machine) to catch the worst spindeadlocks etc. In the ideal case the acrypto core should know that there are two (four, ...) CPUs and all of them can encrypt in paralel. > > - "rmmod simple_lb" hangs because: > > | <6>You are removing crypto load balancer simple_lb which is current and > > | default. > > | There is no other crypto load balancers. Removing is delayed untill new > > | load balancer is registered. > > Of course I can't re-add it because the module is still there. In this > > case rmmod should fail with a gentle message (-EBUSY) instead of hang. Or > > let it go if not in use. > > acrypto module has parameter force_lb_remove which if is set allows to remove > last crypto load balancer. > But ut has atricky moment - since any crypto_session_alloc() may occur > asyncronously then we can not say if there are any load balancer users > without some locks. Currently if there is no any crypto load balancer, then > acrypto will catch BUG_ON(). BUG_ON()? Shouldn't crypto_session_alloc() fail instead? BUG_ON() is for catching conditions that really shouldn't happen in normal operation. Missing module with a load balancer won't be that unusual... Or should the acrypto.ko module prerequire a balancer to get it loaded automatically? Michal Ludvig -- * A mouse is a device used to point at the xterm you want to type in. * Personal homepage - http://www.logix.cz/michal From johnpol@2ka.mipt.ru Sat Oct 30 13:20:54 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 13:21:00 -0700 (PDT) Received: from mailer.campus.mipt.ru (mailer.campus.mipt.ru [194.85.82.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UKKpBm011252 for ; Sat, 30 Oct 2004 13:20:52 -0700 Received: from ffke-campus-gw.mipt.ru (2ka [194.85.82.65]) by mailer.campus.mipt.ru (8.13.1/8.13.1) with ESMTP id i9UKKiKF027389; Sun, 31 Oct 2004 00:20:44 +0400 Received: from zanzibar.2ka.mipt.ru (zanzibar.2ka.mipt.ru [194.85.82.77]) by ffke-campus-gw.mipt.ru (8.12.11/8.12.11) with SMTP id i9UKKTgX010955; Sun, 31 Oct 2004 00:20:32 +0400 Date: Sun, 31 Oct 2004 00:37:49 +0400 From: Evgeniy Polyakov To: jamal , Michal Ludvig Cc: netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. Message-ID: <20041031003749.2026b156@zanzibar.2ka.mipt.ru> In-Reply-To: <1099030958.4944.148.camel@uganda> References: <1099030958.4944.148.camel@uganda> Reply-To: johnpol@2ka.mipt.ru Organization: MIPT X-Mailer: Sylpheed-Claws 0.9.12b (GTK+ 1.2.10; i386-pc-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Sun__31_Oct_2004_00_37_49_+0400_a+IT5K62.Lt7UdpI" X-archive-position: 11199 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: johnpol@2ka.mipt.ru Precedence: bulk X-list: netdev This is a multi-part message in MIME format. --Multipart=_Sun__31_Oct_2004_00_37_49_+0400_a+IT5K62.Lt7UdpI Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sorry, no numbers today. I've attached block device driver, synchronous driver which is needed for block device and asycnhronous one, first two works as expected, but either I too tiread after climbing or one of the two, but asynchronous driver hangs on mounting. Michal, please test block device with your PCI adapter with attached scripts and synchronous driver adapter and report numbers. Tomorrow I will finish software asynchronous driver and then we can test it on SMP where I expect some speed increase. Thank you. P.S. While digging into my test trees I found very usefull patch that I forget to apply. It converts _bh locking into _irq{save,restore} since session allocation and processing can occure with any kind of interrupt state. Patch is also attached. Evgeniy Polyakov Only failure makes us experts. -- Theo de Raadt --Multipart=_Sun__31_Oct_2004_00_37_49_+0400_a+IT5K62.Lt7UdpI Content-Type: application/octet-stream; name="Makefile" Content-Disposition: attachment; filename="Makefile" Content-Transfer-Encoding: base64 b2JqLW0JCTo9IGJkLm8gCm9iai1tCQkrPSBzeW5jX3Byb3ZpZGVyLm8Kb2JqLW0JCSs9IGFzeW5j X3Byb3ZpZGVyLm8KCiNLRElSCTo9IC9saWIvbW9kdWxlcy8kKHNoZWxsIHVuYW1lIC1yKS9idWls ZApLRElSCTo9IC91c3IvbG9jYWwvc3JjL2xpbnV4L3NvZWtyaXMvdG1wL2xpbnV4LTIuNgpQV0QJ Oj0gJChzaGVsbCBwd2QpCgpkZWZhdWx0OgoJJChNQUtFKSAtQyAkKEtESVIpIFNVQkRJUlM9JChQ V0QpIG1vZHVsZXMKCmNsZWFuOgoJcm0gLWYgKi5vICoua28gKi5tb2QuKiAuKi5jbWQgKn4KCXJt IC1yZiAudG1wX3ZlcnNpb25zCg== --Multipart=_Sun__31_Oct_2004_00_37_49_+0400_a+IT5K62.Lt7UdpI Content-Type: text/x-csrc; name="async_provider.c" Content-Disposition: attachment; filename="async_provider.c" Content-Transfer-Encoding: 7bit /* * async_provider.c * * Copyright (c) 2004 Evgeniy Polyakov * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "../crypto/acrypto.h" #include "../crypto/crypto_stat.h" #include "../crypto/crypto_def.h" static void prov_data_ready(struct crypto_device *); static void async_callback(struct crypto_session_initializer *, struct crypto_data *); static struct crypto_capability prov_caps[] = { {CRYPTO_OP_ENCRYPT, CRYPTO_TYPE_AES_128, CRYPTO_MODE_ECB, 1000}, {CRYPTO_OP_DECRYPT, CRYPTO_TYPE_AES_128, CRYPTO_MODE_ECB, 1000}, }; static int prov_cap_number = sizeof(prov_caps)/sizeof(prov_caps[0]); static struct completion thread_exited; static DECLARE_WAIT_QUEUE_HEAD(async_wait_queue); static int need_exit; static struct crypto_tfm *tfm; struct crypto_session *sp; static char async_algo[] = "aes"; static char async_key[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}; static struct crypto_session_initializer ci = { .operation = CRYPTO_OP_ENCRYPT, .mode = CRYPTO_MODE_ECB, .type = CRYPTO_TYPE_AES_128, .callback = async_callback, }; static struct crypto_device pdev = { .name = "async_provider", .data_ready = prov_data_ready, .cap = &prov_caps[0], }; static void async_callback(struct crypto_session_initializer *ci, struct crypto_data *data) { struct request *req = data->priv; dprintk("%s: req=%p\n", __func__, req); (unsigned long)req->special--; if (((unsigned long)req->special) == 0) { spinlock_t *l = req->q->queue_lock; dprintk("Finishing request for req=%p.\n", req); spin_lock_irq(l); end_that_request_last(req); spin_unlock_irq(l); } } static __inline__ void async_prepare(struct crypto_data *data, void *src, void *dst, unsigned long size, void *priv) { struct request *req = priv; (unsigned long)req->special++; dprintk("%s: req=%p, refcnt=%lu.\n", __func__, req, (unsigned long)req->special); data->sg_src.page = virt_to_page(src); data->sg_src.offset = offset_in_page(src); data->sg_src.length = size; data->sg_dst.page = virt_to_page(dst); data->sg_dst.offset = offset_in_page(dst); data->sg_dst.length = size; data->sg_key.page = virt_to_page(async_key); data->sg_key.offset = offset_in_page(async_key); data->sg_key.length = sizeof(async_key); data->priv = priv; data->priv_size = 0; } void bd_encrypt(void *src, void *dst, unsigned long size, void *priv) { struct crypto_session *session; struct crypto_data data; async_prepare(&data, src, dst, size, priv); ci.operation = CRYPTO_OP_ENCRYPT; session = crypto_session_alloc(&ci, &data); if (!session) WARN_ON(1); wake_up(&async_wait_queue); } void bd_decrypt(void *src, void *dst, unsigned long size, void *priv) { struct crypto_session *session; struct crypto_data data; async_prepare(&data, src, dst, size, priv); ci.operation = CRYPTO_OP_DECRYPT; session = crypto_session_alloc(&ci, &data); if (!session) WARN_ON(1); wake_up(&async_wait_queue); } static void prov_data_ready(struct crypto_device *dev) { struct crypto_session *s, *n; list_for_each_entry_safe(s, n, &dev->session_list, dev_queue_entry) { if (!session_completed(s)) { sp = s; wake_up(&async_wait_queue); break; } } } static int async_thread(void *data) { struct crypto_device *dev = (struct crypto_device *)data; daemonize("%s", dev->name); allow_signal(SIGTERM); while (!need_exit) { interruptible_sleep_on(&async_wait_queue); if (need_exit) break; if (!sp) continue; start_process_session(sp); if (sp->ci.operation == CRYPTO_OP_ENCRYPT) crypto_cipher_encrypt(tfm, &sp->data.sg_dst, &sp->data.sg_src, sp->data.sg_src.length); else crypto_cipher_decrypt(tfm, &sp->data.sg_dst, &sp->data.sg_src, sp->data.sg_src.length); dprintk("Completing session %llu [%llu] in %s.\n", sp->ci.id, sp->ci.dev_id, pdev.name); //crypto_stat_complete_inc(sp); complete_session(sp); stop_process_session(sp); prov_data_ready(dev); sp = NULL; } complete_and_exit(&thread_exited, 0); } int prov_init(void) { int err, pid; tfm = crypto_alloc_tfm(async_algo, 0); if (!tfm) { printk(KERN_ERR "Failed to allocate SHA1 tfm.\n"); return -EINVAL; } err = crypto_cipher_setkey(tfm, async_key, sizeof(async_key)); if (err) { dprintk("Failed to set key [keylen=%d]: err=%d.\n", sizeof(async_key), err); goto err_out_free_tfm; } init_completion(&thread_exited); pid = kernel_thread(async_thread, &pdev, CLONE_FS | CLONE_FILES); if (IS_ERR((void *)pid)) { err = -EINVAL; dprintk(KERN_ERR "Failed to create kernel load balancing thread.\n"); goto err_out_free_tfm; } pdev.cap_number = prov_cap_number; err = crypto_device_add(&pdev); if (err) goto err_out_remove_thread; dprintk(KERN_INFO "Test crypto provider module %s is loaded.\n", pdev.name); return 0; err_out_remove_thread: need_exit = 1; wake_up(&async_wait_queue); wait_for_completion(&thread_exited); err_out_free_tfm: crypto_free_tfm(tfm); return err; } void prov_fini(void) { need_exit = 1; wake_up(&async_wait_queue); wait_for_completion(&thread_exited); crypto_device_remove(&pdev); crypto_free_tfm(tfm); dprintk(KERN_INFO "Test crypto provider module %s is unloaded.\n", pdev.name); } module_init(prov_init); module_exit(prov_fini); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Evgeniy Polyakov "); MODULE_DESCRIPTION("Test crypto module provider."); EXPORT_SYMBOL(bd_encrypt); EXPORT_SYMBOL(bd_decrypt); --Multipart=_Sun__31_Oct_2004_00_37_49_+0400_a+IT5K62.Lt7UdpI Content-Type: text/x-csrc; name="bd.c" Content-Disposition: attachment; filename="bd.c" Content-Transfer-Encoding: 7bit /* * bd.c * * Copyright (c) 2004 Evgeniy Polyakov * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include #include #include #include #include //#define BD_DEBUG #ifdef BD_DEBUG #define dprintk(f, a...) printk(KERN_EMERG f, ##a) #else #define dprintk(f, a...) do {} while(0) #endif #define BD_READ 0 #define BD_WRITE 1 static char bd_name[] = "bd"; static unsigned int bd_major = 123; module_param(bd_major, uint, 0); static unsigned int bd_sector_size = 512; module_param(bd_sector_size, uint, 0); static unsigned int bd_max_request_size = 1024*1024*50; module_param(bd_max_request_size, uint, 0); static void *bd_request_data; static spinlock_t bd_lock = SPIN_LOCK_UNLOCKED; static struct gendisk *bd_disk; extern void bd_encrypt(void *src, void *dst, unsigned long size, void *priv); extern void bd_decrypt(void *src, void *dst, unsigned long size, void *priv); static int bd_ioctl(struct inode *, struct file *, unsigned int, unsigned long); static struct block_device_operations bd_fops = { .owner = THIS_MODULE, .ioctl = bd_ioctl, }; static int bd_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { dprintk("%s: cmd=%u, arg=%ld.\n", __func__, cmd, arg); return 0; } static int bd_process_data(int cmd, void *buf, unsigned long off, unsigned int size, void *priv) { if (size > bd_max_request_size) { dprintk("Too big size %u, setting to %u.\n", size, bd_max_request_size); size = bd_max_request_size; } if (off + size > bd_max_request_size) { dprintk("Too big size %u or offset %lu, exiting.\n", size, off); size = bd_max_request_size; } switch (cmd) { case BD_READ: bd_decrypt(((char *)bd_request_data) + off, buf, size, priv); break; case BD_WRITE: bd_encrypt(buf, ((char *)bd_request_data) + off, size, priv); break; } dprintk("%s finished cmd=%s, size=%u, off=%lu.\n", __func__, (cmd == BD_WRITE)?"WRITE":"READ", size, off); return 0; } static __inline__ int bd_process_bvec(int cmd, struct bio_vec *bvec, unsigned long off, void *priv) { int err; char *kaddr; void *buf; unsigned int size; kaddr = page_address(bvec->bv_page); buf = kaddr + bvec->bv_offset; size = bvec->bv_len; err = bd_process_data(cmd, buf, off, size, priv); return err; } static void bd_request(request_queue_t * q) { struct request *req; unsigned long off, size; int err, cmd, bad_bio; struct bio *bio; while ((req = elv_next_request(q)) != NULL) { blkdev_dequeue_request(req); (unsigned long)req->special = 0; off = req->sector * bd_sector_size; size = req->nr_sectors * bd_sector_size; cmd = (rq_data_dir(req) == 1)?BD_WRITE:BD_READ; dprintk("%s: TRANSFER: cmd=%s, off=%lu [sector=%ld], size=%lu [nr_sectors=%lu], flags=%lx.\n", bd_name, (cmd == BD_WRITE)?"WRITE":"READ", off, req->sector, size, req->nr_sectors, req->flags); bad_bio = 0; if (!(req->flags & REQ_CMD)) { dprintk("%s: wrong command.\n", bd_name); goto err_out_wrong_command; } #if 1 rq_for_each_bio(bio, req) { struct bio_vec *bvec; int i; dprintk("BIO: bi_size=%u, bvec=%p.\n", bio->bi_size, bio->bi_io_vec); if (!bio->bi_size || !bio->bi_io_vec) { bad_bio = 1; continue; } bio_for_each_segment(bvec, bio, i) { dprintk("%s: i=%d, req=%p, size=%d.\n", bd_disk->disk_name, i, req, bvec->bv_len); err = bd_process_bvec(cmd, bvec, off, req); if (err) { bad_bio = 1; continue; } off += bvec->bv_len; size -= bvec->bv_len; } //bio->bi_end_io = NULL; //bio_endio(bio, bio->bi_size, (bad_bio)?-EIO:0); } #else err = bd_process_data(cmd, req->buffer, off, size); if (err) bad_bio = 1; #endif dprintk("cmd=%s has been processed: err=%d\n", (cmd == BD_WRITE)?"WRITE":"READ", req->errors); err_out_wrong_command: if (!end_that_request_first(req, (bad_bio)?0:1, req->nr_sectors)); //end_that_request_last(req); } } static void bd_setup(struct gendisk *d) { request_queue_t *q; d->major = bd_major; d->first_minor = 0; d->fops = &bd_fops; d->private_data = NULL; d->flags = GENHD_FL_SUPPRESS_PARTITION_INFO; sprintf(d->disk_name, "%s%d", bd_name, 0); q = d->queue; blk_queue_hardsect_size(q, bd_sector_size); set_capacity(d, bd_max_request_size/bd_sector_size); add_disk(d); } int __devinit bd_init(void) { int err; bd_request_data = vmalloc(bd_max_request_size); if (!bd_request_data) { dprintk("Failed to allocate %d bytes for %s requests.\n", bd_max_request_size, bd_name); return -ENOMEM; } err = register_blkdev(bd_major, bd_name); if (err) { dprintk("Failed to register blkdev with major %u: err=%d.\n", bd_major, err); return err; } bd_disk = alloc_disk(1); if (!bd_disk) { dprintk("Failed to allocate a disk.\n"); goto err_out_unregister_blkdev; } bd_disk->queue = blk_init_queue(bd_request, &bd_lock); if (!bd_disk->queue) { dprintk("Failed to initialize blk queue: err=%d.\n", err); goto err_out_free_disk; } bd_setup(bd_disk); dprintk("%s has beed successfully added.\n", bd_name); return 0; err_out_free_disk: put_disk(bd_disk); err_out_unregister_blkdev: unregister_blkdev(bd_major, "bd"); vfree(bd_request_data); return -EINVAL; } void __devexit bd_fini(void) { del_gendisk(bd_disk); blk_cleanup_queue(bd_disk->queue); put_disk(bd_disk); unregister_blkdev(bd_major, "bd"); vfree(bd_request_data); dprintk("%s has beed successfully removed.\n", bd_name); } module_init(bd_init); module_exit(bd_fini); MODULE_AUTHOR("Evgeniy Polyakov "); MODULE_LICENSE("GPL"); --Multipart=_Sun__31_Oct_2004_00_37_49_+0400_a+IT5K62.Lt7UdpI Content-Type: text/x-csrc; name="sync_provider.c" Content-Disposition: attachment; filename="sync_provider.c" Content-Transfer-Encoding: 7bit /* * sync_provider.c * * Copyright (c) 2004 Evgeniy Polyakov * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include #include #include #include #include #include #include #include #include #include #include //#define SYNC_DEBUG #ifdef SYNC_DEBUG #define dprintk(f, a...) printk(KERN_EMERG f, ##a) #else #define dprintk(f, a...) do {} while(0) #endif #define OP_ENCRYPT 0 #define OP_DECRYPT 1 static char sync_algo[] = "aes"; static char sync_key[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}; static struct crypto_tfm *tfm; void bd_encrypt(void *src, void *dst, unsigned long size, void *priv) { struct scatterlist s, d; s.page = virt_to_page(src); s.offset = offset_in_page(src); s.length = size; d.page = virt_to_page(dst); d.offset = offset_in_page(dst); d.length = size; /* * A hack to fool crypto layer - it thinks that we can sleep here... * Sigh. * * preempt_count() |= SOFTIRQ_MASK; */ preempt_count() |= SOFTIRQ_MASK; crypto_cipher_encrypt(tfm, &d, &s, size); preempt_count() &= ~SOFTIRQ_MASK; } void bd_decrypt(void *src, void *dst, unsigned long size, void *priv) { struct scatterlist s, d; s.page = virt_to_page(src); s.offset = offset_in_page(src); s.length = size; d.page = virt_to_page(dst); d.offset = offset_in_page(dst); d.length = size; /* * A hack to fool crypto layer - it thinks that we can sleep here... * Sigh. * * preempt_count() |= SOFTIRQ_MASK; */ preempt_count() |= SOFTIRQ_MASK; crypto_cipher_decrypt(tfm, &d, &s, size); preempt_count() &= ~SOFTIRQ_MASK; } int __devinit sync_init(void) { int err; err = -ENODEV; tfm = crypto_alloc_tfm(sync_algo, 0); if (!tfm) { dprintk("Failed to allocate %s tfm.\n", sync_algo); goto err_out_exit; } err = crypto_cipher_setkey(tfm, sync_key, sizeof(sync_key)); if (err) { dprintk("Failed to set key [keylen=%d]: err=%d.\n", sizeof(sync_key), err); goto err_out_free_tfm; } return 0; err_out_free_tfm: crypto_free_tfm(tfm); err_out_exit: return err; } void __devexit sync_fini(void) { crypto_free_tfm(tfm); } module_init(sync_init); module_exit(sync_fini); MODULE_AUTHOR("Evgeniy Polyakov "); MODULE_LICENSE("GPL"); EXPORT_SYMBOL(bd_encrypt); EXPORT_SYMBOL(bd_decrypt); --Multipart=_Sun__31_Oct_2004_00_37_49_+0400_a+IT5K62.Lt7UdpI Content-Type: application/octet-stream; name="bd_i" Content-Disposition: attachment; filename="bd_i" Content-Transfer-Encoding: base64 bW9kX3BhdGg9L2xpYi9tb2R1bGVzL2B1bmFtZSAtcmAva2VybmVsCgppbnNtb2QgJG1vZF9wYXRo L2FyY2gvaTM4Ni9jcnlwdG8vYWVzLWk1ODYua28KI2luc21vZCAkbW9kX3BhdGgvZHJpdmVycy9i bG9jay9zeW5jX3Byb3ZpZGVyLmtvCmluc21vZCAkbW9kX3BhdGgvZHJpdmVycy9ibG9jay9hc3lu Y19wcm92aWRlci5rbwppbnNtb2QgJG1vZF9wYXRoL2RyaXZlcnMvYmxvY2svYmQua28gYmRfbWF4 X3JlcXVlc3Rfc2l6ZT01MjQyODgwMApta2ZzLmV4dDIgL2Rldi9iZDAKbW91bnQgL2Rldi9iZDAg L21udAoKI3RpbWUgZGQgaWY9L2Rldi96ZXJvIG9mPS9tbnQvZmlsZSBicz0xTSBjb3VudD0xMAoj dGltZSBkZCBpZj0vZGV2L3plcm8gb2Y9L2Rldi9iZDAgYnM9MU0gY291bnQ9MzAK --Multipart=_Sun__31_Oct_2004_00_37_49_+0400_a+IT5K62.Lt7UdpI Content-Type: application/octet-stream; name="crypto" Content-Disposition: attachment; filename="crypto" Content-Transfer-Encoding: base64 aW5zbW9kIC9saWIvbW9kdWxlcy8yLjYuOS1yYzQva2VybmVsL2RyaXZlcnMvY29ubmVjdG9yL2Nu LmtvCmluc21vZCAvbGliL21vZHVsZXMvMi42LjktcmM0L2tlcm5lbC9kcml2ZXJzL2NyeXB0by9h Y3J5cHRvLmtvIGZvcmNlX2xiX3JlbW92ZT0xCmluc21vZCAvbGliL21vZHVsZXMvMi42LjktcmM0 L2tlcm5lbC9kcml2ZXJzL2NyeXB0by9zaW1wbGVfbGIua28gCiNpbnNtb2QgL2xpYi9tb2R1bGVz LzIuNi45LXJjNC9rZXJuZWwvZHJpdmVycy9jcnlwdG8vcHJvdmlkZXIua28gCiNpbnNtb2QgL2xp Yi9tb2R1bGVzLzIuNi45LXJjNC9rZXJuZWwvZHJpdmVycy9jcnlwdG8vc2xvd19wcm92aWRlci5r byAKI2luc21vZCAvbGliL21vZHVsZXMvMi42LjktcmM0L2tlcm5lbC9kcml2ZXJzL2NyeXB0by9j b25zdW1lci5rbyAKI2luc21vZCAvbGliL21vZHVsZXMvMi42LjktcmM0L2tlcm5lbC9kcml2ZXJz L2NyeXB0by9zbG93X2NvbnN1bWVyLmtvIAoK --Multipart=_Sun__31_Oct_2004_00_37_49_+0400_a+IT5K62.Lt7UdpI Content-Type: application/octet-stream; name="start" Content-Disposition: attachment; filename="start" Content-Transfer-Encoding: base64 cmFuZD0kUkFORE9NCmZpbGU9L21udC8kcmFuZAoKZm9yICgoaT0wOyBpPDEwOyArK2kpKTsgZG8K CWVjaG8gLWVuICIuIgoJZGQgaWY9L2Rldi96ZXJvIG9mPSRmaWxlIGJzPTFNIGNvdW50PTEwID4g L2Rldi9udWxsIDI+JjEKCXJtIC1mICRmaWxlCmRvbmUKZWNobwo= --Multipart=_Sun__31_Oct_2004_00_37_49_+0400_a+IT5K62.Lt7UdpI Content-Type: application/octet-stream; name="crypto.patch" Content-Disposition: attachment; filename="crypto.patch" Content-Transfer-Encoding: base64 LS0tIG9yaWcvY3J5cHRvX2xiLmMKKysrIG1vZC9jcnlwdG9fbGIuYwpAQCAtODMsMTIgKzgzLDEz IEBACiBzdGF0aWMgaW5saW5lIHZvaWQgbGJfc2V0X2N1cnJlbnQoc3RydWN0IGNyeXB0b19sYiAq bCkKIHsKIAlzdHJ1Y3QgY3J5cHRvX2xiICpjID0gY3VycmVudF9sYjsKKwl1bnNpZ25lZCBsb25n IGZsYWdzOwogCQogCWlmIChjKQogCXsKLQkJc3Bpbl9sb2NrX2JoKCZjLT5sb2NrKTsKKwkJc3Bp bl9sb2NrX2lyc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AQAogCQlzcGluX2xvY2tfaXJxc2F2 ZSgmZGV2LT5zZXNzaW9uX2xvY2ssIGZsYWdzKTsKIAkJbGlzdF9mb3JfZWFjaF9lbnRyeV9zYWZl KHMsIG4sICZkZXYtPnNlc3Npb25fbGlzdCwgbWFpbl9xdWV1ZV9lbnRyeSkKIAkJewotCQkJcHJp bnRrKCJzZXNzaW9uICVsbHUgWyVsbHVdOiBmbGFncz0leCwgcm91dGVfbnVtPSVkLCAlcywlcywl cywlcy5cbiIsIAorCQkJZHByaW50aygic2Vzc2lvbiAlbGx1IFslbGx1XTogZmxhZ3M9JXgsIHJv dXRlX251bT0lZCwgJXMsJXMsJXMsJXMuXG4iLCAKIAkJCQkJcy0+Y2kuaWQsIHMtPmNpLmRldl9p ZCwgcy0+Y2kuZmxhZ3MsIAogCQkJCQljcnlwdG9fcm91dGVfcXVldWVfbGVuKHMpLAogCQkJCQko c2Vzc2lvbl9jb21wbGV0ZWQocykpPyJjb21wbGV0ZWQiOiAibm90IGNvbXBsZXRlZCIsCgoKLS0t IG9yaWcvY3J5cHRvX21haW4uYworKysgbW9kL2NyeXB0b19tYWluLmMKQEAgLTE2OSw4ICsxNjks NiBAQAogCQlpZiAoZC0+cHJpdikKIAkJCW1lbWNweShzLT5kYXRhLnByaXYsIGQtPnByaXYsIGQt PnByaXZfc2l6ZSk7CiAJfQotCWVsc2UKLQkJcy0+ZGF0YS5wcml2ID0gTlVMTDsKIAogCXMtPmNp LmlkIAk9IGRldi0+c2lkKys7CiAJcy0+Y2kuZGV2X2lkIAk9IGxkZXYtPnNpZCsrOwoKCgo= --Multipart=_Sun__31_Oct_2004_00_37_49_+0400_a+IT5K62.Lt7UdpI-- From ebs@ebshome.net Sat Oct 30 13:36:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 13:36:16 -0700 (PDT) Received: from gate.ebshome.net (gate.ebshome.net [64.81.67.12]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UKaBA2011979 for ; Sat, 30 Oct 2004 13:36:11 -0700 Received: (qmail 23637 invoked by uid 1000); 30 Oct 2004 13:35:50 -0700 Date: Sat, 30 Oct 2004 13:35:50 -0700 From: Eugene Surovegin To: Evgeniy Polyakov Cc: hadi@cyberus.ca, netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. Message-ID: <20041030203550.GB6256@gate.ebshome.net> Mail-Followup-To: Evgeniy Polyakov , hadi@cyberus.ca, netdev@oss.sgi.com, cryptoapi@lists.logix.cz References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> X-ICQ-UIN: 1193073 X-Operating-System: Linux i686 X-PGP-Key: http://www.ebshome.net/pubkey.asc User-Agent: Mutt/1.5.5.1i X-archive-position: 11200 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ebs@ebshome.net Precedence: bulk X-list: netdev On Fri, Oct 29, 2004 at 06:06:52PM +0400, Evgeniy Polyakov wrote: > If we have a hardware accelerator chip, than we _already_ have improvements > with even the worst async crypto layer, since software and hardware > will work in parrallel. This is not true. For example, if chip request setup and PCI transfer takes more than just using sw implementation. This is reality for AES and short packets. -- Eugene From johnpol@2ka.mipt.ru Sat Oct 30 13:38:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 13:39:02 -0700 (PDT) Received: from mailer.campus.mipt.ru (mailer.campus.mipt.ru [194.85.82.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UKcuVb012357 for ; Sat, 30 Oct 2004 13:38:57 -0700 Received: from ffke-campus-gw.mipt.ru (2ka [194.85.82.65]) by mailer.campus.mipt.ru (8.13.1/8.13.1) with ESMTP id i9UKctP6029815; Sun, 31 Oct 2004 00:38:55 +0400 Received: from zanzibar.2ka.mipt.ru (zanzibar.2ka.mipt.ru [194.85.82.77]) by ffke-campus-gw.mipt.ru (8.12.11/8.12.11) with SMTP id i9UKcg3G030254; Sun, 31 Oct 2004 00:38:42 +0400 Date: Sun, 31 Oct 2004 00:56:02 +0400 From: Evgeniy Polyakov To: Michal Ludvig Cc: netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. Message-ID: <20041031005602.2a017131@zanzibar.2ka.mipt.ru> In-Reply-To: References: <1099030958.4944.148.camel@uganda> <20041030091932.6a74bdae@zanzibar.2ka.mipt.ru> <20041030214050.7e23d7b8@zanzibar.2ka.mipt.ru> Reply-To: johnpol@2ka.mipt.ru Organization: MIPT X-Mailer: Sylpheed-Claws 0.9.12b (GTK+ 1.2.10; i386-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11201 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: johnpol@2ka.mipt.ru Precedence: bulk X-list: netdev On Sat, 30 Oct 2004 22:17:25 +0200 (CEST) Michal Ludvig wrote: > On Sat, 30 Oct 2004, Evgeniy Polyakov wrote: > > > On Sat, 30 Oct 2004 18:57:20 +0200 (CEST) > > Michal Ludvig wrote: > > > > > I have compiled and booted with your patches. Not too much > > > playing around so far. Anyway some quick observations: > > > > I've wrote mega block device which can work(without hang) only > > with 10mb "disks", but what did you expect from midnight hack after > > several Staropramen's :) > > 10MB is probably too small to get some reliable numbers. The testing > should last for at least couple of seconds... It was repeated of course. On one of my very little test machine 10 times of 10mb in a two threads took about 40-42 secs. Test was like this: for ((i=0; i<10; ++i)); do dd if=/dev/zero of=/mnt/file bs=1M count=10 rm -f /mnt/file done Where /mnt is /dev/bd0 mount point. Above script was run from two processes. Above block device is just _very_ simple in-memory-only block device. I decided to not change loopback or ramdisk, it was done to remove disk latencies and have more fair results. > > Give me several minutes to complete async_provider.c and I will post > > numbers, which I expect will be the same for both sync and async > > driver since I do not have neither SMP(which should benefit I believe) > > nor crypto card here. > > At least try it with a SMP kernel (on UP machine) to catch the worst > spindeadlocks etc. In the ideal case the acrypto core should know that > there are two (four, ...) CPUs and all of them can encrypt in paralel. I will get access to the real SMP machine only ater tomorrow. Of course I test acrypto with preempt and SMP kernel to find different kind locking issues. acrypto's callbacks are run from queue_work context so they can be scheduled to diferent CPU, but noone forbids to run 2/4/any synchronous threads and register them as crypto providers with the same capabilities. It is very easy with acrypto to balance such kind of load by design. > > > - "rmmod simple_lb" hangs because: > > > | <6>You are removing crypto load balancer simple_lb which is current and > > > | default. > > > | There is no other crypto load balancers. Removing is delayed untill new > > > | load balancer is registered. > > > Of course I can't re-add it because the module is still there. In this > > > case rmmod should fail with a gentle message (-EBUSY) instead of hang. Or > > > let it go if not in use. > > > > acrypto module has parameter force_lb_remove which if is set allows to remove > > last crypto load balancer. > > But ut has atricky moment - since any crypto_session_alloc() may occur > > asyncronously then we can not say if there are any load balancer users > > without some locks. Currently if there is no any crypto load balancer, then > > acrypto will catch BUG_ON(). > > BUG_ON()? Shouldn't crypto_session_alloc() fail instead? BUG_ON() is for > catching conditions that really shouldn't happen in normal operation. > Missing module with a load balancer won't be that unusual... It is impossible and very bad condition when sessions want to be allocated but there are no even load balancer. To be honest it is _supposed_ to not happen, that is why it is BUG_ON() there, but you are right it is too rude, I will create a patch tomorrow which will allow crypto_session_alloc() fail if there is no load balancer like it is done when there is no appropriate crypto device. > Or should the acrypto.ko module prerequire a balancer to get it loaded > automatically? My first idea was to insert simple_lb as part of acrypto. And then any other load balancer can be removed with fallback to simple_lb, but it is not fair enough I think. But it is still can be easily implemented, if we decide to do it. > Michal Ludvig > -- > * A mouse is a device used to point at the xterm you want to type in. > * Personal homepage - http://www.logix.cz/michal Evgeniy Polyakov Only failure makes us experts. -- Theo de Raadt From ebs@ebshome.net Sat Oct 30 13:39:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 13:39:33 -0700 (PDT) Received: from gate.ebshome.net (gate.ebshome.net [64.81.67.12]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UKdRIp012534 for ; Sat, 30 Oct 2004 13:39:27 -0700 Received: (qmail 23702 invoked by uid 1000); 30 Oct 2004 13:39:06 -0700 Date: Sat, 30 Oct 2004 13:39:06 -0700 From: Eugene Surovegin To: Evgeniy Polyakov Cc: Michal Ludvig , netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. Message-ID: <20041030203906.GC6256@gate.ebshome.net> Mail-Followup-To: Evgeniy Polyakov , Michal Ludvig , netdev@oss.sgi.com, cryptoapi@lists.logix.cz References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> <41824D9A.3070407@logix.cz> <20041029183606.0b1a0538@zanzibar.2ka.mipt.ru> <20041029192741.5344ad0f@zanzibar.2ka.mipt.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041029192741.5344ad0f@zanzibar.2ka.mipt.ru> X-ICQ-UIN: 1193073 X-Operating-System: Linux i686 X-PGP-Key: http://www.ebshome.net/pubkey.asc User-Agent: Mutt/1.5.5.1i X-archive-position: 11202 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ebs@ebshome.net Precedence: bulk X-list: netdev On Fri, Oct 29, 2004 at 07:27:41PM +0400, Evgeniy Polyakov wrote: > but it was designed to be usefull only in custom MX box, This is not true. I coded it using Hifn PCI card plugged in 440GP eval board as well in P4 2.6 GHz box. Driver isn't perfect, it's quite simple, I suspended all work on it because without async crypto it doesn't make a lot of sense. > so it has some design notes that I do not agree with. And they are (I know there are problems, just curious which ones you "don't agree with") ? -- Euege From johnpol@2ka.mipt.ru Sat Oct 30 13:47:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 13:47:27 -0700 (PDT) Received: from mailer.campus.mipt.ru (mailer.campus.mipt.ru [194.85.82.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UKlK3b013180 for ; Sat, 30 Oct 2004 13:47:21 -0700 Received: from ffke-campus-gw.mipt.ru (2ka [194.85.82.65]) by mailer.campus.mipt.ru (8.13.1/8.13.1) with ESMTP id i9UKl9tD031376; Sun, 31 Oct 2004 00:47:09 +0400 Received: from zanzibar.2ka.mipt.ru (zanzibar.2ka.mipt.ru [194.85.82.77]) by ffke-campus-gw.mipt.ru (8.12.11/8.12.11) with SMTP id i9UKktVZ007438; Sun, 31 Oct 2004 00:46:55 +0400 Date: Sun, 31 Oct 2004 01:04:15 +0400 From: Evgeniy Polyakov To: Eugene Surovegin Cc: hadi@cyberus.ca, netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. Message-ID: <20041031010415.4c798a04@zanzibar.2ka.mipt.ru> In-Reply-To: <20041030203550.GB6256@gate.ebshome.net> References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> <20041030203550.GB6256@gate.ebshome.net> Reply-To: johnpol@2ka.mipt.ru Organization: MIPT X-Mailer: Sylpheed-Claws 0.9.12b (GTK+ 1.2.10; i386-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11203 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: johnpol@2ka.mipt.ru Precedence: bulk X-list: netdev On Sat, 30 Oct 2004 13:35:50 -0700 Eugene Surovegin wrote: > On Fri, Oct 29, 2004 at 06:06:52PM +0400, Evgeniy Polyakov wrote: > > If we have a hardware accelerator chip, than we _already_ have improvements > > with even the worst async crypto layer, since software and hardware > > will work in parrallel. > > This is not true. > > For example, if chip request setup and PCI transfer takes more than > just using sw implementation. This is reality for AES and short > packets. You have dataflow of packets, if invoce expenses take less time then you will win. More than 1kbyte of data to be encrypted already beats time need for software encryption on 266 mhz. What hardware requires PCI transfer that will take more time than it's encryption? And what about asynchronous crypto? Kernel currently even can not generate RSA keys, although necessity of such feature is under the question. > > -- > Eugene Evgeniy Polyakov Only failure makes us experts. -- Theo de Raadt From ebs@ebshome.net Sat Oct 30 13:56:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 13:56:56 -0700 (PDT) Received: from gate.ebshome.net (gate.ebshome.net [64.81.67.12]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UKuqAg013833 for ; Sat, 30 Oct 2004 13:56:52 -0700 Received: (qmail 23936 invoked by uid 1000); 30 Oct 2004 13:56:31 -0700 Date: Sat, 30 Oct 2004 13:56:31 -0700 From: Eugene Surovegin To: Evgeniy Polyakov Cc: hadi@cyberus.ca, netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. Message-ID: <20041030205630.GD6256@gate.ebshome.net> Mail-Followup-To: Evgeniy Polyakov , hadi@cyberus.ca, netdev@oss.sgi.com, cryptoapi@lists.logix.cz References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> <20041030203550.GB6256@gate.ebshome.net> <20041031010415.4c798a04@zanzibar.2ka.mipt.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041031010415.4c798a04@zanzibar.2ka.mipt.ru> X-ICQ-UIN: 1193073 X-Operating-System: Linux i686 X-PGP-Key: http://www.ebshome.net/pubkey.asc User-Agent: Mutt/1.5.5.1i X-archive-position: 11204 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ebs@ebshome.net Precedence: bulk X-list: netdev On Sun, Oct 31, 2004 at 01:04:15AM +0400, Evgeniy Polyakov wrote: > On Sat, 30 Oct 2004 13:35:50 -0700 > Eugene Surovegin wrote: > > > On Fri, Oct 29, 2004 at 06:06:52PM +0400, Evgeniy Polyakov wrote: > > > If we have a hardware accelerator chip, than we _already_ have improvements > > > with even the worst async crypto layer, since software and hardware > > > will work in parrallel. > > > > This is not true. > > > > For example, if chip request setup and PCI transfer takes more than > > just using sw implementation. This is reality for AES and short > > packets. > > You have dataflow of packets, if invoce expenses take less time > then you will win. Yes, but as I said for short packets, AES and fast box for example this might not be true. > More than 1kbyte of data to be encrypted already beats time > need for software encryption on 266 mhz. OK, what about 64 byte packets? I'm not saying hw crypto is useless, what I'm saying is it's not that obvious that having hw crypto will help in _all_ situations. > And what about asynchronous crypto? Asynchronous? Never heard of it. Did you mean asymmetric? If yes, ok, I _think_ hw crypto will help, provided we have kernel API for such stuff. -- Eugene From johnpol@2ka.mipt.ru Sat Oct 30 14:00:25 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 14:00:29 -0700 (PDT) Received: from mailer.campus.mipt.ru (mailer.campus.mipt.ru [194.85.82.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UL0OuQ014220 for ; Sat, 30 Oct 2004 14:00:25 -0700 Received: from ffke-campus-gw.mipt.ru (2ka [194.85.82.65]) by mailer.campus.mipt.ru (8.13.1/8.13.1) with ESMTP id i9UL0EJV000920; Sun, 31 Oct 2004 01:00:14 +0400 Received: from zanzibar.2ka.mipt.ru (zanzibar.2ka.mipt.ru [194.85.82.77]) by ffke-campus-gw.mipt.ru (8.12.11/8.12.11) with SMTP id i9UL008L018242; Sun, 31 Oct 2004 01:00:00 +0400 Date: Sun, 31 Oct 2004 01:17:19 +0400 From: Evgeniy Polyakov To: Eugene Surovegin Cc: Michal Ludvig , netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. Message-ID: <20041031011719.07858890@zanzibar.2ka.mipt.ru> In-Reply-To: <20041030203906.GC6256@gate.ebshome.net> References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> <41824D9A.3070407@logix.cz> <20041029183606.0b1a0538@zanzibar.2ka.mipt.ru> <20041029192741.5344ad0f@zanzibar.2ka.mipt.ru> <20041030203906.GC6256@gate.ebshome.net> Reply-To: johnpol@2ka.mipt.ru Organization: MIPT X-Mailer: Sylpheed-Claws 0.9.12b (GTK+ 1.2.10; i386-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11205 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: johnpol@2ka.mipt.ru Precedence: bulk X-list: netdev On Sat, 30 Oct 2004 13:39:06 -0700 Eugene Surovegin wrote: > On Fri, Oct 29, 2004 at 07:27:41PM +0400, Evgeniy Polyakov wrote: > > but it was designed to be usefull only in custom MX box, > > This is not true. I coded it using Hifn PCI card plugged in 440GP eval > board as well in P4 2.6 GHz box. > > Driver isn't perfect, it's quite simple, I suspended all work on it > because without async crypto it doesn't make a lot of sense. > > > so it has some design notes that I do not agree with. > > And they are (I know there are problems, just curious which ones you > "don't agree with") ? It supports only one card, it has very nontrivial locking, which may(I'm not sure after just finished diagonal review) lead to too big latencies, hifn_cipher() can not work with any other crypto design, I doubt it can work with other card capabilities other then you have implemented without major rewrite. I'm quite sure it is good driver for current crypto schema, but if acrypto will be committed it could not work without complete rewrite. > -- > Euege Evgeniy Polyakov Only failure makes us experts. -- Theo de Raadt From johnpol@2ka.mipt.ru Sat Oct 30 14:07:26 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 14:07:32 -0700 (PDT) Received: from mailer.campus.mipt.ru (mailer.campus.mipt.ru [194.85.82.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UL7Pms015002 for ; Sat, 30 Oct 2004 14:07:26 -0700 Received: from ffke-campus-gw.mipt.ru (2ka [194.85.82.65]) by mailer.campus.mipt.ru (8.13.1/8.13.1) with ESMTP id i9UL7GbQ001523; Sun, 31 Oct 2004 01:07:16 +0400 Received: from zanzibar.2ka.mipt.ru (zanzibar.2ka.mipt.ru [194.85.82.77]) by ffke-campus-gw.mipt.ru (8.12.11/8.12.11) with SMTP id i9UL730e027887; Sun, 31 Oct 2004 01:07:03 +0400 Date: Sun, 31 Oct 2004 01:24:23 +0400 From: Evgeniy Polyakov To: Eugene Surovegin Cc: hadi@cyberus.ca, netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. Message-ID: <20041031012423.74b98698@zanzibar.2ka.mipt.ru> In-Reply-To: <20041030205630.GD6256@gate.ebshome.net> References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> <20041030203550.GB6256@gate.ebshome.net> <20041031010415.4c798a04@zanzibar.2ka.mipt.ru> <20041030205630.GD6256@gate.ebshome.net> Reply-To: johnpol@2ka.mipt.ru Organization: MIPT X-Mailer: Sylpheed-Claws 0.9.12b (GTK+ 1.2.10; i386-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11206 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: johnpol@2ka.mipt.ru Precedence: bulk X-list: netdev On Sat, 30 Oct 2004 13:56:31 -0700 Eugene Surovegin wrote: > On Sun, Oct 31, 2004 at 01:04:15AM +0400, Evgeniy Polyakov wrote: > > On Sat, 30 Oct 2004 13:35:50 -0700 > > Eugene Surovegin wrote: > > > > > On Fri, Oct 29, 2004 at 06:06:52PM +0400, Evgeniy Polyakov wrote: > > > > If we have a hardware accelerator chip, than we _already_ have improvements > > > > with even the worst async crypto layer, since software and hardware > > > > will work in parrallel. > > > > > > This is not true. > > > > > > For example, if chip request setup and PCI transfer takes more than > > > just using sw implementation. This is reality for AES and short > > > packets. > > > > You have dataflow of packets, if invoce expenses take less time > > then you will win. > > Yes, but as I said for short packets, AES and fast box for example > this might not be true. > > > More than 1kbyte of data to be encrypted already beats time > > need for software encryption on 266 mhz. > > OK, what about 64 byte packets? I'm not saying hw crypto is useless, > what I'm saying is it's not that obvious that having hw crypto will > help in _all_ situations. Sure. For such cases I offered "rate" or "speed" parameter in my first e-mail, but it can be implicitly implemented by queue length. With 1 big datflow of packets with high priority and little dataflow of packets with little priority if we will catch high priority packets by SW and thus can have situation when we will _never_ catch low-priority packets, with even very slow HW we can route all those low-priority packets into it, at least they will be processed sometimes... > > And what about asynchronous crypto? > > Asynchronous? Never heard of it. Did you mean asymmetric? :) > If yes, ok, I _think_ hw crypto will help, provided we have kernel API > for such stuff. > > -- > Eugene Evgeniy Polyakov Only failure makes us experts. -- Theo de Raadt From ebs@ebshome.net Sat Oct 30 14:09:36 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 14:09:40 -0700 (PDT) Received: from gate.ebshome.net (gate.ebshome.net [64.81.67.12]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UL9aMe015358 for ; Sat, 30 Oct 2004 14:09:36 -0700 Received: (qmail 24141 invoked by uid 1000); 30 Oct 2004 14:09:15 -0700 Date: Sat, 30 Oct 2004 14:09:15 -0700 From: Eugene Surovegin To: Evgeniy Polyakov Cc: Michal Ludvig , netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. Message-ID: <20041030210915.GE6256@gate.ebshome.net> Mail-Followup-To: Evgeniy Polyakov , Michal Ludvig , netdev@oss.sgi.com, cryptoapi@lists.logix.cz References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> <41824D9A.3070407@logix.cz> <20041029183606.0b1a0538@zanzibar.2ka.mipt.ru> <20041029192741.5344ad0f@zanzibar.2ka.mipt.ru> <20041030203906.GC6256@gate.ebshome.net> <20041031011719.07858890@zanzibar.2ka.mipt.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041031011719.07858890@zanzibar.2ka.mipt.ru> X-ICQ-UIN: 1193073 X-Operating-System: Linux i686 X-PGP-Key: http://www.ebshome.net/pubkey.asc User-Agent: Mutt/1.5.5.1i X-archive-position: 11207 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: ebs@ebshome.net Precedence: bulk X-list: netdev On Sun, Oct 31, 2004 at 01:17:19AM +0400, Evgeniy Polyakov wrote: > On Sat, 30 Oct 2004 13:39:06 -0700 > Eugene Surovegin wrote: > > > On Fri, Oct 29, 2004 at 07:27:41PM +0400, Evgeniy Polyakov wrote: > > > but it was designed to be usefull only in custom MX box, > > > > This is not true. I coded it using Hifn PCI card plugged in 440GP eval > > board as well in P4 2.6 GHz box. > > > > Driver isn't perfect, it's quite simple, I suspended all work on it > > because without async crypto it doesn't make a lot of sense. > > > > > so it has some design notes that I do not agree with. > > > > And they are (I know there are problems, just curious which ones you > > "don't agree with") ? > > It supports only one card, Yes, and comment says it trivially fixed :) > it has very nontrivial locking, locking is really simple, it was obviously done for current sync crypto layer. > which may(I'm not sure after just finished diagonal review) lead to > too big latencies, Huh? > hifn_cipher() can not work with any other crypto design, Well, this funny one :). Of course it cannot, because none existed when I wrote it. If your async stuff will be accepted into the official kernel tree I'll re-write it ASAP. > I doubt it can work with other card capabilities other then you > have implemented without major rewrite. Hmm, what do you mean "other" card? It's written for particular Hifn chip. I wrote it for IPSec acceleration in mind. Some algorithms aren't supported (compression for example), because we don't use them. > I'm quite sure it is good driver for current crypto schema, but if > acrypto will be committed it could not work without complete rewrite. Yes, that's true :). That's the reason I never officially announced it, because current one is quite trivial, and there are a lot of things which can be improved upon, after async crypto is in, and IPSec uses it. -- Eugene From johnpol@2ka.mipt.ru Sat Oct 30 14:29:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 14:29:42 -0700 (PDT) Received: from mailer.campus.mipt.ru (mailer.campus.mipt.ru [194.85.82.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9ULTaO2016154 for ; Sat, 30 Oct 2004 14:29:37 -0700 Received: from ffke-campus-gw.mipt.ru (2ka [194.85.82.65]) by mailer.campus.mipt.ru (8.13.1/8.13.1) with ESMTP id i9ULTWB7004266; Sun, 31 Oct 2004 01:29:32 +0400 Received: from zanzibar.2ka.mipt.ru (zanzibar.2ka.mipt.ru [194.85.82.77]) by ffke-campus-gw.mipt.ru (8.12.11/8.12.11) with SMTP id i9ULTIiL016150; Sun, 31 Oct 2004 01:29:20 +0400 Date: Sun, 31 Oct 2004 01:46:38 +0400 From: Evgeniy Polyakov To: Eugene Surovegin Cc: Michal Ludvig , netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. Message-ID: <20041031014638.596da2a5@zanzibar.2ka.mipt.ru> In-Reply-To: <20041030210915.GE6256@gate.ebshome.net> References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> <41824D9A.3070407@logix.cz> <20041029183606.0b1a0538@zanzibar.2ka.mipt.ru> <20041029192741.5344ad0f@zanzibar.2ka.mipt.ru> <20041030203906.GC6256@gate.ebshome.net> <20041031011719.07858890@zanzibar.2ka.mipt.ru> <20041030210915.GE6256@gate.ebshome.net> Reply-To: johnpol@2ka.mipt.ru Organization: MIPT X-Mailer: Sylpheed-Claws 0.9.12b (GTK+ 1.2.10; i386-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11208 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: johnpol@2ka.mipt.ru Precedence: bulk X-list: netdev On Sat, 30 Oct 2004 14:09:15 -0700 Eugene Surovegin wrote: > On Sun, Oct 31, 2004 at 01:17:19AM +0400, Evgeniy Polyakov wrote: > > On Sat, 30 Oct 2004 13:39:06 -0700 > > Eugene Surovegin wrote: > > > > > On Fri, Oct 29, 2004 at 07:27:41PM +0400, Evgeniy Polyakov wrote: > > > > but it was designed to be usefull only in custom MX box, > > > > > > This is not true. I coded it using Hifn PCI card plugged in 440GP eval > > > board as well in P4 2.6 GHz box. > > > > > > Driver isn't perfect, it's quite simple, I suspended all work on it > > > because without async crypto it doesn't make a lot of sense. > > > > > > > so it has some design notes that I do not agree with. > > > > > > And they are (I know there are problems, just curious which ones you > > > "don't agree with") ? > > > > It supports only one card, > > Yes, and comment says it trivially fixed :) > > > it has very nontrivial locking, > > locking is really simple, it was obviously done for current sync > crypto layer. Current locking just can not be used tu support several sessions to be processed in a parallel, although hardware support it, not? Probably it is not driver problem, but what do we try to figure out? With current crypto it can work - good, with acrypto it must be completely rewritten. > > which may(I'm not sure after just finished diagonal review) lead to > > too big latencies, > > Huh? neither will hifn_cipher() busy-wait until request processing will be finished if it happens in interrupt context? > > hifn_cipher() can not work with any other crypto design, > > Well, this funny one :). Of course it cannot, because none existed > when I wrote it. It was written _only_ for syncronous events. I think only HW initialization bits can be copied into future version, but again, what do we discuss and/or accuse? :) > If your async stuff will be accepted into the official kernel tree > I'll re-write it ASAP. > > > I doubt it can work with other card capabilities other then you > > have implemented without major rewrite. > > Hmm, what do you mean "other" card? It's written for particular > Hifn chip. I wrote it for IPSec acceleration in mind. Some algorithms > aren't supported (compression for example), because we don't use > them. I mean other capabilities not card. > > I'm quite sure it is good driver for current crypto schema, but if > > acrypto will be committed it could not work without complete rewrite. > > Yes, that's true :). That's the reason I never officially announced it, > because current one is quite trivial, and there are a lot of things > which can be improved upon, after async crypto is in, and IPSec uses > it. > > -- > Eugene Evgeniy Polyakov Only failure makes us experts. -- Theo de Raadt From max@stro.at Sat Oct 30 15:22:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 15:23:03 -0700 (PDT) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UMMqVs017686 for ; Sat, 30 Oct 2004 15:22:53 -0700 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id 121155C00D; Sun, 31 Oct 2004 00:22:33 +0200 (CEST) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 15538-09; Sun, 31 Oct 2004 00:22:32 +0200 (CEST) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id C22935C00A; Sun, 31 Oct 2004 00:22:31 +0200 (CEST) Received: from max by sputnik with local (Exim 4.34) id 1CO1cC-00010l-VG; Sun, 31 Oct 2004 00:22:29 +0200 Date: Sun, 31 Oct 2004 00:22:28 +0200 From: maximilian attems To: Jeff Garzik Cc: Margit Schubert-While , Nishanth Aravamudan , hvr@gnu.org, mcgrof@studorgs.rutgers.edu, kernel-janitors@lists.osdl.org, prism54-devel@prism54.org, netdev@oss.sgi.com, Domen Puncer , linux-kernel@vger.kernel.org Subject: [patch 2.4] back port msleep(), msleep_interruptible() Message-ID: <20041030222228.GB1456@stro.at> Mail-Followup-To: Jeff Garzik , Margit Schubert-While , Nishanth Aravamudan , hvr@gnu.org, mcgrof@studorgs.rutgers.edu, kernel-janitors@lists.osdl.org, prism54-devel@prism54.org, netdev@oss.sgi.com, Domen Puncer , linux-kernel@vger.kernel.org References: <20040923221303.GB13244@us.ibm.com> <20040923221303.GB13244@us.ibm.com> <5.1.0.14.2.20040924074745.00b1cd40@pop.t-online.de> <415CD9D9.2000607@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <415CD9D9.2000607@pobox.com> User-Agent: Mutt/1.5.6+20040722i X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11209 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev On Fri, 01 Oct 2004, Jeff Garzik wrote: > I would rather see an msleep implementation in 2.4.x... thanks for Domen Puncer at helping out. msleep() and msleep_interruptible() as found in current 2.6 to 2.4. therefor also adds the helper functions ssleep(), jiffies_to_msecs(), jiffies_to_usecs(), msecs_to_jiffies(). compile and boot tested. Signed-off-by: Maximilian Attems --- include/linux/delay.h | 8 ++++++ include/linux/time.h | 41 +++++++++++++++++++++++++++++++++ kernel/Makefile | 3 +- kernel/timer.c | 33 ++++++++++++++++++++++++++ 4 files changed, 84 insertions(+), 1 deletion(-) diff -puN kernel/Makefile~add-msleep-2.4 kernel/Makefile --- a/kernel/Makefile~add-msleep-2.4 2004-10-30 22:48:46.000000000 +0200 +++ b/kernel/Makefile 2004-10-30 22:50:45.000000000 +0200 @@ -9,7 +9,8 @@ O_TARGET := kernel.o -export-objs = signal.o sys.o kmod.o context.o ksyms.o pm.o exec_domain.o printk.o +export-objs = signal.o sys.o kmod.o context.o ksyms.o pm.o exec_domain.o \ + printk.o timer.o obj-y = sched.o dma.o fork.o exec_domain.o panic.o printk.o \ module.o exit.o itimer.o info.o time.o softirq.o resource.o \ diff -puN kernel/timer.c~add-msleep-2.4 kernel/timer.c --- a/kernel/timer.c~add-msleep-2.4 2004-10-30 22:48:46.000000000 +0200 +++ b/kernel/timer.c 2004-10-30 22:50:09.000000000 +0200 @@ -22,6 +22,7 @@ #include #include #include +#include #include @@ -874,3 +875,35 @@ asmlinkage long sys_nanosleep(struct tim return 0; } +/** + * msleep - sleep safely even with waitqueue interruptions + * @msecs: Time in milliseconds to sleep for + */ +void msleep(unsigned int msecs) +{ + unsigned long timeout = msecs_to_jiffies(msecs) + 1; + + while (timeout) { + set_current_state(TASK_UNINTERRUPTIBLE); + timeout = schedule_timeout(timeout); + } +} + +EXPORT_SYMBOL(msleep); + +/** + * msleep_interruptible - sleep waiting for waitqueue interruptions + * @msecs: Time in milliseconds to sleep for + */ +unsigned long msleep_interruptible(unsigned int msecs) +{ + unsigned long timeout = msecs_to_jiffies(msecs) + 1; + + while (timeout && !signal_pending(current)) { + set_current_state(TASK_INTERRUPTIBLE); + timeout = schedule_timeout(timeout); + } + return jiffies_to_msecs(timeout); +} + +EXPORT_SYMBOL(msleep_interruptible); diff -puN include/linux/delay.h~add-msleep-2.4 include/linux/delay.h --- a/include/linux/delay.h~add-msleep-2.4 2004-10-30 22:48:46.000000000 +0200 +++ b/include/linux/delay.h 2004-10-30 22:48:46.000000000 +0200 @@ -34,4 +34,12 @@ extern unsigned long loops_per_jiffy; ({unsigned long msec=(n); while (msec--) udelay(1000);})) #endif +void msleep(unsigned int msecs); +unsigned long msleep_interruptible(unsigned int msecs); + +static inline void ssleep(unsigned int seconds) +{ + msleep(seconds * 1000); +} + #endif /* defined(_LINUX_DELAY_H) */ diff -puN include/linux/time.h~add-msleep-2.4 include/linux/time.h --- a/include/linux/time.h~add-msleep-2.4 2004-10-30 22:48:46.000000000 +0200 +++ b/include/linux/time.h 2004-10-30 22:48:46.000000000 +0200 @@ -126,4 +126,45 @@ struct itimerval { struct timeval it_value; /* current value */ }; +/* + * Convert jiffies to milliseconds and back. + * + * Avoid unnecessary multiplications/divisions in the + * two most common HZ cases: + */ +static inline unsigned int jiffies_to_msecs(const unsigned long j) +{ +#if HZ <= 1000 && !(1000 % HZ) + return (1000 / HZ) * j; +#elif HZ > 1000 && !(HZ % 1000) + return (j + (HZ / 1000) - 1)/(HZ / 1000); +#else + return (j * 1000) / HZ; +#endif +} + +static inline unsigned int jiffies_to_usecs(const unsigned long j) +{ +#if HZ <= 1000 && !(1000 % HZ) + return (1000000 / HZ) * j; +#elif HZ > 1000 && !(HZ % 1000) + return (j*1000 + (HZ - 1000))/(HZ / 1000); +#else + return (j * 1000000) / HZ; +#endif +} + +static inline unsigned long msecs_to_jiffies(const unsigned int m) +{ + if (m > jiffies_to_msecs(MAX_JIFFY_OFFSET)) + return MAX_JIFFY_OFFSET; +#if HZ <= 1000 && !(1000 % HZ) + return (m + (1000 / HZ) - 1) / (1000 / HZ); +#elif HZ > 1000 && !(HZ % 1000) + return m * (HZ / 1000); +#else + return (m * HZ + 999) / 1000; +#endif +} + #endif From jgarzik@pobox.com Sat Oct 30 15:41:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 15:41:57 -0700 (PDT) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UMfkNH018268 for ; Sat, 30 Oct 2004 15:41:47 -0700 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CO1uY-0001VD-4h; Sat, 30 Oct 2004 23:41:26 +0100 Message-ID: <41841886.2080609@pobox.com> Date: Sat, 30 Oct 2004 18:41:10 -0400 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: maximilian attems CC: Margit Schubert-While , Nishanth Aravamudan , hvr@gnu.org, mcgrof@studorgs.rutgers.edu, kernel-janitors@lists.osdl.org, prism54-devel@prism54.org, netdev@oss.sgi.com, Domen Puncer , linux-kernel@vger.kernel.org Subject: Re: [patch 2.4] back port msleep(), msleep_interruptible() References: <20040923221303.GB13244@us.ibm.com> <20040923221303.GB13244@us.ibm.com> <5.1.0.14.2.20040924074745.00b1cd40@pop.t-online.de> <415CD9D9.2000607@pobox.com> <20041030222228.GB1456@stro.at> In-Reply-To: <20041030222228.GB1456@stro.at> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11210 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 maximilian attems wrote: > diff -puN include/linux/delay.h~add-msleep-2.4 include/linux/delay.h > --- a/include/linux/delay.h~add-msleep-2.4 2004-10-30 22:48:46.000000000 +0200 > +++ b/include/linux/delay.h 2004-10-30 22:48:46.000000000 +0200 > @@ -34,4 +34,12 @@ extern unsigned long loops_per_jiffy; > ({unsigned long msec=(n); while (msec--) udelay(1000);})) > #endif > > +void msleep(unsigned int msecs); > +unsigned long msleep_interruptible(unsigned int msecs); > + > +static inline void ssleep(unsigned int seconds) [...] > +static inline unsigned int jiffies_to_msecs(const unsigned long j) > +static inline unsigned int jiffies_to_usecs(const unsigned long j) > +static inline unsigned long msecs_to_jiffies(const unsigned int m) I'm pretty sure more than one of these symbols clashes with a symbol defined locally in a driver. I like the patch but we can't apply it until the impact on existing code is evaluated. Jeff From janitor@sternwelten.at Sat Oct 30 15:42:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 15:42:50 -0700 (PDT) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UMghuE018426 for ; Sat, 30 Oct 2004 15:42:44 -0700 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id 625E45C00D; Sun, 31 Oct 2004 00:42:24 +0200 (CEST) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 30996-10; Sun, 31 Oct 2004 00:42:24 +0200 (CEST) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id DC3D35C00A; Sun, 31 Oct 2004 00:42:23 +0200 (CEST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by sputnik with esmtp (Exim 4.34) id 1CO1vP-0001pn-DB; Sun, 31 Oct 2004 00:42:19 +0200 Subject: [patch 01/18] list_for_each: drivers-net-tulip-de4x5.c To: jgarzik@pobox.com Cc: netdev@oss.sgi.com, janitor@sternwelten.at, domen@coderock.org From: janitor@sternwelten.at Date: Sun, 31 Oct 2004 00:42:19 +0200 Message-ID: X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11211 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev Hi. s/for/list_for_each/ Compile tested. Signed-off-by: Domen Puncer Signed-off-by: Maximilian Attems --- linux-2.6.10-rc1-max/drivers/net/tulip/de4x5.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -puN drivers/net/tulip/de4x5.c~list-for-each-drivers_net_tulip_de4x5 drivers/net/tulip/de4x5.c --- linux-2.6.10-rc1/drivers/net/tulip/de4x5.c~list-for-each-drivers_net_tulip_de4x5 2004-10-24 17:04:13.000000000 +0200 +++ linux-2.6.10-rc1-max/drivers/net/tulip/de4x5.c 2004-10-24 17:04:13.000000000 +0200 @@ -2143,9 +2143,9 @@ srom_search(struct net_device *dev, stru u_long iobase = 0; /* Clear upper 32 bits in Alphas */ int i, j, cfrv; struct de4x5_private *lp = netdev_priv(dev); - struct list_head *walk = &pdev->bus_list; + struct list_head *walk; - for (walk = walk->next; walk != &pdev->bus_list; walk = walk->next) { + list_for_each(walk, &pdev->bus_list) { struct pci_dev *this_dev = pci_dev_b(walk); /* Skip the pci_bus list entry */ _ From janitor@sternwelten.at Sat Oct 30 15:42:47 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 15:42:52 -0700 (PDT) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UMgk4a018454 for ; Sat, 30 Oct 2004 15:42:47 -0700 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id CB5005C00D; Sun, 31 Oct 2004 00:42:27 +0200 (CEST) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 03555-08; Sun, 31 Oct 2004 00:42:27 +0200 (CEST) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id 4C7955C00A; Sun, 31 Oct 2004 00:42:27 +0200 (CEST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by sputnik with esmtp (Exim 4.34) id 1CO1vS-0001st-LY; Sun, 31 Oct 2004 00:42:22 +0200 Subject: [patch 02/18] net/3c505: replace schedule_timeout() with msleep() To: jgarzik@pobox.com Cc: netdev@oss.sgi.com, janitor@sternwelten.at, nacc@us.ibm.com, pb@nexus.co.uk From: janitor@sternwelten.at Date: Sun, 31 Oct 2004 00:42:22 +0200 Message-ID: X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11212 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev Any comments would be appreciated. Description: Use msleep() instead of schedule_timeout() to guarantee the task delays as expected. Signed-off-by: Nishanth Aravamudan Acked-by: Phil Blundell Signed-off-by: Maximilian Attems --- linux-2.6.10-rc1-max/drivers/net/3c505.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff -puN drivers/net/3c505.c~msleep-drivers_net_3c505 drivers/net/3c505.c --- linux-2.6.10-rc1/drivers/net/3c505.c~msleep-drivers_net_3c505 2004-10-24 17:04:50.000000000 +0200 +++ linux-2.6.10-rc1-max/drivers/net/3c505.c 2004-10-24 17:04:50.000000000 +0200 @@ -1327,8 +1327,7 @@ static int __init elp_sense(struct net_d if (orig_HSR & DIR) { /* If HCR.DIR is up, we pull it down. HSR.DIR should follow. */ outb(0, dev->base_addr + PORT_CONTROL); - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(30*HZ/100); + msleep(300); if (inb_status(addr) & DIR) { if (elp_debug > 0) printk(notfound_msg, 2); @@ -1337,8 +1336,7 @@ static int __init elp_sense(struct net_d } else { /* If HCR.DIR is down, we pull it up. HSR.DIR should follow. */ outb(DIR, dev->base_addr + PORT_CONTROL); - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(30*HZ/100); + msleep(300); if (!(inb_status(addr) & DIR)) { if (elp_debug > 0) printk(notfound_msg, 3); _ From janitor@sternwelten.at Sat Oct 30 15:42:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 15:42:56 -0700 (PDT) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UMgoOW018477 for ; Sat, 30 Oct 2004 15:42:50 -0700 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id 6FD425C00E; Sun, 31 Oct 2004 00:42:31 +0200 (CEST) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20550-01; Sun, 31 Oct 2004 00:42:31 +0200 (CEST) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id CAED75C00A; Sun, 31 Oct 2004 00:42:30 +0200 (CEST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by sputnik with esmtp (Exim 4.34) id 1CO1vW-0001xA-8u; Sun, 31 Oct 2004 00:42:26 +0200 Subject: [patch 03/18] net/ixgb_osdep: replace schedule_timeout() with msleep() To: jgarzik@pobox.com Cc: netdev@oss.sgi.com, janitor@sternwelten.at, nacc@us.ibm.com From: janitor@sternwelten.at Date: Sun, 31 Oct 2004 00:42:25 +0200 Message-ID: X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11213 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev Any comments would be appreciated. Description: Use msleep() instead of schedule_timeout() to guarantee the task delays as expected. I was told earlier that the in_interrupt() check is not necessary. It would be nice to get some verification of this (i.e. the driver functions the same without it). Signed-off-by: Nishanth Aravamudan Signed-off-by: Maximilian Attems --- linux-2.6.10-rc1-max/drivers/net/ixgb/ixgb_osdep.h | 8 +------- 1 files changed, 1 insertion(+), 7 deletions(-) diff -puN drivers/net/ixgb/ixgb_osdep.h~msleep-drivers_net_ixgb_ixgb_osdep drivers/net/ixgb/ixgb_osdep.h --- linux-2.6.10-rc1/drivers/net/ixgb/ixgb_osdep.h~msleep-drivers_net_ixgb_ixgb_osdep 2004-10-24 17:04:57.000000000 +0200 +++ linux-2.6.10-rc1-max/drivers/net/ixgb/ixgb_osdep.h 2004-10-24 17:04:57.000000000 +0200 @@ -41,13 +41,7 @@ #include #ifndef msec_delay -#define msec_delay(x) do { if(in_interrupt()) { \ - /* Don't mdelay in interrupt context! */ \ - BUG(); \ - } else { \ - set_current_state(TASK_UNINTERRUPTIBLE); \ - schedule_timeout((x * HZ)/1000 + 2); \ - } } while(0) +#define msec_delay(x) msleep(x) #endif #define PCI_COMMAND_REGISTER PCI_COMMAND _ From janitor@sternwelten.at Sat Oct 30 15:42:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 15:42:59 -0700 (PDT) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UMgrNB018515 for ; Sat, 30 Oct 2004 15:42:53 -0700 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id 7D2DF5C00D; Sun, 31 Oct 2004 00:42:34 +0200 (CEST) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 03555-09; Sun, 31 Oct 2004 00:42:34 +0200 (CEST) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id 0E5255C00A; Sun, 31 Oct 2004 00:42:34 +0200 (CEST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by sputnik with esmtp (Exim 4.34) id 1CO1vZ-000201-Fn; Sun, 31 Oct 2004 00:42:29 +0200 Subject: [patch 04/18] net/ni65: replace schedule_timeout() with msleep() To: jgarzik@pobox.com Cc: netdev@oss.sgi.com, janitor@sternwelten.at, nacc@us.ibm.com From: janitor@sternwelten.at Date: Sun, 31 Oct 2004 00:42:29 +0200 Message-ID: X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11214 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev Any comments would be appreciated. Description: Use msleep() instead of schedule_timeout() to guarantee the task delays as expected. Signed-off-by: Nishanth Aravamudan Signed-off-by: Maximilian Attems --- linux-2.6.10-rc1-max/drivers/net/ni65.c | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) diff -puN drivers/net/ni65.c~msleep-drivers_net_ni65 drivers/net/ni65.c --- linux-2.6.10-rc1/drivers/net/ni65.c~msleep-drivers_net_ni65 2004-10-24 17:04:58.000000000 +0200 +++ linux-2.6.10-rc1-max/drivers/net/ni65.c 2004-10-24 17:04:58.000000000 +0200 @@ -526,8 +526,7 @@ static int __init ni65_probe1(struct net ni65_init_lance(p,dev->dev_addr,0,0); irq_mask = probe_irq_on(); writereg(CSR0_INIT|CSR0_INEA,CSR0); /* trigger interrupt */ - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ/50); + msleep(20); dev->irq = probe_irq_off(irq_mask); if(!dev->irq) { _ From janitor@sternwelten.at Sat Oct 30 15:42:57 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 15:43:05 -0700 (PDT) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UMguOK018585 for ; Sat, 30 Oct 2004 15:42:57 -0700 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id 305925C00D; Sun, 31 Oct 2004 00:42:38 +0200 (CEST) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20550-02; Sun, 31 Oct 2004 00:42:37 +0200 (CEST) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id 3FCD55C00A; Sun, 31 Oct 2004 00:42:37 +0200 (CEST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by sputnik with esmtp (Exim 4.34) id 1CO1vc-00022t-N2; Sun, 31 Oct 2004 00:42:32 +0200 Subject: [patch 05/18] net/s2io: replace schedule_timeout() with msleep() To: jgarzik@pobox.com Cc: netdev@oss.sgi.com, janitor@sternwelten.at, nacc@us.ibm.com From: janitor@sternwelten.at Date: Sun, 31 Oct 2004 00:42:32 +0200 Message-ID: X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11215 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev Any comments would be appreciated. Description: Use msleep() instead of schedule_timeout() to guarantee the task delays as expected. Signed-off-by: Nishanth Aravamudan Signed-off-by: Maximilian Attems --- linux-2.6.10-rc1-max/drivers/net/s2io.c | 47 ++++++++++---------------------- 1 files changed, 16 insertions(+), 31 deletions(-) diff -puN drivers/net/s2io.c~msleep-drivers_net_s2io drivers/net/s2io.c --- linux-2.6.10-rc1/drivers/net/s2io.c~msleep-drivers_net_s2io 2004-10-24 17:05:00.000000000 +0200 +++ linux-2.6.10-rc1-max/drivers/net/s2io.c 2004-10-24 17:05:00.000000000 +0200 @@ -555,8 +555,7 @@ static int initNic(struct s2io_nic *nic) val64 = 0; writeq(val64, &bar0->sw_reset); val64 = readq(&bar0->sw_reset); - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 2); + msleep(500); /* Enable Receiving broadcasts */ val64 = readq(&bar0->mac_cfg); @@ -803,8 +802,7 @@ static int initNic(struct s2io_nic *nic) dev->name); return -1; } - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 20); + msleep(50); time++; } @@ -838,8 +836,7 @@ static int initNic(struct s2io_nic *nic) return -1; } time++; - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 20); + msleep(50); } /* Initializing proper values as Pause threshold into all @@ -1182,8 +1179,7 @@ static int startNic(struct s2io_nic *nic writeq(val64, &bar0->mc_rldram_mrs); val64 = readq(&bar0->mc_rldram_mrs); - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 10); /* Delay by around 100 ms. */ + msleep(100); /* Delay by around 100 ms. */ /* Enabling ECC Protection. */ val64 = readq(&bar0->adapter_control); @@ -1891,8 +1887,7 @@ int waitForCmdComplete(nic_t * sp) ret = SUCCESS; break; } - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 20); + msleep(50); if (cnt++ > 10) break; } @@ -1931,15 +1926,13 @@ void s2io_reset(nic_t * sp) * As of now I'am just giving a 250ms delay and hoping that the * PCI write to sw_reset register is done by this time. */ - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 4); + msleep(250); /* Restore the PCI state saved during initializarion. */ pci_restore_state(sp->pdev); s2io_init_pci(sp); - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 4); + msleep(250); /* SXE-002: Configure link and activity LED to turn it off */ subid = sp->pdev->subsystem_device; @@ -2169,8 +2162,7 @@ int s2io_close(struct net_device *dev) break; } - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 20); + msleep(50); cnt++; if (cnt == 10) { DBG_PRINT(ERR_DBG, @@ -2846,11 +2838,10 @@ static int s2io_ethtool_idnic(struct net sp->id_timer.data = (unsigned long) sp; } mod_timer(&sp->id_timer, jiffies); - set_current_state(TASK_INTERRUPTIBLE); if (data) - schedule_timeout(data * HZ); + msleep_interruptible(data * 1000); else - schedule_timeout(MAX_SCHEDULE_TIMEOUT); + msleep_interruptible(jiffies_to_msecs(MAX_SCHEDULE_TIMEOUT)); del_timer_sync(&sp->id_timer); return 0; @@ -2943,8 +2934,7 @@ static u32 readEeprom(nic_t * sp, int of data = I2C_CONTROL_GET_DATA(val64); break; } - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 20); + msleep(50); exit_cnt++; } @@ -2983,8 +2973,7 @@ static int writeEeprom(nic_t * sp, int o ret = 0; break; } - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 20); + msleep(50); exit_cnt++; } @@ -3256,8 +3245,7 @@ static int s2io_bistTest(nic_t * sp, uin ret = 0; break; } - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 10); + msleep(100); cnt++; } @@ -3356,8 +3344,7 @@ static int s2io_rldramTest(nic_t * sp, u val64 = readq(&bar0->mc_rldram_test_ctrl); if (val64 & MC_RLDRAM_TEST_DONE) break; - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 5); + msleep(200); } if (cnt == 5) @@ -3373,8 +3360,7 @@ static int s2io_rldramTest(nic_t * sp, u val64 = readq(&bar0->mc_rldram_test_ctrl); if (val64 & MC_RLDRAM_TEST_DONE) break; - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 2); + msleep(500); } if (cnt == 5) @@ -3711,8 +3697,7 @@ static void s2io_set_link(unsigned long /* Allow a small delay for the NICs self initiated * cleanup to complete. */ - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ / 10); + msleep(100); val64 = readq(&bar0->adapter_status); if (verify_xena_quiescence(val64, nic->device_enabled_once)) { _ From janitor@sternwelten.at Sat Oct 30 15:43:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 15:43:09 -0700 (PDT) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UMh0xv018641 for ; Sat, 30 Oct 2004 15:43:00 -0700 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id A8D755C00D; Sun, 31 Oct 2004 00:42:41 +0200 (CEST) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20550-03; Sun, 31 Oct 2004 00:42:41 +0200 (CEST) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id 18EF15C00A; Sun, 31 Oct 2004 00:42:41 +0200 (CEST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by sputnik with esmtp (Exim 4.34) id 1CO1vg-00027C-CO; Sun, 31 Oct 2004 00:42:36 +0200 Subject: [patch 06/18] net/cosa: replace schedule_timeout() with msleep_interruptible() To: jgarzik@pobox.com Cc: netdev@oss.sgi.com, janitor@sternwelten.at, nacc@us.ibm.com, kas@fi.muni.cz From: janitor@sternwelten.at Date: Sun, 31 Oct 2004 00:42:36 +0200 Message-ID: X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11216 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev Any comments would be appreciated. Two patches have been removed from my set, so the total has been reduced to 38. Description: Use msleep_interruptible() instead of schedule_timeout() to guarantee the task delays as expected. Also use set_current_state() instaed of direct assignment of current->state. Signed-off-by: Nishanth Aravamudan Acked-by: Jan Kasprzak Signed-off-by: Maximilian Attems --- linux-2.6.10-rc1-max/drivers/net/wan/cosa.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff -puN drivers/net/wan/cosa.c~msleep-drivers_net_wan_cosa drivers/net/wan/cosa.c --- linux-2.6.10-rc1/drivers/net/wan/cosa.c~msleep-drivers_net_wan_cosa 2004-10-24 17:05:02.000000000 +0200 +++ linux-2.6.10-rc1-max/drivers/net/wan/cosa.c 2004-10-24 17:05:02.000000000 +0200 @@ -543,7 +543,7 @@ static int cosa_probe(int base, int irq, * FIXME: When this code is not used as module, we should * probably call udelay() instead of the interruptible sleep. */ - current->state = TASK_INTERRUPTIBLE; + set_current_state(TASK_INTERRUPTIBLE); cosa_putstatus(cosa, SR_TX_INT_ENA); schedule_timeout(30); irq = probe_irq_off(irqs); @@ -1564,8 +1564,7 @@ static int cosa_reset_and_read_id(struct cosa_getdata8(cosa); cosa_putstatus(cosa, SR_RST); #ifdef MODULE - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(HZ/2); + msleep_interruptible(500); #else udelay(5*100000); #endif @@ -1618,7 +1617,7 @@ static int get_wait_data(struct cosa_dat return r; } /* sleep if not ready to read */ - current->state = TASK_INTERRUPTIBLE; + set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(1); } printk(KERN_INFO "cosa: timeout in get_wait_data (status 0x%x)\n", @@ -1645,7 +1644,7 @@ static int put_wait_data(struct cosa_dat } #if 0 /* sleep if not ready to read */ - current->state = TASK_INTERRUPTIBLE; + set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(1); #endif } _ From janitor@sternwelten.at Sat Oct 30 15:43:07 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 15:43:14 -0700 (PDT) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UMh7bZ018819 for ; Sat, 30 Oct 2004 15:43:07 -0700 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id 565705C00D; Sun, 31 Oct 2004 00:42:48 +0200 (CEST) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20550-04; Sun, 31 Oct 2004 00:42:48 +0200 (CEST) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id D71D65C00A; Sun, 31 Oct 2004 00:42:47 +0200 (CEST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by sputnik with esmtp (Exim 4.34) id 1CO1vn-0002EW-95; Sun, 31 Oct 2004 00:42:43 +0200 Subject: [patch 08/18] net/cs89x0: replace schedule_timeout() with msleep_interruptible() To: jgarzik@pobox.com Cc: netdev@oss.sgi.com, janitor@sternwelten.at, nacc@us.ibm.com From: janitor@sternwelten.at Date: Sun, 31 Oct 2004 00:42:42 +0200 Message-ID: X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11218 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev Any comments would be appreciated. Description: Use msleep_interruptible() instead of schedule_timeout() to guarantee the task delays as expected. Signed-off-by: Nishanth Aravamudan Signed-off-by: Maximilian Attems --- linux-2.6.10-rc1-max/drivers/net/cs89x0.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -puN drivers/net/cs89x0.c~msleep_interruptible-drivers_net_cs89x0 drivers/net/cs89x0.c --- linux-2.6.10-rc1/drivers/net/cs89x0.c~msleep_interruptible-drivers_net_cs89x0 2004-10-24 17:05:10.000000000 +0200 +++ linux-2.6.10-rc1-max/drivers/net/cs89x0.c 2004-10-24 17:05:10.000000000 +0200 @@ -93,6 +93,7 @@ or override something. */ #include #include +#include /* * Set this to zero to disable DMA code @@ -909,8 +910,7 @@ void __init reset_chip(struct net_devic writereg(dev, PP_SelfCTL, readreg(dev, PP_SelfCTL) | POWER_ON_RESET); /* wait 30 ms */ - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(30*HZ/1000); + msleep_interruptible(30); #ifndef CONFIG_ARCH_IXDP2X01 if (lp->chip_type != CS8900) { _ From janitor@sternwelten.at Sat Oct 30 15:43:05 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 15:43:12 -0700 (PDT) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UMh4Zv018758 for ; Sat, 30 Oct 2004 15:43:04 -0700 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id 4C2AF5C00D; Sun, 31 Oct 2004 00:42:45 +0200 (CEST) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25332-01; Sun, 31 Oct 2004 00:42:44 +0200 (CEST) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id A89675C00A; Sun, 31 Oct 2004 00:42:44 +0200 (CEST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by sputnik with esmtp (Exim 4.34) id 1CO1vk-0002Be-1K; Sun, 31 Oct 2004 00:42:40 +0200 Subject: [patch 07/18] net/islpci_dev: replace schedule_timeout() with msleep() To: jgarzik@pobox.com Cc: netdev@oss.sgi.com, janitor@sternwelten.at, nacc@us.ibm.com From: janitor@sternwelten.at Date: Sun, 31 Oct 2004 00:42:39 +0200 Message-ID: X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11217 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev Any comments would be appreciated. Description: Use msleep() instead of schedule_timeout() to guarantee the task delays as expected. Also set_current_state() is inserted before schedule_timeout(). If the for-loop were to execute twice, the second time would not set the state before sleeping in the current code; this causes schedule_timeout() to return immediately. Signed-off-by: Nishanth Aravamudan Signed-off-by: Maximilian Attems --- linux-2.6.10-rc1-max/drivers/net/wireless/prism54/islpci_dev.c | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) diff -puN drivers/net/wireless/prism54/islpci_dev.c~msleep-drivers_net_wireless_prism54_islpci_dev drivers/net/wireless/prism54/islpci_dev.c --- linux-2.6.10-rc1/drivers/net/wireless/prism54/islpci_dev.c~msleep-drivers_net_wireless_prism54_islpci_dev 2004-10-24 17:05:03.000000000 +0200 +++ linux-2.6.10-rc1-max/drivers/net/wireless/prism54/islpci_dev.c 2004-10-24 17:05:03.000000000 +0200 @@ -438,8 +438,7 @@ prism54_bring_down(islpci_private *priv) wmb(); /* wait a while for the device to reset */ - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(50*HZ/1000); + msleep(50); return 0; } _ From janitor@sternwelten.at Sat Oct 30 15:43:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 15:43:24 -0700 (PDT) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UMhER0019000 for ; Sat, 30 Oct 2004 15:43:14 -0700 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id 6EFA95C00D; Sun, 31 Oct 2004 00:42:55 +0200 (CEST) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20550-05; Sun, 31 Oct 2004 00:42:55 +0200 (CEST) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id BFA3A5C00A; Sun, 31 Oct 2004 00:42:54 +0200 (CEST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by sputnik with esmtp (Exim 4.34) id 1CO1vu-0002Lf-5c; Sun, 31 Oct 2004 00:42:50 +0200 Subject: [patch 10/18] net/g96100eth: replace gt96100_delay() with msleep_interruptible() To: jgarzik@pobox.com Cc: netdev@oss.sgi.com, janitor@sternwelten.at, nacc@us.ibm.com From: janitor@sternwelten.at Date: Sun, 31 Oct 2004 00:42:49 +0200 Message-ID: X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11220 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev Any comments would be appreciated. Description: Use msleep_interruptible() instead of gt96100_delay() so that the task delays as expected. Remove the prototype and definition of gt96100_delay(). As I currently understand it, the check for interrupt context is not necessary in gt96100_delay(), as such a sleep will be caught within the scheduler. Signed-off-by: Nishanth Aravamudan Signed-off-by: Maximilian Attems --- linux-2.6.10-rc1-max/drivers/net/gt96100eth.c | 19 ++++--------------- 1 files changed, 4 insertions(+), 15 deletions(-) diff -puN drivers/net/gt96100eth.c~msleep_interruptible-drivers_net_gt96100eth drivers/net/gt96100eth.c --- linux-2.6.10-rc1/drivers/net/gt96100eth.c~msleep_interruptible-drivers_net_gt96100eth 2004-10-24 17:05:12.000000000 +0200 +++ linux-2.6.10-rc1-max/drivers/net/gt96100eth.c 2004-10-24 17:05:12.000000000 +0200 @@ -59,7 +59,6 @@ // prototypes static void* dmaalloc(size_t size, dma_addr_t *dma_handle); static void dmafree(size_t size, void *vaddr); -static void gt96100_delay(int msec); static int gt96100_add_hash_entry(struct net_device *dev, unsigned char* addr); static void read_mib_counters(struct gt96100_private *gp); @@ -183,16 +182,6 @@ static void dmafree(size_t size, void *v free_pages((unsigned long)vaddr, get_order(size)); } -static void gt96100_delay(int ms) -{ - if (in_interrupt()) - return; - else { - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(ms*HZ/1000); - } -} - static int parse_mac_addr(struct net_device *dev, char* macstr) { @@ -238,7 +227,7 @@ read_MII(int phy_addr, u32 reg) // wait for last operation to complete while (GT96100_READ(GT96100_ETH_SMI_REG) & smirBusy) { // snooze for 1 msec and check again - gt96100_delay(1); + msleep_interruptible(1); if (--timedout == 0) { printk(KERN_ERR "%s: busy timeout!!\n", __FUNCTION__); @@ -252,7 +241,7 @@ read_MII(int phy_addr, u32 reg) // wait for read to complete while (!((smir = GT96100_READ(GT96100_ETH_SMI_REG)) & smirReadValid)) { // snooze for 1 msec and check again - gt96100_delay(1); + msleep_interruptible(1); if (--timedout == 0) { printk(KERN_ERR "%s: timeout!!\n", __FUNCTION__); @@ -304,7 +293,7 @@ write_MII(int phy_addr, u32 reg, u16 dat // wait for last operation to complete while (GT96100_READ(GT96100_ETH_SMI_REG) & smirBusy) { // snooze for 1 msec and check again - gt96100_delay(1); + msleep_interruptible(1); if (--timedout == 0) { printk(KERN_ERR "%s: busy timeout!!\n", __FUNCTION__); @@ -528,7 +517,7 @@ abort(struct net_device *dev, u32 abort_ // wait for abort to complete while (GT96100ETH_READ(gp, GT96100_ETH_SDMA_COMM) & abort_bits) { // snooze for 20 msec and check again - gt96100_delay(1); + msleep_interruptible(20); if (--timedout == 0) { err("%s: timeout!!\n", __FUNCTION__); _ From janitor@sternwelten.at Sat Oct 30 15:43:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 15:43:25 -0700 (PDT) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UMhHF7019077 for ; Sat, 30 Oct 2004 15:43:17 -0700 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id 8D64C5C00E; Sun, 31 Oct 2004 00:42:58 +0200 (CEST) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25332-03; Sun, 31 Oct 2004 00:42:58 +0200 (CEST) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id 042D25C00A; Sun, 31 Oct 2004 00:42:58 +0200 (CEST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by sputnik with esmtp (Exim 4.34) id 1CO1vx-0002OW-FJ; Sun, 31 Oct 2004 00:42:53 +0200 Subject: [patch 11/18] net/pcnet32: replace schedule_timeout() with msleep_interruptible() To: jgarzik@pobox.com Cc: netdev@oss.sgi.com, janitor@sternwelten.at, nacc@us.ibm.com From: janitor@sternwelten.at Date: Sun, 31 Oct 2004 00:42:53 +0200 Message-ID: X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11221 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev Any comments would be appreciated. Description: Use msleep_interruptible() instead of schedule_timeout() to guarantee the task delays as expected. Signed-off-by: Nishanth Aravamudan Signed-off-by: Maximilian Attems --- linux-2.6.10-rc1-max/drivers/net/pcnet32.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/net/pcnet32.c~msleep_interruptible-drivers_net_pcnet32 drivers/net/pcnet32.c --- linux-2.6.10-rc1/drivers/net/pcnet32.c~msleep_interruptible-drivers_net_pcnet32 2004-10-24 17:05:14.000000000 +0200 +++ linux-2.6.10-rc1-max/drivers/net/pcnet32.c 2004-10-24 17:05:14.000000000 +0200 @@ -847,7 +847,7 @@ static int pcnet32_phys_id(struct net_de if ((!data) || (data > (u32)(MAX_SCHEDULE_TIMEOUT / HZ))) data = (u32)(MAX_SCHEDULE_TIMEOUT / HZ); - schedule_timeout(data * HZ); + msleep_interruptible(data * 1000); del_timer_sync(&lp->blink_timer); /* Restore the original value of the bcrs */ _ From janitor@sternwelten.at Sat Oct 30 15:43:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 15:43:19 -0700 (PDT) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UMhANL018913 for ; Sat, 30 Oct 2004 15:43:10 -0700 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id 81B0C5C00D; Sun, 31 Oct 2004 00:42:51 +0200 (CEST) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25332-02; Sun, 31 Oct 2004 00:42:51 +0200 (CEST) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id 13BB45C00A; Sun, 31 Oct 2004 00:42:51 +0200 (CEST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by sputnik with esmtp (Exim 4.34) id 1CO1vq-0002HF-E8; Sun, 31 Oct 2004 00:42:46 +0200 Subject: [patch 09/18] net/ewrk3: replace schedule_timeout() with msleep_interruptible() To: jgarzik@pobox.com Cc: netdev@oss.sgi.com, janitor@sternwelten.at, nacc@us.ibm.com From: janitor@sternwelten.at Date: Sun, 31 Oct 2004 00:42:46 +0200 Message-ID: X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11219 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev Any comments would be, as always, appreciated. -Nish Description: Uses msleep() instead of schedule_timeout() to guarantee the task delays as expected. Signed-off-by: Nishanth Aravamudan --- linux-2.6.10-rc1-max/drivers/net/ewrk3.c | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) diff -puN drivers/net/ewrk3.c~msleep_interruptible-drivers_net_ewrk3 drivers/net/ewrk3.c --- linux-2.6.10-rc1/drivers/net/ewrk3.c~msleep_interruptible-drivers_net_ewrk3 2004-10-24 17:06:20.000000000 +0200 +++ linux-2.6.10-rc1-max/drivers/net/ewrk3.c 2004-10-24 17:06:20.000000000 +0200 @@ -1655,8 +1655,7 @@ static int ewrk3_phys_id(struct net_devi /* Wait a little while */ spin_unlock_irqrestore(&lp->hw_lock, flags); - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(HZ>>2); + msleep(250); spin_lock_irqsave(&lp->hw_lock, flags); /* Exit if we got a signal */ _ From janitor@sternwelten.at Sat Oct 30 15:43:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 15:43:31 -0700 (PDT) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UMhLRv019197 for ; Sat, 30 Oct 2004 15:43:22 -0700 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id D3AED5C014; Sun, 31 Oct 2004 00:43:02 +0200 (CEST) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20550-06; Sun, 31 Oct 2004 00:43:02 +0200 (CEST) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id 3063F5C00A; Sun, 31 Oct 2004 00:43:02 +0200 (CEST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by sputnik with esmtp (Exim 4.34) id 1CO1w1-0002Uj-Hm; Sun, 31 Oct 2004 00:42:57 +0200 Subject: [patch 12/18] net/sb1000: replace nicedelay() with msleep_interruptible() To: jgarzik@pobox.com Cc: netdev@oss.sgi.com, janitor@sternwelten.at, nacc@us.ibm.com From: janitor@sternwelten.at Date: Sun, 31 Oct 2004 00:42:57 +0200 Message-ID: X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11222 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev Any comments would be appreciated. Description: Use msleep_interruptible() instead of nicedelay() to guarantee the task delays as expected. Remove the prototype and definition of nicedelay(). This is a very weird function, because it is called to sleep in terms of usecs, but always sleeps for 1 second, completely ignoring the parameter. I have gone ahead and followed suit, just sleeping for a second in all cases, but maybe someone with the hardware could tell me if perhaps the paramter *should* matter. Also remove a random "^L" character. Signed-off-by: Nishanth Aravamudan Signed-off-by: Maximilian Attems --- linux-2.6.10-rc1-max/drivers/net/sb1000.c | 15 +++------------ 1 files changed, 3 insertions(+), 12 deletions(-) diff -puN drivers/net/sb1000.c~msleep_interruptible-drivers_net_sb1000 drivers/net/sb1000.c --- linux-2.6.10-rc1/drivers/net/sb1000.c~msleep_interruptible-drivers_net_sb1000 2004-10-24 17:05:15.000000000 +0200 +++ linux-2.6.10-rc1-max/drivers/net/sb1000.c 2004-10-24 17:05:15.000000000 +0200 @@ -90,7 +90,6 @@ static int sb1000_close(struct net_devic /* SB1000 hardware routines to be used during open/configuration phases */ -static inline void nicedelay(unsigned long usecs); static inline int card_wait_for_busy_clear(const int ioaddr[], const char* name); static inline int card_wait_for_ready(const int ioaddr[], const char* name, @@ -247,20 +246,12 @@ static struct pnp_driver sb1000_driver = .remove = sb1000_remove_one, }; - /* * SB1000 hardware routines to be used during open/configuration phases */ const int TimeOutJiffies = (875 * HZ) / 100; -static inline void nicedelay(unsigned long usecs) -{ - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(HZ); - return; -} - /* Card Wait For Busy Clear (cannot be used during an interrupt) */ static inline int card_wait_for_busy_clear(const int ioaddr[], const char* name) @@ -475,7 +466,7 @@ sb1000_reset(const int ioaddr[], const c udelay(1000); outb(0x0, port); inb(port); - nicedelay(60000); + msleep_interruptible(1000); outb(0x4, port); inb(port); udelay(1000); @@ -537,7 +528,7 @@ sb1000_activate(const int ioaddr[], cons const unsigned char Command0[6] = {0x80, 0x11, 0x00, 0x00, 0x00, 0x00}; const unsigned char Command1[6] = {0x80, 0x16, 0x00, 0x00, 0x00, 0x00}; - nicedelay(50000); + msleep_interruptible(1000); if ((status = card_send_command(ioaddr, name, Command0, st))) return status; if ((status = card_send_command(ioaddr, name, Command1, st))) @@ -944,7 +935,7 @@ sb1000_open(struct net_device *dev) /* initialize sb1000 */ if ((status = sb1000_reset(ioaddr, name))) return status; - nicedelay(200000); + msleep_interruptible(1000); if ((status = sb1000_check_CRC(ioaddr, name))) return status; _ From janitor@sternwelten.at Sat Oct 30 15:43:27 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 15:43:35 -0700 (PDT) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UMhPR2019269 for ; Sat, 30 Oct 2004 15:43:25 -0700 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id 7F9635C015; Sun, 31 Oct 2004 00:43:06 +0200 (CEST) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20550-07; Sun, 31 Oct 2004 00:43:06 +0200 (CEST) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id B2B1B5C00A; Sun, 31 Oct 2004 00:43:05 +0200 (CEST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by sputnik with esmtp (Exim 4.34) id 1CO1w4-0002YG-VR; Sun, 31 Oct 2004 00:43:01 +0200 Subject: [patch 13/18] net/cycx_drv: replace delay_cycx() with msleep_interruptible() To: jgarzik@pobox.com Cc: netdev@oss.sgi.com, janitor@sternwelten.at, nacc@us.ibm.com, acme@conectiva.com.br From: janitor@sternwelten.at Date: Sun, 31 Oct 2004 00:43:00 +0200 Message-ID: X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11223 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev Any comments would be appreciated. Description: Use msleep_interruptible() instead of delay_cycx() to guarantee the task delays as expected. Remove the prototype and definition of delay_cycx(). Signed-off-by: Nishanth Aravamudan Acked-by: Arnaldo Carvalho de Melo Signed-off-by: Maximilian Attems --- linux-2.6.10-rc1-max/drivers/net/wan/cycx_drv.c | 24 ++++++++---------------- 1 files changed, 8 insertions(+), 16 deletions(-) diff -puN drivers/net/wan/cycx_drv.c~msleep_interruptible-drivers_net_wan_cycx_drv drivers/net/wan/cycx_drv.c --- linux-2.6.10-rc1/drivers/net/wan/cycx_drv.c~msleep_interruptible-drivers_net_wan_cycx_drv 2004-10-24 17:05:17.000000000 +0200 +++ linux-2.6.10-rc1-max/drivers/net/wan/cycx_drv.c 2004-10-24 17:05:17.000000000 +0200 @@ -56,7 +56,7 @@ #include /* for jiffies, HZ, etc. */ #include /* API definitions */ #include /* CYCX firmware module definitions */ -#include /* udelay */ +#include /* udelay, msleep */ #include /* read[wl], write[wl], ioremap, iounmap */ #define MOD_VERSION 0 @@ -74,7 +74,6 @@ static int reset_cyc2x(void __iomem *add static int detect_cyc2x(void __iomem *addr); /* Miscellaneous functions */ -static void delay_cycx(int sec); static int get_option_index(long *optlist, long optval); static u16 checksum(u8 *buf, u32 len); @@ -259,7 +258,7 @@ static int memory_exists(void __iomem *a if (readw(addr + 0x10) == TEST_PATTERN) return 1; - delay_cycx(1); + msleep_interruptible(1000); } return 0; @@ -316,7 +315,7 @@ static void cycx_reset_boot(void __iomem /* 80186 was in hold, go */ writeb(0, addr + START_CPU); - delay_cycx(1); + msleep_interruptible(1000); } /* Load data.bin file through boot (reset) interface. */ @@ -462,13 +461,13 @@ static int load_cyc2x(struct cycx_hw *hw cycx_reset_boot(hw->dpmbase, reset_image, img_hdr->reset_size); /* reset is waiting for boot */ writew(GEN_POWER_ON, pt_cycld); - delay_cycx(1); + msleep_interruptible(1000); for (j = 0 ; j < 3 ; j++) if (!readw(pt_cycld)) goto reset_loaded; else - delay_cycx(1); + msleep_interruptible(1000); } printk(KERN_ERR "%s: reset not started.\n", modname); @@ -495,7 +494,7 @@ reset_loaded: /* Arthur Ganzert's tip: wait a while after the firmware loading... seg abr 26 17:17:12 EST 1999 - acme */ - delay_cycx(7); + msleep_interruptible(7000); printk(KERN_INFO "%s: firmware loaded!\n", modname); /* enable interrupts */ @@ -547,20 +546,13 @@ static int get_option_index(long *optlis static int reset_cyc2x(void __iomem *addr) { writeb(0, addr + RST_ENABLE); - delay_cycx(2); + msleep_interruptible(2000); writeb(0, addr + RST_DISABLE); - delay_cycx(2); + msleep_interruptible(2000); return memory_exists(addr); } -/* Delay */ -static void delay_cycx(int sec) -{ - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(sec * HZ); -} - /* Calculate 16-bit CRC using CCITT polynomial. */ static u16 checksum(u8 *buf, u32 len) { _ From janitor@sternwelten.at Sat Oct 30 15:43:31 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 15:43:40 -0700 (PDT) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UMhS4c019351 for ; Sat, 30 Oct 2004 15:43:28 -0700 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id 94BC75C00D; Sun, 31 Oct 2004 00:43:09 +0200 (CEST) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25332-05; Sun, 31 Oct 2004 00:43:09 +0200 (CEST) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id 1FDB85C00A; Sun, 31 Oct 2004 00:43:09 +0200 (CEST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by sputnik with esmtp (Exim 4.34) id 1CO1w8-0002bI-A9; Sun, 31 Oct 2004 00:43:04 +0200 Subject: [patch 14/18] s390/ctctty: replace schedule_timeout() with msleep_interruptible() To: jgarzik@pobox.com Cc: netdev@oss.sgi.com, janitor@sternwelten.at, nacc@us.ibm.com, schwidefsky@de.ibm.com From: janitor@sternwelten.at Date: Sun, 31 Oct 2004 00:43:03 +0200 Message-ID: X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11224 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev Any comments would be appreciated. Description: Use msleep_interruptible() instead of schedule_timeout() to guarantee the task delays as expected. Signed-off-by: Nishanth Aravamudan Acked-by: Martin Schwidefsky Signed-off-by: Maximilian Attems --- linux-2.6.10-rc1-max/drivers/s390/net/ctctty.c | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) diff -puN drivers/s390/net/ctctty.c~msleep_interruptible-drivers_s390_net_ctctty drivers/s390/net/ctctty.c --- linux-2.6.10-rc1/drivers/s390/net/ctctty.c~msleep_interruptible-drivers_s390_net_ctctty 2004-10-24 17:05:21.000000000 +0200 +++ linux-2.6.10-rc1-max/drivers/s390/net/ctctty.c 2004-10-24 17:05:21.000000000 +0200 @@ -1057,8 +1057,7 @@ ctc_tty_close(struct tty_struct *tty, st info->tty = 0; tty->closing = 0; if (info->blocked_open) { - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ/2); + msleep_interruptible(500); wake_up_interruptible(&info->open_wait); } info->flags &= ~(CTC_ASYNC_NORMAL_ACTIVE | CTC_ASYNC_CLOSING); _ From janitor@sternwelten.at Sat Oct 30 15:43:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 15:43:42 -0700 (PDT) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UMhVgQ019408 for ; Sat, 30 Oct 2004 15:43:32 -0700 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id E0FD95C00D; Sun, 31 Oct 2004 00:43:12 +0200 (CEST) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20550-08; Sun, 31 Oct 2004 00:43:12 +0200 (CEST) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id 4F29E5C00A; Sun, 31 Oct 2004 00:43:12 +0200 (CEST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by sputnik with esmtp (Exim 4.34) id 1CO1wB-0002eM-If; Sun, 31 Oct 2004 00:43:07 +0200 Subject: [patch 15/18] net/ibmtr: replace schedule_timeout() with msleep()/msleep_interruptible() To: jgarzik@pobox.com Cc: netdev@oss.sgi.com, janitor@sternwelten.at, nacc@us.ibm.com From: janitor@sternwelten.at Date: Sun, 31 Oct 2004 00:43:07 +0200 Message-ID: X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11225 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev Any comments would be appreciated. Description: Use msleep() / msleep_interruptible() [as appropriate] instead of schedule_timeout() to guarantee the task delays as expected. Signed-off-by: Nishanth Aravamudan Signed-off-by: Maximilian Attems --- linux-2.6.10-rc1-max/drivers/net/tokenring/ibmtr.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff -puN drivers/net/tokenring/ibmtr.c~msleep+msleep_interruptible-drivers_net_tokenring_ibmtr drivers/net/tokenring/ibmtr.c --- linux-2.6.10-rc1/drivers/net/tokenring/ibmtr.c~msleep+msleep_interruptible-drivers_net_tokenring_ibmtr 2004-10-24 17:05:34.000000000 +0200 +++ linux-2.6.10-rc1-max/drivers/net/tokenring/ibmtr.c 2004-10-24 17:05:34.000000000 +0200 @@ -108,6 +108,7 @@ in the event that chatty debug messages #define IBMTR_DEBUG_MESSAGES 0 #include +#include #ifdef PCMCIA /* required for ibmtr_cs.c to build */ #undef MODULE /* yes, really */ @@ -317,7 +318,7 @@ static void ibmtr_cleanup_card(struct ne if (dev->base_addr) { outb(0,dev->base_addr+ADAPTRESET); - schedule_timeout(TR_RST_TIME); /* wait 50ms */ + msleep(jiffies_to_msecs(TR_RST_TIME)); /* wait 50ms */ outb(0,dev->base_addr+ADAPTRESETREL); } @@ -858,8 +859,7 @@ static int tok_init_card(struct net_devi writeb(~INT_ENABLE, ti->mmio + ACA_OFFSET + ACA_RESET + ISRP_EVEN); outb(0, PIOaddr + ADAPTRESET); - current->state=TASK_UNINTERRUPTIBLE; - schedule_timeout(TR_RST_TIME); /* wait 50ms */ + msleep(jiffies_to_msecs(TR_RST_TIME)); /* wait 50ms */ outb(0, PIOaddr + ADAPTRESETREL); #ifdef ENABLE_PAGING @@ -912,9 +912,8 @@ static int tok_open(struct net_device *d DPRINTK("Adapter is up and running\n"); return 0; } - current->state=TASK_INTERRUPTIBLE; - i=schedule_timeout(TR_RETRY_INTERVAL); /* wait 30 seconds */ - if(i!=0) break; /*prob. a signal, like the i>24*HZ case above */ + if(msleep_interruptible(jiffies_to_msecs(TR_RETRY_INTERVAL))) + break; /*prob. a signal, like the i>24*HZ case above */ } outb(0, dev->base_addr + ADAPTRESET);/* kill pending interrupts*/ DPRINTK("TERMINATED via signal\n"); /*BMS useful */ _ From janitor@sternwelten.at Sat Oct 30 15:43:41 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 15:43:50 -0700 (PDT) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UMhcDt019566 for ; Sat, 30 Oct 2004 15:43:38 -0700 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id 53DAB5C00D; Sun, 31 Oct 2004 00:43:19 +0200 (CEST) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20550-09; Sun, 31 Oct 2004 00:43:19 +0200 (CEST) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id D844D5C00A; Sun, 31 Oct 2004 00:43:18 +0200 (CEST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by sputnik with esmtp (Exim 4.34) id 1CO1wI-0002kc-5k; Sun, 31 Oct 2004 00:43:14 +0200 Subject: [patch 17/18] net/tms380tr: replace direct assignment with set_current_state() To: jgarzik@pobox.com Cc: netdev@oss.sgi.com, janitor@sternwelten.at, nacc@us.ibm.com From: janitor@sternwelten.at Date: Sun, 31 Oct 2004 00:43:13 +0200 Message-ID: X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11227 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev Any comments would be appreciated. Description: Use set_current_state() instead of direct assignment of current->state. Signed-off-by: Nishanth Aravamudan Signed-off-by: Maximilian Attems --- linux-2.6.10-rc1-max/drivers/net/tokenring/tms380tr.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/net/tokenring/tms380tr.c~set_current_state-drivers_net_tokenring_tms380tr drivers/net/tokenring/tms380tr.c --- linux-2.6.10-rc1/drivers/net/tokenring/tms380tr.c~set_current_state-drivers_net_tokenring_tms380tr 2004-10-24 17:06:11.000000000 +0200 +++ linux-2.6.10-rc1-max/drivers/net/tokenring/tms380tr.c 2004-10-24 17:06:11.000000000 +0200 @@ -1244,7 +1244,7 @@ void tms380tr_wait(unsigned long time) tmp = jiffies + time/(1000000/HZ); do { - current->state = TASK_INTERRUPTIBLE; + set_current_state(TASK_INTERRUPTIBLE); tmp = schedule_timeout(tmp); } while(time_after(tmp, jiffies)); #else _ From janitor@sternwelten.at Sat Oct 30 15:43:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 15:43:46 -0700 (PDT) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UMhZ32019479 for ; Sat, 30 Oct 2004 15:43:35 -0700 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id 799565C00D; Sun, 31 Oct 2004 00:43:16 +0200 (CEST) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25332-06; Sun, 31 Oct 2004 00:43:16 +0200 (CEST) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id AD3B45C00A; Sun, 31 Oct 2004 00:43:15 +0200 (CEST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by sputnik with esmtp (Exim 4.34) id 1CO1wE-0002hu-WE; Sun, 31 Oct 2004 00:43:11 +0200 Subject: [patch 16/18] net/airo: replace schedule_timeout() with msleep()/msleep_interuptible() To: jgarzik@pobox.com Cc: netdev@oss.sgi.com, janitor@sternwelten.at, nacc@us.ibm.com From: janitor@sternwelten.at Date: Sun, 31 Oct 2004 00:43:10 +0200 Message-ID: X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11226 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev Any comments would be appreciated. Description: Use msleep()/msleep_interruptible() [as appropriate] instead of schedule_timeout() to guarantee the task delays as expected. Also uses set_current_state() instead of direct assignment of current->state in one place. Signed-off-by: Nishanth Aravamudan Signed-off-by: Maximilian Attems --- linux-2.6.10-rc1-max/drivers/net/wireless/airo.c | 27 ++++++++--------------- 1 files changed, 10 insertions(+), 17 deletions(-) diff -puN drivers/net/wireless/airo.c~msleep+msleep_interruptible-drivers_net_wireless_airo drivers/net/wireless/airo.c --- linux-2.6.10-rc1/drivers/net/wireless/airo.c~msleep+msleep_interruptible-drivers_net_wireless_airo 2004-10-24 17:05:35.000000000 +0200 +++ linux-2.6.10-rc1-max/drivers/net/wireless/airo.c 2004-10-24 17:05:35.000000000 +0200 @@ -1699,9 +1699,8 @@ static int readBSSListRid(struct airo_in issuecommand(ai, &cmd, &rsp); up(&ai->sem); /* Let the command take effect */ - set_current_state (TASK_INTERRUPTIBLE); ai->task = current; - schedule_timeout (3*HZ); + msleep_interruptible(3*1000); ai->task = NULL; } rc = PC4500_readrid(ai, first ? RID_BSSLISTFIRST : RID_BSSLISTNEXT, @@ -2686,11 +2685,9 @@ int reset_card( struct net_device *dev , return -1; waitbusy (ai); OUT4500(ai,COMMAND,CMD_SOFTRESET); - set_current_state (TASK_UNINTERRUPTIBLE); - schedule_timeout (HZ/5); + msleep(200); waitbusy (ai); - set_current_state (TASK_UNINTERRUPTIBLE); - schedule_timeout (HZ/5); + msleep(200); if (lock) up(&ai->sem); return 0; @@ -2950,7 +2947,7 @@ static int airo_thread(void *data) { } break; } - current->state = TASK_RUNNING; + set_current_state(TASK_RUNNING); remove_wait_queue(&ai->thr_wait, &wait); locked = 1; } @@ -5518,12 +5515,12 @@ static int airo_pci_resume(struct pci_de } else { OUT4500(ai, EVACK, EV_AWAKEN); OUT4500(ai, EVACK, EV_AWAKEN); - schedule_timeout(HZ/10); + msleep_interruptible(100); } set_bit (FLAG_COMMIT, &ai->flags); disable_MAC(ai, 0); - schedule_timeout (HZ/5); + msleep_interruptible(200); if (ai->SSID) { writeSsidRid(ai, ai->SSID, 0); kfree(ai->SSID); @@ -7472,8 +7469,7 @@ int cmdreset(struct airo_info *ai) { OUT4500(ai,COMMAND,CMD_SOFTRESET); - set_current_state (TASK_UNINTERRUPTIBLE); - schedule_timeout (HZ); /* WAS 600 12/7/00 */ + ssleep(1); /* WAS 600 12/7/00 */ if(!waitbusy (ai)){ printk(KERN_INFO "Waitbusy hang AFTER RESET\n"); @@ -7500,8 +7496,7 @@ int setflashmode (struct airo_info *ai) OUT4500(ai, SWS3, FLASH_COMMAND); OUT4500(ai, COMMAND,0); } - set_current_state (TASK_UNINTERRUPTIBLE); - schedule_timeout (HZ/2); /* 500ms delay */ + msleep(500); /* 500ms delay */ if(!waitbusy(ai)) { clear_bit (FLAG_FLASHING, &ai->flags); @@ -7611,8 +7606,7 @@ int flashputbuf(struct airo_info *ai){ int flashrestart(struct airo_info *ai,struct net_device *dev){ int i,status; - set_current_state (TASK_UNINTERRUPTIBLE); - schedule_timeout (HZ); /* Added 12/7/00 */ + ssleep(1); /* Added 12/7/00 */ clear_bit (FLAG_FLASHING, &ai->flags); if (test_bit(FLAG_MPI, &ai->flags)) { status = mpi_init_descriptors(ai); @@ -7627,8 +7621,7 @@ int flashrestart(struct airo_info *ai,st ( ai, 2312, i >= MAX_FIDS / 2 ); } - set_current_state (TASK_UNINTERRUPTIBLE); - schedule_timeout (HZ); /* Added 12/7/00 */ + ssleep(1); /* Added 12/7/00 */ return status; } #endif /* CISCO_EXT */ _ From janitor@sternwelten.at Sat Oct 30 15:43:43 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 15:43:51 -0700 (PDT) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UMhfo8019622 for ; Sat, 30 Oct 2004 15:43:41 -0700 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id 997AA5C014; Sun, 31 Oct 2004 00:43:22 +0200 (CEST) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25332-07; Sun, 31 Oct 2004 00:43:22 +0200 (CEST) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id 0B0155C00E; Sun, 31 Oct 2004 00:43:22 +0200 (CEST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by sputnik with esmtp (Exim 4.34) id 1CO1wL-0002nU-B8; Sun, 31 Oct 2004 00:43:17 +0200 Subject: [patch 18/18] net/orinoco_plx: replace schedule_timeout() with ssleep() To: jgarzik@pobox.com Cc: netdev@oss.sgi.com, janitor@sternwelten.at, nacc@us.ibm.com From: janitor@sternwelten.at Date: Sun, 31 Oct 2004 00:43:17 +0200 Message-ID: X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11228 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev Any comments would be appreciated. Description: Use ssleep() instead of schedule_timeout() to guarantee the task delays as expected. Signed-off-by: Nishanth Aravamudan Signed-off-by: Maximilian Attems --- linux-2.6.10-rc1-max/drivers/net/wireless/orinoco_plx.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -puN drivers/net/wireless/orinoco_plx.c~ssleep-drivers_net_wireless_orinoco_plx drivers/net/wireless/orinoco_plx.c --- linux-2.6.10-rc1/drivers/net/wireless/orinoco_plx.c~ssleep-drivers_net_wireless_orinoco_plx 2004-10-24 17:06:13.000000000 +0200 +++ linux-2.6.10-rc1-max/drivers/net/wireless/orinoco_plx.c 2004-10-24 17:06:13.000000000 +0200 @@ -136,6 +136,7 @@ #include #include #include +#include #include @@ -352,8 +353,7 @@ static int __init orinoco_plx_init(void) static void __exit orinoco_plx_exit(void) { pci_unregister_driver(&orinoco_plx_driver); - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(HZ); + ssleep(1); } module_init(orinoco_plx_init); _ From nish.aravamudan@gmail.com Sat Oct 30 15:59:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 15:59:42 -0700 (PDT) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.205]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UMxaTn024827 for ; Sat, 30 Oct 2004 15:59:37 -0700 Received: by rproxy.gmail.com with SMTP id 77so43662rnk for ; Sat, 30 Oct 2004 15:59:20 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=iNp7QaqKFbmFWCI9y2c02qURNJvpBTqIvV/jBQuA4t3B9iVWEznKjo0nmncbMAfrBzMroz55l33n1Np7CzuaWuNvstMGBmgyzQsTQ0kWGMFEJ+J85FZfdxWvyqF5MlZs2hOC9ypdJ9lp6kbJgmLSrIULrOf4S+isLyMdu0/LW+w= Received: by 10.38.66.4 with SMTP id o4mr432679rna; Sat, 30 Oct 2004 15:59:20 -0700 (PDT) Received: by 10.38.77.41 with HTTP; Sat, 30 Oct 2004 15:59:20 -0700 (PDT) Message-ID: <29495f1d041030155953a9a776@mail.gmail.com> Date: Sat, 30 Oct 2004 15:59:20 -0700 From: Nish Aravamudan Reply-To: Nish Aravamudan To: Jeff Garzik Subject: Re: [KJ] Re: [patch 2.4] back port msleep(), msleep_interruptible() Cc: maximilian attems , netdev@oss.sgi.com, Margit Schubert-While , kernel-janitors@lists.osdl.org, mcgrof@studorgs.rutgers.edu, prism54-devel@prism54.org, Domen Puncer , linux-kernel@vger.kernel.org, hvr@gnu.org In-Reply-To: <41841886.2080609@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <20040923221303.GB13244@us.ibm.com> <5.1.0.14.2.20040924074745.00b1cd40@pop.t-online.de> <415CD9D9.2000607@pobox.com> <20041030222228.GB1456@stro.at> <41841886.2080609@pobox.com> X-archive-position: 11229 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: nish.aravamudan@gmail.com Precedence: bulk X-list: netdev On Sat, 30 Oct 2004 18:41:10 -0400, Jeff Garzik wrote: > maximilian attems wrote: > > diff -puN include/linux/delay.h~add-msleep-2.4 include/linux/delay.h > > --- a/include/linux/delay.h~add-msleep-2.4 2004-10-30 22:48:46.000000000 +0200 > > +++ b/include/linux/delay.h 2004-10-30 22:48:46.000000000 +0200 > > @@ -34,4 +34,12 @@ extern unsigned long loops_per_jiffy; > > ({unsigned long msec=(n); while (msec--) udelay(1000);})) > > #endif > > > > +void msleep(unsigned int msecs); > > +unsigned long msleep_interruptible(unsigned int msecs); > > + > > +static inline void ssleep(unsigned int seconds) > [...] > > +static inline unsigned int jiffies_to_msecs(const unsigned long j) > > > +static inline unsigned int jiffies_to_usecs(const unsigned long j) > > > +static inline unsigned long msecs_to_jiffies(const unsigned int m) > > > I'm pretty sure more than one of these symbols clashes with a symbol > defined locally in a driver. I like the patch but we can't apply it > until the impact on existing code is evaluated. More than likely much of the code cleanup that was done before I began my patches, like removing custom msleep()s from drivers will need to be done again, as Jeff points out. -Nish From max@stro.at Sat Oct 30 16:19:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 16:19:51 -0700 (PDT) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UNJhSa028809 for ; Sat, 30 Oct 2004 16:19:44 -0700 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id 3FD785C00D; Sun, 31 Oct 2004 01:19:24 +0200 (CEST) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 06174-06; Sun, 31 Oct 2004 01:19:23 +0200 (CEST) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id 4BEBB5C00A; Sun, 31 Oct 2004 01:19:23 +0200 (CEST) Received: from max by sputnik with local (Exim 4.34) id 1CO2V6-00041F-PB; Sun, 31 Oct 2004 01:19:12 +0200 Date: Sun, 31 Oct 2004 01:19:12 +0200 From: maximilian attems To: Nish Aravamudan Cc: Jeff Garzik , netdev@oss.sgi.com, Margit Schubert-While , kernel-janitors@lists.osdl.org, mcgrof@studorgs.rutgers.edu, prism54-devel@prism54.org, Domen Puncer , linux-kernel@vger.kernel.org, hvr@gnu.org Subject: Re: [KJ] Re: [patch 2.4] back port msleep(), msleep_interruptible() Message-ID: <20041030231912.GC1456@stro.at> Mail-Followup-To: Nish Aravamudan , Jeff Garzik , netdev@oss.sgi.com, Margit Schubert-While , kernel-janitors@lists.osdl.org, mcgrof@studorgs.rutgers.edu, prism54-devel@prism54.org, Domen Puncer , linux-kernel@vger.kernel.org, hvr@gnu.org References: <20040923221303.GB13244@us.ibm.com> <5.1.0.14.2.20040924074745.00b1cd40@pop.t-online.de> <415CD9D9.2000607@pobox.com> <20041030222228.GB1456@stro.at> <41841886.2080609@pobox.com> <29495f1d041030155953a9a776@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <29495f1d041030155953a9a776@mail.gmail.com> User-Agent: Mutt/1.5.6+20040722i X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11230 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev On Sat, 30 Oct 2004, Nish Aravamudan wrote: > On Sat, 30 Oct 2004 18:41:10 -0400, Jeff Garzik wrote: > > maximilian attems wrote: > > > diff -puN include/linux/delay.h~add-msleep-2.4 include/linux/delay.h > > > --- a/include/linux/delay.h~add-msleep-2.4 2004-10-30 22:48:46.000000000 +0200 > > > +++ b/include/linux/delay.h 2004-10-30 22:48:46.000000000 +0200 > > > @@ -34,4 +34,12 @@ extern unsigned long loops_per_jiffy; > > > ({unsigned long msec=(n); while (msec--) udelay(1000);})) > > > #endif > > > > > > +void msleep(unsigned int msecs); > > > +unsigned long msleep_interruptible(unsigned int msecs); > > > + > > > +static inline void ssleep(unsigned int seconds) > > [...] > > > +static inline unsigned int jiffies_to_msecs(const unsigned long j) > > > > > +static inline unsigned int jiffies_to_usecs(const unsigned long j) > > > > > +static inline unsigned long msecs_to_jiffies(const unsigned int m) > > > > > > I'm pretty sure more than one of these symbols clashes with a symbol > > defined locally in a driver. I like the patch but we can't apply it > > until the impact on existing code is evaluated. > > More than likely much of the code cleanup that was done before I began > my patches, like removing custom msleep()s from drivers will need to > be done again, as Jeff points out. > > -Nish thanks Jeff for your quick response, ooh i seee libata is defining an msleep(). so there seems to be need for it. ok we'll come up with tougher patchset. -- maks kernel janitor http://janitor.kernelnewbies.org/ From hadi@cyberus.ca Sat Oct 30 16:41:51 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 16:41:56 -0700 (PDT) Received: from mx03.cybersurf.com (mx03.cybersurf.com [209.197.145.106]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9UNfoXU029659 for ; Sat, 30 Oct 2004 16:41:51 -0700 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.30) id 1CO2qm-0001Wa-6p for netdev@oss.sgi.com; Sat, 30 Oct 2004 19:41:36 -0400 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1CO2qh-0001hr-HL; Sat, 30 Oct 2004 19:41:31 -0400 Subject: Re: Asynchronous crypto layer. From: jamal Reply-To: hadi@cyberus.ca To: johnpol@2ka.mipt.ru Cc: Eugene Surovegin , netdev@oss.sgi.com, cryptoapi@lists.logix.cz In-Reply-To: <20041031012423.74b98698@zanzibar.2ka.mipt.ru> References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> <20041030203550.GB6256@gate.ebshome.net> <20041031010415.4c798a04@zanzibar.2ka.mipt.ru> <20041030205630.GD6256@gate.ebshome.net> <20041031012423.74b98698@zanzibar.2ka.mipt.ru> Content-Type: text/plain Organization: jamalopolous Message-Id: <1099179687.1041.117.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 30 Oct 2004 19:41:27 -0400 Content-Transfer-Encoding: 7bit X-archive-position: 11231 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev On Sat, 2004-10-30 at 17:24, Evgeniy Polyakov wrote: > On Sat, 30 Oct 2004 13:56:31 -0700 > Eugene Surovegin wrote: > > OK, what about 64 byte packets? I'm not saying hw crypto is useless, > > what I'm saying is it's not that obvious that having hw crypto will > > help in _all_ situations. > > Sure. > For such cases I offered "rate" or "speed" parameter in my first e-mail, > but it can be implicitly implemented by queue length. > With 1 big datflow of packets with high priority and little dataflow of > packets with little priority if we will catch high priority packets by SW > and thus can have situation when we will _never_ catch low-priority packets, > with even very slow HW we can route all those low-priority packets into it, > at least they will be processed sometimes... Can you explain the "rate" or "speed" parameter ? I havent studied your code, however, what Eugene is pointing out is valuable detail/feedback. You should have in your queuing towards the crypto chip ability to batch. i.e sort of nagle-like "wait until we have 10 packets/20KB or 20 jiffies" before you send everything in the queue to the chip. As he points out (and i am sure he can back it with data ;->), that given the setup cost, packet size, algo and CPU and bus speed, it may not make sense to use the chip at all ;-> cheers, jamal From mcgrof@studorgs.rutgers.edu Sat Oct 30 18:02:00 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 18:02:05 -0700 (PDT) Received: from ruslug.rutgers.edu (studorgs.rutgers.edu [128.6.24.131]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9V120mB031987 for ; Sat, 30 Oct 2004 18:02:00 -0700 Received: by ruslug.rutgers.edu (Postfix, from userid 503) id EDFCFF99C1; Sat, 30 Oct 2004 21:01:43 -0400 (EDT) Date: Sat, 30 Oct 2004 21:01:43 -0400 To: Adrian Bunk Cc: Margit Schubert-While , prism54-private@prism54.org, netdev@oss.sgi.com, jgarzik@pobox.com, linux-net@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [2.6 patch] prism54: make some functions static Message-ID: <20041031010143.GI7887@ruslug.rutgers.edu> Mail-Followup-To: Adrian Bunk , Margit Schubert-While , prism54-private@prism54.org, netdev@oss.sgi.com, jgarzik@pobox.com, linux-net@vger.kernel.org, linux-kernel@vger.kernel.org References: <20041030054534.GC4374@stusta.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041030054534.GC4374@stusta.de> User-Agent: Mutt/1.3.28i X-Operating-System: 2.4.18-1-686 Organization: Rutgers University Student Linux Users Group From: mcgrof@studorgs.rutgers.edu (Luis R. Rodriguez) X-archive-position: 11232 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mcgrof@studorgs.rutgers.edu Precedence: bulk X-list: netdev On Sat, Oct 30, 2004 at 07:45:34AM +0200, Adrian Bunk wrote: > As a side effect it turned out that the mgt_unlatch_all function was > completely unused, and I've therefore removed it. mgt_unlatch_all is there as work in progress. We currently set ESSID to commit but we may need more work than that depending on the mode we're in. Even though we're not using it right now we may use it soon due to WPA. Please don't remove it. Luis -- GnuPG Key fingerprint = 113F B290 C6D2 0251 4D84 A34A 6ADD 4937 E20A 525E From khc@pm.waw.pl Sat Oct 30 18:04:53 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 18:05:02 -0700 (PDT) Received: from inx.pm.waw.pl (postfix@inx.pm.waw.pl [195.116.170.20]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9V14qmT032709 for ; Sat, 30 Oct 2004 18:04:52 -0700 Received: from defiant.pm.waw.pl (cnb178.neoplus.adsl.tpnet.pl [83.31.155.178]) by inx.pm.waw.pl (Postfix) with ESMTP id D92F7DF92; Sun, 31 Oct 2004 02:06:27 +0100 (CET) Received: by defiant.pm.waw.pl (Postfix, from userid 500) id 23EAA41053; Sun, 31 Oct 2004 02:02:49 +0100 (CET) To: Pekka Enberg Cc: Al Viro , davem@davemloft.net, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: net: generic netdev_ioaddr References: <1099044244.9566.0.camel@localhost> <20041029131607.GU24336@parcelfarce.linux.theplanet.co.uk> <20041029193827.GV24336@parcelfarce.linux.theplanet.co.uk> <1099129946.10961.9.camel@localhost> From: Krzysztof Halasa Date: Sun, 31 Oct 2004 02:02:48 +0100 In-Reply-To: <1099129946.10961.9.camel@localhost> (Pekka Enberg's message of "Sat, 30 Oct 2004 12:52:26 +0300") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 11233 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: khc@pm.waw.pl Precedence: bulk X-list: netdev Pekka Enberg writes: >> With this driver it happens to be MMIO address. Of course 0x4000 was an IO (non-MMIO) address. > It seems that the user can also setup dev->base_addr with "netdev=" > kernel parameter before a driver starts probing (for example > drivers/net/appletalk/cops.c). Should we get rid of "netdev=" too and > push preconfiguring down to the drivers that actually use it? Sure, cops.io= should be fine. Or cops.hw=io,irq,mem etc. Still, this is an issue with non-PnP ISA cards only. -- Krzysztof Halasa From jmorris@redhat.com Sat Oct 30 22:44:19 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 22:44:24 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9V5iJuh009982 for ; Sat, 30 Oct 2004 22:44:19 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9V5hwdx021789; Sun, 31 Oct 2004 01:43:58 -0400 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9V5hvr28714; Sun, 31 Oct 2004 01:43:57 -0400 Received: from thoron.boston.redhat.com (thoron.boston.redhat.com [172.16.80.63]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9V5htFF030125; Sun, 31 Oct 2004 01:43:55 -0400 Date: Sun, 31 Oct 2004 01:43:56 -0400 (EDT) From: James Morris X-X-Sender: jmorris@thoron.boston.redhat.com To: Evgeniy Polyakov cc: netdev@oss.sgi.com, Subject: Re: Asynchronous crypto layer. In-Reply-To: <20041030092036.4f954d89@zanzibar.2ka.mipt.ru> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 11234 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jmorris@redhat.com Precedence: bulk X-list: netdev On Sat, 30 Oct 2004, Evgeniy Polyakov wrote: > > Also, please consider EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL. > > I'm not insisting, but why? The existing crypto API uses EXPORT_SYMBOL_GPL, and I would hope that extensions to it do the same. This area is contentious in general, but ultimately, I think we should document that these APIs are not intended to be used by proprietary modules to do things like plug into the kernel and extend it in proprietary ways. - James -- James Morris From jmorris@redhat.com Sat Oct 30 23:10:08 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 23:10:14 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9V6A8Sh010995 for ; Sat, 30 Oct 2004 23:10:08 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9V69ZBk026135; Sun, 31 Oct 2004 01:09:35 -0500 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9V69Zr31011; Sun, 31 Oct 2004 01:09:35 -0500 Received: from thoron.boston.redhat.com (thoron.boston.redhat.com [172.16.80.63]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9V69XFF031146; Sun, 31 Oct 2004 01:09:33 -0500 Date: Sun, 31 Oct 2004 01:09:34 -0500 (EST) From: James Morris X-X-Sender: jmorris@thoron.boston.redhat.com To: Sam Leffler cc: johnpol@2ka.mipt.ru, jamal , , , "David S. Miller" Subject: Re: Asynchronous crypto layer. In-Reply-To: <4182A175.8050706@errno.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 11235 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jmorris@redhat.com Precedence: bulk X-list: netdev On Fri, 29 Oct 2004, Sam Leffler wrote: > And a paper I wrote explains how I fixed many of the problems with the > openbsd code in freebsd. > > http://www.usenix.org/publications/library/proceedings/bsdcon03/tech/leffler_crypto/leffler_crpto_html/ Thanks, that's a useful reference. For handling overload of crypto hardware, I was thinking of falling back to software processing (really, I guess this is just load balancing between hardware and software). - James -- James Morris From sam@errno.com Sat Oct 30 23:35:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Sat, 30 Oct 2004 23:35:27 -0700 (PDT) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9V6ZLGn011817 for ; Sat, 30 Oct 2004 23:35:21 -0700 Received: from [66.127.85.93] ([66.127.85.93]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id i9V6YtWi010425 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 30 Oct 2004 23:34:55 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <418487B0.7090203@errno.com> Date: Sat, 30 Oct 2004 23:35:28 -0700 From: Sam Leffler Organization: Errno Consulting User-Agent: Mozilla Thunderbird 0.8 (Macintosh/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: James Morris CC: johnpol@2ka.mipt.ru, jamal , netdev@oss.sgi.com, cryptoapi@lists.logix.cz, "David S. Miller" Subject: Re: Asynchronous crypto layer. References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11236 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: sam@errno.com Precedence: bulk X-list: netdev James Morris wrote: > On Fri, 29 Oct 2004, Sam Leffler wrote: > > >>And a paper I wrote explains how I fixed many of the problems with the >>openbsd code in freebsd. >> >>http://www.usenix.org/publications/library/proceedings/bsdcon03/tech/leffler_crypto/leffler_crpto_html/ > > > Thanks, that's a useful reference. > > For handling overload of crypto hardware, I was thinking of falling back > to software processing (really, I guess this is just load balancing > between hardware and software). I did a prototype scheduler (never committed) that took into account per-device performance metrics and outstanding operations. The s/w crypto driver was just part of the mix. As a result fallback on overload and using s/w crypto for small operands (where the setup overhead is too costly) just fell out. Sam From penberg@cs.helsinki.fi Sun Oct 31 00:11:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 00:11:37 -0700 (PDT) Received: from mail.cs.helsinki.fi (courier.cs.helsinki.fi [128.214.9.1]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9V7BSUv013152 for ; Sun, 31 Oct 2004 00:11:29 -0700 Received: from cs181096176.pp.htv.fi (cs181096176.pp.htv.fi [82.181.96.176]) (AUTH: LOGIN penberg, SSL: TLSv1/SSLv3,128bits,RC4-MD5) by mail.cs.helsinki.fi with esmtp; Sun, 31 Oct 2004 09:11:10 +0200 id 00070F0C.4184900E.00007029 Subject: Re: net: generic netdev_ioaddr From: Pekka Enberg To: Krzysztof Halasa Cc: Al Viro , davem@davemloft.net, netdev@oss.sgi.com, linux-kernel@vger.kernel.org In-Reply-To: References: <1099044244.9566.0.camel@localhost> <20041029131607.GU24336@parcelfarce.linux.theplanet.co.uk> <20041029193827.GV24336@parcelfarce.linux.theplanet.co.uk> <1099129946.10961.9.camel@localhost> Date: Sun, 31 Oct 2004 09:11:09 +0200 Message-Id: <1099206669.9571.10.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Mailer: Evolution 2.0.2 X-archive-position: 11237 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: penberg@cs.helsinki.fi Precedence: bulk X-list: netdev Hi, On Sun, 2004-10-31 at 02:02 +0100, Krzysztof Halasa wrote: > Sure, cops.io= should be fine. Or cops.hw=io,irq,mem etc. > > Still, this is an issue with non-PnP ISA cards only. Cops already exposes base address and irq as module parameters and yet it calls netdev_boot_setup_check() to check "netdev=" so I assume there's a reason for that. Perhaps something like the (untested) patch below would make more sense? Pekka Index: 2.6.10-rc1-mm1/drivers/net/appletalk/cops.c =================================================================== --- 2.6.10-rc1-mm1.orig/drivers/net/appletalk/cops.c 2004-10-31 08:56:31.487324160 +0200 +++ 2.6.10-rc1-mm1/drivers/net/appletalk/cops.c 2004-10-31 09:06:09.273487312 +0200 @@ -171,6 +171,8 @@ struct cops_local { + unsigned long base_addr; + unsigned int irq; struct net_device_stats stats; int board; /* Holds what board type is. */ int nodeid; /* Set to 1 once have nodeid. */ @@ -205,20 +207,22 @@ static void cleanup_card(struct net_device *dev) { - if (dev->irq) - free_irq(dev->irq, dev); - release_region(dev->base_addr, COPS_IO_EXTENT); + struct cops_local *lp = netdev_priv(dev); + if (lp->irq) + free_irq(lp->irq, dev); + release_region(lp->base_addr, COPS_IO_EXTENT); } /* * Check for a network adaptor of this type, and return '0' iff one exists. - * If dev->base_addr == 0, probe all likely locations. - * If dev->base_addr in [1..0x1ff], always return failure. + * If lp->base_addr == 0, probe all likely locations. + * If lp->base_addr in [1..0x1ff], always return failure. * otherwise go with what we pass in. */ struct net_device * __init cops_probe(int unit) { struct net_device *dev; + struct cops_local *lp; unsigned *port; int base_addr; int err = 0; @@ -227,13 +231,23 @@ if (!dev) return ERR_PTR(-ENOMEM); + lp = netdev_priv(dev); + if (unit >= 0) { + struct ifmap *map; + + base_addr = 0; + irq = 0; + sprintf(dev->name, "lt%d", unit); - netdev_boot_setup_check(dev); - irq = dev->irq; - base_addr = dev->base_addr; + + map = netdev_boot_ifmap(dev->name); + if (map) { + irq = lp->irq = map->irq; + base_addr = lp->base_addr = map->base_addr; + } } else { - base_addr = dev->base_addr = io; + base_addr = lp->base_addr = io; } SET_MODULE_OWNER(dev); @@ -273,7 +287,7 @@ */ static int __init cops_probe1(struct net_device *dev, int ioaddr) { - struct cops_local *lp; + struct cops_local *lp = netdev_priv(dev); static unsigned version_printed; int board = board_type; int retval; @@ -292,13 +306,13 @@ * interrupts are typically not reported by the boards, and we must * used AutoIRQ to find them. */ - dev->irq = irq; - switch (dev->irq) + lp->irq = irq; + switch (lp->irq) { case 0: /* COPS AutoIRQ routine */ - dev->irq = cops_irq(ioaddr, board); - if (dev->irq) + lp->irq = cops_irq(ioaddr, board); + if (lp->irq) break; /* No IRQ found on this port, fallthrough */ case 1: @@ -309,7 +323,7 @@ * IRQ 9, or don't know which one to set. */ case 2: - dev->irq = 9; + lp->irq = 9; break; /* Polled operation requested. Although irq of zero passed as @@ -317,7 +331,7 @@ * overload it to denote polled operation at runtime. */ case 0xff: - dev->irq = 0; + lp->irq = 0; break; default: @@ -325,16 +339,14 @@ } /* Reserve any actual interrupt. */ - if (dev->irq) { - retval = request_irq(dev->irq, &cops_interrupt, 0, dev->name, dev); + if (lp->irq) { + retval = request_irq(lp->irq, &cops_interrupt, 0, dev->name, dev); if (retval) goto err_out; } - dev->base_addr = ioaddr; + lp->base_addr = ioaddr; - lp = netdev_priv(dev); - memset(lp, 0, sizeof(struct cops_local)); spin_lock_init(&lp->lock); /* Copy local board variable to lp struct. */ @@ -354,11 +366,11 @@ /* Tell the user where the card is and what mode we're in. */ if(board==DAYNA) printk("%s: %s at %#3x, using IRQ %d, in Dayna mode.\n", - dev->name, cardname, ioaddr, dev->irq); + dev->name, cardname, ioaddr, lp->irq); if(board==TANGENT) { - if(dev->irq) + if(lp->irq) printk("%s: %s at %#3x, IRQ %d, in Tangent mode\n", - dev->name, cardname, ioaddr, dev->irq); + dev->name, cardname, ioaddr, lp->irq); else printk("%s: %s at %#3x, using polled IO, in Tangent mode.\n", dev->name, cardname, ioaddr); @@ -424,7 +436,7 @@ { struct cops_local *lp = netdev_priv(dev); - if(dev->irq==0) + if(lp->irq==0) { /* * I don't know if the Dayna-style boards support polled @@ -491,7 +503,7 @@ static void cops_reset(struct net_device *dev, int sleep) { struct cops_local *lp = netdev_priv(dev); - int ioaddr=dev->base_addr; + int ioaddr=lp->base_addr; if(lp->board==TANGENT) { @@ -526,7 +538,7 @@ struct ifreq ifr; struct ltfirmware *ltf= (struct ltfirmware *)&ifr.ifr_ifru; struct cops_local *lp = netdev_priv(dev); - int ioaddr=dev->base_addr; + int ioaddr=lp->base_addr; int length, i = 0; strcpy(ifr.ifr_name,"lt0"); @@ -619,7 +631,7 @@ static int cops_nodeid (struct net_device *dev, int nodeid) { struct cops_local *lp = netdev_priv(dev); - int ioaddr = dev->base_addr; + int ioaddr = lp->base_addr; if(lp->board == DAYNA) { @@ -695,13 +707,14 @@ int boguscount = 0; struct net_device *dev = (struct net_device *)ltdev; + struct cops_local *lp = netdev_priv(dev); del_timer(&cops_timer); if(dev == NULL) return; /* We've been downed */ - ioaddr = dev->base_addr; + ioaddr = lp->base_addr; do { status=inb(ioaddr+TANG_CARD_STATUS); if(status & TANG_RX_READY) @@ -725,12 +738,11 @@ static irqreturn_t cops_interrupt(int irq, void *dev_id, struct pt_regs * regs) { struct net_device *dev = dev_id; - struct cops_local *lp; + struct cops_local *lp = netdev_priv(dev); int ioaddr, status; int boguscount = 0; - ioaddr = dev->base_addr; - lp = netdev_priv(dev); + ioaddr = lp->base_addr; if(lp->board==DAYNA) { @@ -766,7 +778,7 @@ int rsp_type = 0; struct sk_buff *skb = NULL; struct cops_local *lp = netdev_priv(dev); - int ioaddr = dev->base_addr; + int ioaddr = lp->base_addr; int boguscount = 0; unsigned long flags; @@ -870,7 +882,7 @@ static void cops_timeout(struct net_device *dev) { struct cops_local *lp = netdev_priv(dev); - int ioaddr = dev->base_addr; + int ioaddr = lp->base_addr; lp->stats.tx_errors++; if(lp->board==TANGENT) @@ -892,7 +904,7 @@ static int cops_send_packet(struct sk_buff *skb, struct net_device *dev) { struct cops_local *lp = netdev_priv(dev); - int ioaddr = dev->base_addr; + int ioaddr = lp->base_addr; unsigned long flags; /* @@ -1006,7 +1018,7 @@ /* If we were running polled, yank the timer. */ - if(lp->board==TANGENT && dev->irq==0) + if(lp->board==TANGENT && lp->irq==0) del_timer(&cops_timer); netif_stop_queue(dev); Index: 2.6.10-rc1-mm1/include/linux/netdevice.h =================================================================== --- 2.6.10-rc1-mm1.orig/include/linux/netdevice.h 2004-10-31 08:56:31.488324008 +0200 +++ 2.6.10-rc1-mm1/include/linux/netdevice.h 2004-10-31 08:57:41.706649200 +0200 @@ -523,7 +523,9 @@ extern rwlock_t dev_base_lock; /* Device list lock */ extern int netdev_boot_setup_add(char *name, struct ifmap *map); -extern int netdev_boot_setup_check(struct net_device *dev); +/* use netdev_boot_ifmap instead */ +extern int __deprecated netdev_boot_setup_check(struct net_device *dev); +extern struct ifmap * netdev_boot_ifmap(const char *name); extern unsigned long netdev_boot_base(const char *prefix, int unit); extern struct net_device *dev_getbyhwaddr(unsigned short type, char *hwaddr); extern struct net_device *__dev_getfirstbyhwtype(unsigned short type); Index: 2.6.10-rc1-mm1/net/core/dev.c =================================================================== --- 2.6.10-rc1-mm1.orig/net/core/dev.c 2004-10-31 08:56:31.490323704 +0200 +++ 2.6.10-rc1-mm1/net/core/dev.c 2004-10-31 08:56:49.355607768 +0200 @@ -408,6 +408,32 @@ /** + * netdev_boot_ifmap - return boot time settings + * @name: the netdevice name + * + * Check boot time settings for the device. + * The found settings are set for the device to be used + * later in the device probing. + * Returns NULL if no settings found, pointer to struct ifmap if they are. + */ +struct ifmap *netdev_boot_ifmap(const char *name) +{ + struct netdev_boot_setup *s = dev_boot_setup; + struct ifmap *ret = NULL; + int i; + + for (i = 0; i < NETDEV_BOOT_SETUP_MAX; i++) { + if (s[i].name[0] != '\0' && s[i].name[0] != ' ' && + !strncmp(name, s[i].name, strlen(s[i].name))) { + ret = &s[i].map; + break; + } + } + return ret; +} + + +/** * netdev_boot_base - get address from boot time settings * @prefix: prefix for network device * @unit: id for network device @@ -3265,6 +3291,7 @@ EXPORT_SYMBOL(dev_set_mtu); EXPORT_SYMBOL(free_netdev); EXPORT_SYMBOL(netdev_boot_setup_check); +EXPORT_SYMBOL(netdev_boot_ifmap); EXPORT_SYMBOL(netdev_set_master); EXPORT_SYMBOL(netdev_state_change); EXPORT_SYMBOL(netif_receive_skb); From johnpol@2ka.mipt.ru Sun Oct 31 01:56:12 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 01:56:18 -0700 (PDT) Received: from mailer.campus.mipt.ru (mailer.campus.mipt.ru [194.85.82.4]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9V8uA33019218 for ; Sun, 31 Oct 2004 01:56:11 -0700 Received: from ffke-campus-gw.mipt.ru (2ka [194.85.82.65]) by mailer.campus.mipt.ru (8.13.1/8.13.1) with ESMTP id i9V8u3k1010694; Sun, 31 Oct 2004 11:56:03 +0300 Received: from zanzibar.2ka.mipt.ru (zanzibar.2ka.mipt.ru [194.85.82.77]) by ffke-campus-gw.mipt.ru (8.12.11/8.12.11) with SMTP id i9V8tkmw027461; Sun, 31 Oct 2004 11:55:47 +0300 Date: Sun, 31 Oct 2004 12:13:08 +0300 From: Evgeniy Polyakov To: hadi@cyberus.ca Cc: Eugene Surovegin , netdev@oss.sgi.com, cryptoapi@lists.logix.cz Subject: Re: Asynchronous crypto layer. Message-ID: <20041031121308.648e98f9@zanzibar.2ka.mipt.ru> In-Reply-To: <1099179687.1041.117.camel@jzny.localdomain> References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> <20041030203550.GB6256@gate.ebshome.net> <20041031010415.4c798a04@zanzibar.2ka.mipt.ru> <20041030205630.GD6256@gate.ebshome.net> <20041031012423.74b98698@zanzibar.2ka.mipt.ru> <1099179687.1041.117.camel@jzny.localdomain> Reply-To: johnpol@2ka.mipt.ru Organization: MIPT X-Mailer: Sylpheed-Claws 0.9.12b (GTK+ 1.2.10; i386-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-archive-position: 11238 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: johnpol@2ka.mipt.ru Precedence: bulk X-list: netdev On 30 Oct 2004 19:41:27 -0400 jamal wrote: > On Sat, 2004-10-30 at 17:24, Evgeniy Polyakov wrote: > > On Sat, 30 Oct 2004 13:56:31 -0700 > > Eugene Surovegin wrote: > > > > > OK, what about 64 byte packets? I'm not saying hw crypto is useless, > > > what I'm saying is it's not that obvious that having hw crypto will > > > help in _all_ situations. > > > > Sure. > > For such cases I offered "rate" or "speed" parameter in my first e-mail, > > but it can be implicitly implemented by queue length. > > With 1 big datflow of packets with high priority and little dataflow of > > packets with little priority if we will catch high priority packets by SW > > and thus can have situation when we will _never_ catch low-priority packets, > > with even very slow HW we can route all those low-priority packets into it, > > at least they will be processed sometimes... > > Can you explain the "rate" or "speed" parameter ? Driver writer can set "rate" parameter to any number from 0 to 64k - and it will show speed of this driver in current mode/type/operation. For example: struct crypto_capability cap[] = { { .mode = CRYPTO_MODE_EBC, .operation = CRYPTO_OP_ENCRYPT, .type = CRYPTO_TYPE_AES_128, .qlen = 1000, .rate = 10000 }, { .mode = CRYPTO_MODE_EBC, .operation = CRYPTO_OP_ENCRYPT, .type = CRYPTO_TYPE_DES, .qlen = 1000, .rate = 65000 }, and so on. That mean that this driver perform des 6 time faster than aes, but it should be fair numbers and somehow measured and compared to other drivers. This also can be achieved by qlen parameter - if driver writer sets it to bigger walue then in this mode driver/hardware works faster. But driver writer can set qlen in a too big value just because it want it to be such without any means of driver/hardware capabilities. It is not forbidden. And the last and the most interesting one is following: we create per session initialiser parameter "session_processin_time" which will be sum of the time slices when driver performed operation on session, since we alredy has "scomplete" paramenter which is equal to the amount of completed(processed) session then we have _fair_ speed of the driver/hardware in a given mode/operation/type. Of course load blancer should select device with the lowest session_processing_time/scompleted. I think third variant is what we want. I will think of it some more and will implement soon. > I havent studied your code, however, what Eugene is pointing out is > valuable detail/feedback. > > You should have in your queuing towards the crypto chip ability to > batch. i.e sort of nagle-like "wait until we have 10 packets/20KB or 20 > jiffies" before you send everything in the queue to the chip. That is exactly how crypto driver should be written. Driver has it's queue and number of session in it, so it and only it can decide when begin to process them in the most effective way. > As he points out (and i am sure he can back it with data ;->), that > given the setup cost, packet size, algo and CPU and bus speed, it may > not make sense to use the chip at all ;-> Michal has numbers - pure hardware beats soft in a certain setups in a fully synchronous schema, let's work SW and HW in parallel. Of course SW can encrypt 64 byte faster than it will be transfered to old ISA crypto card, but it worth to do it for compressing with LZW 9000 bytes jumbo frame. > > cheers, > jamal > > Evgeniy Polyakov Only failure makes us experts. -- Theo de Raadt From mludvig@suse.cz Sun Oct 31 02:47:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 02:47:09 -0800 (PST) Received: from maxipes.logix.cz ([217.11.251.249]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VAl1ku023698 for ; Sun, 31 Oct 2004 02:47:04 -0800 Received: from [10.20.113.19] (r2k63.chello.upc.cz [62.245.74.63]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by maxipes.logix.cz (Postfix) with ESMTP id 81C321F9D5; Sun, 31 Oct 2004 11:46:44 +0100 (CET) Message-ID: <4184C286.3000400@suse.cz> Date: Sun, 31 Oct 2004 11:46:30 +0100 From: Michal Ludvig User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616 X-Accept-Language: cs, cz, en MIME-Version: 1.0 To: johnpol@2ka.mipt.ru Cc: hadi@cyberus.ca, netdev@oss.sgi.com, cryptoapi@lists.logix.cz, Eugene Surovegin Subject: Re: Asynchronous crypto layer. References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> <20041030203550.GB6256@gate.ebshome.net> <20041031010415.4c798a04@zanzibar.2ka.mipt.ru> <20041030205630.GD6256@gate.ebshome.net> <20041031012423.74b98698@zanzibar.2ka.mipt.ru> <1099179687.1041.117.camel@jzny.localdomain> <20041031121308.648e98f9@zanzibar.2ka.mipt.ru> In-Reply-To: <20041031121308.648e98f9@zanzibar.2ka.mipt.ru> X-Enigmail-Version: 0.84.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-archive-position: 11239 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mludvig@suse.cz Precedence: bulk X-list: netdev -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Evgeniy Polyakov wrote: > >>As he points out (and i am sure he can back it with data ;->), that >>given the setup cost, packet size, algo and CPU and bus speed, it may >>not make sense to use the chip at all ;-> > > Michal has numbers - pure hardware beats soft in a certain setups > in a fully synchronous schema, let's work SW and HW in parallel. Yes, I have *some* numbers, but consider that they are for quite eligible setup - encrypting ~1.5k IPsec packets. I should retry with a much smaller MTU to see the difference... I think it won't be the programmer but the system administrator who will have to correctly set priorities and constraints for different hardware/software engines for the particular system. With a slow CPU it may be worth to offload even small blocks to hardware, with a fast one it may be worth to set HW and SW as equal, etc. Michal Ludvig - -- SUSE Labs mludvig@suse.cz (+420) 296.545.373 http://www.suse.cz Personal homepage http://www.logix.cz/michal -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFBhMKDDDolCcRbIhgRAqhBAKCCYwol3N3pd69yBI1HyEEFH0diOACeOqw6 2yCxYNf91eEG1Omi8uQ+Un4= =i1UL -----END PGP SIGNATURE----- From jgarzik@pobox.com Sun Oct 31 03:02:22 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 03:02:32 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VB2LLO024308 for ; Sun, 31 Oct 2004 03:02:22 -0800 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CODTH-0005KT-EI; Sun, 31 Oct 2004 11:02:03 +0000 Message-ID: <4184C61F.2080906@pobox.com> Date: Sun, 31 Oct 2004 06:01:51 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: janitor@sternwelten.at CC: netdev@oss.sgi.com, nacc@us.ibm.com Subject: Re: [patch 16/18] net/airo: replace schedule_timeout() with msleep()/msleep_interuptible() References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11240 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 janitor@sternwelten.at wrote: > Any comments would be appreciated. > > Description: Use msleep()/msleep_interruptible() [as appropriate] > instead of schedule_timeout() to guarantee the task delays as > expected. Also uses set_current_state() instead of direct assignment of > current->state in one place. > > Signed-off-by: Nishanth Aravamudan > Signed-off-by: Maximilian Attems > > --- > > linux-2.6.10-rc1-max/drivers/net/wireless/airo.c | 27 ++++++++--------------- > 1 files changed, 10 insertions(+), 17 deletions(-) > > diff -puN drivers/net/wireless/airo.c~msleep+msleep_interruptible-drivers_net_wireless_airo drivers/net/wireless/airo.c > --- linux-2.6.10-rc1/drivers/net/wireless/airo.c~msleep+msleep_interruptible-drivers_net_wireless_airo 2004-10-24 17:05:35.000000000 +0200 > +++ linux-2.6.10-rc1-max/drivers/net/wireless/airo.c 2004-10-24 17:05:35.000000000 +0200 > @@ -1699,9 +1699,8 @@ static int readBSSListRid(struct airo_in > issuecommand(ai, &cmd, &rsp); > up(&ai->sem); > /* Let the command take effect */ > - set_current_state (TASK_INTERRUPTIBLE); > ai->task = current; > - schedule_timeout (3*HZ); > + msleep_interruptible(3*1000); > ai->task = NULL; > } > rc = PC4500_readrid(ai, first ? RID_BSSLISTFIRST : RID_BSSLISTNEXT, use ssleep() here > @@ -2950,7 +2947,7 @@ static int airo_thread(void *data) { > } > break; > } > - current->state = TASK_RUNNING; > + set_current_state(TASK_RUNNING); > remove_wait_queue(&ai->thr_wait, &wait); > locked = 1; > } why are you adding barriers? Jeff From jgarzik@pobox.com Sun Oct 31 03:03:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 03:03:41 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VB3aCk024588 for ; Sun, 31 Oct 2004 03:03:36 -0800 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CODUV-0005M4-Lk; Sun, 31 Oct 2004 11:03:19 +0000 Message-ID: <4184C66B.8040501@pobox.com> Date: Sun, 31 Oct 2004 06:03:07 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: janitor@sternwelten.at CC: netdev@oss.sgi.com, nacc@us.ibm.com Subject: Re: [patch 15/18] net/ibmtr: replace schedule_timeout() with msleep()/msleep_interruptible() References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11241 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 janitor@sternwelten.at wrote: > Any comments would be appreciated. > > Description: Use msleep() / msleep_interruptible() [as appropriate] > instead of schedule_timeout() to guarantee the task delays as expected. > > Signed-off-by: Nishanth Aravamudan > Signed-off-by: Maximilian Attems > > --- > > linux-2.6.10-rc1-max/drivers/net/tokenring/ibmtr.c | 11 +++++------ > 1 files changed, 5 insertions(+), 6 deletions(-) > > diff -puN drivers/net/tokenring/ibmtr.c~msleep+msleep_interruptible-drivers_net_tokenring_ibmtr drivers/net/tokenring/ibmtr.c > --- linux-2.6.10-rc1/drivers/net/tokenring/ibmtr.c~msleep+msleep_interruptible-drivers_net_tokenring_ibmtr 2004-10-24 17:05:34.000000000 +0200 > +++ linux-2.6.10-rc1-max/drivers/net/tokenring/ibmtr.c 2004-10-24 17:05:34.000000000 +0200 > @@ -108,6 +108,7 @@ in the event that chatty debug messages > #define IBMTR_DEBUG_MESSAGES 0 > > #include > +#include > > #ifdef PCMCIA /* required for ibmtr_cs.c to build */ > #undef MODULE /* yes, really */ > @@ -317,7 +318,7 @@ static void ibmtr_cleanup_card(struct ne > if (dev->base_addr) { > outb(0,dev->base_addr+ADAPTRESET); > > - schedule_timeout(TR_RST_TIME); /* wait 50ms */ > + msleep(jiffies_to_msecs(TR_RST_TIME)); /* wait 50ms */ > > outb(0,dev->base_addr+ADAPTRESETREL); > } > @@ -858,8 +859,7 @@ static int tok_init_card(struct net_devi > writeb(~INT_ENABLE, ti->mmio + ACA_OFFSET + ACA_RESET + ISRP_EVEN); > outb(0, PIOaddr + ADAPTRESET); > > - current->state=TASK_UNINTERRUPTIBLE; > - schedule_timeout(TR_RST_TIME); /* wait 50ms */ > + msleep(jiffies_to_msecs(TR_RST_TIME)); /* wait 50ms */ > > outb(0, PIOaddr + ADAPTRESETREL); > #ifdef ENABLE_PAGING > @@ -912,9 +912,8 @@ static int tok_open(struct net_device *d > DPRINTK("Adapter is up and running\n"); > return 0; > } > - current->state=TASK_INTERRUPTIBLE; > - i=schedule_timeout(TR_RETRY_INTERVAL); /* wait 30 seconds */ > - if(i!=0) break; /*prob. a signal, like the i>24*HZ case above */ > + if(msleep_interruptible(jiffies_to_msecs(TR_RETRY_INTERVAL))) > + break; /*prob. a signal, like the i>24*HZ case above */ > } > outb(0, dev->base_addr + ADAPTRESET);/* kill pending interrupts*/ > DPRINTK("TERMINATED via signal\n"); /*BMS useful */ It makes more sense to convert the constants to msecs in the source code, instead of converting them at runtime. Jeff From jgarzik@pobox.com Sun Oct 31 03:04:37 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 03:04:40 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VB4a6n025114 for ; Sun, 31 Oct 2004 03:04:37 -0800 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CODVT-0005NM-I4; Sun, 31 Oct 2004 11:04:19 +0000 Message-ID: <4184C6A7.7060400@pobox.com> Date: Sun, 31 Oct 2004 06:04:07 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: janitor@sternwelten.at CC: netdev@oss.sgi.com, nacc@us.ibm.com, acme@conectiva.com.br Subject: Re: [patch 13/18] net/cycx_drv: replace delay_cycx() with msleep_interruptible() References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11242 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 janitor@sternwelten.at wrote: > -/* Delay */ > -static void delay_cycx(int sec) > -{ > - set_current_state(TASK_INTERRUPTIBLE); > - schedule_timeout(sec * HZ); > -} this _clearly_ wants an ssleep() derivative, not msleep() Jeff From jgarzik@pobox.com Sun Oct 31 03:05:44 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 03:05:48 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VB5iQX025490 for ; Sun, 31 Oct 2004 03:05:44 -0800 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CODWZ-0005Q8-8D; Sun, 31 Oct 2004 11:05:27 +0000 Message-ID: <4184C6EB.1000700@pobox.com> Date: Sun, 31 Oct 2004 06:05:15 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: janitor@sternwelten.at CC: netdev@oss.sgi.com, nacc@us.ibm.com Subject: Re: [patch 12/18] net/sb1000: replace nicedelay() with msleep_interruptible() References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11243 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 janitor@sternwelten.at wrote: > Any comments would be appreciated. > > Description: Use msleep_interruptible() instead of nicedelay() > to guarantee the task delays as expected. Remove the prototype and > definition of nicedelay(). This is a very weird function, because it is > called to sleep in terms of usecs, but always sleeps for 1 second, > completely ignoring the parameter. I have gone ahead and followed suit, > just sleeping for a second in all cases, but maybe someone with the > hardware could tell me if perhaps the paramter *should* matter. > Also remove a random "^L" character. use ssleep() here too From jgarzik@pobox.com Sun Oct 31 03:06:06 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 03:06:10 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VB65lV025645 for ; Sun, 31 Oct 2004 03:06:06 -0800 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CODWu-0005S5-SH; Sun, 31 Oct 2004 11:05:49 +0000 Message-ID: <4184C701.5030103@pobox.com> Date: Sun, 31 Oct 2004 06:05:37 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: janitor@sternwelten.at CC: netdev@oss.sgi.com, nacc@us.ibm.com Subject: Re: [patch 11/18] net/pcnet32: replace schedule_timeout() with msleep_interruptible() References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11244 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 janitor@sternwelten.at wrote: > diff -puN drivers/net/pcnet32.c~msleep_interruptible-drivers_net_pcnet32 drivers/net/pcnet32.c > --- linux-2.6.10-rc1/drivers/net/pcnet32.c~msleep_interruptible-drivers_net_pcnet32 2004-10-24 17:05:14.000000000 +0200 > +++ linux-2.6.10-rc1-max/drivers/net/pcnet32.c 2004-10-24 17:05:14.000000000 +0200 > @@ -847,7 +847,7 @@ static int pcnet32_phys_id(struct net_de > if ((!data) || (data > (u32)(MAX_SCHEDULE_TIMEOUT / HZ))) > data = (u32)(MAX_SCHEDULE_TIMEOUT / HZ); > > - schedule_timeout(data * HZ); > + msleep_interruptible(data * 1000); clearly and obviously ssleep() From jgarzik@pobox.com Sun Oct 31 03:06:52 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 03:06:56 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VB6qPg026153 for ; Sun, 31 Oct 2004 03:06:52 -0800 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CODXf-0005Yb-Ff; Sun, 31 Oct 2004 11:06:35 +0000 Message-ID: <4184C72F.8000905@pobox.com> Date: Sun, 31 Oct 2004 06:06:23 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: janitor@sternwelten.at CC: netdev@oss.sgi.com, nacc@us.ibm.com Subject: Re: [patch 10/18] net/g96100eth: replace gt96100_delay() with msleep_interruptible() References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11245 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 janitor@sternwelten.at wrote: > @@ -528,7 +517,7 @@ abort(struct net_device *dev, u32 abort_ > // wait for abort to complete > while (GT96100ETH_READ(gp, GT96100_ETH_SDMA_COMM) & abort_bits) { > // snooze for 20 msec and check again > - gt96100_delay(1); > + msleep_interruptible(20); > > if (--timedout == 0) { don't change the behavior of the driver, even if it disagrees with the comment. From jgarzik@pobox.com Sun Oct 31 03:08:45 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 03:08:48 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VB8iA0026491 for ; Sun, 31 Oct 2004 03:08:44 -0800 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CODZT-0005hT-1J; Sun, 31 Oct 2004 11:08:27 +0000 Message-ID: <4184C79F.3090602@pobox.com> Date: Sun, 31 Oct 2004 06:08:15 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: janitor@sternwelten.at CC: netdev@oss.sgi.com, nacc@us.ibm.com, kas@fi.muni.cz Subject: Re: [patch 06/18] net/cosa: replace schedule_timeout() with msleep_interruptible() References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11246 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 janitor@sternwelten.at wrote: > Any comments would be appreciated. Two patches have been removed from my > set, so the total has been reduced to 38. > > Description: Use msleep_interruptible() instead of schedule_timeout() > to guarantee the task delays as expected. Also use set_current_state() > instaed of direct assignment of current->state. > > Signed-off-by: Nishanth Aravamudan > Acked-by: Jan Kasprzak > Signed-off-by: Maximilian Attems > > --- > > linux-2.6.10-rc1-max/drivers/net/wan/cosa.c | 9 ++++----- > 1 files changed, 4 insertions(+), 5 deletions(-) > > diff -puN drivers/net/wan/cosa.c~msleep-drivers_net_wan_cosa drivers/net/wan/cosa.c > --- linux-2.6.10-rc1/drivers/net/wan/cosa.c~msleep-drivers_net_wan_cosa 2004-10-24 17:05:02.000000000 +0200 > +++ linux-2.6.10-rc1-max/drivers/net/wan/cosa.c 2004-10-24 17:05:02.000000000 +0200 > @@ -543,7 +543,7 @@ static int cosa_probe(int base, int irq, > * FIXME: When this code is not used as module, we should > * probably call udelay() instead of the interruptible sleep. > */ > - current->state = TASK_INTERRUPTIBLE; > + set_current_state(TASK_INTERRUPTIBLE); > cosa_putstatus(cosa, SR_TX_INT_ENA); > schedule_timeout(30); > irq = probe_irq_off(irqs); > @@ -1564,8 +1564,7 @@ static int cosa_reset_and_read_id(struct > cosa_getdata8(cosa); > cosa_putstatus(cosa, SR_RST); > #ifdef MODULE > - current->state = TASK_INTERRUPTIBLE; > - schedule_timeout(HZ/2); > + msleep_interruptible(500); > #else > udelay(5*100000); > #endif > @@ -1618,7 +1617,7 @@ static int get_wait_data(struct cosa_dat > return r; > } > /* sleep if not ready to read */ > - current->state = TASK_INTERRUPTIBLE; > + set_current_state(TASK_INTERRUPTIBLE); > schedule_timeout(1); > } > printk(KERN_INFO "cosa: timeout in get_wait_data (status 0x%x)\n", > @@ -1645,7 +1644,7 @@ static int put_wait_data(struct cosa_dat > } > #if 0 > /* sleep if not ready to read */ > - current->state = TASK_INTERRUPTIBLE; > + set_current_state(TASK_INTERRUPTIBLE); > schedule_timeout(1); > #endif why add all the memory barriers and such associated with set_current_state() ? From jgarzik@pobox.com Sun Oct 31 03:10:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 03:10:07 -0800 (PST) Received: from www.linux.org.uk (IDENT:93@parcelfarce.linux.theplanet.co.uk [195.92.249.252]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VBA34r026833 for ; Sun, 31 Oct 2004 03:10:04 -0800 Received: from rdu74-155-169.nc.rr.com ([24.74.155.169] helo=[10.10.10.88]) by www.linux.org.uk with asmtp (TLSv1:AES256-SHA:256) (Exim 4.33) id 1CODal-0005kl-8b; Sun, 31 Oct 2004 11:09:47 +0000 Message-ID: <4184C7EE.5070107@pobox.com> Date: Sun, 31 Oct 2004 06:09:34 -0500 From: Jeff Garzik User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 X-Accept-Language: en-us, en MIME-Version: 1.0 To: janitor@sternwelten.at CC: netdev@oss.sgi.com, nacc@us.ibm.com Subject: Re: [patch 05/18] net/s2io: replace schedule_timeout() with msleep() References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 11247 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 janitor@sternwelten.at wrote: > @@ -2846,11 +2838,10 @@ static int s2io_ethtool_idnic(struct net > sp->id_timer.data = (unsigned long) sp; > } > mod_timer(&sp->id_timer, jiffies); > - set_current_state(TASK_INTERRUPTIBLE); > if (data) > - schedule_timeout(data * HZ); > + msleep_interruptible(data * 1000); clearly wants ssleep() here From penberg@cs.helsinki.fi Sun Oct 31 05:08:16 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 05:08:26 -0800 (PST) Received: from mail.cs.helsinki.fi (courier.cs.helsinki.fi [128.214.9.1]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VD8ERM006741 for ; Sun, 31 Oct 2004 05:08:16 -0800 Received: from cs181096176.pp.htv.fi (cs181096176.pp.htv.fi [82.181.96.176]) (AUTH: LOGIN penberg, SSL: TLSv1/SSLv3,128bits,RC4-MD5) by mail.cs.helsinki.fi with esmtp; Sun, 31 Oct 2004 15:07:57 +0200 id 00071011.4184E3AD.00001DFE Subject: [PATCH] 8139too: use iomap for pio/mmio From: Pekka Enberg To: jgarzik@pobox.com Cc: netdev@oss.sgi.com Date: Sun, 31 Oct 2004 15:07:55 +0200 Message-Id: <1099228076.9571.12.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Mailer: Evolution 2.0.2 X-archive-position: 11248 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: penberg@cs.helsinki.fi Precedence: bulk X-list: netdev Hi, This patch converts the 8139too driver to use the iomap infrastructure for PIO and MMIO instead of playing macro tricks. The patch also adds __iomem annotations for the driver. Compiles and passes sparse checks but not tested with actual hardware. Signed-off-by: Pekka Enberg --- 8139too.c | 124 ++++++++++++++++++++++++++------------------------------------ 1 files changed, 52 insertions(+), 72 deletions(-) Index: 2.6.10-rc1-mm1/drivers/net/8139too.c =================================================================== --- 2.6.10-rc1-mm1.orig/drivers/net/8139too.c 2004-10-30 13:29:58.000000000 +0300 +++ 2.6.10-rc1-mm1/drivers/net/8139too.c 2004-10-31 14:42:19.874089928 +0200 @@ -570,7 +570,7 @@ }; struct rtl8139_private { - void *mmio_addr; + void __iomem *mmio_addr; int drv_flags; struct pci_dev *pci_dev; u32 msg_enable; @@ -614,7 +614,7 @@ MODULE_PARM_DESC (media, "8139too: Bits 4+9: force full duplex, bit 5: 100Mbps"); MODULE_PARM_DESC (full_duplex, "8139too: Force full duplex for board(s) (1)"); -static int read_eeprom (void *ioaddr, int location, int addr_len); +static int read_eeprom (void __iomem *ioaddr, int location, int addr_len); static int rtl8139_open (struct net_device *dev); static int mdio_read (struct net_device *dev, int phy_id, int location); static void mdio_write (struct net_device *dev, int phy_id, int location, @@ -638,46 +638,20 @@ static void rtl8139_hw_start (struct net_device *dev); static struct ethtool_ops rtl8139_ethtool_ops; -#ifdef USE_IO_OPS - -#define RTL_R8(reg) inb (((unsigned long)ioaddr) + (reg)) -#define RTL_R16(reg) inw (((unsigned long)ioaddr) + (reg)) -#define RTL_R32(reg) ((unsigned long) inl (((unsigned long)ioaddr) + (reg))) -#define RTL_W8(reg, val8) outb ((val8), ((unsigned long)ioaddr) + (reg)) -#define RTL_W16(reg, val16) outw ((val16), ((unsigned long)ioaddr) + (reg)) -#define RTL_W32(reg, val32) outl ((val32), ((unsigned long)ioaddr) + (reg)) -#define RTL_W8_F RTL_W8 -#define RTL_W16_F RTL_W16 -#define RTL_W32_F RTL_W32 -#undef readb -#undef readw -#undef readl -#undef writeb -#undef writew -#undef writel -#define readb(addr) inb((unsigned long)(addr)) -#define readw(addr) inw((unsigned long)(addr)) -#define readl(addr) inl((unsigned long)(addr)) -#define writeb(val,addr) outb((val),(unsigned long)(addr)) -#define writew(val,addr) outw((val),(unsigned long)(addr)) -#define writel(val,addr) outl((val),(unsigned long)(addr)) - -#else - /* write MMIO register, with flush */ /* Flush avoids rtl8139 bug w/ posted MMIO writes */ -#define RTL_W8_F(reg, val8) do { writeb ((val8), ioaddr + (reg)); readb (ioaddr + (reg)); } while (0) -#define RTL_W16_F(reg, val16) do { writew ((val16), ioaddr + (reg)); readw (ioaddr + (reg)); } while (0) -#define RTL_W32_F(reg, val32) do { writel ((val32), ioaddr + (reg)); readl (ioaddr + (reg)); } while (0) +#define RTL_W8_F(reg, val8) do { iowrite8 ((val8), ioaddr + (reg)); ioread8 (ioaddr + (reg)); } while (0) +#define RTL_W16_F(reg, val16) do { iowrite16 ((val16), ioaddr + (reg)); ioread16 (ioaddr + (reg)); } while (0) +#define RTL_W32_F(reg, val32) do { iowrite32 ((val32), ioaddr + (reg)); ioread32 (ioaddr + (reg)); } while (0) #define MMIO_FLUSH_AUDIT_COMPLETE 1 #if MMIO_FLUSH_AUDIT_COMPLETE /* write MMIO register */ -#define RTL_W8(reg, val8) writeb ((val8), ioaddr + (reg)) -#define RTL_W16(reg, val16) writew ((val16), ioaddr + (reg)) -#define RTL_W32(reg, val32) writel ((val32), ioaddr + (reg)) +#define RTL_W8(reg, val8) iowrite8 ((val8), ioaddr + (reg)) +#define RTL_W16(reg, val16) iowrite16 ((val16), ioaddr + (reg)) +#define RTL_W32(reg, val32) iowrite32 ((val32), ioaddr + (reg)) #else @@ -689,11 +663,9 @@ #endif /* MMIO_FLUSH_AUDIT_COMPLETE */ /* read MMIO register */ -#define RTL_R8(reg) readb (ioaddr + (reg)) -#define RTL_R16(reg) readw (ioaddr + (reg)) -#define RTL_R32(reg) ((unsigned long) readl (ioaddr + (reg))) - -#endif /* USE_IO_OPS */ +#define RTL_R8(reg) ioread8 (ioaddr + (reg)) +#define RTL_R16(reg) ioread16 (ioaddr + (reg)) +#define RTL_R32(reg) ((unsigned long) ioread32 (ioaddr + (reg))) static const u16 rtl8139_intr_mask = @@ -740,10 +712,13 @@ assert (tp->pci_dev != NULL); pdev = tp->pci_dev; -#ifndef USE_IO_OPS +#ifdef USE_IO_OPS + if (tp->mmio_addr) + ioport_unmap (tp->mmio_addr); +#else if (tp->mmio_addr) - iounmap (tp->mmio_addr); -#endif /* !USE_IO_OPS */ + pci_iounmap (pdev, tp->mmio_addr); +#endif /* USE_IO_OPS */ /* it's ok to call this even if we have no regions to free */ pci_release_regions (pdev); @@ -754,7 +729,7 @@ } -static void rtl8139_chip_reset (void *ioaddr) +static void rtl8139_chip_reset (void __iomem *ioaddr) { int i; @@ -774,7 +749,7 @@ static int __devinit rtl8139_init_board (struct pci_dev *pdev, struct net_device **dev_out) { - void *ioaddr; + void __iomem *ioaddr; struct net_device *dev; struct rtl8139_private *tp; u8 tmp8; @@ -855,13 +830,18 @@ pci_set_master (pdev); #ifdef USE_IO_OPS - ioaddr = (void *) pio_start; + ioaddr = ioport_map(pio_start, pio_len); + if (!ioaddr) { + printk (KERN_ERR PFX "%s: cannot map PIO, aborting\n", pci_name(pdev)); + rc = -EIO; + goto err_out; + } dev->base_addr = pio_start; tp->mmio_addr = ioaddr; tp->regs_len = pio_len; #else /* ioremap MMIO region */ - ioaddr = ioremap (mmio_start, mmio_len); + ioaddr = pci_iomap(dev, mmio_start, mmio_len); if (ioaddr == NULL) { printk (KERN_ERR PFX "%s: cannot remap MMIO, aborting\n", pci_name(pdev)); rc = -EIO; @@ -945,7 +925,7 @@ struct net_device *dev = NULL; struct rtl8139_private *tp; int i, addr_len, option; - void *ioaddr; + void __iomem *ioaddr; static int board_idx = -1; u8 pci_rev; @@ -1150,11 +1130,11 @@ #define EE_READ_CMD (6) #define EE_ERASE_CMD (7) -static int __devinit read_eeprom (void *ioaddr, int location, int addr_len) +static int __devinit read_eeprom (void __iomem *ioaddr, int location, int addr_len) { int i; unsigned retval = 0; - void *ee_addr = ioaddr + Cfg9346; + void __iomem *ee_addr = ioaddr + Cfg9346; int read_cmd = location | (EE_READ_CMD << addr_len); writeb (EE_ENB & ~EE_CS, ee_addr); @@ -1219,7 +1199,7 @@ #ifdef CONFIG_8139TOO_8129 /* Syncronize the MII management interface by shifting 32 one bits out. */ -static void mdio_sync (void *mdio_addr) +static void mdio_sync (void __iomem *mdio_addr) { int i; @@ -1237,7 +1217,7 @@ struct rtl8139_private *tp = netdev_priv(dev); int retval = 0; #ifdef CONFIG_8139TOO_8129 - void *mdio_addr = tp->mmio_addr + Config4; + void __iomem *mdio_addr = tp->mmio_addr + Config4; int mii_cmd = (0xf6 << 10) | (phy_id << 5) | location; int i; #endif @@ -1278,13 +1258,13 @@ { struct rtl8139_private *tp = netdev_priv(dev); #ifdef CONFIG_8139TOO_8129 - void *mdio_addr = tp->mmio_addr + Config4; + void __iomem *mdio_addr = tp->mmio_addr + Config4; int mii_cmd = (0x5002 << 16) | (phy_id << 23) | (location << 18) | value; int i; #endif if (phy_id > 31) { /* Really a 8139. Use internal registers. */ - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = tp->mmio_addr; if (location == 0) { RTL_W8 (Cfg9346, Cfg9346_Unlock); RTL_W16 (BasicModeCtrl, value); @@ -1321,7 +1301,7 @@ { struct rtl8139_private *tp = netdev_priv(dev); int retval; - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = tp->mmio_addr; retval = request_irq (dev->irq, rtl8139_interrupt, SA_SHIRQ, dev->name, dev); if (retval) @@ -1378,7 +1358,7 @@ static void rtl8139_hw_start (struct net_device *dev) { struct rtl8139_private *tp = netdev_priv(dev); - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = tp->mmio_addr; u32 i; u8 tmp; @@ -1480,7 +1460,7 @@ struct rtl8139_private *tp) { int linkcase; - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = tp->mmio_addr; /* This is a complicated state machine to configure the "twister" for impedance/echos based on the cable length. @@ -1564,7 +1544,7 @@ static inline void rtl8139_thread_iter (struct net_device *dev, struct rtl8139_private *tp, - void *ioaddr) + void __iomem *ioaddr) { int mii_lpa; @@ -1672,7 +1652,7 @@ static void rtl8139_tx_timeout (struct net_device *dev) { struct rtl8139_private *tp = netdev_priv(dev); - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = tp->mmio_addr; int i; u8 tmp8; unsigned long flags; @@ -1717,7 +1697,7 @@ static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev) { struct rtl8139_private *tp = netdev_priv(dev); - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = tp->mmio_addr; unsigned int entry; unsigned int len = skb->len; @@ -1759,7 +1739,7 @@ static void rtl8139_tx_interrupt (struct net_device *dev, struct rtl8139_private *tp, - void *ioaddr) + void __iomem *ioaddr) { unsigned long dirty_tx, tx_left; @@ -1829,7 +1809,7 @@ /* TODO: clean this up! Rx reset need not be this intensive */ static void rtl8139_rx_err (u32 rx_status, struct net_device *dev, - struct rtl8139_private *tp, void *ioaddr) + struct rtl8139_private *tp, void __iomem *ioaddr) { u8 tmp8; #ifdef CONFIG_8139_OLD_RX_RESET @@ -1926,7 +1906,7 @@ static void rtl8139_isr_ack(struct rtl8139_private *tp) { - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = tp->mmio_addr; u16 status; status = RTL_R16 (IntrStatus) & RxAckBits; @@ -1945,7 +1925,7 @@ static int rtl8139_rx(struct net_device *dev, struct rtl8139_private *tp, int budget) { - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = tp->mmio_addr; int received = 0; unsigned char *rx_ring = tp->rx_ring; unsigned int cur_rx = tp->cur_rx; @@ -2083,7 +2063,7 @@ static void rtl8139_weird_interrupt (struct net_device *dev, struct rtl8139_private *tp, - void *ioaddr, + void __iomem *ioaddr, int status, int link_changed) { DPRINTK ("%s: Abnormal interrupt, status %8.8x.\n", @@ -2123,7 +2103,7 @@ static int rtl8139_poll(struct net_device *dev, int *budget) { struct rtl8139_private *tp = netdev_priv(dev); - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = tp->mmio_addr; int orig_budget = min(*budget, dev->quota); int done = 1; @@ -2161,7 +2141,7 @@ { struct net_device *dev = (struct net_device *) dev_instance; struct rtl8139_private *tp = netdev_priv(dev); - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = tp->mmio_addr; u16 status, ackstat; int link_changed = 0; /* avoid bogus "uninit" warning */ int handled = 0; @@ -2237,7 +2217,7 @@ static int rtl8139_close (struct net_device *dev) { struct rtl8139_private *tp = netdev_priv(dev); - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = tp->mmio_addr; int ret = 0; unsigned long flags; @@ -2300,7 +2280,7 @@ static void rtl8139_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) { struct rtl8139_private *np = netdev_priv(dev); - void *ioaddr = np->mmio_addr; + void __iomem *ioaddr = np->mmio_addr; spin_lock_irq(&np->lock); if (rtl_chip_info[np->chipset].flags & HasLWake) { @@ -2334,7 +2314,7 @@ static int rtl8139_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) { struct rtl8139_private *np = netdev_priv(dev); - void *ioaddr = np->mmio_addr; + void __iomem *ioaddr = np->mmio_addr; u32 support; u8 cfg3, cfg5; @@ -2502,7 +2482,7 @@ static struct net_device_stats *rtl8139_get_stats (struct net_device *dev) { struct rtl8139_private *tp = netdev_priv(dev); - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = tp->mmio_addr; unsigned long flags; if (netif_running(dev)) { @@ -2521,7 +2501,7 @@ static void __set_rx_mode (struct net_device *dev) { struct rtl8139_private *tp = netdev_priv(dev); - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = tp->mmio_addr; u32 mc_filter[2]; /* Multicast hash filter */ int i, rx_mode; u32 tmp; @@ -2582,7 +2562,7 @@ { struct net_device *dev = pci_get_drvdata (pdev); struct rtl8139_private *tp = netdev_priv(dev); - void *ioaddr = tp->mmio_addr; + void __iomem *ioaddr = tp->mmio_addr; unsigned long flags; pci_save_state (pdev); From MalteSch@gmx.de Sun Oct 31 05:08:38 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 05:08:44 -0800 (PST) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i9VD8bg9006761 for ; Sun, 31 Oct 2004 05:08:38 -0800 Received: (qmail 27641 invoked by uid 65534); 31 Oct 2004 13:08:13 -0000 Received: from d010115.adsl.hansenet.de (EHLO [192.168.1.2]) (80.171.10.115) by mail.gmx.net (mp004) with SMTP; 31 Oct 2004 14:08:13 +0100 X-Authenticated: #815327 Message-ID: <4184E3B8.2030400@gmx.de> Date: Sun, 31 Oct 2004 14:08:08 +0100 From: =?ISO-8859-1?Q?Malte_Schr=F6der?= User-Agent: Mozilla Thunderbird 0.8 (X11/20040926) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniele Venzano CC: NetDev , Jeff Garzik Subject: Re: [PATCH] WOL for sis900 References: <4183B6B0.7010906@gmx.de> <4183BDB3.8000302@pobox.com> <20041030185959.GA7088@renditai.milesteg.arr> In-Reply-To: <20041030185959.GA7088@renditai.milesteg.arr> X-Enigmail-Version: 0.86.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigCF698CBEB1F5492250D043A6" Content-Transfer-Encoding: 8bit X-archive-position: 11249 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: MalteSch@gmx.de Precedence: bulk X-list: netdev This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigCF698CBEB1F5492250D043A6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Daniele Venzano wrote: > On Sat, Oct 30, 2004 at 12:13:39PM -0400, Jeff Garzik wrote: > >>Malte Schröder wrote: >> >>>Hello, >>>I have applied the patch from http://lkml.org/lkml/2003/7/16/88 manually >>>to 2.6.7 (also works on 2.6.{8,9}) and have been using it since then. >>>Attached is a diff against 2.6.9. >> >>2) Please use ethtool to enable/disable WOL. No need for a module option. > > > Attached is a first try at this wol via ethtool thing. I don't think to > have got it right, but here it is. > > I tried to test WoL on my laptop, obvioulsy it didn't work, but I don't > even know if I have the hardware support for it. > On this page: > http://www.sis.com/products/connectivity/900.htm > it says that the magic packet feature is optional. > > I would really like to have some way to check if WoL is supported by the > hardware before thinking to include this. I didn't find any > documentation of some use for this. > > Finally, I have never realized the sorry state of sis900 wrt ethtool, > I'll try to get some more support... > > The attached patch is against clean 2.6.9 and is NOT for inclusion. I just tried your patch and it works for me :) My sis900 is on-board component of the sis746 chipset. -- --------------------------------------- Malte Schröder MalteSch@gmx.de ICQ# 68121508 --------------------------------------- --------------enigCF698CBEB1F5492250D043A6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFBhOO74q3E2oMjYtURAsPUAKCSgD/OGm+q3dl9W0lmcnWdj04JoACfcED8 V3eSoQgUIveqDwHwjtGfLlE= =O+a2 -----END PGP SIGNATURE----- --------------enigCF698CBEB1F5492250D043A6-- From max@stro.at Sun Oct 31 06:45:01 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 06:45:05 -0800 (PST) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VEj0nL009574 for ; Sun, 31 Oct 2004 06:45:01 -0800 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id BB6AF5C019; Sun, 31 Oct 2004 15:44:41 +0100 (CET) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 02423-05; Sun, 31 Oct 2004 15:44:40 +0100 (CET) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id 288E55C00A; Sun, 31 Oct 2004 15:44:40 +0100 (CET) Received: from max by sputnik with local (Exim 4.34) id 1COGwS-00081w-Tz; Sun, 31 Oct 2004 15:44:24 +0100 Date: Sun, 31 Oct 2004 15:44:24 +0100 From: maximilian attems To: Jeff Garzik Cc: Margit Schubert-While , Nishanth Aravamudan , hvr@gnu.org, mcgrof@studorgs.rutgers.edu, kernel-janitors@lists.osdl.org, netdev@oss.sgi.com, Domen Puncer , linux-kernel@vger.kernel.org Subject: [patch 1/6] back port msleep(), msleep_interruptible() Message-ID: <20041031144424.GB28667@stro.at> Mail-Followup-To: Jeff Garzik , Margit Schubert-While , Nishanth Aravamudan , hvr@gnu.org, mcgrof@studorgs.rutgers.edu, kernel-janitors@lists.osdl.org, netdev@oss.sgi.com, Domen Puncer , linux-kernel@vger.kernel.org References: <20040923221303.GB13244@us.ibm.com> <20040923221303.GB13244@us.ibm.com> <5.1.0.14.2.20040924074745.00b1cd40@pop.t-online.de> <415CD9D9.2000607@pobox.com> <20041030222228.GB1456@stro.at> <41841886.2080609@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41841886.2080609@pobox.com> User-Agent: Mutt/1.5.6+20040722i X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11251 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev Backport suggested by prism54 folks. idea acked by Jeff. thanks for Domen Puncer at helping out. Belows patch adds msleep() and msleep_interruptible() as found in current 2.6 to 2.4. therefor adds the helper functions ssleep(), jiffies_to_msecs(), jiffies_to_usecs(), msecs_to_jiffies(). The namespace clashes for msleep() and msecs_to_jiffies() are cleanup by the next 5 patches. Signed-off-by: Maximilian Attems --- linux-2.4.28-rc1-max/include/linux/delay.h | 8 +++++ linux-2.4.28-rc1-max/include/linux/time.h | 41 +++++++++++++++++++++++++++++ linux-2.4.28-rc1-max/kernel/Makefile | 3 +- linux-2.4.28-rc1-max/kernel/timer.c | 33 +++++++++++++++++++++++ 4 files changed, 84 insertions(+), 1 deletion(-) diff -puN kernel/Makefile~add-msleep-2.4 kernel/Makefile --- linux-2.4.28-rc1/kernel/Makefile~add-msleep-2.4 2004-10-30 22:48:46.000000000 +0200 +++ linux-2.4.28-rc1-max/kernel/Makefile 2004-10-30 22:50:45.000000000 +0200 @@ -9,7 +9,8 @@ O_TARGET := kernel.o -export-objs = signal.o sys.o kmod.o context.o ksyms.o pm.o exec_domain.o printk.o +export-objs = signal.o sys.o kmod.o context.o ksyms.o pm.o exec_domain.o \ + printk.o timer.o obj-y = sched.o dma.o fork.o exec_domain.o panic.o printk.o \ module.o exit.o itimer.o info.o time.o softirq.o resource.o \ diff -puN kernel/timer.c~add-msleep-2.4 kernel/timer.c --- linux-2.4.28-rc1/kernel/timer.c~add-msleep-2.4 2004-10-30 22:48:46.000000000 +0200 +++ linux-2.4.28-rc1-max/kernel/timer.c 2004-10-30 22:50:09.000000000 +0200 @@ -22,6 +22,7 @@ #include #include #include +#include #include @@ -874,3 +875,35 @@ asmlinkage long sys_nanosleep(struct tim return 0; } +/** + * msleep - sleep safely even with waitqueue interruptions + * @msecs: Time in milliseconds to sleep for + */ +void msleep(unsigned int msecs) +{ + unsigned long timeout = msecs_to_jiffies(msecs) + 1; + + while (timeout) { + set_current_state(TASK_UNINTERRUPTIBLE); + timeout = schedule_timeout(timeout); + } +} + +EXPORT_SYMBOL(msleep); + +/** + * msleep_interruptible - sleep waiting for waitqueue interruptions + * @msecs: Time in milliseconds to sleep for + */ +unsigned long msleep_interruptible(unsigned int msecs) +{ + unsigned long timeout = msecs_to_jiffies(msecs) + 1; + + while (timeout && !signal_pending(current)) { + set_current_state(TASK_INTERRUPTIBLE); + timeout = schedule_timeout(timeout); + } + return jiffies_to_msecs(timeout); +} + +EXPORT_SYMBOL(msleep_interruptible); diff -puN include/linux/delay.h~add-msleep-2.4 include/linux/delay.h --- linux-2.4.28-rc1/include/linux/delay.h~add-msleep-2.4 2004-10-30 22:48:46.000000000 +0200 +++ linux-2.4.28-rc1-max/include/linux/delay.h 2004-10-30 22:48:46.000000000 +0200 @@ -34,4 +34,12 @@ extern unsigned long loops_per_jiffy; ({unsigned long msec=(n); while (msec--) udelay(1000);})) #endif +void msleep(unsigned int msecs); +unsigned long msleep_interruptible(unsigned int msecs); + +static inline void ssleep(unsigned int seconds) +{ + msleep(seconds * 1000); +} + #endif /* defined(_LINUX_DELAY_H) */ diff -puN include/linux/time.h~add-msleep-2.4 include/linux/time.h --- linux-2.4.28-rc1/include/linux/time.h~add-msleep-2.4 2004-10-30 22:48:46.000000000 +0200 +++ linux-2.4.28-rc1-max/include/linux/time.h 2004-10-30 22:57:44.000000000 +0200 @@ -126,4 +126,45 @@ struct itimerval { struct timeval it_value; /* current value */ }; +/* + * Convert jiffies to milliseconds and back. + * + * Avoid unnecessary multiplications/divisions in the + * two most common HZ cases: + */ +static inline unsigned int jiffies_to_msecs(const unsigned long j) +{ +#if HZ <= 1000 && !(1000 % HZ) + return (1000 / HZ) * j; +#elif HZ > 1000 && !(HZ % 1000) + return (j + (HZ / 1000) - 1)/(HZ / 1000); +#else + return (j * 1000) / HZ; +#endif +} + +static inline unsigned int jiffies_to_usecs(const unsigned long j) +{ +#if HZ <= 1000 && !(1000 % HZ) + return (1000000 / HZ) * j; +#elif HZ > 1000 && !(HZ % 1000) + return (j*1000 + (HZ - 1000))/(HZ / 1000); +#else + return (j * 1000000) / HZ; +#endif +} + +static inline unsigned long msecs_to_jiffies(const unsigned int m) +{ + if (m > jiffies_to_msecs(MAX_JIFFY_OFFSET)) + return MAX_JIFFY_OFFSET; +#if HZ <= 1000 && !(1000 % HZ) + return (m + (1000 / HZ) - 1) / (1000 / HZ); +#elif HZ > 1000 && !(HZ % 1000) + return m * (HZ / 1000); +#else + return (m * HZ + 999) / 1000; +#endif +} + #endif _ From max@stro.at Sun Oct 31 06:45:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 06:45:56 -0800 (PST) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VEjmj0009974 for ; Sun, 31 Oct 2004 06:45:48 -0800 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id 2697A5C01B; Sun, 31 Oct 2004 15:45:29 +0100 (CET) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 02423-07; Sun, 31 Oct 2004 15:45:28 +0100 (CET) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id 1FE0D5C00A; Sun, 31 Oct 2004 15:45:28 +0100 (CET) Received: from max by sputnik with local (Exim 4.34) id 1COGww-00082A-PN; Sun, 31 Oct 2004 15:44:54 +0100 Date: Sun, 31 Oct 2004 15:44:54 +0100 From: maximilian attems To: Jeff Garzik Cc: Margit Schubert-While , Nishanth Aravamudan , hvr@gnu.org, mcgrof@studorgs.rutgers.edu, kernel-janitors@lists.osdl.org, netdev@oss.sgi.com, Domen Puncer , linux-kernel@vger.kernel.org Subject: [patch 3/6] sx8 remove duplicate definition msleep(), msecs_to_jiffies() Message-ID: <20041031144454.GD28667@stro.at> Mail-Followup-To: Jeff Garzik , Margit Schubert-While , Nishanth Aravamudan , hvr@gnu.org, mcgrof@studorgs.rutgers.edu, kernel-janitors@lists.osdl.org, netdev@oss.sgi.com, Domen Puncer , linux-kernel@vger.kernel.org References: <20040923221303.GB13244@us.ibm.com> <20040923221303.GB13244@us.ibm.com> <5.1.0.14.2.20040924074745.00b1cd40@pop.t-online.de> <415CD9D9.2000607@pobox.com> <20041030222228.GB1456@stro.at> <41841886.2080609@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41841886.2080609@pobox.com> User-Agent: Mutt/1.5.6+20040722i X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11254 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev remove duplicate definition msleep(), msecs_to_jiffies(). delay.h already included. Signed-off-by: Maximilian Attems --- linux-2.4.28-rc1-max/drivers/block/sx8.c | 11 ----------- 1 files changed, 11 deletions(-) diff -puN drivers/block/sx8.c~remove-msleep+msecs_to_jiffies-drivers_block_sx8 drivers/block/sx8.c --- linux-2.4.28-rc1/drivers/block/sx8.c~remove-msleep+msecs_to_jiffies-drivers_block_sx8 2004-10-31 13:37:56.000000000 +0100 +++ linux-2.4.28-rc1-max/drivers/block/sx8.c 2004-10-31 13:38:56.000000000 +0100 @@ -548,17 +548,6 @@ static int carm_bdev_ioctl(struct inode return -EOPNOTSUPP; } -static inline unsigned long msecs_to_jiffies(unsigned long msecs) -{ - return ((HZ * msecs + 999) / 1000); -} - -static void msleep(unsigned long msecs) -{ - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(msecs_to_jiffies(msecs) + 1); -} - static const u32 msg_sizes[] = { 32, 64, 128, CARM_MSG_SIZE }; static inline int carm_lookup_bucket(u32 msg_size) _ From max@stro.at Sun Oct 31 06:44:21 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 06:44:33 -0800 (PST) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VEiK4x009539 for ; Sun, 31 Oct 2004 06:44:20 -0800 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id B974F5C019; Sun, 31 Oct 2004 15:44:00 +0100 (CET) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 15681-04; Sun, 31 Oct 2004 15:43:59 +0100 (CET) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id 768075C00A; Sun, 31 Oct 2004 15:43:59 +0100 (CET) Received: from max by sputnik with local (Exim 4.34) id 1COGvy-00081n-73; Sun, 31 Oct 2004 15:43:54 +0100 Date: Sun, 31 Oct 2004 15:43:53 +0100 From: maximilian attems To: Jeff Garzik Cc: Margit Schubert-While , Nishanth Aravamudan , hvr@gnu.org, mcgrof@studorgs.rutgers.edu, kernel-janitors@lists.osdl.org, netdev@oss.sgi.com, Domen Puncer , linux-kernel@vger.kernel.org Subject: Re: [patch 2.4] back port msleep(), msleep_interruptible() Message-ID: <20041031144353.GA28667@stro.at> Mail-Followup-To: Jeff Garzik , Margit Schubert-While , Nishanth Aravamudan , hvr@gnu.org, mcgrof@studorgs.rutgers.edu, kernel-janitors@lists.osdl.org, netdev@oss.sgi.com, Domen Puncer , linux-kernel@vger.kernel.org References: <20040923221303.GB13244@us.ibm.com> <20040923221303.GB13244@us.ibm.com> <5.1.0.14.2.20040924074745.00b1cd40@pop.t-online.de> <415CD9D9.2000607@pobox.com> <20041030222228.GB1456@stro.at> <41841886.2080609@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41841886.2080609@pobox.com> User-Agent: Mutt/1.5.6+20040722i X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11250 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev On Sat, 30 Oct 2004, Jeff Garzik wrote: > I'm pretty sure more than one of these symbols clashes with a symbol > defined locally in a driver. I like the patch but we can't apply it > until the impact on existing code is evaluated. > > Jeff current 2.4 has no ssleep() nor jiffies_to_usecs() nor jiffies_to_msecs() users. so no namespace conflicts on them. i found a strange unsupported "msleep" syscall in ./arch/parisc/hpux/sys_hpux.c left this one appart, i resend the msleep patch + 5 cleanup patches. they remove duplicate msleep() or msecs_to_jiffies() definitions. they are all compile tested, but the one touching drivers/char/shwdt.c please show me if i forgot something. -- maks kernel janitor http://janitor.kernelnewbies.org/ ps dropped prism54-devel@prism54.org from cc as this ml rejects my mails. From max@stro.at Sun Oct 31 06:45:46 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 06:45:51 -0800 (PST) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VEjj9E009938 for ; Sun, 31 Oct 2004 06:45:45 -0800 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id 709CB5C019; Sun, 31 Oct 2004 15:45:26 +0100 (CET) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 15681-06; Sun, 31 Oct 2004 15:45:25 +0100 (CET) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id 8E4BE5C00A; Sun, 31 Oct 2004 15:45:25 +0100 (CET) Received: from max by sputnik with local (Exim 4.34) id 1COGxC-00082M-EI; Sun, 31 Oct 2004 15:45:10 +0100 Date: Sun, 31 Oct 2004 15:45:10 +0100 From: maximilian attems To: Jeff Garzik Cc: Margit Schubert-While , Nishanth Aravamudan , hvr@gnu.org, mcgrof@studorgs.rutgers.edu, kernel-janitors@lists.osdl.org, netdev@oss.sgi.com, Domen Puncer , linux-kernel@vger.kernel.org Subject: [patch 5/6] sata_promise remove duplicate msleep() definition Message-ID: <20041031144510.GF28667@stro.at> Mail-Followup-To: Jeff Garzik , Margit Schubert-While , Nishanth Aravamudan , hvr@gnu.org, mcgrof@studorgs.rutgers.edu, kernel-janitors@lists.osdl.org, netdev@oss.sgi.com, Domen Puncer , linux-kernel@vger.kernel.org References: <20040923221303.GB13244@us.ibm.com> <20040923221303.GB13244@us.ibm.com> <5.1.0.14.2.20040924074745.00b1cd40@pop.t-online.de> <415CD9D9.2000607@pobox.com> <20041030222228.GB1456@stro.at> <41841886.2080609@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41841886.2080609@pobox.com> User-Agent: Mutt/1.5.6+20040722i X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11253 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev remove now duplicate define. driver already includes delay. Signed-off-by: Maximilian Attems --- linux-2.4.28-rc1-max/drivers/scsi/sata_promise.c | 2 -- 1 files changed, 2 deletions(-) diff -puN drivers/scsi/sata_promise.c~remove-msleep-drivers_scsi_sata_promise drivers/scsi/sata_promise.c --- linux-2.4.28-rc1/drivers/scsi/sata_promise.c~remove-msleep-drivers_scsi_sata_promise 2004-10-31 13:59:39.000000000 +0100 +++ linux-2.4.28-rc1-max/drivers/scsi/sata_promise.c 2004-10-31 14:00:12.000000000 +0100 @@ -42,8 +42,6 @@ #define DRV_NAME "sata_promise" #define DRV_VERSION "1.00" -#define msleep libata_msleep /* 2.4-specific */ - enum { PDC_PKT_SUBMIT = 0x40, /* Command packet pointer addr */ PDC_INT_SEQMASK = 0x40, /* Mask of asserted SEQ INTs */ _ From max@stro.at Sun Oct 31 06:45:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 06:45:23 -0800 (PST) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VEjH8b009610 for ; Sun, 31 Oct 2004 06:45:18 -0800 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id 01A1C5C01A; Sun, 31 Oct 2004 15:44:58 +0100 (CET) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 15681-05; Sun, 31 Oct 2004 15:44:58 +0100 (CET) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id 089F45C00A; Sun, 31 Oct 2004 15:44:58 +0100 (CET) Received: from max by sputnik with local (Exim 4.34) id 1COGwk-000823-EK; Sun, 31 Oct 2004 15:44:42 +0100 Date: Sun, 31 Oct 2004 15:44:42 +0100 From: maximilian attems To: Jeff Garzik Cc: Margit Schubert-While , Nishanth Aravamudan , hvr@gnu.org, mcgrof@studorgs.rutgers.edu, kernel-janitors@lists.osdl.org, netdev@oss.sgi.com, Domen Puncer , linux-kernel@vger.kernel.org Subject: [patch 2/6] libata remove duplicate definition msecs_to_jiffies() Message-ID: <20041031144442.GC28667@stro.at> Mail-Followup-To: Jeff Garzik , Margit Schubert-While , Nishanth Aravamudan , hvr@gnu.org, mcgrof@studorgs.rutgers.edu, kernel-janitors@lists.osdl.org, netdev@oss.sgi.com, Domen Puncer , linux-kernel@vger.kernel.org References: <20040923221303.GB13244@us.ibm.com> <20040923221303.GB13244@us.ibm.com> <5.1.0.14.2.20040924074745.00b1cd40@pop.t-online.de> <415CD9D9.2000607@pobox.com> <20041030222228.GB1456@stro.at> <41841886.2080609@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41841886.2080609@pobox.com> User-Agent: Mutt/1.5.6+20040722i X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11252 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev remove duplicate definition of msecs_to_jiffies(). already includes delay.h Signed-off-by: Maximilian Attems --- linux-2.4.28-rc1-max/include/linux/libata.h | 5 ----- 1 files changed, 5 deletions(-) diff -puN include/linux/libata.h~remove-msecs_to_jiffies-libata.h include/linux/libata.h --- linux-2.4.28-rc1/include/linux/libata.h~remove-msecs_to_jiffies-libata.h 2004-10-31 13:33:52.000000000 +0100 +++ linux-2.4.28-rc1-max/include/linux/libata.h 2004-10-31 13:36:16.000000000 +0100 @@ -419,11 +419,6 @@ extern int ata_std_bios_param(Disk * dis extern void libata_msleep(unsigned long msecs); -static inline unsigned long msecs_to_jiffies(unsigned long msecs) -{ - return ((HZ * msecs + 999) / 1000); -} - static inline unsigned int ata_tag_valid(unsigned int tag) { return (tag < ATA_MAX_QUEUE) ? 1 : 0; _ From max@stro.at Sun Oct 31 06:45:49 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 06:45:57 -0800 (PST) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VEjmm1009975 for ; Sun, 31 Oct 2004 06:45:49 -0800 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id B9A415C00A; Sun, 31 Oct 2004 15:45:29 +0100 (CET) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 15681-07; Sun, 31 Oct 2004 15:45:29 +0100 (CET) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id 9CEE95C01A; Sun, 31 Oct 2004 15:45:28 +0100 (CET) Received: from max by sputnik with local (Exim 4.34) id 1COGx5-00082G-SM; Sun, 31 Oct 2004 15:45:03 +0100 Date: Sun, 31 Oct 2004 15:45:03 +0100 From: maximilian attems To: Jeff Garzik Cc: Margit Schubert-While , Nishanth Aravamudan , hvr@gnu.org, mcgrof@studorgs.rutgers.edu, kernel-janitors@lists.osdl.org, netdev@oss.sgi.com, Domen Puncer , linux-kernel@vger.kernel.org Subject: [patch 4/6] char/shwdt remove duplicate msecs_to_jiffies() Message-ID: <20041031144503.GE28667@stro.at> Mail-Followup-To: Jeff Garzik , Margit Schubert-While , Nishanth Aravamudan , hvr@gnu.org, mcgrof@studorgs.rutgers.edu, kernel-janitors@lists.osdl.org, netdev@oss.sgi.com, Domen Puncer , linux-kernel@vger.kernel.org References: <20040923221303.GB13244@us.ibm.com> <20040923221303.GB13244@us.ibm.com> <5.1.0.14.2.20040924074745.00b1cd40@pop.t-online.de> <415CD9D9.2000607@pobox.com> <20041030222228.GB1456@stro.at> <41841886.2080609@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41841886.2080609@pobox.com> User-Agent: Mutt/1.5.6+20040722i X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11255 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev remove duplicate msecs_to_jiffies() definition. add include . Signed-off-by: Maximilian Attems --- linux-2.4.28-rc1-max/drivers/char/shwdt.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/char/shwdt.c~remove-msecs_to_jiffies-drivers_char_shwdt drivers/char/shwdt.c --- linux-2.4.28-rc1/drivers/char/shwdt.c~remove-msecs_to_jiffies-drivers_char_shwdt 2004-10-31 13:40:49.000000000 +0100 +++ linux-2.4.28-rc1-max/drivers/char/shwdt.c 2004-10-31 13:42:05.000000000 +0100 @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -113,7 +114,6 @@ */ static int clock_division_ratio = WTCSR_CKS_4096; -#define msecs_to_jiffies(msecs) (jiffies + (HZ * msecs + 9999) / 10000) #define next_ping_period(cks) msecs_to_jiffies(cks - 4) static unsigned long shwdt_is_open; _ From max@stro.at Sun Oct 31 06:46:10 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 06:46:17 -0800 (PST) Received: from baikonur.stro.at (baikonur.stro.at [213.239.196.228]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VEk9ll010374 for ; Sun, 31 Oct 2004 06:46:09 -0800 Received: from localhost (localhost [127.0.0.1]) by baikonur.stro.at (Postfix) with ESMTP id 76A8E5C019; Sun, 31 Oct 2004 15:45:50 +0100 (CET) Received: from baikonur.stro.at ([127.0.0.1]) by localhost (baikonur [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 02423-08; Sun, 31 Oct 2004 15:45:49 +0100 (CET) Received: from sputnik (stallburg.stro.at [128.131.216.190]) by baikonur.stro.at (Postfix) with ESMTP id 5888B5C00A; Sun, 31 Oct 2004 15:45:49 +0100 (CET) Received: from max by sputnik with local (Exim 4.34) id 1COGxQ-00082T-H9; Sun, 31 Oct 2004 15:45:24 +0100 Date: Sun, 31 Oct 2004 15:45:24 +0100 From: maximilian attems To: Jeff Garzik Cc: Margit Schubert-While , Nishanth Aravamudan , hvr@gnu.org, mcgrof@studorgs.rutgers.edu, kernel-janitors@lists.osdl.org, netdev@oss.sgi.com, Domen Puncer , linux-kernel@vger.kernel.org Subject: [patch 6/6] libata remove msleep_libata() Message-ID: <20041031144524.GG28667@stro.at> Mail-Followup-To: Jeff Garzik , Margit Schubert-While , Nishanth Aravamudan , hvr@gnu.org, mcgrof@studorgs.rutgers.edu, kernel-janitors@lists.osdl.org, netdev@oss.sgi.com, Domen Puncer , linux-kernel@vger.kernel.org References: <20040923221303.GB13244@us.ibm.com> <20040923221303.GB13244@us.ibm.com> <5.1.0.14.2.20040924074745.00b1cd40@pop.t-online.de> <415CD9D9.2000607@pobox.com> <20041030222228.GB1456@stro.at> <41841886.2080609@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41841886.2080609@pobox.com> User-Agent: Mutt/1.5.6+20040722i X-Virus-Scanned: by Amavis (ClamAV) at stro.at X-archive-position: 11256 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: janitor@sternwelten.at Precedence: bulk X-list: netdev remove msleep_libata(), now that msleep() is backported. also remove duplicate msleep() definition. delay.h is already included. Signed-off-by: Maximilian Attems --- linux-2.4.28-rc1-max/drivers/scsi/libata-core.c | 23 ----------------------- linux-2.4.28-rc1-max/include/linux/libata.h | 1 - 2 files changed, 24 deletions(-) diff -puN drivers/scsi/libata-core.c~remove-libata_msleep drivers/scsi/libata-core.c --- linux-2.4.28-rc1/drivers/scsi/libata-core.c~remove-libata_msleep 2004-10-31 14:06:49.000000000 +0100 +++ linux-2.4.28-rc1-max/drivers/scsi/libata-core.c 2004-10-31 14:08:41.000000000 +0100 @@ -67,28 +67,6 @@ MODULE_DESCRIPTION("Library module for A MODULE_LICENSE("GPL"); /** - * msleep - sleep for a number of milliseconds - * @msecs: number of milliseconds to sleep - * - * Issues schedule_timeout call for the specified number - * of milliseconds. - * - * LOCKING: - * None. - */ - -static void msleep(unsigned long msecs) -{ - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(msecs_to_jiffies(msecs) + 1); -} - -void libata_msleep(unsigned long msecs) -{ - msleep(msecs); -} - -/** * ata_tf_load - send taskfile registers to host controller * @ap: Port to which output is sent * @tf: ATA taskfile register set @@ -3697,7 +3675,6 @@ EXPORT_SYMBOL_GPL(ata_scsi_queuecmd); EXPORT_SYMBOL_GPL(ata_scsi_error); EXPORT_SYMBOL_GPL(ata_scsi_detect); EXPORT_SYMBOL_GPL(ata_add_to_probe_list); -EXPORT_SYMBOL_GPL(libata_msleep); EXPORT_SYMBOL_GPL(ata_scsi_release); EXPORT_SYMBOL_GPL(ata_host_intr); EXPORT_SYMBOL_GPL(ata_dev_classify); diff -puN include/linux/libata.h~remove-libata_msleep include/linux/libata.h --- linux-2.4.28-rc1/include/linux/libata.h~remove-libata_msleep 2004-10-31 14:06:49.000000000 +0100 +++ linux-2.4.28-rc1-max/include/linux/libata.h 2004-10-31 14:09:08.000000000 +0100 @@ -416,7 +416,6 @@ extern void ata_qc_complete(struct ata_q extern void ata_eng_timeout(struct ata_port *ap); extern void ata_add_to_probe_list (struct ata_probe_ent *probe_ent); extern int ata_std_bios_param(Disk * disk, kdev_t dev, int *ip); -extern void libata_msleep(unsigned long msecs); static inline unsigned int ata_tag_valid(unsigned int tag) _ From hadi@cyberus.ca Sun Oct 31 06:56:24 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 06:56:31 -0800 (PST) Received: from mx03.cybersurf.com (mx03.cybersurf.com [209.197.145.106]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VEuNG8012215 for ; Sun, 31 Oct 2004 06:56:24 -0800 Received: from mail.cyberus.ca ([209.197.145.21]) by mx03.cybersurf.com with esmtp (Exim 4.30) id 1COH7l-0003Zp-N8 for netdev@oss.sgi.com; Sun, 31 Oct 2004 09:56:05 -0500 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1COH7i-0005mt-Ph; Sun, 31 Oct 2004 09:56:03 -0500 Subject: Re: Asynchronous crypto layer. From: jamal Reply-To: hadi@cyberus.ca To: johnpol@2ka.mipt.ru Cc: Eugene Surovegin , netdev@oss.sgi.com, cryptoapi@lists.logix.cz In-Reply-To: <20041031121308.648e98f9@zanzibar.2ka.mipt.ru> References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> <20041030203550.GB6256@gate.ebshome.net> <20041031010415.4c798a04@zanzibar.2ka.mipt.ru> <20041030205630.GD6256@gate.ebshome.net> <20041031012423.74b98698@zanzibar.2ka.mipt.ru> <1099179687.1041.117.camel@jzny.localdomain> <20041031121308.648e98f9@zanzibar.2ka.mipt.ru> Content-Type: text/plain Organization: jamalopolous Message-Id: <1099234559.1040.183.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 31 Oct 2004 09:56:00 -0500 Content-Transfer-Encoding: 7bit X-archive-position: 11257 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev On Sun, 2004-10-31 at 04:13, Evgeniy Polyakov wrote: > On 30 Oct 2004 19:41:27 -0400 > jamal wrote: > > Can you explain the "rate" or "speed" parameter ? > > Driver writer can set "rate" parameter to any number from 0 to 64k - > and it will show speed of this driver in current mode/type/operation. [..] > > That mean that this driver perform des 6 time faster than aes, but > it should be fair numbers and somehow measured and compared to other > drivers. > So you have some init code that does testing? Or is this factor of six part of the spec provided by chip vendor? > This also can be achieved by qlen parameter - if driver writer sets > it to bigger walue then in this mode driver/hardware works faster. > But driver writer can set qlen in a too big value just because > it want it to be such without any means of driver/hardware capabilities. > It is not forbidden. > It is no different than say the way you will do ethernet drivers. DMA ring sizes and link speeds. harder for ethernet drivers if link speeds change (Linux net scheduling assumes fixed speed ;->) > And the last and the most interesting one is following: > we create per session initialiser parameter "session_processin_time" > which will be sum of the time slices when driver performed operation > on session, since we alredy has "scomplete" paramenter which is equal > to the amount of completed(processed) session then we have _fair_ speed > of the driver/hardware in a given mode/operation/type. > > Of course load blancer should select device with the lowest > session_processing_time/scompleted. > > I think third variant is what we want. I will think of it some more > and will implement soon. > I think you should be able to have multiple, configurable LB algos. > > I havent studied your code, however, what Eugene is pointing out is > > valuable detail/feedback. > > > > You should have in your queuing towards the crypto chip ability to > > batch. i.e sort of nagle-like "wait until we have 10 packets/20KB or 20 > > jiffies" before you send everything in the queue to the chip. > > That is exactly how crypto driver should be written. > Driver has it's queue and number of session in it, so it and only it > can decide when begin to process them in the most effective way. > This should be above driver, really. You should have one or more queues where the scheduler feeds off and shoves to hardware. Perhaps several levels: ->LB-+ +-> device1 scheduler --> driver queues/rings. | | +-> device2 scheduler --> driver queues/rings. | . . +-> devicen scheduler --> driver queues/rings. If you look at the linux traffic control, the stuff below LB is how it behaves. That should be generic enough to _not_ sit in the driver. This allows for adding smart algorithms to it; fe: qos, rate limiting, feedback to LB so it could make smarter decisions etc. > > As he points out (and i am sure he can back it with data ;->), that > > given the setup cost, packet size, algo and CPU and bus speed, it may > > not make sense to use the chip at all ;-> > > Michal has numbers - pure hardware beats soft in a certain setups > in a fully synchronous schema, let's work SW and HW in parallel. > > Of course SW can encrypt 64 byte faster than it will be transfered to > old ISA crypto card, but it worth to do it for compressing with LZW > 9000 bytes jumbo frame. > Would be interesting. I have seen the numbers from Eugene and they are quiet intriguing - but they are for the sync mode. cheers, jamal From hadi@cyberus.ca Sun Oct 31 07:04:15 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 07:04:20 -0800 (PST) Received: from mx02.cybersurf.com (mx02.cybersurf.com [209.197.145.105]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VF4EC0012724 for ; Sun, 31 Oct 2004 07:04:15 -0800 Received: from mail.cyberus.ca ([209.197.145.21]) by mx02.cybersurf.com with esmtp (Exim 4.30) id 1COHFL-0007Vj-UT for netdev@oss.sgi.com; Sun, 31 Oct 2004 10:03:55 -0500 Received: from cpe0030ab124d2f-cm014500000962.cpe.net.cable.rogers.com ([24.103.99.32] helo=[10.0.0.9]) by mail.cyberus.ca with esmtp (Exim 4.20) id 1COHFJ-0006uG-4w; Sun, 31 Oct 2004 10:03:53 -0500 Subject: Re: Asynchronous crypto layer. From: jamal Reply-To: hadi@cyberus.ca To: Michal Ludvig Cc: johnpol@2ka.mipt.ru, netdev@oss.sgi.com, cryptoapi@lists.logix.cz, Eugene Surovegin In-Reply-To: <4184C286.3000400@suse.cz> References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> <20041030203550.GB6256@gate.ebshome.net> <20041031010415.4c798a04@zanzibar.2ka.mipt.ru> <20041030205630.GD6256@gate.ebshome.net> <20041031012423.74b98698@zanzibar.2ka.mipt.ru> <1099179687.1041.117.camel@jzny.localdomain> <20041031121308.648e98f9@zanzibar.2ka.mipt.ru> <4184C286.3000400@suse.cz> Content-Type: text/plain Organization: jamalopolous Message-Id: <1099235030.1038.192.camel@jzny.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 Date: 31 Oct 2004 10:03:50 -0500 Content-Transfer-Encoding: 7bit X-archive-position: 11258 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: hadi@cyberus.ca Precedence: bulk X-list: netdev On Sun, 2004-10-31 at 05:46, Michal Ludvig wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > Yes, I have *some* numbers, but consider that they are for quite > eligible setup - encrypting ~1.5k IPsec packets. I should retry with a > much smaller MTU to see the difference... > You should try with different packet sizes for different hardware, or s/ware drivers with and without async; with and without batching. packet sizes 64,256,512,1024,1500 bytes. batch sizes, 1,2,4,8,16,.. > I think it won't be the programmer but the system administrator who will > have to correctly set priorities and constraints for different > hardware/software engines for the particular system. Why is the admin involved in such decision making? > With a slow CPU it > may be worth to offload even small blocks to hardware, with a fast one > it may be worth to set HW and SW as equal, etc. > I think the system should discover all this at runtime. If the driver says its busy, you dont give it more work. Clearly giving it more data is beneficial; hence before it gets busy you give it enough to overcome the setup cost. You should have qos (start with simple strict priority); and the preference could be given to large packets etc as long as you dont introduce reordering. Come to think of it, this would be really easily doable if the crypto device appeared to the system as a netdevice. cheers, jamal From mcr@sandelman.ottawa.on.ca Sun Oct 31 07:43:13 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 07:43:18 -0800 (PST) Received: from noxmail.sandelman.ottawa.on.ca (cyphermail.sandelman.ottawa.on.ca [205.150.200.161]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VFhARq014007 for ; Sun, 31 Oct 2004 07:43:11 -0800 Received: from lox.sandelman.ottawa.on.ca (IDENT:root@lox.sandelman.ottawa.on.ca [205.150.200.178]) by noxmail.sandelman.ottawa.on.ca (8.11.6p3/8.11.6) with ESMTP id i9VFdpB00234 (using TLSv1/SSLv3 with cipher EDH-RSA-DES-CBC3-SHA (168 bits) verified FAIL); Sun, 31 Oct 2004 10:39:57 -0500 (EST) Received: from road.marajade.sandelman.ca (desk.marajade.sandelman.ca [205.150.200.247]) by lox.sandelman.ottawa.on.ca (8.11.6p3/8.11.6) with ESMTP id i9VFj1p13121 (using TLSv1/SSLv3 with cipher EDH-RSA-DES-CBC3-SHA (168 bits) verified FAIL); Sun, 31 Oct 2004 10:45:07 -0500 (EST) Received: from sandelman.ottawa.on.ca (marajade [127.0.0.1]) by road.marajade.sandelman.ca (8.12.11/8.12.3/Debian-6.6) with ESMTP id i9VFaPqx010318 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 31 Oct 2004 10:36:25 -0500 Received: from marajade.sandelman.ottawa.on.ca (mcr@localhost) by sandelman.ottawa.on.ca (8.12.11/8.12.3/Debian-6.6) with ESMTP id i9VFaAT1010314; Sun, 31 Oct 2004 10:36:16 -0500 To: Michal Ludvig cc: johnpol@2ka.mipt.ru, hadi@cyberus.ca, netdev@oss.sgi.com, cryptoapi@lists.logix.cz, Eugene Surovegin Subject: Re: Asynchronous crypto layer. In-Reply-To: Message from Michal Ludvig of "Sun, 31 Oct 2004 11:46:30 +0100." <4184C286.3000400@suse.cz> References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> <20041030203550.GB6256@gate.ebshome.net> <20041031010415.4c798a04@zanzibar.2ka.mipt.ru> <20041030205630.GD6256@gate.ebshome.net> <20041031012423.74b98698@zanzibar.2ka.mipt.ru> <1099179687.1041.117.camel@jzny.localdomain> <20041031121308.648e98f9@zanzibar.2ka.mipt.ru> <4184C286.3000400@suse.cz> X-Mailer: MH-E 7.4.2; nmh 1.0.4+dev; XEmacs 21.4 (patch 15) Mime-Version: 1.0 (generated by tm-edit 1.8) Content-Type: text/plain; charset=US-ASCII Date: Sun, 31 Oct 2004 10:36:10 -0500 Message-ID: <10313.1099236970@marajade.sandelman.ottawa.on.ca> From: Michael Richardson X-archive-position: 11259 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: mcr@sandelman.ottawa.on.ca Precedence: bulk X-list: netdev -----BEGIN PGP SIGNED MESSAGE----- >>>>> "Michal" == Michal Ludvig writes: Michal> I think it won't be the programmer but the system Michal> administrator who will have to correctly set priorities and Michal> constraints for different hardware/software engines for the Michal> particular system. With a slow CPU it may be worth to Michal> offload even small blocks to hardware, with a fast one it Michal> may be worth to set HW and SW as equal, etc. yes. There are lots of situations where, yes, a 2Ghz CPU can do IPsec much faster and with lower latency and with less jitter than hardware. However, the CPU might have other important things to do. Things that make the owner money. This will become more and more obvious as IPsec is used host-to-host for all sorts of traffic. - -- ] "Elmo went to the wrong fundraiser" - The Simpson | firewalls [ ] Michael Richardson, Xelerance Corporation, Ottawa, ON |net architect[ ] mcr@xelerance.com http://www.sandelman.ottawa.on.ca/mcr/ |device driver[ ] panic("Just another Debian GNU/Linux using, kernel hacking, security guy"); [ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) Comment: Finger me for keys iQCVAwUBQYUGZoqHRg3pndX9AQED8wP/SuLbcQimL6HleUQJq/ZtFTKBqKPGyQWg s7BrN/ZWCHPhS+9X3Pe3kioab2EC77VajHVLP45xDTX2Jb2MLyWzCGbMrJGZvmHT ZXUNSWpyy8XZtM807ibajlbRT8J8cKgkz9/J1r4hh4JdoxQFlbxH7PmEaO/qws+g WIcQ2cdXDOA= =Q8L1 -----END PGP SIGNATURE----- From chas@cmf.nrl.navy.mil Sun Oct 31 07:52:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 07:53:02 -0800 (PST) Received: from ginger.cmf.nrl.navy.mil (ginger.cmf.nrl.navy.mil [134.207.10.161]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VFqsKC014631 for ; Sun, 31 Oct 2004 07:52:55 -0800 Received: from cmf.nrl.navy.mil (thirdoffive.cmf.nrl.navy.mil [134.207.10.180]) by ginger.cmf.nrl.navy.mil (8.12.11/8.12.11) with ESMTP id i9VFq5XQ017682; Sun, 31 Oct 2004 10:52:05 -0500 (EST) Message-Id: <200410311552.i9VFq5XQ017682@ginger.cmf.nrl.navy.mil> To: davem@redhat.com Cc: netdev@oss.sgi.com, "Randy.Dunlap" , myxie@debian.org, gprocida@madge.com, linux-atm-general@lists.sourceforge.net Subject: [PATCH][ATM]: [ambassador] fix type and printk warning (from Randy Dunlap ) In-Reply-To: Message from "Randy.Dunlap" of "Mon, 11 Oct 2004 12:02:17 PDT." <416AD8B9.9000901@osdl.org> Date: Sun, 31 Oct 2004 10:52:06 -0500 From: "chas williams (contractor)" X-Virus-Scanned: NAI Completed X-Scanned-By: MIMEDefang 2.30 (www . roaringpenguin . com / mimedefang) X-archive-position: 11260 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chas@cmf.nrl.navy.mil Precedence: bulk X-list: netdev please apply to 2.6 thanks! Signed-off-by: Chas Williams # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/31 10:49:16-05:00 chas@relax.cmf.nrl.navy.mil # [ATM]: [ambassador] fix type and printk warning (from Randy Dunlap ) # # drivers/atm/ambassador.c # 2004/10/31 10:49:01-05:00 chas@relax.cmf.nrl.navy.mil +2 -2 # [ATM]: [ambassador] fix type and printk warning (from Randy Dunlap ) # diff -Nru a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c --- a/drivers/atm/ambassador.c 2004-10-31 10:50:03 -05:00 +++ b/drivers/atm/ambassador.c 2004-10-31 10:50:03 -05:00 @@ -2261,7 +2261,7 @@ int err; // read resources from PCI configuration space - u8 irq = pci_dev->irq; + unsigned int irq = pci_dev->irq; if (pci_dev->device == PCI_DEVICE_ID_MADGE_AMBASSADOR_BAD) { PRINTK (KERN_ERR, "skipped broken (PLX rev 2) card"); @@ -2270,7 +2270,7 @@ } PRINTD (DBG_INFO, "found Madge ATM adapter (amb) at" - " IO %x, IRQ %u, MEM %p", pci_resource_start(pci_dev, 1), + " IO %lx, IRQ %u, MEM %p", pci_resource_start(pci_dev, 1), irq, bus_to_virt(pci_resource_start(pci_dev, 0))); // check IO region From jmorris@redhat.com Sun Oct 31 08:05:55 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 08:06:10 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VG5sCe015387 for ; Sun, 31 Oct 2004 08:05:55 -0800 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9VG5S6F007617; Sun, 31 Oct 2004 11:05:28 -0500 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9VG5Rr10353; Sun, 31 Oct 2004 11:05:27 -0500 Received: from thoron.boston.redhat.com (thoron.boston.redhat.com [172.16.80.63]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9VG5PFF029581; Sun, 31 Oct 2004 11:05:25 -0500 Date: Sun, 31 Oct 2004 11:05:26 -0500 (EST) From: James Morris X-X-Sender: jmorris@thoron.boston.redhat.com To: Evgeniy Polyakov cc: netdev@oss.sgi.com, , "David S. Miller" Subject: Re: Asynchronous crypto layer. In-Reply-To: <1099030958.4944.148.camel@uganda> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 11261 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jmorris@redhat.com Precedence: bulk X-list: netdev > Please review and comment, I am open for discussion. Here is an initial review, based on the updated patch posted my Michael Ludwig. It's great to see this code being written rather than just discussed. Have you seen earlier discussions on hardware crypto requirements, some of which are summarized at http://samba.org/~jamesm/crypto/hardware_notes.txt , and further discussed on the cryptoapi list? Briefly, the main components required for hardware crypto support are: a) Crypto driver API This is for registering all types of crypto drivers, including the software algorithms and various hardware devices. A feature of this API would be to communicate various capabilities and features of the driver to the core crypto code. Your code appears to at least partially provide such an API, although I'm not clear on exactly what it's suitable for all types of crypto drivers. It looks to be heading in the right direction. The existing software drivers should be converted to the new API and the old API removed. b) Kernel crypto API This refers to the API used by general kernel code which needs to invoke crypto processing. Currently we have a simple synchronous API. For hardware support we need an asynchronous API, which for example, would allow a caller to: - allocate a crypto session, specifying preferences, algorithms to be used etc. - manage crypto session parameters (e.g. key info etc). - batch and submit crypto operations - receive completed operation results I would imagine that we would deprecate the existing sync API, convert existing users to the async API then eventually remove the sync API. This areas needs more analysis and development. c) Async engine: scheduling/batching/routing etc. This seems to be the core of what you've developed so far. I'm not sure if we need pluggable load balancers. How would the sysadmin select the correct one? The simpler this code is the better. d) User API via filesystem. The user API issue has been discussed on the crypto API list previously. I have outlined some ideas for a pseudo filesytem API, although there are still some issues to be resolved. Overall I think it's a good start. There are some chicken & egg type problems when you don't have GPL drivers, hardware or an existing async API, so I'd imagine that this will all continue to evolve: with more hardware we can write/incorporate more drivers, with more drivers we can further refine the async support and API etc. Code Review. Firstly, please follow Documentation/CodingStyle more closely. Perhaps run Lindent over your code and have a look at the differences. It's much easier to review and test the code if it is supplied as a patch against a recent Linus kernel, rather than a collection of files. If you update your tree, please regenerate the patch rather than just send new files. Here are some issues that I noticed: What is main_crypto_device? Is this a placeholder for when there are no other devices registered? Async & sync drivers need to both be treated as crypto drivers. static inline void crypto_route_free(struct crypto_route *rt) { crypto_device_put(rt->dev); rt->dev = NULL; kfree(rt); } Why do you set rt->dev to NULL here? It should not still be referenceable at this point. __crypto_route_del() etc: Why are you rolling your own list management and not using the list.h functions? +struct crypto_device_stat +{ + __u64 scompleted; + __u64 sfinished; ... Please see how networking stats are implemented (e.g. netif_rx_stats) and previous netdev discussions on 64-bit counters. Please only use __u64 and similar when exporting structures to userspace. Struct ordring: + u16 priority; + + u64 id; + u64 dev_id; + + u32 flags; The struct will be better aligned if you put the smaller fields first (although there may be cases where you want cache-hot items at the front). Also, why the gaps between fields? __crypto_device_add(): Please split device initialization and linking into distinct functions. The initialization should probably be done in e.g. crypto_device_alloc() instead of this. + struct crypto_device *__dev, *n; Please use a name other than __dev here. Underscored variable names are generally used for things like local variables in macros, not local temporary variables in functions. void crypto_device_remove(struct crypto_device *dev): Don't loop waiting for the device to become free. Also, you're scheduling inside a spinlock. This code needs to be re-thought in general to ensure that a device is always destroyed safely. crypto_lb_unregister(): I think this has already been raised. Please don't do things like this. I'm not sure we need loadable load balancers yet, although in any case, if we always need one loaded, then make a default one that cannot be unloaded or replaces the last lb. Where is crypto_session_alloc() used? It's difficult to evaluate the code more deeply without seeing such primitives in use. Thanks for doing this work and hope this helps, - James -- James Morris From jmorris@redhat.com Sun Oct 31 08:07:34 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 08:07:38 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VG7Xxu015645 for ; Sun, 31 Oct 2004 08:07:33 -0800 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9VG76DA007852; Sun, 31 Oct 2004 11:07:06 -0500 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9VG71r10483; Sun, 31 Oct 2004 11:07:01 -0500 Received: from thoron.boston.redhat.com (thoron.boston.redhat.com [172.16.80.63]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9VG6xFF029688; Sun, 31 Oct 2004 11:06:59 -0500 Date: Sun, 31 Oct 2004 11:07:00 -0500 (EST) From: James Morris X-X-Sender: jmorris@thoron.boston.redhat.com To: jamal cc: Michal Ludvig , , , , Eugene Surovegin Subject: Re: Asynchronous crypto layer. In-Reply-To: <1099235030.1038.192.camel@jzny.localdomain> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 11262 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jmorris@redhat.com Precedence: bulk X-list: netdev On 31 Oct 2004, jamal wrote: > Come to think of it, this would be really easily doable if the crypto > device appeared to the system as a netdevice. Should netdevices be generalized into some kind of generic packet munchers? :-) - James -- James Morris From jmorris@redhat.com Sun Oct 31 08:09:48 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 08:09:52 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com [66.187.233.31]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VG9lEN016143 for ; Sun, 31 Oct 2004 08:09:48 -0800 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id i9VG9Q2G008313; Sun, 31 Oct 2004 11:09:26 -0500 Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i9VG9Kr10721; Sun, 31 Oct 2004 11:09:20 -0500 Received: from thoron.boston.redhat.com (thoron.boston.redhat.com [172.16.80.63]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id i9VG9JFF029740; Sun, 31 Oct 2004 11:09:19 -0500 Date: Sun, 31 Oct 2004 11:09:20 -0500 (EST) From: James Morris X-X-Sender: jmorris@thoron.boston.redhat.com To: Michael Richardson cc: Michal Ludvig , , , , , Eugene Surovegin Subject: Re: Asynchronous crypto layer. In-Reply-To: <10313.1099236970@marajade.sandelman.ottawa.on.ca> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 11263 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: jmorris@redhat.com Precedence: bulk X-list: netdev On Sun, 31 Oct 2004, Michael Richardson wrote: > There are lots of situations where, yes, a 2Ghz CPU can do IPsec much > faster and with lower latency and with less jitter than hardware. > > However, the CPU might have other important things to do. Things that > make the owner money. I guess control over this should be tunable, perhaps just a boolean of whether to try and aim for raw speed or for reduced CPU contention. - James -- James Morris From chas@cmf.nrl.navy.mil Sun Oct 31 08:28:50 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 08:28:55 -0800 (PST) Received: from ginger.cmf.nrl.navy.mil (ginger.cmf.nrl.navy.mil [134.207.10.161]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VGSn3w020064 for ; Sun, 31 Oct 2004 08:28:50 -0800 Received: from cmf.nrl.navy.mil (thirdoffive.cmf.nrl.navy.mil [134.207.10.180]) by ginger.cmf.nrl.navy.mil (8.12.11/8.12.11) with ESMTP id i9VGSNma017970; Sun, 31 Oct 2004 11:28:23 -0500 (EST) Message-Id: <200410311628.i9VGSNma017970@ginger.cmf.nrl.navy.mil> To: netdev@oss.sgi.com Cc: davem@redhat.com, adam@yggdrasil.com Subject: [PATCH][ATM]: [drivers] add missing pci_tbl exports (pointed out by "Adam J. Richter" ) Date: Sun, 31 Oct 2004 11:28:24 -0500 From: "chas williams (contractor)" X-Virus-Scanned: NAI Completed X-Scanned-By: MIMEDefang 2.30 (www . roaringpenguin . com / mimedefang) X-archive-position: 11264 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: chas@cmf.nrl.navy.mil Precedence: bulk X-list: netdev adam pointed out that i missed adding MODULE_DEVICE_TABLE when i fixed the horizon driver. i noticed some others were missing it as well. please apply to 2.6. thanks! Signed-off-by: Chas Williams # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/10/31 11:26:23-05:00 chas@relax.cmf.nrl.navy.mil # [ATM]: [drivers] add missing pci_tbl exports (pointed out by "Adam J. Richter" # diff -Nru a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c --- a/drivers/atm/ambassador.c 2004-10-31 11:27:09 -05:00 +++ b/drivers/atm/ambassador.c 2004-10-31 11:27:09 -05:00 @@ -2439,6 +2439,8 @@ { 0, } }; +MODULE_DEVICE_TABLE(pci, amb_pci_tbl); + static struct pci_driver amb_driver = { .name = "amb", .probe = amb_probe, diff -Nru a/drivers/atm/he.c b/drivers/atm/he.c --- a/drivers/atm/he.c 2004-10-31 11:27:09 -05:00 +++ b/drivers/atm/he.c 2004-10-31 11:27:09 -05:00 @@ -3051,6 +3051,8 @@ { 0, } }; +MODULE_DEVICE_TABLE(pci, he_pci_tbl); + static struct pci_driver he_driver = { .name = "he", .probe = he_init_one, diff -Nru a/drivers/atm/horizon.c b/drivers/atm/horizon.c --- a/drivers/atm/horizon.c 2004-10-31 11:27:09 -05:00 +++ b/drivers/atm/horizon.c 2004-10-31 11:27:09 -05:00 @@ -2913,6 +2913,8 @@ { 0, } }; +MODULE_DEVICE_TABLE(pci, hrz_pci_tbl); + static struct pci_driver hrz_driver = { .name = "horizon", .probe = hrz_probe, diff -Nru a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c --- a/drivers/atm/idt77252.c 2004-10-31 11:27:09 -05:00 +++ b/drivers/atm/idt77252.c 2004-10-31 11:27:09 -05:00 @@ -3819,6 +3819,8 @@ { 0, } }; +MODULE_DEVICE_TABLE(pci, idt77252_pci_tbl); + static struct pci_driver idt77252_driver = { .name = "idt77252", .id_table = idt77252_pci_tbl, From khc@pm.waw.pl Sun Oct 31 15:16:33 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 15:16:41 -0800 (PST) Received: from inx.pm.waw.pl (postfix@inx.pm.waw.pl [195.116.170.20]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i9VNGWg3002175 for ; Sun, 31 Oct 2004 15:16:33 -0800 Received: from defiant.pm.waw.pl (cmk203.neoplus.adsl.tpnet.pl [83.31.138.203]) by inx.pm.waw.pl (Postfix) with ESMTP id ED23FDF92; Mon, 1 Nov 2004 00:18:07 +0100 (CET) Received: by defiant.pm.waw.pl (Postfix, from userid 500) id 53ACD41053; Mon, 1 Nov 2004 00:14:25 +0100 (CET) To: Pekka Enberg Cc: Al Viro , davem@davemloft.net, netdev@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: net: generic netdev_ioaddr References: <1099044244.9566.0.camel@localhost> <20041029131607.GU24336@parcelfarce.linux.theplanet.co.uk> <20041029193827.GV24336@parcelfarce.linux.theplanet.co.uk> <1099129946.10961.9.camel@localhost> <1099206669.9571.10.camel@localhost> From: Krzysztof Halasa Date: Mon, 01 Nov 2004 00:14:24 +0100 In-Reply-To: <1099206669.9571.10.camel@localhost> (Pekka Enberg's message of "Sun, 31 Oct 2004 09:11:09 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-archive-position: 11265 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: khc@pm.waw.pl Precedence: bulk X-list: netdev Hi, Pekka Enberg writes: > Cops already exposes base address and irq as module parameters and yet > it calls netdev_boot_setup_check() to check "netdev=" so I assume > there's a reason for that. Perhaps something like the (untested) patch > below would make more sense? IMHO partially: base_addr etc should go from the core (to driver's local structs if needed). I think no general netdev-setup thing is needed, we have module parameters and library functions. No ioctl for such things is needed either. /sbin/ifconfig shouldn't mess with hardware data such as I/O address, IRQ etc. - it should be a configuration tool for software protocols, not for hardware (i.e. as /sbin/ip is). My opinion of course. -- Krzysztof Halasa From mdomsch@lists.us.dell.com Sun Oct 31 20:45:04 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 20:45:10 -0800 (PST) Received: from lists.us.dell.com (lists.us.dell.com [143.166.224.162]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id iA14j3mR019169 for ; Sun, 31 Oct 2004 20:45:03 -0800 Received: from lists.us.dell.com (localhost.localdomain [127.0.0.1]) by lists.us.dell.com (8.12.10/8.12.10/Dell.IT.3.31.03) with ESMTP id iA14iXMU019085; Sun, 31 Oct 2004 22:44:33 -0600 Received: (from mdomsch@localhost) by lists.us.dell.com (8.12.10/8.12.10/Submit) id iA14iX60019083; Sun, 31 Oct 2004 22:44:33 -0600 Date: Sun, 31 Oct 2004 22:44:33 -0600 From: Matt Domsch To: jamal Cc: Herbert Xu , netdev@oss.sgi.com Subject: Re: [PATCH 2.6] dev.c: clear SIOCGIFHWADDR buffer if !dev->addr_len Message-ID: <20041101044433.GA18772@lists.us.dell.com> References: <20041030013700.GA21540@lists.us.dell.com> <20041030030936.GA25102@lists.us.dell.com> <1099163419.1039.97.camel@jzny.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1099163419.1039.97.camel@jzny.localdomain> User-Agent: Mutt/1.4.1i X-archive-position: 11268 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: Matt_Domsch@dell.com Precedence: bulk X-list: netdev Content-Length: 8929 Lines: 167 On Sat, Oct 30, 2004 at 03:10:19PM -0400, jamal wrote: > fix the net-snmp code. The addr_len is dependent on the device type. > 6 is good for ethernet but may not equate for others. I wish it were that simple. The problem, in my mind, is that the SIOCGIFHWADDR ioctl does not behave in 2.6 kernels as it has behaved in previous kernels, and applications have no way to know this. This will lead to unexpected behaviour in many applications that (wrongly) assume that the first 6 or more bytes of sa_data after ioctl() contain valid data, unless told otherwise by a failure return value. I took the liberty of unpacking all the sources to Fedora Core 3 development tree as of yesterday. Of those I looked into the source for, nearly all the packages that call SIOCGIFHWADDR make an assumption on the number of bytes returned and the validity of such, nearly none clear the request structure before calling it (so when ioctl() returns 0 the app believes the data is correct). anaconda-10.1.0.0/isys/getmacaddr.c: if (ioctl(sock, SIOCGIFHWADDR, &ifr) < 0) BROKEN: clears ifr before ioctl, copies first 6 bytes of ifr.ifr_hwaddr.sa_data busybox-1.00.rc1/networking/udhcp/socket.c: if (ioctl(fd, SIOCGIFHWADDR, &ifr) == 0) { BROKEN: oesn't clear ifr before ioctl, copies first 6 bytes of ifr.ifr_hraddr.sa_data busybox-1.00.rc1/networking/nameif.c: if (ioctl(ctl_sk, SIOCGIFHWADDR, &ifr)) BROKEN: doesn't clear ifr before ioctl, compares first ETH_ALEN bytes of ifr.ifr_hraddr.sa_data busybox-1.00.rc1/networking/libiproute/iptunnel.c: if (ioctl(fd, SIOCGIFHWADDR, &ifr)) { OK, only copies ifr.ifr_addr.sa_family busybox-1.00.rc1/libbb/interface.c: if (ioctl(skfd, SIOCGIFHWADDR, &ifr) < 0) BROKEN: doesn't clear ifr before ioctl, copies first 8 bytes of ifr.ifr_hraddr.sa_data dhcp-0.10/common.c: if (ioctl(skfd, SIOCGIFHWADDR, &if_hwaddr) < 0) OK, doesn't clear ifr before ioctl, copies first 6 bytes of ifr.ifr_hraddr.sa_data for sa_family ETHERNET, 0 for PPP. dhcp-3.0.1/common/discover.c: if (ioctl (sock, SIOCGIFHWADDR, &ifr) < 0) OK, doesn't clear ifr before ioctl, copies first 6 bytes of ifr.ifr_hraddr.sa_data for sa_family ETHERNET, considers PPP an error. e2fsprogs-1.35/lib/uuid/gen_uuid.c: if (ioctl(sd, SIOCGIFHWADDR, &ifr) < 0) BROKEN: doesn't clear ifr before ioctl, examines and copies first 6 bytes of ifr.ifr_hraddr.sa_data gnome-netstatus-2.8.0/src/netstatus-iface.c: if (ioctl (fd, SIOCGIFHWADDR, &if_req) < 0) BROKEN: doesn't clear ifr before ioctl, uses sa_family to determine action. gnome-nettool-0.99.3/src/info.c: ioctl (sockfd, SIOCGIFHWADDR, &ifrcopy); BROKEN: doesn't clear ifr before ioctl, prints first 6 bytes of sa_data howl-0.9.6/src/lib/howl/Posix/posix_interface.c: res = ioctl(sock, SIOCGIFHWADDR, &ifr); howl-0.9.6/src/lib/howl/Posix/posix_interface.c: res = ioctl(sock, SIOCGIFHWADDR, ifr); BROKEN: doesn't clear ifr before ioctl, copies first 6 bytes of sa_data (2 occurances) net-snmp-5.1.2/snmplib/snmpv3.c: if (ioctl(sock, SIOCGIFHWADDR, &request)) { BROKEN: does clear request, copies IFHWADDRLEN bytes of sa_data net-snmp-5.1.2/agent/mibgroup/tunnel/tunnel.c: if (ioctl(fd, SIOCGIFHWADDR, &ifrq) == 0) OK: doesn't clear request, doesn't look at sa_data, only sa_family. net-snmp-5.1.2/agent/mibgroup/mibII/interfaces.c: if (ioctl(fd, SIOCGIFHWADDR, &ifrq) < 0) BROKEN: doesn't clear ifrq, if ioctl fails it clears the 6 destination bytes. If ioctl succeeds, it copies the first 6 bytes of sa_data. (this was the instance that made me realise the ioctl behaved differently) net-snmp-5.1.2/agent/mibgroup/mibII/ipv6.c: if (ioctl(s, SIOCGIFHWADDR, &ifr) < 0) { BROKEN: does clear ifrq, if ioctl fails it clears the 6 destination bytes. If ioctl succeeds, it copies the first 6 bytes of sa_data. Exercise left to reader: iproute2-2.6.9/ip/iptunnel.c: err = ioctl(fd, SIOCGIFHWADDR, &ifr); iproute2-2.6.9/misc/arpd.c: if (ioctl(udp_sock, SIOCGIFHWADDR, &ifr)) iputils/rarpd.c: if (ioctl(fd, SIOCGIFHWADDR, ifrp)) { iputils/ifenslave.c: rv = ioctl(skfd, SIOCGIFHWADDR, &if_hwaddr); iputils/ifenslave.c: if (ioctl(skfd, SIOCGIFHWADDR, &ifr) < 0) irda-utils-0.9.16/irdaping/irdaping.c: if (ioctl(self.fd, SIOCGIFHWADDR, &self.ifr) < 0 ) { isdn4k-utils-CVS-2003-09-23/ipppd/sys-linux.c: if (ioctl (sockfd, SIOCGIFHWADDR, &ifreq) < 0) { isdn4k-utils-CVS-2003-09-23/libpcap-0.7.2/pcap-linux.c: if (ioctl(fd, SIOCGIFHWADDR, &ifr) == -1) { kudzu-1.1.95/kudzu.c: if (ioctl(fd, SIOCGIFHWADDR, &ifr) < 0) goto next; libgtop-2.8.0/sysdeps/linux/netload.c: if (!ioctl (skfd, SIOCGIFHWADDR, &ifr)) { ncpfs-2.2.4/ipx-1.0/ipx_cmd.c: err = ioctl(fd_ipx, SIOCGIFHWADDR, &ifr); net-tools-1.60/lib/interface.c: if (ioctl(skfd, SIOCGIFHWADDR, &ifr) < 0) net-tools-1.60/lib/interface.c.virtualname: if (ioctl(skfd, SIOCGIFHWADDR, &ifr) < 0) net-tools-1.60/lib/interface.c.cycle: if (ioctl(skfd, SIOCGIFHWADDR, &ifr) < 0) net-tools-1.60/lib/interface.c.siunits: if (ioctl(skfd, SIOCGIFHWADDR, &ifr) < 0) net-tools-1.60/arp.c: if (ioctl(sockfd, SIOCGIFHWADDR, &ifr) < 0) { net-tools-1.60/iptunnel.c: err = ioctl(fd, SIOCGIFHWADDR, &ifr); net-tools-1.60/nameif.c: r = ioctl(ctl_sk, SIOCGIFHWADDR, &ifr); net-tools-1.60/ether-wake.c: if (ioctl(s, SIOCGIFHWADDR, &if_hwaddr) < 0) { nmap-3.70/tcpip.cc:if (ioctl(sd, SIOCGIFHWADDR, &ifr) < 0 ) { nmap-3.70/libpcap-possiblymodified/pcap-linux.c: if (ioctl(fd, SIOCGIFHWADDR, &ifr) == -1) { openswan-2.1.5/testing/attacks/espiv/ipsec_hack.c: if (ioctl (listen_s, SIOCGIFHWADDR, &ifr) < 0) { openswan-2.1.5/testing/attacks/espiv/ipsec_hack.c: if (ioctl (send_s, SIOCGIFHWADDR, &ifr) < 0) { ppp-2.4.2/pppd/plugins/rp-pppoe/plugin.c: if (ioctl(fd, SIOCGIFHWADDR, &ifr) < 0) { ppp-2.4.2/pppd/plugins/rp-pppoe/if.c: if (ioctl(fd, SIOCGIFHWADDR, &ifr) < 0) { ppp-2.4.2/pppd/sys-linux.c: if (ioctl (sock_fd, SIOCGIFHWADDR, &bestifreq) < 0) { ppp-2.4.2/pppd/sys-linux.c: ret = ioctl(sock_fd, SIOCGIFHWADDR, &ifreq); ppp-2.4.2/pppd/sys-linux.c: ok = ioctl (s, SIOCGIFHWADDR, (caddr_t) &ifr) >= 0; ppp-2.4.2/pppd/sys-linux.c: if(ioctl(skfd, SIOCGIFHWADDR, &ifr) < 0) pump-0.8.21/dhcp.c: if (ioctl(sock, SIOCGIFHWADDR, &req)) quagga-0.97.0/zebra/if_ioctl.c: ret = if_ioctl (SIOCGIFHWADDR, (caddr_t) &ifreq); radvd-0.7.2/device-linux.c: if (ioctl(sock, SIOCGIFHWADDR, &ifr) < 0) rarpd/rarpd.c: if (ioctl(fd, SIOCGIFHWADDR, ifrp)) { rarpd/rarpd.c.ss981107: if (ioctl(fd, SIOCGIFHWADDR, ifrp)) { rhpl-0.148/src/ethtool/ethtool.c: err = ioctl(fd, SIOCGIFHWADDR, &ifr); rhpl-0.148/src/ethtool/iwlib.c: if((ioctl(skfd, SIOCGIFHWADDR, &ifr) < 0) || rp-pppoe-3.5/src/if.c: if (ioctl(fd, SIOCGIFHWADDR, &ifr) < 0) { rp-pppoe-3.5/src/plugin.c: if (ioctl(fd, SIOCGIFHWADDR, &ifr) < 0) { scrollkeeper-0.3.14/libuuid/gen_uuid.c: if (ioctl(sd, SIOCGIFHWADDR, &ifr) < 0) tcpdump-3.8.2/libpcap-0.8.3/pcap-linux.c: if (ioctl(fd, SIOCGIFHWADDR, &ifr) == -1) { wvstreams-3.75.0/linuxstreams/wvinterface.cc: if (req(SIOCGIFHWADDR, &ifr)) efibootmgr (not in FC, but I'm the upstream maintainer on it and know it looks at just 6 bytes). Here's what 2.2.0 (possibly earlier) through 2.4.(current) has: memcpy(ifr->ifr_hwaddr.sa_data,dev->dev_addr, MAX_ADDR_LEN); ifr->ifr_hwaddr.sa_family=dev->type; return 0; Here's what 2.6 has: memcpy(ifr->ifr_hwaddr.sa_data, dev->dev_addr, min(sizeof ifr->ifr_hwaddr.sa_data, (size_t) dev->addr_len)); ifr->ifr_hwaddr.sa_family = dev->type; return 0; Thus for dev->addr_len < MAX_ADDR_LEN (8), the behavior is different (fewer bytes are copied, discarding what was most likely zeros) and for dev->addr_len > MAX_ADDR_LEN, the behaviour is different too (more valid bytes are copied), a good thing for apps that care and a no-op for those that thought 6 was a useful number. > Having said that i think we should somehow signal that info to user > space. perhaps returning -EINVAL in the case the L2 address is 0? > EINVAL will break a few apps and make them puke as opposed to silently > returning something wrong. My immediate concern was net-snmp, which, on failure, will do the right thing if returning -EINVAL in this case. I did not review all the above to know if they would behave correctly on -EINVAL in that case. I think -EOVERFLOW would be appropriate return for dev->addr_len > sizeof sa_data, yes? I'd prefer though, that an "obsolete" function, be marked as such somehow (perhaps print a net_ratelimit()ed KERN_DEBUG message when it's called telling apps to move to rtnetlink), and that the behaviour for everything except overflow be consistent with the prior implementation, at least until such a time that all the apps in the distros are converted to rtnetlink. Thanks, Matt -- Matt Domsch Sr. Software Engineer, Lead Engineer Dell Linux Solutions linux.dell.com & www.dell.com/linux Linux on Dell mailing lists @ http://lists.us.dell.com From johnpol@2ka.mipt.ru Sun Oct 31 21:08:30 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 21:08:36 -0800 (PST) Received: from vocord.com (dea.vocord.ru [217.67.177.50]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id iA158SE0020113 for ; Sun, 31 Oct 2004 21:08:29 -0800 Received: from [192.168.0.48] (uganda.factory.vocord.ru [192.168.0.48]) by vocord.com (8.12.11/8.12.11) with ESMTP id iA157wH3007910; Mon, 1 Nov 2004 08:07:59 +0300 Subject: Re: Asynchronous crypto layer. From: Evgeniy Polyakov Reply-To: johnpol@2ka.mipt.ru To: hadi@cyberus.ca Cc: netdev@oss.sgi.com, cryptoapi@lists.logix.cz, Eugene Surovegin In-Reply-To: <1099234559.1040.183.camel@jzny.localdomain> References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> <20041030203550.GB6256@gate.ebshome.net> <20041031010415.4c798a04@zanzibar.2ka.mipt.ru> <20041030205630.GD6256@gate.ebshome.net> <20041031012423.74b98698@zanzibar.2ka.mipt.ru> <1099179687.1041.117.camel@jzny.localdomain> <20041031121308.648e98f9@zanzibar.2ka.mipt.ru> <1099234559.1040.183.camel@jzny.localdomain> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-d3KlxGogRmLVGVXJBu/E" Organization: MIPT Message-Id: <1099285972.5070.24.camel@uganda> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Mon, 01 Nov 2004 08:12:52 +0300 X-Virus-Scanned: ClamAV 0.80/533/Sun Oct 17 05:09:44 2004 clamav-milter version 0.80j on dea.vocord.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.4 (vocord.com [192.168.0.1]); Mon, 01 Nov 2004 05:08:00 +0000 (UTC) X-archive-position: 11269 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: johnpol@2ka.mipt.ru Precedence: bulk X-list: netdev Content-Length: 6007 Lines: 159 --=-d3KlxGogRmLVGVXJBu/E Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sun, 2004-10-31 at 17:56, jamal wrote: > On Sun, 2004-10-31 at 04:13, Evgeniy Polyakov wrote: > > On 30 Oct 2004 19:41:27 -0400 > > jamal wrote: >=20 > > > Can you explain the "rate" or "speed" parameter ? > >=20 > > Driver writer can set "rate" parameter to any number from 0 to 64k - > > and it will show speed of this driver in current mode/type/operation. > [..] > >=20 > > That mean that this driver perform des 6 time faster than aes, but=20 > > it should be fair numbers and somehow measured and compared to other > > drivers. > >=20 >=20 > So you have some init code that does testing? Or is this factor of six > part of the spec provided by chip vendor? Chip vendor, but what if vendor lies or it was measured in a different setup than other vendor? And what about software speeds? > > This also can be achieved by qlen parameter - if driver writer sets > > it to bigger walue then in this mode driver/hardware works faster. > > But driver writer can set qlen in a too big value just because > > it want it to be such without any means of driver/hardware capabilities= . > > It is not forbidden. > >=20 >=20 > It is no different than say the way you will do ethernet drivers. > DMA ring sizes and link speeds. harder for ethernet drivers if link > speeds change (Linux net scheduling assumes fixed speed ;->) >=20 > > And the last and the most interesting one is following: > > we create per session initialiser parameter "session_processin_time"=20 > > which will be sum of the time slices when driver performed operation=20 > > on session, since we alredy has "scomplete" paramenter which is equal=20 > > to the amount of completed(processed) session then we have _fair_ speed= =20 > > of the driver/hardware in a given mode/operation/type. > >=20 > > Of course load blancer should select device with the lowest > > session_processing_time/scompleted. > >=20 > > I think third variant is what we want. I will think of it some more > > and will implement soon. > >=20 >=20 > I think you should be able to have multiple, configurable LB algos. Second is already implemented. Third I posted to my TODO. Should we add "rate" or will use "qlen" instead? > > > I havent studied your code, however, what Eugene is pointing out is > > > valuable detail/feedback. > > > > > > You should have in your queuing towards the crypto chip ability to > > > batch. i.e sort of nagle-like "wait until we have 10 packets/20KB or = 20 > > > jiffies" before you send everything in the queue to the chip. > >=20 > > That is exactly how crypto driver should be written. > > Driver has it's queue and number of session in it, so it and only it > > can decide when begin to process them in the most effective way. > >=20 >=20 > This should be above driver, really. > =20 > You should have one or more queues where the scheduler feeds off and > shoves to hardware. Perhaps several levels: There are already several queues - one per crypto device. Scheduler decides what device should handle given session,=20 and put session into selected device's queue and calls ->data_ready() device's callback. It is device that can handle several session per one "travel" of it's queue. Or do you say that scheduler can hold session until number of such session becomes more than threshold and then post them at once to some device's queue? Why it is needed? That can be implemented easily by splitting crypto_session_alloc() into two parts like James sugests, but I do not see a reason for it. What if no session will be allocated in the near future? Then first session will sit in a vacuum for a long while it=20 could be already processed even non effectively. > ->LB-+ > +-> device1 scheduler --> driver queues/rings. > | > | > +-> device2 scheduler --> driver queues/rings. > | > . > . > +-> devicen scheduler --> driver queues/rings. >=20 > If you look at the linux traffic control, the stuff below LB is how it > behaves. That should be generic enough to _not_ sit in the driver. > This allows for adding smart algorithms to it; fe: qos, rate limiting, > feedback to LB so it could make smarter decisions etc. It does not sit in the driver. Ethernet device has hard_start_xmit() which takes only one skb just because hardware can not handle several packets at once. Crypto devices [often] have ability to handle several sessions at once,=20 that is why struct crypto_device has queue from which device can take sessions more than one in a time. Sessions are placed into device's queue by scheduler which has some algorithms inside(like qos), but then driver can get one session and process it - thus it will looks like netdevice, but it also can take several sessions and process them at once, netdev just can not do it. > > > As he points out (and i am sure he can back it with data ;->), that > > > given the setup cost, packet size, algo and CPU and bus speed, it may > > > not make sense to use the chip at all ;-> > >=20 > > Michal has numbers - pure hardware beats soft in a certain setups > > in a fully synchronous schema, let's work SW and HW in parallel. > >=20 > > Of course SW can encrypt 64 byte faster than it will be transfered to > > old ISA crypto card, but it worth to do it for compressing with LZW > > 9000 bytes jumbo frame. > >=20 >=20 > Would be interesting. I have seen the numbers from Eugene and they are=20 > quiet intriguing - but they are for the sync mode. >=20 > cheers, > jamal >=20 --=20 Evgeniy Polyakov Crash is better than data corruption. -- Art Grabowski --=-d3KlxGogRmLVGVXJBu/E Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQBBhcXUIKTPhE+8wY0RAkyXAKCYOKSW1z2BSFoG0iqhE2tfLqxPHACgkWkO XndqZ9iwcg25jNPlIdVmgdE= =JUJe -----END PGP SIGNATURE----- --=-d3KlxGogRmLVGVXJBu/E-- From johnpol@2ka.mipt.ru Sun Oct 31 21:54:29 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 21:54:35 -0800 (PST) Received: from vocord.com (dea.vocord.ru [217.67.177.50]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id iA15sRYs021579 for ; Sun, 31 Oct 2004 21:54:29 -0800 Received: from [192.168.0.48] (uganda.factory.vocord.ru [192.168.0.48]) by vocord.com (8.12.11/8.12.11) with ESMTP id iA15s4um009427; Mon, 1 Nov 2004 08:54:04 +0300 Subject: Re: Asynchronous crypto layer. From: Evgeniy Polyakov Reply-To: johnpol@2ka.mipt.ru To: James Morris Cc: netdev@oss.sgi.com, cryptoapi@lists.logix.cz, "David S. Miller" In-Reply-To: References: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-J8oT7NTdkDfCwwhXz2hs" Organization: MIPT Message-Id: <1099288738.5070.71.camel@uganda> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Mon, 01 Nov 2004 08:58:59 +0300 X-Virus-Scanned: ClamAV 0.80/533/Sun Oct 17 05:09:44 2004 clamav-milter version 0.80j on dea.vocord.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.4 (vocord.com [192.168.0.1]); Mon, 01 Nov 2004 05:54:05 +0000 (UTC) X-archive-position: 11270 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: johnpol@2ka.mipt.ru Precedence: bulk X-list: netdev Content-Length: 10078 Lines: 311 --=-J8oT7NTdkDfCwwhXz2hs Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sun, 2004-10-31 at 19:05, James Morris wrote: > > Please review and comment, I am open for discussion. >=20 > Here is an initial review, based on the updated patch posted my Michael=20 > Ludwig. >=20 > It's great to see this code being written rather than just discussed. >=20 > Have you seen earlier discussions on hardware crypto requirements, some o= f > which are summarized at http://samba.org/~jamesm/crypto/hardware_notes.tx= t > , and further discussed on the cryptoapi list? Yes, I have read it and many others. I believe I've gathered all usefull features and implement them in a right direction. > Briefly, the main components required for hardware crypto support are: >=20 > a) Crypto driver API >=20 > This is for registering all types of crypto drivers, including the > software algorithms and various hardware devices. A feature of this API > would be to communicate various capabilities and features of the driver t= o > the core crypto code. Your code appears to at least partially provide > such an API, although I'm not clear on exactly what it's suitable for all > types of crypto drivers. It looks to be heading in the right direction. >=20 > The existing software drivers should be converted to the new API and the=20 > old API removed. Or we can create some kind of bridge between old sync codebase and new async API. Peaple are using sync API, async can live with it without problems. > b) Kernel crypto API >=20 > This refers to the API used by general kernel code which needs to invoke > crypto processing. Currently we have a simple synchronous API. >=20 > For hardware support we need an asynchronous API, which for example, woul= d=20 > allow a caller to: >=20 > - allocate a crypto session, specifying preferences, algorithms to be=20 > used etc. > - manage crypto session parameters (e.g. key info etc). > - batch and submit crypto operations > - receive completed operation results I've put first tree into one function crypto_session_alloc(), although there are mechanisms to manage crypto session after it is allocated. > I would imagine that we would deprecate the existing sync API, convert=20 > existing users to the async API then eventually remove the sync API. >=20 > This areas needs more analysis and development. >=20 >=20 > c) Async engine: scheduling/batching/routing etc. >=20 > This seems to be the core of what you've developed so far. I'm not sure=20 > if we need pluggable load balancers. How would the sysadmin select the=20 > correct one? The simpler this code is the better. By following command: echo -en "simple_lb" > /sys/class/crypto_lb/lbs or by sending [still not implemented] connector's(netlink) command. >=20 > d) User API via filesystem. >=20 > The user API issue has been discussed on the crypto API list previously. = =20 > I have outlined some ideas for a pseudo filesytem API, although there are= =20 > still some issues to be resolved. >=20 >=20 > Overall I think it's a good start. There are some chicken & egg type=20 > problems when you don't have GPL drivers, hardware or an existing async=20 > API, so I'd imagine that this will all continue to evolve: with more=20 > hardware we can write/incorporate more drivers, with more drivers we can=20 > further refine the async support and API etc. That is true, but I think not all parts of API should be exported as GPL only. > Code Review. >=20 > Firstly, please follow Documentation/CodingStyle more closely. Perhaps=20 > run Lindent over your code and have a look at the differences. I waited this :) > It's much easier to review and test the code if it is supplied as a patch > against a recent Linus kernel, rather than a collection of files. If you= =20 > update your tree, please regenerate the patch rather than just send new=20 > files. Sure. Files were sent for review, since they can be compiled as stand alone module. >=20 > Here are some issues that I noticed: >=20 >=20 > What is main_crypto_device? Is this a placeholder for when there are no=20 > other devices registered? main_crypto_device is just virtual device into which all sessions are placed along with specific crypto device queue. it is usefull for cases when some driver decides that HW is broken and marks itself like not working, then scheduler _may_ (simple_lb does not have such feature) and actually _should_ move all sessions that are placed into broken device's queue into other devices or drop them(call callback with special session flag). It is also usefull for the following situation: consider situation when several slow devices has it's queues with some sessions in it, then we add new fast crypto device, bu there are no new sessions that can be pleced into it. Scheduler may decide to move sessions from different slow device into new fast one. All above cases can be easier to implement if we already have one queue with all sessions in it, and scheduler should not go through all crypto device's queues. > Async & sync drivers need to both be treated as crypto drivers. >=20 >=20 > static inline void crypto_route_free(struct crypto_route *rt) > { > crypto_device_put(rt->dev); > rt->dev =3D NULL; > kfree(rt); > } >=20 > Why do you set rt->dev to NULL here? It should not still be referenceabl= e=20 > at this point. crypto_route_free() can be called only from crypto_route_del() which unlinks given route thus noone can reference rt->dev(but of course asnyone can have it's private copy, obtained under the lock). Any route access is guarded by route list lock. >=20 > __crypto_route_del() etc: >=20 > Why are you rolling your own list management and not using the list.h=20 > functions? It is more convenient here to use queue like sk_buf does. >=20 > +struct crypto_device_stat > +{ > + __u64 scompleted; > + __u64 sfinished; > ... >=20 > Please see how networking stats are implemented (e.g. netif_rx_stats) and= =20 > previous netdev discussions on 64-bit counters. Please only use __u64 an= d=20 > similar when exporting structures to userspace. I use __ prefix for any parameter that is exported to userspace. I've seen several attempts to convert network statistic to 64bit values, with backward compatibility it is not an easy task. Let's do not catch this again. > Struct ordring: >=20 > + u16 priority; > + > + u64 id; > + u64 dev_id; > + > + u32 flags; >=20 > The struct will be better aligned if you put the smaller fields first > (although there may be cases where you want cache-hot items at the front)= . =20 > Also, why the gaps between fields? >=20 All they are created with cache alignment in mind - above cut is following: struct crypto_session_initializer { u16 operation; u16 type; u16 mode; u16 priority; u64 id; u64 dev_id; u32 flags; u32 bdev; crypto_callback_t callback; }; >=20 > __crypto_device_add(): >=20 > Please split device initialization and linking into distinct functions. =20 > The initialization should probably be done in e.g. crypto_device_alloc()=20 > instead of this. No problem. I gave it such name since __crypto_device_add() is called only from crypto_device_add() (and main_crypto_device initialisation routing). > + struct crypto_device *__dev, *n; >=20 > Please use a name other than __dev here. Underscored variable names are=20 > generally used for things like local variables in macros, not local=20 > temporary variables in functions. Ok. > void crypto_device_remove(struct crypto_device *dev): >=20 > Don't loop waiting for the device to become free. Also, you're schedulin= g=20 > inside a spinlock. This code needs to be re-thought in general to ensure= =20 > that a device is always destroyed safely. No, lock is already freed there. The sequence is following: grab the lock. search given device unlink it free the lock // after it nobody can add new sessions to the given device wait until device becomes free - it should be called from device's module_exit() function, thus we are in a process context. while waiting(device finishes it's sessions processing) we reschedule itself. return. > crypto_lb_unregister(): >=20 > I think this has already been raised. Please don't do things like this. = =20 > I'm not sure we need loadable load balancers yet, although in any case,=20 > if we always need one loaded, then make a default one that cannot be=20 > unloaded or replaces the last lb. We have several IO schedulers. I believe different hardware setups will requere different load balancers - for example for setups with only fast devices we can use just simple_lb, for setups with mixed devices we need to think of session moving between them. Simple_lb is fast but it does not have some features, advanced1_lb for example can have some tricky algorithm to select crypto device and/or=20 have some thoughts about session moving... But I think that we need one unloadable crypto load balancer which will be used if all others are removed/unused. I add it to my TODO. >=20 > Where is crypto_session_alloc() used? It's difficult to evaluate the cod= e > more deeply without seeing such primitives in use. I've sent several files in a first e-mail that are called like=20 consumer.c slow_consumer.c - it is crypto consumers, actually they=20 just call crypto_session_alloc() with appropriate parameters... >=20 > Thanks for doing this work and hope this helps, Thank you. >=20 > - James --=20 Evgeniy Polyakov Crash is better than data corruption. -- Art Grabowski --=-J8oT7NTdkDfCwwhXz2hs Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQBBhdCiIKTPhE+8wY0RAnh5AJ9tyXyDCND/xMEbG/uPixri6XK7ywCeMBRk tFQnfpAjZ8DJ5R2Vg+t4wcM= =Qqax -----END PGP SIGNATURE----- --=-J8oT7NTdkDfCwwhXz2hs-- From johnpol@2ka.mipt.ru Sun Oct 31 21:57:18 2004 Received: with ECARTIS (v1.0.0; list netdev); Sun, 31 Oct 2004 21:57:25 -0800 (PST) Received: from vocord.com (dea.vocord.ru [217.67.177.50]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id iA15vHUm022091 for ; Sun, 31 Oct 2004 21:57:18 -0800 Received: from [192.168.0.48] (uganda.factory.vocord.ru [192.168.0.48]) by vocord.com (8.12.11/8.12.11) with ESMTP id iA15unP2009516; Mon, 1 Nov 2004 08:56:50 +0300 Subject: Re: Asynchronous crypto layer. From: Evgeniy Polyakov Reply-To: johnpol@2ka.mipt.ru To: hadi@cyberus.ca Cc: Michal Ludvig , netdev@oss.sgi.com, cryptoapi@lists.logix.cz, Eugene Surovegin In-Reply-To: <1099235030.1038.192.camel@jzny.localdomain> References: <1099030958.4944.148.camel@uganda> <1099053738.1024.104.camel@jzny.localdomain> <20041029180652.113f0f6e@zanzibar.2ka.mipt.ru> <20041030203550.GB6256@gate.ebshome.net> <20041031010415.4c798a04@zanzibar.2ka.mipt.ru> <20041030205630.GD6256@gate.ebshome.net> <20041031012423.74b98698@zanzibar.2ka.mipt.ru> <1099179687.1041.117.camel@jzny.localdomain> <20041031121308.648e98f9@zanzibar.2ka.mipt.ru> <4184C286.3000400@suse.cz> <1099235030.1038.192.camel@jzny.localdomain> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-Wz3a8jLEwwUmA2AknEAN" Organization: MIPT Message-Id: <1099288904.5070.75.camel@uganda> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Mon, 01 Nov 2004 09:01:44 +0300 X-Virus-Scanned: ClamAV 0.80/533/Sun Oct 17 05:09:44 2004 clamav-milter version 0.80j on dea.vocord.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.4 (vocord.com [192.168.0.1]); Mon, 01 Nov 2004 05:56:50 +0000 (UTC) X-archive-position: 11271 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: johnpol@2ka.mipt.ru Precedence: bulk X-list: netdev Content-Length: 2514 Lines: 75 --=-Wz3a8jLEwwUmA2AknEAN Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sun, 2004-10-31 at 18:03, jamal wrote: > On Sun, 2004-10-31 at 05:46, Michal Ludvig wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 >=20 > > Yes, I have *some* numbers, but consider that they are for quite > > eligible setup - encrypting ~1.5k IPsec packets. I should retry with a > > much smaller MTU to see the difference... > >=20 >=20 > You should try with different packet sizes for different hardware, or > s/ware drivers with and without async; with and without batching. > packet sizes 64,256,512,1024,1500 bytes. batch sizes, 1,2,4,8,16,.. >=20 > > I think it won't be the programmer but the system administrator who wil= l > > have to correctly set priorities and constraints for different > > hardware/software engines for the particular system.=20 >=20 > Why is the admin involved in such decision making? >=20 > > With a slow CPU it > > may be worth to offload even small blocks to hardware, with a fast one > > it may be worth to set HW and SW as equal, etc. > >=20 >=20 > I think the system should discover all this at runtime. > If the driver says its busy, you dont give it more work. > Clearly giving it more data is beneficial; hence before it gets busy > you give it enough to overcome the setup cost. > You should have qos (start with simple strict priority); and the > preference could be given to large packets etc as long as you dont > introduce reordering. Crypto session priority already exists - sessions are placed into=20 the queues in order of it's priority. It is supposed that crypto device driver will get them in this order too. > Come to think of it, this would be really easily doable if the crypto > device appeared to the system as a netdevice. :) First of all it would be good to stabilize what we already have. > cheers, > jamal >=20 > _______________________________________________ >=20 > Subscription: http://lists.logix.cz/mailman/listinfo/cryptoapi > List archive: http://lists.logix.cz/pipermail/cryptoapi --=20 Evgeniy Polyakov Crash is better than data corruption. -- Art Grabowski --=-Wz3a8jLEwwUmA2AknEAN Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQBBhdFIIKTPhE+8wY0RAs73AKCXXaL6crR6IYMqUNAII4gl12JLWwCcD1Ve sFf7dxbcQdxY4sbuJP11UqA= =UshT -----END PGP SIGNATURE----- --=-Wz3a8jLEwwUmA2AknEAN--